/* ============================================================ */
/* Theme                                                          */
/* ============================================================ */

:root {
  --ink: #f2f3f6;
  --ink-dim: #9a9fae;
  --ground: #101116;
  --ground-raised: #17181f;
  --key: #24262f;
  --key-border: rgba(255,255,255,0.06);
  --accent: #2f8aff;
  --accent-soft: rgba(47, 138, 255, 0.1);
  --panel-shadow: rgba(0,0,0,0.55);
  --hairline: rgba(255,255,255,0.08);
  --scrim: rgba(0,0,0,0.75);
}

:root[data-theme="light"] {
  --ink: #14161c;
  --ink-dim: #6b7080;
  --ground: #eef0f4;
  --ground-raised: #ffffff;
  --key: #ffffff;
  --key-border: rgba(20,22,28,0.08);
  --accent: #2568e8;
  --accent-soft: rgba(37,104,232,0.12);
  --panel-shadow: rgba(30,34,46,0.18);
  --hairline: rgba(20,22,28,0.08);
  --scrim: rgba(255,255,255,0.85);
}

@media (prefers-color-scheme: light) {
  :root {
    --ink: #14161c;
    --ink-dim: #6b7080;
    --ground: #eef0f4;
    --ground-raised: #ffffff;
    --key: #ffffff;
    --key-border: rgba(20,22,28,0.08);
    --accent: #2568e8;
    --accent-soft: rgba(37,104,232,0.12);
    --panel-shadow: rgba(30,34,46,0.18);
    --hairline: rgba(20,22,28,0.08);
    --scrim: rgba(255,255,255,0.85);
  }
}

:root[data-theme="dark"] {
  --ink: #f2f3f6;
  --ink-dim: #9a9fae;
  --ground: #101116;
  --ground-raised: #17181f;
  --key: #24262f;
  --key-border: rgba(255,255,255,0.06);
  --accent: #2f8aff;
  --accent-soft: rgba(47, 138, 255, 0.1);
  --panel-shadow: rgba(0,0,0,0.55);
  --hairline: rgba(255,255,255,0.08);
  --scrim: rgba(0,0,0,0.75);
}

/* ============================================================ */
/* Base reset                                                     */
/* ============================================================ */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* homepage only: fullscreen carousel, no page scroll */
body.page-home {
  overflow: hidden;
  height: 100svh;
}

.mono {
  font-family: ui-monospace, "SF Mono", "Menlo", "Cascadia Code", monospace;
}

a { color: inherit; }
button { font: inherit; }

/* ============================================================ */
/* Site nav                                                       */
/* ============================================================ */

.site-nav {
  position: fixed;
  top: clamp(16px, 3vh, 24px);
  left: clamp(16px, 3vw, 28px);
  right: clamp(16px, 3vw, 28px);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 22px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-brand {
  color: var(--accent);
  text-decoration: none;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.nav-brand:focus-visible, .nav-links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.nav-links {
  display: flex;
  gap: 22px;
}

.nav-scrim {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(90px, 16vh, 140px);
  background: linear-gradient(to bottom, var(--scrim), transparent);
  z-index: 25;
  pointer-events: none;
}

/* ============================================================ */
/* Eyebrow (shared across hero/page-header patterns)              */
/* ============================================================ */

.eyebrow {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.eyebrow.icon::before {
  content: none;
}

.eyebrow-icon {
  margin-right: 4px;
}

.eyebrow span {
  text-transform: none;
  font-weight: 400;
  color: var(--accent);
}

/* ============================================================ */
/* Headings, sub copy, CTAs, buttons                              */
/* ============================================================ */

h1 em { font-style: normal; color: var(--accent); }

.sub strong { color: var(--ink); }

.cta-row {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 11px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
}

.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hairline); }
.btn-ghost:hover { border-color: var(--ink-dim); }

.btn-disabled {
  background: var(--ground-raised);
  color: var(--ink-dim);
  border-color: var(--hairline);
  cursor: default;
}

.btn-disabled:hover { border-color: var(--hairline); transform: none; }

/* smaller buttons inside app-cards (Our Apps grid) */
.app-card .btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.86rem;
}

/* ============================================================ */
/* Page-specific heading sizes (these genuinely differ per page)  */
/* ============================================================ */

.page-home h1 {
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  max-width: 16ch;
  margin: 0 0 18px;
  text-wrap: balance;
}

.page-a11y-keys h1,
.page-contrast-a11y h1,
.page-check-yo-self h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(2.1rem, 5.6vw, 4rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  max-width: 16ch;
  margin: 0 0 20px;
  text-wrap: balance;
}

.page-support h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(2.1rem, 5.6vw, 3.6rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 16ch;
  margin: 0 0 18px;
  text-wrap: balance;
}

.page-our-apps h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(2.1rem, 5.6vw, 3.6rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  max-width: 16ch;
  margin: 0 0 16px;
  text-wrap: balance;
}

.page-about h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 20ch;
  margin: 0;
  text-wrap: balance;
}

.page-home .sub {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--ink-dim);
  text-align: center;
  max-width: 44ch;
  line-height: 1.55;
  margin: 0 0 30px;
}

.page-a11y-keys .sub,
.page-contrast-a11y .sub,
.page-check-yo-self .sub {
  position: relative;
  z-index: 1;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--ink-dim);
  text-align: center;
  max-width: 46ch;
  line-height: 1.55;
  margin: 0 0 34px;
}

.page-support .sub {
  position: relative;
  z-index: 1;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--ink-dim);
  max-width: 44ch;
  line-height: 1.55;
  margin: 0 0 30px;
}

.page-our-apps .sub {
  position: relative;
  z-index: 1;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--ink-dim);
  text-align: center;
  max-width: 44ch;
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 640px) {
  .page-home .sub { margin-left: 24px; margin-right: 24px; }
}

/* ============================================================ */
/* Hero (a11y-keys / contrast-a11y / check-yo-self)                */
/* ============================================================ */

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 100%;
  background: radial-gradient(ellipse at center, var(--accent-soft), transparent 65%);
  opacity: 0.7;
  pointer-events: none;
}

.page-a11y-keys .hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4vh;
  padding: 12vh 6vw 0;
  overflow: hidden;
}

.page-contrast-a11y .hero,
.page-check-yo-self .hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10vh 6vw;
  overflow: hidden;
}

/* filter lives on this non-animating wrapper — Safari rasterizes
   drop-shadow as a rectangle when it sits on the animating element itself.
   will-change keeps it on its own compositing layer permanently so Safari
   doesn't re-rasterize (and glitch) once the child's animation settles. */
.hero-icon-wrap {
  display: inline-block;
  margin-bottom: 26px;
  filter: drop-shadow(0 16px 30px var(--panel-shadow));
  will-change: filter;
}

.hero-icon {
  display: block;
  width: clamp(76px, 12vw, 116px);
  height: clamp(76px, 12vw, 116px);
  opacity: 0;
  transform: translateY(-14px) scale(0.92);
  animation: iconIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

@keyframes iconIn {
  from { opacity: 0; transform: translateY(-14px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.word-in {
  display: inline-block;
  opacity: 0;
  animation: slideInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================ */
/* Below-the-fold content wrap (max-width genuinely differs)      */
/* ============================================================ */

.page-a11y-keys .body-wrap,
.page-contrast-a11y .body-wrap,
.page-check-yo-self .body-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 0vh 6vw 12vh;
}

.page-our-apps .body-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 6vw 14vh;
}

.page-support .body-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 6vw 12vh;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 32px;
  padding-top: 10vh;
  border-top: 1px solid var(--hairline);
}

@media (max-width: 480px) {
  .features { grid-template-columns: 1fr; }
}

.feature h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 34ch;
}

/* ============================================================ */
/* Footer                                                          */
/* ============================================================ */

footer {
  padding: 5vh clamp(16px, 3vw, 28px) 6vh;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--ink-dim);
}

@media (max-width: 560px) {
  footer { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
}

/* homepage: fixed footer over the fullscreen carousel (no page scroll) */
.site-footer-fixed {
  position: fixed;
  bottom: clamp(16px, 3vh, 28px);
  left: clamp(16px, 3vw, 28px);
  right: clamp(16px, 3vw, 28px);
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.68rem;
  color: var(--ink-dim);
  pointer-events: none;
}

.footer-sep {
  opacity: 0.5;
}

.theme-toggle {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.theme-toggle svg {
  flex-shrink: 0;
  align-self: center;
}

.theme-toggle:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* .site-footer-fixed disables pointer-events so the carousel stays
   clickable underneath it — re-enable just for the toggle button */
.site-footer-fixed .theme-toggle {
  pointer-events: auto;
}

/* ============================================================ */
/* Strike (animated strikethrough, e.g. "Hand")                   */
/* ============================================================ */

.strike {
  position: relative;
  display: inline-block;
  text-decoration: none;
}

.strike::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 52%;
  height: 0.08em;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
}

.strike.struck::after {
  animation: strikeLoop 11s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes strikeLoop {
  0%   { transform: scaleX(0); }
  4%   { transform: scaleX(1); }
  95%  { transform: scaleX(1); }
  99%  { transform: scaleX(0); }
  100% { transform: scaleX(0); }
}

.strike-text {
  display: inline-block;
}

.strike.struck .strike-text {
  animation: strikeTextFade 11s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes strikeTextFade {
  0%, 4%    { opacity: 1; }
  8%        { opacity: 0.8; }
  91%       { opacity: 0.8; }
  95%, 100% { opacity: 1; }
}

/* larger, headline-scale strike: white line on blue text, no letter fade */
.strike-hero::after {
  background: var(--ink);
}

.strike.strike-hero.struck .strike-text {
  animation: none;
}

/* ============================================================ */
/* Reduced motion                                                  */
/* ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .strike::after { transform: scaleX(1); }
  .strike.struck::after { animation: none; }
  .strike-text { opacity: 0.8; }
  .strike.struck .strike-text { animation: none; }
  .word-in { animation: none; opacity: 1; }
  .hero-icon { animation: none; opacity: 1; transform: none; }
  .track { transition: none; }
  .slide-icon { animation: none; opacity: 1; transform: none; }
  .stage { transform: translateY(0); opacity: 1; }
  .key { transition: none; }
  .letter-in { animation: none !important; }
  .fade-word { opacity: 1; transition: none; }
  #h1-period { opacity: 1; transition: none; }
  .word-swipe, .word-tap, .word-tap-period { animation: none; opacity: 1; transform: none; }
  .faq-chevron, .faq-a-wrap { transition: none; }
  .enter, .enter.in { transition: none; opacity: 1; transform: none; }
}

/* ============================================================ */
/* Homepage: carousel                                              */
/* ============================================================ */

.nav-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--ink);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.nav-arrow svg { display: block; }

.nav-arrow:hover:not(:disabled) { transform: translateY(-50%) scale(1.07); }
.nav-arrow:disabled { opacity: 0.22; pointer-events: none; }
.nav-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-arrow-left { left: clamp(0px, 3vw, 0px); }
.nav-arrow-right { right: clamp(0px, 3vw, 0px); }

.peek-rail {
  position: fixed;
  top: 10vh;
  width: 98px;
  height: 80vh;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: opacity 0.3s ease;
}

.peek-rail.hidden { opacity: 0; pointer-events: none; }

.peek-rail-left {
  left: 0;
  background: radial-gradient(50% 50% at 0% 50%, var(--accent-soft) 0%, transparent 100%);
}

.peek-rail-right {
  right: 0;
  background: radial-gradient(50% 50% at 100% 50%, var(--accent-soft) 0%, transparent 100%);
}

.peek-rail span {
  writing-mode: vertical-rl;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
}

.peek-rail-left span { transform: rotate(180deg); }

.dots {
  position: fixed;
  bottom: clamp(16px, 3vh, 28px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 20;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hairline);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s, transform 0.2s;
}

.dot.active { 
  width: 16px;
  border-radius: 14px;
  background: var(--accent); 
  transform: scale(1.15); 
}

.carousel {
  position: relative;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
}

.track {
  display: flex;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.slide {
  width: 100vw;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 9vh 7vw 11vh;
  position: relative;
  overflow: hidden;
}

.slide::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 60%;
  background: radial-gradient(ellipse at center, var(--accent-soft), transparent 65%);
  opacity: 0.6;
  pointer-events: none;
}

.slide-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* filter lives on this non-animating wrapper — Safari rasterizes
   drop-shadow as a rectangle when it sits on the animating element itself.
   will-change keeps it on its own compositing layer permanently so Safari
   doesn't re-rasterize (and glitch) once the child's animation settles. */
.slide-icon-wrap {
  display: inline-block;
  margin-bottom: 26px;
  filter: drop-shadow(0 16px 30px var(--panel-shadow));
  will-change: filter;
}

.slide-icon {
  display: block;
  width: clamp(76px, 12vw, 116px);
  height: clamp(76px, 12vw, 116px);
}

/* Slide entrance choreography: icon, eyebrow, headline lines, body, buttons —
   JS toggles .in on each in sequence every time a slide becomes active. */
.enter {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.enter.in {
  opacity: 1;
  transform: translateY(0);
}

.slide-icon.enter {
  transform: translateY(-14px) scale(0.92);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-icon.enter.in {
  transform: translateY(0) scale(1);
}

@media (max-width: 640px) {
  .dots { bottom: clamp(52px, 11vh, 80px); }
  .site-footer-fixed {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    left: 16px;
    right: 16px;
    bottom: clamp(16px, 1vh, 28px);
  }
  .peek-rail { display: none; }
  .nav-arrow { width: 44px; height: 44px; }
  .nav-arrow-left { left: 8px; }
  .nav-arrow-right { right: 8px; }
  .slide { padding-left: 32px; padding-right: 32px; }
}

/* ============================================================ */
/* a11y Keys: floating keyboard hero                               */
/* ============================================================ */

.fade-word {
  display: inline-block;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.fade-word.visible {
  opacity: 1;
}

#h1-period {
  opacity: 0;
  transition: opacity 0.3s ease;
}

#h1-period.visible {
  opacity: 1;
}

.word-swipe {
  display: inline-block;
  animation: slideInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.word-tap {
  display: inline-block;
  animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.45s both;
}

.word-tap-period {
  display: inline-block;
  animation: scaleIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.45s both;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

.stage {
  width: min(680px, 92vw);
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-bottom: 5vh;
  transform: translateY(115%);
  opacity: 0;
  will-change: transform;
}

.stage.settled {
  transition: transform 1.15s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.7s ease 0.05s;
  transform: translateY(0);
  opacity: 1;
}

.panel {
  --kw: clamp(30px, 8.2vw, 58px);
  --kh: clamp(28px, 7.4vw, 49px);
  --gap: clamp(4px, 1vw, 7px);
  --row-w: calc(var(--kw) * 10 + var(--gap) * 9);
  background: var(--ground-raised);
  border: 1px solid var(--key-border);
  border-radius: 18px;
  box-shadow: 0 30px 70px var(--panel-shadow);
  padding: 10px 5px 16px;
  position: relative;
}

@media (max-width: 640px) {
  .panel { --kw: clamp(30px, 7.4vw, 58px); }
}

.drag-bar {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.drag-bar span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink-dim);
  opacity: 0.5;
}

.suggestion-bar {
  width: var(--row-w);
  height: 40px;
  margin: 2px auto 10px;
  border-radius: 9px;
  background: var(--key);
  border: 1px solid var(--key-border);
  display: flex;
  align-items: center;
  padding: 0 14px;
  box-sizing: border-box;
}

.suggestion-word {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  font-family: ui-monospace, "SF Mono", "Menlo", monospace;
}

.suggestion-word .cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: -0.15em;
  animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.letter-in {
  display: inline-block;
  animation: letterPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes letterPop {
  from { opacity: 0; transform: translateY(9px) scale(0.6); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.keys-wrap {
  width: var(--row-w);
  margin: 0 auto;
  position: relative;
  padding: 2px 0;
}

.trail-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.trail-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px var(--accent-soft));
}

.key-row {
  display: flex;
  justify-content: center;
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.key-row.edge-anchored {
  justify-content: space-between;
}

.key-cluster {
  display: flex;
  gap: var(--gap);
}

.key {
  width: var(--kw);
  height: var(--kh);
  border-radius: 8px;
  background: var(--key);
  border: 1px solid var(--key-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.72rem, 1.6vw, 0.95rem);
  font-weight: 500;
  color: var(--ink);
  text-transform: lowercase;
  flex-shrink: 0;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.key.active {
  background: var(--accent);
  color: #fff;
  transform: scale(1.14);
  box-shadow: 0 6px 16px var(--accent-soft);
}

.key.wide {
  width: calc(var(--kw) * 1.35);
  font-size: clamp(0.62rem, 1.3vw, 0.82rem);
}

.key.narrow {
  width: calc(var(--kw) * 0.95);
  font-size: clamp(0.62rem, 1.3vw, 0.82rem);
}

.key.spacebar {
  width: calc(var(--kw) * 5.97);
}

/* ============================================================ */
/* About: page header, photo, article                              */
/* ============================================================ */

.page-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16vh 6vw 8vh;
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 100%;
  background: radial-gradient(ellipse at center, var(--accent-soft), transparent 65%);
  opacity: 0.7;
  pointer-events: none;
}

.about-photo-wrap {
  margin: 40px 0 0;
}

.about-photo {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 46px var(--panel-shadow);
  overflow: hidden;
}

.about-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.article {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 6vw 14vh;
}

.article p {
  font-size: 1.02rem;
  color: var(--ink-dim);
  line-height: 1.7;
  margin: 0 0 16px;
}

.article p:last-child { margin-bottom: 0; }

.article strong {
  color: var(--ink);
  font-weight: 700;
}

.article a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 3px;
}

.article a:hover { text-decoration-color: var(--accent); }

.article h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 40px 0 16px;
}

.article .pull-quote {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
  margin: 16px 0 24px;
}

/* ============================================================ */
/* Support: hero, FAQ accordion                                    */
/* ============================================================ */

.support-wrap {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10vh 6vw;
  overflow: hidden;
}

.support-wrap::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 60%;
  background: radial-gradient(ellipse at center, var(--accent-soft), transparent 65%);
  opacity: 0.7;
  pointer-events: none;
}

.faq {
  padding-top: 10vh;
  border-top: 1px solid var(--hairline);
  scroll-margin-top: clamp(70px, 14vh, 110px);
}

.faq h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;
  margin: 0 0 32px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--ground-raised);
  border: 1px solid var(--key-border);
  border-radius: 14px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: none;
  border: none;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
}

.faq-q:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.faq-chevron {
  flex-shrink: 0;
  color: var(--ink-dim);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-a-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.open .faq-a-wrap { grid-template-rows: 1fr; }

.faq-a-inner { overflow: hidden; }

.faq-a-inner p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--ink-dim);
  font-size: 0.95rem;
  line-height: 1.65;
}

.faq-a-inner a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 3px;
}

.faq-a-inner a:hover { text-decoration-color: var(--accent); }

/* ============================================================ */
/* Our Apps: grid                                                   */
/* ============================================================ */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 640px) {
  .apps-grid { grid-template-columns: 1fr; }
}

.app-card {
  position: relative;
  overflow: hidden;
  background: var(--ground-raised);
  border: 1px solid var(--key-border);
  border-radius: 20px;
  box-shadow: 0 20px 46px var(--panel-shadow);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.app-card > img {
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  filter: drop-shadow(0 10px 20px var(--panel-shadow));
}

/* platform badge: a notch cut into the card's top-right corner.
   top-right radius matches the card's own corner; bottom-left is
   rounded normally (the card's own background shows through the
   curve, since the badge sits on top of it) — no masking needed. */
.app-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  background: var(--ground);
  border-radius: 0 20px 0 16px;
  border-left: 1px solid var(--key-border);
  border-bottom: 1px solid var(--key-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-badge img {
  position: relative;
  z-index: 1;
  height: 18px;
  width: auto;
}

.app-card h2 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.app-card p {
  margin: 0 0 24px;
  color: var(--ink-dim);
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 30ch;
}

.app-card .cta-row {
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ============================================================ */
/* Privacy policy (uses .page-header + .article from About)       */
/* ============================================================ */

.privacy-meta {
  position: relative;
  z-index: 1;
  font-size: 0.82rem;
  color: var(--ink-dim);
  margin: 16px 0 0;
}

.article .privacy-lede {
  font-size: 1.15rem;
  color: var(--ink);
  padding: 18px 20px;
  background: var(--ground-raised);
  border: 1px solid var(--key-border);
  border-radius: 14px;
  margin-bottom: 8px;
}

.article ul {
  padding-left: 1.2em;
  margin: 0 0 16px;
}

.article li {
  font-size: 1.02rem;
  color: var(--ink-dim);
  line-height: 1.7;
  margin-bottom: 10px;
}

/* footer link (matches the theme toggle) */
footer a,
.site-footer-fixed a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

footer a:hover,
.site-footer-fixed a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.site-footer-fixed a {
  pointer-events: auto;
}
