/* Andris Founder OS: "term sheet on security paper".
   Ground = engraved security paper; ink = near-black; ONE accent = bank-stamp ultramarine. */
:root {
  --paper: #EDEFEA;        /* security paper, faint grey-green */
  --sheet: #F7F8F4;        /* the term sheet itself */
  --ink: #12161B;
  --ink-2: #4B535C;        /* secondary text, 7.4:1 on paper */
  --rule: #BCC3C0;
  --engrave: #9FB2AA;      /* guilloche lines */
  --stamp: #2236C4;        /* ultramarine stamp ink, the only accent */
  --stamp-wash: #E3E6F6;
  --warn: #8A4B00;
  --bad: #A3221B;
  --f-display: "Archivo", "Arial Narrow", sans-serif;
  --f-body: "IBM Plex Sans", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--f-body); }
a { color: var(--stamp); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--stamp); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
::selection { background: var(--stamp); color: #fff; }

/* type roles */
.display { font-family: var(--f-display); font-stretch: 72%; font-weight: 800; letter-spacing: -0.01em; line-height: .95; text-transform: uppercase; }
.mono, .label { font-family: var(--f-mono); }
.label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.num { font-family: var(--f-mono); font-feature-settings: "tnum"; }

/* masthead */
.mast { position: relative; border-bottom: 1px solid var(--ink); background: var(--paper); overflow: hidden; }
.mast-in { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { font-family: var(--f-display); font-stretch: 62%; font-weight: 900; font-size: 30px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.wordmark small { font-family: var(--f-mono); font-stretch: 100%; font-weight: 400; font-size: 11px; letter-spacing: .16em; color: var(--ink-2); margin-left: 12px; vertical-align: 4px; }
.lockup { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.lockup .seal-mark { color: var(--stamp); flex: none; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.lockup:hover .seal-mark { transform: rotate(-12deg); }
.lk-txt { display: grid; line-height: 1; }
.lk-name { font-family: var(--f-display); font-stretch: 62%; font-weight: 900; font-size: 36px; letter-spacing: .05em; text-transform: uppercase; }
.lk-sub { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); margin-top: 4px; }
.mast .guil { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }

/* buttons */
.btn { appearance: none; border: 1.5px solid var(--ink); background: var(--ink); color: var(--sheet); font: 600 15px/1 var(--f-body); letter-spacing: .02em; padding: 15px 22px; min-height: 48px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.btn:hover { background: var(--stamp); border-color: var(--stamp); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--sheet); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn .arr { font-family: var(--f-mono); }

/* the stamp */
.stamp { display: inline-block; border: 2.5px solid var(--stamp); color: var(--stamp); padding: 6px 12px 5px; font: 700 13px/1 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; transform: rotate(-4deg); border-radius: 3px; box-shadow: inset 0 0 0 1.5px var(--sheet), inset 0 0 0 3px var(--stamp); }

/* footer disclosure */
.disclose { border-top: 1px solid var(--ink); margin-top: 64px; padding: 22px 24px 40px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.disclose-in { max-width: 1180px; margin: 0 auto; display: grid; gap: 18px 32px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.foot-brand { grid-column: 1 / -1; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.foot-brand .seal-mark { width: 72px; height: 72px; }
.foot-brand .lk-name { font-size: 42px; }
.disclose .lic { font-family: var(--f-mono); font-size: 12px; }
.disclose .lic span { display: block; }
@media (max-width: 760px) { .disclose-in { grid-template-columns: 1fr; } }

/* form fields */
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label { font-weight: 600; font-size: 15px; }
.field input, .field textarea, .field select { font: 400 17px/1.4 var(--f-body); color: var(--ink); background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 0; padding: 12px 14px; min-height: 48px; width: 100%; }
.field textarea { min-height: 120px; resize: vertical; }
.field .err { color: var(--bad); font-size: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--stamp); flex: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 600px) {
  .mast-in { padding: 14px 18px; align-items: center; }
  .lockup .seal-mark { width: 48px; height: 48px; }
  .lk-name { font-size: 30px; }
  .lk-sub { font-size: 9.5px; }
  .mast-in .label { white-space: nowrap; font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- questionnaire ---------- */
.desk-wrap, .q-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.q-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: start; padding-top: 48px; }
.q-pane { min-height: 60vh; }
.q-count { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.q-count .bar { flex: 1; height: 1px; background: var(--rule); position: relative; }
.q-count .bar i { position: absolute; left: 0; top: -1px; height: 3px; background: var(--ink); transition: width .35s ease; }
.q-section { color: var(--stamp); }
.q-title { font-family: var(--f-display); font-stretch: 78%; font-weight: 700; font-size: clamp(30px, 4.2vw, 46px); line-height: 1.04; letter-spacing: -0.01em; margin: 6px 0 28px; text-wrap: balance; }
.opts { display: grid; gap: 0; border-top: 1px solid var(--ink); }
.opt { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 8px; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--rule); padding: 15px 8px 15px 2px; min-height: 58px; font: 400 18px/1.35 var(--f-body); color: var(--ink); cursor: pointer; }
.opt .k { font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); border: 1px solid var(--rule); width: 28px; height: 28px; display: grid; place-items: center; }
.opt .tick { font-family: var(--f-mono); color: var(--stamp); opacity: 0; font-size: 14px; letter-spacing: .1em; }
.opt:hover { background: var(--sheet); }
.opt[aria-checked="true"], .opt[aria-pressed="true"] { background: var(--sheet); font-weight: 600; }
.opt[aria-checked="true"] .k, .opt[aria-pressed="true"] .k { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.opt[aria-checked="true"] .tick, .opt[aria-pressed="true"] .tick { opacity: 1; }
.q-nav { display: flex; gap: 12px; margin-top: 28px; align-items: center; flex-wrap: wrap; }
.q-nav .hint { color: var(--ink-2); font-size: 13px; margin-left: auto; }
.q-error { color: var(--bad); margin-top: 14px; font-weight: 500; }

/* the live term sheet */
.sheet { position: sticky; top: 24px; background: var(--sheet); border: 1px solid var(--ink); padding: 22px 22px 18px; box-shadow: 6px 6px 0 var(--rule); }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 3px double var(--ink); padding-bottom: 10px; margin-bottom: 12px; }
.sheet-head h2 { font-family: var(--f-display); font-stretch: 70%; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; font-size: 20px; margin: 0; }
.terms { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.terms li { display: flex; gap: 6px; align-items: baseline; padding: 5px 0; }
.terms li .t { color: var(--ink-2); white-space: nowrap; }
.terms li .dots { flex: 1; border-bottom: 1px dotted var(--rule); transform: translateY(-4px); min-width: 12px; }
.terms li .v { font-family: var(--f-mono); font-size: 12.5px; text-align: right; max-width: 60%; }
.terms li.new { animation: ink .6s ease-out; }
@keyframes ink { from { background: var(--stamp-wash); } to { background: transparent; } }
.terms .empty { color: var(--ink-2); font-style: italic; }
.struct { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--ink); }
.struct ol { margin: 8px 0 0; padding-left: 0; list-style: none; counter-reset: s; }
.struct li { counter-increment: s; display: grid; grid-template-columns: 26px 1fr auto; gap: 6px; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--rule); }
.struct li::before { content: counter(s, upper-alpha) "."; font-family: var(--f-mono); color: var(--ink-2); font-size: 12px; padding-top: 2px; }
.struct .tier { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; padding-top: 3px; }
.struct .tier.strong { color: var(--stamp); }
.struct .tier.possible { color: var(--ink-2); }
.sheet .seal { position: absolute; right: -18px; bottom: -22px; pointer-events: none; }
.sheet-toggle { display: none; }

@media (max-width: 900px) {
  .q-grid { grid-template-columns: 1fr; gap: 0; padding-top: 28px; }
  .sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 20; border-width: 1px 0 0; box-shadow: 0 -4px 0 var(--rule); padding: 0; max-height: 72vh; overflow: auto; }
  .sheet .sheet-body { display: none; padding: 0 18px 18px; }
  .sheet.open .sheet-body { display: block; }
  .sheet-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; background: var(--sheet); border: 0; padding: 14px 18px; min-height: 52px; font: 600 15px var(--f-body); color: var(--ink); cursor: pointer; }
  .sheet .sheet-head { display: none; }
  .sheet .seal { display: none; }
  .q-pane { padding-bottom: 110px; }
  .opt { font-size: 17px; }
}
