/* Woodward UI tokens + type scale, inlined to avoid CSS @import waterfalls. */
/* Woodward UI — Design Tokens
   Dark-mode-first semantic color system.
   Source of truth: Theme.swift + Figma (Woodward UI) */

:root {
  color-scheme: dark;

  /* ——— Background ——— */
  --bg-primary: var(--solid-black);
  --background-primary: var(--white-opacity-50);
  --bg-secondary: rgba(255,255,255,0.08);
  --bg-overlay-primary: var(--black-opacity-700);
  --bg-overlay-secondary: var(--black-opacity-300);
  --bg-accented-primary: var(--indigo-600);
  --bg-accented-secondary: var(--blue-600);

  /* ——— Background / Surface ——— */
  --bg-surface-primary: var(--graphite-900);
  --bg-surface-secondary: var(--solid-white);
  --bg-surface-raised: var(--graphite-800);
  --bg-surface-elevated-primary: var(--graphite-700);
  --bg-surface-elevated-secondary: var(--graphite-600);
  --bg-surface-elevated-tertiary: var(--solid-white);
  --bg-surface-primary-subdued: var(--graphite-900);
  --bg-surface-elevated-primary-subdued: var(--graphite-700);
  --fills-vibrant-tertiary: #121212;

  /* ——— Semantic Backgrounds ——— */
  --bg-winner: rgba(70,208,143,0.2);
  --bg-loser: rgba(239,83,80,0.2);

  /* ——— Text & Icon ——— */
  --text-primary: var(--graphite-50);
  --text-primary-subdued: var(--white-opacity-800);
  --text-secondary: var(--white-opacity-500);
  --text-disabled: var(--white-opacity-300);
  --text-accent: var(--indigo-500);
  --text-accent-secondary: var(--blue-600);
  --text-positive: var(--green-300);
  --text-warning: var(--amber-500);
  --text-error: var(--red-300);
  --text-on-accented: var(--solid-black);
  --text-primary-on-light: var(--solid-white);
  --text-secondary-on-light: var(--white-opacity-500);

  /* ——— Labels ——— */
  --label-primary: var(--solid-white);
  --label-controls: #bfbfbf;

  /* ——— Border ——— */
  --border: var(--white-opacity-100);
  --border-secondary: var(--white-opacity-150);
  --border-tertiary: var(--white-opacity-300);
  --border-opaque: var(--graphite-800);
  --border-accent: var(--indigo-500);
  --border-accent-secondary: var(--green-300);
  --border-focus: var(--solid-white);
  --border-error: var(--red-500);
  --border-positive: var(--green-300);

  /* ——— Accent ——— */
  --accent: var(--green-300);
  --accent-glow: rgba(74,222,128,0.06);

  /* ——— Color Primitives ——— */

  /* Solid */
  --solid-white: #FFFFFF;
  --solid-black: #000000;

  /* White Opacity */
  --white-opacity-50: rgba(255,255,255,0.05);
  --white-opacity-100: rgba(255,255,255,0.1);
  --white-opacity-150: rgba(255,255,255,0.15);
  --white-opacity-200: rgba(255,255,255,0.2);
  --white-opacity-300: rgba(255,255,255,0.3);
  --white-opacity-400: rgba(255,255,255,0.4);
  --white-opacity-500: rgba(255,255,255,0.5);
  --white-opacity-600: rgba(255,255,255,0.6);
  --white-opacity-700: rgba(255,255,255,0.7);
  --white-opacity-800: rgba(255,255,255,0.8);
  --white-opacity-900: rgba(255,255,255,0.9);

  /* Black Opacity */
  --black-opacity-50: rgba(0,0,0,0.05);
  --black-opacity-100: rgba(0,0,0,0.1);
  --black-opacity-150: rgba(0,0,0,0.15);
  --black-opacity-200: rgba(0,0,0,0.2);
  --black-opacity-300: rgba(0,0,0,0.3);
  --black-opacity-400: rgba(0,0,0,0.4);
  --black-opacity-500: rgba(0,0,0,0.5);
  --black-opacity-600: rgba(0,0,0,0.6);
  --black-opacity-700: rgba(0,0,0,0.7);
  --black-opacity-800: rgba(0,0,0,0.8);
  --black-opacity-900: rgba(0,0,0,0.9);

  /* Grey */
  --grey-25: #EDEDED;
  --grey-50: #EDEDED;
  --grey-100: #DEDEDE;
  --grey-150: #BCBCBC;
  --grey-200: #9B9B9B;
  --grey-300: #797979;
  --grey-400: #585858;
  --grey-500: #414141;
  --grey-600: #343434;
  --grey-700: #272727;
  --grey-800: #1A1A1A;
  --grey-900: #0D0D0D;

  /* Citrus */
  --citrus-50: #F9FFF2;
  --citrus-100: #F3FEE4;
  --citrus-200: #E7FDC6;
  --citrus-300: #DAFCA1;
  --citrus-400: #CDFB72;
  --citrus-500: #BEFA00;
  --citrus-600: #AAE000;
  --citrus-700: #93C200;
  --citrus-800: #789E00;
  --citrus-900: #557000;

  /* Green */
  --green-50: #C7FFE7;
  --green-100: #9DFFCD;
  --green-200: #60E7A5;
  --green-300: #46D08F;
  --green-400: #26BA7B;
  --green-500: #00A466;
  --green-600: #008E52;
  --green-700: #007940;
  --green-800: #00642D;
  --green-900: #00501C;

  /* Amber */
  --amber-50: #FFF8E1;
  --amber-100: #FFECB3;
  --amber-200: #FFE082;
  --amber-300: #FFD54F;
  --amber-400: #FFCA28;
  --amber-500: #FFC107;
  --amber-600: #FFB300;
  --amber-700: #FFA000;
  --amber-800: #FF8F00;
  --amber-900: #FF6F00;

  /* Red */
  --red-50: #FFEBEE;
  --red-100: #FFCDD2;
  --red-200: #EF9A9A;
  --red-300: #E57373;
  --red-400: #EF5350;
  --red-500: #F44336;
  --red-600: #E53935;
  --red-700: #D32F2F;
  --red-800: #C62828;
  --red-900: #B71C1C;

  /* Pink */
  --pink-50: #FCE4EC;
  --pink-100: #F8BBD0;
  --pink-200: #F48FB1;
  --pink-300: #F06292;
  --pink-400: #EC407A;
  --pink-500: #E91E63;
  --pink-600: #D81B60;
  --pink-700: #C2185B;
  --pink-800: #AD1457;
  --pink-900: #880E4F;

  /* Indigo */
  --indigo-50: #F2EFFC;
  --indigo-100: #E4DFF9;
  --indigo-200: #CBC0F4;
  --indigo-300: #B2A0F0;
  --indigo-400: #9A7FEC;
  --indigo-500: #835CE9;
  --indigo-600: #6E31E7;
  --indigo-700: #5700C9;
  --indigo-800: #3E008E;
  --indigo-900: #260058;

  /* Blue */
  --blue-50: #C1EBFF;
  --blue-100: #A8D4FF;
  --blue-200: #8DBEFF;
  --blue-300: #71A9FF;
  --blue-400: #5394FF;
  --blue-500: #2C80FF;
  --blue-600: #006CF4;
  --blue-700: #0059DC;
  --blue-800: #0047C6;
  --blue-900: #0036AF;

  /* Cyan */
  --cyan-50: #E0F7FA;
  --cyan-100: #B2EBF2;
  --cyan-200: #80DEEA;
  --cyan-300: #4DD0E1;
  --cyan-400: #26C6DA;
  --cyan-500: #00BCD4;
  --cyan-600: #00ACC1;
  --cyan-700: #0097A7;
  --cyan-800: #00838F;
  --cyan-900: #006064;

  /* ——— Graphite Scale ——— */
  --graphite-25: #FAF9FA;
  --graphite-50: #F2F1F2;
  --graphite-100: #E7E6E8;
  --graphite-150: #CAC8CC;
  --graphite-200: #908E94;
  --graphite-300: #6C6970;
  --graphite-400: #49474D;
  --graphite-500: #333136;
  --graphite-600: #29272B;
  --graphite-700: #1E1D20;
  --graphite-800: #141315;
  --graphite-900: #0C0C0E;

  /* ——— Shadow (composite box-shadow values) ——— */
  --shadow-1: 0 1px 1px 0 rgba(0,0,0,0.2), 0 1px 2px 1px rgba(0,0,0,0.1);
  --shadow-2: 0 1px 2px 0 rgba(0,0,0,0.3), 0 3px 6px 2px rgba(0,0,0,0.1);
  --shadow-3: 0 1px 3px 0 rgba(0,0,0,0.3), 0 4px 8px 4px rgba(0,0,0,0.2);
  --shadow-4: 0 1px 4px 0 rgba(0,0,0,0.3), 0 6px 10px 4px rgba(0,0,0,0.2);
  --shadow-5: 0 1px 6px 0 rgba(0,0,0,0.3), 0 8px 10px 4px rgba(0,0,0,0.2);
  --shadow-6: 0 1px 8px 0 rgba(0,0,0,0.3), 0 8px 12px 6px rgba(0,0,0,0.2);

  /* ——— Spacing (8px grid) ——— */
  --space-xxxs: 4px;
  --space-xxs: 8px;
  --space-xs: 12px;
  --space-sm: 16px;
  --space-md: 20px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 40px;
  --space-xxxl: 48px;
  --space-xxxxl: 64px;

  /* ——— Radius ——— */
  --radius-none: 0;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-xxl: 36px;
  --radius-full: 9999px;

  /* ——— Corner Shape ——— */
  --corner-shape-squircle: superellipse(1.6);
}

/* Woodward UI — Typography Scale
   Matches iOS Theme.swift type styles. SF Pro system font stack. */

/* Title */
.title1           { font-size: 34px; font-weight: 600; line-height: 40px; }
.title2           { font-size: 28px; font-weight: 600; line-height: 32px; }
.title3           { font-size: 22px; font-weight: 600; line-height: 28px; }
.title4           { font-size: 20px; font-weight: 600; line-height: 22px; }

/* Headline */
.headline         { font-size: 18px; font-weight: 600; line-height: 24px; }

/* Body */
.body             { font-size: 16px; font-weight: 400; line-height: 24px; }
.bodyEmphasis     { font-size: 16px; font-weight: 500; line-height: 22px; }
.bodyStrong       { font-size: 16px; font-weight: 600; line-height: 24px; }

/* Subheadline */
.subheadline      { font-size: 14px; font-weight: 400; line-height: 20px; }
.subheadlineEmphasis { font-size: 14px; font-weight: 500; line-height: 20px; }
.subheadlineStrong { font-size: 14px; font-weight: 600; line-height: 20px; }

/* Caption */
.caption          { font-size: 12px; font-weight: 400; line-height: 16px; }
.captionEmphasis  { font-size: 12px; font-weight: 500; line-height: 16px; }
.captionStrong    { font-size: 12px; font-weight: 600; line-height: 16px; }

/* Caption 2 */
.caption2         { font-size: 10px; font-weight: 400; line-height: 12px; }
.caption2Emphasis { font-size: 10px; font-weight: 500; line-height: 12px; }
.caption2Strong   { font-size: 10px; font-weight: 600; line-height: 12px; }

/* Monospace Labels */
.label02          { font-size: 14px; font-weight: 400; line-height: 24px; font-family: ui-monospace, 'SF Mono', monospace; }
.label03          { font-size: 12px; font-weight: 700; line-height: 12px; font-family: ui-monospace, 'SF Mono', monospace; }

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: optional;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/space-grotesk-400.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/space-grotesk-500.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/space-grotesk-600.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-700.woff2") format("woff2");
}

/* Roboto stays for the in-phone widget demo (Android UI chrome). */
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/roboto-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/roboto-medium.woff2") format("woff2");
}

:root {
  --bg: #000;
  --surface: #0c0c0e;
  --raised: #141315;
  --elevated: #1e1d20;
  --text: #fff;
  --muted: #9b9b9b;
  --fine: #797979;
  --line: rgba(255, 255, 255, 0.12);
  --pink: #ff5c8a;
  --pink-deep: #ec407a;
  --green: #46d08f;
  --gold: #f6b863;
  --serif: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  /* Matches woodward-ui/css/base.css Inter stack */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  /* Portfolio LoadReveal / SoftBlurText enter contract */
  --enter-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --enter-duration: 0.9s;
  /* 8-column layout grid (portfolio/roam pattern) */
  --grid-columns: 8;
  --grid-gutter: 24px;
  --grid-margin: clamp(20px, 4vw, 40px);
  --grid-max-width: 1120px;
  /* Aliases — prefer --grid-* for new rules */
  --pad: var(--grid-margin);
  --max: var(--grid-max-width);
  --nav: 120px;
}

/* ═══════════════════════════════════════════════════════════
   8-column layout grid
   Wrap a section in .grid-container and place children with
   `grid-column: <start> / span <n>`. Toggle .grid-debug to
   visualize the columns.
   ═══════════════════════════════════════════════════════════ */
.grid-container {
  width: 100%;
  max-width: var(--grid-max-width);
  margin-inline: auto;
  padding-inline: var(--grid-margin);
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  gap: var(--grid-gutter);
  box-sizing: border-box;
}

.gc-full {
  grid-column: 1 / -1;
}

.gc-body {
  grid-column: 1 / -1;
}

@media (min-width: 769px) {
  .gc-body {
    grid-column: 1 / span 6;
  }
}


*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-anchor: none;
}

body {
  margin: 0;
  font-family: var(--sans);
  /* woodward-ui .body */
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* macOS-style overlay scrollbars — near-invisible until the scrollable
   container is hovered. Class-level `scrollbar-width: none` / `display: none`
   rules (e.g. .ws-pager) still win where scrollbars are intentionally hidden. */
* {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

*:hover {
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background: transparent;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

*:hover::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.28);
  border: 2px solid transparent;
  background-clip: content-box;
}

*:hover::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.42);
}

main {
  flex: 1 0 auto;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

a:hover {
  color: var(--pink);
}

button,
summary,
[role="button"] {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--text);
  color: #000;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  corner-shape: var(--corner-shape-squircle);
  z-index: 20;
}

.skip:focus {
  top: 12px;
}

/* iOS-style smart install banner — always on at ≤768px via CSS (not dismissible) */
.smart-banner {
  display: none;
  width: 100%;
  box-sizing: border-box;
  background: #f2f2f7;
  color: #000;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.12);
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top);
}

.smart-banner-link {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 68px;
  padding: 8px 16px;
  box-sizing: border-box;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.smart-banner-link:hover,
.smart-banner-link:focus-visible {
  background: rgba(0, 0, 0, 0.04);
}

.smart-banner-icon {
  /* Same tile as .nav-logo-icon, scaled to the banner. */
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 11px; /* 25% — same ratio as header 12/48 */
  color: var(--text);
}

.smart-banner-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.smart-banner-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  color: #000;
}

.smart-banner-sub {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: -0.02em;
  color: #3c3c43;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.smart-banner-get {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  background: transparent;
  line-height: 1;
}

.smart-banner-play {
  display: block;
  width: 17px;
  height: 19px;
  object-fit: contain;
  flex-shrink: 0;
}

.smart-banner-get-label {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  color: #0066d6;
  letter-spacing: -0.01em;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--nav);
  --nav-scrim: rgb(0 0 0 / .65);
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Full-bleed chrome — independent of the 8-col content grid */
  width: 100%;
  padding: 0 var(--pad);
  background: transparent;
  box-sizing: border-box;
  overflow: visible;
}

/* Overlapping masks let scrolling content sharpen toward the lower edge. */
.nav::before,
.nav::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 240ms ease;
  -webkit-backdrop-filter: blur(var(--nav-blur));
  backdrop-filter: blur(var(--nav-blur));
  -webkit-mask-image: var(--nav-mask);
  mask-image: var(--nav-mask);
}

.nav::before {
  --nav-blur: 4px;
  --nav-mask: linear-gradient(to bottom, black 45%, transparent);
  background: linear-gradient(to bottom, var(--nav-scrim), transparent);
}

.nav::after {
  --nav-blur: 16px;
  --nav-mask: linear-gradient(to bottom, black 12%, transparent 84%);
}

.nav-blurred .nav::before,
.nav-blurred .nav::after {
  opacity: 1;
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .nav-blurred .nav { background: var(--bg); }
  .nav::before, .nav::after { content: none; }
}

.nav-logo,
.nav-play {
  position: relative;
  z-index: 1;
}

.nav-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 2;
  color: var(--text);
  overflow: visible;
  isolation: isolate;
}

.nav-logo:hover,
.nav-logo:focus {
  color: var(--text);
}

.nav-logo-icon,
.smart-banner-icon {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md); /* 12px = 25% of 48px */
  corner-shape: var(--corner-shape-squircle);
  background: var(--bg-surface-elevated-primary);
  border: 0.5px solid var(--border);
  box-sizing: border-box;
  overflow: hidden;
  color: var(--text);
}

.nav-logo-icon {
  transition: background 0.25s var(--ease);
}

.nav-logo:hover .nav-logo-icon,
.nav-logo:focus .nav-logo-icon {
  background: var(--bg-surface-elevated-secondary);
}

.nav-logo-icon svg,
.smart-banner-icon svg,
.nav-logo-icon img,
.smart-banner-icon img,
.footer-logo-icon img {
  display: block;
  width: 100%;
  height: 100%;
}

.nav-logo-icon:has(img),
.smart-banner-icon:has(img),
.footer-logo-icon:has(img) {
  background: transparent;
  border: 0;
}

/* Keep the dark squircle tile behind the 3D keycap — same as the app icon. */
.nav-logo-icon:has(.nav-keycap),
.smart-banner-icon:has(.nav-keycap),
.footer-logo-icon:has(.nav-keycap) {
  overflow: hidden;
  background: #2f3238;
  border: 0;
}

.nav-logo:hover .nav-logo-icon:has(img),
.nav-logo:focus .nav-logo-icon:has(img) {
  background: transparent;
}

.nav-logo:hover .nav-logo-icon:has(.nav-keycap),
.nav-logo:focus .nav-logo-icon:has(.nav-keycap) {
  background: #3e424a;
}

/* Safari/iOS ignores corner-shape. Mask the square app-icon tiles with a
   superellipse(1.6) path at the same 25% radius so they match Chrome.
   Chrome keeps corner-shape and does not apply this. Rectangular cards
   stay on border-radius — a square mask cannot be stretched onto them. */
@supports not (corner-shape: superellipse(1.6)) {
  .nav-logo-icon,
  .smart-banner-icon,
  .footer-logo-icon {
    -webkit-mask-image: url("../img/app-icon-mask.svg");
    mask-image: url("../img/app-icon-mask.svg");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
  }
}

.nav-keycap {
  display: block;
  width: 100%;
  height: 100%;
}

.nav-keycap-scene {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  perspective: none;
  transform: translateY(2px);
}

.nav-keycap-cap {
  --keycap-size: 22px;
  --keycap-depth: 7px;
  --keycap-half: calc(var(--keycap-size) / 2);
  --keycap-half-d: calc(var(--keycap-depth) / 2);
  /* Camera looks down at a key on the floor; local +Y is sky. */
  --keycap-iso: rotateX(-30deg) rotateY(40deg);
  position: relative;
  width: var(--keycap-size);
  height: var(--keycap-size);
  transform-style: preserve-3d;
  transform: var(--keycap-iso);
  transition: transform 0.35s var(--ease);
}

.nav-keycap-face {
  position: absolute;
  box-sizing: border-box;
  backface-visibility: hidden;
}

.nav-keycap-top {
  /* True top: face points at the sky (+Y), K reads on the upward face. */
  left: 0;
  top: 0;
  width: var(--keycap-size);
  height: var(--keycap-size);
  display: grid;
  place-items: center;
  background: #c0c0c0;
  color: #2a2a2a;
  transform: rotateX(90deg) translateZ(var(--keycap-half-d));
  transform-style: preserve-3d;
  box-shadow:
    inset 0 1.5px 0 #ffffff,
    inset 0 -1.5px 0 #252525,
    inset 1.5px 0 0 #ffffff,
    inset -1.5px 0 0 #252525,
    inset 0 3px 0 #d0d0d0,
    inset 0 -3px 0 #a8a8a8,
    inset 3px 0 0 #d0d0d0,
    inset -3px 0 0 #a8a8a8;
}

.nav-keycap-k {
  font-family: Menlo, Monaco, ui-monospace, "SF Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  /* Embossed — raised off the key top. */
  color: #2a2a2a;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85),
    0 -0.5px 0 rgba(0, 0, 0, 0.35);
}

.nav-keycap-front {
  left: 0;
  top: 50%;
  width: var(--keycap-size);
  height: var(--keycap-depth);
  margin-top: calc(var(--keycap-half-d) * -1);
  background: linear-gradient(180deg, #9a9a9a 0%, #5c5c5c 100%);
  transform: translateZ(var(--keycap-half));
}

.nav-keycap-right {
  left: 50%;
  top: 50%;
  width: var(--keycap-size);
  height: var(--keycap-depth);
  margin-left: calc(var(--keycap-half) * -1);
  margin-top: calc(var(--keycap-half-d) * -1);
  background: linear-gradient(90deg, #b0b0b0 0%, #787878 100%);
  transform: rotateY(90deg) translateZ(var(--keycap-half));
}

.nav-keycap-left {
  left: 50%;
  top: 50%;
  width: var(--keycap-size);
  height: var(--keycap-depth);
  margin-left: calc(var(--keycap-half) * -1);
  margin-top: calc(var(--keycap-half-d) * -1);
  background: linear-gradient(90deg, #e8e8e8 0%, #c4c4c4 100%);
  transform: rotateY(-90deg) translateZ(var(--keycap-half));
}

.nav-logo:hover .nav-logo-icon .nav-keycap-cap,
.nav-logo:focus .nav-logo-icon .nav-keycap-cap,
.smart-banner-link:hover .nav-keycap-cap,
.footer-logo:hover .footer-logo-icon .nav-keycap-cap,
.footer-logo:focus .footer-logo-icon .nav-keycap-cap {
  transform: var(--keycap-iso) translate3d(0, 1px, -1px);
}

.smart-banner-icon .nav-keycap-cap {
  --keycap-size: 20px;
  --keycap-depth: 6px;
}

.smart-banner-icon .nav-keycap-k {
  font-size: 11px;
}

.footer-logo-icon .nav-keycap-cap {
  --keycap-size: 16px;
  --keycap-depth: 5px;
}

.footer-logo-icon .nav-keycap-k {
  font-size: 9px;
}

@media (prefers-reduced-motion: reduce) {
  .nav-keycap-cap {
    transition: none;
  }

  .nav-logo:hover .nav-logo-icon .nav-keycap-cap,
  .nav-logo:focus .nav-logo-icon .nav-keycap-cap,
  .smart-banner-link:hover .nav-keycap-cap,
  .footer-logo:hover .footer-logo-icon .nav-keycap-cap,
  .footer-logo:focus .footer-logo-icon .nav-keycap-cap {
    transform: var(--keycap-iso);
  }
}

.smart-banner-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 11px; /* 25% of 44 — same ratio as header 12/48 */
  color: var(--text);
}

.nav-logo-track {
  stroke: var(--bg-secondary);
}

.nav-logo-ring {
  stroke: currentColor;
  stroke-linecap: round;
  /* 0.593 + round caps ≈ the old 0.625 butt-cap arc, same gap and weight */
  stroke-dasharray: 0.593 1;
  stroke-dashoffset: 0;
  opacity: 1;
}

.nav-logo-dot {
  fill: currentColor;
}

.nav-logo-wordmark {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}

@media (prefers-reduced-motion: no-preference) {
  .nav-logo:hover .nav-logo-ring {
    animation: nav-logo-ring-trim 0.9s linear;
  }
}

@keyframes nav-logo-ring-trim {
  0% {
    opacity: 1;
    stroke-dashoffset: 0;
    animation-timing-function: ease;
  }
  16% {
    opacity: 0;
    stroke-dashoffset: 0;
    animation-timing-function: step-end;
  }
  17% {
    opacity: 0;
    stroke-dashoffset: 0.593;
    animation-timing-function: ease;
  }
  24% {
    opacity: 1;
    stroke-dashoffset: 0.593;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  }
  100% {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

.nav-play {
  margin-left: auto;
  flex-shrink: 0;
  z-index: 2;
  max-width: calc(50% - 48px);
}

.play-badge {
  display: block;
  height: 40px;
  width: auto;
}

.play-badge img {
  display: block;
  height: 40px;
  width: auto;
}

.hero {
  /* Full-bleed stage for the keyboard demo. */
  position: relative;
  width: 100%;
  max-width: none;
  margin: calc(0px - var(--nav)) 0 0;
  padding: 0;
  display: block;
  height: 100svh;
  box-sizing: border-box;
  overflow: hidden;
  background: transparent;
}

.hero-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.hero-video-copy {
  position: absolute;
  inset: auto 0 0;
  padding-block: clamp(56px, 12vh, 128px) clamp(28px, 5vh, 56px);
  color: #fff;
  pointer-events: none;
}

.hero-video-copy-inner {
  box-sizing: border-box;
  max-width: var(--grid-max-width);
  margin-inline: auto;
  padding-inline: var(--grid-margin);
}

.hero-video-copy h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero-video-copy p {
  max-width: 34rem;
  margin: 0;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.45;
}

.hero-phone {
  grid-column: 1 / span 3;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* Invisible on tablet/desktop so the extra wrap cannot shift layout. */
.hero-phone-stage {
  display: contents;
}

.hero-copy {
  grid-column: 4 / span 5;
  min-width: 0;
}

.hero-copy h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 5.4vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}

.lede,
.lede.headline {
  /* woodward-ui .headline metrics; keep weight 400 (override .headline’s 600) */
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 24px;
  color: var(--muted);
  max-width: 38rem;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  align-items: center;
}

.play-badge-lg picture {
  display: block;
}

.play-badge-lg img {
  display: block;
  height: 54px;
  width: auto;
}

.fine {
  color: var(--fine);
  /* between woodward-ui .caption and .subheadline */
  font-size: 13px;
  font-weight: 400;
  max-width: 24rem;
  line-height: 18px;
}

.band {
  width: 100%;
  max-width: var(--grid-max-width);
  margin: 0 auto;
  padding: 80px var(--grid-margin) 24px;
  display: grid;
  /* Direct children always span the band. Nested .features / .plans keep
     the 8-col tracks. Avoids Safari collapsing 1 / -1 on var() repeats. */
  grid-template-columns: minmax(0, 1fr);
  column-gap: var(--grid-gutter);
  row-gap: 0;
  box-sizing: border-box;
  overflow-x: clip;
}

.band.features-band {
  padding-block-start: 112px;
}

.band:last-of-type {
  padding-bottom: 96px;
}

.band > * {
  grid-column: 1 / -1;
  min-width: 0;
  max-width: 100%;
}

.band h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.03em;
  margin: 0 0 28px;
}

#ships-title,
#pro-title { margin-bottom: 16px; }

#ships-title + p { margin-top: 0; }

#pro-title + p { margin: 0 0 32px; }

.ships-lists {
  display: grid;
  gap: 32px;
}

.ships-lists h3 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 500;
}

.page .theme-showcase-panel {
  margin-block: 24px;
  container-type: inline-size;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: clamp(16px, 3vw, 36px);
}

.page .theme-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(128px, 100%), 1fr));
  align-items: start;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page .theme-showcase-card { margin: 0; }

.theme-showcase-card {
  position: relative;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: clamp(16px, 2.1vw, 30px);
  corner-shape: var(--corner-shape-squircle);
  background: #2c2c2e;
  box-shadow: 0 4px 10px rgb(0 0 0 / .2);
}

:root[data-theme="light"] .theme-showcase-card {
  background: #fff;
}

.theme-showcase-pick {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
}

.theme-showcase-pick:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.theme-showcase-card picture,
.theme-showcase-card img {
  display: block;
}

.theme-showcase-card img {
  width: 100%;
  height: auto;
}

.theme-showcase-label {
  display: grid;
  gap: 2px;
  padding: 9px 7px 7px;
  font: 13px/1.2 system-ui, sans-serif;
}

.theme-showcase-label span { color: var(--muted); }
.theme-showcase-label strong { font-weight: 500; }

@container (min-width: 560px) {
  .page .theme-showcase {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding: 0 12px 35px;
  }

  .theme-showcase-card {
    --fan-overlap: 24px;
    width: calc(100% + var(--fan-overlap));
    box-sizing: border-box;
    transform: translate(calc(var(--fan-overlap) / -2), var(--fan-offset, 0px)) rotate(var(--fan-angle, 0deg));
  }

  .theme-showcase-card:nth-child(even) { z-index: 1; }
  .theme-showcase-card:nth-child(3) { z-index: 2; }

  .theme-showcase-card:nth-child(1) { --fan-angle: -11deg; --fan-offset: 23px; }
  .theme-showcase-card:nth-child(2) { --fan-angle: -6deg; --fan-offset: 8px; }
  .theme-showcase-card:nth-child(4) { --fan-angle: 6deg; --fan-offset: 8px; }
  .theme-showcase-card:nth-child(5) { --fan-angle: 11deg; --fan-offset: 23px; }

}

@media (hover: hover) and (pointer: fine) {
  .theme-showcase-card:hover {
    z-index: 3;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .theme-showcase-card {
    transition: translate 180ms var(--ease);
  }

  .theme-showcase-card:hover {
    translate: 0 -8px;
  }

  /* Keep the hover target under the pointer as the card lifts. */
  .theme-showcase-card:hover::after {
    content: "";
    position: absolute;
    inset: 100% 0 auto;
    height: 8px;
  }
}

.theme-showcase-art {
  position: relative;
}

/* The PNG supplies the keyboard outline. Clip only the snow overlay to it. */
.theme-showcase-snow::after {
  clip-path: inset(0 round 5.6% / 8.7%);
}

@media (prefers-reduced-motion: no-preference) {
  .theme-showcase-snow::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
      radial-gradient(circle at 7px 11px, #fffc 0 1px, transparent 1.6px),
      radial-gradient(circle at 22px 27px, #fff9 0 1px, transparent 1.5px);
    background-size: 41px 53px, 59px 79px;
    animation: theme-preview-snowfall 9s linear infinite;
  }

  @keyframes theme-preview-snowfall {
    to { background-position: 41px 53px, -59px 79px; }
  }
}

#features-title,
#ships-title,
#pro-title,
#pro-title + p,
.ships-toolbar {
  padding-inline: 16px;
  box-sizing: border-box;
}

.theme-preview-snow {
  position: absolute;
  inset: 0 6px;
  width: calc(100% - 12px);
  height: 100%;
  clip-path: inset(0 round 5.6% / 8.7%);
}

.ships-toolbar {
  display: flex;
  margin-block-end: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.theme-snow-toggle {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  cursor: pointer;
}

.theme-snow-toggle input {
  appearance: none;
  display: grid;
  align-items: center;
  width: 32px;
  height: 18px;
  margin: 0;
  padding: 2px;
  border: 1px solid var(--muted);
  border-radius: 12px;
  background: var(--bg-surface-elevated-primary);
  cursor: pointer;
}

.theme-snow-toggle input::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
}

.theme-snow-toggle input:checked {
  border-color: var(--text-primary);
  background: var(--text-primary);
}

.theme-snow-toggle input:checked::before {
  justify-self: end;
  background: var(--bg-surface-elevated-primary);
}

.theme-snow-toggle input:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 3px;
}

.theme-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 0.5px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--line);
}

.theme-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  text-align: left;
  color: var(--text);
  background: var(--surface);
  border: 0;
  font: inherit;
  cursor: pointer;
}

.theme-row[data-previewing],
.theme-row:focus-visible {
  background: var(--bg-surface-elevated-primary);
}

.theme-row:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: -2px;
}

.theme-preview {
  position: fixed;
  z-index: 25;
  width: min(342px, calc(100vw - 32px));
  box-sizing: border-box;
  padding-inline: 6px;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 140ms ease, visibility 140ms;
}

.theme-preview.is-visible {
  visibility: visible;
  opacity: 1;
}

/* Exported iOS theme cards, shared by the hover preview and article artwork. */
.theme-preview > img,
.keyboard-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.keyboard-figure {
  width: 100%;
  margin: 24px 0;
}

.keyboard-figure img {
  max-width: 392px;
}

/* The source selects an image but must not take up a grid row. */
.keyboard-figure picture > source {
  display: none;
}

.page .keyboard-figure > picture,
.keyboard-figure-live {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 782 / 506;
  box-sizing: border-box;
  padding: 12px;
  background: var(--surface);
  border: 0.5px solid var(--line);
}

.keyboard-figure-live {
  position: relative;
  min-height: 0;
}

.keyboard-figure-stack {
  position: relative;
  width: min(100%, 418px);
}

.keyboard-figure-demo {
  --pt: calc(100cqi / 375);
  container-type: inline-size;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  corner-shape: var(--corner-shape-squircle);
  background: var(--article-keyboard-bg, var(--surface));
}

.article-keyboard-snow {
  position: absolute;
  inset: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  corner-shape: inherit;
  clip-path: inset(0 round var(--radius-lg));
  pointer-events: none;
}

.keyboard-figure-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 0 0 10px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  corner-shape: var(--corner-shape-squircle);
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.25 ui-monospace, monospace;
}

.keyboard-figure-input:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 1px;
}

.keyboard-figure-demo .kb-emoji-cell.is-demo-emoji {
  background: var(--kb-sel);
}

.keyboard-figure-demo .kb {
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.keyboard-figure-demo .kb-emoji-search {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 calc(36 * var(--pt));
  margin: 0 0 4px;
  padding-inline: 8px;
  background: var(--kb-face);
  color: var(--kb-pred);
}

.keyboard-figure-demo .kb-emoji-search svg,
.keyboard-figure-demo .kb-emoji-tab svg {
  flex: none;
  width: calc(18 * var(--pt));
  height: calc(18 * var(--pt));
}

.keyboard-figure-demo .kb-emoji-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--kb-ink);
  font: inherit;
  font-size: calc(14 * var(--pt));
}

.keyboard-figure-demo .kb-emoji-search input {
  box-shadow: none;
  padding: 0;
  line-height: 1;
}

.keyboard-figure-demo .kb-emoji-search input:focus {
  outline: none;
  box-shadow: none;
}

.keyboard-figure-demo .kb-emoji-search:focus-within {
  outline: 1px solid var(--kb-pred);
  outline-offset: -1px;
}

.keyboard-figure-demo .kb-emoji-search svg,
.keyboard-figure-demo .kb-emoji-tab svg {
  display: block;
}

.keyboard-figure-demo .kb-emoji-tab {
  display: grid;
  place-items: center;
}

.keyboard-figure-demo .kb-emoji-grid {
  position: relative;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  touch-action: pan-x;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  padding: 0;
}

.keyboard-figure-demo .kb-emoji-section {
  flex: none;
  height: 100%;
  margin: 0;
}

.keyboard-figure-demo .kb-emoji-cells {
  height: 100%;
  grid-template-columns: none;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  grid-auto-columns: calc(375 * var(--pt) / 8);
  grid-auto-flow: column;
}

.keyboard-figure-demo .kb-emoji-cell {
  height: 100%;
  font-size: calc(26 * var(--pt));
}

.keyboard-figure-demo .kb-emoji-cell:nth-child(4n + 1) {
  scroll-snap-align: start;
}

.keyboard-figure-demo .kb-emoji-bar {
  height: calc(40 * var(--pt));
}

.keyboard-figure-demo .kb-emoji-tabs button {
  box-shadow: none;
  background: transparent;
}

.keyboard-figure-demo .kb-emoji-tabs [aria-selected="true"] {
  background: var(--kb-sel);
}

.keyboard-figure-demo .kb-emoji-bar > .key {
  box-shadow: none;
  background: transparent;
}

.keyboard-figure-demo .kb-emoji-results.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 100%;
  text-align: center;
  scroll-snap-align: start;
}

.keyboard-figure-demo .kb-emoji-grid [hidden] {
  display: none;
}

.keyboard-figure-live::before,
.page .theme-showcase-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  mask: url("/img/keyboard-pixels.png") center / 100% 100% no-repeat;
  image-rendering: pixelated;
  pointer-events: none;
}

:root[data-theme="light"] :is(.keyboard-figure-live, .theme-showcase-panel)::before {
  background: #000;
  opacity: 0.8;
}

.page .theme-showcase-panel {
  position: relative;
}

.page .theme-showcase {
  position: relative;
}

.keyboard-figure-demo .kb-plus[hidden] {
  display: none;
}

.keyboard-figure-demo button:focus-visible {
  outline: 2px solid var(--kb-ink);
  outline-offset: -3px;
}

@media (min-width: 769px) {
  .page--comparison .enter > .keyboard-figure {
    /* Six tracks and five gutters within the eight-track comparison body. */
    width: calc(75% - var(--grid-gutter) / 4);
  }
}

.page .article-key-art {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 24px 0;
  padding: clamp(16px, 5vw, 40px);
  border: 0.5px solid var(--line);
  border-radius: var(--radius-xl);
  corner-shape: var(--corner-shape-squircle);
  background: var(--surface);
}

.article-key-art kbd {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  corner-shape: var(--corner-shape-squircle);
  background: var(--bg-surface-elevated-primary);
  box-shadow: 0 3px 0 var(--line);
  color: var(--text);
  font: 500 14px/1.3 var(--sans);
  text-align: center;
}

.keyboard-figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.content-grid .keyboard-figure {
  margin: 8px 0 0;
}

@media (max-width: 600px) {
  .theme-list { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .theme-preview { transition: none; }
}

.features {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  gap: var(--grid-gutter);
}

.feature {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: var(--radius-xl);
  corner-shape: var(--corner-shape-squircle);
  padding: 22px 22px 20px;
  min-width: 0;
  box-sizing: border-box;
}

.feature h3 {
  margin: 0 0 10px;
  /* woodward-ui .bodyEmphasis */
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
}

.feature p {
  margin: 0;
  flex: 1;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
}

.widgets {
  display: grid;
  gap: 0;
  border: 0.5px solid var(--line);
  border-radius: var(--radius-xl);
  corner-shape: var(--corner-shape-squircle);
  overflow: hidden;
  background: var(--surface);
}

.widget-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 11rem) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 0.5px solid var(--line);
}

.settings-preview-list .widget-row {
  appearance: none;
  border: 0;
  border-block-end: 0.5px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.settings-preview-list .widget-row[data-previewing] {
  background: var(--bg-surface-elevated-primary);
}

.settings-preview-list .widget-row:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: -2px;
}

.settings-phone-preview {
  position: fixed;
  z-index: 30;
  width: min(216px, calc(100vw - 32px), calc((100dvh - 32px) * 448 / 997));
  aspect-ratio: 448 / 997;
  overflow: hidden;
  border-radius: 32px;
  corner-shape: var(--corner-shape-squircle);
  background: #111;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.16), 0 22px 48px rgb(0 0 0 / 0.5);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms var(--ease), visibility 160ms;
}

.settings-phone-preview.is-visible {
  visibility: visible;
  opacity: 1;
}

.settings-phone-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  .settings-phone-preview { transition: none; }
}

.widget-row:last-child {
  border-bottom: 0;
}

.widget-row strong {
  font-weight: 500;
}

.widget-row span:not(.pill) {
  color: var(--muted);
  font-size: 13px;
}

.widget-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 12px;
  margin: 0;
}

.widget-gallery figure {
  margin: 0;
  min-width: 0;
}

.widget-gallery picture,
.widget-gallery img {
  display: block;
  width: 100%;
  height: auto;
}

.widget-gallery img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #0a0a0c;
  border-radius: 0;
}

.widget-gallery figcaption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px;
  row-gap: 4px;
  align-items: center;
  margin: 10px 0 0;
}

.widget-gallery .wg-name {
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: var(--text);
}

.widget-gallery .pill {
  justify-self: end;
}

.widget-gallery .wg-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--muted);
}

@media (min-width: 769px) {
  .widget-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px 14px;
  }

  .widget-gallery img {
    border-radius: var(--radius-lg);
    corner-shape: var(--corner-shape-squircle);
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.pill-free {
  background: var(--line);
  color: #fff;
}

.pill-pro,
:root[data-theme="light"] .plan.featured .badge {
  background-color: #9a9a9a;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.08) 100%),
    linear-gradient(90deg, #8e8e8e 0%, #bdbdbd 14%, #f2f2f2 32%, #fff 42%, #c9cbcf 60%, #e8e9ec 78%, #9a9a9a 100%);
  color: #1e1e1e;
  text-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

#pro-title {
  text-wrap: balance;
  line-height: 1.2;
}
.plans {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  gap: var(--grid-gutter);
  align-items: stretch;
  overflow: visible;
}

.plan {
  grid-column: span 2;
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: var(--radius-xl);
  corner-shape: var(--corner-shape-squircle);
  padding: 22px;
  position: relative;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
}

.plan.featured {
  grid-column: span 4;
  color: #141414;
  border: 0;
  position: relative;
  /* Same brushed plate as Tempo / Android paywall: horizontal bands, then a veil. */
  background-color: #c8c8c8;
  background-image:
    linear-gradient(
      180deg,
      rgba(208, 208, 208, 0) 0%,
      rgba(208, 208, 208, 0.28) 20%,
      rgba(208, 208, 208, 0.66) 44%,
      rgba(209, 209, 209, 0.88) 70%,
      rgba(212, 212, 212, 0.96) 100%
    ),
    linear-gradient(
      90deg,
      #c8c8c8 0%,
      #b2b2b2 13%,
      #8a8a8a 29%,
      #a6a6a6 43%,
      #cdcdcd 56%,
      #b4b4b4 63%,
      #888888 72%,
      #a8a8a8 85%,
      #c6c6c6 100%
    );
}

.coming-soon {
  font-size: 12px;
  color: var(--muted);
}

.plan.featured .coming-soon {
  color: #3a3a3a;
}

.plan.featured p,
.plan.featured .fine {
  color: #3a3a3a;
}

.badge {
  position: absolute;
  top: -8px;
  right: 16px;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--radius-full);
  corner-shape: round;
  overflow: hidden;
  background-color: #9a9a9a;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.08) 100%),
    linear-gradient(90deg, #8e8e8e 0%, #bdbdbd 14%, #f2f2f2 32%, #fff 42%, #c9cbcf 60%, #e8e9ec 78%, #9a9a9a 100%);
  color: #1e1e1e;
  text-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 3px 4px rgba(0, 0, 0, 0.35);
  font-size: 11px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Sheen travels via `left` (% of the badge). Start/end keep the whole
   band left/right of the pill so the loop reset never paints on-screen. */
.badge::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -140%;
  width: 120%;
  pointer-events: none;
  background-image: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 18%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(255, 255, 255, 0.08) 82%,
    transparent 100%
  );
  transform: skewX(-16deg);
}

@media (prefers-reduced-motion: no-preference) {
  .badge::after {
    animation: badge-shimmer 6.4s ease-in-out infinite;
  }
}

@keyframes badge-shimmer {
  0%,
  12% {
    left: -140%;
  }
  88%,
  100% {
    left: 150%;
  }
}

.badge i {
  width: 3px;
  height: 3px;
  border-radius: var(--radius-full);
  corner-shape: round;
  background: #2a2a2a;
  display: inline-block;
}

.plan h3 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 500;
}

.plan.featured h3 {
  font-weight: 700;
}

.plan p {
  margin: 0;
  color: var(--muted);
  /* woodward-ui .subheadline */
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.note {
  margin: 16px 0 0;
  color: var(--fine);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  max-width: 46rem;
}

.site-footer {
  /* Full-bleed chrome — independent of the 8-col content grid */
  border-top: 0.5px solid var(--line);
  width: 100%;
  padding: 34px var(--pad);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 22px;
  justify-content: space-between;
  color: var(--fine);
  /* woodward-ui .caption — one step below prior 13px footer size */
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.footer-logo {
  display: block;
  color: var(--text);
  overflow: visible;
}

.footer-logo-icon {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  corner-shape: var(--corner-shape-squircle);
  background: var(--bg-surface-elevated-primary);
  border: 0.5px solid var(--border);
  box-sizing: border-box;
  overflow: hidden;
}

.footer-logo-icon svg,
.footer-logo-icon img {
  display: block;
  width: 100%;
  height: 100%;
}

.footer-tagline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  margin: 0;
}

.footer-name {
  color: var(--text);
  font-weight: 500;
}

.footer-byline {
  color: var(--fine);
  font-weight: 400;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.site-footer a {
  color: var(--muted);
}

@media (max-width: 768px) {
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .site-footer nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* Article / legal / FAQ / 404 layout lives in /css/page.css (kept off the homepage critical path). */


@media (max-width: 860px) {
  .features,
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature,
  .plan,
  .plan.featured {
    grid-column: 1 / -1;
  }

  .widget-row {
    grid-template-columns: 1fr auto;
  }

  .widget-row span:not(.pill) {
    display: none;
  }

}

@media (max-width: 768px) {
  :root {
    --grid-columns: 4;
    --grid-gutter: 16px;
    --smart-banner-height: calc(68.5px + env(safe-area-inset-top, 0px));
  }

  .hero {
    margin-top: calc(0px - var(--nav) - var(--smart-banner-height));
  }

  .band {
    grid-template-columns: minmax(0, 1fr);
  }

  .band > * {
    grid-column: 1 / -1;
  }

  /* Always painted on mobile — CSS only, zero layout shift. !important
     beats the UA [hidden] rule so leftover markup cannot hide it. */
  .smart-banner,
  .smart-banner[hidden] {
    display: block !important;
    min-height: var(--smart-banner-height);
  }

  .hero-actions {
    display: none !important;
  }

  .nav-play {
    max-width: none;
  }

}

@media (max-width: 767px) {
  .nav .play-badge,
  .nav .play-badge img {
    height: 32px;
  }
}

@media (max-width: 640px) {
  .hero-copy h1 {
    font-size: 40px;
  }
}

@media (max-width: 359px) {
  .smart-banner-sub {
    text-overflow: ellipsis;
  }
}

/* —— Page-load appearance (transform + opacity; LCP stays painted) —— */

@keyframes enter-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes enter-fade {
  to {
    opacity: 1;
  }
}

@keyframes enter-lcp {
  to {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.enter-word {
  display: inline-block;
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  html.home.js [data-soft-blur]:not([data-ready]) {
    opacity: 0;
  }

  /* Homepage only. Sub pages keep .enter* classes but paint at rest. */
  html.home .enter {
    opacity: 0;
    transform: translateY(16px);
    animation: enter-rise var(--enter-duration) var(--enter-ease) forwards;
    animation-delay: calc(var(--enter-delay, 0) * 1s);
  }

  /* Sticky chrome: opacity only — transform would break position:sticky */
  html.home .enter-chrome {
    opacity: 0;
    animation: enter-fade var(--enter-duration) var(--enter-ease) forwards;
    animation-delay: calc(var(--enter-delay, 0) * 1s);
  }

  /* LCP surfaces: visible on first paint, transform-only lift */
  html.home .enter-lcp {
    opacity: 1;
    transform: translate3d(0, 10px, 0) scale(0.985);
    animation: enter-lcp var(--enter-duration) var(--enter-ease) forwards;
    animation-delay: calc(var(--enter-delay, 0) * 1s);
    will-change: transform;
  }

  /* Per-character reveal — stagger without blur */
  html.home .enter-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(16px);
    animation: enter-rise var(--enter-duration) var(--enter-ease) forwards;
    animation-delay: calc((var(--enter-base, 0.1) + var(--i, 0) * 0.025) * 1s);
  }

  html.home .enter.enter-done,
  html.home .enter-chrome.enter-done,
  html.home .enter-char.enter-done,
  html.home .enter-lcp.enter-done {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
    will-change: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.home .enter,
  html.home .enter-chrome,
  html.home .enter-char,
  html.home .enter-lcp {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  html.home.js [data-soft-blur]:not([data-ready]) {
    opacity: 1;
  }
}

/* Coming-soon waitlist (Play CTAs while PLAY_LIVE is false) */
html.waitlist-open,
html.waitlist-open body {
  overflow: hidden;
}

.waitlist-root {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.waitlist-root[hidden] {
  display: none;
}

.waitlist-dialog {
  position: relative;
  width: min(100%, 420px);
  padding: 28px 24px 24px;
  background: rgba(20, 19, 21, 0.86);
  border: 0.5px solid var(--line);
  border-radius: var(--radius-xxl);
  corner-shape: var(--corner-shape-squircle);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  opacity: 0;
  transform: scale(0.96);
  animation: waitlist-in 220ms var(--ease) forwards;
}

@keyframes waitlist-in {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.waitlist-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.waitlist-close::before,
.waitlist-close::after {
  content: "";
  grid-area: 1 / 1;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}

.waitlist-close::before { rotate: 45deg; }
.waitlist-close::after { rotate: -45deg; }

.waitlist-close:hover,
.waitlist-close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.waitlist-title {
  margin: 0 32px 10px 0;
  text-wrap: balance;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.waitlist-copy {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.waitlist-email {
  width: 100%;
  height: 48px;
  padding: 0 18px;
  border: 0.5px solid var(--line);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 24px;
  outline: none;
}

.waitlist-email:focus,
.waitlist-email:focus-visible {
  border-color: rgba(255, 255, 255, 0.45);
}

.waitlist-email[aria-invalid="true"] {
  border-color: #ef5350;
}

.waitlist-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.waitlist-submit {
  display: grid;
  place-items: center;
  width: 100%;
  height: 48px;
  margin-top: 6px;
  border: 0;
  border-radius: var(--radius-full);
  background: #fff;
  color: #000;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.waitlist-submit:hover {
  opacity: 0.92;
}

.waitlist-submit:active {
  transform: scale(0.98);
}

.waitlist-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.waitlist-error {
  margin: 0;
  color: #ef9a9a;
  font-size: 13px;
  line-height: 18px;
}

@media (max-width: 480px) {
  .waitlist-dialog {
    padding: 24px 18px 18px;
  }

  .waitlist-title {
    font-size: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .waitlist-dialog {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .waitlist-submit {
    transition: none;
  }
}

/* ——— Mobile-only (phones). Tablet/desktop stay as authored above. ——— */
@media (max-width: 768px) {
  /* Headline 18/24 → body 16/24. Weight stays 400. */
  .hero-copy .lede,
  .hero-copy .lede.headline {
    font-size: 16px;
    line-height: 24px;
  }

  .hero-phone {
    justify-self: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .hero-phone-stage {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    width: 100%;
    box-sizing: border-box;
    padding: 40px 0 24px;
    background: var(--background-primary);
    border: 0.5px solid var(--border);
    border-radius: 0;
    overflow-x: clip;
  }

  /* One grouped pricing container. Lifetime is the inverted white row,
     flush to the edges. An overlay hairline sits above the fill so the
     0.5px border still reads on the white cell. */
  .plans {
    position: relative;
    gap: 0;
    background: var(--background-primary);
    border: 0;
    border-radius: 0;
    overflow: hidden;
  }

  .plans::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 0.5px solid var(--border);
    pointer-events: none;
    z-index: 2;
  }

  .plan,
  .plan.featured {
    border: 0;
    border-radius: 0;
    corner-shape: round;
    height: auto;
    padding: 22px;
  }

  .plan {
    background: transparent;
    color: inherit;
  }

  .plan.featured {
    color: #141414;
  }

  .plan.featured p,
  .plan.featured .fine {
    color: #3a3a3a;
  }

  .plan + .plan {
    border-top: 0.5px solid var(--border);
  }

  /* relative — not static — so the badge sits in flow on stacked plans
     (the row is position: relative). */
  .plan.featured .badge {
    position: relative;
    top: auto;
    right: auto;
    margin: 0 0 8px;
    z-index: 1;
  }

  /* Cards and panels only — not pills, chips, buttons, app icons,
     the device frame, or widget tiles inside the phone. */
  .guide-index a,
  .feature,
  .plan,
  .widgets,
  .table-wrap,
  .callout,
  .waitlist-dialog,
  .calc,
  .hrv-stats div {
    border-radius: 0;
    corner-shape: round;
  }
}

/* Keycap95 store CTA (Play-badge slot) */
.store-cta {
  display: inline-grid;
  place-items: center;
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-full);
  background: #fff;
  color: #000;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.store-cta:hover,
.store-cta:focus-visible {
  color: #000;
  text-decoration: none;
  opacity: 0.92;
}
.store-cta:active {
  transform: scale(0.98);
}
a.nav-play.store-cta {
  height: 36px;
  padding: 0 13px;
  font-size: 14px;
}
.page .store-cta,
.page .store-cta:hover,
.page .store-cta:focus-visible {
  color: #000;
  font-weight: 500;
  text-decoration: none;
}

.checks {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}
.checks li {
  margin: 0 0 8px;
  padding: 14px 16px;
  border: 0.5px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-lg);
  corner-shape: var(--corner-shape-squircle);
}
.checks label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  color: var(--text);
  font-weight: 400;
}
.checks input {
  margin-top: 3px;
  flex-shrink: 0;
}
.progress {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 16px;
}

.accuracy {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 20px;
  margin-top: var(--space-xl);
}

/* Shared light appearance. */
:root[data-theme="light"] {
  color-scheme: light;
  --text-primary: var(--text);
  --text-primary-subdued: var(--muted);
  --text-secondary: var(--muted);
  --border: var(--line);
  --bg-primary: var(--bg);
  --bg-surface-primary: var(--surface);
  --bg-surface-raised: var(--raised);
  --bg: #f7f8f8;
  --surface: #fff;
  --raised: #eef1f1;
  --elevated: #e1e7e7;
  --text: #192325;
  --muted: #46565a;
  --fine: #526166;
  --line: rgba(27, 55, 58, .19);
}
:root[data-theme="light"] .nav { --nav-scrim: rgb(247 248 248 / .72); }
:root[data-theme="light"] .pill-free { background: #e1e9e8; color: #244344; }
:root[data-theme="light"] .store-cta { background: #000; color: white; }
:root[data-theme="light"] .site-footer a { color: var(--muted); }

:root[data-theme="light"] .plan.featured {
  background: var(--surface);
  border: 0.5px solid var(--line);
}

.nav-app-icon {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  corner-shape: var(--corner-shape-squircle);
  background: center / cover url("/img/nav-Stealth.png");
}

[data-theme="light"] .nav-app-icon { background-image: url("/img/nav-Classic.png"); }

.footer-app-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
}

.nav-app-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
}

@media (prefers-reduced-motion: reduce) {
  .nav::before, .nav::after { transition: none; }
}
