/* ==========================================================================
   Nota Clara — sistema visual
   papel, tinta, carimbo. tipografia editorial + números mono.
   ========================================================================== */

:root {
  --paper: #F2EEE4;
  --paper-2: #E9E3D4;
  --card: #FBF8EF;
  --white: #FFFDF7;
  --ink: #17160F;
  --ink-2: #45423A;
  --muted: #6F6A5E;
  --line: #D8D1BF;
  --line-2: #BFB6A0;
  --red: #BE3D24;
  --red-dark: #9C2F1B;
  --red-soft: rgba(190, 61, 36, .10);
  --green: #2B4C3F;
  --green-2: #4F7360;
  --amber: #A9791F;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1240px;
  --pad: clamp(20px, 4vw, 48px);
  --header-h: 68px;
  --r: 2px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "kern" 1, "liga" 1, "tnum" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

::selection { background: var(--red); color: var(--white); }

img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); position: relative; z-index: 1; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 16px; font: 12px/1 var(--mono);
  text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 12px; }

.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -.01em; }

/* ---------- topbar ---------- */
.topbar { background: var(--ink); color: var(--paper); position: relative; z-index: 2; }
.topbar__in {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 34px; padding-block: 5px;
  font: 10.5px/1.4 var(--mono); letter-spacing: .02em; color: #CFC8B7;
}
.topbar__in > span { display: inline-flex; align-items: center; gap: 8px; }
.topbar a { color: var(--paper); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border-bottom: 1px solid rgba(242,238,228,.3); }
.topbar a:hover { border-color: var(--paper); }
.topbar .ic { width: 12px; height: 12px; }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: #7FB08C; box-shadow: 0 0 0 3px rgba(127,176,140,.18); display: inline-block; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(242, 238, 228, .965);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(23, 22, 15, .14);
}
.site-header.is-scrolled { box-shadow: 0 14px 34px -28px rgba(23,22,15,.75); }
.header__in { display: flex; align-items: center; gap: 32px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand__mark { width: 27px; height: 27px; color: var(--red); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.brand:hover .brand__mark { transform: rotate(-6deg) translateY(-1px); }
.brand__word { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -.035em; line-height: 1; }
.brand__dot { color: var(--red); }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  position: relative; text-decoration: none; font: 12.5px/1 var(--sans); font-weight: 500;
  color: var(--ink-2); padding: 6px 0; letter-spacing: .005em;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

.header__actions { display: flex; align-items: center; gap: 12px; }
.menu-btn__close { display: none; }
.menu-btn { display: none; width: 38px; height: 38px; border: 1px solid var(--line-2); background: transparent; border-radius: var(--r); align-items: center; justify-content: center; }
.menu-btn:hover { border-color: var(--ink); }
.menu-btn[aria-expanded="true"] .menu-btn__open { display: none; }
.menu-btn[aria-expanded="true"] .menu-btn__close { display: block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 20px;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink); border-radius: var(--r);
  font: 600 13px/1 var(--sans); letter-spacing: .005em; text-decoration: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn:hover { background: #2B2820; border-color: #2B2820; transform: translateY(-1px); box-shadow: 0 10px 24px -16px rgba(23,22,15,.9); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn .ic { width: 15px; height: 15px; }
.btn--sm { min-height: 36px; padding: 8px 14px; font-size: 12px; }
.btn--lg { min-height: 52px; padding: 15px 24px; font-size: 14px; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { background: transparent; color: var(--ink); border-color: var(--ink); box-shadow: none; }
.btn--light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--light:hover { background: var(--paper-2); border-color: var(--paper-2); color: var(--ink); }
.btn[aria-busy="true"] { opacity: .6; cursor: progress; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font: 600 13px/1 var(--sans); color: var(--ink); padding-block: 8px;
  border-bottom: 1px solid var(--line-2); transition: border-color .2s;
}
.link-arrow .ic { width: 15px; transition: transform .2s; }
.link-arrow:hover { border-color: var(--ink); }
.link-arrow:hover .ic { transform: translateX(3px); }

/* ---------- eyebrow / sections ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 9px; margin: 0 0 18px;
  font: 500 10.5px/1 var(--mono); letter-spacing: .13em; text-transform: uppercase; color: var(--ink-2);
}
.eyebrow__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex: none; }
.eyebrow__num {
  display: inline-grid; place-items: center; min-width: 22px; height: 21px; padding: 0 5px;
  border: 1px solid var(--line-2); border-radius: 2px; font-size: 10px; letter-spacing: .04em; color: var(--muted);
}
.eyebrow--light { color: #BDB6A5; }
.eyebrow--light .eyebrow__num { border-color: rgba(242,238,228,.28); color: #A9A292; }

.section { padding-block: clamp(72px, 9vw, 128px); position: relative; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); gap: clamp(24px, 5vw, 72px); align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 4.6vw, 60px); line-height: 1.02; letter-spacing: -.035em; text-wrap: balance; }
.sec-head__sub { margin: 0 0 4px; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; max-width: 44ch; }
.sec-head--dark h2 { color: var(--paper); }
.sec-head--dark .sec-head__sub { color: #B9B2A1; }

/* ---------- hero ---------- */
.hero { position: relative; padding-block: clamp(40px, 5vw, 72px) clamp(48px, 6vw, 88px); min-height: calc(100svh - 102px); display: flex; align-items: center; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__copy { position: relative; z-index: 2; }
.hero h1 {
  margin: 0 0 26px; max-width: 13ch;
  font-family: var(--serif); font-weight: 600; font-size: clamp(46px, 6.4vw, 88px);
  line-height: .94; letter-spacing: -.045em;
}
.hero h1 em {
  font-style: normal; color: var(--ink);
  background: linear-gradient(180deg, transparent 60%, rgba(190,61,36,.18) 60%, rgba(190,61,36,.18) 94%, transparent 94%);
  padding-inline: .04em;
}
.lead { margin: 0 0 32px; max-width: 47ch; font-size: clamp(16px, 1.35vw, 18.5px); line-height: 1.62; color: var(--ink-2); }
.lead strong { color: var(--ink); font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-bottom: 42px; }
.hero__facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: clamp(20px, 3.5vw, 48px); margin: 0; padding-top: 20px; border-top: 1px solid var(--line); }
.hero__facts dt { font: 500 9px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.hero__facts dd { margin: 0; font: 500 16px/1 var(--mono); letter-spacing: -.02em; }

.hero__visual { position: relative; justify-self: end; width: min(100%, 430px); z-index: 2; }
.hero__stamp {
  position: absolute; top: -50px; left: -74px; z-index: 3;
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-content: center; gap: 2px; text-align: center;
  background: var(--red); color: var(--white);
  font: 7.5px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  transform: rotate(-10deg);
  box-shadow: 0 10px 24px -14px rgba(168,54,31,.9);
}
.hero__stamp strong { font: 600 12px/1 var(--mono); letter-spacing: .06em; }
.hero__caption { margin: 14px 2px 0; font: 10.5px/1.5 var(--mono); color: var(--muted); text-align: right; }
.hero__side {
  position: absolute; right: max(10px, calc((100vw - var(--wrap)) / 2 - 22px)); top: 50%;
  transform: translateY(-50%); writing-mode: vertical-rl;
  font: 9px/1 var(--mono); letter-spacing: .22em; color: var(--line-2); text-transform: uppercase;
}

/* ---------- min-width safeguards (grid/flex children) ---------- */
.sim > *, .sim__controls, .sim__output,
.comp > *, .comp__form, .comp__result,
.compare, .compare__col,
.receipt, .presets, .year-track, .row-2, .field, .stat { min-width: 0; }
.presets { width: 100%; }

/* ---------- receipt ---------- */
.receipt {
  position: relative; width: 100%; padding: 22px 24px 18px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 2px;
  box-shadow: 0 30px 60px -42px rgba(23,22,15,.65), 0 2px 0 rgba(255,255,255,.6) inset;
  font-family: var(--mono); color: var(--ink);
}
.receipt::before {
  content: ""; position: absolute; inset: 5px; border: 1px solid rgba(191,182,160,.35); pointer-events: none;
}
.receipt__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.receipt__logo { font: 600 11px/1 var(--mono); letter-spacing: .2em; }
.receipt__logo sup { font-size: 6px; vertical-align: super; letter-spacing: 0; }
.receipt__meta { text-align: right; font: 8.5px/1.5 var(--mono); letter-spacing: .12em; color: var(--muted); }
.receipt__strip { padding: 7px 0; border-bottom: 1px dashed var(--line-2); font: 8px/1.4 var(--mono); letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.receipt__body { padding-top: 16px; }
.receipt__item { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.receipt__cat { display: block; font-family: var(--sans); font-size: 16px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.receipt__code { display: block; margin-top: 4px; font-size: 9px; letter-spacing: .04em; color: var(--muted); }
.receipt__price { font: 500 19px/1 var(--mono); letter-spacing: -.03em; white-space: nowrap; }
.receipt__rows { display: grid; gap: 1px; }
.rrow[hidden] { display: none; }
.rrow { display: flex; justify-content: space-between; gap: 12px; padding: 5.5px 0; font-size: 11px; line-height: 1.3; }
.rrow > span:first-child { color: var(--ink-2); display: inline-flex; align-items: baseline; gap: 6px; }
.rrow i { font-style: normal; font-size: 9px; color: var(--muted); letter-spacing: .02em; }
.rrow > span:last-child { letter-spacing: -.02em; }
.rrow.is-flash { animation: rowflash .55s ease; }
@keyframes rowflash { 0% { background: var(--red-soft); } 100% { background: transparent; } }
.receipt__dash { position: relative; margin: 13px 0 11px; border-top: 1px dashed var(--line-2); }
.receipt__dash span {
  position: absolute; left: 50%; top: -7px; transform: translateX(-50%);
  padding: 0 8px; background: var(--card);
  font: 7.5px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--line-2);
}
.receipt__total { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 12px; }
.receipt__total > span { font: 8.5px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.receipt__total strong { grid-column: 2; grid-row: 1 / 3; font: 500 27px/1 var(--mono); letter-spacing: -.04em; }
.receipt__total em { font: 500 10px/1.3 var(--mono); font-style: normal; color: var(--red); letter-spacing: -.01em; }
.receipt__note { margin-top: 10px; font: 8.5px/1.5 var(--mono); color: var(--muted); letter-spacing: .01em; }
.receipt__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.barcode {
  width: 132px; height: 26px; opacity: .85;
  background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 3px, var(--ink) 3px 5px, transparent 5px 8px, var(--ink) 8px 9px, transparent 9px 12px, var(--ink) 12px 15px, transparent 15px 17px);
}
.stamp {
  transform: rotate(-7deg); border: 1.6px solid var(--red); color: var(--red);
  padding: 4px 9px; border-radius: 2px; font: 600 9px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase;
  opacity: .82;
}
.receipt.is-updating .stamp { animation: stampIn .45s cubic-bezier(.2,.9,.3,1.3); }
@keyframes stampIn { 0% { transform: rotate(-7deg) scale(1.18); opacity: .3; } 100% { transform: rotate(-7deg) scale(1); opacity: .82; } }

/* ---------- ticker ---------- */
.ticker { border-block: 1px solid var(--line); background: rgba(233,227,212,.45); position: relative; z-index: 1; }
.ticker::after { content: ""; position: absolute; inset-block: 0; right: 0; width: 42px; background: linear-gradient(90deg, transparent, var(--paper) 88%); pointer-events: none; }
.ticker__in { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.ticker__in::-webkit-scrollbar { display: none; }
.ticker__item { display: flex; align-items: baseline; gap: 8px; padding: 13px 15px; border-right: 1px solid var(--line); white-space: nowrap; }
.ticker__item:first-child { padding-left: 0; }
.ticker__item:last-child { border-right: 0; }
.ticker__item b { font: 500 11px/1 var(--mono); color: var(--ink); }
.ticker__item span { font: 500 12px/1 var(--mono); color: var(--red); }
.ticker__item i { font: normal 9.5px/1 var(--mono); color: var(--muted); letter-spacing: .04em; }
.ticker__item--end span { color: var(--ink); font-weight: 600; }
@media (min-width: 1280px) { .ticker::after { display: none; } }

/* ---------- simulator ---------- */
.section--sim { background: linear-gradient(180deg, rgba(233,227,212,.18), transparent 30%); }
.sim { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.sim__controls {
  display: flex; flex-direction: column; gap: 28px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(20px, 2.6vw, 32px);
  box-shadow: 0 24px 50px -48px rgba(23,22,15,.8);
}
.fieldset { border: 0; padding: 0; margin: 0; min-inline-size: 0; }
.legend { display: block; margin: 0 0 10px; padding: 0; font: 500 10px/1 var(--mono); letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.legend-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.legend-row .legend { margin-bottom: 10px; }
.legend-row output { font: 500 12px/1 var(--mono); color: var(--ink); }

.presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.preset {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  min-height: 78px; padding: 10px 9px 9px;
  background: transparent; border: 1px solid var(--line); border-radius: 2px;
  text-align: left; transition: background .16s, border-color .16s, transform .16s;
}
.preset .ic { width: 19px; height: 19px; color: var(--ink-2); transition: color .16s; }
.preset__name { font: 600 11.5px/1.15 var(--sans); letter-spacing: -.01em; }
.preset__code { font: 8px/1 var(--mono); color: var(--muted); letter-spacing: .04em; }
.preset:hover { border-color: var(--ink); background: var(--white); transform: translateY(-1px); }
.preset.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.preset.is-active .ic { color: var(--red); }
.preset.is-active .preset__code { color: #A8A192; }

.row-2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 32px; }
.field { min-width: 0; }
.money { display: flex; align-items: baseline; gap: 6px; border-bottom: 2px solid var(--ink); padding: 2px 0 4px; transition: border-color .18s; }
.money:focus-within { border-color: var(--red); }
.money span { font: 500 13px/1 var(--mono); color: var(--muted); }
.money input {
  width: 100%; border: 0; background: transparent; padding: 0;
  font: 500 clamp(24px, 3vw, 31px)/1.1 var(--mono); letter-spacing: -.045em;
  min-width: 0;
}
.money input:focus { outline: 0; }
.hint { margin: 8px 0 0; font: 10.5px/1.45 var(--mono); color: var(--muted); letter-spacing: .005em; }

.year-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.year-btn {
  border: 1px solid var(--line); background: transparent; border-radius: 2px;
  padding: 7px 2px; font: 500 10.5px/1 var(--mono); color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s;
}
.year-btn:hover { border-color: var(--ink); }
.year-btn.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.sim__callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: rgba(190,61,36,.055); border-left: 2px solid var(--red); }
.sim__callout .ic { width: 14px; height: 14px; margin-top: 2px; color: var(--red); }
.sim__callout p { margin: 0; font: 11px/1.5 var(--mono); color: var(--ink-2); }

.sim__output { display: flex; flex-direction: column; gap: 20px; }
.sim__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stat { padding: 14px 14px 0 0; display: flex; flex-direction: column; gap: 4px; }
.stat + .stat { padding-left: 14px; border-left: 1px solid var(--line); }
.stat__k { font: 500 8.5px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stat strong { font: 500 21px/1 var(--mono); letter-spacing: -.04em; }
.stat__s { font: 9px/1.35 var(--mono); color: var(--muted); }
.sim__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- method ---------- */
.method { margin-top: clamp(48px, 7vw, 88px); border-top: 1px solid var(--ink); padding-top: 28px; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2.2fr); gap: clamp(24px, 4vw, 56px); }
.method__head h3 { margin: 0; font: 600 clamp(22px, 2.4vw, 30px)/1.12 var(--serif); letter-spacing: -.025em; max-width: 18ch; }
.method__grid { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: clamp(20px, 3vw, 40px); }
.method__grid p { margin: 0 0 12px; font-size: 13px; line-height: 1.65; color: var(--ink-2); }
.method__table table { width: 100%; border-collapse: collapse; font: 10.5px/1.4 var(--mono); }
.method__table caption { caption-side: top; text-align: left; font: 500 8.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-bottom: 8px; }
.method__table th, .method__table td { padding: 4px 0; border-bottom: 1px solid var(--line); text-align: right; }
.method__table th:first-child, .method__table td:first-child { text-align: left; }
.method__table th { font-weight: 500; color: var(--muted); font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; }
.method__table tr:last-child td { border-bottom: 0; color: var(--red); font-weight: 500; }
.method__src { margin: 10px 0 0; font: 9px/1.5 var(--mono); color: var(--muted); }

/* ---------- comparator ---------- */
.section--comp { background: rgba(233,227,212,.32); border-block: 1px solid var(--line); }
.comp { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(28px, 4.5vw, 64px); align-items: start; }
.comp__form { display: flex; flex-direction: column; gap: 22px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-2); }
.seg { border: 0; border-right: 1px solid var(--line-2); background: transparent; padding: 10px 6px; font: 500 11.5px/1 var(--sans); color: var(--ink-2); transition: background .15s, color .15s; }
.seg:last-child { border-right: 0; }
.seg:hover { background: var(--white); }
.seg.is-active { background: var(--ink); color: var(--paper); }
input[type="range"] { width: 100%; accent-color: var(--red); height: 22px; }
.select-wrap { position: relative; border-bottom: 2px solid var(--ink); }
.select-wrap:focus-within { border-color: var(--red); }
.select-wrap select {
  width: 100%; border: 0; background: transparent; padding: 6px 26px 8px 0;
  font: 500 15px/1.2 var(--sans); appearance: none; -webkit-appearance: none;
}
.select-wrap::after { content: ""; position: absolute; right: 4px; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.comp__form-note { display: flex; gap: 9px; align-items: flex-start; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.comp__form-note .ic { width: 14px; height: 14px; margin-top: 2px; color: var(--muted); }
.comp__form-note p { margin: 0; font: 10px/1.55 var(--mono); color: var(--muted); }

.comp__result { display: flex; flex-direction: column; gap: 20px; }
.verdict { background: var(--ink); color: var(--paper); padding: clamp(22px, 2.8vw, 32px); position: relative; overflow: hidden; }
.verdict::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(190,61,36,.35), transparent 65%);
}
.verdict__k { margin: 0 0 12px; font: 500 9.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #B9B2A1; }
.verdict__big { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; font-family: var(--serif); font-weight: 600; font-size: clamp(38px, 4.6vw, 58px); line-height: 1; letter-spacing: -.04em; }
.verdict__big em { font: 500 11px/1 var(--mono); font-style: normal; letter-spacing: .02em; color: #CFC8B7; text-transform: uppercase; }
.verdict__which { margin: 12px 0 0; font-size: 14px; color: #CFC8B7; }
.verdict__which strong { color: var(--paper); }
.verdict__note { margin: 14px 0 0; font: 9.5px/1.5 var(--mono); color: #9E9787; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 3vw, 32px); }
.compare__col { border-top: 2px solid var(--ink); padding-top: 12px; min-width: 0; }
.compare__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.compare__tag { font: 600 11px/1 var(--sans); letter-spacing: .01em; }
.compare__annex { font: 8.5px/1 var(--mono); color: var(--muted); letter-spacing: .04em; }
.compare__value { margin: 14px 0 2px; font: 500 clamp(20px, 2.3vw, 26px)/1 var(--mono); letter-spacing: -.045em; }
.compare__rate { margin: 0 0 12px; font: 9.5px/1 var(--mono); color: var(--muted); }
.bar { height: 7px; background: var(--line); overflow: hidden; display: flex; }
.bar > span { display: block; height: 100%; background: var(--red); transition: width .55s cubic-bezier(.2,.8,.2,1); }
.bar--stacked > span { background: var(--green); }
.bar--stacked .seg-b { background: var(--ink); }
.bar--stacked .seg-c { background: var(--amber); }
.compare__list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.compare__list li { display: flex; justify-content: space-between; gap: 10px; font: 9.5px/1.4 var(--mono); color: var(--ink-2); }
.compare__list li span:last-child { color: var(--ink); white-space: nowrap; }
.dot-a, .dot-b, .dot-c { display: inline-block; width: 6px; height: 6px; margin-right: 5px; vertical-align: 0; }
.dot-a { background: var(--green); } .dot-b { background: var(--ink); } .dot-c { background: var(--amber); }

.breakeven { display: flex; gap: 10px; align-items: flex-start; border: 1px dashed var(--line-2); padding: 13px 14px; background: rgba(251,248,239,.6); }
.breakeven .ic { width: 14px; height: 14px; margin-top: 1px; color: var(--green); transform: rotate(90deg); }
.breakeven p { margin: 0; font: 10.5px/1.55 var(--mono); color: var(--ink-2); }
.breakeven strong { color: var(--red); font-weight: 600; }
.comp__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- dev / dark ---------- */
.section--dark {
  background: var(--ink); color: var(--paper);
  background-image: radial-gradient(900px 420px at 78% -10%, rgba(190,61,36,.18), transparent 62%);
}
.section--dark .eyebrow__dot { background: var(--red); }
.repos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.repo {
  display: flex; flex-direction: column; gap: 14px; padding: 20px;
  border: 1px solid rgba(242,238,228,.18); border-radius: 2px;
  text-decoration: none; color: inherit; background: rgba(242,238,228,.025);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.repo:hover { transform: translateY(-2px); background: rgba(242,238,228,.06); border-color: rgba(242,238,228,.36); }
.repo__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.repo__lang { display: inline-flex; align-items: center; gap: 6px; font: 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #B9B2A1; }
.repo__lang::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.repo__stars { display: inline-flex; align-items: center; gap: 4px; font: 9.5px/1 var(--mono); color: #CFC8B7; }
.repo__name { font: 500 12px/1.35 var(--mono); letter-spacing: -.02em; word-break: break-word; }
.repo__desc { margin: 0; font-size: 12px; line-height: 1.55; color: #A9A292; }
.repo__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid rgba(242,238,228,.14); font: 9px/1 var(--mono); color: #8F8879; letter-spacing: .04em; }
.repo__foot .ic { width: 12px; height: 12px; transition: transform .2s; }
.repo:hover .repo__foot .ic { transform: translate(2px, -2px); }

.dev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); margin-top: clamp(40px, 6vw, 64px); }
.dev-gap h3, .dev-solve h3 { margin: 0 0 20px; font: 600 clamp(21px, 2.3vw, 27px)/1.15 var(--serif); letter-spacing: -.02em; }
.dev-gap ul, .dev-solve ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.dev-gap li { display: flex; gap: 12px; font-size: 12.5px; line-height: 1.55; color: #A9A292; }
.dev-gap li strong { display: block; color: var(--paper); font-weight: 600; margin-bottom: 2px; }
.cross { color: var(--red); font: 500 15px/1 var(--mono); margin-top: 6px; }
.dev-solve li { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; color: #CFC8B7; }
.dev-solve .ic { width: 15px; height: 15px; margin-top: 2px; color: #7FB08C; }
.dev-solve__note { margin: 20px 0 0; font: 9.5px/1.5 var(--mono); color: #8F8879; }

.playground { margin-top: clamp(40px, 6vw, 64px); border: 1px solid rgba(242,238,228,.2); border-radius: 2px; overflow: hidden; }
.playground__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; border-bottom: 1px solid rgba(242,238,228,.16); background: rgba(242,238,228,.03); flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; }
.tab { border: 0; background: transparent; color: #A9A292; padding: 8px 10px; font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid transparent; }
.tab:hover { color: var(--paper); }
.tab.is-active { color: var(--paper); border-bottom-color: var(--red); }
.playground__body { display: grid; grid-template-columns: 1.02fr .98fr; }
.code { margin: 0; padding: 18px 16px; font: 500 11px/1.75 var(--mono); color: #D8D2C2; overflow: auto; max-height: 330px; background: transparent; }
.code--out { background: rgba(0,0,0,.22); border-left: 1px solid rgba(242,238,228,.14); color: #B9C9B6; }
.c-muted { color: #8F8A7B; } .c-key { color: #9FC2A9; } .c-str { color: #D9A45B; } .c-num { color: #E8C07A; } .c-com { color: #77715F; font-style: italic; } .c-punc { color: #8F8A7B; } .c-red { color: #E4705A; }
.playground__foot { margin: 0; padding: 10px 14px; border-top: 1px solid rgba(242,238,228,.14); font: 9.5px/1.5 var(--mono); color: #A9A292; }

/* ---------- plans ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 18px; padding: clamp(22px, 2.6vw, 32px); background: rgba(251,248,239,.55); border: 1px solid var(--line-2); border-radius: 2px; }
.plan--featured { background: var(--card); border-color: var(--ink); box-shadow: 0 26px 50px -44px rgba(23,22,15,.9); }
.plan__flag { position: absolute; top: -10px; left: 24px; background: var(--red); color: var(--white); padding: 4px 8px; font: 500 8.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.plan header h3 { margin: 0 0 4px; font: 600 26px/1 var(--serif); letter-spacing: -.03em; }
.plan header p { margin: 0; font: 10px/1.4 var(--mono); color: var(--muted); letter-spacing: .02em; }
.plan__price { margin: 0; display: flex; align-items: baseline; gap: 4px; font: 600 54px/1 var(--serif); letter-spacing: -.05em; }
.plan__price span { font: 500 12px/1 var(--mono); color: var(--muted); letter-spacing: 0; }
.plan__price em { font: 500 10px/1 var(--mono); font-style: normal; color: var(--muted); letter-spacing: .02em; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plan li { position: relative; padding-left: 18px; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.plan li::before { content: "✓"; position: absolute; left: 0; top: -1px; color: var(--green-2); font-size: 12px; }
.plan .btn { margin-top: auto; width: 100%; }
.plan__fine { margin: -8px 0 0; font: 9px/1.4 var(--mono); color: var(--muted); text-align: center; }
.plans__note { margin: 22px 0 0; font: 10px/1.6 var(--mono); color: var(--muted); max-width: 80ch; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--ink); padding: clamp(40px, 6vw, 72px) 0 26px; background: var(--paper); }
.footer__top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer__brand .brand__word { font-size: 30px; }
.footer__brand p { margin: 14px 0 0; max-width: 34ch; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.footer nav { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.footer nav h3 { margin: 2px 0 6px; font: 500 9px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.footer nav a, .footer nav button { border: 0; background: none; padding: 0; text-decoration: none; font-size: 12px; color: var(--ink-2); text-align: left; }
.footer nav a:hover, .footer nav button:hover { color: var(--red); }
.footer__bottom { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 32px; align-items: flex-end; }
.footer__bottom p { margin: 0; max-width: 92ch; font: 9px/1.65 var(--mono); color: var(--muted); }
.footer__bottom strong { color: var(--ink-2); }
.footer__copy { white-space: nowrap; }

/* ---------- dialog / toast ---------- */
.dialog { border: 1px solid var(--ink); border-radius: 2px; padding: 0; width: min(460px, calc(100vw - 32px)); background: var(--card); color: var(--ink); box-shadow: 0 40px 100px -40px rgba(0,0,0,.6); }
.dialog::backdrop { background: rgba(23,22,15,.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dialog__form { display: flex; flex-direction: column; gap: 8px; padding: 30px; position: relative; }
.dialog__form h3 { margin: 0 0 2px; font: 600 30px/1.05 var(--serif); letter-spacing: -.035em; }
.dialog__form > p:not(.eyebrow):not(.dialog__fine) { margin: 0 0 14px; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.dialog__form input, .dialog__form select { width: 100%; border: 1px solid var(--line-2); background: var(--white); padding: 10px 12px; border-radius: 2px; font-size: 14px; margin-bottom: 10px; }
.dialog__form input:focus, .dialog__form select:focus { outline: 0; border-color: var(--ink); }
.dialog__form .btn { margin-top: 8px; width: 100%; }
.dialog__close { position: absolute; top: 14px; right: 14px; border: 0; background: transparent; width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); }
.dialog__close:hover { color: var(--ink); }
.dialog__fine { margin: 10px 0 0 !important; font: 8.5px/1.5 var(--mono); color: var(--muted); text-align: center; }
.dialog__done { padding: 38px 30px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dialog__done h3 { margin: 6px 0 0; font: 600 32px/1 var(--serif); letter-spacing: -.03em; }
.dialog__done p { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); max-width: 34ch; }
.dialog__check { width: 48px; height: 48px; border-radius: 50%; background: var(--green); color: var(--white); display: grid; place-items: center; }
.dialog__check .ic { width: 22px; height: 22px; }

.toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 120;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); padding: 10px 15px;
  font: 11px/1.4 var(--mono); border-radius: 2px;
  transition: opacity .25s, transform .25s;
  max-width: calc(100vw - 32px);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- motion ---------- */
.m-enter .hero__copy > * { animation: heroIn .8s cubic-bezier(.2,.75,.25,1) both; }
.m-enter .hero__copy > *:nth-child(1) { animation-delay: .05s; }
.m-enter .hero__copy > *:nth-child(2) { animation-delay: .12s; }
.m-enter .hero__copy > *:nth-child(3) { animation-delay: .2s; }
.m-enter .hero__copy > *:nth-child(4) { animation-delay: .28s; }
.m-enter .hero__copy > *:nth-child(5) { animation-delay: .36s; }
.m-enter .hero__visual { animation: receiptIn .95s cubic-bezier(.16,.8,.24,1) both .18s; }
.m-enter .hero__stamp { animation: stampPop .6s cubic-bezier(.2,.9,.3,1.4) both .7s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes receiptIn { from { opacity: 0; transform: translateY(26px) rotate(.6deg); } to { opacity: 1; transform: none; } }
@keyframes stampPop { 0% { opacity: 0; transform: rotate(-18deg) scale(.7); } 100% { opacity: 1; transform: rotate(-10deg) scale(1); } }

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.75,.25,1); }
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .hero__side { display: none; }
  .hero h1 { font-size: clamp(44px, 6.6vw, 76px); }
}

@media (max-width: 980px) {
  .hero__stamp { left: auto; right: 6px; top: -58px; }
  .hero { min-height: 0; padding-block: 48px 64px; }
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__copy { max-width: 640px; }
  .hero__visual { justify-self: start; width: min(100%, 460px); }
  .hero__facts { max-width: 520px; }
  .sim, .comp { grid-template-columns: 1fr; }
  .sim__output { max-width: 520px; }
  .sec-head { grid-template-columns: 1fr; gap: 16px; }
  .method { grid-template-columns: 1fr; }
  .method__grid { grid-template-columns: 1fr 1fr; }
  .method__table { grid-column: 1 / -1; max-width: 420px; }
  .dev-grid { grid-template-columns: 1fr; gap: 40px; }
  .repos { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer__top nav:last-of-type { grid-column: 2; }
}

@media (max-width: 880px) {
  .nav { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 6px var(--pad) 16px; background: var(--paper); border-bottom: 1px solid var(--ink); box-shadow: 0 24px 40px -30px rgba(23,22,15,.5); }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
  .nav a::after { display: none; }
  .menu-btn { display: flex; }
  .header__in { gap: 16px; }
  .playground__body { grid-template-columns: 1fr; }
  .code--out { border-left: 0; border-top: 1px solid rgba(242,238,228,.14); }
  .plans { grid-template-columns: 1fr; max-width: 460px; }
  .plan__price { font-size: 48px; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .topbar__in { font-size: 9px; gap: 8px; }
  .topbar a { display: none; }
  .brand__word { font-size: 19px; }
  .brand__mark { width: 24px; height: 24px; }
  .header__actions .btn { display: none; }
  .hero__actions { align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .link-arrow { justify-content: center; }
  .hero__facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
  .hero__facts dt { font-size: 7.5px; letter-spacing: .08em; min-height: 2.3em; }
  .hero__facts dd { font-size: 13px; }
  .hero__facts > div:last-child { grid-column: auto; padding-top: 0; border-top: 0; }
  .hero__stamp { display: none; }
  .topbar__more { display: none; }
  .receipt { padding: 18px 16px 14px; }
  .receipt__price { font-size: 17px; }
  .receipt__total strong { font-size: 23px; }
  .sim__controls { padding: 18px 14px; gap: 22px; }
  .presets { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 6px; margin-inline: -14px; padding-inline: 14px; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; }
  .presets::-webkit-scrollbar { display: none; }
  .preset { flex: 0 0 104px; min-height: 64px; flex-direction: row; align-items: center; gap: 8px; padding: 8px; scroll-snap-align: start; }
  .preset__meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .preset__name { font-size: 10.5px; }
  .preset__code { display: none; }
  .row-2 { grid-template-columns: 1fr; gap: 20px; }
  .year-track { grid-template-columns: repeat(4, 1fr); }
  .year-btn { padding: 8px 2px; font-size: 10px; }
  .sim__stats { grid-template-columns: 1fr; }
  .stat { padding: 10px 0; }
  .stat + .stat { padding-left: 0; border-left: 0; border-top: 1px dashed var(--line); }
  .method__grid { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .verdict__big { font-size: clamp(32px, 9vw, 44px); }
  .ticker__item { padding: 12px 16px; }
  .ticker__item:first-child { padding-left: 0; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .footer nav:last-of-type { grid-column: auto; }
  .dialog__form { padding: 24px 20px; }
  .dialog__form h3 { font-size: 26px; }
}

@media (max-width: 380px) {
  .presets { grid-template-columns: 1fr 1fr; }
  .preset { padding: 8px 7px; }
}

/* ---------- guide band (home) ---------- */
.guide-band {
  background: var(--ink); color: var(--paper); position: relative; z-index: 1;
  padding-block: clamp(44px, 6vw, 76px);
  background-image: radial-gradient(760px 360px at 82% -10%, rgba(190,61,36,.2), transparent 62%);
}
.guide-band__box {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
  border: 1px solid rgba(242,238,228,.18); padding: clamp(22px, 4vw, 44px);
}
.guide-band h2 { margin: 0 0 12px; font: 600 clamp(30px, 4.1vw, 54px)/1.03 var(--serif); letter-spacing: -.04em; }
.guide-band h2 em { font-style: normal; color: #E4705A; }
.guide-band p { margin: 0; max-width: 56ch; font-size: 13.5px; line-height: 1.65; color: #B9B2A1; }
.guide-band__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 24px; }
.guide-band__stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(242,238,228,.18); }
.guide-band__stats div { padding: 15px 0; border-bottom: 1px solid rgba(242,238,228,.18); }
.guide-band__stats div:nth-child(odd) { padding-right: 16px; border-right: 1px solid rgba(242,238,228,.18); }
.guide-band__stats div:nth-child(even) { padding-left: 16px; }
.guide-band__stats span { display: block; margin-bottom: 8px; font: 500 8.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #A9A292; }
.guide-band__stats strong { display: block; font: 500 22px/1 var(--mono); letter-spacing: -.03em; color: var(--paper); }
.guide-band__stats em { display: block; margin-top: 5px; font: normal 8.5px/1.4 var(--mono); color: #A9A292; }
.link-arrow--light { color: var(--paper); border-color: rgba(242,238,228,.32); }
.link-arrow--light:hover { border-color: var(--paper); }

@media (max-width: 980px) {
  .guide-band__box { grid-template-columns: 1fr; }
  .guide-band__stats { max-width: 520px; }
}
@media (max-width: 640px) {
  .guide-band__actions { flex-direction: column; align-items: flex-start; }
  .guide-band__stats strong { font-size: 19px; }
}
.link-inline { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.link-inline:hover { color: var(--red); text-decoration-color: var(--red); }
