/* Town-and-path planning workspace. Existing storage and form identities stay intact. */
body[data-page="plan"] { background:#FFFDF7; color:#153F5B; }
.plan-main { --plan-ink:#153F5B; --plan-teal:#145F8A; --plan-line:#B8CBD5; --plan-red:#9C331B; font-size:1rem; line-height:1.8; padding-bottom:4rem; }
.plan-shell { width:min(1240px,calc(100% - 64px)); margin-inline:auto; }
.plan-intro { position:relative; isolation:isolate; padding-block:3rem 2rem; }
.plan-town-art { position:absolute; z-index:-1; width:clamp(220px,31vw,370px); height:auto; right:0; top:1rem; opacity:.9; }
.plan-intro > :not(.plan-town-art) { position:relative; }
.plan-intro h1,.plan-intro .plan-eyebrow { max-width:75%; }
.plan-eyebrow { color:#536573; font-size:.85rem; font-weight:700; margin:0 0 .6rem; }
.plan-intro h1 { font-family:var(--font-display); font-weight:800; font-size:clamp(2rem,3.8vw,3rem); line-height:1.45; margin:0 0 .8rem; }
.plan-lead { max-width:min(45em,72%); font-size:1.1rem; line-height:1.8; }
.plan-privacy { max-width:46em; border-left:4px solid #145F8A; padding:.8rem 1rem; background:#E4F2FA; font-size:.9rem; line-height:1.8; margin-top:1.3rem; border-radius:0 8px 8px 0; }
.plan-layout { display:grid; grid-template-columns:minmax(14.6875rem,17.8125rem) minmax(0,1fr); align-items:start; gap:24px; }
.plan-start-link { display:none; }
.plan-sidebar { position:sticky; top:96px; font-size:.95rem; max-height:calc(100dvh - 112px); overflow-y:auto; padding:1.2rem; background:#F3F6F1; border:1px solid #B8CBD5; border-radius:10px; scrollbar-gutter:stable; }
.plan-sidebar-title { display:flex; flex-wrap:wrap; justify-content:space-between; gap:.5rem; font-family:var(--font-display); font-size:1rem; font-weight:800; line-height:1.6; margin:0 0 .8rem; }
.plan-sidebar-title span { font-variant-numeric:tabular-nums; white-space:nowrap; }
.plan-steps { padding:0; margin:0 0 1.5rem; list-style:none; }
.plan-steps li { margin-block:.25rem; }
.plan-steps a { display:flex; align-items:center; gap:.7rem; color:#153F5B; border:2px solid transparent; border-radius:8px; padding:.7rem .55rem; line-height:1.6; text-decoration:none; min-height:52px; }
.plan-steps a span { display:grid; place-items:center; flex-shrink:0; min-width:2rem; min-height:2rem; font-variant-numeric:tabular-nums; color:#153F5B; font-size:.85rem; border:1px solid #68818D; border-radius:50%; background:white; }
.plan-steps a:hover { background:#E4F2FA; }
.plan-steps a[aria-current="step"] { border-color:#CE421C; background:#FBE9DF; color:#9C331B; font-weight:700; }
.plan-save-block { border-top:1px solid #B8CBD5; padding-top:1.2rem; }
.plan-save-tools > summary { cursor:pointer; padding:.6rem 0; color:#153F5B; font-weight:700; min-height:44px; line-height:1.6; }
#plan-save-status { background:#E4F2FA; padding:.7rem; font-weight:700; color:#153F5B; line-height:1.7; margin:0 0 .5rem; overflow-wrap:anywhere; }
#plan-save-status[data-state="error"] { color:#9C331B; background:#FBE9DF; }
#plan-entry-status { font-size:.8rem; line-height:1.7; }
.plan-small { color:#536573; font-size:.8rem; line-height:1.8; margin-block:.7rem; overflow-wrap:anywhere; }
.plan-workspace { min-width:0; }
.plan-step { background:white; border:1px solid #B8CBD5; border-radius:10px; padding:clamp(20px,3vw,36px); margin-bottom:1.5rem; scroll-margin-top:100px; }
.plan-step-number { color:#536573; font-size:1rem; font-weight:700; margin:0 0 .3rem; }
.plan-step h2 { font-family:var(--font-display); font-weight:800; font-size:clamp(1.4rem,2.4vw,2rem); line-height:1.5; margin:0 0 .75rem; }
.plan-step-help { color:#153F5B; line-height:1.8; margin:0 0 1.7rem; }
.plan-field { margin-bottom:1.5rem; min-width:0; }
.plan-field label { display:block; color:#153F5B; font-weight:700; margin-bottom:.5rem; font-size:1rem; line-height:1.7; }
.plan-field-help { margin:-.15rem 0 .55rem; color:#536573; font-size:.85rem; line-height:1.8; }
.plan-field input,.plan-field textarea,.plan-field select { display:block; width:100%; max-width:100%; min-width:0; box-sizing:border-box; color:#153F5B; background:#FFFFFF; border:1px solid #68818D; border-radius:4px; font:inherit; font-size:1rem; line-height:1.7; padding:.7rem .8rem; min-height:48px; }
.plan-field textarea { resize:vertical; min-height:108px; }
.plan-field input::placeholder,.plan-field textarea::placeholder { color:#536573; opacity:1; }
.plan-main :is(a,button,input,textarea,select,summary):focus-visible { outline:3px solid #145F8A; outline-offset:4px; }
.plan-button { display:inline-flex; justify-content:center; align-items:center; text-align:center; padding:.7rem 1rem; font:inherit; font-size:.9rem; font-weight:700; line-height:1.6; color:#153F5B; background:#FFFFFF; border:1px solid #68818D; border-radius:6px; cursor:pointer; min-height:48px; max-width:100%; overflow-wrap:anywhere; }
.plan-button:hover:not(:disabled) { background:#E4F2FA; border-color:#145F8A; }
.plan-primary { color:#FFFFFF; background:#CE421C; border-color:#CE421C; }
.plan-primary:hover:not(:disabled) { color:#FFFFFF; background:#B53616; border-color:#B53616; }
.plan-save-block .plan-button { display:flex; width:100%; margin-block:.6rem; }
.plan-text-button { display:inline-block; font:inherit; font-size:.85rem; text-align:left; color:#145F8A; background:none; border:0; text-decoration:underline; text-underline-offset:4px; padding:.65rem .2rem; cursor:pointer; min-height:44px; }
.plan-save-block .plan-text-button { display:block; }
.plan-danger { color:#9C331B; }
.plan-button:disabled,.plan-text-button:disabled { opacity:.55; cursor:default; }
.plan-resource { font-size:.9rem; line-height:1.8; border-top:1px solid #B8CBD5; padding-top:1rem; }
.plan-resource a { color:#145F8A; text-decoration:underline; text-underline-offset:4px; }
.plan-next { display:block; width:fit-content; margin:1.2rem 0 0 auto; color:#FFFFFF; background:#CE421C; border:1px solid #CE421C; border-radius:6px; font-weight:700; font-size:.95rem; line-height:1.7; padding:.75rem 1.2rem; text-decoration:none; min-height:48px; max-width:100%; overflow-wrap:anywhere; }
.plan-next:hover { background:#B53616; color:#FFFFFF; }
.plan-indicator { border:1px solid #68818D; padding:1.25rem; margin:1.5rem 0; min-width:0; background:#F4F8FA; }
.plan-indicator legend { font-weight:700; padding-inline:.5rem; }
.plan-indicator .plan-field:last-of-type { margin-bottom:.4rem; }
.plan-finish { padding:1.25rem 0; border-top:1px solid #B8CBD5; }
.plan-finish h3 { margin:0 0 .6rem; font-size:1.1rem; }
.plan-action-row { display:flex; flex-wrap:wrap; align-items:center; gap:.65rem; margin-block:1rem; }
.plan-message { color:#145F8A; font-size:.9rem; line-height:1.8; overflow-wrap:anywhere; }
.plan-alert { background:#FBE9DF; color:#73361F; padding:1rem; line-height:1.8; overflow-wrap:anywhere; }
#plan-confirm { width:min(480px,calc(100% - 40px)); max-height:80vh; overflow:auto; padding:1.8rem; border:1px solid #68818D; border-radius:8px; color:#153F5B; background:white; }
#plan-confirm::backdrop { background:rgba(21,63,91,.55); }
#plan-confirm h2 { font-size:1.25rem; line-height:1.6; margin-bottom:1rem; }
#plan-confirm p { font-size:.9rem; line-height:1.8; }
.plan-report-toolbar { border-top:2px solid #153F5B; padding-top:1rem; margin-bottom:1.5rem; }
.plan-report { padding:clamp(20px,4vw,44px); background:white; border:1px solid #B8CBD5; color:#153F5B; overflow-wrap:anywhere; }
.plan-report h1 { font-family:var(--font-display); font-size:1.8rem; line-height:1.6; margin:0 0 1rem; white-space:pre-wrap; }
.plan-report h2 { font-size:1.25rem; border-top:2px solid #153F5B; padding-top:1rem; margin:2rem 0 1rem; }
.plan-report h3 { font-size:1rem; margin:1.5rem 0 .75rem; }
.plan-report dl { margin:0; }
.plan-report dt { font-weight:700; font-size:.9rem; margin-top:1rem; }
.plan-report dd { white-space:pre-wrap; margin:.35rem 0 0; line-height:1.8; font-size:.95rem; }
.plan-report .plan-unfilled { color:#536573; }
.plan-report-meta { font-size:.8rem; color:#536573; line-height:1.8; }
.plan-report-note { border-block:1px solid #B8CBD5; padding:.8rem 0; font-size:.85rem; line-height:1.8; }
.plan-main [hidden] { display:none !important; }
@media (max-width:1000px) {
  .plan-shell { width:calc(100% - 40px); }
  .plan-layout { grid-template-columns:13.75rem minmax(0,1fr); gap:20px; }
  .plan-sidebar { top:88px; padding:1rem; }
}
@media (max-width:800px) {
  .plan-shell { width:calc(100% - 32px); }
  .plan-intro { padding-block:1.7rem 1.3rem; }
  .plan-intro h1 { line-height:1.45; max-width:100%; }
  .plan-town-art { position:static; display:block; width:220px; margin:0 0 .7rem auto; max-height:74px; object-fit:contain; }
  .plan-lead { font-size:1rem; max-width:100%; }
  .plan-layout { display:block; }
  .plan-start-link { display:inline-flex; align-items:center; min-height:48px; padding:.6rem 0; color:#145F8A; font-weight:700; text-decoration:underline; text-underline-offset:4px; }
  .plan-sidebar { position:static; margin-bottom:1.4rem; max-height:none; overflow:visible; }
  .plan-steps { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,max(8rem,calc(50% - .25rem))),1fr)); gap:.25rem; margin-bottom:1rem; }
  .plan-steps a { min-width:0; font-size:.9rem; padding:.6rem .4rem; gap:.45rem; overflow-wrap:anywhere; }
  .plan-save-block .plan-button { width:auto; display:inline-flex; margin-right:.3rem; }
  .plan-save-block .plan-text-button { display:inline-block; margin-right:.5rem; }
  .plan-indicator { padding:1rem .8rem; }
  .plan-step { scroll-margin-top:85px; }
}
@media (max-width:400px) {
  .plan-shell { width:calc(100% - 24px); }
  .plan-step { padding:1.1rem .9rem; }
  .plan-next { width:100%; text-align:center; margin-left:0; }
  .plan-save-block .plan-button { display:flex; width:100%; margin-right:0; }
}
@media print {
  @page { size:A4; margin:18mm 16mm; }
  body[data-page="plan"] { background:white !important; color:#111 !important; }
  body[data-page="plan"] > :not(.plan-main), .plan-main .plan-intro,.plan-main .plan-sidebar,.plan-main .no-print,.plan-main .hub-editorial,#plan-form,.plan-report-toolbar,.plan-message,#plan-import,#plan-confirm { display:none !important; }
  .plan-main { margin:0 !important; padding:0 !important; }
  .plan-layout,.plan-workspace { display:block !important; width:100% !important; max-width:none !important; margin:0 !important; padding:0 !important; }
  .plan-main #plan-report-view[hidden] { display:block !important; }
  .plan-report { border:0; padding:0; font-size:10pt; overflow:visible !important; }
  .plan-report h1 { font-size:19pt; }
  .plan-report h2 { font-size:13pt; break-after:avoid; }
  .plan-report h3,.plan-report dt { break-after:avoid; }
  .plan-report dd { font-size:10pt; overflow:visible; height:auto; white-space:pre-wrap; orphans:3; widows:3; }
  .plan-report section,.plan-report dl,.plan-report dd { break-inside:auto; }
  .plan-report-note { font-size:9pt; }
  .plan-report-meta { font-size:9pt; }
}
