/* Look and layout after AdventureLog (its "light" theme): cream background, deep green primary, rounded cards with a
   picture on top and badges over it, a navbar, a page header with small stat boxes, and a filter sidebar on the left. */
:root {
  --p: oklch(48.9% .06 164);        /* primary: deep green */
  --p-focus: #315646;
  --pc: oklch(96.5% .01 81.8);
  --s: oklch(57.2% .078 244.7);     /* secondary: blue */
  --a: oklch(71.6% .111 79.7);      /* accent: gold */
  --ac: oklch(22% .013 78);
  --n: oklch(40.8% .008 97.5);      /* neutral */
  --n-focus: #363531;
  --nc: oklch(96.5% .01 81.8);
  --b1: oklch(95.9% .0127 86.8);    /* page and card */
  --b2: oklch(90.8% .02 84.6);
  --b3: oklch(84.8% .024 82.1);
  --bc: oklch(24.9% .01 164);       /* text */
  --muted: oklch(24.9% .01 164 / .65);
  --ok: oklch(62% .12 150);
  --warn: oklch(75% .13 75);
  --info: oklch(62% .1 240);
  --err: oklch(55% .17 28);
  --box: 1rem;
  --btn: .5rem;
  --shadow: 0 10px 15px -3px rgb(0 0 0 / .08), 0 4px 6px -4px rgb(0 0 0 / .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh; color: var(--bc);
  background: linear-gradient(135deg, var(--b2), var(--b1) 45%, var(--b2)) fixed;
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.grow { flex: 1; }
h1 { margin: 0; font-size: 1.875rem; font-weight: 700; line-height: 1.2; color: var(--p); }
h2 { margin: 32px 0 14px; font-size: 1.25rem; font-weight: 700; }

/* navbar */
.navbar { position: sticky; top: 0; z-index: 20; background: var(--b1); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.nav { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { font-size: 1.4rem; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.logo { font-size: 1.6rem; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { background: transparent; border-color: transparent; color: var(--bc); }
.tabs button:hover { background: var(--b2); }
.tabs button[aria-selected="true"] { background: var(--n); color: var(--nc); }
.nav-note { font-size: .875rem; color: var(--muted); font-weight: 600; }

/* page header */
main.wrap { padding-top: 24px; padding-bottom: 96px; }
.page-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head p { margin: 2px 0 0; font-size: .9rem; }
.page-icon { width: 56px; height: 56px; border-radius: .75rem; background: color-mix(in oklch, var(--p) 12%, transparent); display: grid; place-items: center; font-size: 1.7rem; }
.stats { display: flex; gap: 10px; }
.stat { background: var(--b1); border: 1px solid var(--b3); border-radius: .75rem; padding: 6px 16px; text-align: center; min-width: 84px; box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.stat span { display: block; font-size: .7rem; color: var(--muted); }
.stat b { font-size: 1.2rem; color: var(--p); }
.stat.ok b { color: var(--ok); }
.stat.warn b { color: oklch(60% .13 70); }
.progress { height: 8px; background: var(--b3); border-radius: 999px; margin-bottom: 22px; overflow: hidden; }
#progress-bar { height: 100%; width: 0; background: var(--p); border-radius: 999px; transition: width .3s; }

/* sidebar + content */
.layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.sidebar { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 14px; }
.sidebar h2 { margin: 0 0 2px; font-size: 1.1rem; }
.side-actions { display: flex; gap: 8px; border-top: 1px solid var(--b3); padding-top: 12px; }
.more { display: flex; justify-content: center; margin-top: 24px; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

/* controls */
input, select, textarea {
  font: inherit; color: var(--bc); background: var(--b1); min-width: 0; width: 100%;
  border: 1px solid color-mix(in oklch, var(--bc) 22%, transparent); border-radius: var(--btn); padding: 8px 12px;
}
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--p); flex: none; }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { resize: vertical; }
:focus-visible { outline: 2px solid var(--p); outline-offset: 2px; }
button, .button {
  font: inherit; font-size: .875rem; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  color: var(--bc); background: var(--b2); border: 1px solid var(--b3); border-radius: var(--btn); padding: 8px 14px;
  transition: background .15s, transform .1s;
}
button:hover, .button:hover { background: var(--b3); }
button:active { transform: scale(.97); }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--p); border-color: var(--p); color: var(--pc); }
button.primary:hover { background: var(--p-focus); }
button.neutral { background: var(--n); border-color: var(--n); color: var(--nc); }
button.neutral:hover { background: var(--n-focus); }
button.ghost, .button.ghost { background: transparent; border-color: transparent; }
button.ghost:hover, .button.ghost:hover { background: var(--b2); }
button.danger { background: transparent; border-color: var(--err); color: var(--err); }
.fab {
  position: fixed; right: 28px; bottom: 28px; z-index: 30; width: 60px; height: 60px; border-radius: 50%;
  background: var(--p); border-color: var(--p); color: var(--pc); font-size: 2rem; font-weight: 400; padding: 0 0 4px;
  box-shadow: 0 10px 25px rgb(0 0 0 / .25);
}
.fab:hover { background: var(--p-focus); }

label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; }
label.wide { grid-column: 1 / -1; }
label.inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.panel { background: var(--b1); border: 1px solid var(--b3); border-radius: var(--box); box-shadow: var(--shadow); padding: 20px; }
.panel > h2:first-child { margin-top: 0; }
.panel p { margin: 0 0 14px; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.card {
  background: var(--b1); border: 1px solid var(--b3); border-radius: var(--box); box-shadow: var(--shadow);
  display: flex; flex-direction: column; min-width: 0; overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.cards .card:hover { box-shadow: 0 20px 30px -8px rgb(0 0 0 / .18); transform: translateY(-2px); }
.card figure { margin: 0; position: relative; }
.pic { height: 12rem; background: linear-gradient(135deg, var(--b2), var(--b3)); overflow: hidden; }
.pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.overlay { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { margin: 0; font-size: 1.125rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.card p { margin: 0; overflow-wrap: anywhere; }
.card .where { font-size: .875rem; color: var(--muted); }
.card .notes { font-size: .875rem; color: var(--muted); white-space: pre-wrap; }
.card .foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; padding-top: 6px; }
.card .foot button { padding: 7px 12px; }
.card.done .pic img { filter: grayscale(.5); }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badges:empty { display: none; }
.badge { font-size: .75rem; font-weight: 600; line-height: 1.25rem; padding: 0 .6rem; border-radius: 1.9rem; background: var(--b2); color: var(--bc); }
.badge.ok { background: var(--ok); color: #fff; }
.badge.warn { background: var(--warn); color: var(--ac); }
.badge.info { background: var(--info); color: #fff; }
.badge.accent { background: var(--a); color: var(--ac); }
.badge.outline { background: transparent; border: 1px solid color-mix(in oklch, var(--bc) 30%, transparent); }
.badge.glass { background: rgb(255 255 255 / .85); color: #222; backdrop-filter: blur(4px); }

.empty { text-align: center; color: var(--muted); padding: 48px 0; }
.error { color: var(--err); margin: 0; font-weight: 600; }

/* trip ideas: one wide card per trip, facts on the left, the day plan on the right */
.trips { display: flex; flex-direction: column; gap: 24px; }
.card.trip { flex-direction: row; }
.trip-side { flex: 0 0 340px; padding: 0 20px 18px; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid var(--b3); background: color-mix(in oklch, var(--b2) 45%, var(--b1)); }
.trip-side .pic { margin: 0 -20px 8px; }
.trip-side h3 { font-size: 1.25rem; color: var(--p); }
.trip-main { flex: 1; min-width: 0; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.trip ol { margin: 0; padding-left: 20px; }
.facts { display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.fact span { display: block; font-size: .7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.plan { width: 100%; border-collapse: collapse; font-size: .9rem; }
.plan th, .plan td { padding: 9px 12px 9px 0; vertical-align: top; text-align: left; border-top: 1px solid var(--b3); }
.plan thead th { border-top: 0; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.plan tbody th { width: 2.5em; color: var(--p); font-weight: 700; }
.plan td div { color: var(--muted); }
.plan .km { white-space: nowrap; text-align: right; padding-right: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.plan tfoot td, .plan tfoot th { font-weight: 700; border-top: 2px solid var(--bc); }
@media (max-width: 800px) {
  .card.trip { flex-direction: column; }
  .trip-side { flex: none; border-right: 0; border-bottom: 1px solid var(--b3); }
}

.spinner {
  display: inline-block; width: 14px; height: 14px; border: 2px solid var(--b3); border-top-color: var(--p);
  border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

dialog {
  border: 1px solid var(--b3); border-radius: var(--box); background: var(--b1); color: var(--bc);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / .35); padding: 24px; width: min(600px, calc(100vw - 24px));
}
dialog::backdrop { background: rgb(0 0 0 / .45); }
dialog h2 { margin-top: 0; }
dialog form { display: flex; flex-direction: column; gap: 12px; }

/* keyboard browsing */
.cards .card { scroll-margin: 90px 0 24px; }
.card.selected { outline: 3px solid var(--p); outline-offset: 2px; }
.keys { border-top: 1px solid var(--b3); padding-top: 12px; font-size: .8rem; color: var(--muted); }
.keys h3 { margin: 0 0 6px; font-size: .85rem; color: var(--bc); }
.keys p { margin: 0 0 4px; }
kbd { font: 600 .75rem ui-monospace, monospace; background: var(--b2); border: 1px solid var(--b3); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--bc); }
@media (hover: none) { .keys { display: none; } }

.card .similar { font-size: .8rem; font-weight: 600; color: oklch(50% .13 60); }

/* login screen and the account menu in the navbar */
.landing-mode .navbar { display: none; }
.hero { position: relative; min-height: min(100vh, 860px); display: grid; place-items: center; overflow: hidden; background: #12241d; }
/* a wall of photos that fills the hero; the shade on top keeps the text readable */
.wall { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr); gap: 4px; }
.brick { overflow: hidden; background: #1b3229; }
.brick img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .8s; }
.brick img.ready { opacity: 1; }
.hero-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgb(10 24 19 / .86) 0%, rgb(10 24 19 / .72) 45%, rgb(10 24 19 / .42) 100%); }
.hero-content { position: relative; max-width: 640px; padding: 64px 24px; text-align: center; color: #fff; }
.hero-brand { margin: 0 0 28px; font-size: 1.15rem; font-weight: 700; letter-spacing: .01em; display: flex; align-items: center; justify-content: center; gap: 8px; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5.2vw, 3.6rem); line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
.lead { font-size: 1.15rem; color: rgb(255 255 255 / .85); margin: 18px auto 30px; max-width: 30em; }
.hero .error { color: #ffb4a8; margin-bottom: 14px; }
.login-buttons { display: flex; flex-direction: column; gap: 12px; max-width: 340px; margin: 0 auto 18px; }
.login-buttons .button { justify-content: center; gap: 10px; padding: 14px 16px; font-size: 1rem; text-decoration: none; border-radius: 999px; box-shadow: 0 4px 14px rgb(0 0 0 / .3); transition: transform .15s, box-shadow .15s; }
.login-buttons .button:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgb(0 0 0 / .35); }
.mark { display: inline-grid; }
.button.login-google { background: #fff; color: #1f1f1f; border-color: #fff; }
.button.login-facebook { background: #1877f2; color: #fff; border-color: #1877f2; }
.fine { color: rgb(255 255 255 / .6); max-width: 30em; margin: 0 auto; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding-top: 64px; padding-bottom: 72px; text-align: center; }
.feature-icon { font-size: 2rem; }
.feature h2 { margin: 10px 0 6px; font-size: 1.15rem; color: var(--p); }
.feature p { margin: 0 auto; color: var(--muted); max-width: 24em; }
@media (max-width: 760px) {
  .wall { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(6, 1fr); }
  .features { grid-template-columns: 1fr; gap: 32px; padding-top: 44px; }
}
.small { font-size: .8rem; }
.user { position: relative; }
.user summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; padding: 4px 8px; border-radius: var(--btn); }
.user summary::-webkit-details-marker { display: none; }
.user summary:hover { background: var(--b2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--p); color: var(--pc); display: grid; place-items: center; overflow: hidden; font-weight: 700; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; display: flex; flex-direction: column; gap: 8px; padding: 14px; z-index: 30; }
.user-menu p { margin: 0 0 4px; font-size: .85rem; overflow-wrap: anywhere; }

/* the upgrade box on the Trip ideas tab and the admin's list of accounts */
.upgrade { margin-top: 16px; border-color: var(--a); }
#trips-left { margin: 12px 0 0; }
#accounts-dialog { width: min(760px, 94vw); }
#accounts { overflow-x: auto; margin-bottom: 16px; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--err); color: #fff; font-size: .72rem; font-weight: 700; }
/* the small PRO label on the Trip ideas tab: the part of the app that needs an upgrade after the free ideas */
.pro { margin-left: 6px; padding: 2px 6px; border-radius: 999px; background: var(--a); color: var(--ac); font-size: .62rem; font-weight: 800; letter-spacing: .06em; line-height: 1.3; }
.num { margin-right: 6px; color: var(--muted); font-size: .8em; font-weight: 600; font-variant-numeric: tabular-nums; }
/* the privacy page */
.prose { max-width: 760px; padding-top: 32px; padding-bottom: 72px; }
.prose h2 { margin-top: 28px; }
.prose li { margin-bottom: 8px; }
a.brand { color: inherit; text-decoration: none; }
.fine a { color: inherit; }
