/* ==========================================================================
   TypeFree Official Website — Industrial Editorial Design System
   Light & Dark Dual Theme (Follows prefers-color-scheme + Manual Toggle)
   ========================================================================== */

:root {
  /* Light Theme — Warm Alabaster & Ink */
  --bg: #f7f7f5;
  --bg-elevated: #ffffff;
  --bg-subtle: #efefe9;
  --bg-glass: rgba(247, 247, 245, 0.78);
  --bg-code: #f1f3f5;
  --border: rgba(17, 19, 24, 0.09);
  --border-strong: rgba(17, 19, 24, 0.16);
  --text: #111318;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --accent: #059669;
  --accent-hover: #047857;
  --accent-soft: rgba(5, 150, 105, 0.1);
  --accent-border: rgba(5, 150, 105, 0.25);
  --accent-2: #0284c7;
  --accent-2-soft: rgba(2, 132, 199, 0.1);
  --warn: #d97706;
  --warn-soft: rgba(217, 119, 6, 0.12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.1);

  /* Keycap & Tactile Surfaces */
  --key-bg: #ffffff;
  --key-bg-alt: #e8e9ee;
  --key-shadow: 0 2px 0 rgba(17, 19, 24, 0.14), 0 1px 2px rgba(17, 19, 24, 0.06);
  --card-shadow: 0 1px 2px rgba(17, 19, 24, 0.04), 0 8px 28px rgba(17, 19, 24, 0.04);
  --card-shadow-hover: 0 2px 6px rgba(17, 19, 24, 0.06), 0 16px 40px rgba(17, 19, 24, 0.08);
  --phone-bezel: #181a20;
  --phone-ring: rgba(17, 19, 24, 0.14);
  --grid-line: rgba(17, 19, 24, 0.045);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI",
    Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "HarmonyOS Sans SC", "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;

  --container: 1180px;
  --nav-h: 68px;
}

[data-theme="dark"] {
  --bg: #0b0d11;
  --bg-elevated: #13171f;
  --bg-subtle: #1a202b;
  --bg-glass: rgba(11, 13, 17, 0.76);
  --bg-code: #171c26;
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f5f8;
  --text-secondary: #a1aab8;
  --text-muted: #768091;
  --accent: #10b981;
  --accent-hover: #34d399;
  --accent-soft: rgba(16, 185, 129, 0.14);
  --accent-border: rgba(16, 185, 129, 0.32);
  --accent-2: #38bdf8;
  --accent-2-soft: rgba(56, 189, 248, 0.13);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.15);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.14);

  --key-bg: #222835;
  --key-bg-alt: #181d27;
  --key-shadow: 0 2px 0 rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 32px rgba(0, 0, 0, 0.35);
  --card-shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.07) inset, 0 20px 48px rgba(0, 0, 0, 0.5);
  --phone-bezel: #090b0f;
  --phone-ring: rgba(255, 255, 255, 0.14);
  --grid-line: rgba(255, 255, 255, 0.035);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  transition: background-color 0.2s ease, color 0.2s ease;
  max-width: 100%;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

code,
pre,
kbd {
  font-family: var(--font-mono);
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Ambient Hero Grid Backdrop */
.bg-grid-stage {
  position: relative;
}

.bg-grid-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 65% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 0%, #000 30%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.bg-grid-stage > * {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--nav-h);
  background: var(--bg-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
}

.brand-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  font-family: var(--font-mono);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--bg-subtle);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.mobile-menu-btn {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}

[data-theme="dark"] .btn-primary {
  background: #ffffff;
  color: #0b0d11;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn-accent {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.28);
}

.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 10px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 64px 0 84px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 22px;
  box-shadow: var(--card-shadow);
}

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

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}

.gradient-text {
  background: linear-gradient(115deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: clamp(16px, 1.6vw, 18.5px);
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 28px;
  max-width: 560px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-meta-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.hero-meta-links a,
.hero-meta-links button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.hero-meta-links a:hover,
.hero-meta-links button:hover {
  color: var(--accent);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.trust-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.trust-label {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Hero Right: Titanium Phone Showcase */
.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  position: relative;
}

.hero-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22) 0%, rgba(56, 189, 248, 0.1) 45%, transparent 72%);
  filter: blur(36px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  pointer-events: none;
  z-index: 0;
}

.phone-frame {
  position: relative;
  z-index: 1;
  width: 306px;
  aspect-ratio: 9 / 16;
  padding: 10px;
  border-radius: 40px;
  background: linear-gradient(145deg, #272b35 0%, #101218 100%);
  box-shadow:
    0 0 0 1px var(--phone-ring),
    0 24px 64px rgba(0, 0, 0, 0.26),
    inset 0 1px 1px rgba(255, 255, 255, 0.22);
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 31px;
  overflow: hidden;
  background: #f5f5f5;
}

.phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 68px;
  height: 16px;
  border-radius: 999px;
  background: #0c0e13;
  z-index: 6;
}

.phone-stage {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.phone-stage.active {
  opacity: 1;
  pointer-events: auto;
}

.phone-stage img,
.phone-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stage-badge {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(15, 18, 24, 0.82);
  backdrop-filter: blur(10px);
  color: #f9fafb;
  font-size: 12px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.stage-badge .pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  flex-shrink: 0;
}

.hero-switcher {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
}

.switch-pill {
  padding: 6px 11px;
  border-radius: 9px;
  border: none;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.switch-pill:hover {
  color: var(--text);
}

.switch-pill.active {
  background: var(--text);
  color: var(--bg);
}

[data-theme="dark"] .switch-pill.active {
  background: #ffffff;
  color: #0b0d11;
}

/* ==========================================================================
   Section Headers & Generic Cards
   ========================================================================== */
.section {
  padding: 84px 0;
}

.section-tight {
  padding: 56px 0;
}

.section-divider {
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: 720px;
  margin-bottom: 44px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
}

.section-head p {
  margin: 0;
  font-size: 16px;
  color: var(--text-secondary);
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--border-strong);
}

/* ==========================================================================
   Comparison Matrix (Why TypeFree)
   ========================================================================== */
.compare-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--card-shadow);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 14px;
}

.compare-table th,
.compare-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.compare-table thead th {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-secondary);
  background: var(--bg-subtle);
}

.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table .col-tf {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}

.compare-table thead .col-tf {
  color: var(--accent);
  font-size: 14.5px;
}

.cmp-dim {
  font-weight: 600;
  color: var(--text);
  width: 170px;
}

.tag-good {
  color: var(--accent);
  font-weight: 600;
}

.tag-mid {
  color: var(--warn);
}

.tag-bad {
  color: var(--text-muted);
}

/* ==========================================================================
   Four Flagship Pillars (Alternating Deep-Dive Showcases)
   ========================================================================== */
.pillars-stack {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.pillar-card {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 44px;
  padding: 36px;
  align-items: center;
}

.pillar-card.reverse .pillar-copy {
  order: 2;
}

.pillar-card.reverse .pillar-media {
  order: 1;
}

.pillar-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 14px;
}

.pillar-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.pillar-copy > p {
  color: var(--text-secondary);
  margin: 0 0 22px;
  font-size: 15px;
}

.pillar-points {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pillar-points li {
  position: relative;
  padding-left: 30px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.pillar-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pillar-points strong {
  color: var(--text);
  font-weight: 650;
}

.pillar-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.media-phone-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 460px;
}

.media-shot {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: #101218;
  box-shadow: var(--card-shadow);
  cursor: zoom-in;
  aspect-ratio: 9 / 16;
}

.media-shot.video-shot {
  cursor: pointer;
}

.media-shot img,
.media-shot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-caption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(11, 13, 17, 0.78);
  backdrop-filter: blur(8px);
  color: #f3f5f8;
  font-size: 11.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.media-caption .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}

/* Mockup Stage Inside Pillar (for AI Voice & Jev before real audio recordings) */
.ui-sim-card {
  width: 100%;
  max-width: 460px;
  border-radius: 22px;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.sim-bubble-in {
  align-self: flex-start;
  max-width: 88%;
  padding: 11px 14px;
  border-radius: 14px 14px 14px 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 13.5px;
  line-height: 1.55;
}

.sim-bubble-out {
  align-self: flex-end;
  max-width: 88%;
  padding: 11px 14px;
  border-radius: 14px 14px 4px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  font-size: 13.5px;
  line-height: 1.55;
}

.sim-radar {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--warn-soft);
  border: 1px solid rgba(245, 158, 11, 0.28);
  font-size: 12.5px;
  color: var(--text);
}

.sim-radar strong {
  color: var(--warn);
}

.sim-cards-3 {
  display: grid;
  gap: 8px;
}

.sim-strat {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sim-strat.recommended {
  border-color: var(--accent-border);
  background: linear-gradient(180deg, var(--accent-soft), var(--bg-elevated));
}

.sim-strat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
}

.voice-wave-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 30px;
}

.voice-wave-bar span {
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  animation: wavePulse 1.3s ease-in-out infinite;
}

.voice-wave-bar span:nth-child(1) { height: 10px; animation-delay: 0s; }
.voice-wave-bar span:nth-child(2) { height: 22px; animation-delay: 0.15s; }
.voice-wave-bar span:nth-child(3) { height: 28px; animation-delay: 0.3s; }
.voice-wave-bar span:nth-child(4) { height: 16px; animation-delay: 0.45s; }
.voice-wave-bar span:nth-child(5) { height: 24px; animation-delay: 0.6s; }
.voice-wave-bar span:nth-child(6) { height: 12px; animation-delay: 0.75s; }

@keyframes wavePulse {
  0%, 100% { transform: scaleY(0.55); opacity: 0.7; }
  50% { transform: scaleY(1.1); opacity: 1; }
}

/* ==========================================================================
   Interactive Playground Workbench
   ========================================================================== */
.playground-shell {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  box-shadow: var(--card-shadow-hover);
  overflow: hidden;
}

.pg-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 18px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.pg-tab {
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
}

.pg-tab:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.pg-tab.active {
  color: var(--text);
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  box-shadow: var(--card-shadow);
}

.pg-body {
  padding: 28px;
}

.pg-panel {
  display: none;
}

.pg-panel.active {
  display: block;
}

.pg-split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 28px;
  align-items: start;
}

.pg-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pg-controls h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 750;
}

.pg-controls p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.chip:hover {
  color: var(--text);
}

.chip.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

.pg-stage-box {
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Playground 1: Voice Net-Write */
.voice-stream-box {
  min-height: 92px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  font-size: 15px;
  line-height: 1.65;
}

.stream-draft {
  text-decoration: underline dashed var(--accent-2);
  text-underline-offset: 4px;
  color: var(--text-secondary);
}

.stream-final {
  color: var(--text);
  font-weight: 600;
}

.arc-wheel {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.arc-lang {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.arc-lang.active {
  background: var(--accent-2-soft);
  border-color: var(--accent-2);
  color: var(--accent-2);
}

/* Playground 2: Jev Interactive */
.jev-input-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  font-size: 13.5px;
  min-height: 44px;
}

.jev-strat-btn {
  text-align: left;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: all 0.15s ease;
}

.jev-strat-btn:hover {
  border-color: var(--accent-border);
  transform: translateY(-1px);
}

.jev-strat-btn.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Playground 3: Interactive Mini Keyboard (26-Key & 9-Key T9) */
.kb-output-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  min-height: 44px;
  font-size: 14.5px;
}

.kb-preedit-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
}

.kb-cands {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
  min-height: 36px;
}

.kb-cand {
  padding: 5px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

.kb-cand.first {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

.mini-kb-26 {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px;
  border-radius: 16px;
  background: var(--bg-subtle);
}

.kb-row {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.kb-key {
  position: relative;
  flex: 1;
  max-width: 50px;
  height: 48px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--key-bg);
  box-shadow: var(--key-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 8px;
  transition: transform 0.08s ease, background-color 0.1s ease;
  user-select: none;
}

.kb-key.no-badge {
  padding-top: 0;
}

.kb-key:active {
  transform: translateY(1px);
  background: var(--accent-soft);
}

.kb-badge {
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  line-height: 1;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.kb-main {
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

/* Mini T9 Keyboard */
.mini-kb-t9 {
  display: grid;
  grid-template-columns: 64px repeat(3, minmax(0, 1fr)) 68px;
  gap: 7px;
  padding: 10px;
  border-radius: 16px;
  background: var(--bg-subtle);
}

.t9-rail {
  grid-row: 1 / span 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--key-bg-alt);
  padding: 5px;
  border-radius: 11px;
}

.t9-rail-item {
  flex: 1;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.t9-rail-item.active,
.t9-rail-item:hover {
  background: var(--key-bg);
  color: var(--accent);
  box-shadow: var(--card-shadow);
}

.t9-key {
  height: 54px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--key-bg);
  box-shadow: var(--key-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.t9-key:active {
  transform: translateY(1px);
  background: var(--accent-soft);
}

.t9-num {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1;
}

.t9-letters {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.t9-fn {
  background: var(--key-bg-alt);
  font-size: 13px;
  font-weight: 600;
}

.t9-enter {
  grid-row: 3 / span 2;
  grid-column: 5;
  height: auto;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
}

[data-theme="dark"] .t9-enter {
  background: #ffffff;
  color: #0b0d11;
}

/* Playground 4: Privacy Redactor */
.redact-textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  resize: vertical;
  line-height: 1.6;
  font-size: 14px;
}

.redact-output {
  min-height: 120px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--accent-border);
  background: var(--bg-elevated);
  line-height: 1.7;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.redact-token {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

/* ==========================================================================
   Complete Feature Matrix (All 30+ v3.8.0 Features)
   ========================================================================== */
.matrix-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feat-card {
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.feat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.feat-card.hidden {
  display: none;
}

.feat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.feat-title {
  font-weight: 700;
  font-size: 15px;
}

.feat-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  flex-shrink: 0;
}

.feat-badge.new {
  background: var(--accent-soft);
  color: var(--accent);
}

.feat-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Gallery Strip (Real Public v3.8.0 App Screens)
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gallery-thumb {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  aspect-ratio: 9 / 16;
  cursor: zoom-in;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-thumb:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-label {
  font-size: 13.5px;
  font-weight: 650;
}

.gallery-sub {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   API Combinations & Privacy Banner
   ========================================================================== */
.zero-key-banner {
  padding: 18px 22px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 14.5px;
}

.api-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.api-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.api-card h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
}

.api-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.api-meta code {
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--bg-code);
  color: var(--text);
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.privacy-card {
  padding: 20px;
}

.privacy-card h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
}

.privacy-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Download & QR CTA Panel
   ========================================================================== */
.download-box {
  padding: 40px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 90% 10%, rgba(16, 185, 129, 0.14), transparent 50%),
    radial-gradient(circle at 10% 90%, rgba(56, 189, 248, 0.1), transparent 50%),
    var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--card-shadow-hover);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 36px;
  align-items: center;
}

.download-box h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.025em;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 18px;
}

.checksum-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 100%;
}

.checksum-bar code {
  word-break: break-all;
  color: var(--text);
}

.qr-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  color: #111318;
  border: 1px solid rgba(17, 19, 24, 0.12);
  text-align: center;
}

.qr-panel svg {
  width: 156px;
  height: 156px;
}

.qr-panel span {
  font-size: 12px;
  font-weight: 650;
  color: #374151;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding: 48px 0 56px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13.5px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h5 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   In-Site Documentation Pages (/docs/guide/, /docs/api/, /docs/jev/)
   ========================================================================== */
.docs-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
  padding: 40px 0 88px;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  max-height: calc(100vh - var(--nav-h) - 44px);
  overflow-y: auto;
  padding-right: 12px;
}

.docs-switcher {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.docs-switcher a {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.docs-switcher a:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.docs-switcher a.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

.toc-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 10px 10px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.toc-list a {
  display: block;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  border-left: 2px solid transparent;
}

.toc-list a.level-3 {
  padding-left: 22px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

.docs-article {
  min-width: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  box-shadow: var(--card-shadow);
}

.docs-article h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.24;
  margin: 0 0 18px;
  letter-spacing: -0.025em;
}

.docs-article h2 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 42px 0 14px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

.docs-article h3 {
  font-size: 17px;
  margin: 26px 0 10px;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

.docs-article h4 {
  font-size: 15px;
  margin: 18px 0 8px;
}

.docs-article p,
.docs-article li {
  color: var(--text-secondary);
}

.docs-article strong {
  color: var(--text);
}

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

.docs-article ul,
.docs-article ol {
  padding-left: 22px;
}

.docs-article li + li {
  margin-top: 6px;
}

.docs-article blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 12px 12px 0;
  color: var(--text);
}

.docs-article blockquote p {
  margin: 0;
  color: var(--text);
}

.docs-article code {
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-code);
  color: var(--text);
}

.docs-article pre {
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--bg-code);
  border: 1px solid var(--border);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
}

.docs-article pre code {
  background: none;
  padding: 0;
}

.docs-article .table-scroll {
  overflow-x: auto;
  margin: 18px 0;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.docs-article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.docs-article th,
.docs-article td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.docs-article th {
  background: var(--bg-subtle);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.docs-article td:first-child {
  white-space: nowrap;
}

.docs-article tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   Lightbox, Modal & Toast
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 10, 14, 0.86);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-height: 88vh;
  max-width: min(520px, 92vw);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 22px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(20, 24, 32, 0.8);
  color: #ffffff;
  font-size: 20px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  z-index: 220;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid,
  .pillar-card,
  .pg-split,
  .download-box {
    grid-template-columns: minmax(0, 1fr);
  }

  .pillar-card.reverse .pillar-copy,
  .pillar-card.reverse .pillar-media {
    order: initial;
  }

  .matrix-grid,
  .api-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid,
  .privacy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .docs-sidebar {
    position: static;
    max-height: none;
    padding: 18px;
    border-radius: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
  }

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

@media (max-width: 720px) {
  .container {
    width: calc(100% - 28px);
  }

  .nav-inner {
    gap: 10px;
  }

  .brand {
    gap: 8px;
    font-size: 15px;
  }

  .brand img {
    width: 30px;
    height: 30px;
  }

  .brand-tag {
    display: none;
  }

  .nav-actions {
    gap: 6px;
  }

  .nav-actions .btn-sm {
    padding: 7px 10px;
    font-size: 12px;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
  }

  .phone-frame {
    width: min(296px, 100%);
  }

  .media-phone-pair {
    grid-template-columns: minmax(0, 1fr);
    max-width: 300px;
  }

  .mini-kb-t9 {
    grid-template-columns: 52px repeat(3, minmax(0, 1fr)) 54px;
    gap: 5px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 18px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--card-shadow-hover);
  }

  .nav-links.open {
    display: flex;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .hero {
    padding: 38px 0 56px;
  }

  .trust-strip {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .section {
    padding: 58px 0;
  }

  .pillar-card {
    padding: 22px;
    gap: 24px;
  }

  .pg-body {
    padding: 18px;
  }

  .matrix-grid,
  .api-grid,
  .privacy-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .download-box {
    padding: 26px 20px;
  }

  .docs-article {
    padding: 24px 18px;
  }
}
