/* Manga List product site.
   The values under :root mirror the app's design tokens (manga-list web/css/tokens.css, the
   Style Guide's source of truth), under the same names. The app owns them: when a token changes
   there, change it here to match. Site-only values are named --site-*. */

:root {
  --bg-base: #0d1117;
  --bg-surface: #161b27;
  --bg-elevated: #1e2640;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-heading: #f8fafc;
  --text-on-accent: #ffffff;
  --accent: #6366f1;
  --accent-hover: #5554de;
  --accent-strong: #4a45ce;
  --accent-text: #afbaff;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.25);
  --border-accent: rgba(99, 102, 241, 0.35);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.50);
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --status-reading: #5594fc;
  --pin-border: rgba(251, 191, 36, 0.35);
  --warning: #fbbf24;
  --success: #34d399;
  --font-sans: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Site-only */
  --site-max: 1200px;
  --site-gutter: 24px;
  --site-text-soft: #cbd5e1;
  --site-text-bright: #e2e8f0;
  --site-sunken: #0a0d13;
  --site-row: #1b2234;
  /* Status pills on the sample screens: each status hue, lifted for 4.5:1 text on its tint. */
  --site-pill-reading: #93b8fd;
  --site-pill-reading-bg: rgba(85, 148, 252, 0.16);
  --site-pill-completed: #5fd3a9;
  --site-pill-completed-bg: rgba(23, 177, 124, 0.16);
  --site-pill-plan: #c0abfd;
  --site-pill-plan-bg: rgba(157, 123, 252, 0.16);
  --site-pill-hold: #e6b25e;
  --site-pill-hold-bg: rgba(205, 133, 19, 0.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
}
img, svg { display: block; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent-text); }
a:hover { color: #c7d2fe; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 20;
  padding: 10px 16px; border-radius: var(--radius-xs);
  background: var(--accent-hover); color: var(--text-on-accent); font-weight: 600;
}
.skip-link:focus { top: 12px; }
.wrap { max-width: var(--site-max); margin: 0 auto; padding-left: var(--site-gutter); padding-right: var(--site-gutter); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: var(--radius-xs); font-size: 14px; font-weight: 600; text-decoration: none;
}
.btn-lg { min-height: 48px; padding: 0 24px; font-size: 16px; }
.btn-primary { background: var(--accent-hover); color: var(--text-on-accent); }
.btn-primary:hover { background: var(--accent-strong); color: var(--text-on-accent); }
.btn-quiet { border: 1px solid var(--border-strong); color: var(--site-text-soft); }
.btn-quiet:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(13, 17, 23, 0.92);
  border-bottom: 1px solid var(--border);
}
.site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 28px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-heading); text-decoration: none; }
.brand:hover { color: var(--text-heading); }
.brand img { width: 36px; height: 36px; }
.brand span { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.nav-links { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-right: auto; font-size: 14px; font-weight: 600; }
.nav-links a { color: var(--text-secondary); text-decoration: none; }
.nav-links a:hover { color: var(--text-primary); }
.nav-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Type */
.eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-text); }
.section-title { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; font-weight: 700; color: var(--text-heading); }

/* Hero */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; padding-top: 88px; padding-bottom: 40px; }
.hero h1 { font-size: clamp(44px, 8vw, 76px); line-height: 1.02; font-weight: 700; letter-spacing: -0.03em; color: var(--text-heading); }
.hero .tagline { font-size: clamp(20px, 3vw, 26px); line-height: 1.35; font-weight: 600; color: var(--text-primary); }
.hero .lede { max-width: 640px; font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 20px; margin-top: 8px; }
.hero-actions .text-link { font-size: 15px; font-weight: 600; }
.hero-screen { padding-top: 16px; padding-bottom: 72px; }
figure { margin: 0; }
figcaption { margin-top: 12px; font-size: 13px; text-align: center; }

/* Key message */
.key-message { background: var(--bg-surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.key-message .wrap { display: flex; flex-direction: column; gap: 28px; padding-top: 56px; padding-bottom: 56px; }
.key-message h2 { max-width: 760px; font-size: clamp(24px, 3.4vw, 32px); line-height: 1.2; font-weight: 700; color: var(--text-heading); }
.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.point { display: flex; flex-direction: column; gap: 8px; }
.point svg { color: var(--accent-text); }
.point h3 { font-size: 17px; font-weight: 600; color: var(--text-primary); }
.point p { font-size: 15px; }

/* Features */
.features { display: flex; flex-direction: column; gap: 96px; padding-top: 88px; padding-bottom: 24px; }
.features-head { display: flex; flex-direction: column; gap: 10px; max-width: 680px; }
.feature { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 56px; }
.feature.flip { flex-wrap: wrap-reverse; }
.feature-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.feature-num { font-size: 13px; font-weight: 600; }
.feature-text h3 { font-size: clamp(24px, 3vw, 30px); line-height: 1.2; font-weight: 700; color: var(--text-heading); }
.feature figure { flex: 999 1 520px; min-width: 0; }

/* Plugin projects */
.plugins { display: flex; flex-direction: column; gap: 24px; padding-top: 96px; padding-bottom: 24px; }
.plugins-head { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.notice {
  display: flex; gap: 12px; max-width: 860px; padding: 16px 18px;
  border-radius: var(--radius-sm); background: var(--bg-surface); border: 1px solid var(--pin-border);
}
.notice svg { flex: none; margin-top: 2px; color: var(--warning); }
.notice p { font-size: 15px; color: var(--site-text-soft); }
.projects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.project { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius-md); background: var(--bg-surface); border: 1px solid var(--border); }
.project-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.project-desc { font-size: 14px; }
.project a { margin-top: auto; font-size: 14px; font-weight: 600; }
.plugins-rule { font-size: 14px; }

/* Closing call */
.closing { padding-top: 96px; padding-bottom: 96px; }
.closing-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px;
  padding: 56px 24px; border-radius: var(--radius-xl); background: var(--bg-surface); border: 1px solid var(--border);
}
.closing-card p { max-width: 560px; }
.closing-card .btn { margin-top: 8px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 28px 48px; padding-top: 40px; padding-bottom: 40px; }
.footer-brand { display: flex; align-items: center; gap: 12px; flex: 1 1 260px; }
.footer-brand img { height: 34px; width: auto; }
.footer-brand div { display: flex; flex-direction: column; }
.footer-brand strong { font-weight: 600; color: var(--text-primary); }
.footer-nav { display: flex; flex-direction: column; gap: 6px; }
.footer-nav h2 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }
.footer-nav a { color: var(--text-secondary); text-decoration: none; }
.footer-nav a:hover { color: var(--text-primary); text-decoration: underline; }

/* ---- Sample app screens (drawn, not images; hidden from assistive tech, described by role="img") ---- */
.scr {
  width: 100%; overflow: hidden; background: var(--bg-base);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-xl);
  font-size: 12px; color: var(--text-secondary);
}
.scr-bar {
  display: flex; align-items: center; gap: 14px; padding: 10px 14px; white-space: nowrap;
  background: var(--bg-surface); border-bottom: 1px solid var(--border);
}
.scr-title { color: var(--text-primary); font-weight: 600; }
.scr-app { color: var(--text-primary); font-weight: 700; font-size: 13px; }
.scr-tab { padding: 5px 10px; border-radius: var(--radius-xs); font-weight: 600; }
.scr-tab.on { background: rgba(148, 163, 184, 0.12); color: var(--text-primary); }
.scr-spacer { flex: 1; }
.scr-search { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; min-width: 180px; border-radius: 8px; border: 1px solid var(--border-strong); }
.scr-avatar { width: 26px; height: 26px; border-radius: var(--radius-pill); background: var(--bg-elevated); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--site-text-soft); }
.scr-label { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.scr-rail { flex: 0 0 190px; padding: 16px 14px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }
.scr-stack { display: flex; flex-direction: column; gap: 4px; }
.scr-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.scr-main { flex: 1; min-width: 0; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.scr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.scr-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.scr-item-title { font-size: 12.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scr-item-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover {
  aspect-ratio: 2 / 3; border-radius: var(--radius-xs); border: 1px dashed rgba(148, 163, 184, 0.35); background: var(--bg-elevated);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; text-align: center;
}
.cover.page { border-radius: 2px; width: 180px; }
.pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--radius-pill); font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.pill.reading { background: var(--site-pill-reading-bg); color: var(--site-pill-reading); }
.pill.completed { background: var(--site-pill-completed-bg); color: var(--site-pill-completed); }
.pill.plan { background: var(--site-pill-plan-bg); color: var(--site-pill-plan); }
.pill.hold { background: var(--site-pill-hold-bg); color: var(--site-pill-hold); }
.chip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: var(--radius-xs); font-size: 11px; border: 1px solid var(--border-strong); color: var(--site-text-soft); white-space: nowrap; }
.panel { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.scr-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid rgba(148, 163, 184, 0.08); white-space: nowrap; }
.scr-row:last-child { border-bottom: 0; }
.scr-row .bright { color: var(--site-text-bright); }
.scr-row .end { margin-left: auto; }
.scr-pad { padding: 16px; }
.scr-detail { display: flex; gap: 16px; padding: 16px; }
.scr-detail .cover-col { flex: 0 0 120px; }
.scr-detail .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.scr-detail .series { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.scr-btn { padding: 6px 12px; border-radius: var(--radius-xs); border: 1px solid var(--border-strong); color: var(--site-text-soft); }
.scr-btn.primary { border: 0; background: var(--accent-hover); color: var(--text-on-accent); font-weight: 600; }

/* Bookmarks */
.scr-lists { flex: 0 0 150px; padding: 14px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; white-space: nowrap; }
.scr-lists .scr-label { margin-bottom: 6px; }
.scr-bookmarks { flex: 1; min-width: 0; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.bookmark { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.bookmark .thumb { flex: 0 0 38px; }
.bookmark .thumb .cover, .result .thumb .cover { font-size: 0; }
.bookmark .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bookmark .name { font-weight: 600; color: var(--text-primary); font-size: 13px; }
.bookmark .rating { white-space: nowrap; color: var(--site-text-soft); }
.progress { height: 4px; border-radius: var(--radius-pill); background: rgba(148, 163, 184, 0.16); }
.progress span { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--status-reading); }

/* Collections */
.scr-collections { display: flex; flex-wrap: wrap; gap: 14px; padding: 16px; }
.collection-list { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.collection { display: flex; align-items: center; gap: 12px; padding: 12px; }
.collection .icon { width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; color: var(--accent-text); }
.collection .body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.collection .name { font-weight: 600; color: var(--text-primary); font-size: 13px; }
.collection .count { white-space: nowrap; }
.rule-editor { flex: 1 1 220px; min-width: 0; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.rule-editor .head { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.rule-editor .add { color: var(--accent-text); font-weight: 600; }
.rule-editor .foot { margin-top: auto; }
.rule { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* Reader */
.segmented { display: inline-flex; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-strong); }
.segmented span { padding: 5px 10px; }
.segmented .on { background: rgba(99, 102, 241, 0.2); color: #e0e7ff; font-weight: 600; }
.spread { display: flex; justify-content: center; gap: 4px; padding: 22px; background: var(--site-sunken); }

/* Search */
.scr-search-view { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.search-box { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 9px; border: 1px solid rgba(99, 102, 241, 0.55); background: var(--bg-surface); color: var(--site-text-bright); font-size: 13px; }
.result-group { display: flex; flex-direction: column; gap: 8px; }
.result-row { display: flex; gap: 10px; flex-wrap: wrap; }
.result { display: flex; align-items: center; gap: 10px; padding: 8px 10px; flex: 1 1 200px; min-width: 0; }
.result .thumb { flex: 0 0 28px; }
.result .body { min-width: 0; display: flex; flex-direction: column; }
.result .name { font-weight: 600; color: var(--text-primary); }

/* Enrichment review */
.review { display: grid; grid-template-columns: 90px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 14px; align-items: stretch; }
.review .col-head { font-weight: 600; color: var(--text-primary); }
.review .field { font-weight: 600; color: var(--site-text-soft); padding-top: 8px; }
.review .cell { padding: 8px 10px; border-radius: var(--radius-sm); color: var(--site-text-bright); border: 1px solid var(--border); background: var(--bg-surface); }
.review .cell.rec { display: flex; flex-direction: column; gap: 2px; border-color: rgba(148, 163, 184, 0.14); background: var(--site-row); color: var(--text-primary); }
.review .cell.rec.picked { border-color: rgba(251, 191, 36, 0.45); background: rgba(251, 191, 36, 0.06); }
.review .cell.chosen { border-color: rgba(99, 102, 241, 0.6); background: rgba(99, 102, 241, 0.14); }
.review .cell.b { color: var(--site-text-soft); }
.review .was { font-size: 11px; color: var(--text-secondary); }
.scr-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 14px 14px; }

/* Sync */
.scr-sync { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.run { padding: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.run svg { color: var(--success); }
.run .name { font-weight: 600; color: var(--text-primary); }
.run .scr-btn { margin-left: auto; padding: 5px 12px; }
.sync-row { padding: 6px 2px; }
.sync-row .name { color: var(--site-text-bright); font-weight: 600; min-width: 0; }

/* Accounts */
.scr-accounts { padding: 18px; display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.account { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-surface); border: 1px solid var(--border); }
.account.on { background: rgba(99, 102, 241, 0.14); border-color: var(--border-accent); }
.account .avatar { width: 32px; height: 32px; flex: none; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; background: var(--bg-elevated); color: var(--site-text-soft); }
.account .body { display: flex; flex-direction: column; min-width: 0; }
.account .name { font-weight: 600; color: var(--text-primary); font-size: 13px; }

/* Phone width: the drawn screens scale down instead of scrolling sideways. */
@media (max-width: 720px) {
  .scr-rail, .scr-lists { display: none; }
  .scr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scr-bar { flex-wrap: wrap; white-space: normal; }
  .scr-search { min-width: 0; }
  .review { grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1fr); }
  .review .b, .review .col-b { display: none; }
  .cover.page { width: 42%; }
}
