/* Public website. "The paper questionnaire": navy ink on blue-white paper, light blue
   rules, and one ballpoint blue for buttons, links and chosen answers. No black. */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/fonts/bricolage-grotesque.woff') format('woff');
  font-weight: 200 800; font-stretch: 75% 100%; font-style: normal; font-display: swap;
}
:root {
  --paper: #f6f8fe;
  --sheet: #ffffff;
  --ink: #1a2b5e;
  --graphite: #4f5b7c;
  --rule: #dce3f5;
  --line: #b9c6ef;
  --pen: #2b4ee0;
  --pen-ink: #ffffff;
  --pen-hover: #1f3fc4;
  --pen-wash: #e9eefd;
  --band: #eaf0fe;
  --shadow: rgb(43 78 224 / .22);
  --font: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --measure: 64ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14224d;
    --sheet: #1b2b5c;
    --ink: #eef2ff;
    --graphite: #b6c1e3;
    --rule: #2c3d74;
    --line: #3d5194;
    --pen: #9fb3ff;
    --pen-ink: #14224d;
    --pen-hover: #bccaff;
    --pen-wash: #24366f;
    --band: #182957;
    --shadow: rgb(5 10 40 / .45);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
main { overflow-x: clip; }
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-weight: 650; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }
.skip { position: absolute; left: -999px; top: 10px; z-index: 50; padding: 8px 14px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; }
.skip:focus { left: 12px; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 24px; padding: 14px clamp(20px, 4vw, 48px); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.035em; font-stretch: 88%; line-height: 1; }
.logo { flex: none; }
.mk-a, .x-a { stroke: var(--ink); }
.mk-b, .x-b { stroke: var(--pen); }
.wm { white-space: nowrap; }
.wm-x { display: inline-block; width: 0.56em; height: 0.56em; vertical-align: baseline; margin-left: 0.02em; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.foot-brand .brand { font-size: 1.3rem; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav > a, .nav-btn { padding: 8px 12px; border-radius: 6px; color: var(--graphite); text-decoration: none; font: inherit; font-size: 0.97rem; font-weight: 500; background: none; border: 0; cursor: pointer; }
.nav > a:hover, .nav-btn:hover { color: var(--ink); }
.nav > a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--pen); border-radius: 0; }
.nav-btn { color: var(--ink); border: 1px solid var(--rule); margin-left: 8px; }
.nav-login { padding: 8px 12px; margin-left: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.97rem; border-radius: 6px; }
.nav-login:hover { color: var(--pen); }
.nav-cta { min-height: 40px; padding: 0 16px; font-size: 0.95rem; margin-left: 4px; }
.nav-btn::after { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.dd { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); width: 270px; padding: 6px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 18px 40px -24px var(--shadow); }
.menu a { display: block; padding: 10px 12px; border-radius: 6px; text-decoration: none; }
.menu a:hover { background: var(--pen-wash); }
.menu b { display: block; font-weight: 600; }
.menu small { color: var(--graphite); font-size: 0.85rem; }
.burger { display: none; margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--rule); border-radius: 6px; background: none; padding: 0 10px; cursor: pointer; }
.burger span { display: block; height: 1.5px; background: var(--pen); margin: 6px 0; transition: transform .2s; }

/* ---------- Buttons and links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 6px; font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; border: 1.5px solid var(--pen); white-space: nowrap; }
.btn.primary { background: var(--pen); color: var(--pen-ink); }
.btn.primary:hover { background: var(--pen-hover); border-color: var(--pen-hover); }
.btn.line { background: var(--sheet); color: var(--pen); border-color: var(--line); }
.btn.line:hover { border-color: var(--pen); background: var(--pen-wash); }
.more { font-weight: 600; color: var(--pen); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.more:hover { text-decoration-thickness: 2.5px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 30px; }
.fine { color: var(--graphite); font-size: 0.95rem; margin-top: 14px; }

/* ---------- Type scale (1.25) ---------- */
h1 { font-size: clamp(2.4rem, 5.6vw, 4.3rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700; font-stretch: 85%; max-width: 16ch; }
.sec-head h2, .close h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.1; letter-spacing: -0.025em; font-stretch: 90%; }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.25; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.28rem); color: var(--graphite); margin-top: 22px; max-width: 52ch; line-height: 1.55; }
.body { color: var(--graphite); max-width: var(--measure); }

/* ---------- Hero: the questionnaire ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; padding-top: clamp(48px, 8vw, 112px); padding-bottom: clamp(56px, 8vw, 112px); }
.sheet { position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; padding: 34px 34px 26px 64px;
  /* ruled paper with a margin line */
  background-image: linear-gradient(90deg, transparent 47px, color-mix(in srgb, #d9534f 35%, transparent) 47px, color-mix(in srgb, #d9534f 35%, transparent) 48px, transparent 48px),
                    repeating-linear-gradient(180deg, transparent 0 35px, color-mix(in srgb, var(--pen) 10%, transparent) 35px 36px);
  box-shadow: 0 1px 0 var(--rule), 0 30px 60px -36px var(--shadow); }
.sheet-n { position: absolute; left: 14px; top: 36px; font-weight: 700; font-size: 0.95rem; color: var(--graphite); font-stretch: 80%; }
.sheet-q { font-size: clamp(1.45rem, 2.4vw, 1.85rem); letter-spacing: -0.02em; line-height: 1.15; }
.sheet-hint { color: var(--graphite); font-size: 0.95rem; margin-top: 6px; }
.answers { list-style: none; padding: 0; margin-top: 22px; display: grid; gap: 10px; }
.answers a { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--rule); border-radius: 6px; background: var(--sheet); text-decoration: none; font-weight: 600; font-size: 1.05rem; transition: border-color .15s, background .15s; }
.answers .box { width: 24px; height: 24px; border: 1.5px solid var(--line); border-radius: 4px; display: grid; place-items: center; }
.answers .tick { width: 18px; height: 18px; fill: none; stroke: var(--pen); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .28s ease-out; }
.answers .prod { color: var(--graphite); font-weight: 500; font-size: 0.92rem; }
.answers a:hover, .answers a:focus-visible { border-color: var(--pen); background: var(--pen-wash); outline: none; }
.answers a:hover .box, .answers a:focus-visible .box { border-color: var(--pen); }
.answers a:hover .tick, .answers a:focus-visible .tick { stroke-dashoffset: 0; }
.answers a:hover .prod, .answers a:focus-visible .prod { color: var(--pen); }

/* ---------- Sections ---------- */
.sec { padding-top: clamp(56px, 7vw, 96px); padding-bottom: clamp(8px, 2vw, 16px); }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding-top: 22px; border-top: 2px solid var(--line); margin-bottom: clamp(26px, 4vw, 44px); }
.sec-head p { color: var(--graphite); max-width: var(--measure); }
.intro { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(24px, 4vw, 48px); }

/* Product rows */
.rows { display: grid; }
.row { display: grid; grid-template-columns: 200px 180px minmax(0, 1fr) auto; gap: 24px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.row:first-child { padding-top: 4px; }
.row h3 { font-size: 1.55rem; letter-spacing: -0.02em; font-stretch: 88%; }
.row .who { color: var(--graphite); font-weight: 500; }
.row .what { max-width: 52ch; }
.row .go { display: flex; align-items: center; gap: 18px; justify-self: end; align-self: center; }

/* Figures */
.fig figcaption { color: var(--graphite); font-size: 0.95rem; margin-top: 12px; }
.shot { display: block; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: var(--sheet); }
.shot img { display: block; width: 100%; height: auto; }
.fig-wide { padding-bottom: 8px; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 28px; }

/* Steps: a real sequence, so numbered */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 18px; border-top: 2px solid var(--rule); position: relative; }
.steps li::before { content: counter(step); position: absolute; top: -15px; left: 0; width: 28px; height: 28px; display: grid; place-items: center; background: var(--paper); border: 1.5px solid var(--pen); color: var(--pen); border-radius: 50%; font-weight: 700; font-size: 0.9rem; }
.steps h3 { margin-top: 10px; }
.steps p { color: var(--graphite); margin-top: 6px; }

/* Definition lists */
.defs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.defs.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.defs > div { padding: 18px 0 22px; border-bottom: 1px solid var(--rule); }
.defs dt { font-weight: 650; font-size: 1.1rem; }
.defs dd { color: var(--graphite); margin-top: 6px; }

/* Columns of ticked lists */
.cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.ticks { list-style: none; padding: 0; margin-top: 14px; display: grid; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; color: var(--graphite); }
.ticks .tick { width: 18px; height: 18px; margin-top: 4px; fill: none; stroke: var(--pen); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.pair { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.pair .ticks { margin-top: 20px; }
.note { padding: 24px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; }
.note p { color: var(--graphite); margin-top: 10px; }
.note b { color: var(--ink); }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); }
.plan { display: flex; flex-direction: column; padding: 28px; border-right: 1px solid var(--rule); }
.plan:last-child { border-right: 0; }
.plan.hi { box-shadow: inset 0 3px 0 var(--pen); }
.price { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; margin-top: 8px; font-stretch: 88%; }
.plan-sub { color: var(--graphite); margin-top: 2px; }
.plan .ticks { margin-bottom: 26px; }
.plan .btn { margin-top: auto; }

/* Closing */
.close { padding-top: clamp(64px, 8vw, 112px); padding-bottom: clamp(64px, 8vw, 112px); }
.close h2 { max-width: 22ch; }

/* Panelist wallet */
.wallet { justify-self: center; width: min(340px, 100%); padding: 22px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; display: grid; gap: 10px; box-shadow: 0 30px 60px -36px var(--shadow); }
.bal { display: grid; padding-bottom: 14px; border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.bal span { color: var(--graphite); font-size: 0.9rem; }
.bal b { font-size: 2.6rem; letter-spacing: -0.03em; font-stretch: 85%; line-height: 1.05; }
.item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--rule); font-weight: 500; }
.item i { font-style: normal; font-weight: 700; color: var(--pen); }
.wallet-note { color: var(--graphite); font-size: 0.82rem; }

/* Contact */
.contact { align-items: start; }
.contact .note { margin-top: 36px; }
.portals { list-style: none; padding: 0; margin-top: 10px; }
.portals li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.portals li:last-child { border-bottom: 0; }
.portals small { display: block; color: var(--graphite); font-size: 0.88rem; }
.portals a { font-weight: 600; color: var(--pen); }
.form { display: grid; gap: 16px; padding: 28px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; font-size: 1rem; padding: 11px 12px; border: 1.5px solid var(--rule); border-radius: 6px; background: var(--paper); color: var(--ink); width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--pen); box-shadow: 0 0 0 3px var(--pen-wash); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .btn { justify-self: start; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { min-height: 1.5em; font-size: 0.95rem; }
.form-msg.ok { color: #1f7a4d; }
.form-msg.err { color: #c0352b; }
@media (prefers-color-scheme: dark) { .form-msg.ok { color: #6fd39f; } .form-msg.err { color: #ff8a80; } }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--rule); background: var(--band); margin-top: 48px; }
.foot-in { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 32px; padding-top: 44px; padding-bottom: 36px; }
.foot-brand p { color: var(--graphite); font-size: 0.95rem; margin-top: 12px; max-width: 30ch; }
.foot h2 { font-size: 0.95rem; font-weight: 650; margin-bottom: 10px; }
.foot-in > div > a:not(.brand) { display: block; padding: 4px 0; color: var(--graphite); text-decoration: none; font-size: 0.95rem; }
.foot-in > div > a:not(.brand):hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot-bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid var(--rule); color: var(--graphite); font-size: 0.9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .row { grid-template-columns: 170px minmax(0, 1fr); gap: 6px 24px; }
  .row .who { grid-column: 1; grid-row: 2; }
  .row .what { grid-column: 2; grid-row: 1 / 3; }
  .row .go { grid-column: 2; justify-self: start; margin-top: 12px; }
  .cols, .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .defs.three { grid-template-columns: 1fr 1fr; }
  .foot-in { grid-template-columns: repeat(4, 1fr); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .burger { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px clamp(20px, 4vw, 48px) 16px; background: var(--paper); border-bottom: 1px solid var(--rule); }
  .top.open .nav { display: flex; }
  .top.open .burger span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .top.open .burger span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav > a { padding: 12px 0; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .nav > a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--pen); padding-left: 12px; }
  .nav-btn { margin: 12px 0 0; width: 100%; text-align: left; padding: 12px; }
  .nav-login { margin: 8px 0 0; padding: 12px 0; }
  .nav-cta { margin: 8px 0 0; width: 100%; }
  .menu { position: static; width: auto; box-shadow: none; margin-top: 6px; }
  .hero, .pair, .gallery { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .sheet { padding: 26px 18px 20px 52px; }
  .answers a { grid-template-columns: 26px 1fr; }
  .answers .prod { grid-column: 2; margin-top: -8px; }
  .row { grid-template-columns: 1fr; }
  .row .who, .row .what, .row .go { grid-column: 1; grid-row: auto; }
  .cols, .steps, .defs, .defs.three, .form-row { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .plan { border-right: 0; border-bottom: 1px solid var(--rule); }
  .plan:last-child { border-bottom: 0; }
  .actions .btn { flex: 1 1 100%; }
  .foot-in { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { .answers .tick, .burger span { transition: none; } }
