:root {
  --ink: #0d1b2a;
  --ink-2: #33475b;
  --muted: #6b7a8c;
  --line: #e3e7ee;
  --line-2: #eef1f5;
  --bg: #f4f5f8;
  --card: #ffffff;
  --blue: #1863dc;
  --blue-soft: #e8f0fd;
  --gold: #ffba10;
  --gold-soft: #fff4d6;
  --red: #ee3c26;
  --green: #12805c;
  --green-soft: #e3f4ec;
  --navy: #0f2340;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(13, 27, 42, .05), 0 6px 24px rgba(13, 27, 42, .06);
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 15px; line-height: 1.5; }
a { color: var(--blue); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
.loading { padding: 80px; text-align: center; color: var(--muted); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; column-gap: 16px; padding-top: 10px; }
.top .brand { flex: 1 1 auto; }
.brand { display: flex; flex-direction: column; line-height: 1.15; text-decoration: none; color: var(--ink); min-width: 0; }
.brand b { font-weight: 800; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
.brand b i { font-style: normal; color: var(--blue); }
.brand span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Tabs get their own row under the brand, so long proposals (8+ tabs) never push Pricing out of view. */
.nav { order: 3; flex: 0 0 100%; display: flex; gap: 2px; margin: 6px -12px 0; padding-bottom: 6px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.nav a:hover { background: var(--line-2); }
.nav a.on { background: var(--ink); color: #fff; }
.nav a.price-link { color: var(--blue); }
.nav a.price-link.on { background: var(--blue); color: #fff; }
.total-pill { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--navy); color: #fff; text-decoration: none; white-space: nowrap; }
.total-pill small { opacity: .7; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.total-pill b { font-size: 15px; }
.total-pill .go { background: var(--gold); color: var(--ink); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; }
.icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; }
.icon-btn:hover { border-color: #c9d1dc; }
.sample-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--gold-soft); color: #7a5300; border: 1px solid #f5dc9a; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.edit-bar { background: var(--ink); color: #fff; font-size: 13px; }
.edit-bar .wrap { display: flex; gap: 16px; align-items: center; min-height: 38px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.edit-bar b { color: var(--gold); }
.edit-bar a { color: #9cc0ff; }
.edit-bar .save { margin-left: auto; opacity: .85; }

main { padding: 28px 0 80px; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 18px; flex-wrap: wrap; }
.view-head h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.view-head p { margin: 4px 0 0; color: var(--muted); }
.back { display: inline-block; font-size: 13px; font-weight: 700; text-decoration: none; color: var(--muted); margin-bottom: 6px; }
.back:hover { color: var(--ink); }

/* Canvas home */
.canvas { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.tile { grid-column: span 4; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; text-decoration: none; color: inherit; position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 200px; transition: transform .15s ease, box-shadow .15s ease; border: 1px solid transparent; }
a.tile:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(13,27,42,.06), 0 14px 34px rgba(13,27,42,.10); border-color: #d7deea; }
.tile-label { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.tile-label .arrow { width: 30px; height: 30px; border-radius: 50%; background: var(--line-2); display: grid; place-items: center; color: var(--ink); font-size: 16px; transition: background .15s, color .15s; }
a.tile:hover .tile-label .arrow { background: var(--blue); color: #fff; }
.tile h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.01em; }
.tile p { margin: 0; color: var(--ink-2); font-size: 14px; }
.tile .foot { margin-top: auto; padding-top: 12px; font-size: 13px; font-weight: 700; color: var(--blue); }
.hero { grid-column: span 8; grid-row: span 2; min-height: 380px; color: #fff; background: var(--navy) center/cover no-repeat; padding: 32px; justify-content: flex-end; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,22,40,.15) 0%, rgba(10,22,40,.55) 45%, rgba(10,22,40,.92) 100%); }
.hero.plain::before { background: radial-gradient(120% 120% at 100% 0%, rgba(24,99,220,.55) 0%, rgba(15,35,64,0) 60%); }
.hero > * { position: relative; }
.hero .for { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.hero h1 { font-size: 40px; line-height: 1.08; letter-spacing: -.025em; margin: 8px 0 12px; }
.hero p.sum { color: rgba(255,255,255,.88); max-width: 640px; font-size: 15.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.hero .updated { margin-top: 18px; font-size: 12.5px; color: rgba(255,255,255,.7); }
.tile.price { grid-column: span 4; grid-row: span 2; background: linear-gradient(160deg, #13305a 0%, var(--navy) 60%); color: #fff; }
.tile.price .tile-label { color: rgba(255,255,255,.65); }
.tile.price .tile-label .arrow { background: var(--gold); color: var(--ink); }
.tile.price .big { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin-top: 4px; }
.tile.price .big small { font-size: 16px; font-weight: 700; opacity: .7; margin-right: 6px; }
.tile.price .sub { color: rgba(255,255,255,.72); font-size: 13px; margin-top: 4px; }
.tile.price ul { list-style: none; padding: 0; margin: 18px 0 0; font-size: 13.5px; }
.tile.price li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.10); }
.tile.price li span:first-child { color: rgba(255,255,255,.8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.price .cta { margin-top: auto; padding-top: 16px; }
.tile.price .cta span { display: block; text-align: center; background: var(--gold); color: var(--ink); font-weight: 800; border-radius: 10px; padding: 12px; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 4px; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.thumbs.wide { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.thumbs.wide img:first-child { grid-row: span 2; aspect-ratio: auto; height: 100%; }
.mini-list { list-style: none; padding: 0; margin: 0; font-size: 13.5px; }
.mini-list li { display: flex; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line-2); }
.mini-list li:first-child { border-top: 0; }
.mini-list b { min-width: 52px; color: var(--blue); font-weight: 800; }
.act-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.act-chips span { background: var(--line-2); border-radius: 6px; padding: 3px 8px; font-size: 12.5px; font-weight: 600; }
.act-chips span.in { background: var(--green-soft); color: var(--green); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 6px; }

/* Cards / generic */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.prose p { margin: 0 0 12px; color: var(--ink-2); max-width: 760px; }
.prose blockquote { margin: 0 0 12px; padding: 12px 16px; border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 10px 10px 0; color: var(--ink); font-weight: 600; max-width: 760px; }
.steps { counter-reset: s; display: grid; gap: 12px; margin-top: 8px; }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 14px; background: var(--card); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.step::before { counter-increment: s; content: counter(s); width: 36px; height: 36px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-weight: 800; }
.step h4 { margin: 2px 0 4px; font-size: 16px; }
.step p { margin: 0; color: var(--ink-2); font-size: 14px; }

/* Activities */
.act { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.act img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; background: var(--line-2); }
.act .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.act h3 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.act .tag { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; border-radius: 6px; padding: 3px 7px; background: var(--green-soft); color: var(--green); }
.act .tagline { color: var(--ink); font-weight: 600; margin: 0; font-size: 14px; }
.act .desc { color: var(--ink-2); font-size: 14px; margin: 0; }
.act .facts { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin-top: auto; padding-top: 8px; }
.act .facts b { color: var(--ink); }
.act .links { display: flex; gap: 8px; margin-top: 8px; }

/* Gallery */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.filters .search { flex: 1; min-width: 220px; max-width: 340px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 12px; }
.fchip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.fchip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.fchip small { opacity: .6; margin-left: 4px; }
.gal { columns: 3 260px; column-gap: 12px; }
.gal figure { margin: 0 0 12px; break-inside: avoid; position: relative; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--line-2); }
.gal img { width: 100%; display: block; }
.gal figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; font-size: 13px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.gal figcaption small { display: block; opacity: .75; font-weight: 500; font-size: 11.5px; }
.empty { padding: 40px; text-align: center; color: var(--muted); background: #fff; border-radius: var(--radius); }
.lightbox { position: fixed; inset: 0; background: rgba(8,14,24,.92); z-index: 50; display: grid; place-items: center; padding: 24px; }
.lightbox img { max-width: min(1100px, 100%); max-height: 78vh; border-radius: 10px; }
.lightbox .cap { color: #fff; text-align: center; margin-top: 12px; font-weight: 600; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 20px; }
.lightbox .x { top: 18px; right: 18px; }
.lightbox .prev { left: 18px; top: 50%; }
.lightbox .next { right: 18px; top: 50%; }

/* Plan */
.day { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.day:first-child { border-top: 0; }
.day h3 { margin: 0; font-size: 20px; }
.day .d { color: var(--muted); font-size: 13px; font-weight: 600; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 8px 0; position: relative; }
.timeline time { font-weight: 800; color: var(--blue); font-variant-numeric: tabular-nums; }
.timeline b { display: block; }
.timeline span { color: var(--ink-2); font-size: 14px; }

/* Terms */
.terms { counter-reset: t; columns: 2 340px; column-gap: 28px; }
.terms div { break-inside: avoid; padding: 14px 0; border-top: 1px solid var(--line); }
.terms h4 { margin: 0 0 4px; font-size: 15px; }
.terms h4::before { counter-increment: t; content: counter(t) ". "; color: var(--blue); }
.terms p { margin: 0; color: var(--ink-2); font-size: 14px; }

/* Pricing (client) */
.price-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 5px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--ink); color: #fff; }
.pax { display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px 4px 4px 12px; font-size: 13px; font-weight: 700; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.stepper button { border: 0; background: transparent; width: 24px; height: 22px; font-size: 15px; font-weight: 700; color: var(--ink-2); line-height: 1; }
.stepper button:hover { background: var(--line-2); }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper input { width: 36px; border: 0; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; padding: 0; height: 22px; -moz-appearance: textfield; background: transparent; }
.stepper input::-webkit-inner-spin-button { display: none; }
.ptable { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.psec + .psec { border-top: 6px solid var(--bg); }
.psec-h { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 10px 14px; background: #f8f9fb; border-bottom: 1px solid var(--line); }
.psec-h h3 { margin: 0; font-size: 14.5px; letter-spacing: -.005em; }
.psec-h .mode { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); background: var(--blue-soft); padding: 2px 7px; border-radius: 5px; }
.psec-h .subt { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.psec-h .subt small { color: var(--muted); font-weight: 600; margin-right: 6px; font-size: 12px; }
.prow { display: grid; grid-template-columns: 26px minmax(0, 1fr) 128px 100px 96px 112px; gap: 10px; align-items: center; padding: 5px 14px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; line-height: 1.3; }
.prow:last-child { border-bottom: 0; }
.prow.head { padding-top: 6px; padding-bottom: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #fff; }
.prow .nm { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .nm b { font-weight: 700; }
.prow .nm span { color: var(--muted); margin-left: 6px; }
.prow .u { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .r { text-align: right; font-variant-numeric: tabular-nums; }
.prow .lt { font-weight: 800; }
.prow .lbl { color: #9a5b00; font-weight: 700; font-size: 12px; }
.prow.off { background: #fbfbfc; }
.prow.off .nm b, .prow.off .r { color: #9aa5b3; }
.prow.off .lt { font-weight: 600; }
.prow.clickable { cursor: pointer; }
.prow.clickable:hover { background: #f6f9ff; }
.comfortable .stepper button, .comfortable .stepper input { height: 28px; }
.comfortable .prow { padding-top: 11px; padding-bottom: 11px; font-size: 14.5px; line-height: 1.45; }
.comfortable .prow .nm { white-space: normal; }
.comfortable .prow .nm span { display: block; margin-left: 0; font-size: 13px; }
.tick { width: 20px; height: 20px; border-radius: 6px; border: 2px solid #c3ccd8; display: grid; place-items: center; background: #fff; color: #fff; font-size: 12px; font-weight: 900; padding: 0; }
.tick.radio { border-radius: 50%; }
.tick.on { background: var(--blue); border-color: var(--blue); }
.tick.lock { border: 0; background: var(--green-soft); color: var(--green); font-size: 11px; }
.qty-fixed { display: inline-block; min-width: 40px; text-align: center; font-weight: 700; color: var(--ink-2); }
.qty-fixed small { color: var(--muted); font-weight: 600; }
.summary { position: sticky; top: 84px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.summary h3 { margin: 0 0 12px; font-size: 15px; }
.summary .ln { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.summary .ln span:last-child { white-space: nowrap; }
.summary .ln span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary .ln.tot { border-top: 2px solid var(--ink); margin-top: 8px; padding-top: 10px; color: var(--ink); font-weight: 800; font-size: 18px; }
.summary .ln.mo { color: var(--ink); font-weight: 700; }
.summary hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.summary .note { font-size: 12px; color: var(--muted); margin-top: 10px; }
.btn { display: block; width: 100%; border: 0; border-radius: 10px; padding: 12px; font-weight: 800; text-align: center; text-decoration: none; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: #1254c0; }
.btn.done { background: var(--green-soft); color: var(--green); }
.btn.ghost { background: var(--line-2); color: var(--ink); }
.saved { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; min-height: 16px; }
.mbar { display: none; }

/* Editor */
.erow { display: grid; grid-template-columns: 16px 22px minmax(0,1fr) 112px 112px 70px 168px 112px; gap: 8px; align-items: start; padding: 6px 12px; border-bottom: 1px solid var(--line-2); font-size: 13px; background: #fff; }
.erow.head { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 7px; padding-bottom: 7px; align-items: center; }
.erow.flash { animation: flash 1.2s ease; }
@keyframes flash { from { background: var(--gold-soft); } to { background: #fff; } }
.erow.drop-before { box-shadow: inset 0 3px 0 var(--blue); }
.erow.dragging { opacity: .4; }
.erow input[type=text], .erow input[type=number], .psec-h input, .psec-h select { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 4px 6px; font-size: 13px; }
.erow input:hover, .psec-h input:hover { border-color: var(--line); }
.erow input:focus, .psec-h input:focus, .psec-h select:focus { border-color: var(--blue); background: #fff; outline: none; box-shadow: 0 0 0 3px var(--blue-soft); }
.erow .nm-in { font-weight: 700; }
.erow .ds-in { color: var(--muted); font-size: 12.5px !important; }
.erow .lbl-in { color: #9a5b00; font-size: 12px !important; }
.erow input[type=number] { text-align: right; font-variant-numeric: tabular-nums; }
.erow .flags { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 11.5px; color: var(--ink-2); padding-top: 3px; }
.erow .flags label { display: flex; gap: 5px; align-items: center; white-space: nowrap; }
.erow .acts { display: flex; gap: 2px; justify-content: flex-end; padding-top: 2px; }
.erow .acts button { border: 1px solid transparent; background: transparent; border-radius: 6px; width: 26px; height: 26px; color: var(--ink-2); display: grid; place-items: center; padding: 0; }
.erow .acts button:hover { background: var(--line-2); border-color: var(--line); }
.erow .acts button.clone { color: var(--blue); }
.erow .acts button.del:hover { color: var(--red); }
.erow .handle { cursor: grab; color: #b3bdc9; padding-top: 6px; user-select: none; font-size: 13px; line-height: 1; }
.erow .lt { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; padding-top: 5px; }
.erow .chk { padding-top: 5px; }
.psec-h input { font-weight: 800; font-size: 14.5px; max-width: 360px; }
.psec-h select { width: auto; border: 1px solid var(--line); background: #fff; font-size: 12px; }
.sec-tools { display: flex; gap: 6px; align-items: center; }
.add-row { display: flex; gap: 8px; padding: 8px 12px; background: #fcfcfd; }
.add-row button, .ebtn { border: 1px dashed #c3ccd8; background: transparent; border-radius: 8px; padding: 5px 10px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.add-row button:hover, .ebtn:hover { border-color: var(--blue); color: var(--blue); }
.json-ed { width: 100%; min-height: 70vh; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; line-height: 1.5; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; }
.err { color: var(--red); font-weight: 700; }
.sel-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sel-table td, .sel-table th { padding: 6px 8px; border-bottom: 1px solid var(--line-2); text-align: left; }
.sel-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sel-table td.r { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.ok { background: var(--green-soft); color: var(--green); }
.pill.wait { background: var(--gold-soft); color: #7a5300; }
.home-list { display: grid; gap: 12px; max-width: 760px; margin: 40px auto; }
.home-list .card { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.home-list .card div:last-child { display: flex; gap: 8px; }

/* Print preview on screen */
#print-root { display: none; }
body.print-mode #app { display: none; }
body.print-mode #print-root { display: block; background: #8a94a3; padding: 24px 0 60px; }
.print-bar { position: sticky; top: 0; z-index: 5; display: flex; gap: 10px; justify-content: center; padding: 10px; background: var(--ink); color: #fff; margin: -24px 0 24px; font-size: 13px; align-items: center; }
.print-bar button, .print-bar a { background: var(--gold); color: var(--ink); border: 0; border-radius: 8px; padding: 7px 14px; font-weight: 800; text-decoration: none; }
.print-bar a { background: rgba(255,255,255,.14); color: #fff; }
.sheet { width: 210mm; min-height: 297mm; margin: 0 auto 18px; background: #fff; padding: 14mm 14mm 16mm; box-shadow: 0 4px 24px rgba(0,0,0,.25); font-size: 10pt; line-height: 1.4; color: var(--ink); }
.sheet h1 { font-size: 24pt; margin: 0 0 4mm; letter-spacing: -.02em; line-height: 1.1; }
.sheet h2 { font-size: 13pt; margin: 7mm 0 3mm; padding-bottom: 1.5mm; border-bottom: 1.5pt solid var(--ink); }
.sheet .cover { background: var(--navy) center/cover; color: #fff; border-radius: 4mm; padding: 12mm 10mm 10mm; position: relative; overflow: hidden; margin-bottom: 6mm; }
.sheet .cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,22,40,.35), rgba(10,22,40,.92)); }
.sheet .cover > * { position: relative; }
.sheet .cover .for { color: var(--gold); font-weight: 800; font-size: 9pt; text-transform: uppercase; letter-spacing: .08em; }
.sheet .cover p { margin: 0; color: rgba(255,255,255,.88); }
.sheet .meta { display: flex; gap: 6mm; flex-wrap: wrap; margin-top: 4mm; font-size: 9pt; font-weight: 700; }
.sheet .kv { display: grid; grid-template-columns: 1fr 1fr; gap: 2mm 8mm; font-size: 9.5pt; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 8.8pt; }
.sheet th { text-align: left; font-size: 7.5pt; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1pt solid var(--line); padding: 1.2mm 1.5mm; }
.sheet td { padding: 1.1mm 1.5mm; border-bottom: .5pt solid var(--line-2); vertical-align: top; }
.sheet td.r, .sheet th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet tr.sec td { background: #f3f5f8; font-weight: 800; border-bottom: .5pt solid var(--line); }
.sheet tr.tot td { font-weight: 800; border-top: 1.2pt solid var(--ink); font-size: 10.5pt; border-bottom: 0; }
.sheet tr.sub td { color: var(--ink-2); border-bottom: 0; }
.sheet .muted { color: var(--muted); }
.sheet .acts-p { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
.sheet .acts-p div { display: grid; grid-template-columns: 26mm 1fr; gap: 3mm; break-inside: avoid; }
.sheet .acts-p img { width: 26mm; height: 20mm; object-fit: cover; border-radius: 2mm; }
.sheet .acts-p b { display: block; }
.sheet .acts-p p { margin: 0; font-size: 8.5pt; color: var(--ink-2); }
.sheet .plan-p { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; font-size: 8.8pt; }
.sheet .plan-p b { display: block; margin-bottom: 1mm; }
.sheet .plan-p div div { display: grid; grid-template-columns: 11mm 1fr; padding: .6mm 0; }
.sheet .terms-p { columns: 2; column-gap: 6mm; font-size: 8.5pt; }
.sheet .terms-p div { break-inside: avoid; margin-bottom: 2.5mm; }
.sheet .terms-p p { margin: .5mm 0 0; color: var(--ink-2); }
.sheet .stamp { display: inline-block; background: var(--gold-soft); color: #7a5300; border: .8pt solid #f0d58e; border-radius: 1.5mm; padding: .6mm 2mm; font-size: 7.5pt; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.sheet .foot { margin-top: 6mm; font-size: 8pt; color: var(--muted); border-top: .5pt solid var(--line); padding-top: 2mm; display: flex; justify-content: space-between; }
.sheet .pg p { margin: 0 0 2mm; }
.sheet .pg ol { margin: 0; padding-left: 5mm; }
.sheet .avoid { break-inside: avoid; }

@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  #app { display: none !important; }
  #print-root { display: block !important; background: none !important; padding: 0 !important; }
  .print-bar { display: none !important; }
  .sheet { margin: 0; box-shadow: none; width: auto; min-height: 0; page-break-after: always; }
  .sheet:last-child { page-break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Responsive */
@media (max-width: 1080px) {
  .hero { grid-column: span 12; grid-row: auto; }
  .tile.price { grid-column: span 12; grid-row: auto; }
  .tile { grid-column: span 6; }
  .price-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .erow { grid-template-columns: 16px 22px minmax(0,1fr) 110px 100px 64px 112px; }
  .erow .flags { grid-column: 3 / -1; flex-direction: row; gap: 14px; }
  .erow.head .flagsh { display: none; }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .wrap { padding: 0 16px; }
  .top .wrap { height: auto; flex-wrap: wrap; gap: 8px; padding-top: 10px; padding-bottom: 6px; }
  .brand { flex: 1 0 auto; max-width: 100%; }
  .nav { order: 3; flex: 0 0 100%; margin: 0 -4px; }
  .nav a:first-child { order: -2; } .nav a.price-link { order: -1; } /* phone: Pricing always visible next to Overview */
  .top .total-pill, .top .icon-btn.print { display: none; }
  main { padding-top: 18px; }
  .tile, .hero, .tile.price { grid-column: span 12; }
  .hero { min-height: 340px; padding: 22px; }
  .hero h1 { font-size: 29px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .day { grid-template-columns: 1fr; gap: 8px; }
  .view-head h1 { font-size: 23px; }
  .prow { grid-template-columns: 26px 1fr auto; grid-template-areas: "c n n" "c u q" "c p t"; row-gap: 4px; padding-top: 9px; padding-bottom: 9px; }
  .prow > :nth-child(1) { grid-area: c; align-self: start; }
  .prow > :nth-child(2) { grid-area: n; white-space: normal; }
  .prow > :nth-child(2) span { display: block; margin-left: 0; font-size: 12.5px; }
  .prow > :nth-child(3) { grid-area: u; }
  .prow > :nth-child(4) { grid-area: p; text-align: left; color: var(--muted); }
  .prow > :nth-child(5) { grid-area: q; justify-self: end; }
  .prow > :nth-child(6) { grid-area: t; }
  .prow.head { display: none; }
  .mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--navy); color: #fff; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); align-items: center; justify-content: space-between; text-decoration: none; box-shadow: 0 -6px 20px rgba(0,0,0,.15); }
  .mbar small { display: block; opacity: .7; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
  .mbar b { font-size: 17px; }
  .mbar span.go { background: var(--gold); color: var(--ink); border-radius: 8px; padding: 8px 12px; font-weight: 800; font-size: 13px; }
  .erow { grid-template-columns: 16px 22px 1fr 1fr; }
  .erow > .u-c, .erow > .p-c, .erow > .q-c, .erow > .lt { grid-column: span 1; }
  .erow > .nm-c { grid-column: 3 / -1; }
  .erow .flags, .erow .acts { grid-column: 1 / -1; }
  .erow.head { display: none; }
  .sheet { width: 100%; min-height: 0; padding: 16px; }
}

.psec + .psec .prow.head { display: none; }
.pending { color: #9a5b00; }

/* Proposal list, new-from-notes page, sign-in */
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.list-head .btn { width: auto; padding: 10px 16px; }
.newp { max-width: 980px; padding-top: 24px; padding-bottom: 60px; }
.newp .card { display: grid; gap: 14px; }
.np-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.np-samples { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); align-items: center; }
.np-notes { min-height: 280px; font-size: 13.5px; }
.np-row select { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; background: #fff; }
.np-pl summary { cursor: pointer; color: var(--blue); font-weight: 700; font-size: 13px; }
.np-pl { flex: 1 0 100%; }
.np-pl table { margin-top: 10px; font-size: 12.5px; }
.np-pl > div { max-height: 360px; overflow: auto; }
.np-go { width: auto; padding: 12px 22px; font-size: 15px; }
.np-go:disabled { opacity: .55; }
.np-status { color: var(--ink-2); font-weight: 600; }
#np-err ul { margin: 8px 0 0; padding-left: 20px; font-weight: 500; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.login { max-width: 420px; margin: 12vh auto; }
.login form { display: grid; gap: 12px; }
.login h1 { margin: 0; }
.login input[type=password] { border: 1px solid var(--line); border-radius: 10px; padding: 12px; font: inherit; }
