:root {
  --paper: #faf6f0;
  --ruled: #e6ddd0;
  --ink: #1c1917;
  --muted: #6b6560;
  --forest: #2d6a4f;
  --tomato: #d62828;
  --mustard: #f4a261;
  --sky: #457b9d;
  --line: rgba(28, 25, 23, 0.1);
  --ruler-w: 11rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-bottom: 4.5rem; }
body.ledger {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 0.88rem;
}
a, button { color: inherit; text-decoration: none; font: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3 { font-family: "DM Serif Text", Georgia, serif; font-weight: 400; line-height: 1.15; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.ruled {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      var(--ruled) 27px,
      var(--ruled) 28px
    ),
    var(--paper);
  opacity: 0.55;
}

/* Mast — flat bar, not pill dock */
.mast {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}
.mast-geo {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--forest);
}
.mast-brand {
  font-family: "DM Serif Text", serif;
  font-size: 1rem;
  text-align: center;
}
.mast-dl {
  justify-self: end;
  padding: 0.4rem 0.9rem;
  background: var(--tomato);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 4px;
}
.mast-dl:hover { filter: brightness(1.05); }

.disc {
  text-align: center;
  font-size: 0.62rem;
  color: var(--muted);
  padding: 0.35rem 1rem;
  border-bottom: 1px solid var(--line);
}

/* Frame: left ruler + right sheet */
.frame {
  display: grid;
  max-width: 72rem;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .frame { grid-template-columns: var(--ruler-w) 1fr; }
}

.ruler {
  display: none;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.5rem 1rem;
  border-right: 2px solid var(--ink);
  flex-direction: column;
  justify-content: space-between;
}
@media (min-width: 900px) {
  .ruler { display: flex; }
}
.ruler-nav { display: flex; flex-direction: column; gap: 0.15rem; }
.ruler-nav a {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.72rem;
  color: var(--muted);
  transition: color 0.2s;
}
.ruler-nav a:hover { color: var(--forest); }
.ruler-nav time { font-weight: 600; color: var(--tomato); }
.ruler-ring {
  position: relative;
  width: 5.5rem;
  margin: 0 auto;
}
.ruler-ring svg { width: 100%; height: auto; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--ruled); stroke-width: 6; }
.ring-fill {
  fill: none;
  stroke: var(--forest);
  stroke-width: 6;
  stroke-dasharray: 214;
  stroke-dashoffset: 48;
  stroke-linecap: round;
}
.ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.58rem;
}
.ring-label strong { font-size: 0.85rem; color: var(--forest); }

.sheet { min-width: 0; padding: 0 1.25rem 2rem; }
@media (min-width: 900px) { .sheet { padding: 0 2rem 2rem; } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.2rem;
  font-weight: 600;
  font-size: 0.78rem;
  border-radius: 4px;
  transition: transform 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-red { background: var(--tomato); color: #fff; }
.btn-outline { border: 2px solid var(--ink); }
.btn-light { background: #fff; color: var(--tomato); }
.btn-lg { padding: 0.85rem 1.6rem; font-size: 0.85rem; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.7rem; }

.sec { margin-bottom: 1.25rem; }
.sec h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); margin-bottom: 0.3rem; }
.sec p { color: var(--muted); font-size: 0.82rem; max-width: 36rem; }

/* Terminal hero */
.terminal {
  display: grid;
  gap: 2rem;
  padding: 2.5rem 0 3rem;
  border-bottom: 2px solid var(--ink);
}
@media (min-width: 800px) {
  .terminal { grid-template-columns: 1fr 1fr; align-items: start; }
}
.term-tag { font-size: 0.68rem; color: var(--forest); margin-bottom: 0.75rem; }
.terminal h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin-bottom: 0.75rem; }
.terminal h1 em { font-style: italic; color: var(--tomato); }
.term-lead { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.25rem; max-width: 28rem; }
.terminal-body {
  padding: 1.25rem;
  background: var(--ink);
  color: #e8e4df;
  border-radius: 8px;
  box-shadow: 6px 6px 0 var(--mustard);
}
.term-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: 0.65rem;
}
.term-prompt { color: var(--mustard); font-weight: 600; }
.term-input input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  outline: none;
}
.term-input input::placeholder { color: rgba(255,255,255,0.35); }
.term-input button { color: var(--mustard); font-weight: 700; }
.term-hint { font-size: 0.65rem; color: rgba(255,255,255,0.45); margin: 0.5rem 0 1rem; }
.term-stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.68rem;
  color: var(--mustard);
  margin-bottom: 1rem;
}
.term-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.65rem; }
.term-note { font-size: 0.62rem; color: rgba(255,255,255,0.4); }

.strip-stack { display: flex; flex-direction: column; gap: 0.55rem; }
.strip {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--forest);
  width: var(--w, 100%);
  max-width: 100%;
  transition: opacity 0.2s;
}
.strip.is-done { opacity: 0.55; border-left-color: var(--muted); }
.strip.prio-p1 { border-left-color: var(--tomato); }
.strip.prio-p2 { border-left-color: var(--mustard); }
.strip.prio-p3 { border-left-color: var(--sky); }
.strip-check {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--ink);
  border-radius: 2px;
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.strip.is-done .strip-check { background: var(--forest); border-color: var(--forest); }
.strip h3 { font-family: "IBM Plex Mono", monospace; font-size: 0.82rem; font-weight: 600; }
.strip p { font-size: 0.68rem; color: var(--muted); margin-top: 0.2rem; }

/* Kanban */
.kanban { padding: 2.5rem 0; border-bottom: 1px solid var(--line); }
.kanban-lanes {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .kanban-lanes { grid-template-columns: repeat(3, 1fr); }
}
.lane {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--forest);
  min-height: 10rem;
}
.lane h3 {
  padding: 0.65rem 0.85rem;
  font-size: 0.78rem;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  border-bottom: 1px dashed var(--line);
  background: rgba(45, 106, 79, 0.06);
}
.lane ul { list-style: none; padding: 0.5rem; }
.lane li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.55rem 0.4rem;
  font-size: 0.75rem;
  border-bottom: 1px dotted var(--line);
}
.lane li.done { opacity: 0.5; text-decoration: line-through; }
.lane-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--mustard);
}
.lane li.done .lane-dot { background: var(--forest); }
.lane-tag {
  font-size: 0.62rem;
  padding: 0.15rem 0.4rem;
  background: var(--ruled);
  border-radius: 3px;
}

/* Gantt priorities */
.gantt { padding: 2.5rem 0; border-bottom: 1px solid var(--line); }
.gantt-bars { display: flex; flex-direction: column; gap: 0.85rem; }
.g-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
}
@media (max-width: 600px) {
  .g-row { grid-template-columns: 2.5rem 1fr; }
  .g-desc { grid-column: 2; font-size: 0.68rem; }
}
.g-label { font-weight: 700; font-size: 0.78rem; }
.g-track {
  height: 1.25rem;
  background: var(--ruled);
  border-radius: 2px;
  overflow: hidden;
}
.g-fill { height: 100%; border-radius: 2px; transition: width 0.6s ease; }
.p1 .g-fill { background: var(--tomato); }
.p2 .g-fill { background: var(--mustard); }
.p3 .g-fill { background: var(--sky); }
.p4 .g-fill { background: var(--muted); }
.g-desc { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }

/* Week dots */
.week { padding: 2.5rem 0; border-bottom: 1px solid var(--line); }
.week-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 20rem;
}
.dot {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 2px solid var(--ruled);
}
.dot.lvl-0 { background: transparent; }
.dot.lvl-1 { background: rgba(45, 106, 79, 0.25); border-color: var(--forest); }
.dot.lvl-2 { background: rgba(45, 106, 79, 0.5); border-color: var(--forest); }
.dot.lvl-3 { background: var(--forest); border-color: var(--forest); }

/* Path flow */
.path { padding: 2.5rem 0; border-bottom: 1px solid var(--line); }
.path-nodes {
  list-style: none;
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
  position: relative;
}
@media (min-width: 700px) {
  .path-nodes {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  .path-nodes::before {
    content: "";
    position: absolute;
    top: 1.6rem;
    left: 15%;
    right: 15%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--forest) 0, var(--forest) 8px, transparent 8px, transparent 14px);
    z-index: 0;
  }
}
.path-nodes li {
  position: relative;
  z-index: 1;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  text-align: center;
}
.path-nodes span {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  background: var(--forest);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 50%;
  margin-bottom: 0.5rem;
}
.path-nodes h3 { font-size: 0.95rem; margin-bottom: 0.25rem; }
.path-nodes p { font-size: 0.72rem; color: var(--muted); }
.path-int {
  padding: 1rem 1.15rem;
  border: 2px dashed var(--line);
  background: rgba(255,255,255,0.6);
}
.int-title { font-weight: 700; font-size: 0.78rem; margin-bottom: 0.2rem; }
.int-sub { font-size: 0.68rem; color: var(--muted); margin-bottom: 0.75rem; }
.int-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.68rem;
}
.int-list li::before { content: "· "; color: var(--tomato); }

/* Versus diagonal */
.versus { padding: 2.5rem 0; border-bottom: 1px solid var(--line); }
.versus-split {
  display: grid;
  gap: 0;
  border: 2px solid var(--ink);
  overflow: hidden;
}
@media (min-width: 650px) {
  .versus-split {
    grid-template-columns: 1fr 1fr;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}
.vs-yes {
  padding: 1.5rem;
  background: rgba(45, 106, 79, 0.1);
  border-bottom: 2px solid var(--ink);
}
@media (min-width: 650px) {
  .vs-yes { border-bottom: none; border-right: 2px solid var(--ink); }
}
.vs-no { padding: 1.5rem; background: rgba(214, 40, 40, 0.06); }
.vs-yes h3, .vs-no h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.vs-yes ul, .vs-no ul { list-style: none; font-size: 0.78rem; }
.vs-yes li::before { content: "+ "; color: var(--forest); font-weight: 700; }
.vs-no li::before { content: "− "; color: var(--tomato); font-weight: 700; }
.vs-yes li, .vs-no li { margin-bottom: 0.35rem; color: var(--muted); }

/* Proof */
.proof { padding: 2.5rem 0; border-bottom: 1px solid var(--line); }
.proof-cols {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 650px) {
  .proof-cols { grid-template-columns: repeat(3, 1fr); }
}
.proof-cols article {
  padding: 1rem;
  border-left: 3px solid var(--mustard);
  background: #fff;
}
.proof-cols h3 { font-size: 0.88rem; margin-bottom: 0.25rem; }
.proof-cols p { font-size: 0.72rem; color: var(--muted); }
.proof-quote {
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: #fff;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--muted);
}
.proof-quote cite {
  display: block;
  margin-top: 0.65rem;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
}

/* FAQ form sheet */
.form-faq { padding: 2.5rem 0; }
.form-faq h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.faq-sheet {
  border: 2px solid var(--ink);
  background: #fff;
}
.faq-sheet details { border-bottom: 1px solid var(--line); }
.faq-sheet details:last-child { border-bottom: none; }
.faq-sheet summary {
  padding: 0.9rem 1rem;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  list-style: none;
}
.faq-sheet summary::-webkit-details-marker { display: none; }
.faq-sheet p { padding: 0 1rem 1rem; font-size: 0.78rem; color: var(--muted); }

/* Band CTA */
.band {
  margin: 0 -1.25rem;
  padding: 2.5rem 1.5rem;
  background: var(--tomato);
  color: #fff;
  text-align: center;
}
@media (min-width: 900px) { .band { margin: 0 -2rem; } }
.band h2 { font-size: clamp(1.4rem, 4vw, 2rem); margin-bottom: 0.4rem; }
.band p { opacity: 0.92; margin-bottom: 1.25rem; font-size: 0.85rem; }
.band-note { margin-top: 1rem; font-size: 0.68rem; opacity: 0.8; }

.base {
  padding: 2rem 0 5rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
}
@media (min-width: 900px) { .base { padding-bottom: 2rem; } }
.base nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
  font-weight: 600;
  color: var(--ink);
}

.thumb {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom));
  background: var(--ink);
  color: rgba(255,255,255,0.65);
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
}
@media (min-width: 900px) { .thumb { display: none; } }
.thumb-dl {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 4px;
  background: var(--tomato);
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.cookie {
  display: none;
  position: fixed;
  bottom: 4.25rem;
  left: 1rem;
  right: 1rem;
  z-index: 110;
  max-width: 22rem;
  margin: 0 auto;
  padding: 1rem;
  background: #fff;
  border: 2px solid var(--ink);
  font-size: 0.72rem;
}
@media (min-width: 900px) { .cookie { bottom: 1rem; } }
.cookie.show { display: block; }
.cookie-no {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.68rem;
  color: var(--muted);
  text-decoration: underline;
}

/* Legal */
.legal-body { background: var(--paper); min-height: 100vh; color: var(--ink); }
.legal-top {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
}
.legal-main { max-width: 40rem; margin: 0 auto; padding: 1rem 1.25rem 5rem; }
.legal-content h2 { font-size: 0.95rem; color: var(--forest); margin: 1.5rem 0 0.5rem; }
.legal-content p, .legal-content li { color: var(--muted); font-size: 0.88rem; margin-top: 0.45rem; }
.legal-content ul { margin-left: 1.2rem; list-style: disc; }
.legal-content a { color: var(--tomato); font-weight: 600; }
.legal-footer-nav { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
