/* Navlogic design tokens */
:root {
  --ink: #1A1A1A;
  --ink2: #2A2724;
  --ink3: #111010;
  --paper: #FAFAF7;
  --paper2: #F2EFE8;
  --border: #E4E0D8;
  --border-strong: #CFC9BD;
  --muted: #6B6660;
  --muted-light: #9A948B;
  --orange: #EB6220;
  --orange-soft: #F6E2D4;
  --green: #3F7A4F;
  --red: #B4412A;

  --font-sans: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

/* ===== Layout ===== */
.container { max-width: 1440px; margin: 0 auto; padding: 0 48px; }
@media (max-width: 768px) { .container { padding: 0 24px; } }

/* ===== Type ===== */
.mono { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 2.6px;
  text-transform: uppercase; color: var(--orange);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ''; width: 8px; height: 8px; background: var(--orange);
  display: inline-block;
}
.eyebrow.muted { color: var(--muted); }
.eyebrow.muted::before { background: var(--muted-light); }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.display {
  font-size: clamp(56px, 7vw, 104px); line-height: 1.02; letter-spacing: -0.035em;
  font-weight: 500;
}
.headline {
  font-size: clamp(40px, 4.4vw, 68px); line-height: 1.05; letter-spacing: -0.025em;
  font-weight: 600;
}
.sub {
  font-size: clamp(18px, 1.35vw, 22px); line-height: 1.5; color: var(--muted);
  max-width: 680px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border: 1px solid transparent;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 2px;
  text-transform: uppercase; text-decoration: none;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: #cc5119; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost.on-dark { color: #fff; border-color: rgba(255,255,255,.25); }
.btn-ghost.on-dark:hover { border-color: #fff; }

/* ===== Sections ===== */
section { position: relative; }
.section { padding: 120px 0; }
.section-tight { padding: 72px 0; }
.section.dark { background: var(--ink); color: #fff; }
.section.dark .sub { color: rgba(255,255,255,.7); }
.section.dark .eyebrow.muted { color: rgba(255,255,255,.5); }
.section.dark .eyebrow.muted::before { background: rgba(255,255,255,.3); }

.sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; margin-bottom: 64px; }
@media (max-width: 900px) { .sec-head { grid-template-columns: 1fr; gap: 24px; } }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 48px;
  background: rgba(26,26,26,0.6);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #fff;
}
.nav.light {
  background: rgba(250,250,247,0.78);
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}
.nav-brand { display: flex; align-items: center; gap: 14px; }
.nav-brand img.mark { height: 28px; }
.nav-brand img.wordmark { height: 18px; }
.nav-links { display: flex; gap: 32px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; }
.nav-links a { color: inherit; opacity: .75; text-decoration: none; }
.nav-links a:hover { opacity: 1; }
.nav-right { display: flex; align-items: center; gap: 12px; }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100vh;
  background: var(--ink); color: #fff; overflow: hidden;
  display: flex; align-items: flex-end;
}
.hero-canvas {
  position: absolute; inset: 0; z-index: 0;
}
.hero-fade-top {
  position: absolute; top: 0; left: 0; right: 0; height: 160px;
  background: linear-gradient(180deg, rgba(26,26,26,0.9), rgba(26,26,26,0));
  z-index: 1; pointer-events: none;
}
.hero-fade-bottom {
  position: absolute; bottom: 0; left: 0; right: 0; height: 260px;
  background: linear-gradient(0deg, rgba(26,26,26,0.98), rgba(26,26,26,0));
  z-index: 1; pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2; width: 100%;
  padding: 180px 48px 80px;
  max-width: 1440px; margin: 0 auto;
}
@media (max-width: 768px) { .hero-inner { padding: 140px 24px 60px; } }
.hero h1 {
  font-size: clamp(48px, 6.5vw, 104px);
  line-height: 1.01; letter-spacing: -0.035em; font-weight: 500;
  max-width: 1100px; color: #fff;
}
.hero h1 .accent { color: var(--orange); }
.hero-sub {
  margin-top: 32px; max-width: 620px; font-size: 20px; line-height: 1.5;
  color: rgba(255,255,255,0.72);
}
.hero-cta { margin-top: 44px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 72px; display: flex; gap: 40px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px;
  color: rgba(255,255,255,0.55); text-transform: uppercase;
}
.hero-meta .dot { width: 6px; height: 6px; background: var(--orange); display: inline-block; margin-right: 8px; vertical-align: middle; }

/* ===== Logos strip ===== */
.logos {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 40px; align-items: center;
  padding: 40px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
@media (max-width: 900px) { .logos { grid-template-columns: repeat(3, 1fr); } }
.logo-cell {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 2px;
  color: var(--muted-light); text-transform: uppercase;
}

/* ===== Generic cards ===== */
.card {
  background: #fff; border: 1px solid var(--border); padding: 32px;
}
.card.dark { background: var(--ink3); border-color: rgba(255,255,255,0.1); color: #fff; }

/* ===== Stat counter ===== */
.stat-big {
  font-size: clamp(80px, 11vw, 160px);
  font-weight: 600; letter-spacing: -0.04em; line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.stat-big .accent { color: var(--orange); }

/* ===== Email rows (inbox demo) ===== */
.inbox {
  background: #fff; border: 1px solid var(--border);
  overflow: hidden;
}
.inbox-row {
  display: grid; grid-template-columns: 12px 150px 180px 1fr 110px 60px;
  align-items: center; gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  cursor: pointer;
  transition: background .12s ease;
}
.inbox-row:hover { background: var(--paper); }
.inbox-row.selected {
  background: #FFF8F2;
  border-left: 3px solid var(--orange);
  padding-left: 19px;
}
.inbox-row .dot { width: 9px; height: 9px; border-radius: 50%; }
.inbox-row .type {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.2px;
  text-transform: uppercase; padding: 4px 7px; justify-self: start; white-space: nowrap;
}
.inbox-row .sender { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-row .subj { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-row .status { font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.2px; padding: 4px 8px; justify-self: start; }
.inbox-row .time { font-family: var(--font-mono); font-size: 12px; color: var(--muted-light); text-align: right; }

@media (max-width: 900px) {
  .inbox-row { grid-template-columns: 12px 130px 1fr 60px; }
  .inbox-row .sender, .inbox-row .status { display: none; }
}

/* ===== Two halves streaming ===== */
.halves { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .halves { grid-template-columns: 1fr; } }
.half {
  background: #fff; border: 1px solid var(--border);
  height: 320px; overflow: hidden; position: relative;
}
.half.dark { background: var(--ink3); border-color: rgba(255,255,255,0.1); }
.half-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 22px; border-bottom: 1px solid var(--border);
}
.half.dark .half-head { border-bottom-color: rgba(255,255,255,.1); }
.half-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.half-count { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; color: var(--muted-light); }
.stream {
  position: absolute; inset: 58px 0 0 0; overflow: hidden;
}
.stream-row {
  display: grid; grid-template-columns: 110px 1fr 50px;
  gap: 12px; padding: 10px 22px;
  border-bottom: 1px solid var(--border);
  font-size: 13px; line-height: 1.35;
  animation: streamIn .5s ease both;
}
.half.dark .stream-row { border-bottom-color: rgba(255,255,255,.08); color: rgba(255,255,255,.85); }
.stream-row .sender { font-weight: 600; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stream-row .time { font-family: var(--font-mono); font-size: 10px; color: var(--muted-light); text-align: right; }
.stream-row mark { background: #FFF2E8; color: inherit; padding: 0 3px; border-bottom: 2px solid var(--orange); }
.half.dark .stream-row mark { background: rgba(235,98,32,.15); }

@keyframes streamIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== 6-to-1 flow ===== */
.flow-wrap { position: relative; }
.flow-grid {
  display: grid; grid-template-columns: repeat(5, 1fr) 60px 1.1fr;
  gap: 0;
  border: 1px solid var(--border);
  background: #fff;
  min-height: 320px;
}
.flow-source {
  padding: 24px; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.flow-arrow {
  display: flex; align-items: center; justify-content: center;
  border-right: 1px solid var(--border); background: var(--paper2);
  font-family: var(--font-mono); font-size: 22px; color: var(--orange);
}
.flow-out {
  padding: 24px; background: var(--ink); color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
}
.flow-out .out-eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; color: var(--orange); text-transform: uppercase; }
.flow-out h3 { font-size: 22px; margin-top: 14px; letter-spacing: -0.01em; }
.flow-out p { margin-top: 8px; font-size: 13px; color: rgba(255,255,255,.7); line-height: 1.5; }
.flow-source .src-code { font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.6px; color: var(--orange); text-transform: uppercase; }
.flow-source .src-label { font-size: 20px; font-weight: 600; margin-top: 12px; letter-spacing: -0.01em; }
.flow-source .src-desc { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.flow-source .src-arrow { margin-top: 18px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.8px; color: var(--muted-light); text-transform: uppercase; }

.flow-source .pulse {
  position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--orange);
  box-shadow: 0 0 12px var(--orange);
  opacity: 0; animation: pulseOut 2.4s ease-in-out infinite;
}
@keyframes pulseOut {
  0%   { opacity: 0; transform: translate(0, -50%); }
  15%  { opacity: 1; }
  100% { opacity: 0; transform: translate(80px, -50%); }
}

@media (max-width: 1100px) {
  .flow-grid { grid-template-columns: 1fr 1fr 1fr; }
  .flow-arrow { display: none; }
  /* 5 sources fill cells 1-5, Navlogic output drops into the empty cell 6 (bottom-right) */
  .flow-out { grid-column: 3; grid-row: 2; border-left: 1px solid var(--border); }
}
@media (max-width: 700px) {
  .flow-grid { grid-template-columns: 1fr 1fr; }
  .flow-out { grid-column: 1 / -1; grid-row: auto; }
}

/* ===== Draft side-by-side ===== */
.draft-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .draft-grid { grid-template-columns: 1fr; } }
.app-window { background: #fff; border: 1px solid var(--border); overflow: hidden; box-shadow: 0 20px 50px rgba(26,26,26,.08); }
.app-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; background: var(--paper);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.8px; color: var(--muted); text-transform: uppercase;
}
.app-dots { display: flex; gap: 6px; }
.app-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.app-body { padding: 20px 24px; }
.app-meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: 1px; line-height: 1.8; }
.app-body p { font-size: 14px; color: var(--ink2); line-height: 1.55; margin-top: 14px; }
.rule { height: 1px; background: var(--border); margin: 14px 0; }
.fill { background: #FFF2E8; padding: 1px 5px; border-bottom: 2px solid var(--orange); }
.chip { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; color: var(--muted); background: var(--paper2); padding: 4px 8px; margin-right: 6px; display: inline-block; }
.draft-actions { margin-top: 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.draft-actions .pill-primary { background: var(--orange); color: #fff; padding: 10px 18px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.8px; text-transform: uppercase; cursor: pointer; border: none; }
.draft-actions .pill-ghost { background: transparent; border: 1px solid var(--border-strong); padding: 9px 18px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.8px; text-transform: uppercase; cursor: pointer; }
.draft-actions .drafted { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--muted-light); letter-spacing: 1.2px; }

/* ===== Pricing ===== */
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .prices { grid-template-columns: 1fr; } }
.price {
  background: #fff; border: 1px solid var(--border); padding: 36px 32px; display: flex; flex-direction: column;
}
.price.hi { background: var(--ink); color: #fff; border-color: var(--ink); }
.price h3 { font-size: 22px; }
.price .num { font-size: 52px; font-weight: 600; letter-spacing: -0.02em; margin-top: 16px; }
.price .num small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 6px; }
.price.hi .num small { color: rgba(255,255,255,.6); }
.price ul { list-style: none; padding: 0; margin: 24px 0 24px; display: flex; flex-direction: column; gap: 10px; }
.price ul li { font-size: 14px; color: var(--ink2); display: flex; gap: 10px; align-items: flex-start; }
.price.hi ul li { color: rgba(255,255,255,.85); }
.price ul li::before { content: '→'; color: var(--orange); font-family: var(--font-mono); }
.price .cta-row { margin-top: auto; }

/* ===== FAQ ===== */
.faq { border-top: 1px solid var(--border); }
.faq details {
  border-bottom: 1px solid var(--border); padding: 24px 0;
}
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-size: 22px; font-weight: 500; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; font-family: var(--font-mono); font-size: 28px; color: var(--orange);
  transition: transform .2s ease;
}
.faq details[open] summary::after { content: '–'; }
.faq p {
  margin-top: 14px; color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 780px;
}

/* ===== Footer ===== */
footer {
  background: var(--ink); color: #fff; padding: 80px 0 40px;
}
footer .foot-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px;
}
@media (max-width: 900px) { footer .foot-grid { grid-template-columns: 1fr 1fr; } }
footer h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; color: var(--orange); text-transform: uppercase; margin-bottom: 20px; font-weight: 500; }
footer .foot-col a {
  display: block; color: rgba(255,255,255,.72); text-decoration: none; font-size: 14px;
  padding: 6px 0;
}
footer .foot-col a:hover { color: #fff; }
footer .foot-bottom {
  margin-top: 64px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.6px; color: rgba(255,255,255,.45); text-transform: uppercase;
}

/* ===== Tweaks panel ===== */
#tweaks-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 1000;
  width: 280px; background: #fff; border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
  font-family: var(--font-sans); font-size: 13px;
  display: none;
}
#tweaks-panel.open { display: block; }
#tweaks-panel .tp-head {
  padding: 12px 16px; background: var(--ink); color: #fff;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center;
}
#tweaks-panel .tp-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
#tweaks-panel label {
  display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
#tweaks-panel .seg { display: flex; border: 1px solid var(--border); }
#tweaks-panel .seg button {
  flex: 1; background: #fff; border: 0; padding: 8px 4px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted);
}
#tweaks-panel .seg button.on { background: var(--ink); color: #fff; }
#tweaks-panel .swatches { display: flex; gap: 6px; }
#tweaks-panel .sw { width: 28px; height: 28px; border: 2px solid transparent; cursor: pointer; }
#tweaks-panel .sw.on { border-color: var(--ink); }

/* ===== Utils ===== */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.grow { flex: 1; }
.text-right { text-align: right; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }

/* Type badge colors */
.type-pickup    { background: #EEF3ED; color: var(--green); }
.type-dd        { background: #F9E8E2; color: var(--red); }
.type-rate      { background: var(--paper2); color: var(--muted); }
.type-booking   { background: #EDF0F4; color: #3B5878; }
.type-arrival   { background: #F4EFE3; color: #8A6B1F; }
.type-enquiry   { background: var(--paper2); color: var(--muted); }

.status-draft { background: #FFF2E8; color: var(--orange); }
.status-sent  { background: #EEF3ED; color: var(--green); }
.status-new   { background: var(--paper2); color: var(--muted); }
.status-review{ background: #F9E8E2; color: var(--red); }

/* ===== Proposal-toggle additions ===== */

/* Loop grid (Proposal 06) */
.loop-step {
  padding: 24px 18px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
  min-height: 220px;
}
.loop-step .loop-num {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px;
  color: var(--orange); text-transform: uppercase;
}
.loop-step .loop-name {
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
  margin-top: 6px;
}
.loop-step .loop-desc {
  margin-top: auto;
  font-size: 12px; color: var(--muted); line-height: 1.5;
}
@media (max-width: 1100px) {
  #loop-grid > div { grid-template-columns: repeat(4,1fr) !important; }
  .loop-step:nth-child(4) { border-right: none; }
  .loop-step:nth-child(-n+4) { border-bottom: 1px solid var(--border); }
}

/* Buried tiles (Proposal 03) */
.buried-tile {
  padding: 28px 24px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 17px; color: var(--muted); line-height: 1.4;
}
.buried-tile strong {
  color: var(--ink); font-weight: 600;
}
.buried-tile:nth-child(3n) { border-right: none; }
.buried-tile:nth-last-child(-n+3) { border-bottom: none; }
@media (max-width: 800px) {
  #problem-buried > div { grid-template-columns: 1fr 1fr !important; }
  .buried-tile { border-right: 1px solid var(--border) !important; border-bottom: 1px solid var(--border) !important; }
}

/* Tweak: hero copy swaps via body data attrs */
body[data-p1="new"] #hero-eyebrow,
body[data-p1="new"] #hero-h1,
body[data-p1="new"] #hero-sub { display: none; }
body[data-p1="new"] #hero-eyebrow-new,
body[data-p1="new"] #hero-h1-new,
body[data-p1="new"] #hero-sub-new { display: block; }

#hero-eyebrow-new, #hero-h1-new, #hero-sub-new { display: none; }

/* Hero meta swap (Proposal 04) */
body[data-p4="new"] #hero-meta { display: none; }
body[data-p4="new"] #hero-meta-new { display: flex; flex-direction: column; gap: 8px; margin-top: 56px; max-width: 760px; }
#hero-meta-new { display: none; }
#hero-meta-new li {
  font-family: var(--font-sans); font-size: 14px; color: rgba(255,255,255,0.78);
  letter-spacing: 0; text-transform: none;
  display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: baseline;
}
#hero-meta-new li::before { content: '→'; color: var(--orange); font-family: var(--font-mono); font-size: 12px; }

/* Problem section swap (Proposal 03) */
body[data-p3="new"] #problem-h2 { display: none; }
body[data-p3="new"] #problem-h2-new { display: block; }
body[data-p3="new"] #problem-now { display: none !important; }
body[data-p3="new"] #problem-buried { display: block !important; }
#problem-h2-new { display: none; }

/* Product section swap (Proposal 05) */
body[data-p5="new"] #product-now { display: none !important; }
body[data-p5="new"] #product-new { display: block !important; }

/* How section swap (Proposal 06) */
body[data-p6="new"] #how-head-now { display: none !important; }
body[data-p6="new"] #how-head-new { display: grid !important; }
body[data-p6="new"] #flow-grid-now { display: none !important; }
body[data-p6="new"] #loop-grid { display: block !important; }

/* Pricing swap (Proposal 07) */
body[data-p7="new"] #prices-now { display: none !important; }
body[data-p7="new"] #prices-new { display: grid !important; grid-template-columns: repeat(4,1fr) !important; gap: 16px; }
@media (max-width: 1100px) { body[data-p7="new"] #prices-new { grid-template-columns: repeat(2,1fr) !important; } }
@media (max-width: 700px) { body[data-p7="new"] #prices-new { grid-template-columns: 1fr !important; } }

/* Manifesto block (Proposal 09) */
body[data-p9="new"] #sec-manifesto { display: block !important; }

/* Nav eyebrow swap (Proposal 02): we add a small nav strip ABOVE the page */
#positioning-strip { display: none; }
body[data-p2="new"] #positioning-strip {
  display: flex; align-items: center; justify-content: center;
  position: fixed; top: 68px; left: 0; right: 0; z-index: 99;
  background: var(--ink3); color: rgba(255,255,255,0.85);
  padding: 8px 24px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
body[data-p2="new"] #positioning-strip strong { color: var(--orange); font-weight: 500; margin-right: 8px; }

/* Tone-of-voice highlight pass (Proposal 08): subtle highlight on touched copy */
body[data-p8="new"] [data-tone] {
  background: linear-gradient(180deg, transparent 60%, rgba(235,98,32,0.18) 60%);
  padding: 0 2px;
}

/* ===== Tweaks panel — proposal mode ===== */
#tweaks-panel.proposals {
  width: 360px; max-height: calc(100vh - 40px); overflow: auto;
}
#tweaks-panel.proposals .tp-body { gap: 0; padding: 0; }
.tp-prop {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: grid; grid-template-columns: 1fr 64px; gap: 12px; align-items: start;
}
.tp-prop:last-child { border-bottom: none; }
.tp-prop .tp-num {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.6px;
  color: var(--orange); text-transform: uppercase;
}
.tp-prop .tp-title {
  margin-top: 4px; font-size: 13px; font-weight: 500; color: var(--ink); line-height: 1.35;
}
.tp-prop .tp-cite {
  margin-top: 4px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 1.2px;
  color: var(--muted-light); text-transform: uppercase;
}
.tp-toggle {
  width: 56px; height: 28px; border: 1px solid var(--border-strong); background: #fff;
  display: flex; align-items: center; padding: 2px; cursor: pointer;
  position: relative;
}
.tp-toggle::after {
  content: ''; width: 22px; height: 22px; background: var(--muted-light);
  transition: transform .15s ease, background .15s ease;
}
.tp-toggle.on { background: var(--ink); border-color: var(--ink); }
.tp-toggle.on::after { transform: translateX(28px); background: var(--orange); }
.tp-actions {
  padding: 12px 16px; display: flex; gap: 8px; border-top: 1px solid var(--border);
  background: var(--paper2);
}
.tp-actions button {
  flex: 1; background: #fff; border: 1px solid var(--border-strong); padding: 8px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--ink); cursor: pointer;
}
.tp-actions button.primary { background: var(--orange); color: #fff; border-color: var(--orange); }

.tp-goto {
  background: transparent; border: 1px solid var(--border-strong);
  padding: 4px 8px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--muted); cursor: pointer;
}
.tp-goto:hover { border-color: var(--orange); color: var(--orange); }

/* ============================================================
   SCROLL SNAP — laptop only, snaps to each section's start
   ============================================================ */
@media (min-width: 901px) {
  html {
    scroll-snap-type: y mandatory;
    scroll-padding-top: 72px;
    scroll-behavior: smooth;
  }
  section,
  footer {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  /* Hero sits behind the nav by design — don't pad it */
  .hero { scroll-margin-top: 0; }

  /* Snap-mode top padding compensation: nav already provides 72px breathing room */
  .section { padding-top: 64px; }
  .section-tight { padding-top: 40px; }
}

/* ============================================================
   RESPONSIVE LAYER — phone & narrow-tablet adjustments
   ============================================================ */

/* Tablet breakpoint */
@media (max-width: 1000px) {
  .section { padding: 80px 0; }
  .section-tight { padding: 56px 0; }

  /* Inbox + draft preview side-by-side becomes stacked */
  .section-tight .container > div[style*="grid-template-columns:1.2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  #inbox-preview { position: static !important; }

  /* Problem section: stat + cards stack */
  #problem-now {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  #problem-now > div:last-child {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Product 3-card grid */
  #product-new > div[style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Vision/Mission two-col → one (matches the Mission & Vision section's inline grid) */
  section[data-bg="light"] .container.reveal > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
}

/* Phone breakpoint */
@media (max-width: 720px) {
  /* Container padding tighter */
  .container { padding: 0 20px; }

  /* Section padding */
  .section { padding: 64px 0; }
  .section-tight { padding: 48px 0; }
  .sec-head { margin-bottom: 40px; }

  /* Nav: hide demo button to give room */
  .nav { padding: 14px 20px; }
  .nav-brand img.mark { height: 24px; }
  .nav-brand img.wordmark { height: 16px; }
  .nav-right .btn { padding: 10px 14px; font-size: 11px; }

  /* Positioning strip when on (Proposal 02) */
  body[data-p2="new"] #positioning-strip {
    font-size: 10px;
    padding: 6px 16px;
    text-align: center;
    line-height: 1.4;
  }

  /* Hero */
  .hero { min-height: 88vh; }
  .hero-inner { padding: 110px 20px 56px; }
  .hero h1 {
    font-size: clamp(36px, 9vw, 56px) !important;
    line-height: 1.04;
    letter-spacing: -0.025em;
  }
  .hero-sub {
    font-size: 16px;
    line-height: 1.5;
    margin-top: 24px;
  }
  .hero-cta { margin-top: 32px; gap: 10px; }
  .hero-cta .btn { padding: 12px 18px; font-size: 12px; }
  .hero-meta {
    margin-top: 48px;
    gap: 16px 24px;
    font-size: 11px;
  }
  .hero-meta span[style*="margin-left:auto"] { margin-left: 0 !important; }

  /* Hero meta-new (Proposal 04) */
  body[data-p4="new"] #hero-meta-new { margin-top: 36px; }
  #hero-meta-new li { font-size: 13px; }

  /* Headlines */
  .headline {
    font-size: clamp(28px, 7vw, 40px) !important;
    letter-spacing: -0.02em;
  }
  .display {
    font-size: clamp(40px, 10vw, 64px) !important;
  }
  .sub { font-size: 16px !important; }

  /* Stat counter — was still huge */
  .stat-big {
    font-size: clamp(64px, 18vw, 96px);
  }

  /* Logos — 2 cols, less padding */
  .logos {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px;
    padding: 24px 0;
  }
  .logo-cell { font-size: 11px; }

  /* Two-halves streaming: shorter on phone */
  .half { height: 240px; }
  .half-head { padding: 12px 16px; }
  .half-label { font-size: 10px; }
  .half-count { font-size: 10px; }
  .stream { inset: 50px 0 0 0; }
  .stream-row {
    grid-template-columns: 80px 1fr 36px;
    gap: 8px;
    padding: 8px 16px;
    font-size: 11px;
  }
  .stream-row .sender { font-size: 11px; }

  /* Inbox rows: tight phone layout */
  .inbox-row {
    grid-template-columns: 8px 1fr 50px !important;
    gap: 10px;
    padding: 12px 14px;
    font-size: 13px;
  }
  .inbox-row .type {
    grid-column: 2;
    font-size: 9px;
    padding: 2px 6px;
    margin-bottom: 4px;
  }
  .inbox-row .subj {
    grid-column: 2;
    grid-row: 2;
    font-size: 12px;
  }
  .inbox-row .sender,
  .inbox-row .status { display: none; }
  .inbox-row.selected { padding-left: 11px; }

  /* App window (draft) */
  .app-body { padding: 16px 18px; }
  .app-meta { font-size: 11px; line-height: 1.6; }
  .app-body p { font-size: 13px; }
  .draft-actions { gap: 8px; }
  .draft-actions .pill-primary,
  .draft-actions .pill-ghost { padding: 8px 14px; font-size: 11px; }
  .draft-actions .drafted { width: 100%; margin-left: 0; margin-top: 6px; }

  /* Loop grid (Proposal 06): 2 cols on phone */
  #loop-grid > div { grid-template-columns: repeat(2, 1fr) !important; }
  .loop-step {
    min-height: 160px;
    padding: 18px 14px;
    border-bottom: 1px solid var(--border);
  }
  .loop-step:nth-child(2n) { border-right: none; }
  .loop-step:nth-last-child(-n+2) { border-bottom: none; }
  .loop-step .loop-name { font-size: 15px; }
  .loop-step .loop-desc { font-size: 11px; }

  /* Buried tiles (Proposal 03): 1 col on phone for readability */
  #problem-buried > div {
    grid-template-columns: 1fr !important;
  }
  .buried-tile {
    padding: 18px 20px;
    font-size: 15px;
    border-right: none !important;
    border-bottom: 1px solid var(--border) !important;
  }
  .buried-tile:last-child { border-bottom: none !important; }

  /* Pricing cards */
  .price { padding: 28px 24px; }
  .price .num { font-size: 40px; }
  body[data-p7="new"] #prices-new { gap: 12px; }

  /* FAQ summaries readable */
  .faq summary { font-size: 17px; gap: 14px; }
  .faq summary::after { font-size: 22px; }
  .faq p { font-size: 15px; }
  .faq details { padding: 18px 0; }

  /* Footer */
  footer { padding: 56px 0 32px; }
  footer .foot-grid {
    grid-template-columns: 1fr !important;
    gap: 32px;
  }
  footer .foot-bottom {
    margin-top: 40px;
    flex-direction: column;
    gap: 8px;
    font-size: 10px;
  }

  /* Tweaks panel: take full width minus margin */
  #tweaks-panel,
  #tweaks-panel.proposals {
    right: 12px; left: 12px; bottom: 12px;
    width: auto;
    max-height: 70vh;
  }
  .tp-prop { grid-template-columns: 1fr 56px; padding: 12px 14px; }
  .tp-prop .tp-title { font-size: 12px; }
}

/* Very small phones */
@media (max-width: 380px) {
  .hero h1 { font-size: 32px !important; }
  .nav-right .btn { display: none; }
}

/* Disable the fixed positioning strip overlap with nav on small screens
   (the strip otherwise pushes the hero content down without the hero knowing) */
@media (max-width: 720px) {
  body[data-p2="new"] #positioning-strip { top: 56px; }
  body[data-p2="new"] .hero-inner { padding-top: 130px; }
}
