/* Plannerwick timeline tool — "Dusk" design system */
:root {
  /* PlannerWick brand: Wine #43232F, Champagne #C6B391, Ivory #F7F4EE, Taupe #85766E */
  --canvas: #F7F4EE;
  --surface: #FFFDF9;
  --surface-2: #FAF6EF;
  --ink: #33202A;
  --ink-2: #5A4148;
  --muted: #74655E;
  --faint: #A3968E;
  --line: #EAE3D8;
  --line-2: #DCD2C3;

  --wine: #43232F;
  --champagne: #C6B391;
  --taupe: #85766E;
  --action: #43232F;
  --action-hover: #5E3242;
  --action-soft: #F3EAEC;

  --day: #EFE7D9;
  --golden: #D2B57A;
  --golden-soft: #F5EEDF;
  --sunset: #B4636E;
  --bluehour: #7A3D4E;
  --night: #43232F;

  --ok: #2F7D5B;
  --ok-soft: #E7F1EA;
  --warn: #B4441E;
  --warn-soft: #F8E9E1;

  --heading: #43232F;
  --on-action: #FFFFFF;
  --strong-bg: #43232F;
  --strong-fg: #FFFFFF;
  --gold-ink: #8A6A2E;
  --warn-ink: #7A2A0A;
  --cta-bg: #43232F;
  --shadow-tint: 67, 35, 47;
  color-scheme: light;

  --who-couple: #43232F;
  --who-all: #85766E;
  --who-vendor: #C6B391;
  --who-planner: #DCD2C3;

  --display: "Plus Jakarta Sans", system-ui, sans-serif;
  --body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-xl: 22px; --r-lg: 16px; --r-md: 11px; --r-sm: 8px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --lift: 0 1px 0 rgba(var(--shadow-tint), 0.04), 0 14px 34px -14px rgba(var(--shadow-tint), 0.22);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 15px/1.55 var(--body); -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 0;
}
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--action); }
svg { flex: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--strong-bg); color: var(--strong-fg); padding: 8px 14px; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; border-radius: 6px; }

/* ---------- buttons ---------- */
.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 600; font-size: 14px; line-height: 1.2; white-space: nowrap; transition: background .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover { background: var(--action-hover); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-quiet:hover { background: var(--surface); }
.btn-line { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); padding: 8px 14px; font-size: 13.5px; font-weight: 500; }
.btn-line:hover { box-shadow: inset 0 0 0 1px var(--line-2); background: var(--surface-2); }
.btn-line svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-gold { background: var(--champagne); color: var(--wine); }
.btn-gold:hover { background: #D6C6A6; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; gap: 14px; max-width: 1320px; margin: 0 auto; padding: 18px 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }


.top-tag { color: var(--muted); font-size: 13.5px; padding-left: 14px; border-left: 1px solid var(--line-2); }
.top .btn { margin-left: auto; }

/* ---------- hero / prompt ---------- */
.hero { max-width: 860px; margin: 0 auto; padding: 40px 24px 28px; text-align: center; }
.hero h1 { font-size: clamp(34px, 5.2vw, 60px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.02; color: var(--heading); text-wrap: balance; }
.hero-sub { color: var(--muted); font-size: 17px; max-width: 56ch; margin: 16px auto 28px; text-wrap: pretty; }
.prompt { text-align: left; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--lift), inset 0 0 0 1px var(--line); padding: 6px; transition: box-shadow .2s var(--ease); }
.prompt:focus-within { box-shadow: var(--lift), inset 0 0 0 2px var(--action); }
.prompt textarea { display: block; width: 100%; border: 0; resize: vertical; min-height: 92px; padding: 14px 16px 6px; font-size: 16.5px; line-height: 1.5; background: transparent; outline: none; }
.prompt textarea::placeholder { color: var(--faint); }
.prompt-foot { display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 16px; }
.prompt-foot .btn { margin-left: auto; padding: 12px 22px; font-size: 15px; }
.hint { color: var(--faint); font-size: 13px; }
kbd { font: 500 11.5px var(--body); background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--muted); }
.examples { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.ex { border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; color: var(--ink-2); transition: box-shadow .15s, background .15s; }
.ex:hover { box-shadow: inset 0 0 0 1px var(--action); color: var(--action); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.chips:empty { display: none; }
.chip { background: var(--action-soft); color: var(--action); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 500; }
.chip.none { background: none; color: var(--muted); padding-left: 0; padding-right: 2px; }

/* ---------- layout ---------- */
.layout { max-width: 1320px; margin: 0 auto; padding: 8px 24px 40px; display: grid; grid-template-columns: 340px minmax(0, 1fr); grid-template-areas: "panel results"; gap: 24px; align-items: start; }
.results { grid-area: results; display: grid; gap: 20px; min-width: 0; }
.panel { grid-area: panel; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: var(--r-xl); box-shadow: inset 0 0 0 1px var(--line); padding: 20px 6px 10px; scrollbar-width: thin; }
.panel-head { padding: 0 14px 12px; }
.panel-head h2 { font-size: 19px; }
.panel-head p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

/* details groups */
.group { border-top: 1px solid var(--line); }
.group > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 14px; font-weight: 600; font-size: 14.5px; cursor: pointer; border-radius: var(--r-sm); }
.group > summary::-webkit-details-marker { display: none; }
.group > summary::after { content: ""; width: 8px; height: 8px; border-right: 1.8px solid var(--faint); border-bottom: 1.8px solid var(--faint); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s var(--ease); }
.group[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.group > summary:hover { color: var(--action); }
.group-body { padding: 0 14px 16px; display: grid; gap: 12px; }

/* fields */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.field input, .field select, .select-sm {
  width: 100%; min-width: 0; height: 40px; padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface-2); font-size: 14.5px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.field select, .select-sm { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2363607A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.field input:hover, .field select:hover { border-color: var(--line-2); }
.field input:focus, .field select:focus, .select-sm:focus { outline: none; border-color: var(--action); background-color: var(--surface); box-shadow: 0 0 0 3px var(--action-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { appearance: none; width: 18px; height: 18px; margin: 2px 0 0; border-radius: 5px; border: 1.5px solid var(--line-2); background: var(--surface); display: grid; place-content: center; flex: none; transition: background .15s, border-color .15s; }
.check input:checked { background: var(--action); border-color: var(--action); }
.check input:checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--on-action); border-bottom: 2px solid var(--on-action); transform: rotate(-45deg) translate(1px, -1px); }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-2); border-radius: 999px; padding: 4px; box-shadow: inset 0 0 0 1px var(--line); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 7px 4px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--muted); transition: background .18s var(--ease), color .18s; }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(67, 35, 47, .12); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--action); outline-offset: 1px; }

.pills { display: flex; flex-wrap: wrap; gap: 7px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span { display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 13px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); transition: all .15s; }
.pill span small { color: var(--faint); font-size: 11.5px; }
.pill input:checked + span { background: var(--action-soft); box-shadow: inset 0 0 0 1.5px var(--action); color: var(--action); font-weight: 500; }
.pill input:checked + span small { color: var(--action); opacity: .7; }
.pill input:focus-visible + span { outline: 2px solid var(--action); outline-offset: 2px; }

/* ---------- result sheet ---------- */
.sheet { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--lift), inset 0 0 0 1px var(--line); padding: 26px 26px 18px; min-width: 0; }
.summary-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.summary-head h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 750; letter-spacing: -0.03em; }
.sub { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; color: var(--muted); font-size: 14px; }
.sub span { display: inline-flex; align-items: center; gap: 6px; }
.sub svg, .t-meta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--ok-soft); color: var(--ok); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.bad { background: var(--warn-soft); color: var(--warn); }

/* the day ribbon — signature element */
.ribbon-wrap { margin-top: 24px; }
.ribbon { position: relative; height: 64px; border-radius: 14px; overflow: visible; }
.ribbon-sky { position: absolute; inset: 0; border-radius: 14px; }
.ribbon-sun { position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; pointer-events: none; color: #FFF6E2; filter: drop-shadow(0 0 8px rgba(255, 236, 196, .9)); }
.ribbon-sun svg { width: 100%; height: 100%; display: block; }
.pin { position: absolute; top: 0; bottom: 0; width: 24px; margin-left: -12px; border: 0; padding: 0; background: none; }
.pin::before { content: ""; position: absolute; top: 10px; bottom: 10px; left: 11px; width: 2px; border-radius: 2px; background: rgba(255, 255, 255, .92); box-shadow: 0 0 0 1px rgba(67, 35, 47, .08); }
.pin span { position: absolute; left: 12px; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 600; color: var(--ink); background: var(--surface); padding: 3px 8px; border-radius: 999px; box-shadow: 0 2px 8px rgba(67, 35, 47, .16); transition: transform .15s var(--ease), background .15s; }
.pin.up span { bottom: calc(100% + 6px); }
.pin.down span { top: calc(100% + 6px); }
.pin:hover span, .pin:focus-visible span { background: var(--ink); color: #fff; }
.pin:focus-visible { outline: none; }
.ribbon-axis { position: relative; height: 18px; margin-top: 34px; font-size: 11.5px; color: var(--faint); font-feature-settings: "tnum" 1; }
.ribbon-axis span { position: absolute; transform: translateX(-50%); }
.ribbon-axis span:first-child { transform: none; }
.ribbon-axis span:last-child { transform: translateX(-100%); }
.ribbon-wrap.has-up { padding-top: 30px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.facts b { color: var(--ink); font-weight: 600; font-feature-settings: "tnum" 1; }
.fact { display: inline-flex; align-items: center; gap: 7px; }
.fact i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.conflicts:empty { display: none; }
.conflicts { margin-top: 18px; display: grid; gap: 10px; }
.conflict { background: var(--warn-soft); color: var(--warn-ink); border-radius: var(--r-md); padding: 12px 14px; font-size: 14px; }
.conflict b { color: var(--warn); }
.conflict ul { margin: 6px 0 0; padding-left: 18px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 26px 0 6px; }
.tabs { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.tabs [role=tab] { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: background .18s var(--ease), color .18s; }
.tabs [role=tab][aria-selected=true] { background: var(--strong-bg); color: var(--strong-fg); }
.tabs [role=tab]:not([aria-selected=true]):hover { color: var(--ink); }
.select-sm { width: auto; height: 36px; border-radius: 999px; font-size: 13.5px; padding-left: 14px; }

/* ---------- timeline list ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.hour { display: flex; align-items: center; gap: 12px; padding: 18px 0 6px; font-family: var(--display); font-weight: 650; font-size: 15px; color: var(--ink); letter-spacing: -0.01em; }
.hour::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.hour small { font-family: var(--body); font-size: 12px; font-weight: 500; color: var(--faint); letter-spacing: 0; }
.t-item { border-radius: var(--r-md); transition: background .2s; }
.t-item + .t-item { margin-top: 2px; }
.t-row { display: grid; grid-template-columns: 74px 4px minmax(0, 1fr) auto; gap: 14px; align-items: start; width: 100%; text-align: left; background: none; border: 0; padding: 10px 10px; border-radius: var(--r-md); }
.t-row:hover:not(:disabled) { background: var(--surface-2); }
.t-row:disabled { cursor: default; }
.t-time { font-weight: 600; font-size: 14px; font-feature-settings: "tnum" 1; color: var(--ink); padding-top: 1px; }
.t-time small { display: block; white-space: nowrap; font-weight: 400; font-size: 12px; color: var(--faint); margin-top: 1px; }
.stripe { align-self: stretch; border-radius: 4px; min-height: 22px; }
.t-title { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.t-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.t-meta span { display: inline-flex; align-items: center; gap: 5px; }
.t-note { display: block; margin-top: 6px; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-radius: var(--r-sm); padding: 7px 10px; }
.t-flags { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; padding-top: 1px; }
.flag { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.flag.key { background: var(--action-soft); color: var(--action); box-shadow: none; }
.flag.lock { background: var(--strong-bg); color: var(--strong-fg); box-shadow: none; }
.flag.err { background: var(--warn-soft); color: var(--warn); box-shadow: none; }
.t-item.open { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.t-item.open .t-row:hover { background: none; }
.t-item.has-err .t-title { color: var(--warn); }
.t-item.sun .t-row { padding-top: 8px; padding-bottom: 8px; }
.t-item.sun .t-title { color: var(--gold-ink); }
.t-item.sun .stripe { background: linear-gradient(var(--golden), var(--sunset)) !important; }
.t-item.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0% { background: var(--golden-soft); } 100% { background: transparent; } }
.empty { padding: 28px 10px; color: var(--muted); text-align: center; }

.editor { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 4px 12px 14px 102px; }
.ed-group { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.ed-group > span { margin-right: 4px; }
.mini { display: inline-flex; align-items: center; gap: 5px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); border-radius: 999px; padding: 5px 10px; font-size: 12.5px; font-weight: 600; font-feature-settings: "tnum" 1; color: var(--ink-2); }
.mini:hover:not(:disabled) { background: var(--strong-bg); color: var(--strong-fg); box-shadow: none; }
.mini:disabled { opacity: .4; cursor: not-allowed; }
.mini svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ed-errs { flex-basis: 100%; color: var(--warn); font-size: 12.5px; }

.exports { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.exports-label { font-size: 13px; color: var(--muted); margin-right: 6px; }

/* ---------- secondary cards ---------- */
.panel-card { background: var(--surface); border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); padding: 20px 22px; min-width: 0; }
.panel-card h2, .people > summary span { font-size: 17px; }
.panel-card h3 { font-size: 14.5px; margin: 16px 0 6px; }
.people > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 10px; }
.people > summary::-webkit-details-marker { display: none; }
.people > summary span { font-family: var(--display); font-weight: 650; letter-spacing: -0.02em; }
.people > summary small { color: var(--faint); font-size: 12.5px; }
.people > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 1.8px solid var(--faint); border-bottom: 1.8px solid var(--faint); transform: rotate(45deg); align-self: center; transition: transform .2s; }
.people[open] > summary::after { transform: rotate(-135deg); }
.notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.checks, .bullets { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 9px; font-size: 13.5px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks .ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; background: var(--ok-soft); color: var(--ok); }
.checks li.bad .ic { background: var(--warn-soft); color: var(--warn); }
.checks small { display: block; color: var(--warn); font-size: 12px; margin-top: 3px; }
.bullets li { position: relative; padding-left: 16px; color: var(--ink-2); }
.bullets li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }

/* gantt */
.gantt-wrap { margin-top: 16px; overflow-x: auto; }
.gantt { position: relative; min-width: 620px; }
.g-overlay { position: absolute; top: 0; bottom: 22px; left: 128px; right: 0; pointer-events: none; }
.g-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.g-golden { position: absolute; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(210, 181, 122, .22), rgba(180, 99, 110, .16)); border-radius: 6px; }
.g-sunset { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px dashed var(--sunset); }
.g-row { display: grid; grid-template-columns: 128px 1fr; align-items: center; height: 26px; }
.g-label { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; }
.g-track { position: relative; height: 14px; }
.g-bar { position: absolute; top: 0; height: 14px; border: 0; border-radius: 4px; padding: 0; min-width: 4px; opacity: .88; transition: opacity .15s, transform .15s; }
.g-bar:hover, .g-bar.sel { opacity: 1; transform: scaleY(1.25); }
.g-axis { display: grid; grid-template-columns: 128px 1fr; margin-top: 6px; }
.g-ticks { position: relative; height: 16px; font-size: 11px; color: var(--faint); font-feature-settings: "tnum" 1; }
.g-tick { position: absolute; transform: translateX(-50%); }

/* CTA */
.cta { position: relative; overflow: hidden; display: flex; gap: 20px; align-items: center; justify-content: space-between; background: var(--cta-bg); color: #fff; border-radius: var(--r-xl); padding: 30px 30px; }
.cta-sky { position: absolute; inset: auto 0 0 0; height: 6px; background: linear-gradient(90deg, var(--day), var(--golden) 45%, var(--sunset) 65%, var(--bluehour) 85%, var(--night)); }
.cta-body { max-width: 60ch; }
.cta h2 { font-size: 24px; font-weight: 700; }
.cta p { color: #D9CBC8; margin-top: 8px; font-size: 14.5px; }

.foot { max-width: 1320px; margin: 0 auto; padding: 8px 24px 48px; color: var(--faint); font-size: 13px; display: grid; gap: 6px; }
.foot a { color: var(--muted); }

/* toast + modal */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--strong-bg); color: var(--strong-fg); padding: 12px 18px; border-radius: 14px; font-size: 14px; max-width: min(92vw, 520px); box-shadow: 0 12px 32px rgba(67, 35, 47, .3); transition: opacity .25s var(--ease), transform .25s var(--ease); pointer-events: none; z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
dialog { border: 0; border-radius: var(--r-xl); padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(var(--shadow-tint), .35); color: var(--ink); background: var(--surface); }
dialog::backdrop { background: rgba(67, 35, 47, .45); backdrop-filter: blur(3px); }
.modal { display: grid; gap: 14px; padding: 26px; }
.modal h2 { font-size: 24px; }
.modal p { color: var(--muted); font-size: 14.5px; }
.modal .thanks { color: var(--ok); background: var(--ok-soft); padding: 10px 12px; border-radius: var(--r-sm); font-weight: 500; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 300px minmax(0, 1fr); }
  .notes-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; grid-template-areas: "results" "panel"; padding: 4px 16px 32px; }
  .panel { position: static; max-height: none; }
  .top { padding: 14px 16px; }
  .hero { padding: 24px 16px 20px; }
  .foot { padding: 8px 16px 40px; }
}
@media (max-width: 640px) {
  .top-tag { display: none; }
  .hero h1 { font-size: 34px; }
  .hero-sub { font-size: 15.5px; margin: 12px auto 20px; }
  .hint { display: none; }
  .prompt-foot .btn { width: 100%; }
  .examples > span { display: none; }
  .sheet { padding: 20px 14px 14px; border-radius: 18px; }
  .summary-head { flex-direction: column; gap: 10px; }
  .pin span { display: none; }
  .pin::before { top: 14px; bottom: 14px; }
  .ribbon-wrap.has-up { padding-top: 0; }
  .ribbon-axis { margin-top: 8px; }
  .t-row { grid-template-columns: 70px 3px minmax(0, 1fr); gap: 10px; padding: 10px 4px; }
  .t-time { font-size: 13.5px; }
  .t-time small { font-size: 11.5px; }
  .facts { flex-direction: column; gap: 6px; }
  .facts b { white-space: nowrap; }
  .t-flags { grid-column: 3; justify-content: flex-start; }
  .editor { padding: 2px 8px 12px 8px; }
  .exports .btn { flex: 1 1 calc(50% - 8px); }
  .exports-label { flex-basis: 100%; }
  .cta { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
  .grid3 { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* print */
@media print {
  .top, .hero, .panel, .toolbar, .exports, .people, .notes-grid, .cta, .foot, .toast, .skip { display: none !important; }
  body { background: #fff; }
  .layout { display: block; padding: 0; max-width: none; }
  .sheet { box-shadow: none; padding: 0; }
  .ribbon-sky, .stripe { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .t-item { break-inside: avoid; }
}
@media (max-width: 640px) {
  .tabs [role=tab] { padding: 7px 12px; }
  .toolbar .select-sm { flex: 1 1 100%; }
}
.g-tick:first-child { transform: none; }
.g-tick:last-child { transform: translateX(-100%); }
.edit-jump { display: none; }
@media (max-width: 900px) { .edit-jump { display: inline-flex; margin-left: auto; } #details { scroll-margin-top: 12px; } }
@media (max-width: 640px) { .edit-jump { margin-left: 0; } }

/* ---------- PlannerWick brand lockup ---------- */
.brand { gap: 11px; }
.mark { width: 38px; height: 38px; display: block; }
.lockup { display: grid; line-height: 1; }
.wordmark { position: relative; font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.045em; color: var(--heading); }
.wm-i { position: relative; }
.wm-star { position: absolute; width: 10px; height: 10px; top: -9px; left: 60%; fill: var(--champagne); }
.wm-sub { font-size: 8.5px; font-weight: 600; letter-spacing: 0.32em; color: var(--taupe); margin-top: 5px; text-transform: uppercase; }
.top-tag { align-self: center; }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }
.btn-primary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* city search */
.city-search { display: grid; gap: 6px; }
.city-search input[type=search] { -webkit-appearance: none; }
.city-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.city-results:empty { display: none; }
.city-results button { width: 100%; text-align: left; border: 0; background: var(--surface-2); border-radius: var(--r-sm); padding: 9px 12px; font-size: 14px; }
.city-results button:hover, .city-results button:focus-visible { background: var(--action-soft); }
.city-results button span { color: var(--muted); font-size: 12.5px; }
.city-msg { font-size: 13px; color: var(--muted); padding: 6px 2px; }

/* brand touches */
.hero h1 { color: var(--heading); }
.sheet { border-top: 3px solid var(--champagne); }
.summary-head h2 { color: var(--heading); }
.tabs [role=tab][aria-selected=true] { background: var(--strong-bg); }
.pin:hover span, .pin:focus-visible span { background: var(--wine); }
.cta { background: var(--cta-bg); }
.cta-sky { background: linear-gradient(90deg, var(--champagne), #E6D3A8 35%, var(--sunset) 70%, #6A3141 88%, var(--wine)); }
.checks .ic { background: var(--golden-soft); color: var(--gold-ink); }
.flag.lock { background: var(--strong-bg); }
.g-bar { opacity: 1; }
@media (max-width: 640px) {
  .mark { width: 32px; height: 32px; }
  .wordmark { font-size: 19px; }
  .wm-sub { font-size: 7.5px; letter-spacing: 0.28em; }
  .top .btn { padding: 8px 12px; font-size: 13px; }
}
/* ribbon contrast on light daytime sky */
.ribbon-sky { box-shadow: inset 0 0 0 1px rgba(67, 35, 47, .07); }
.pin::before { background: #fff; box-shadow: 0 0 0 1.5px rgba(67, 35, 47, .35); }
.mark { width: 44px; height: 44px; }
.wordmark { font-size: 25px; }
.wm-sub { font-size: 9px; margin-top: 6px; }
@media (max-width: 640px) { .mark { width: 36px; height: 36px; } .wordmark { font-size: 20px; } .wm-sub { font-size: 7.5px; } }


/* ---------- dark theme (system default or chosen) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --canvas: #170E12;
  --surface: #221720;
  --surface-2: #2B1E27;
  --ink: #F3ECE4;
  --ink-2: #DDD0C5;
  --muted: #B6A79D;
  --faint: #8C7D75;
  --line: #36262F;
  --line-2: #4A3640;
  --action: #C6B391;
  --action-hover: #D8C8A8;
  --action-soft: rgba(198, 179, 145, 0.14);
  --on-action: #2A161D;
  --heading: #F7F0E6;
  --strong-bg: #F3ECE4;
  --strong-fg: #2A161D;
  --gold-ink: #E2C88F;
  --warn-ink: #F6C4AE;
  --golden-soft: rgba(210, 181, 122, 0.16);
  --ok: #7FCBA5;
  --ok-soft: rgba(47, 125, 91, 0.22);
  --warn: #F09A74;
  --warn-soft: rgba(180, 68, 30, 0.2);
  --cta-bg: #2E1B24;
  --shadow-tint: 0, 0, 0;
  --who-couple: #D98C9A;
  --who-all: #A89A91;
  --who-vendor: #C6B391;
  --who-planner: #5E4A54;
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #170E12;
  --surface: #221720;
  --surface-2: #2B1E27;
  --ink: #F3ECE4;
  --ink-2: #DDD0C5;
  --muted: #B6A79D;
  --faint: #8C7D75;
  --line: #36262F;
  --line-2: #4A3640;
  --action: #C6B391;
  --action-hover: #D8C8A8;
  --action-soft: rgba(198, 179, 145, 0.14);
  --on-action: #2A161D;
  --heading: #F7F0E6;
  --strong-bg: #F3ECE4;
  --strong-fg: #2A161D;
  --gold-ink: #E2C88F;
  --warn-ink: #F6C4AE;
  --golden-soft: rgba(210, 181, 122, 0.16);
  --ok: #7FCBA5;
  --ok-soft: rgba(47, 125, 91, 0.22);
  --warn: #F09A74;
  --warn-soft: rgba(180, 68, 30, 0.2);
  --cta-bg: #2E1B24;
  --shadow-tint: 0, 0, 0;
  --who-couple: #D98C9A;
  --who-all: #A89A91;
  --who-vendor: #C6B391;
  --who-planner: #5E4A54;
  color-scheme: dark;
}
/* dark-only touches */
:root[data-theme="dark"] .mark path:first-child, :root[data-theme="dark"] .wm-wine { fill: #E9DDD2; stroke: #E9DDD2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mark path:first-child { fill: #E9DDD2; stroke: #E9DDD2; } }
.cta { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04); }
.field input, .field select, .select-sm, .prompt, .sheet, .panel, .panel-card { transition: background-color .25s var(--ease), border-color .25s var(--ease); }

/* ---------- theme switch ---------- */
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); margin-left: auto; }
.theme-switch button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 999px; background: none; color: var(--muted); transition: background .18s var(--ease), color .18s; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--heading); box-shadow: 0 1px 3px rgba(var(--shadow-tint), .18); }
.theme-switch svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.top .theme-switch + .btn { margin-left: 0; }
@media (max-width: 640px) {
  .theme-switch button:not([aria-pressed="true"]) { display: none; }
  .theme-switch { padding: 2px; }
  .theme-switch button { width: 34px; height: 34px; }
}
@media print { :root, :root[data-theme="dark"] { color-scheme: light; } }
@media print {
  :root, :root[data-theme="dark"], :root:not([data-theme="light"]) {
    --canvas: #fff; --surface: #fff; --surface-2: #F7F4EE; --ink: #33202A; --ink-2: #5A4148; --heading: #43232F;
    --muted: #74655E; --faint: #A3968E; --line: #EAE3D8; --line-2: #DCD2C3; --who-couple: #43232F; --who-all: #85766E; --who-planner: #DCD2C3;
  }
}
/* soften the bright daytime sky on dark backgrounds */
:root[data-theme="dark"] .ribbon-sky { filter: brightness(.8) saturate(1.05); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ribbon-sky { filter: brightness(.8) saturate(1.05); } }
