/* plan.css — "The Plan" page (booking board + itinerary). Uses shared /design-tokens.css.
   Styling only; all user content injected via textContent in plan.js. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--surface-base); color: var(--text-primary);
  font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: var(--lh-heading); letter-spacing: var(--tracking-display); margin: 0; color: var(--text-primary); }
p { margin: 0; }
a { color: var(--teal-dark); }
.eyebrow { font-family: var(--font-mono); font-size: var(--fs-eyebrow); font-weight: 500; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--helix-teal); margin: 0 0 var(--sp-sm); }

/* status accent colors */
:root {
  --st-todo: #9aa5ad; --st-looking: #C9820B; --st-held: #3F6FB0; --st-booked: var(--helix-teal); --st-done: #2E9E6B;
}

.gate { max-width: 34rem; margin: 16vh auto; padding: var(--sp-2xl) var(--sp-xl); background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-hairline); text-align: center; font-size: var(--fs-body-large); color: var(--text-secondary); }

/* ---- header ---- */
.phead { position: sticky; top: 0; z-index: 40; background: rgba(251,251,250,0.9); backdrop-filter: blur(10px); box-shadow: var(--shadow-hairline); }
.phead-inner { max-width: var(--container-max); margin: 0 auto; padding: var(--sp-sm) var(--container-x); display: flex; align-items: center; gap: var(--sp-lg); flex-wrap: wrap; }
.back { font-size: var(--fs-body-small); font-weight: 600; text-decoration: none; color: var(--text-secondary); }
.back:hover { color: var(--helix-teal); }
.phead-title h1 { font-size: 1.5rem; line-height: 1; }
.phead-title .eyebrow { margin: 0 0 2px; }
.ptabs { display: flex; gap: var(--sp-xs); margin-left: auto; }
.ptab { font-size: var(--fs-body-small); font-weight: 600; text-decoration: none; color: var(--text-secondary); padding: 6px 12px; border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--hairline); }
.ptab:hover { color: var(--helix-teal); box-shadow: inset 0 0 0 1px var(--helix-teal); }
.save-status { font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--text-tertiary); min-width: 4rem; }

/* ---- layout ---- */
.pwrap { max-width: var(--container-max); margin: 0 auto; padding: var(--sp-xl) var(--container-x) var(--sp-3xl); }
.psec { padding-top: var(--sp-xl); scroll-margin-top: 4.5rem; }
.sec-head { margin-bottom: var(--sp-lg); }
.sec-head h2 { font-size: var(--fs-h2-mobile); }
.sec-lede { color: var(--text-secondary); font-size: var(--fs-body-small); max-width: 48rem; margin-top: var(--sp-sm); }

/* ---- progress ---- */
.progress { margin-bottom: var(--sp-lg); }
.pbar-label { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 6px; }
.pbar { height: 10px; background: var(--surface-tinted); border-radius: var(--radius-full); overflow: hidden; box-shadow: var(--shadow-hairline); }
.pbar-fill { height: 100%; background: var(--st-done); border-radius: var(--radius-full); transition: width .4s cubic-bezier(.16,1,.3,1); }

/* ---- attention ---- */
.attention { background: rgba(201,130,11,0.08); box-shadow: inset 0 0 0 1px rgba(201,130,11,0.35); border-radius: var(--radius-lg); padding: var(--sp-md) var(--sp-lg); margin-bottom: var(--sp-lg); }
.attention-title { font-weight: 700; font-size: var(--fs-body-small); color: #8a5a06; margin-bottom: 6px; }
.attention ul { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.attention li { display: flex; justify-content: space-between; gap: var(--sp-sm); font-size: var(--fs-body-small); }
.att-name { color: var(--text-secondary); }
.att-over { color: #B23B3B; font-weight: 700; font-family: var(--font-mono); font-size: var(--fs-caption); }
.att-soon { color: #8a5a06; font-weight: 600; font-family: var(--font-mono); font-size: var(--fs-caption); }

/* ---- board ---- */
.board-list { display: grid; grid-template-columns: 1fr; gap: var(--sp-md); }
@media (min-width: 720px) { .board-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .board-list { grid-template-columns: 1fr 1fr 1fr; } }
.empty { color: var(--text-tertiary); }

.pcard { background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-hairline); padding: var(--sp-lg); display: flex; flex-direction: column; gap: var(--sp-sm); border-left: 4px solid var(--st-todo); }
.pcard.st-looking { border-left-color: var(--st-looking); }
.pcard.st-held { border-left-color: var(--st-held); }
.pcard.st-booked { border-left-color: var(--st-done); background: rgba(46,158,107,0.05); }
.pcard-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm); }
.pc-cat { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary); }
.pc-badge { font-family: var(--font-body); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-full); background: var(--surface-tinted); color: var(--text-secondary); }
.st-booked .pc-badge { background: var(--st-done); color: var(--off-white); }
.st-held .pc-badge { background: rgba(63,111,176,0.14); color: var(--st-held); }
.st-looking .pc-badge { background: rgba(201,130,11,0.14); color: #8a5a06; }
.pc-title { font-size: 1.2rem; margin-top: 2px; }
.pc-meta { display: flex; flex-wrap: wrap; gap: 6px var(--sp-md); font-size: var(--fs-body-small); color: var(--text-secondary); }
.pc-votes { color: var(--teal-dark); font-weight: 600; }
.pc-cost { font-variant-numeric: tabular-nums; }
.pc-by { font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--text-tertiary); }
.pc-by.by-soon { color: #8a5a06; font-weight: 700; }
.pc-by.by-over { color: #B23B3B; font-weight: 700; }
.pc-notes { font-size: var(--fs-body-small); color: var(--text-secondary); }

/* segmented status control */
.seg { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.seg-btn { font-family: var(--font-body); font-size: var(--fs-caption); font-weight: 600; padding: 6px 10px; border: 0; border-radius: var(--radius-sm); cursor: pointer; background: var(--surface-tinted); color: var(--text-secondary); box-shadow: inset 0 0 0 1px var(--hairline); }
.seg-btn:hover { color: var(--helix-teal); box-shadow: inset 0 0 0 1px var(--helix-teal); }
.seg-btn.on { background: var(--graphite, var(--text-primary)); color: var(--off-white); box-shadow: none; }

/* editable fields */
.pc-fields { display: flex; flex-direction: column; gap: var(--sp-sm); margin-top: var(--sp-xs); padding-top: var(--sp-sm); box-shadow: inset 0 1px 0 var(--hairline); }
.pc-field { display: flex; flex-direction: column; gap: 3px; }
.pc-flabel { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-tertiary); }
.pc-fields input, .pc-fields textarea { font-family: var(--font-body); font-size: var(--fs-body-small); color: var(--text-primary); background: var(--surface-base); border: 0; box-shadow: var(--shadow-hairline); border-radius: var(--radius-md); padding: 8px 10px; width: 100%; resize: vertical; }
.pc-fields input:focus, .pc-fields textarea:focus { outline: none; box-shadow: 0 0 0 2px var(--helix-teal); }
/* how-to-book callout */
.pc-howto { background: rgba(9,138,143,0.06); box-shadow: inset 0 0 0 1px rgba(9,138,143,0.22); border-radius: var(--radius-md); padding: var(--sp-sm) var(--sp-md); display: flex; flex-direction: column; gap: 6px; }
.pc-howto-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--teal-dark); }
.pc-howto-text { font-size: var(--fs-body-small); color: var(--text-secondary); }
.pc-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pc-linkbtn { font-size: var(--fs-caption); font-weight: 600; text-decoration: none; color: var(--off-white); background: var(--helix-teal); padding: 6px 12px; border-radius: var(--radius-sm); }
.pc-linkbtn:hover { background: var(--teal-light); }

/* ---- itinerary ---- */
.itin-list { display: grid; grid-template-columns: 1fr; gap: var(--sp-md); }
@media (min-width: 780px) { .itin-list { grid-template-columns: 1fr 1fr; } }
.iday { background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-hairline); padding: var(--sp-lg); }
.iday-head { display: flex; align-items: center; gap: var(--sp-sm); flex-wrap: wrap; }
.iday-date { font-family: var(--font-mono); font-size: var(--fs-caption); letter-spacing: .08em; text-transform: uppercase; color: var(--helix-teal); }
.iday-flag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-tertiary); background: var(--surface-tinted); border-radius: var(--radius-full); padding: 2px 8px; }
.iday-flag.on { background: rgba(9,138,143,.12); color: var(--teal-dark); }
.iday-title { font-size: 1.3rem; margin-top: 4px; }
.iday-items { margin: var(--sp-sm) 0 0; padding-left: 1.1rem; color: var(--text-secondary); font-size: var(--fs-body-small); }
.iday-items li { margin-bottom: 5px; }
.iday-items li.muted { color: var(--text-tertiary); list-style: none; margin-left: -1.1rem; }

/* ---- footer ---- */
.pfoot { background: var(--surface-dark); color: var(--text-inverse-tertiary); padding: var(--sp-xl) var(--container-x); margin-top: var(--sp-2xl); text-align: center; font-size: var(--fs-body-small); }

@media (min-width: 720px) { .sec-head h2 { font-size: var(--fs-h2); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
