/* Atrium Planner. Warm paper, ink and one accent. Serif for voice, sans for work. */

:root {
  --paper: #f5f2ec;
  --paper-raised: #efebe3;
  --ink: #171512;
  --muted: #4f4a44;            /* 7.6:1 on paper (AAA) */
  --line: rgba(23, 21, 18, 0.14);
  --line-strong: rgba(23, 21, 18, 0.32);
  --accent: #1e3a8a;           /* 9.7:1 on paper */
  --accent-ink: #ffffff;
  --accent-dim: rgba(30, 58, 138, 0.08);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --gutter: clamp(24px, 5vw, 64px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #05080f;
    --paper-raised: #0b111c;
    --ink: #e8eef7;
    --muted: #a7b3c6;
    --line: rgba(148, 176, 214, 0.16);
    --line-strong: rgba(148, 176, 214, 0.36);
    --accent: #8fe0ff;
    --accent-ink: #05080f;
    --accent-dim: rgba(143, 224, 255, 0.10);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; }
h1 { font-size: clamp(44px, 7vw, 88px); line-height: 1.02; margin-bottom: 24px; max-width: 14ch; }
h2 { font-size: 24px; line-height: 1.2; }
strong { font-weight: 600; }
code { font: 0.9em ui-monospace, "SF Mono", Menlo, monospace; }

.skip { position: absolute; left: 16px; top: -60px; padding: 10px 16px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; z-index: 10; }
.skip:focus { top: 16px; }

/* Header and footer */
.bar {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px var(--gutter);
}
.mark { font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em; text-decoration: none; }
.bar nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.bar nav > a:not(.btn) { text-decoration: none; color: var(--muted); }
.bar nav > a:not(.btn):hover { color: var(--ink); }

.foot {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap;
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 48px var(--gutter);
  border-top: 1px solid var(--line); color: var(--muted); font-size: 14px;
}
.foot .mark { font-size: 18px; color: var(--ink); }

/* Type roles */
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 34em; margin-bottom: 40px; }
.lede strong { color: var(--ink); }
.muted { color: var(--muted); }
.aside { margin-top: 40px; color: var(--muted); font-size: 15px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border: 1px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 15px/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.btn:hover { color: var(--accent-ink); transform: translateY(-1px); box-shadow: 0 10px 30px rgba(30, 58, 138, 0.22); }
.btn:active { transform: none; }
.btn:disabled { opacity: .5; cursor: progress; transform: none; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--ink); background: var(--accent-dim); box-shadow: none; }
.btn-small { padding: 9px 18px; font-size: 14px; }
.wide { width: 100%; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.link:hover { color: var(--accent); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Forms: a line to write on, nothing more */
.form { display: grid; gap: 28px; justify-items: start; }
.field { display: grid; gap: 6px; width: 100%; }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 0 12px;
  background: transparent; color: var(--ink);
  border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  font: 400 20px/1.3 var(--sans);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .7; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.field select { cursor: pointer; }
.field select option { background: var(--paper); color: var(--ink); }
.field textarea { resize: vertical; min-height: 3.2em; font-size: 17px; line-height: 1.5; }
.field input::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }
@media (prefers-color-scheme: dark) { .field input::-webkit-calendar-picker-indicator { filter: invert(1); } }
.optional { color: var(--muted); opacity: .8; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; width: 100%; }
.field input[readonly] { color: var(--muted); border-bottom-style: dashed; }

.notice { margin: -16px 0 32px; padding: 14px 18px; border-left: 2px solid var(--accent); background: var(--accent-dim); }
.status { margin-top: 16px; min-height: 1.6em; color: var(--muted); font-size: 15px; }
.callout { margin-bottom: 8px; padding: 24px 28px; background: var(--paper-raised); border-radius: 4px; max-width: 34em; }
.callout .eyebrow { margin-bottom: 8px; }
.or { display: flex; align-items: center; gap: 16px; margin: 32px 0 20px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* Layouts */
.hero { padding: clamp(56px, 14vh, 160px) 0 clamp(48px, 10vh, 120px); }
.narrow { max-width: 460px; padding: clamp(48px, 12vh, 140px) 0 96px; }
.narrow h1 { font-size: clamp(40px, 6vw, 64px); }
.page { padding: clamp(48px, 10vh, 120px) 0 96px; }

/* A single point resting on the horizon. */
.horizon { position: relative; margin-top: clamp(64px, 12vh, 128px); border-top: 1px solid var(--line-strong); }
.horizon span { position: absolute; right: 18%; top: -29px; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); clip-path: inset(0 0 50% 0); }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; padding-bottom: 120px; }
.principles article { border-top: 1px solid var(--ink); padding-top: 24px; }
.principles h2 { margin-bottom: 12px; }
.principles p:not(.index) { color: var(--muted); max-width: 30ch; }
.index { font-size: 12px; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 40px; }

.block { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr; gap: 32px 48px; padding: 40px 0 56px; border-top: 1px solid var(--ink); }
.block > div, .block > form { max-width: 560px; }
.block .muted + form, .block .muted + .actions { margin-top: 20px; }
.danger { margin-top: 32px; }
.danger summary { cursor: pointer; width: fit-content; color: var(--muted); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.danger summary:hover { color: var(--accent); }
.danger p, .danger form { margin-top: 16px; }

.rows { list-style: none; margin-bottom: 32px; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.rows li:first-child { border-top: 1px solid var(--line); }
.row-name { font-family: var(--serif); font-size: 19px; }
.row-name a { text-decoration-color: var(--line-strong); }
.row-name a:hover { text-decoration-color: currentColor; }
.row-actions { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.meta { font-size: 14px; color: var(--muted); }
.hint { margin-top: 12px; }
.note { margin-top: 4px; font-size: 15px; white-space: pre-line; max-width: 42em; }
.block .notice { margin: 0 0 24px; }
.lead-actions { margin-bottom: 56px; }

/* Trip pages: tabs under the title */
.tabs { display: flex; gap: 32px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 0 0 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 15px; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs + .block, .tabs + .lead-actions { margin-top: 48px; }

/* Suggestions under location fields, and calendar pickers (static/forms.js). Both hang off a .field. */
.field { position: relative; }
.suggestions, .picker {
  position: absolute; top: 100%; left: 0; z-index: 20; margin-top: 6px;
  background: var(--paper-raised); border: 1px solid var(--line-strong); border-radius: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}
.suggestions { right: 0; max-height: 320px; overflow-y: auto; list-style: none; padding: 6px 0; }
.suggestions [role="option"] { display: grid; gap: 1px; padding: 9px 16px; cursor: pointer; }
.suggestions [role="option"]:hover, .suggestions [aria-selected="true"] { background: var(--accent-dim); }
.suggestion-label { font-size: 16px; }
.suggestion-detail { font-size: 13px; color: var(--muted); }
.suggestion-credit { padding: 8px 16px 4px; border-top: 1px solid var(--line); margin-top: 4px; font-size: 12px; color: var(--muted); }

.field input.picker-input { cursor: pointer; caret-color: transparent; }
.picker { width: 304px; padding: 16px; }
.picker.picker-right { left: auto; right: 0; }
.picker-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.picker-month { font-family: var(--serif); font-size: 18px; }
.picker-nav { width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.picker-nav:hover { background: var(--accent-dim); }
.picker-grid { width: 100%; border-collapse: collapse; }
.picker-grid th { padding: 6px 0; font-size: 12px; font-weight: 500; color: var(--muted); }
.picker-grid td { padding: 1px 0; text-align: center; }
.picker-grid button {
  width: 36px; height: 36px; border: 1px solid transparent; border-radius: 50%; background: none;
  color: var(--ink); font: 400 14px/1 var(--sans); font-variant-numeric: tabular-nums; cursor: pointer;
}
.picker-grid button:hover { background: var(--accent-dim); }
.picker-grid button.in-trip { background: var(--accent-dim); font-weight: 600; }
.picker-grid button.today { border-color: var(--line-strong); }
.picker-grid button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.picker-grid button:disabled { color: var(--muted); opacity: .45; cursor: not-allowed; background: none; }
.picker-time { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.picker .picker-time-input { width: auto; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper); color: var(--ink); font: 400 16px/1.3 var(--sans); }
.picker .picker-time-input:focus { border-color: var(--accent); box-shadow: none; }
.picker-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }

/* Wishlist +1s */
.vote {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--muted);
  font: 600 14px/1.2 var(--sans); cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease);
}
.vote:hover { color: var(--ink); background: var(--accent-dim); }
.vote[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.vote .count { font-variant-numeric: tabular-nums; font-weight: 400; }

/* Plan: a timeline of days, each pinned beside its bookings while you scroll. */
.add-bar { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 56px; }
.add-bar .eyebrow { margin: 0; }
.tabs + .add-bar { margin-top: 48px; }
.day { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr; gap: 24px 48px; padding: 40px 0 16px; border-top: 1px solid var(--ink); }
.day-head { align-self: start; position: sticky; top: 24px; }
.day-head .eyebrow { margin-bottom: 8px; }
.feed { list-style: none; max-width: 640px; }
.event { position: relative; display: grid; grid-template-columns: 52px 36px minmax(0, 1fr) auto; gap: 0 16px; align-items: start; padding-bottom: 32px; }
/* The rail: from under this marker down to the next one. */
.event:not(:last-child)::before { content: ""; position: absolute; left: 86px; top: 40px; bottom: 4px; border-left: 1px solid var(--line-strong); }
.event > time { padding-top: 8px; text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }
.marker { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--paper); color: var(--ink); }
.marker svg { width: 18px; height: 18px; }
.kind-flight .marker { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ending .marker { border-style: dashed; color: var(--muted); }
.event-body { padding-top: 4px; }
.event > form { padding-top: 8px; }
.tag { font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.code { font: 600 14px ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.08em; color: var(--ink); }

@media (max-width: 760px) {
  .bar nav { gap: 18px; }
  .principles, .block, .pair { grid-template-columns: 1fr; }
  .day { grid-template-columns: 1fr; }
  .day-head { position: static; }
  .event { grid-template-columns: 44px 32px minmax(0, 1fr); gap: 0 12px; }
  .event:not(:last-child)::before { left: 71px; top: 36px; }
  .marker { width: 32px; height: 32px; }
  .event > time { padding-top: 6px; }
  .event > form { grid-column: 3; padding-top: 6px; }
  .tabs { gap: 24px; }
  .principles { gap: 40px; }
  .block { gap: 20px; }
  .horizon span { right: 12%; }
}

/* Arrival: content settles in, quietly. */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .8s var(--ease) both; }
  .d1 { animation-delay: .06s; } .d2 { animation-delay: .12s; } .d3 { animation-delay: .18s; }
  .d4 { animation-delay: .24s; } .d5 { animation-delay: .30s; } .d6 { animation-delay: .36s; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } }
}
