/* Jig — stylesheet
   Palette, type scale and the steel-rule device. No frameworks. */

:root {
  --ink:        #14181C;
  --ink-soft:   #2A313A;
  --paper:      #EDEEEC;
  --paper-pure: #F6F7F5;
  --rust:       #8F2F10;
  --rust-lit:   #C14B16;
  --amber:      #E8892A;
  --steel:      #6B7580;
  --rule:       #C9CDC7;
  --rule-dark:  #2A323C;

  --measure: 66ch;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --gap: clamp(2.5rem, 6vw, 5.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-synthesis-weight: none;
}

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 .6em; font-weight: 800; }
h1 { font-size: clamp(2.2rem, 5.4vw, 3.7rem); letter-spacing: -0.035em; text-wrap: balance; }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
p  { margin: 0 0 1.1em; max-width: var(--measure); }
a  { color: var(--rust); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--rust-lit); outline-offset: 3px; }

.wrap { max-width: 1120px; margin-inline: auto; padding-inline: var(--pad); }

/* ---- steel rule: the repeating tick device ------------------------------ */
.rule {
  height: 14px;
  background-image:
    repeating-linear-gradient(to right, #B4BAB3 0 1px, transparent 1px 10px),
    linear-gradient(to bottom, var(--rule) 0 1px, transparent 1px);
  background-position: bottom left, top left;
  background-repeat: repeat-x, repeat-x;
  background-size: 10px 8px, 100% 1px;
}
.rule--dark {
  background-image:
    repeating-linear-gradient(to right, var(--rule-dark) 0 1px, transparent 1px 11px),
    linear-gradient(to bottom, var(--rule-dark) 0 1px, transparent 1px);
}

/* ---- header ------------------------------------------------------------- */
.site-head { background: var(--paper); }
.site-head__in {
  display: flex; align-items: center; gap: 1.5rem;
  padding-block: 1.1rem; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand svg { display: block; }
.brand b { font-size: 1.45rem; font-weight: 900; letter-spacing: .01em; }
.nav { margin-left: auto; display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--rust); }

/* ---- buttons ------------------------------------------------------------ */
.btn {
  display: inline-block; padding: .85rem 1.5rem;
  background: var(--rust); color: var(--paper-pure);
  font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 2px solid var(--rust); cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper-pure); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper-pure); }
.btn--onDark { background: var(--rust-lit); border-color: var(--rust-lit); }
.btn--onDark:hover { background: var(--paper-pure); border-color: var(--paper-pure); color: var(--ink); }
.btn-row { display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; margin-top: 1.8rem; }

/* ---- hero --------------------------------------------------------------- */
.hero { padding-block: clamp(2.5rem, 7vw, 5rem) var(--gap); }
.hero__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.05fr .95fr; } }
.hero p.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 46ch; }

/* ---- the calculator ----------------------------------------------------- */
.calc {
  background: var(--ink); color: var(--paper-pure);
  padding: clamp(1.5rem, 3vw, 2.2rem);
}
.calc h2 { font-size: 1.05rem; font-weight: 700; color: var(--paper-pure); margin-bottom: 1.4rem; }
.calc__fields { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; }
.calc label { display: block; font-size: .8rem; color: #9AA4AF; margin-bottom: .4rem; font-weight: 500; }
.calc input {
  width: 100%; padding: .6rem .7rem; background: #0B0E12; color: var(--paper-pure);
  border: 1px solid var(--rule-dark); font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1.15rem;
}
.calc input:focus { border-color: var(--rust-lit); }
.calc__out { margin-top: 1.6rem; border-top: 1px solid var(--rule-dark); padding-top: 1.3rem; }
.calc__line { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-block: .35rem; }
.calc__line span { font-size: .9rem; color: #9AA4AF; }
.calc__line output { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 1.15rem; }
.calc__line--big output { font-size: 2.1rem; color: var(--amber); font-weight: 700; }
.calc__note { font-size: .78rem; color: #6D7782; margin: 1rem 0 0; max-width: none; }

/* ---- generic sections --------------------------------------------------- */
.section { padding-block: var(--gap); }
.section--dark { background: var(--ink); color: var(--paper-pure); }
.section--dark h2, .section--dark h3 { color: var(--paper-pure); }
.section--dark p { color: #AEB7C0; }
.section__head { max-width: 40ch; margin-bottom: 2.6rem; }

/* quote-like list of pains, set as a stack of ruled lines */
.pains { list-style: none; margin: 0; padding: 0; max-width: 58ch; }
.pains li {
  padding: 1rem 0; border-bottom: 1px solid var(--rule);
  font-size: 1.1rem;
}
.section--dark .pains li { border-color: var(--rule-dark); }
.pains li:first-child { border-top: 1px solid var(--rule); }
.section--dark .pains li:first-child { border-color: var(--rule-dark); }

/* numbered steps — a real sequence, so numbers earn their place */
.steps { display: grid; gap: 2.2rem; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { counter-increment: step; }
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 2.2rem; color: var(--rust); font-weight: 700; line-height: 1;
}
.section--dark .step::before { color: var(--rust-lit); }
.step em { display: block; width: 34px; height: 3px; background: var(--amber); margin: .7rem 0 1rem; }
.step p { font-size: .98rem; color: var(--steel); }
.section--dark .step p { color: #9AA4AF; }

/* refusals */
.refuse { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; max-width: 52ch; }
.refuse li { padding: .7rem 0 .7rem 1.9rem; position: relative; border-bottom: 1px solid var(--rule-dark); }
.refuse li::before {
  content: "×"; position: absolute; left: 0; top: .55rem;
  color: var(--rust-lit); font-size: 1.2rem; font-weight: 700;
}

/* price block */
.price { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .price { grid-template-columns: 1fr 1fr; } }
.price__num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(3rem, 9vw, 5rem); font-weight: 700; line-height: 1; color: var(--rust);
  letter-spacing: -.04em;
}
.price__terms { list-style: none; margin: 1.6rem 0 0; padding: 0; }
.price__terms li { padding: .6rem 0; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 1rem; font-size: .98rem; }
.price__terms b { font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 600; }

/* faq */
.faq { max-width: 62ch; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { padding: 1.05rem 0; cursor: pointer; font-weight: 700; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--rust); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq p { padding-bottom: .4rem; color: var(--ink-soft); }

/* article */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.4rem; }
.prose .answer {
  border-left: 4px solid var(--rust); padding: .2rem 0 .2rem 1.3rem;
  font-size: 1.18rem; margin-bottom: 2rem;
}
.prose table { border-collapse: collapse; width: 100%; margin: 1.6rem 0; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-size: .78rem; color: var(--steel); font-weight: 600; }

/* insight cards — list, not a card kit */
.posts { list-style: none; margin: 0; padding: 0; max-width: 70ch; }
.posts li { border-top: 1px solid var(--rule); padding: 1.6rem 0; }
.posts a { font-size: 1.3rem; font-weight: 700; text-decoration: none; color: var(--ink); display: block; }
.posts a:hover { color: var(--rust); }
.posts p { color: var(--steel); margin: .4rem 0 0; font-size: .98rem; }

/* diagnostic */
.q { max-width: 58ch; }
.q__count { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .85rem; color: var(--steel); }
.q__bar { height: 4px; background: var(--rule); margin: .6rem 0 2rem; }
.q__bar i { display: block; height: 100%; background: var(--rust); transition: width .25s ease; }
.opts { display: grid; gap: .55rem; margin: 1.6rem 0 2rem; }
.opt {
  display: block; width: 100%; text-align: left; padding: .9rem 1.1rem;
  background: var(--paper-pure); border: 1px solid var(--rule); font: inherit; cursor: pointer;
}
.opt:hover { border-color: var(--rust); }
.opt[aria-pressed="true"] { border-color: var(--rust); background: #E6E2DB; box-shadow: inset 3px 0 0 var(--rust); }
.q__nav { display: flex; gap: .8rem; align-items: center; }
.link-btn { background: none; border: 0; color: var(--steel); font: inherit; cursor: pointer; text-decoration: underline; }
.result__num { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: clamp(2.4rem,7vw,3.6rem); color: var(--rust); font-weight: 700; line-height: 1.1; }

/* footer */
.site-foot { background: var(--ink); color: #9AA4AF; padding-block: 3rem; margin-top: var(--gap); }
.site-foot a { color: var(--paper-pure); text-decoration: none; }
.site-foot a:hover { color: var(--rust-lit); }
.site-foot__in { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; }
.site-foot p { font-size: .9rem; max-width: 34ch; }
.foot-nav { display: grid; gap: .5rem; font-size: .95rem; }

.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* page-specific trims */
.hero--tight { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.step h3 { margin-bottom: .5rem; }
.opt { line-height: 1.35; }
