/* Author: Guanghui Liang */

:root {
  color-scheme: light;
  /* Core warm paper & ink tokens aligned with Theme.swift */
  --paper: #f5f1e8;
  --paper-deep: #ece6d8;
  --surface: #fefcf6;
  --surface-tint: #f8f4ec;
  --ink: #2e2b26;
  --ink-secondary: #585249;
  --ink-muted: #6c655b;
  --hairline: rgba(46, 43, 38, 0.1);
  --hairline-strong: rgba(46, 43, 38, 0.18);

  /* Dual-mode accents from Theme.swift */
  --reading-accent: #387a35;
  --reading-accent-bright: #458e41;
  --reading-accent-dark: #2d692b;
  --forest: #183628;
  --forest-soft: #214734;
  --forest-tint: #e7ecdd;

  --feeds-accent: #c4732e;
  --feeds-accent-deep: #a5591c;
  --feeds-tint: #f5eadc;
  --star-gold: #d18629;

  --gold-glow: #efc156;
  --shadow-soft: 0 18px 44px rgba(38, 28, 17, 0.08), 0 2px 6px rgba(38, 28, 17, 0.04);
  --shadow-card: 0 12px 30px rgba(38, 28, 17, 0.06), 0 1px 3px rgba(38, 28, 17, 0.04);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --serif: "Iowan Old Style", "New York", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", "Segoe UI", sans-serif;

  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[lang="zh-CN"] {
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
}

html[lang="zh-Hant"] {
  --serif: "Songti TC", "PMingLiU", "Noto Serif CJK TC", "Source Han Serif TC", Georgia, serif;
}

html[lang="ja"] {
  --serif: "Hiragino Mincho ProN", "YuMincho", "Noto Serif CJK JP", Georgia, serif;
}

html[lang="ko"] {
  --serif: "AppleMyungjo", "Batang", "Noto Serif KR", Georgia, serif;
}

html[lang="ar"] {
  --serif: "Geeza Pro", "Noto Naskh Arabic", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Arabic", "Geeza Pro", "Noto Sans Arabic", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
}

img,
svg {
  display: block;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

a,
button,
summary {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2.5px solid var(--reading-accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.ai-band a:focus-visible,
.ai-band button:focus-visible,
.pro-card a:focus-visible,
.pro-card button:focus-visible {
  outline-color: var(--gold-glow);
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

.section-width {
  max-width: 1180px;
  width: calc(100% - 80px);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  background: var(--forest);
  color: #fefcf6;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 100;
}

.skip-link:focus {
  top: 14px;
}

/* Header */
.site-header-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 241, 232, 0.84);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  border-bottom: 1px solid rgba(46, 43, 38, 0.07);
}

.site-header {
  max-width: 1260px;
  width: calc(100% - 64px);
  height: 76px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  flex-shrink: 0;
}

.app-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(24, 54, 40, 0.2);
  flex-shrink: 0;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.primary-nav a {
  padding-block: 6px;
  transition: color 0.18s ease;
}

.primary-nav a:hover {
  color: var(--reading-accent);
}

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

.lang-picker {
  position: relative;
}

.lang-picker > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: rgba(46, 43, 38, 0.055);
  border: 1px solid rgba(46, 43, 38, 0.1);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.lang-picker > summary::-webkit-details-marker {
  display: none;
}

.lang-picker > summary:hover,
.lang-picker[open] > summary {
  background: var(--surface);
  border-color: var(--hairline-strong);
}

.lang-picker > summary svg {
  width: 15px;
  height: 15px;
  color: var(--ink-secondary);
  flex-shrink: 0;
}

.lang-picker > summary .lang-chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.18s ease;
}

.lang-picker[open] > summary .lang-chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  max-width: calc(100vw - 32px);
  padding: 8px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  box-shadow: 0 20px 44px rgba(38, 28, 17, 0.14), 0 2px 6px rgba(38, 28, 17, 0.06);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  z-index: 60;
}

.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.8125rem;
  color: var(--ink-secondary);
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-menu a:hover {
  background: var(--paper);
  color: var(--ink);
}

.lang-menu a[aria-current="page"] {
  background: var(--forest-tint);
  color: var(--reading-accent-dark);
  font-weight: 600;
}

.lang-check {
  font-size: 0.75rem;
  color: var(--reading-accent);
  flex-shrink: 0;
}

.mobile-lang-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}

.mobile-lang-block strong {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.mobile-lang-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.mobile-lang-grid a {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: var(--paper);
  font-size: 0.8125rem;
  color: var(--ink-secondary);
  text-align: center;
}

.mobile-lang-grid a[aria-current="page"] {
  background: var(--forest-tint);
  border-color: rgba(56, 122, 53, 0.34);
  color: var(--reading-accent-dark);
  font-weight: 600;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--forest);
  color: #fefcf6;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.18s ease, transform 0.18s ease;
}

.nav-cta:hover {
  background: var(--forest-soft);
  transform: translateY(-1px);
}

.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-strong);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  padding: 0;
}

.mobile-menu-toggle svg {
  width: 18px;
  height: 18px;
}

.mobile-drawer {
  display: none;
  border-top: 1px solid var(--hairline);
  background: var(--surface);
  padding: 16px 24px 20px;
}

.mobile-drawer.open {
  display: block;
}

.mobile-drawer nav {
  display: grid;
  gap: 4px;
}

.mobile-drawer a {
  padding: 11px 4px;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(46, 43, 38, 0.06);
  color: var(--ink);
}

.mobile-drawer a:last-child {
  border-bottom: 0;
}

/* Shared editorial typography & buttons */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--reading-accent);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: currentColor;
  flex-shrink: 0;
}

.eyebrow.amber {
  color: var(--feeds-accent);
}

.eyebrow.on-dark {
  color: #a9d59c;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
}

h2 {
  font-size: clamp(2rem, 3.6vw, 2.85rem);
  line-height: 1.24;
  letter-spacing: -0.015em;
}

html[lang="zh-CN"] h2,
html[lang="zh-Hant"] h2,
html[lang="ja"] h2,
html[lang="ko"] h2,
html[lang="ar"] h2 {
  line-height: 1.38;
  letter-spacing: 0.01em;
}

h2 em {
  color: var(--reading-accent);
  font-style: italic;
}

html[lang="zh-CN"] h2 em,
html[lang="zh-Hant"] h2 em,
html[lang="ja"] h2 em,
html[lang="ko"] h2 em,
html[lang="ar"] h2 em {
  font-style: normal;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.button.primary {
  background: var(--forest);
  color: #fefcf6;
  box-shadow: 0 8px 20px rgba(24, 54, 40, 0.18);
}

.button.primary:hover {
  background: var(--forest-soft);
  transform: translateY(-1.5px);
}

.button.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--hairline-strong);
}

.button.secondary:hover {
  background: #ffffff;
  border-color: rgba(46, 43, 38, 0.3);
  transform: translateY(-1.5px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--forest);
  transition: color 0.18s ease, gap 0.18s ease;
}

.text-link:hover {
  color: var(--reading-accent);
  gap: 11px;
}

.text-link.amber {
  color: var(--feeds-accent-deep);
}

.text-link.amber:hover {
  color: var(--feeds-accent);
}

/* Hero Section */
.hero {
  position: relative;
  padding-block: 52px 68px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.06fr);
  gap: 54px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.85rem, 5.2vw, 4.45rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-block: 20px 22px;
}

html[lang="zh-CN"] .hero-copy h1,
html[lang="zh-Hant"] .hero-copy h1,
html[lang="ja"] .hero-copy h1,
html[lang="ko"] .hero-copy h1,
html[lang="ar"] .hero-copy h1 {
  font-size: clamp(2.55rem, 4.7vw, 4.15rem);
  line-height: 1.28;
  letter-spacing: 0.01em;
}

.hero-accent {
  color: var(--reading-accent);
  font-style: italic;
}

html[lang="zh-CN"] .hero-accent,
html[lang="zh-Hant"] .hero-accent,
html[lang="ja"] .hero-accent,
html[lang="ko"] .hero-accent,
html[lang="ar"] .hero-accent {
  font-style: normal;
}

.hero-lead {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--ink-secondary);
  max-width: 500px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 28px;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(46, 43, 38, 0.25);
}

/* Interactive Hero Stage */
.hero-stage {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, #ede7da 0%, #e5decb 100%);
  border: 1px solid rgba(46, 43, 38, 0.08);
  padding: 22px 28px 26px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.hero-stage[data-mode="feeds"] {
  background: linear-gradient(155deg, #f3e9dc 0%, #eadbc9 100%);
}

.stage-arc {
  position: absolute;
  inset: auto -18% -34% -18%;
  height: 260px;
  border-radius: 50%;
  border: 1px solid rgba(46, 43, 38, 0.08);
  background: radial-gradient(ellipse at top, rgba(254, 252, 246, 0.45), transparent 72%);
  pointer-events: none;
}

.stage-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

/* Mode Lever inspired by REReadingModeLever */
.mode-lever {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: rgba(254, 252, 246, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 14px rgba(38, 28, 17, 0.08);
  backdrop-filter: blur(12px);
}

.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  border: 0;
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.mode-btn .indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(46, 43, 38, 0.22);
  transition: background 0.18s ease, transform 0.18s ease;
}

.mode-btn[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(38, 28, 17, 0.09);
}

.mode-btn[data-mode="reading"][aria-selected="true"] .indicator {
  background: var(--reading-accent-bright);
  box-shadow: 0 0 0 3px rgba(69, 142, 65, 0.2), 0 0 8px rgba(69, 142, 65, 0.65);
  transform: scale(1.1);
}

.mode-btn[data-mode="feeds"][aria-selected="true"] .indicator {
  background: var(--feeds-accent);
  box-shadow: 0 0 0 3px rgba(196, 115, 46, 0.2), 0 0 8px rgba(196, 115, 46, 0.65);
  transform: scale(1.1);
}

.stage-tag {
  font-size: 0.75rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* Interactive Reader Card */
.stage-panel {
  position: relative;
  z-index: 2;
}

.stage-panel[hidden] {
  display: none;
}

.reader-card {
  max-width: 400px;
  margin-inline: auto;
  border-radius: 18px;
  background: #faf5e9;
  color: #383b2e;
  border: 1px solid rgba(46, 43, 38, 0.09);
  box-shadow: var(--shadow-soft);
  transition: background 0.26s ease, color 0.26s ease, border-color 0.26s ease;
  overflow: hidden;
  --reader-font-scale: 1;
}

.reader-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  font-size: 0.75rem;
  opacity: 0.66;
  border-bottom: 1px solid currentColor;
  border-bottom-color: rgba(128, 128, 128, 0.14);
}

.reader-card-body {
  padding: 20px 24px 18px;
  font-family: var(--serif);
}

.reader-chapter {
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.62;
}

.reader-card-body h3 {
  font-family: var(--serif);
  font-size: calc(1.38rem * var(--reader-font-scale));
  font-weight: 500;
  line-height: 1.35;
  margin: 10px 0 14px;
  transition: font-size 0.2s ease;
}

.reader-card-body p {
  font-size: calc(0.9rem * var(--reader-font-scale));
  line-height: 1.82;
  margin-top: 10px;
  transition: font-size 0.2s ease;
}

.hl-yellow {
  background: rgba(240, 206, 102, 0.45);
  color: inherit;
  padding: 1px 2px;
  border-radius: 3px;
}

.hl-green {
  background: rgba(139, 198, 134, 0.36);
  color: inherit;
  padding: 1px 2px;
  border-radius: 3px;
}

.reader-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  font-size: 0.75rem;
  opacity: 0.64;
  font-variant-numeric: tabular-nums;
  border-top: 1px solid rgba(128, 128, 128, 0.14);
}

.reader-progress-bar {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: rgba(128, 128, 128, 0.2);
  overflow: hidden;
}

.reader-progress-bar span {
  display: block;
  width: 24%;
  height: 100%;
  background: var(--reading-accent);
  border-radius: inherit;
}

/* Exact 6 Concrete Themes from REEPUBReaderViewController+Preferences.swift */
.reader-card[data-theme="light"] {
  background: #f5f1e8;
  color: #2e2b26;
}
.reader-card[data-theme="paper"] {
  background: #faf5e9;
  color: #383b2e;
}
.reader-card[data-theme="comfort"] {
  background: #e7ecdd;
  color: #30352c;
}
.reader-card[data-theme="white"] {
  background: #ffffff;
  color: #273128;
}
.reader-card[data-theme="forest"] {
  background: #22332c;
  color: #e0e4d9;
  border-color: rgba(224, 228, 217, 0.14);
}
.reader-card[data-theme="forest"] .hl-yellow {
  background: rgba(214, 179, 76, 0.32);
}
.reader-card[data-theme="forest"] .hl-green {
  background: rgba(99, 173, 100, 0.32);
}
.reader-card[data-theme="dark"] {
  background: #12100d;
  color: #f4ebdd;
  border-color: rgba(244, 235, 221, 0.12);
}
.reader-card[data-theme="dark"] .hl-yellow {
  background: rgba(218, 176, 68, 0.3);
}
.reader-card[data-theme="dark"] .hl-green {
  background: rgba(99, 173, 100, 0.28);
}

/* Appearance Controls Bar */
.appearance-dock {
  max-width: 400px;
  margin: 14px auto 0;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(254, 252, 246, 0.86);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 24px rgba(38, 28, 17, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.swatch-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(46, 43, 38, 0.2);
  padding: 0;
  position: relative;
  transition: transform 0.15s ease;
}

.swatch:hover {
  transform: scale(1.08);
}

.swatch.active::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--reading-accent);
}

.swatch[data-theme="light"] { background: #f5f1e8; }
.swatch[data-theme="paper"] { background: #faf5e9; }
.swatch[data-theme="comfort"] { background: #e7ecdd; }
.swatch[data-theme="white"] { background: #ffffff; }
.swatch[data-theme="forest"] { background: #22332c; border-color: rgba(255, 255, 255, 0.28); }
.swatch[data-theme="dark"] { background: #12100d; border-color: rgba(255, 255, 255, 0.28); }

.size-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 10px;
  border-left: 1px solid var(--hairline);
}

.size-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.size-btn:hover {
  background: var(--paper);
}

.size-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.size-value {
  min-width: 38px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}

.stage-caption {
  position: relative;
  z-index: 2;
  margin-top: 12px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* Interactive Feeds Preview Card in Hero */
.hero-feeds-card {
  max-width: 400px;
  margin-inline: auto;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid rgba(46, 43, 38, 0.09);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.inbox-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.inbox-top strong {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.inbox-top span {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.inbox-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  border-radius: 14px;
  background: rgba(46, 43, 38, 0.06);
  margin-bottom: 12px;
}

.inbox-filter {
  flex: 1 0 auto;
  border: 0;
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 5px 8px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-secondary);
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}

.inbox-filter.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(38, 28, 17, 0.08);
}

.inbox-list {
  display: grid;
  gap: 8px;
}

.inbox-item {
  background: var(--surface);
  border: 1px solid rgba(46, 43, 38, 0.07);
  border-radius: 13px;
  padding: 11px 13px;
}

.inbox-item[hidden] {
  display: none;
}

.inbox-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.inbox-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--feeds-accent);
}

.inbox-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-star {
  color: var(--star-gold);
}

.badge-offline {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--forest-tint);
  color: var(--reading-accent-dark);
  font-weight: 600;
}

.badge-fulltext {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--feeds-tint);
  color: var(--feeds-accent-deep);
  font-weight: 600;
}

.brand-period {
  color: var(--reading-accent);
}

.inbox-item h4 {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 3px;
}

.inbox-item p {
  font-size: 0.775rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

/* Pillars Ribbon */
.pillars-strip {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding-block: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.pillar {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pillar strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.pillar span {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* Section Spacing & Headings */
.section-band {
  padding-block: 96px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 48px;
}

.section-heading h2 {
  margin-top: 12px;
}

.section-lead {
  max-width: 440px;
  font-size: 0.96875rem;
  line-height: 1.8;
  color: var(--ink-secondary);
}

/* Section 01: Reading & Library */
.reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 52px;
  align-items: start;
}

.shelf-showcase {
  display: grid;
  gap: 18px;
}

.shelf-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.shelf-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.shelf-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shelf-title-group strong {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.collection-pill {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink-secondary);
  border: 1px solid var(--hairline);
}

.glass-pill-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(245, 241, 232, 0.9);
  border: 1px solid var(--hairline-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 8px rgba(38, 28, 17, 0.05);
  font-size: 0.75rem;
  color: var(--ink-secondary);
}

.glass-pill-actions svg {
  width: 14px;
  height: 14px;
}

.collection-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.collection-tab {
  border: 1px solid var(--hairline);
  background: var(--paper);
  color: var(--ink-secondary);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.collection-tab:hover {
  border-color: var(--hairline-strong);
  color: var(--ink);
}

.collection-tab[aria-pressed="true"] {
  background: var(--forest-tint);
  border-color: rgba(56, 122, 53, 0.34);
  color: var(--reading-accent-dark);
  font-weight: 600;
}

.book-card.dimmed {
  opacity: 0.32;
  transform: scale(0.97);
}

.book-card {
  min-width: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.book-cover {
  aspect-ratio: 2 / 3;
  border-radius: 4px 8px 8px 4px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 4px solid rgba(0, 0, 0, 0.16);
  box-shadow: 0 10px 20px rgba(38, 28, 17, 0.14);
  overflow: hidden;
  position: relative;
}

.book-cover small {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.82;
}

.book-cover strong {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 600;
}

.book-cover .cover-badge {
  align-self: flex-start;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  letter-spacing: 0.06em;
}

.cover-forest {
  background: linear-gradient(155deg, #214635 0%, #163024 100%);
  color: #f4eedb;
}

.cover-ochre {
  background: linear-gradient(155deg, #d7b27c 0%, #bf9255 100%);
  color: #362512;
}

.cover-slate {
  background: linear-gradient(155deg, #2b445e 0%, #1c2e42 100%);
  color: #eef3f7;
}

.book-meta {
  margin-top: 10px;
}

.book-meta span {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-meta small {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.mini-progress {
  height: 3px;
  border-radius: 99px;
  background: rgba(46, 43, 38, 0.09);
  margin-top: 6px;
  overflow: hidden;
}

.mini-progress i {
  display: block;
  height: 100%;
  background: var(--reading-accent);
  border-radius: inherit;
}

/* Audiobook Mini-Player Bar inside Shelf Card */
.mini-player {
  margin-top: 18px;
  padding: 11px 14px;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-player-art {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(145deg, #3c5d49, #1d3629);
  color: #f4eedb;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.mini-player-info {
  flex: 1;
  min-width: 0;
}

.mini-player-info strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-player-info small {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.mini-player-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(56, 122, 53, 0.22);
  background: var(--forest-tint);
  color: var(--reading-accent-dark);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.mini-player-pill:hover {
  background: #dae4ce;
}

.mini-player-pill[aria-pressed="true"] {
  background: var(--forest);
  border-color: var(--forest);
  color: #fefcf6;
}

.stats-head-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}

.stats-head-row small {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

.stats-period-group {
  display: inline-flex;
  flex-shrink: 0;
  padding: 2px;
  border-radius: var(--radius-pill);
  background: var(--paper);
  border: 1px solid var(--hairline);
}

.stats-period-btn {
  border: 0;
  background: transparent;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}

.stats-period-btn[aria-pressed="true"] {
  background: var(--reading-accent);
  color: #ffffff;
}

.bar-fill {
  width: 100%;
  max-width: 24px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, var(--reading-accent-bright) 0%, var(--reading-accent-dark) 100%);
  transition: height 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reading Stats Card aligned with Theme.Stats */
.stats-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 18px 22px 20px;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 16px 20px;
  align-items: center;
}

.stats-summary small {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.stats-total {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-block: 6px 12px;
}

.stats-total strong {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stats-trend {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--reading-accent);
  font-variant-numeric: tabular-nums;
}

.stats-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.stats-kpis div small {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  font-size: 0.72rem;
}

.stats-kpis div strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.stats-bars {
  height: 92px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  padding-top: 8px;
}

.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}

.bar-col span {
  font-size: 0.68rem;
  color: var(--ink-muted);
}

/* Numbered Feature Stack */
.feature-stack {
  display: grid;
  gap: 0;
}

.feature-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 16px;
  padding-block: 22px;
  border-bottom: 1px solid var(--hairline);
}

.feature-item:first-child {
  padding-top: 4px;
}

.feature-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.feature-num {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--reading-accent);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

.feature-item h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--ink);
}

.feature-item p {
  font-size: 0.925rem;
  line-height: 1.75;
  color: var(--ink-secondary);
}

.inline-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  vertical-align: middle;
  background: var(--forest-tint);
  color: var(--reading-accent-dark);
}

/* Section 02: Feeds Band (Warm Ochre Identity) */
.feeds-band {
  background: linear-gradient(180deg, #f1e9dc 0%, #ede3d3 100%);
  border-top: 1px solid rgba(196, 115, 46, 0.14);
  border-bottom: 1px solid rgba(196, 115, 46, 0.14);
}

.feeds-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 64px;
  align-items: center;
}

.feeds-copy h2 {
  margin-block: 14px 18px;
}

.feeds-copy > p:not(.eyebrow) {
  font-size: 0.975rem;
  line-height: 1.8;
  color: var(--ink-secondary);
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 26px 0 28px;
  display: grid;
  gap: 13px;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  font-size: 0.925rem;
  line-height: 1.65;
  color: var(--ink);
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--reading-accent);
}

.feeds-band .check-list li::before {
  color: var(--feeds-accent);
}

.feeds-showcase {
  background: var(--surface);
  border: 1px solid rgba(46, 43, 38, 0.08);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.feeds-showcase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hairline);
}

.feeds-showcase-head small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--feeds-accent);
  font-weight: 600;
}

.feeds-showcase-head h3 {
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 500;
  margin-top: 4px;
}

.feeds-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-block: 14px 16px;
}

.feeds-pill {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink-secondary);
  border: 1px solid var(--hairline);
}

.feeds-pill.active {
  background: var(--feeds-tint);
  border-color: rgba(196, 115, 46, 0.3);
  color: var(--feeds-accent-deep);
  font-weight: 600;
}

.feed-article-list {
  display: grid;
  gap: 10px;
}

.feed-article-row {
  display: flex;
  gap: 13px;
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid rgba(46, 43, 38, 0.06);
}

.feed-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
}

.av-amber { background: #f3dfc5; color: #9c571d; }
.av-forest { background: #dce7d2; color: #2f5b31; }
.av-slate { background: #dce5ec; color: #37576e; }

.feed-article-row small {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.73rem;
  color: var(--ink-muted);
}

.feed-article-row h4 {
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.42;
  margin: 4px 0;
  color: var(--ink);
}

.feed-article-row p {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.feeds-showcase-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* Section 03: Native AI Band (Deep Forest Editorial Dark Band) */
.ai-band {
  background: radial-gradient(circle at 82% 18%, rgba(71, 134, 72, 0.22), transparent 52%), var(--forest);
  color: #f4eedb;
}

.ai-band h2,
.ai-band h3 {
  color: #fbf7ec;
}

.ai-band .section-lead {
  color: rgba(244, 238, 219, 0.78);
}

.ai-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.ai-meta-pill {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(254, 252, 246, 0.1);
  border: 1px solid rgba(254, 252, 246, 0.16);
  color: #e4ecd8;
}

.ai-workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.15fr);
  gap: 32px;
  align-items: stretch;
}

.ai-tabs {
  display: grid;
  gap: 10px;
}

.ai-tab {
  text-align: left;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(254, 252, 246, 0.12);
  background: rgba(254, 252, 246, 0.045);
  color: #f4eedb;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.ai-tab:hover {
  background: rgba(254, 252, 246, 0.09);
}

.ai-tab[aria-selected="true"] {
  background: rgba(254, 252, 246, 0.14);
  border-color: rgba(239, 193, 86, 0.55);
  box-shadow: 0 10px 28px rgba(7, 18, 12, 0.25);
}

.ai-tab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.ai-tab-head strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.ai-tier {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(169, 213, 156, 0.16);
  color: #c9e8bd;
}

.ai-tier.pro {
  background: rgba(239, 193, 86, 0.22);
  color: var(--gold-glow);
}

.ai-tab p {
  font-size: 0.825rem;
  line-height: 1.55;
  color: rgba(244, 238, 219, 0.74);
}

.ai-preview-stage {
  border-radius: var(--radius-lg);
  background: rgba(16, 36, 26, 0.85);
  border: 1px solid rgba(254, 252, 246, 0.14);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 22px 48px rgba(6, 16, 10, 0.35);
}

.ai-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.ai-panel[hidden] {
  display: none;
}

.ai-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(254, 252, 246, 0.12);
}

.ai-sheet-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #b7dda9;
}

.ai-source-chip {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(254, 252, 246, 0.09);
  color: rgba(244, 238, 219, 0.86);
}

.ai-panel h3 {
  font-family: var(--serif);
  font-size: 1.42rem;
  font-weight: 500;
  margin-block: 18px 12px;
}

.ai-panel p {
  font-size: 0.925rem;
  line-height: 1.78;
  color: rgba(244, 238, 219, 0.84);
}

.ai-bullets {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}

.ai-bullets li {
  padding: 10px 13px;
  border-radius: 12px;
  background: rgba(254, 252, 246, 0.06);
  border: 1px solid rgba(254, 252, 246, 0.08);
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(244, 238, 219, 0.9);
}

.ai-followup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.ai-chip {
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(254, 252, 246, 0.16);
  color: #dbe8d3;
  background: rgba(254, 252, 246, 0.05);
}

.ai-trust-bar {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(254, 252, 246, 0.14);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ai-trust-item strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fbf7ec;
  margin-bottom: 4px;
}

.ai-trust-item span {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgba(244, 238, 219, 0.72);
}

/* Section 04: Ecosystem & Craft Bento */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.bento-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--forest-tint);
  color: var(--reading-accent-dark);
  flex-shrink: 0;
}

.bento-icon.amber {
  background: var(--feeds-tint);
  color: var(--feeds-accent-deep);
}

.bento-icon svg {
  width: 17px;
  height: 17px;
}

.bento-kicker-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bento-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--reading-accent);
}

.bento-kicker.amber {
  color: var(--feeds-accent);
}

.bento-card h3 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.35;
  margin-top: 8px;
}

.bento-card p {
  font-size: 0.925rem;
  line-height: 1.75;
  color: var(--ink-secondary);
}

.bento-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bento-tags span {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--paper);
  border: 1px solid var(--hairline);
  color: var(--ink-secondary);
}

/* Section 05: Free vs Pro */
.pro-band {
  border-top: 1px solid var(--hairline);
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.plan-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline-strong);
  background: var(--surface);
  padding: 32px 32px 0;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.plan-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.plan-head h3 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.plan-subtitle {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.plan-desc {
  margin-top: 10px;
  font-size: 0.925rem;
  color: var(--ink-secondary);
}

.plan-card .check-list {
  flex: 1;
  margin-block: 24px;
}

.plan-foot {
  padding-block: 20px;
  border-top: 1px solid var(--hairline);
  font-size: 0.85rem;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plan-card.pro-card {
  background: linear-gradient(165deg, #1d402f 0%, #152f23 100%);
  border-color: #152f23;
  color: #f4eedb;
}

.pro-card .plan-head h3 {
  color: #fbf7ec;
}

.pro-card .plan-subtitle,
.pro-card .plan-desc {
  color: rgba(244, 238, 219, 0.76);
}

.pro-card .check-list li {
  color: rgba(244, 238, 219, 0.94);
}

.pro-card .check-list li::before {
  color: var(--gold-glow);
}

.pro-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--gold-glow);
  color: #1c2e1c;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  vertical-align: middle;
}

.pro-card .plan-foot {
  border-top-color: rgba(254, 252, 246, 0.14);
  color: #d7e7c8;
}

.plan-guarantee {
  margin-top: 22px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--paper-deep);
  border: 1px solid var(--hairline);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--ink-secondary);
  text-align: center;
}

/* Section 06: FAQ */
.faq-band {
  border-top: 1px solid var(--hairline);
}

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 64px;
  align-items: start;
}

.faq-intro h2 {
  margin-block: 12px 16px;
}

.faq-intro p {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--ink-secondary);
  margin-bottom: 22px;
}

.faq-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.faq-list details {
  border-bottom: 1px solid var(--hairline);
}

.faq-list details:first-child {
  border-top: 1px solid var(--hairline);
}

.faq-list summary {
  list-style: none;
  padding: 20px 36px 20px 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.55;
  cursor: pointer;
  position: relative;
  color: var(--ink);
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 16px;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--ink-muted);
  transition: transform 0.18s ease;
}

.faq-list details[open] summary::after {
  content: "−";
  color: var(--reading-accent);
}

.faq-list p {
  padding: 0 24px 20px 0;
  font-size: 0.925rem;
  line-height: 1.8;
  color: var(--ink-secondary);
  overflow-wrap: anywhere;
}

.faq-list p a {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Closing Banner */
.closing-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #ebe3d3 0%, #e4ecd9 100%);
  border: 1px solid var(--hairline);
  padding: 64px 36px;
  text-align: center;
  margin-bottom: 64px;
}

.closing-card .eyebrow {
  justify-content: center;
}

.closing-card h2 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  margin: 14px 0 12px;
}

.closing-card > p:not(.eyebrow) {
  font-size: 1rem;
  color: var(--ink-secondary);
  max-width: 480px;
  margin: 0 auto 28px;
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 32px 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  font-size: 0.8125rem;
  color: var(--ink-secondary);
}

.footer-links a:hover {
  color: var(--reading-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Privacy Policy Document Layout */
.doc-main {
  padding-block: 56px 84px;
}

.doc-header {
  max-width: 780px;
  margin-bottom: 36px;
}

.doc-header h1 {
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  line-height: 1.18;
  margin-block: 14px 12px;
}

.doc-meta {
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.doc-shell {
  display: grid;
  grid-template-columns: minmax(0, 230px) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.doc-toc {
  position: sticky;
  top: 102px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.doc-toc strong {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.doc-toc ol {
  padding-left: 18px;
  display: grid;
  gap: 8px;
  font-size: 0.825rem;
  color: var(--ink-secondary);
}

.doc-toc a:hover {
  color: var(--reading-accent);
}

.doc-body {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-card);
  max-width: 780px;
}

.doc-body section {
  padding-top: 28px;
  margin-top: 28px;
  border-top: 1px solid var(--hairline);
}

.doc-body section:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.doc-body h2 {
  font-size: 1.55rem;
  margin-bottom: 14px;
}

.doc-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--ink);
}

.doc-body p {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--ink-secondary);
  margin-top: 10px;
}

.doc-body ul {
  margin-top: 10px;
  padding-left: 20px;
  display: grid;
  gap: 7px;
  font-size: 0.925rem;
  line-height: 1.72;
  color: var(--ink-secondary);
}

.doc-body a {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.doc-table th,
.doc-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}

.doc-table th {
  background: var(--paper);
  font-weight: 600;
  color: var(--ink);
}

.doc-table tr:last-child td {
  border-bottom: 0;
}

/* Responsive Breakpoints */
@media (max-width: 1060px) {
  .section-width {
    width: calc(100% - 56px);
  }
  .site-header {
    width: calc(100% - 48px);
  }
  .primary-nav {
    gap: 20px;
  }
  .hero {
    gap: 36px;
  }
  .reading-layout,
  .feeds-layout,
  .ai-workspace,
  .faq-layout {
    gap: 36px;
  }
  .pillars-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .doc-shell {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .doc-toc {
    position: static;
  }
}

@media (max-width: 860px) {
  .primary-nav,
  .header-actions .nav-cta {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }
  .hero,
  .reading-layout,
  .feeds-layout,
  .ai-workspace,
  .bento-grid,
  .plans-grid,
  .faq-layout {
    grid-template-columns: 1fr;
  }
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 34px;
  }
  .section-band {
    padding-block: 72px;
  }
  .ai-trust-bar {
    grid-template-columns: 1fr;
  }
  .stats-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .section-width {
    width: calc(100% - 36px);
  }
  .site-header {
    width: calc(100% - 32px);
    height: 68px;
  }
  .hero {
    padding-block: 34px 48px;
  }
  .hero-meta {
    gap: 8px;
  }
  .hero-meta .dot {
    display: none;
  }
  .hero-meta span {
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: var(--surface);
    border: 1px solid var(--hairline);
  }
  .hero-stage {
    padding: 18px 16px 20px;
  }
  .stage-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .appearance-dock {
    justify-content: center;
  }
  .size-controls {
    border-left: 0;
    padding-left: 0;
  }
  .pillars-strip {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .book-row {
    gap: 10px;
  }
  .book-cover {
    padding: 10px 8px;
  }
  .book-cover strong {
    font-size: 0.95rem;
  }
  .shelf-card,
  .feeds-showcase,
  .plan-card,
  .bento-card,
  .ai-preview-stage,
  .doc-body {
    padding: 20px;
  }
  .plan-card {
    padding-bottom: 0;
  }
  .closing-card {
    padding: 44px 22px;
  }
}

/* RTL Language Support (Arabic) */
html[dir="rtl"] .eyebrow {
  letter-spacing: 0.02em;
  text-transform: none;
}

html[dir="rtl"] .lang-menu {
  right: auto;
  left: 0;
}

html[dir="rtl"] .book-cover {
  border-radius: 8px 4px 4px 8px;
  border-left: 0;
  border-right: 4px solid rgba(0, 0, 0, 0.16);
}

html[dir="rtl"] .size-controls {
  padding-left: 0;
  border-left: 0;
  padding-right: 10px;
  border-right: 1px solid var(--hairline);
}

html[dir="rtl"] .check-list li {
  padding-left: 0;
  padding-right: 26px;
}

html[dir="rtl"] .check-list li::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .ai-tab {
  text-align: right;
}

html[dir="rtl"] .inline-tag,
html[dir="rtl"] .pro-badge {
  margin-left: 0;
  margin-right: 6px;
}

html[dir="rtl"] .faq-list summary {
  padding: 20px 0 20px 36px;
}

html[dir="rtl"] .faq-list summary::after {
  right: auto;
  left: 4px;
}

html[dir="rtl"] .faq-list p {
  padding: 0 0 20px 24px;
}

html[dir="rtl"] .doc-toc ol,
html[dir="rtl"] .doc-body ul {
  padding-left: 0;
  padding-right: 20px;
}

html[dir="rtl"] .doc-table th,
html[dir="rtl"] .doc-table td {
  text-align: right;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
