/* ==========================================================================
   ToonMio Web — Minimal Editorial Design System
   Pure white canvas, crisp hairlines, disciplined typography
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-subtle: #f5f5f7;
  --bg-hover: #efeff2;
  --surface: #ffffff;

  --ink: #111113;
  --ink-2: #52525b;
  --ink-3: #86868f;

  --line: #e6e6eb;
  --line-strong: #d1d1d9;

  --accent: #d94332;
  --accent-hover: #b83324;
  --accent-soft: rgba(217, 67, 50, 0.08);

  --success: #158455;
  --success-soft: rgba(21, 132, 85, 0.08);
  --warn: #b45309;
  --warn-soft: rgba(180, 83, 9, 0.08);
  --danger: #c81e1e;
  --danger-soft: rgba(200, 30, 30, 0.08);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --container: 1040px;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Prose fallback visibility for long legal/FAQ pages:
   zh-CN and zh-TW show Chinese prose; other languages show English prose (with polite localized notice) */
html:not([data-lang="zh-CN"]):not([data-lang="zh-TW"]) .lang-zh { display: none !important; }
html[data-lang="zh-CN"] .lang-en,
html[data-lang="zh-TW"] .lang-en { display: none !important; }

html[data-lang="en"] .legal-lang-banner,
html[data-lang="zh-CN"] .legal-lang-banner,
html[data-lang="zh-TW"] .legal-lang-banner { display: none !important; }

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

main {
  flex: 1;
}

/* ==========================================================================
   Header — Clean 58px Bar + Globe Language Dropdown
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16.5px;
  letter-spacing: -0.02em;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  box-shadow: 0 1px 3px rgba(17, 17, 19, 0.14);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}

.nav-links a[aria-current="page"] {
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Globe Language Dropdown (Reference style: 🌐 EN -> white floating menu) */
.lang-dropdown {
  position: relative;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  transition: background 0.15s ease;
  line-height: 1;
}

.lang-trigger:hover,
.lang-dropdown.open .lang-trigger {
  background: var(--bg-subtle);
}

.lang-trigger svg {
  width: 16px;
  height: 16px;
  color: var(--ink);
  flex-shrink: 0;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 152px;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 19, 0.08);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(17, 17, 19, 0.10), 0 2px 6px rgba(17, 17, 19, 0.05);
  display: none;
  flex-direction: column;
  gap: 1px;
  z-index: 80;
}

.lang-dropdown.open .lang-menu {
  display: flex;
}

.lang-option {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink-2);
  transition: background 0.12s ease, color 0.12s ease;
}

.lang-option:hover {
  background: var(--bg-subtle);
  color: var(--ink);
}

.lang-option.active {
  color: var(--ink);
  font-weight: 700;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}

.mobile-drawer {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 8px 24px 16px;
}

.mobile-drawer.open {
  display: block;
}

.mobile-drawer a {
  display: block;
  padding: 10px 0;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}

.mobile-drawer a:last-child {
  border-bottom: none;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  padding: 11px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: #ffffff;
}

.btn-primary:hover {
  background: #2c2c32;
}

.btn-accent {
  background: var(--accent);
  color: #ffffff;
}

.btn-accent:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
}

/* ==========================================================================
   Homepage — Editorial Hero & Interactive Sweeping Manga Spread
   ========================================================================== */
.hero-minimal {
  padding: 60px 0 42px;
}

.hero-top {
  max-width: 720px;
}

.hero-top h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.1vw, 44px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 16px;
}

.hero-top p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 26px;
  max-width: 610px;
}

.hero-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}

.hero-note {
  font-size: 13px;
  color: var(--ink-3);
}

/* Interactive Manga Spread Stage */
.stage-section {
  padding: 0 0 84px;
}

.stage-frame {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.stage-sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.demo-book-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.demo-cover-wrap {
  width: 192px;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 19, 0.10);
  box-shadow: 0 10px 26px rgba(17, 17, 19, 0.10), 0 1px 3px rgba(17, 17, 19, 0.06);
}

.demo-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo-book-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
}

.demo-book-sub {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 2px;
}

.stage-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
}

.seg-bar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: #e9e9ee;
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
  width: 100%;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 4px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.seg-btn:hover {
  color: var(--ink);
}

.seg-btn.active {
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07);
}

.lang-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip-btn {
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.14s ease;
}

.chip-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.chip-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.stage-hint {
  font-size: 12px;
  line-height: 1.58;
  color: var(--ink-3);
}

/* Manga Interior Page with Live Sweeping Compare Curtain */
.stage-page-area {
  display: flex;
  justify-content: center;
}

.manga-sheet {
  --split: 50%;
  position: relative;
  width: 100%;
  max-width: 492px;
  aspect-ratio: 848 / 1264;
  background: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 19, 0.10);
  box-shadow: 0 16px 40px rgba(17, 17, 19, 0.09), 0 2px 6px rgba(17, 17, 19, 0.05);
  user-select: none;
  touch-action: pan-y;
}

.manga-sheet[data-mode="compare"] {
  cursor: ew-resize;
}

.manga-sheet img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Two full-page text layers for pixel-accurate curtain wiping:
   - layer-original: Japanese vertical original (visible on RIGHT of split, or full in Original)
   - layer-translated: Translated speech bubbles (clipped to LEFT of split in Compare, or full in Translated) */
.sheet-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sheet-layer-original {
  z-index: 2;
}

.sheet-layer-translated {
  z-index: 3;
}

/* Mode visibility & curtain clipping matching ToonMio Android ReaderScreen.kt:
   Left of split = Translated, Right of split = Original */
.manga-sheet[data-mode="translated"] .sheet-layer-original {
  opacity: 0;
}
.manga-sheet[data-mode="translated"] .sheet-layer-translated {
  clip-path: inset(0 0 0 0);
}

.manga-sheet[data-mode="original"] .sheet-layer-translated {
  opacity: 0;
}
.manga-sheet[data-mode="original"] .sheet-layer-original {
  clip-path: inset(0 0 0 0);
}

.manga-sheet[data-mode="clean"] .sheet-layer-original,
.manga-sheet[data-mode="clean"] .sheet-layer-translated {
  opacity: 0;
}

.manga-sheet[data-mode="compare"] .sheet-layer-translated {
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
}
.manga-sheet[data-mode="compare"] .sheet-layer-original {
  clip-path: inset(0 0 0 var(--split));
}

/* Speech bubble ovals aligned precisely to demo-manga-page.webp */
.bubble-layer {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5px 3px;
  border-radius: 50%;
  background: #ffffff;
}

.bubble-1 {
  left: 76.4%;
  top: 9.6%;
  width: 11.1%;
  height: 15.4%;
}

.bubble-2 {
  left: 9.8%;
  top: 56.0%;
  width: 14.6%;
  height: 15.0%;
}

.bubble-text {
  color: #111113;
  font-weight: 700;
  font-size: 9.8px;
  line-height: 1.3;
  white-space: pre-line;
  word-break: keep-all;
}

.bubble-2 .bubble-text {
  font-size: 10.2px;
}

.bubble-text.is-vertical {
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 0.06em;
  line-height: 1.35;
  font-size: 10.5px;
}

/* Compare Divider Line & Tactile Handle (mirrors Android ReaderScreen.kt) */
.compare-ui {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.manga-sheet[data-mode="compare"] .compare-ui {
  opacity: 1;
}

.compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 2px;
  transform: translateX(-1px);
  background: rgba(17, 17, 19, 0.78);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.compare-knob {
  position: absolute;
  top: 50%;
  left: var(--split);
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #111113;
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 14px rgba(17, 17, 19, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: ew-resize;
}

.compare-knob svg {
  width: 16px;
  height: 16px;
}

.compare-pill {
  position: absolute;
  top: 12px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(17, 17, 19, 0.76);
  color: #ffffff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  letter-spacing: 0.01em;
}

.compare-pill-left {
  left: 12px;
}

.compare-pill-right {
  right: 12px;
}

/* ==========================================================================
   Editorial Sections (Swiss Index & Clean Spec Tables)
   ========================================================================== */
.editorial-section {
  padding: 76px 0;
  border-top: 1px solid var(--line);
}

.section-header-row {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 44px;
  margin-bottom: 42px;
  align-items: baseline;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--ink);
}

.section-subtitle {
  margin-top: 10px;
  font-size: 15px;
  color: var(--ink-2);
  max-width: 600px;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 56px;
}

.index-item {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.index-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  padding-top: 3px;
}

.index-item h3 {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 6px;
}

.index-item p {
  font-size: 14px;
  line-height: 1.72;
  color: var(--ink-2);
}

/* Spec Tables Layout */
.spec-stack {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.spec-block-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.spec-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--line);
}

.spec-table td {
  padding: 15px 16px 15px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-2);
  line-height: 1.6;
}

.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-table td:first-child {
  color: var(--ink);
  font-weight: 600;
  width: 30%;
}

.spec-table .col-price {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  width: 22%;
}

.spec-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.65;
  max-width: 740px;
}

/* Quiet Download Band */
.quiet-band {
  padding: 52px 0;
  border-top: 1px solid var(--line);
  background: var(--bg-subtle);
}

.quiet-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.quiet-row h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.quiet-row p {
  font-size: 14px;
  color: var(--ink-2);
}

.quiet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   Documentation & Compliance Pages (Privacy, Terms, Delete Account, Support)
   ========================================================================== */
.doc-hero {
  padding: 52px 0 32px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.doc-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 12px;
}

.doc-breadcrumb a:hover {
  color: var(--ink);
}

.doc-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 10px;
}

.doc-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
  color: var(--ink-3);
}

.legal-lang-banner {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--ink-2);
  margin-bottom: 24px;
}

.doc-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 48px;
  padding: 44px 0 80px;
  align-items: start;
}

.doc-toc {
  position: sticky;
  top: 80px;
}

.doc-toc-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 10px;
}

.doc-toc ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--line);
}

.doc-toc a {
  display: block;
  padding: 5px 0 5px 14px;
  font-size: 13px;
  color: var(--ink-2);
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.doc-toc a:hover {
  color: var(--ink);
  border-left-color: var(--line-strong);
}

.doc-content {
  max-width: 720px;
}

.doc-content h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 38px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 80px;
}

.doc-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.doc-content h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 22px 0 8px;
}

.doc-content p {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-2);
  margin-bottom: 14px;
}

.doc-content ul,
.doc-content ol {
  margin: 0 0 18px 20px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.75;
}

.doc-content li {
  margin-bottom: 6px;
}

.doc-content strong {
  color: var(--ink);
  font-weight: 600;
}

.doc-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc-content a:hover {
  color: var(--accent-hover);
}

.doc-content code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--bg-subtle);
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--ink);
}

.callout {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 18px 0 24px;
}

.callout.warn {
  background: #fffcf6;
  border-color: rgba(180, 83, 9, 0.22);
  border-left-color: var(--warn);
}

.callout.danger {
  background: #fff9f9;
  border-color: rgba(200, 30, 30, 0.20);
  border-left-color: var(--danger);
}

.callout-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 5px;
}

.callout p:last-child {
  margin-bottom: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 18px 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.data-table th {
  background: var(--bg-subtle);
  color: var(--ink);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: top;
  line-height: 1.55;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.status-pill {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.status-pill.deleted {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-pill.retained {
  background: var(--warn-soft);
  color: var(--warn);
}

.status-pill.local {
  background: var(--success-soft);
  color: var(--success);
}

/* Forms (Delete Account) */
.form-card {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 20px 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.field-hint {
  font-size: 12px;
  color: var(--ink-3);
}

.input,
.textarea,
.select {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.15s ease;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--ink);
}

.textarea {
  min-height: 92px;
  resize: vertical;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
  margin: 12px 0 18px;
  cursor: pointer;
}

.checkbox-row input {
  margin-top: 3px;
  width: 15px;
  height: 15px;
  accent-color: var(--ink);
  flex-shrink: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.form-feedback {
  margin-top: 14px;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: none;
}

.form-feedback.show {
  display: block;
}

.form-feedback.ok {
  background: var(--success-soft);
  color: var(--success);
}

.form-feedback.err {
  background: var(--danger-soft);
  color: var(--danger);
}

.preview-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Support FAQ & Contact Cards */
.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 44px;
}

.support-card {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.support-card p {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.58;
  margin-bottom: 6px;
}

.support-card a.link-arrow {
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.faq-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filter-pill {
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.filter-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 17px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  width: 17px;
  height: 17px;
  color: var(--ink-3);
  transition: transform 0.18s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--ink);
}

.faq-body {
  padding: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--ink-2);
  max-width: 72ch;
}

/* ==========================================================================
   Site Footer (Clean, ends cleanly after columns — no redundant bottom bar)
   ========================================================================== */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 48px 0 56px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer-brand-desc {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.65;
  margin-top: 10px;
  max-width: 260px;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  font-size: 13px;
  color: var(--ink-2);
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--ink);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .stage-frame {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 28px;
  }

  .stage-sidebar {
    order: 2;
  }

  .demo-cover-wrap {
    width: 132px;
  }

  .demo-book-card {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .section-header-row,
  .index-grid,
  .support-grid,
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .doc-toc {
    position: static;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero-minimal {
    padding: 40px 0 28px;
  }

  .stage-section {
    padding-bottom: 56px;
  }

  .editorial-section {
    padding: 52px 0;
  }

  .form-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .spec-table td:first-child,
  .spec-table .col-price {
    width: auto;
  }
}

@media print {
  .site-header, .site-footer, .doc-toc, .lang-dropdown {
    display: none !important;
  }
  .doc-layout {
    display: block;
    padding: 0;
  }
}
