/* ==========================================================================
   LockedIn Flow — shared component library (loads after assets/shell.css)
   Precision-engineering aesthetic: graphite surfaces, hairlines, mono
   annotations, spectrum colour only on the live signal. Every page uses
   these classes; page stylesheets add layout and one-off figures.
   Breakpoints: 640 / 960 / 1280.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 880px; }
.wrap--prose { max-width: 760px; }

.visually-hidden, .sr {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.sec { position: relative; padding: var(--sec) 0; }
.sec--tight { padding: var(--sec-sm) 0; }
.sec--flush { padding-top: 0; }
.sec--line { border-top: 1px solid var(--line); }

.stack > * + * { margin-top: var(--s5); }
.stack--sm > * + * { margin-top: var(--s3); }
.stack--lg > * + * { margin-top: var(--s7); }

/* --------------------------------------------------------------------------
   Type helpers
   -------------------------------------------------------------------------- */
.mono {
  font-family: var(--font-mono); font-size: var(--fs-mono); font-weight: 500;
  letter-spacing: var(--tracking-mono); text-transform: uppercase; color: var(--t3); line-height: 1.5;
}
.mono b { color: var(--t1); font-weight: 500; }
.steel { color: var(--steel); }
.muted { color: var(--t3); }
.lede { font-size: var(--fs-lede); line-height: 1.5; color: var(--t2); max-width: 56ch; text-wrap: pretty; }
.lede b { color: var(--t1); font-weight: 600; }
.small { font-size: var(--fs-small); color: var(--t3); line-height: 1.55; }
.display { font-size: var(--fs-display); line-height: .94; letter-spacing: var(--tracking-display); font-weight: 650; }
.two-tone { display: block; color: var(--t3); font-weight: 600; font-size: .42em; letter-spacing: -0.035em; line-height: 1.08; margin-top: .42em; max-width: 30ch; }

kbd {
  font-family: var(--font-mono); font-size: .9em; letter-spacing: 0; color: var(--t1);
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 6px; padding: .08em .45em; white-space: nowrap;
}
code { font-size: .92em; color: var(--t1); background: rgba(135, 158, 184, .12); border-radius: 5px; padding: .08em .4em; }
pre { font-size: 13px; line-height: 1.7; color: #CBD2DB; overflow-x: auto; white-space: pre; }
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

/* --------------------------------------------------------------------------
   Eyebrow, section header, page hero
   -------------------------------------------------------------------------- */
.eyebrow {
  display: flex; align-items: center; gap: 14px; margin-bottom: 22px;
  font-family: var(--font-mono); font-size: var(--fs-mono); font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--steel); line-height: 1.4;
}
.eyebrow .idx { color: var(--t1); padding: 3px 7px; border: 1px solid var(--line-strong); border-radius: var(--r-xs); letter-spacing: .08em; }
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line); max-width: 160px; }
.eyebrow--plain::after { display: none; }

.sec__head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px); align-items: end; margin-bottom: clamp(40px, 5.5vw, 72px);
}
.sec__head--one { grid-template-columns: 1fr; max-width: 760px; }
.sec__head .lede { margin-top: 4px; }
.sec__head--one .lede { margin-top: 20px; }
.sec__head h2 { max-width: 16ch; }

.page-hero { position: relative; padding: clamp(48px, 7vw, 104px) 0 clamp(40px, 5vw, 72px); overflow: hidden; }
.page-hero h1 { max-width: 14ch; }
.page-hero .lede { margin-top: 26px; }
.page-hero .ctas { margin-top: 32px; }
.page-hero--center { text-align: center; }
.page-hero--center h1, .page-hero--center .lede { margin-inline: auto; }
.page-hero--center .eyebrow { justify-content: center; }
.page-hero--center .eyebrow::after { display: none; }
.page-hero--center .ctas { justify-content: center; }

/* --------------------------------------------------------------------------
   Buttons and links
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent; text-decoration: none;
  transition: transform var(--dur-1) var(--ease), background var(--dur-1) ease, border-color var(--dur-1) ease, box-shadow var(--dur-1) ease, color var(--dur-1) ease;
}
.btn--primary { background: #F5F6F8; color: #08090C; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 12px 32px -14px rgba(255, 255, 255, .35); }
.btn--primary:hover { background: #fff; color: #08090C; transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 16px 36px -14px rgba(255, 255, 255, .45); }
.btn--ghost { color: var(--t1); border-color: var(--line-strong); background: rgba(14, 16, 20, .6); }
.btn--ghost:hover { border-color: rgba(135, 158, 184, .7); background: rgba(27, 31, 38, .8); color: var(--t1); }
.btn--sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn .arr { transition: transform var(--dur-1) var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn:active { transform: translateY(0) scale(.99); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.link {
  color: var(--t1); font-weight: 600; display: inline-flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; transition: border-color var(--dur-1) ease;
}
.link:hover { border-color: #fff; color: var(--t1); }
.link .arr { transition: transform var(--dur-1) var(--ease); }
.link:hover .arr { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Badges and pills
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 9px;
  border: 1px solid var(--line-strong); border-radius: var(--r-xs);
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--t2);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--steel); }
.badge--ok::before { background: var(--success); }
.badge--warn::before { background: var(--warning); }
.badge--plain::before { display: none; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px;
  border-radius: var(--r-pill); border: 1px solid var(--line); background: rgba(14, 16, 20, .7);
  font-size: 13px; font-weight: 500; color: var(--t2);
}
.pills { display: flex; flex-wrap: wrap; gap: 8px; }

/* spec line: dotted mono facts */
.specline { display: flex; flex-wrap: wrap; gap: 10px 22px; font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--t3); }
.specline span::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--steel); margin-right: 9px; vertical-align: middle; opacity: .9; }

/* --------------------------------------------------------------------------
   Grid and cards
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: clamp(16px, 2.2vw, 28px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.grid--split-wide { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 64px); align-items: start; }

.card {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(14, 16, 20, .75), rgba(8, 9, 12, .25));
  box-shadow: var(--sh-card); padding: clamp(22px, 2.4vw, 30px);
}
.card--flat { background: none; box-shadow: none; }
.card--raised { background: var(--raised); border-color: var(--line-strong); }
.card__k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--steel); margin-bottom: 16px; }
.card h3 { margin-bottom: 8px; }
:where(.card) p { font-size: 15px; color: var(--t2); }
:where(.card) p + p { margin-top: 10px; }
.card .fig { margin-top: 18px; }

/* rule-list: hairline bullets */
.rules { display: grid; gap: 8px; }
.rules li { position: relative; padding-left: 16px; font-size: 14px; color: var(--t2); line-height: 1.5; }
.rules li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 1px; background: var(--steel); }
.rules b { color: var(--t1); }

/* numbered list for processes */
.steps { display: grid; gap: 18px; counter-reset: step; }
.steps li { position: relative; padding-left: 40px; counter-increment: step; font-size: 15px; color: var(--t2); }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: .2em; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; color: var(--steel); }
.steps li b { display: block; color: var(--t1); margin-bottom: 2px; }

/* --------------------------------------------------------------------------
   Datasheet (definition rows) and tables
   -------------------------------------------------------------------------- */
.sheet { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: linear-gradient(180deg, rgba(14, 16, 20, .5), rgba(8, 9, 12, .2)); }
.sheet__h {
  display: flex; justify-content: space-between; gap: 16px; padding: 12px 18px;
  border-bottom: 1px solid var(--line); background: rgba(14, 16, 20, .6);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--t3);
}
.sheet__h b { color: var(--t1); font-weight: 500; }
.sheet__h .ok { color: var(--success); }
.sheet dl { margin: 0; }
.sheet .r { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line-faint); align-items: baseline; }
.sheet .r:first-child { border-top: 0; }
.sheet dt { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
.sheet dd { font-size: 14.5px; color: var(--t2); line-height: 1.5; }
.sheet dd b { color: var(--t1); font-weight: 600; }
.sheet pre { margin: 0; padding: 18px 20px; font-size: 12.5px; line-height: 1.75; background: #0B0D11; }
.sheet pre:focus-visible { outline-offset: -3px; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.sheet pre .k { color: var(--steel); }
.sheet pre .m { color: var(--t3); }
.sheet pre .g { color: var(--success); }

.table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.table-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: auto; background: rgba(14, 16, 20, .3); }
.table-wrap .table { border: 0; border-radius: 0; }
.table th, .table td { padding: 13px 16px; text-align: left; vertical-align: top; font-size: 14.5px; line-height: 1.5; border-top: 1px solid var(--line-faint); }
.table th { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--t3); font-weight: 500; background: rgba(14, 16, 20, .6); border-top: 0; border-bottom: 1px solid var(--line); }
.table tbody th { color: var(--t1); font-family: var(--font-sans); font-size: 14.5px; letter-spacing: -0.01em; text-transform: none; background: none; border-bottom: 0; border-top: 1px solid var(--line-faint); font-weight: 600; }
.table td b { color: var(--t1); }
.table .ok { color: var(--success); }
.table .no { color: var(--t3); }

/* --------------------------------------------------------------------------
   Callouts and CTA band
   -------------------------------------------------------------------------- */
.callout {
  position: relative; padding: 18px 20px 18px 22px; border: 1px solid var(--line); border-radius: var(--r);
  background: rgba(14, 16, 20, .6); font-size: 15px; color: var(--t2);
}
.callout::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: var(--steel); }
.callout--ok::before { background: var(--success); }
.callout--warn::before { background: var(--warning); }
.callout--signal::before { background: var(--spectrum-v); }
.callout b { color: var(--t1); }
.callout .mono { margin-bottom: 8px; display: block; }

.cta-band {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: center;
  background: linear-gradient(180deg, rgba(14, 16, 20, .8), rgba(8, 9, 12, .3)); box-shadow: var(--sh-card); overflow: hidden;
}
.cta-band::after { content: ""; position: absolute; left: 50%; bottom: -120px; width: 70%; height: 220px; transform: translateX(-50%); background: var(--spill); filter: blur(24px); opacity: .55; pointer-events: none; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2, .cta-band h3 { font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -0.03em; line-height: 1.15; }
:where(.cta-band) p { margin-top: 10px; color: var(--t2); font-size: 15.5px; max-width: 56ch; }

/* --------------------------------------------------------------------------
   FAQ (native details)
   -------------------------------------------------------------------------- */
.faq { max-width: 860px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 0; font-size: 18px; font-weight: 600; color: var(--t1); letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::marker { content: ""; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  background: linear-gradient(var(--steel), var(--steel)) center / 12px 1px no-repeat, linear-gradient(var(--steel), var(--steel)) center / 1px 12px no-repeat;
  transition: transform var(--dur-2) var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 0 24px; max-width: var(--measure); color: var(--t2); font-size: 15.5px; line-height: 1.6; }
.faq .a p + p { margin-top: 10px; }
.faq .a a { color: var(--t1); border-bottom: 1px solid var(--line-strong); }

/* --------------------------------------------------------------------------
   Prose: legal pages, guides, long articles
   -------------------------------------------------------------------------- */
.prose { max-width: var(--measure); color: var(--t2); font-size: 16.5px; line-height: 1.65; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(24px, 2.4vw, 32px); margin-top: 2.2em; line-height: 1.15; }
.prose h3 { font-size: 20px; margin-top: 1.8em; }
.prose h4 { margin-top: 1.5em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .7em; }
.prose p b, .prose li b { color: var(--t1); }
.prose a { color: var(--t1); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; transition: text-decoration-color var(--dur-1) ease; }
.prose a:hover { text-decoration-color: #fff; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--steel); }
.prose blockquote { padding: 4px 0 4px 20px; border-left: 2px solid var(--steel); color: var(--t2); font-style: italic; }
.prose pre { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: #0B0D11; }
.prose hr { margin: 2.5em 0; }
.prose figure { margin: 2em 0; }
.prose .table-wrap { margin: 1.6em 0; }
.prose dl div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-faint); }
.prose dt { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--steel); padding-top: 4px; }
.prose dd { margin: 0; }
.prose .meta { font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--t3); }

/* table of contents (use an <ol>, never a nav element) */
.toc { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; font-size: 14px; }
.toc .mono { margin-bottom: 10px; display: block; }
.toc ol { display: grid; gap: 6px; }
.toc a { color: var(--t2); }
.toc a:hover { color: var(--t1); }

/* --------------------------------------------------------------------------
   Forms (Netlify forms keep their names and fields)
   -------------------------------------------------------------------------- */
.form { display: grid; gap: 18px; }
.form__row { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 7px; }
.field > label, .field__label { font-size: 13.5px; font-weight: 600; color: var(--t1); letter-spacing: -0.005em; }
.field .hint { font-size: 13px; color: var(--t3); }
.field input[type="text"], .field input[type="email"], .field input[type="number"], .field select, .field textarea, .input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: rgba(14, 16, 20, .8); color: var(--t1);
  font-size: 15px; transition: border-color var(--dur-1) ease, box-shadow var(--dur-1) ease;
  -webkit-appearance: none; appearance: none;
}
.field textarea { height: auto; min-height: 140px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.field select {
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--t2) 50%), linear-gradient(135deg, var(--t2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: rgba(255, 255, 255, .8); box-shadow: 0 0 0 3px rgba(135, 158, 184, .25); }
.field input::placeholder, .field textarea::placeholder { color: var(--t3); }
.checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--t2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: #F5F6F8; }
.form .honeypot, .honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding-top: 6px; }
.form__actions .small { margin: 0; }
.form button[type="submit"] { min-width: 200px; }

/* --------------------------------------------------------------------------
   Figures
   -------------------------------------------------------------------------- */
.fig { position: relative; }
.fig__cap, figcaption.mono { margin-top: 14px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--t3); line-height: 1.6; }
.fig__cap b, figcaption.mono b { color: var(--t1); font-weight: 500; }
.fig--panel { border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 2.6vw, 32px); background: linear-gradient(180deg, rgba(14, 16, 20, .7), rgba(8, 9, 12, .3)); }
.fig--lit { position: relative; isolation: isolate; }
.fig--lit::before { content: ""; position: absolute; left: 50%; bottom: -10%; width: 80%; height: 60%; transform: translateX(-50%); background: var(--spill); filter: blur(30px); opacity: .7; z-index: -1; pointer-events: none; }

/* hairline instrument grid and rulers */
.gridbg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--line-ghost) 1px, transparent 1px), linear-gradient(90deg, var(--line-ghost) 1px, transparent 1px);
  background-size: 48px 48px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 50% 10%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 90% at 50% 10%, #000 30%, transparent 100%);
}
.gridbg--center { -webkit-mask-image: radial-gradient(ellipse 60% 80% at 50% 60%, #000 20%, transparent 100%); mask-image: radial-gradient(ellipse 60% 80% at 50% 60%, #000 20%, transparent 100%); }
.ruler {
  position: relative; height: 12px; border-top: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 60px) 0 0 / 100% 12px no-repeat,
              repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 12px) 0 6px / 100% 6px no-repeat;
}
.ruler--b {
  border-top: 0; border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 60px) 0 0 / 100% 12px no-repeat,
              repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 12px) 0 0 / 100% 6px no-repeat;
}

/* --------------------------------------------------------------------------
   The five-bar signal mark (FlowSignalMark 0.42/0.70/1/0.70/0.42)
   Set --mark-w (default 38px). Height follows width (1:2).
   -------------------------------------------------------------------------- */
.sigmark { --mark-w: 38px; display: inline-flex; align-items: center; justify-content: center; gap: calc(var(--mark-w) * .055); width: var(--mark-w); height: calc(var(--mark-w) / 2); }
.sigmark i { width: calc((var(--mark-w) - 4 * var(--mark-w) * .055) / 5); height: 42%; border-radius: var(--r-pill); background: var(--spectrum); background-size: var(--mark-w) 100%; }
.sigmark i:nth-child(1) { background-position: 0 0; }
.sigmark i:nth-child(2), .sigmark i:nth-child(4) { height: 70%; }
.sigmark i:nth-child(2) { background-position: calc(var(--mark-w) * -.21) 0; }
.sigmark i:nth-child(3) { height: 100%; background-position: calc(var(--mark-w) * -.42) 0; }
.sigmark i:nth-child(4) { background-position: calc(var(--mark-w) * -.63) 0; }
.sigmark i:nth-child(5) { background-position: calc(var(--mark-w) * -.84) 0; }
.sigmark--glow { filter: drop-shadow(0 0 6px rgba(82, 107, 255, .55)); }

/* app icon image (masked WebP) */
.appicon { border-radius: 22.5%; }
.appicon--glow { filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .7)) drop-shadow(0 0 40px rgba(82, 107, 255, .35)); }

/* --------------------------------------------------------------------------
   Product mocks. All sizes are em-scaled: 1em = 10 pt at the design width.
   Wrap a mock in a container (.mock-c) so the em scale follows the width.
   -------------------------------------------------------------------------- */
.mock { font-family: var(--font-sans); letter-spacing: 0; line-height: 1.25; -webkit-font-smoothing: antialiased; }
.mock-c { container-type: inline-size; width: 100%; }

/* macOS window chrome: light (.win) or dark (.win--dark). Design width via --win-w (default 620). */
.win {
  --win-w: 620; font-size: calc(100cqw / var(--win-w) * 10);
  width: 100%; border-radius: 1.2em; overflow: hidden; position: relative;
  background: var(--w-canvas); color: var(--w-t1); color-scheme: light; box-shadow: var(--sh-win);
}
.win__tb {
  height: 2.8em; display: flex; align-items: center; justify-content: center; position: relative;
  background: linear-gradient(#F7F7F9, #ECEDF0); border-bottom: .1em solid rgba(0, 0, 0, .09);
  font-size: 1.3em; font-weight: 500; color: #5A606A;
}
.win__tb i { position: absolute; top: 50%; transform: translateY(-50%); width: .92em; height: .92em; border-radius: 50%; box-shadow: inset 0 0 0 .04em rgba(0, 0, 0, .14); }
.win__tb i:nth-child(1) { left: 1em; background: #FF5F57; }
.win__tb i:nth-child(2) { left: 2.35em; background: #FEBC2E; }
.win__tb i:nth-child(3) { left: 3.7em; background: #28C840; }
.win--dark { background: #1C1C1E; color: #E5E5EA; color-scheme: dark; box-shadow: var(--sh-win); }
.win--dark .win__tb { background: linear-gradient(#2E2E31, #28282B); border-bottom-color: rgba(0, 0, 0, .5); color: #C9C9CE; }
.win--dark .win__tb i { box-shadow: inset 0 0 0 .04em rgba(0, 0, 0, .3); }
.win--editor { background: #0B0D11; color: #CBD2DB; color-scheme: dark; box-shadow: 0 0 0 1px rgba(135, 158, 184, .25), 0 30px 60px -30px rgba(0, 0, 0, .9); }
.win--editor .win__tb { background: #10131A; border-bottom-color: rgba(135, 158, 184, .14); color: var(--t3); font-family: var(--font-mono); font-size: 1.1em; }
.win--editor .win__tb i { background: #2A3038; box-shadow: none; }

/* --- Home window (HomeView.swift) --- */
.home { --win-w: 620; }
.home__hd {
  height: 10.4em; padding: 2em 2.8em; display: flex; align-items: center; gap: 1.7em; position: relative; color: var(--t1);
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 50%, rgba(0, 0, 0, .18)), radial-gradient(circle 26em at 12% 4%, rgba(255, 255, 255, .085), transparent), linear-gradient(135deg, #0E1014 0%, #08090C 55%, #050709 100%);
}
.home__hd::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: rgba(255, 255, 255, .08); }
.home__hd::after { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: rgba(255, 255, 255, .11); }
.home__icon { width: 6.4em; height: 6.4em; border-radius: 1.6em; flex: none; box-shadow: 0 0 0 .08em rgba(255, 255, 255, .16), 0 .9em 1.8em rgba(0, 0, 0, .42), 0 .2em .3em rgba(0, 0, 0, .30); }
.home__title { font-size: 2em; font-weight: 600; color: rgba(255, 255, 255, .96); letter-spacing: -0.01em; line-height: 1.2; }
.home__tag { font-size: 1.25em; font-weight: 500; color: #B2BAC4; margin-top: .3em; }
.home__body { padding: 2.6em 2.8em 2.2em; }
.deck {
  position: relative; height: 14.4em; border-radius: 2em; color: rgba(255, 255, 255, .96); overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), transparent 50%, rgba(0, 0, 0, .15)), radial-gradient(circle 26em at 12% 4%, rgba(255, 255, 255, .085), transparent), linear-gradient(135deg, #08090C 0%, #08090C 50%, #050709 100%);
  box-shadow: inset 0 0 0 .1em rgba(255, 255, 255, .16), inset 0 0 0 .2em rgba(255, 255, 255, .09), 0 .8em 3.6em rgba(0, 0, 0, .25), 0 .2em .6em rgba(0, 0, 0, .18);
}
.deck::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, rgba(112, 112, 214, .22), transparent 18%); -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000); -webkit-mask-composite: xor; mask-composite: exclude; padding: .1em; }
.deck__body { height: 11em; display: flex; align-items: center; gap: 1.7em; padding: 0 2.2em; }
.deck__mic { width: 4.8em; height: 4.8em; border-radius: 50%; background: rgba(255, 255, 255, .10); box-shadow: inset 0 0 0 .08em rgba(255, 255, 255, .18); display: grid; place-items: center; flex: none; }
.deck__mic svg { width: 1.8em; height: 1.8em; color: rgba(255, 255, 255, .96); }
.deck__t { font-size: 1.6em; font-weight: 600; letter-spacing: -0.005em; white-space: nowrap; }
.deck__d { font-size: 1.25em; color: #B2BAC4; margin-top: .4em; white-space: nowrap; }
.deck__r { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: .7em; flex: none; }
.deck__r .sigmark { --mark-w: 5.8em; height: 3em; }
.deck__r .sigmark i { width: .9em; }
.deck__r .sigmark i:nth-child(1), .deck__r .sigmark i:nth-child(5) { height: .7em; }
.deck__r .sigmark i:nth-child(2), .deck__r .sigmark i:nth-child(4) { height: 1.1em; }
.deck__r .sigmark i:nth-child(3) { height: 1.7em; }
.deck__kbd { font-family: var(--font-mono); font-size: 1.05em; font-weight: 600; color: #7D8794; letter-spacing: .02em; }
.rail { display: flex; align-items: center; gap: .8em; padding: 0 2.2em; height: 2em; }
.rail__n { display: flex; align-items: center; gap: .6em; font-size: 1.05em; font-weight: 600; color: #7D8794; white-space: nowrap; }
.rail__n b { position: relative; width: 1.9em; height: 1.9em; border-radius: 50%; background: rgba(27, 31, 38, .78); box-shadow: inset 0 0 0 .07em rgba(255, 255, 255, .14); display: grid; place-items: center; flex: none; }
.rail__n b svg { width: 1em; height: 1em; color: rgba(255, 255, 255, .96); }
.rail__n b svg + svg { position: absolute; inset: 0; margin: auto; opacity: 0; }
.rail__n--active { color: rgba(255, 255, 255, .96); }
.rail__n--active b { background: var(--spectrum); box-shadow: inset 0 0 0 .12em rgba(255, 255, 255, .72); }
.rail__n--active b svg { color: #08090C; }
.rail__n--done { color: #B2BAC4; }
.rail__n--done b { background: #252C35; box-shadow: inset 0 0 0 .07em rgba(135, 158, 184, .38); }
.rail__n--done b svg:first-child { opacity: 0; }
.rail__n--done b svg + svg { opacity: 1; }
.rail__l { flex: 1; height: .1em; background: rgba(255, 255, 255, .11); border-radius: 1em; }
.rail__l--reached { background: rgba(135, 158, 184, .62); }
.recents { display: flex; align-items: center; justify-content: space-between; margin: 2.4em 0 1.1em; }
.recents h4 { margin: 0; font-size: 1.7em; font-weight: 600; color: var(--w-t1); letter-spacing: -0.01em; }
.recents span { font-size: 1.2em; font-weight: 600; color: var(--w-action); }
.rcard { background: var(--w-surface); border-radius: 1.7em; overflow: hidden; box-shadow: 0 0 0 .08em var(--w-line), inset 0 0 0 .08em rgba(255, 255, 255, .78), 0 .5em 2.8em rgba(0, 0, 0, .075), 0 .1em .4em rgba(0, 0, 0, .055); }
.row { display: flex; align-items: flex-start; gap: 1.4em; padding: 1.5em 1.7em; }
.row + .row { border-top: 1px solid var(--w-line); }
.row__t { font-size: 1.35em; font-weight: 500; color: var(--w-t1); line-height: 1.3; }
.row__m { font-size: 1.05em; font-weight: 500; color: var(--w-t3); margin-top: .6em; }
.row__m em { font-style: normal; color: var(--w-success); }
.row__a { margin-left: auto; display: flex; gap: .6em; flex: none; }
.row__a b { width: 3em; height: 3em; border-radius: 50%; background: var(--w-raised); display: grid; place-items: center; }
.row__a b svg { width: 1.1em; height: 1.1em; color: var(--w-t2); }
.home__ft { display: flex; align-items: center; justify-content: space-between; margin-top: 2.4em; padding: 0 .3em; color: var(--w-t3); font-size: 1.15em; font-weight: 500; }
.home__ft span:first-child { display: flex; align-items: center; gap: .7em; }
.home__ft svg { width: 1.1em; height: 1.1em; }
.home__ft small { font-size: .92em; }

/* --- Floating bar (Overlay.swift): 300×68 active, 134×42 idle. 1em = 10 pt of the 300 design width. --- */
.fbar-c { container-type: inline-size; width: 100%; }
.fbar {
  font-size: calc(100cqw / 30); width: 30em; height: 6.8em; border-radius: 1.8em; position: relative;
  display: flex; align-items: center; gap: 1em; padding: 0 1em; color: rgba(255, 255, 255, .96);
  background: rgba(14, 16, 20, .92); -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: var(--sh-bar);
}
.fbar::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(ellipse 60% 70% at 50% 110%, rgba(82, 107, 255, .16), transparent 70%); }
.fbar__x { width: 3em; height: 3em; border-radius: 50%; background: #1B1F26; box-shadow: inset 0 0 0 .07em rgba(135, 158, 184, .22); display: grid; place-items: center; flex: none; }
.fbar__x svg { width: .95em; height: .95em; color: #B2BAC4; }
.fbar__mid { flex: 1; display: flex; flex-direction: column; gap: .5em; min-width: 0; }
.fbar__row { display: flex; align-items: center; justify-content: space-between; gap: .7em; }
.fbar__label { font-size: 1.05em; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.fbar__time { font-family: var(--font-mono); font-size: .95em; font-weight: 500; color: #7D8794; }
.fbar__ok { width: 3.4em; height: 3.4em; border-radius: 50%; background: rgba(255, 255, 255, .96); display: grid; place-items: center; box-shadow: 0 .2em .6em rgba(0, 0, 0, .34); flex: none; }
.fbar__ok svg { width: 1.1em; height: 1.1em; color: #08090C; }
/* working: spinner, grey label, sliding line, dim mark */
.fbar__spin { width: 2.4em; height: 2.4em; flex: none; display: grid; place-items: center; }
.fbar__spin::before { content: ""; width: 1.4em; height: 1.4em; border-radius: 50%; border: .2em solid rgba(135, 158, 184, .25); border-top-color: #879EB8; animation: fbar-spin .9s linear infinite; }
.fbar--work .fbar__label { color: #B2BAC4; }
.fbar__ind { position: relative; height: .4em; border-radius: .2em; background: rgba(135, 158, 184, .22); overflow: hidden; }
.fbar__ind::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 32%; border-radius: .2em; background: #879EB8; animation: fbar-ind 1s ease-in-out infinite alternate; }
.fbar__mark { flex: none; opacity: .55; }
.fbar__mark .sigmark { --mark-w: 2.4em; }
.fbar--done .fbar__mark { opacity: .9; }
/* done: green check disc, green label, green line */
.fbar__okd { width: 2.4em; height: 2.4em; border-radius: 50%; background: rgba(79, 232, 176, .12); display: grid; place-items: center; flex: none; }
.fbar__okd svg { width: 1.2em; height: 1.2em; color: #4FE8B0; }
.fbar--done .fbar__label { color: #4FE8B0; }
.fbar__doneline { height: .3em; border-radius: .2em; background: rgba(79, 232, 176, .24); }
@keyframes fbar-spin { to { transform: rotate(360deg); } }
@keyframes fbar-ind { from { transform: translateX(0); } to { transform: translateX(212.5%); } } /* 68% of the track: the indicator is 32% wide */

/* 25-bar LevelMeter: one spectrum gradient across the meter, opacity ramps old → new.
   Each bar sets --i (0–24) and --h (height in em of the bar's own scale). */
.meter { display: flex; align-items: center; gap: .22em; height: 1.9em; filter: drop-shadow(0 0 .25em rgba(82, 107, 255, .45)); }
.meter i { flex: 1; height: var(--h, .4em); border-radius: 1em; background: var(--spectrum); background-size: 19.6em 100%; background-position: calc(var(--i) * -.795em) 0; opacity: calc(.28 + .72 * var(--i) / 24); }
.meter--live i { animation: meter-wave 2.4s linear infinite; animation-delay: calc((24 - var(--i)) * .05s - 2.4s); }

/* Idle handle 134×42 (same em scale as the bar) */
.handle { font-size: calc(100cqw / 30); width: 13.4em; height: 4.2em; border-radius: 1.4em; display: flex; align-items: center; gap: .3em; padding: .3em; background: rgba(14, 16, 20, .92); box-shadow: inset 0 0 0 .07em rgba(135, 158, 184, .22), 0 .4em 1.2em rgba(0, 0, 0, .35); color: #fff; }
.handle__main { height: 3.6em; flex: 1; border-radius: .9em; background: rgba(37, 44, 53, .3); display: flex; align-items: center; gap: 1em; padding: 0 .5em; }
.handle__mic { width: 2.6em; height: 2.6em; border-radius: 50%; background: #252C35; box-shadow: inset 0 0 0 .07em rgba(135, 158, 184, .38); display: grid; place-items: center; flex: none; }
.handle__mic svg { width: 1.1em; height: 1.1em; color: #fff; }
.handle .sigmark { --mark-w: 3.8em; }
.handle__hist { width: 3em; height: 3.4em; display: grid; place-items: center; }
.handle__hist svg { width: 1em; height: 1em; color: #B2BAC4; }

/* keycaps */
.keys { display: flex; gap: 8px; align-items: center; }
.key {
  height: 52px; min-width: 52px; padding: 0 14px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 15px; color: var(--t1);
  background: linear-gradient(180deg, #252C35, #1B1F26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(135, 158, 184, .3), 0 4px 0 #0A0C10, 0 8px 16px -6px rgba(0, 0, 0, .8);
}
.key--space { min-width: 120px; }
.keys .plus { color: var(--t3); font-family: var(--font-mono); }

/* --------------------------------------------------------------------------
   Reveal on scroll (progressive; static fallback is simply visible)
   -------------------------------------------------------------------------- */
/* .rv is a hook for page-level entrance motion; content is always visible without it. */
.rv { opacity: 1; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1280px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .grid--3 { grid-template-columns: 1fr; }
  .grid--split, .grid--split-wide { grid-template-columns: 1fr; }
  .sec__head { grid-template-columns: 1fr; gap: 16px; }
  .sec__head .lede { margin-top: 8px; }
  .cta-band { grid-template-columns: 1fr; }
  .sheet .r { grid-template-columns: 118px 1fr; }
}
@media (max-width: 640px) {
  .grid--2, .grid--4 { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .btn { width: 100%; white-space: normal; height: auto; min-height: 48px; padding-block: 12px; text-align: center; line-height: 1.3; }
  .btn--sm { min-height: 40px; padding-block: 9px; }
  .ctas { flex-direction: column; align-items: stretch; }
  .ctas .link { align-self: flex-start; }
  .eyebrow::after { max-width: 80px; }
  .specline { gap: 8px 16px; }
  .sheet .r { grid-template-columns: 1fr; gap: 4px; }
  .prose dl div { grid-template-columns: 1fr; gap: 4px; }
  .table th, .table td { padding: 11px 12px; font-size: 14px; }
  .faq summary { font-size: 17px; padding: 18px 0; }
  .two-tone { max-width: none; }
  .form button[type="submit"] { width: 100%; }
}

/* --------------------------------------------------------------------------
   Reduced motion: no loops, no slides; composed states stay visible
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .meter--live i { animation: none !important; height: var(--h); }
  .fbar__spin::before { animation: none !important; }
  .fbar__ind::after { animation: none !important; left: 34%; }
}

/* generated 48-step speech envelope: bars scroll right→left via per-bar negative delays */
@keyframes meter-wave { 0% { height: 1.02em; } 2.083% { height: 1.133em; } 4.167% { height: .967em; } 6.25% { height: 1.02em; } 8.333% { height: 1.386em; } 10.417% { height: 1.159em; } 12.5% { height: 1.121em; } 14.583% { height: 1.509em; } 16.667% { height: 1.21em; } 18.75% { height: 1.039em; } 20.833% { height: .876em; } 22.917% { height: .69em; } 25% { height: 1.443em; } 27.083% { height: 1.61em; } 29.167% { height: 1.312em; } 31.25% { height: 1.067em; } 33.333% { height: .869em; } 35.417% { height: .744em; } 37.5% { height: 1.55em; } 39.583% { height: 1.196em; } 41.667% { height: 1.008em; } 43.75% { height: .782em; } 45.833% { height: .614em; } 47.917% { height: .533em; } 50% { height: 1.509em; } 52.083% { height: 1.142em; } 54.167% { height: 1.229em; } 56.25% { height: 1.022em; } 58.333% { height: .863em; } 60.417% { height: 1.073em; } 62.5% { height: 1.614em; } 64.583% { height: 1.31em; } 66.667% { height: 1.099em; } 68.75% { height: .865em; } 70.833% { height: .686em; } 72.917% { height: .57em; } 75% { height: 1.189em; } 77.083% { height: 1.598em; } 79.167% { height: 1.208em; } 81.25% { height: .99em; } 83.333% { height: 1.095em; } 85.417% { height: .88em; } 87.5% { height: 1.31em; } 89.583% { height: 1.123em; } 91.667% { height: .927em; } 93.75% { height: .772em; } 95.833% { height: .555em; } 97.917% { height: .617em; } 100% { height: 1.02em; } }
