/* PsyOn Labs. Colours come from psyon-tokens.css (the identity kit). */
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-var.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --plate: #E7E6E2; /* the ground of the concept renders, so they sit without an edge */
  --gutter: clamp(16px, 4vw, 56px);
  --measure: 62ch;
  --header-h: 68px;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --radius: 4px;
  --step-1: 0.875rem;
  --step0: 1.0625rem;
  --step1: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem);
  --step2: clamp(1.4375rem, 1.2rem + 0.9vw, 1.875rem);
  --step3: clamp(2rem, 1.45rem + 2.4vw, 3.5rem);
  --step4: clamp(2.5rem, 1.6rem + 4.2vw, 5.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--psyon-paper); color: var(--psyon-petrol); font: 400 var(--step0)/1.55 var(--sans); overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: var(--step4); line-height: 1.02; letter-spacing: -0.028em; }
h2 { font-size: var(--step3); line-height: 1.06; letter-spacing: -0.022em; }
h3 { font-size: var(--step2); line-height: 1.18; letter-spacing: -0.012em; }
p { margin: 0; }
p, li, dd { text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
kbd { font: 500 0.8125rem var(--mono); }

:focus-visible { outline: 3px solid var(--psyon-petrol); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: #fff; }

.skip { position: absolute; left: var(--gutter); top: -100px; z-index: 100; background: var(--psyon-petrol); color: #fff; padding: 12px 16px; border-radius: var(--radius); }
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: 1480px; margin-inline: auto; padding-inline: var(--gutter); }
.data { font: 400 var(--step-1)/1.45 var(--mono); }
.lede { font-size: var(--step1); line-height: 1.42; max-width: 40ch; }
.muted { color: var(--psyon-graphite); }
.on-dark { background: var(--psyon-petrol); color: #fff; }
.on-dark .muted { color: var(--psyon-mist); }
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: var(--step2); margin-top: 2em; letter-spacing: -0.012em; line-height: 1.18; }
.prose ul { padding-left: 1.2em; list-style: disc; }
.prose li + li { margin-top: 0.4em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 20px; border: 1.5px solid var(--psyon-petrol); border-radius: var(--radius); background: var(--psyon-petrol); color: #fff; font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { background: #15505E; border-color: #15505E; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.btn-quiet { background: transparent; color: var(--psyon-petrol); }
.btn-quiet:hover { background: var(--psyon-petrol); color: #fff; border-color: var(--psyon-petrol); }
.on-dark .btn { background: #fff; color: var(--psyon-petrol); border-color: #fff; }
.on-dark .btn:hover { background: var(--psyon-mist); border-color: var(--psyon-mist); }
.on-dark .btn-quiet { background: transparent; color: #fff; }
.on-dark .btn-quiet:hover { background: #fff; color: var(--psyon-petrol); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header. The scale under it is the page's scroll progress, in the language of the knob's ticks. */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--psyon-paper); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: calc(var(--header-h) - 8px); }
.logo-link { display: block; flex: none; padding: 6px 0; }
.logo-link img { width: 164px; height: auto; }
.site-nav ul { display: flex; align-items: center; gap: clamp(12px, 1.7vw, 28px); }
.site-nav a { display: inline-block; padding: 10px 0; text-decoration: none; font-weight: 500; font-size: 0.9875rem; white-space: nowrap; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.site-nav .nav-cta { padding: 10px 16px; background: var(--psyon-petrol); color: #fff; border-radius: var(--radius); }
.site-nav .nav-cta:hover { background: #15505E; text-decoration: none; }
.site-nav .nav-cta[aria-current="page"] { text-decoration: none; }
.menu-btn { display: none; min-height: 44px; min-width: 76px; padding: 8px 14px; border: 1.5px solid var(--psyon-petrol); border-radius: var(--radius); background: transparent; color: inherit; font: 600 1rem var(--sans); cursor: pointer; }
.scale { position: relative; height: 8px; background-image: repeating-linear-gradient(90deg, var(--psyon-mist) 0 1px, transparent 1px 10px); }
.scale-needle { position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--psyon-vermilion); transform: scaleX(0); transform-origin: 0 50%; }
@media (max-width: 1120px) {
  .js .menu-btn { display: block; }
  .site-nav ul { flex-wrap: wrap; padding-bottom: 8px; }
  .header-row { flex-wrap: wrap; }
  .js .site-nav { display: none; flex-basis: 100%; padding-bottom: 16px; }
  .js.menu-open .site-nav { display: block; }
  .js .site-nav ul { flex-direction: column; align-items: flex-start; gap: 4px; }
  .js .site-nav a { font-size: 1.125rem; }
  .js.menu-open .site-header { max-height: 100svh; overflow-y: auto; }
}

/* Inner page opening */
.page-head { padding-block: clamp(48px, 8vw, 112px) clamp(32px, 5vw, 64px); }
.page-head h1 { max-width: 18ch; }
.page-head .lede { margin-top: 24px; max-width: 46ch; }
.section { padding-block: clamp(56px, 8vw, 120px); }
.section-tight { padding-block: clamp(40px, 5vw, 72px); }
.split { display: grid; gap: clamp(24px, 4vw, 64px); grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); align-items: start; }
.split > :first-child { max-width: 24ch; }
.split > :first-child h2 { font-size: clamp(1.75rem, 1.35rem + 1.5vw, 2.75rem); line-height: 1.1; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } .split > :first-child { max-width: none; } }
.rule-top { border-top: 1px solid var(--psyon-mist); }

/* The turned P, the recurring psychology signal */
.turned { height: 88px; background-repeat: repeat-x; background-position: left center; background-size: auto 88px; }
.turned-dark { background-image: url("../img/turned-p-on-dark.svg"); }
.turned-light { background-image: url("../img/turned-p-on-light.svg"); }

/* Concept render plate */
.plate { position: relative; margin: 0; background: var(--plate); border-radius: var(--radius); overflow: hidden; }
.plate img { width: 100%; }
.plate figcaption, .concept-tag { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; background: var(--psyon-petrol); color: #fff; font: 400 0.8125rem/1.4 var(--mono); border-radius: 2px; }

/* Definition rows used for instrument facts */
.facts { display: grid; gap: 0; margin: 0; }
.facts > div { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr); gap: 16px; padding-block: 14px; border-top: 1px solid var(--psyon-mist); }
.facts dt { font: 400 var(--step-1)/1.5 var(--mono); color: var(--psyon-graphite); }
.facts dd { margin: 0; }
.on-dark .facts dt { color: var(--psyon-mist); }
.on-dark .facts > div { border-color: #2B5A65; }
@media (max-width: 480px) { .facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* Sequences. Numbers appear only where the order matters. */
.steps { display: grid; gap: 0; counter-reset: step; }
.steps > li { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 8px 16px; padding-block: 24px; border-top: 1px solid var(--psyon-mist); counter-increment: step; }
.steps > li::before { content: counter(step); font: 500 var(--step1)/1.3 var(--mono); }
.steps h3 { font-size: var(--step1); line-height: 1.3; }
.steps p { margin-top: 6px; max-width: var(--measure); }
.steps-inner { grid-column: 2; }
.on-dark .steps > li { border-color: #2B5A65; }

.grid-2 { display: grid; gap: clamp(24px, 3vw, 48px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: clamp(24px, 3vw, 40px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: clamp(20px, 2vw, 32px); grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 680px) { .grid-2, .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.note-item h3 { font-size: var(--step1); line-height: 1.3; }
.note-item p { margin-top: 6px; }
.note-item { padding-top: 14px; border-top: 2px solid currentColor; }

/* Instruments page */
.jump { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.jump a { display: inline-block; padding: 6px 0; font-weight: 500; }
.instrument { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: start; padding-block: clamp(48px, 6vw, 96px); border-top: 1px solid var(--psyon-mist); scroll-margin-top: var(--header-h); }
.instrument h2 { font-size: var(--step3); }
.instrument .lede { margin-block: 14px 24px; }
.instrument .facts { margin-bottom: 24px; }
.status { display: inline-block; padding: 3px 10px; border: 1px solid currentColor; border-radius: 2px; font: 400 0.8125rem/1.4 var(--mono); white-space: nowrap; }
.instrument .status { margin-bottom: 14px; }
.parts-table { width: 100%; border-collapse: collapse; }
.parts-table th, .parts-table td { padding: 14px 16px 14px 0; border-top: 1px solid var(--psyon-mist); text-align: left; vertical-align: top; }
.parts-table th { font-weight: 600; }
.parts-table thead th { font: 400 var(--step-1)/1.4 var(--mono); color: var(--psyon-graphite); border-top: 0; }
@media (max-width: 860px) { .instrument { grid-template-columns: minmax(0, 1fr); } }

/* Experiments */
.filters { display: none; }
.js .filters { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: 20px; align-items: end; margin: 0 0 12px; padding: 20px; background: #fff; border-radius: var(--radius); }
.filters fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.filters legend { padding: 0; margin-bottom: 6px; font-weight: 600; font-size: 0.9375rem; }
.segmented { display: flex; flex-wrap: wrap; gap: 6px; }
.segmented label { position: relative; display: inline-flex; }
.segmented input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segmented span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--psyon-petrol); border-radius: var(--radius); font-size: 0.9375rem; font-weight: 500; }
.segmented input:checked + span { background: var(--psyon-petrol); color: #fff; }
.segmented input:focus-visible + span { outline: 3px solid var(--psyon-petrol); outline-offset: 3px; }
.results-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; min-height: 48px; padding-block: 8px; }
.link-btn { background: none; border: 0; padding: 8px 0; min-height: 44px; color: inherit; font: 600 1rem var(--sans); text-decoration: underline; cursor: pointer; }
.exp-list > li { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) 13.5rem; gap: 8px clamp(16px, 3vw, 48px); padding-block: 22px; border-top: 1px solid var(--psyon-mist); align-items: baseline; }
.exp-list h2 { font-size: var(--step1); line-height: 1.3; letter-spacing: -0.008em; }
.exp-list .studies { margin-top: 2px; color: var(--psyon-graphite); }
.exp-list .exp-status { justify-self: end; display: grid; gap: 8px; justify-items: end; }
.is-launch { background: var(--psyon-petrol); color: #fff; border-color: var(--psyon-petrol); }
@media (max-width: 860px) {
  .js .filters { grid-template-columns: minmax(0, 1fr); }
  .exp-list > li { grid-template-columns: minmax(0, 1fr); }
  .exp-list .exp-status { justify-self: start; justify-items: start; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
}

/* Forms */
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.9875rem; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 11px 12px; border: 1.5px solid var(--psyon-graphite); border-radius: var(--radius); background: #fff; color: var(--psyon-petrol); font: 400 1rem/1.4 var(--sans); }
.field textarea { min-height: 150px; resize: vertical; }
.field [aria-invalid="true"] { border-color: #B23A0D; border-width: 2px; }
.field-error { color: #B23A0D; font-size: 0.9375rem; font-weight: 500; }
.form-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .wide { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 14px 16px; border-left: 4px solid var(--psyon-petrol); background: #fff; }
.form-status.is-error { border-left-color: #B23A0D; }
.form-success { padding: clamp(24px, 4vw, 40px); background: var(--psyon-petrol); color: #fff; border-radius: var(--radius); }
.form-success h2 { font-size: var(--step2); margin-bottom: 8px; }
.form-success:focus-visible { outline-offset: 4px; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: minmax(0, 1fr); } }

/* Stroop */
.stroop-card { background: #fff; border-radius: var(--radius); padding: clamp(20px, 4vw, 48px); }
.stroop-stage { display: grid; place-items: center; min-height: clamp(180px, 34vh, 340px); }
.stroop-word { font-size: clamp(3rem, 1.8rem + 7vw, 7rem); font-weight: 700; letter-spacing: 0.01em; line-height: 1; }
.stroop-fix { font: 400 3rem/1 var(--mono); color: var(--psyon-graphite); }
.stroop-keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.stroop-key { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 72px; padding: 8px; border: 1.5px solid var(--psyon-petrol); border-radius: var(--radius); background: var(--psyon-paper); color: var(--psyon-petrol); font: 600 1.0625rem var(--sans); cursor: pointer; touch-action: manipulation; }
.stroop-key:hover { background: var(--psyon-mist); }
.stroop-key kbd { color: var(--psyon-graphite); }
.run-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
@media (max-width: 520px) { .stroop-keys { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stroop-key kbd { display: none; } }
@media (pointer: coarse) { .stroop-key kbd { display: none; } }
.result-rows { display: grid; gap: 18px; margin: 20px 0; }
.result-row .bar { height: 14px; background: var(--psyon-paper); margin-top: 6px; }
.result-row .bar span { display: block; height: 100%; width: 0; background: var(--psyon-petrol); }
.result-row .bar .bar-inc { background: var(--psyon-vermilion); }
.result-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; }
.result-fx { padding-block: 16px; border-block: 1px solid var(--psyon-mist); }
.result-fx strong { display: block; font: 500 var(--step3)/1.1 var(--mono); }
.results h2:focus { outline: none; }

/* Footer */
.site-footer { background: var(--psyon-petrol); color: #fff; }
.site-footer .turned { opacity: 1; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr); gap: 32px clamp(24px, 4vw, 64px); padding-block: clamp(32px, 5vw, 56px); }
.footer-logo { width: 184px; height: auto; margin-bottom: 16px; }
.footer-grid ul a { display: inline-block; padding: 5px 0; }
.footer-grid a { color: #fff; }
.footer-legal { padding-block: 18px 28px; border-top: 1px solid #2B5A65; color: var(--psyon-mist); font-size: 0.9375rem; }
.footer-legal strong { color: #fff; font-weight: 500; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* 404 */
.lost { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: center; padding-block: clamp(48px, 8vw, 120px); }
.lost-p { width: min(68%, 280px); transform: rotate(137deg); margin-inline: auto; }
@media (max-width: 760px) { .lost { grid-template-columns: minmax(0, 1fr); } .lost-p { width: 150px; margin-inline: 24px auto; } }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
@media print {
  .site-header { position: static; }
  .scale, .turned, .menu-btn { display: none; }
}

/* Page-level details */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.section-tight-top { margin-top: 28px; }
.actions-gap { margin-top: 24px; }
.intro-note { margin-top: 14px; }
.sub-h { font-size: var(--step1); line-height: 1.3; margin-bottom: 12px; }
.statement { font-size: var(--step2); line-height: 1.22; letter-spacing: -0.012em; font-weight: 500; }
.statement-sub { margin-top: 14px; }
.starter-list { margin-top: 20px; }
.train-list { margin-top: 28px; }
.why-lede { margin-bottom: 28px; max-width: 48ch; }
.shift-h { max-width: 18ch; }
.shift-lede { margin-block: 14px 32px; max-width: 54ch; }
.shift .data { margin-top: 10px; }
.respond { margin-top: clamp(32px, 5vw, 56px); }
.respond h3 { font-size: var(--step1); line-height: 1.3; }
.respond p { margin-top: 6px; }
.steps-inner-wrap { min-width: 0; }
.steps-compact { margin-top: 20px; }
.steps-compact > li { padding-block: 12px; grid-template-columns: 2.25rem minmax(0, 1fr); }
.steps-compact > li::before { font-size: 1rem; }
.steps-compact p { margin-top: 0; }
.here-inline { margin-left: 10px; vertical-align: middle; font-weight: 400; letter-spacing: 0; }
.founder { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: start; }
.monogram { display: grid; place-items: center; width: 72px; height: 72px; background: var(--psyon-petrol); color: #fff; border-radius: var(--radius); font: 500 1.375rem var(--mono); }
.founder h3 { font-size: var(--step1); line-height: 1.3; }
.founder .data { margin-block: 2px 8px; }
.cat-note { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--psyon-mist); }
.cta-text { margin-top: 14px; max-width: 48ch; }
.cta-actions { margin-top: 24px; }
.stroop-h { font-size: var(--step2); margin-bottom: 14px; }
.prose-list { display: grid; gap: 10px; padding-left: 1.15em; list-style: disc; }
.stroop-side .sub-h { margin-bottom: 12px; }
.read-out { margin-top: 14px; }
.read-note { margin-top: 8px; }
.form-small { margin-top: 12px; }
.form-grid + .form-status { margin-top: 16px; }
.lost-lede { margin-top: 18px; max-width: 42ch; }
.export-note { margin-top: 10px; }
