/* ECEUH product site, September 25 2026. Warm paper, oversized native type,
   floating capsule navigation, one big phone, broad color fields. System fonts
   only; every asset is same-origin. */
:root {
  --paper: #f4f2ec;
  --paper-deep: #ebe8e0;
  --white: #ffffff;
  --ink: #1a1712;
  --muted: #5f5b55;
  --line: #dcd8cf;
  --line-strong: #c4bfb4;
  --red: #c8102e;
  --red-deep: #a30c25;
  --red-bright: #e5203a;
  --rose: #fbe9ec;
  --lav: #e6ecfb;
  --lav-deep: #c9d4f3;
  --blue: #3a4fc9;
  --charcoal: #141414;
  --charcoal-text: #b9b5ad;
  --wrap: 1320px;
  --pad: clamp(20px, 4vw, 48px);
  --r: 22px;
  --r-lg: 32px;
  --r-pill: 100px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --section: clamp(72px, 12vh, 160px);
  /* Names shared with tokens.css so the four public pages read one palette. */
  --site-black: #f4f2ec;
  --site-ink: #1a1712;
  --site-muted: #5f5b55;
  --site-rule: #dcd8cf;
  --site-panel: #ffffff;
  --site-scarlet-text: #c8102e;
  --site-measure: 68ch;
  --site-gutter: clamp(20px, 4vw, 48px);
}
*, *::before, *::after { box-sizing: border-box; }
html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 104px;
  background: var(--paper);
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--site-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--red); color: #fff; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input { font: inherit; }
button, a, input, summary { touch-action: manipulation; }
button { cursor: pointer; }
a { color: var(--red); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; border-radius: 6px; }
[hidden] { display: none !important; }
p { margin: 0; }
h1, h2, h3 {
  margin: 0;
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.skip {
  position: absolute; top: -100px; left: 20px; z-index: 40;
  padding: 12px 18px; background: var(--ink); color: #fff; border-radius: 8px; font-weight: 600;
}
.skip:focus { top: 14px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.arrow { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Eyebrow, lede, buttons */
.eyebrow {
  display: block;
  margin-bottom: 18px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue);
}
.lede { font-size: clamp(1.0625rem, 1.2vw, 1.25rem); line-height: 1.5; color: var(--muted); max-width: 46ch; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 54px; padding: 0 28px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-pill);
  background: transparent; color: var(--ink);
  font-size: .9375rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.button:hover { border-color: var(--ink); }
.button.primary { background: var(--red); border-color: var(--red); color: #fff; }
.button.primary:hover { background: var(--red-deep); border-color: var(--red-deep); }
.text-action {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0;
  border: 0; background: none; color: var(--red); font-size: .9375rem; font-weight: 650; text-decoration: none;
  justify-self: start;
}
.text-action:hover { text-decoration: underline; text-underline-offset: 5px; }

/* Floating capsule navigation */
.site-header { position: sticky; top: 0; z-index: 30; padding: 16px 20px 0; pointer-events: none; }
.site-header .wrap {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 68px; padding: 8px 10px 8px 18px;
  background: rgba(250, 249, 245, .82);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(26, 23, 18, .08);
  border-radius: var(--r-pill);
  box-shadow: 0 10px 30px -18px rgba(26, 23, 18, .35);
}
.brand {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; min-width: 44px;
  color: var(--ink); text-decoration: none; font-size: 1.125rem; font-weight: 700; letter-spacing: -.02em;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.site-nav ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  color: var(--muted); font-size: .9375rem; font-weight: 550; text-decoration: none; border-radius: var(--r-pill);
}
.site-nav a:hover, .site-nav a[aria-current=page] { color: var(--ink); }
.site-nav .nav-download {
  margin-left: 8px; padding: 0 22px; min-height: 48px;
  background: var(--red); color: #fff; font-weight: 650;
}
.site-nav .nav-download:hover { background: var(--red-deep); color: #fff; }

/* Hero */
.hero { position: relative; padding: clamp(40px, 8vh, 96px) 0 clamp(72px, 8vw, 96px); }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: 48px; align-items: center;
}
.hero-copy { display: grid; gap: 28px; justify-items: start; }
.hero h1 { font-size: clamp(2.9rem, 5.5vw, 4.9rem); line-height: 1; max-width: 12ch; }
.hero .lede { max-width: 42ch; }
.hero-links { display: flex; flex-wrap: wrap; gap: 12px; }
.availability { font-size: .8125rem; color: var(--muted); }
.availability span { margin: 0 8px; }
.hero-device { position: relative; justify-self: center; width: min(100%, 420px); }
.device-frame {
  padding: 11px; background: #161616; border-radius: 62px;
  box-shadow: 0 0 0 1.5px #3b3b3b, 0 60px 90px -40px rgba(26, 23, 18, .55);
}
.device-frame img { width: 100%; border-radius: 51px; background: #000; aspect-ratio: 600 / 1305; }
.device-frame::before {
  content: ""; position: absolute; top: 22px; left: 50%; width: 112px; height: 32px;
  translate: -50% 0; background: #161616; border-radius: 20px; z-index: 1;
}
.hero-note { text-align: center; margin-top: 18px; font-size: .8125rem; color: var(--muted); }

/* Cinematic scene */
.scene { padding: 0 0 var(--section); }
.scene figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--r-lg); background: #141220; }
.scene img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.scene figcaption {
  position: absolute; inset: auto 0 0 0; padding: clamp(28px, 5vw, 64px);
  background: linear-gradient(0deg, rgba(10, 8, 16, .72), rgba(10, 8, 16, 0));
  color: #fff;
}
.scene figcaption p { max-width: 24ch; font-size: clamp(1.5rem, 2.8vw, 2.5rem); font-weight: 650; letter-spacing: -.035em; line-height: 1.08; }

/* Story sections */
.story { padding: 0 0 var(--section); }
.story h2 { font-size: clamp(2.5rem, 6vw, 5.5rem); max-width: 12ch; }
.story.centered { text-align: center; }
.story.centered h2, .story.centered .lede { margin-inline: auto; }
.story.centered .eyebrow { margin-bottom: 22px; }
.story.centered .lede { margin-top: 26px; max-width: 52ch; }
.spread { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; margin-top: 44px; }
.field {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  display: flex; justify-content: center; align-items: flex-start;
}
.field.red { background: var(--red); }
.field.lav { background: var(--lav); }
.field.paper { background: var(--paper-deep); }
.field-phone {
  width: 62%; max-width: 360px; margin-top: clamp(36px, 6vw, 72px);
  padding: 8px; background: #161616; border-radius: 46px;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .22), 0 40px 70px -35px rgba(0, 0, 0, .7);
}
.field-phone img { width: 100%; border-radius: 39px; background: #000; aspect-ratio: 600 / 1305; }
.spread .field { aspect-ratio: 5 / 4; }
.spread .field .field-phone { margin-bottom: -40%; }
.copy { display: grid; gap: 22px; }
.copy p { color: var(--muted); font-size: clamp(1rem, 1.15vw, 1.125rem); line-height: 1.6; max-width: 46ch; }
.copy h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; color: var(--muted); font-size: .9375rem; }
.ticks li { display: flex; align-items: center; gap: 12px; }
.tick { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--red); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* White inset panel (circuits) */
.panel {
  margin-top: 44px; padding: clamp(28px, 5vw, 64px);
  background: var(--white); border-radius: var(--r-lg);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: center;
}
.panel h3 { font-size: clamp(2.25rem, 4.2vw, 4rem); line-height: 1.04; }
.panel h3 em { font-style: normal; color: var(--red); }
.panel .field { aspect-ratio: 4 / 3; }
.panel .field .field-phone { width: 54%; margin-top: 32px; margin-bottom: -60%; }

/* Centered device scene (flashcards) */
.stage { margin: 44px auto 0; max-width: 900px; aspect-ratio: 9 / 5; }
.stage .field-phone { width: 42%; max-width: 300px; margin-top: 56px; margin-bottom: -50%; }

/* Interactive preview section shell */
.lab-section { padding: 0 0 var(--section); scroll-margin-top: 90px; }
.lab-section h2 { font-size: clamp(2.5rem, 6vw, 5.5rem); max-width: 14ch; }
.lab-section .lede { margin-top: 24px; }
.lab-caption { margin: 20px auto 0; text-align: center; font-size: .8125rem; color: var(--muted); max-width: 60ch; }

/* Statement, privacy, chips */
.statement { padding: 0 0 var(--section); }
.statement p {
  max-width: 24ch; font-size: clamp(1.75rem, 3.8vw, 3.5rem); font-weight: 650; letter-spacing: -.04em; line-height: 1.1;
}
.statement em { font-style: normal; color: var(--red); }
.privacy-brief { padding: 0 0 var(--section); }
.privacy-brief .wrap { max-width: 1120px; }
.privacy-brief h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
.privacy-brief p { margin-top: 18px; max-width: 30ch; font-size: clamp(1.5rem, 3vw, 2.75rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.15; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0 0; padding: 0; list-style: none; }
.chips li { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border: 1px solid var(--line); border-radius: var(--r-pill); background: #fff; font-size: .8125rem; font-weight: 600; }
.chips li.needs { border-style: dashed; }
.privacy-brief .text-action { margin-top: 28px; }

/* Availability */
.offer { padding: 0 0 var(--section); text-align: center; }
.offer h2 { font-size: clamp(2.2rem, 4.5vw, 4rem); margin-inline: auto; max-width: 14ch; }
.offer-card {
  min-width: 0; margin: 44px auto 0; max-width: 960px; padding: clamp(28px, 4vw, 48px);
  background: #fff; border: 1.5px solid var(--red); border-radius: var(--r-lg); text-align: left;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px;
}
.offer-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.offer-head h3 { font-size: 1.5rem; letter-spacing: -.03em; }
.offer-head strong { font-size: clamp(2rem, 3vw, 2.75rem); font-weight: 700; letter-spacing: -.04em; }
.offer-head strong small { font-size: .875rem; font-weight: 500; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.offer p { color: var(--muted); font-size: .9375rem; }
.offer .ticks { margin-top: 20px; }
.offer .ticks strong { color: var(--ink); font-weight: 600; }
.offer-card > * { min-width: 0; }
.offer-side { display: grid; gap: 14px; align-content: start; min-width: 0; padding: 24px; background: var(--paper); border-radius: var(--r); }
.offer-side dl { margin: 0; display: grid; gap: 12px; min-width: 0; }
.offer-side dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.offer-side dd { margin: 0 0 6px; min-width: 0; font-weight: 600; }
.offer-side .button { width: 100%; min-width: 0; margin-top: 8px; padding-inline: 16px; white-space: normal; text-align: center; }
.offer-note { text-align: center; margin-top: 20px; font-size: .8125rem; color: var(--muted); }

/* FAQ */
.faq-section { padding: 0 0 var(--section); }
.faq-section .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.faq-section h2 { font-size: clamp(2.2rem, 4.5vw, 4rem); }
.faq-list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 66px; padding: 14px 0; list-style: none; cursor: pointer;
  font-size: 1.0625rem; font-weight: 600;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; font-size: 1.5rem; font-weight: 400; color: var(--red); }
details[open] summary::after { content: "\2212"; }
details > div { display: grid; gap: 12px; padding: 0 24px 22px 0; color: var(--muted); font-size: .9375rem; }
details > div p { max-width: 60ch; }

/* Download close and footer */
.close {
  margin-top: 8px; padding: clamp(80px, 12vh, 150px) 0 40px;
  background: var(--charcoal); color: #fff;
  border-radius: clamp(28px, 4vw, 48px) clamp(28px, 4vw, 48px) 0 0;
}
.close .wrap { display: grid; justify-items: center; gap: 28px; text-align: center; }
.close h2 { font-size: clamp(2.6rem, 6.6vw, 6.25rem); color: var(--red-bright); max-width: 14ch; }
.close h2 img { display: inline-block; width: .82em; height: .82em; vertical-align: -.08em; border-radius: .2em; margin-right: .12em; }
.close .button.primary { background: #fff; border-color: #fff; color: var(--ink); min-height: 56px; padding: 0 32px; }
.close .button.primary:hover { background: var(--paper); border-color: var(--paper); }
.close .availability { color: var(--charcoal-text); }
.site-footer { background: var(--charcoal); color: var(--charcoal-text); padding: 48px 0 32px; }
.site-footer .wrap { display: grid; gap: 20px; padding-top: 28px; border-top: 1px solid #2b2b2b; }
.site-footer .brand { color: #fff; font-size: 1rem; }
.site-footer p { font-size: .8125rem; margin-top: 8px; max-width: 50ch; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: #fff; font-size: .875rem; text-decoration: none; border-radius: var(--r-pill); }
.site-footer a:hover { text-decoration: underline; }

/* Documents: support, privacy, 404 */
.doc { padding: 48px 0 100px; }
.doc .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
.toc h2 { font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); margin-bottom: 8px; }
.toc ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0 12px; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; color: var(--ink); font-size: .9375rem; text-decoration: none; }
.toc a:hover { color: var(--red); }
.prose { display: grid; gap: 18px; min-width: 0; font-size: 1.0625rem; }
.doc-head { display: grid; gap: 18px; padding: clamp(20px, 4vw, 48px); background: #fff; border-radius: var(--r-lg); }
.doc-head h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
.doc-head .lede { max-width: 60ch; }
.prose h2 { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); font-size: clamp(1.75rem, 3vw, 2.5rem); scroll-margin-top: 100px; }
.prose h3 { margin-top: 12px; font-size: 1.25rem; letter-spacing: -.02em; }
.prose p, .prose li { max-width: 70ch; color: var(--ink); }
.prose ul, .prose ol { margin: 0; padding-left: 22px; }
.prose li + li { margin-top: 7px; }
.prose details { max-width: 70ch; }
.callout { padding: 20px 24px; background: #fff; border-radius: var(--r); max-width: 70ch; border-left: 3px solid var(--red); }
.muted { color: var(--muted); }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .9375rem; }
caption { text-align: left; color: var(--muted); padding-bottom: 14px; }
th, td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 600; }
td { color: var(--muted); }
.lost { min-height: 60vh; padding: 80px 0 120px; }
.lost .wrap { display: grid; gap: 24px; justify-items: start; }
.lost h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
.lost .lede { max-width: 52ch; }
.lost p { max-width: 60ch; }
.more { margin-top: 24px; }

/* Motion: one hero arrival, bounded scroll-linked devices, gentle section reveals. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .button, .seg button, .site-nav a { transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
  .button:active, .nav-download:active { transform: scale(.97); }
  .hero-copy > * { animation: rise .9s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .hero-device { animation: device-arrive 1.2s var(--ease) both; animation-delay: .1s; }
  .site-header .wrap { animation: nav-drop .7s var(--ease) both; }
  .reveal.is-visible { animation: reveal-in .9s var(--ease); }
  @keyframes reveal-in { from { opacity: .85; translate: 0 20px; } to { opacity: 1; translate: 0 0; } }
  @keyframes rise { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
  @keyframes device-arrive { from { opacity: 0; translate: 0 80px; scale: .96; } to { opacity: 1; translate: 0 0; scale: 1; } }
  @keyframes nav-drop { from { opacity: 0; translate: 0 -16px; } to { opacity: 1; translate: 0 0; } }
}

/* Wide layouts */
@media (min-width: 700px) {
  .spread { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(40px, 6vw, 96px); }
  .spread.flip .field { order: 2; }
  .panel { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); }
  .offer-card { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
  .site-footer .wrap { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .doc .wrap { grid-template-columns: 220px minmax(0, 1fr); gap: 56px; }
  .toc { position: sticky; top: 104px; }
  .toc ul { display: grid; gap: 0; }
}
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 4vw, 72px); align-items: start; }
  .hero-copy { padding-top: clamp(24px, 6vh, 80px); }
  .hero-device { justify-self: end; }
  .faq-section .wrap { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 72px; align-items: start; }
}
@media (max-width: 899px) {
  .site-nav li.nav-secondary { display: none; }
  .hero h1 br { display: none; }
}
@media (max-width: 560px) {
  .site-header { padding: 12px 12px 0; }
  .site-header .wrap { min-height: 60px; padding: 6px 6px 6px 14px; }
  .site-nav a { padding: 0 10px; font-size: .875rem; }
  .site-nav .nav-download { padding: 0 16px; min-height: 44px; margin-left: 4px; }
  .hero { padding-top: 36px; padding-bottom: 48px; }
  .hero h1 { font-size: clamp(2.6rem, 12vw, 3.2rem); max-width: none; }
  .hero-copy { gap: 22px; }
  .hero-links { width: 100%; }
  .hero-links .button { flex: 1 1 100%; }
  .device-frame { padding: 8px; border-radius: 44px; }
  .device-frame img { border-radius: 36px; }
  .device-frame::before { width: 84px; height: 24px; top: 16px; }
  .scene figcaption p { font-size: 1.25rem; }
  .field-phone { width: 66%; border-radius: 32px; padding: 6px; }
  .field-phone img { border-radius: 26px; }
  .spread .field { aspect-ratio: 1; }
  .panel .field .field-phone, .stage .field-phone { width: 60%; }
  .stage { aspect-ratio: 1; }
  .chips li { min-height: 38px; padding: 0 14px; font-size: .75rem; }
  .offer-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .close .button.primary { width: 100%; }
  .site-footer a:first-child { padding-left: 0; }
}
@media (max-width: 380px) {
  .site-nav a { padding: 0 8px; font-size: .8125rem; }
  .brand span { display: none; }
  .hero h1 { font-size: 2.5rem; }
}

/* ── Live preview: a browser rebuild of the current app inside a device.
   Everything inside .screen is sized in --pt, one iOS point scaled to the
   frame width, so iPhone and iPad presentations share one layout. ── */
.live-demo { margin-top: 44px; padding: clamp(16px, 3vw, 40px); background: var(--white); border-radius: var(--r-lg); display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; justify-items: center; }
.live-demo > * { min-width: 0; max-width: 100%; }
.demo-controls { width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--paper); border-radius: var(--r-pill); max-width: 100%; min-width: 0; }
.seg button { flex: 1 1 auto; min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); font-size: .875rem; font-weight: 600; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed=true] { background: var(--red); color: #fff; }
.demo-foot { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.demo-status { font-size: .875rem; color: var(--muted); max-width: 48ch; }
.demo-status::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: var(--line-strong); vertical-align: middle; }
.touring .demo-status::before { background: var(--red); }
.demo-fallback { display: none; margin-top: 44px; padding: clamp(16px, 3vw, 40px); background: var(--white); border-radius: var(--r-lg); }
.demo-fallback p { color: var(--muted); }
.fallback-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 20px 0; }
.fallback-grid img { width: 100%; border-radius: 14px; background: #000; }
html:not(.js-enabled) .live-demo { display: none; }
html:not(.js-enabled) .demo-fallback { display: block; }

.device { width: min(100%, 390px); max-width: 100%; aspect-ratio: 390 / 844; padding: 10px; background: #161616; border-radius: 56px; box-shadow: 0 0 0 1.5px #3b3b3b, 0 40px 70px -35px rgba(26, 23, 18, .6); }
.live-demo[data-device=ipad] .device { width: min(100%, 780px); aspect-ratio: 3 / 4; padding: 14px; border-radius: 36px; }
.screen {
  /* One iOS point, scaled to the frame but never below .9px so type stays readable on phones; layouts inside are fluid and the screen scrolls. */
  --pt: max(calc(100cqw / 390), .9px);
  --bg: #000; --card: #1C1C1E; --raised: #2C2C2E; --text: #fff; --muted-t: #AEAEB2; --dim: #8E8E93;
  --accent: #EC1B34; --accent-fill: #D81B2E; --accent-text: #FF4357; --tint: rgba(236, 27, 52, .16);
  --bd: rgba(255, 255, 255, .1); --bd-strong: rgba(255, 255, 255, .16); --sep: rgba(255, 255, 255, .08);
  --tap: max(calc(44 * var(--pt)), 44px);
  position: relative; width: 100%; height: 100%; overflow: hidden;
  background: var(--bg); color: var(--text); border-radius: 46px;
  container-type: inline-size; font-family: var(--site-sans); line-height: 1.3; text-align: left;
}
.live-demo[data-device=ipad] .screen { --pt: max(calc(100cqw / 820), .9px); border-radius: 24px; }
.screen :where(*, *::before, *::after) { box-sizing: border-box; }
.screen :where(button, input, select) { font: inherit; color: inherit; }
.screen :where(button) { cursor: pointer; border: 0; background: none; padding: 0; text-align: left; border-radius: 0; }
.screen :focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: calc(6 * var(--pt)); }
.scr:focus-visible { outline-offset: -3px; }
.screen :where(h4, h5) { margin: 0; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; text-wrap: initial; }
.screen :where(p) { margin: 0; max-width: none; }
.screen :where(svg) { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.statusbar { position: absolute; top: 0; left: 0; right: 0; height: calc(44 * var(--pt)); padding: calc(12 * var(--pt)) calc(30 * var(--pt)) 0; display: flex; justify-content: space-between; align-items: flex-start; font-size: calc(16 * var(--pt)); font-weight: 600; z-index: 3; }
.battery { width: calc(26 * var(--pt)); height: calc(12 * var(--pt)); border: 1.5px solid #fff; border-radius: calc(4 * var(--pt)); position: relative; margin-top: calc(3 * var(--pt)); }
.battery::after { content: ""; position: absolute; inset: 1.5px; right: 30%; background: #34D399; border-radius: 2px; }
.scr { position: absolute; top: calc(44 * var(--pt)); bottom: 0; left: 0; right: 0; overflow-y: auto; overscroll-behavior: contain; padding: calc(8 * var(--pt)) calc(16 * var(--pt)) calc(120 * var(--pt)); scrollbar-width: thin; scrollbar-color: #3a3a3c transparent; }
.scr > * { max-width: calc(600 * var(--pt)); margin-left: auto; margin-right: auto; }
.scr :where(.hm-body, .hm-results, .rs-head, .rs-next, .rs-form, .rs-pagewrap, .dl-panel, .dl-section, .dl-groups, .fc-study, .fc-complete, .dt-body) { grid-template-columns: minmax(0, 1fr); }
.scr :where(.hm-body, .rs-form, .dl-panel, .dl-section) > * { min-width: 0; }
.live-demo[data-device=ipad] .scr { top: calc(104 * var(--pt)); padding-bottom: calc(32 * var(--pt)); }
.tabbar { position: absolute; left: calc(32 * var(--pt)); right: calc(32 * var(--pt)); bottom: calc(14 * var(--pt)); height: max(calc(80 * var(--pt)), 56px); padding: calc(6 * var(--pt)); display: flex; justify-content: space-between; background: rgba(28, 28, 30, .92); border-radius: 999px; z-index: 2; }
.tabbar button { flex: 1; min-width: 44px; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(4 * var(--pt)); color: var(--text); font-size: max(calc(11 * var(--pt)), 9px); font-weight: 600; border-radius: 999px; }
.tabbar svg { width: calc(26 * var(--pt)); height: calc(26 * var(--pt)); }
.tabbar button[aria-current=page] { color: var(--accent); background: rgba(255, 255, 255, .08); }
.live-demo[data-device=ipad] .tabbar { top: calc(50 * var(--pt)); bottom: auto; left: 50%; right: auto; translate: -50% 0; width: max-content; max-width: calc(100% - 32px); height: calc(46 * var(--pt)); padding: calc(4 * var(--pt)); gap: calc(2 * var(--pt)); }
.live-demo[data-device=ipad] .tabbar button { flex-direction: row; gap: calc(6 * var(--pt)); padding: 0 calc(14 * var(--pt)); font-size: calc(14 * var(--pt)); }
.live-demo[data-device=ipad] .tabbar svg { width: calc(18 * var(--pt)); height: calc(18 * var(--pt)); }
.live-demo[data-device=ipad] .tabbar button { min-width: 44px; min-height: 44px; }
@container (max-width: 560px) {
  .live-demo[data-device=ipad] .tabbar button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .live-demo[data-device=ipad] .tabbar button { padding: 0 calc(10 * var(--pt)); }
}
.navbar { display: grid; grid-template-columns: var(--tap) 1fr var(--tap); align-items: center; min-height: calc(56 * var(--pt)); margin-bottom: calc(8 * var(--pt)); }
.nav-back { width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: 50%; background: var(--card); }
.nav-back svg { width: calc(22 * var(--pt)); height: calc(22 * var(--pt)); stroke-width: 2.2; }
.nav-title { text-align: center; font-size: calc(17 * var(--pt)); font-weight: 600; }
.chev { color: var(--muted-t); font-size: calc(22 * var(--pt)); line-height: 1; flex: none; }
.tile { width: var(--tap); height: var(--tap); flex: none; border-radius: calc(12 * var(--pt)); display: grid; place-items: center; background: var(--raised); }
.tile::before { content: ""; width: 42%; height: 42%; border-radius: 3px; background: #fff; }
.tile.icon-map { background: var(--accent); }
.tile.icon-chat { background: #3B82F6; }
.tile.icon-chat::before { border-radius: 40% 40% 40% 0; }
.tile.icon-lab::before { background: var(--accent); border-radius: 2px; box-shadow: inset 0 0 0 2px #fff; }
.tile.icon-cards::before { border-radius: 2px; box-shadow: 3px 3px 0 #8E8E93; }
.tile.icon-resume::before { width: 34%; height: 46%; }
.tile.icon-people::before, .tile.icon-star::before { border-radius: 50%; }
.tile.icon-brief::before, .tile.icon-books::before, .tile.icon-cal::before, .tile.icon-gear::before { border-radius: 3px; width: 46%; height: 36%; }

/* Home */
.hm-top { display: flex; gap: calc(4 * var(--pt)); align-items: center; margin-bottom: calc(16 * var(--pt)); }
.hm-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: calc(10 * var(--pt)); min-height: calc(48 * var(--pt)); padding-left: calc(14 * var(--pt)); background: var(--card); border: 1px solid var(--bd); border-radius: calc(14 * var(--pt)); }
.hm-search:focus-within { border-color: rgba(236, 27, 52, .34); box-shadow: inset 0 0 0 .5px rgba(236, 27, 52, .34); }
.hm-search svg { width: calc(20 * var(--pt)); height: calc(20 * var(--pt)); color: var(--muted-t); flex: none; }
.hm-search input { flex: 1; min-width: 0; min-height: var(--tap); background: none; border: 0; outline: 0; font-size: max(calc(17 * var(--pt)), 16px); color: var(--text); -webkit-appearance: none; appearance: none; }
.hm-search input::placeholder { color: var(--muted-t); }
.hm-search input::-webkit-search-cancel-button { display: none; }
#hm-clear { width: var(--tap); height: var(--tap); display: grid; place-items: center; color: var(--muted-t); }
#hm-clear svg { width: calc(20 * var(--pt)); height: calc(20 * var(--pt)); }
.hm-gear { flex: none; width: var(--tap); height: var(--tap); display: grid; place-items: center; color: var(--muted-t); }
.hm-gear svg { width: calc(26 * var(--pt)); height: calc(26 * var(--pt)); }
.hm-body { display: grid; gap: calc(16 * var(--pt)); }
.searching .hm-body { display: none; }
.hm-results { display: grid; gap: calc(8 * var(--pt)); }
.hm-count { font-size: calc(12 * var(--pt)); font-weight: 600; color: var(--muted-t); padding-left: calc(2 * var(--pt)); }
.hm-none { color: var(--muted-t); font-size: calc(15 * var(--pt)); padding: calc(24 * var(--pt)) 0; text-align: center; }
.hm-result, .hm-row, .hm-event { width: 100%; display: flex; align-items: center; gap: calc(12 * var(--pt)); min-height: calc(64 * var(--pt)); padding: calc(10 * var(--pt)) calc(16 * var(--pt)); color: var(--text); }
.hm-result { background: var(--card); border: 1px solid var(--bd); border-radius: calc(14 * var(--pt)); }
.hm-result:active, .hm-row:active, .hm-event:active { background: var(--raised); }
.hm-rt { flex: 1; min-width: 0; display: grid; gap: calc(2 * var(--pt)); }
.hm-rt strong { font-size: calc(17 * var(--pt)); font-weight: 600; }
.hm-rt small { font-size: calc(15 * var(--pt)); color: var(--muted-t); }
.hm-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: calc(12 * var(--pt)); }
.hm-tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: calc(28 * var(--pt)); min-height: calc(176 * var(--pt)); padding: calc(16 * var(--pt)); border-radius: calc(18 * var(--pt)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 8px 14px -6px rgba(0, 0, 0, .5); background-image: linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 50%); }
.hm-tile.red { background-color: #520C18; background-image: linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 50%), linear-gradient(135deg, #A8182E, #520C18, #130307); }
.hm-tile.blue { background-color: #143A86; background-image: linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 50%), linear-gradient(135deg, #2A5FCF, #143A86, #070F22); }
.hm-tile:active { box-shadow: inset 0 0 0 999px rgba(255, 255, 255, .14); }
.hm-tile .chev { position: absolute; top: calc(12 * var(--pt)); right: calc(14 * var(--pt)); color: rgba(255, 255, 255, .8); }
.tile-text { display: grid; gap: calc(3 * var(--pt)); }
.tile-text strong { font-size: calc(17 * var(--pt)); font-weight: 600; }
.tile-text span { font-size: calc(15 * var(--pt)); color: rgba(255, 255, 255, .85); }
.tile-text small { font-size: calc(13 * var(--pt)); color: rgba(255, 255, 255, .8); }
.tile-art { position: relative; display: block; width: calc(60 * var(--pt)); height: calc(56 * var(--pt)); }
.tile-art.doc::before { content: ""; position: absolute; left: calc(16 * var(--pt)); top: calc(4 * var(--pt)); width: calc(38 * var(--pt)); height: calc(50 * var(--pt)); border-radius: calc(5 * var(--pt)); background: rgba(255, 255, 255, .22); rotate: 10deg; }
.tile-art.doc::after { content: ""; position: absolute; left: 0; top: 0; width: calc(38 * var(--pt)); height: calc(50 * var(--pt)); border-radius: calc(5 * var(--pt)); background: #fff; box-shadow: 0 4px 6px rgba(0, 0, 0, .3); }
.tile-art.doc i { position: absolute; z-index: 1; left: calc(6 * var(--pt)); height: calc(2 * var(--pt)); border-radius: 2px; background: #C7C7CC; }
.tile-art.doc i:nth-child(1) { top: calc(6 * var(--pt)); width: calc(18 * var(--pt)); height: calc(4 * var(--pt)); background: #C8102E; }
.tile-art.doc i:nth-child(2) { top: calc(14 * var(--pt)); width: calc(26 * var(--pt)); }
.tile-art.doc i:nth-child(3) { top: calc(20 * var(--pt)); width: calc(22 * var(--pt)); box-shadow: 0 calc(7 * var(--pt)) 0 #C7C7CC, 0 calc(13 * var(--pt)) 0 #C7C7CC; }
.tile-art.marks { display: flex; align-items: flex-start; }
.tile-art.marks img { width: calc(48 * var(--pt)); height: calc(48 * var(--pt)); margin-right: calc(-16 * var(--pt)); padding: calc(2 * var(--pt)); border-radius: calc(18 * var(--pt)); background: #143A86; box-shadow: 0 4px 6px rgba(0, 0, 0, .3); object-fit: cover; object-position: center top; position: relative; }
.tile-art.marks img:nth-child(1) { z-index: 3; }
.tile-art.marks img:nth-child(2) { z-index: 2; }
.hm-group { display: grid; background: var(--card); border-radius: calc(18 * var(--pt)); overflow: hidden; }
.hm-row + .hm-row, .hm-event + .hm-event { box-shadow: inset 0 1px 0 var(--sep); }
.hm-row .chev.ext { font-size: calc(17 * var(--pt)); }
.hm-section { display: flex; justify-content: space-between; align-items: baseline; margin-top: calc(12 * var(--pt)); }
.hm-section h4 { font-size: calc(22 * var(--pt)); font-weight: 700; }
.hm-section h4 small { margin-left: calc(8 * var(--pt)); padding: calc(2 * var(--pt)) calc(8 * var(--pt)); border-radius: 999px; background: var(--raised); color: var(--muted-t); font-size: calc(11 * var(--pt)); font-weight: 600; vertical-align: middle; }
.hm-link { min-height: var(--tap); padding: 0 calc(4 * var(--pt)); color: var(--accent-text); font-size: calc(17 * var(--pt)); font-weight: 600; }
.ev-date { flex: none; width: calc(48 * var(--pt)); display: grid; justify-items: center; text-align: center; }
.ev-date small { font-size: calc(10 * var(--pt)); font-weight: 700; text-transform: uppercase; color: var(--accent-text); letter-spacing: .04em; }
.ev-date strong { font-size: calc(18 * var(--pt)); font-weight: 700; }
.hm-event .hm-rt small + small { font-size: calc(13 * var(--pt)); }

/* Resume path */
.scr-resume { --bg: #050506; --card: #151518; --line: #2A2A30; background: var(--bg); }
.rs-head { display: grid; gap: calc(8 * var(--pt)); margin-bottom: calc(22 * var(--pt)); }
.rs-head h4 { font-family: ui-rounded, var(--site-sans); font-size: calc(34 * var(--pt)); font-weight: 700; letter-spacing: -.01em; }
.rs-count { font-size: calc(17 * var(--pt)); font-weight: 600; color: var(--accent); }
.rs-caps { display: flex; gap: calc(4 * var(--pt)); }
.rs-caps i { flex: 1; height: calc(6 * var(--pt)); border-radius: 999px; background: var(--line); }
.rs-caps i.done { background: var(--accent); }
.rs-next { display: grid; gap: calc(8 * var(--pt)); padding: calc(20 * var(--pt)); margin-bottom: calc(22 * var(--pt)); border-radius: calc(28 * var(--pt)); background: linear-gradient(135deg, rgba(236, 27, 52, .28), #151518); box-shadow: inset 0 0 0 1px rgba(236, 27, 52, .35); }
.rs-kicker { font-size: calc(13 * var(--pt)); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-text); }
.rs-next strong { font-size: calc(28 * var(--pt)); font-weight: 700; letter-spacing: -.02em; }
.rs-next > span:not(.rs-kicker) { font-size: calc(17 * var(--pt)); color: var(--muted-t); }
.rs-cta { display: flex; align-items: center; justify-content: center; gap: calc(10 * var(--pt)); min-height: max(calc(52 * var(--pt)), 44px); margin-top: calc(8 * var(--pt)); border-radius: calc(14 * var(--pt)); background: var(--accent-fill); color: #fff; font-size: calc(17 * var(--pt)); font-weight: 600; }
.rs-cta svg { width: calc(20 * var(--pt)); height: calc(20 * var(--pt)); stroke-width: 2.2; }
.rs-list { list-style: none; margin: 0 0 calc(22 * var(--pt)); padding: 0; display: grid; }
.ms > button, .ms > div { width: 100%; display: grid; grid-template-columns: calc(30 * var(--pt)) 1fr; gap: calc(14 * var(--pt)); align-items: start; min-height: var(--tap); color: var(--text); }
.ms-mark { position: relative; width: calc(30 * var(--pt)); height: calc(30 * var(--pt)); display: grid; place-items: center; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); }
.ms-mark svg { display: none; width: calc(14 * var(--pt)); height: calc(14 * var(--pt)); stroke: #fff; stroke-width: 3; }
.ms-num { font-size: calc(12 * var(--pt)); font-weight: 700; color: var(--muted-t); }
.ms:not(:last-child) .ms-mark::after { content: ""; position: absolute; top: 100%; left: 50%; width: 2px; height: calc(28 * var(--pt)); translate: -50% 0; background: var(--line); }
.ms.done .ms-mark { background: var(--accent-fill); box-shadow: none; }
.ms.done .ms-mark svg { display: block; }
.ms.done .ms-num { display: none; }
.ms.done:not(:last-child) .ms-mark::after { background: rgba(236, 27, 52, .6); }
.ms.next .ms-mark { box-shadow: inset 0 0 0 2px var(--accent); }
.ms.next .ms-num { color: var(--accent-text); }
.ms-body { display: grid; gap: calc(3 * var(--pt)); padding-bottom: calc(14 * var(--pt)); }
.ms-title { font-size: calc(17 * var(--pt)); font-weight: 600; color: var(--muted-t); }
.ms.done .ms-title, .ms.next .ms-title { color: var(--text); }
.ms-title small { margin-left: calc(6 * var(--pt)); font-size: calc(11 * var(--pt)); font-weight: 600; color: var(--dim); }
.ms-detail { font-size: calc(13 * var(--pt)); color: var(--muted-t); }
.rs-form, .rs-pagewrap { display: grid; gap: calc(10 * var(--pt)); padding: calc(16 * var(--pt)); margin-bottom: calc(16 * var(--pt)); background: var(--card); border-radius: calc(14 * var(--pt)); }
.rs-form h5, .rs-pagewrap h5, .dt-body h4 { font-size: calc(13 * var(--pt)); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-t); }
.rs-form label { display: grid; gap: calc(4 * var(--pt)); }
.rs-form label span { font-size: calc(13 * var(--pt)); color: var(--muted-t); }
.rs-form input { min-height: var(--tap); padding: 0 calc(12 * var(--pt)); border-radius: calc(10 * var(--pt)); border: 1px solid var(--bd-strong); background: var(--raised); font-size: max(calc(17 * var(--pt)), 16px); color: var(--text); }
.rs-form input:focus { outline: 0; border: 2px solid var(--accent); }
.rs-form input::placeholder { color: var(--dim); }
.rs-form-actions { display: flex; gap: calc(10 * var(--pt)); }
.rs-form-actions button { flex: 1; min-height: var(--tap); border-radius: calc(10 * var(--pt)); background: var(--raised); text-align: center; font-size: calc(15 * var(--pt)); font-weight: 600; }
.rs-form-actions button:first-child { background: var(--accent-fill); }
.rs-note, .rs-checks, .rs-status { font-size: calc(13 * var(--pt)); color: var(--muted-t); }
.rs-checks { margin: calc(4 * var(--pt)) 0 calc(12 * var(--pt)); }
.rs-page { position: relative; aspect-ratio: 8.5 / 11; padding: 8% 9%; background: #fff; color: #111; border-radius: calc(4 * var(--pt)); display: grid; align-content: start; gap: 2.2%; font-size: calc(9 * var(--pt)); box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.rs-page strong { font-size: 2.2em; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.rs-pg-line { color: #48484A; line-height: 1.3; }
.rs-pg-line.b { color: #111; font-weight: 600; }
.rs-pg-h { margin-top: 5%; padding-bottom: 2%; border-bottom: 1px solid #C8102E; font-size: .9em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #C8102E; }
.rs-pg-rule { display: block; height: 3%; margin-top: 2%; border-radius: 2px; background: #E5E5EA; }
.rs-pg-rule.short { width: 70%; }
.rs-page.empty strong, .rs-page.empty .rs-pg-line { color: #C7C7CC; }

/* Digital Logic lab */
.dl-intro { font-size: calc(17 * var(--pt)); color: var(--muted-t); margin-bottom: calc(16 * var(--pt)); }
.dl-panel { display: grid; gap: calc(12 * var(--pt)); padding: calc(16 * var(--pt)); margin-bottom: calc(16 * var(--pt)); background: var(--card); border-radius: calc(18 * var(--pt)); }
.dl-section { display: grid; gap: calc(12 * var(--pt)); margin-bottom: calc(24 * var(--pt)); }
.dl-panel h5, .dl-section h5, .fc-complete h5 { font-size: calc(20 * var(--pt)); font-weight: 700; }
.dl-ph { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: calc(8 * var(--pt)) calc(12 * var(--pt)); }
.dl-ph select { min-height: var(--tap); padding: 0 calc(12 * var(--pt)); border-radius: calc(10 * var(--pt)); border: 1px solid var(--bd-strong); background: var(--raised); font-size: max(calc(15 * var(--pt)), 16px); font-weight: 600; }
.dl-muted { font-size: calc(15 * var(--pt)); color: var(--muted-t); }
.dl-muted.small { font-size: calc(13 * var(--pt)); }
.dl-expr { min-height: max(calc(48 * var(--pt)), 44px); padding: calc(12 * var(--pt)); border-radius: calc(10 * var(--pt)); border: 1px solid var(--bd-strong); background: var(--raised); font-family: var(--site-mono); font-size: max(calc(17 * var(--pt)), 16px); color: var(--text); width: 100%; }
.dl-expr:focus { outline: 0; border: 2px solid var(--accent); }
.dl-error { font-size: calc(15 * var(--pt)); color: var(--accent-text); }
.dl-expr[aria-invalid=true] { border: 2px solid var(--accent); }
.dl-primary, .fc-primary { display: flex; align-items: center; justify-content: center; gap: calc(8 * var(--pt)); width: 100%; min-height: max(calc(48 * var(--pt)), 44px); border-radius: calc(10 * var(--pt)); background: var(--accent-fill); color: #fff; font-size: calc(17 * var(--pt)); font-weight: 600; text-align: center; }
.dl-primary svg, .fc-primary svg, .fc-secondary svg { width: calc(18 * var(--pt)); height: calc(18 * var(--pt)); stroke-width: 2.2; }
.dl-syntax { font-family: var(--site-mono); font-size: calc(12 * var(--pt)); }
.dl-grid { display: grid; grid-template-columns: max(calc(34 * var(--pt)), 28px) repeat(4, max(calc(48 * var(--pt)), 44px)); gap: calc(4 * var(--pt)); justify-content: start; width: max-content; max-width: 100%; margin-inline: auto; overflow-x: auto; padding: calc(2 * var(--pt)) 0; font-family: var(--site-mono); }
.dl-label { display: grid; place-items: center; min-height: max(calc(48 * var(--pt)), 44px); font-size: calc(15 * var(--pt)); }
.dl-label.corner { font-size: calc(11 * var(--pt)); text-align: center; line-height: 1.1; }
.dl-cell { position: relative; display: grid; place-items: center; gap: calc(1 * var(--pt)); min-height: max(calc(48 * var(--pt)), 44px); border-radius: calc(8 * var(--pt)); background: var(--raised); box-shadow: inset 0 0 0 1px var(--bd-strong); color: var(--text); text-align: center; }
.dl-cell .v { font-family: var(--site-mono); font-size: calc(20 * var(--pt)); font-weight: 700; }
.dl-cell .m { font-family: var(--site-mono); font-size: calc(11 * var(--pt)); }
.dl-cell[data-value="1"] { background: var(--tint); }
.dl-cell[data-value=x] { box-shadow: inset 0 0 0 1px var(--bd-strong); background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, .06) 4px 8px); }
.dl-cell.sel { box-shadow: inset 0 0 0 2px #fff; background: var(--tint); }
.dl-text { min-height: max(calc(48 * var(--pt)), 44px); font-size: calc(15 * var(--pt)); font-weight: 600; color: var(--accent-text); }
.dl-sop { padding: calc(16 * var(--pt)) 0; border-bottom: 1px solid var(--sep); font-family: var(--site-mono); font-size: calc(22 * var(--pt)); font-weight: 600; letter-spacing: .04em; }
.dl-groups { display: grid; gap: calc(10 * var(--pt)); }
.dl-group { display: grid; gap: calc(6 * var(--pt)); width: 100%; padding: calc(12 * var(--pt)); border-radius: calc(10 * var(--pt)); background: var(--raised); box-shadow: inset 0 0 0 1px var(--bd); color: var(--text); }
.dl-group[aria-pressed=true] { box-shadow: inset 0 0 0 2px var(--accent); }
.dl-gh { display: flex; justify-content: space-between; align-items: center; gap: calc(8 * var(--pt)); }
.dl-gh strong { font-size: calc(17 * var(--pt)); font-weight: 600; }
.dl-check { width: calc(22 * var(--pt)); height: calc(22 * var(--pt)); flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--muted-t); }
.dl-group[aria-pressed=true] .dl-check { background: var(--accent); box-shadow: none; }
.dl-group[aria-pressed=true] .dl-check::after { content: ""; display: block; width: 35%; height: 55%; margin: 12% auto 0; border: solid #fff; border-width: 0 2px 2px 0; rotate: 45deg; }
.dl-group code { font-family: var(--site-mono); font-size: calc(12 * var(--pt)); color: var(--muted-t); }
.dl-group small { font-size: calc(15 * var(--pt)); color: var(--muted-t); }
.dl-inputs { display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(8 * var(--pt)); }
.dl-inputs button { display: grid; justify-items: center; gap: calc(6 * var(--pt)); min-height: var(--tap); padding: calc(10 * var(--pt)) calc(6 * var(--pt)); border-radius: calc(10 * var(--pt)); background: var(--raised); font-family: var(--site-mono); font-size: calc(17 * var(--pt)); font-weight: 700; }
.dl-inputs i { display: block; width: calc(44 * var(--pt)); height: calc(26 * var(--pt)); border-radius: 999px; background: #3A3A3C; position: relative; }
.dl-inputs i::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(26 * var(--pt) - 4px); height: calc(26 * var(--pt) - 4px); border-radius: 50%; background: #fff; }
.dl-inputs button[aria-pressed=true] i { background: var(--accent); }
.dl-inputs button[aria-pressed=true] i::after { left: auto; right: 2px; }
.dl-output { display: flex; align-items: center; gap: calc(10 * var(--pt)); font-size: calc(17 * var(--pt)); }
.dl-lamp { width: calc(18 * var(--pt)); height: calc(18 * var(--pt)); border-radius: 50%; box-shadow: inset 0 0 0 2px var(--muted-t); }
.dl-lamp.on { background: var(--accent); box-shadow: 0 0 0 3px rgba(236, 27, 52, .3); }

/* Flashcards */
.fc-study { display: grid; gap: calc(12 * var(--pt)); }
.fc-meta { display: flex; justify-content: space-between; font-size: calc(15 * var(--pt)); font-weight: 600; font-variant-numeric: tabular-nums; }
.fc-meta span + span { color: var(--muted-t); }
.fc-progress { width: 100%; height: calc(4 * var(--pt)); accent-color: var(--accent); border: 0; border-radius: 999px; overflow: hidden; background: var(--raised); -webkit-appearance: none; appearance: none; }
.fc-progress::-webkit-progress-bar { background: var(--raised); }
.fc-progress::-webkit-progress-value { background: var(--accent); }
.fc-progress::-moz-progress-bar { background: var(--accent); }
.fc-card { position: relative; margin-top: calc(24 * var(--pt)); padding-right: calc(16 * var(--pt)); padding-bottom: calc(20 * var(--pt)); }
.fc-card[data-after="1"] { padding-right: calc(8 * var(--pt)); padding-bottom: calc(10 * var(--pt)); }
.fc-card[data-after="0"] { padding-right: 0; padding-bottom: 0; }
.fc-card::before, .fc-card::after { content: ""; position: absolute; inset: 0 calc(16 * var(--pt)) calc(20 * var(--pt)) 0; border-radius: calc(6 * var(--pt)); box-shadow: inset 0 0 0 2px #fff; transform-origin: bottom left; z-index: 0; }
.fc-card::before { background: #3A3A3C; translate: calc(16 * var(--pt)) calc(20 * var(--pt)); rotate: 1.6deg; }
.fc-card::after { background: #636366; translate: calc(8 * var(--pt)) calc(10 * var(--pt)); rotate: .8deg; }
.fc-card[data-after="1"]::before, .fc-card[data-after="0"]::before, .fc-card[data-after="0"]::after { display: none; }
.fc-face { position: relative; z-index: 1; display: flex; flex-direction: column; gap: calc(18 * var(--pt)); width: 100%; min-height: calc(320 * var(--pt)); padding: calc(22 * var(--pt)); border-radius: calc(6 * var(--pt)); box-shadow: inset 0 0 0 2px #fff; text-align: left; }
.fc-q { background: #fff; color: #000; cursor: pointer; }
.fc-q:focus-visible { outline-color: #C8102E; }
.fc-kind { display: flex; align-items: center; gap: calc(6 * var(--pt)); font-size: calc(12 * var(--pt)); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #C8102E; }
.fc-kind svg { width: calc(16 * var(--pt)); height: calc(16 * var(--pt)); stroke-width: 2; }
.fc-prompt { font-size: calc(28 * var(--pt)); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.fc-foot { margin-top: auto; font-size: calc(15 * var(--pt)); color: #48484A; }
.fc-a { background: #1C1C1E; color: #fff; gap: calc(14 * var(--pt)); }
.fc-a .fc-kind { color: #FF4357; }
.fc-aprompt { font-size: calc(15 * var(--pt)); font-weight: 600; color: #C7C7CC; }
.fc-alabel { display: flex; align-items: center; gap: calc(8 * var(--pt)); font-size: calc(15 * var(--pt)); font-weight: 600; color: #C7C7CC; }
.fc-alabel svg, .fc-source svg { width: calc(18 * var(--pt)); height: calc(18 * var(--pt)); }
.fc-answer { font-size: calc(20 * var(--pt)); font-weight: 600; line-height: 1.3; white-space: pre-line; }
.fc-explain { font-size: calc(17 * var(--pt)); color: #D1D1D6; }
.fc-source { display: flex; align-items: center; gap: calc(8 * var(--pt)); min-height: calc(40 * var(--pt)); font-size: calc(15 * var(--pt)); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.fc-actions { margin-top: calc(24 * var(--pt)); }
.fc-primary, .fc-secondary { border-radius: calc(14 * var(--pt)); min-height: max(calc(50 * var(--pt)), 44px); }
.fc-rate { display: grid; gap: calc(12 * var(--pt)); }
.fc-rate p { font-size: calc(15 * var(--pt)); font-weight: 600; color: var(--muted-t); }
.fc-rate > div { display: flex; gap: calc(12 * var(--pt)); }
.fc-secondary { flex: 1; display: flex; align-items: center; justify-content: center; gap: calc(8 * var(--pt)); background: var(--raised); color: #fff; font-size: calc(17 * var(--pt)); font-weight: 600; }
.fc-rate .fc-primary { flex: 1; width: auto; }
.fc-complete { display: grid; gap: calc(14 * var(--pt)); padding-top: calc(16 * var(--pt)); }
.fc-complete p { font-size: calc(17 * var(--pt)); color: var(--muted-t); }

/* Preview detail */
.dt-body { display: grid; gap: calc(12 * var(--pt)); padding: calc(16 * var(--pt)); background: var(--card); border-radius: calc(18 * var(--pt)); }
.dt-body h4 { color: var(--text); text-transform: none; letter-spacing: -.02em; font-size: calc(28 * var(--pt)); font-weight: 700; }
.dt-body p { font-size: calc(17 * var(--pt)); color: var(--muted-t); }
.dt-note { font-size: calc(13 * var(--pt)); color: var(--dim); }

@media (prefers-reduced-motion: no-preference) {
  .scr.is-in { animation: scr-in .3s var(--ease); }
  .fc-card.flip .fc-face { animation: fc-flip .32s var(--ease); }
  .auto-press { animation: auto-press .18s ease-out; }
  .rs-caps i, .ms-mark, .dl-cell, .dl-lamp, .tabbar button { transition: background-color .15s ease, box-shadow .15s ease, color .15s ease; }
  @keyframes scr-in { from { opacity: .5; translate: 0 calc(10 * var(--pt)); } to { opacity: 1; translate: 0 0; } }
  @keyframes fc-flip { from { transform: perspective(1200px) rotateY(-80deg); opacity: .3; } to { transform: perspective(1200px) rotateY(0); opacity: 1; } }
  @keyframes auto-press { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); } 100% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); } }
}
@media (prefers-reduced-motion: reduce) {
  .fc-card.flip .fc-face { animation: fc-fade .2s ease; }
  @keyframes fc-fade { from { opacity: .4; } to { opacity: 1; } }
}
@media (max-width: 560px) {
  .live-demo { padding: 12px; }
  .device { padding: 7px; border-radius: 44px; }
  .screen { border-radius: 37px; }
  .live-demo[data-device=ipad] .device { padding: 7px; border-radius: 28px; }
  .live-demo[data-device=ipad] .screen { border-radius: 21px; }
  .demo-controls { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
  .seg { display: grid; grid-template-columns: 1fr 1fr; border-radius: 22px; }
  .seg button { padding: 0 10px; font-size: .8125rem; }
  .demo-foot { justify-content: center; text-align: center; }
}

/* Narrow device screens (phones under ~360px wide). Placed last so these win the cascade over the base component rules. */
@container (max-width: 360px) {
  .scr { padding-left: 8px; padding-right: 8px; }
  .tabbar { left: 4px; right: 4px; padding: 3px; }
  .live-demo[data-device=ipad] .tabbar { left: 4px; right: 4px; width: auto; max-width: none; translate: 0 0; justify-content: space-between; gap: 0; padding: 3px; }
  .hm-top { gap: 0; }
  .hm-search { padding-left: calc(10 * var(--pt)); }
  .dl-panel { padding-left: 6px; padding-right: 6px; }
  .dl-grid { gap: 2px; grid-template-columns: 24px repeat(4, 44px); }
  .dl-inputs { gap: 4px; }
  .dl-inputs button { padding-left: 2px; padding-right: 2px; }
}
