/* ============================================================
   Master Git in 30 Days — reading-first site theme
   Warm paper, serif display type, Git-graph accent colors.
   ============================================================ */

:root {
  --paper: #faf7f1;
  --paper-2: #f2ecdf;
  --card: #fffdf8;
  --ink: #262319;
  --ink-soft: #57534a;
  --muted: #8a8378;
  --line: #e4dccc;
  --line-soft: #ece5d3;
  --accent: #d9480f;
  --accent-soft: rgba(217, 72, 15, .08);
  --c-main: #e8590c;
  --c-feat: #1971c2;
  --c-fix: #2b8a3e;
  --code-bg: #1f232e;
  --code-ink: #e6e9f0;
  --shadow: 0 1px 2px rgba(60, 50, 30, .05), 0 10px 34px -18px rgba(60, 50, 30, .28);
  --topbar-bg: rgba(250, 247, 241, .86);
  --font-sans: "Inter", "Noto Sans TC", "Noto Sans SC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-serif: "Newsreader", "Noto Serif TC", "Noto Serif SC", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #17150f;
    --paper-2: #201d15;
    --card: #1e1b14;
    --ink: #ece7da;
    --ink-soft: #b8b1a2;
    --muted: #8d8676;
    --line: #35301f;
    --line-soft: #2a2718;
    --accent: #ff8a4c;
    --accent-soft: rgba(255, 138, 76, .12);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 34px -18px rgba(0, 0, 0, .7);
    --topbar-bg: rgba(23, 21, 15, .86);
  }
}
:root[data-theme="dark"] {
  --paper: #17150f;
  --paper-2: #201d15;
  --card: #1e1b14;
  --ink: #ece7da;
  --ink-soft: #b8b1a2;
  --muted: #8d8676;
  --line: #35301f;
  --line-soft: #2a2718;
  --accent: #ff8a4c;
  --accent-soft: rgba(255, 138, 76, .12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 34px -18px rgba(0, 0, 0, .7);
  --topbar-bg: rgba(23, 21, 15, .86);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(120, 105, 70, .13) 1px, transparent 1.1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 340px);
          mask-image: linear-gradient(to bottom, black, transparent 340px);
}
::selection { background: rgba(217, 72, 15, .22); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

body.lang-zh-tw { --font-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif; --font-serif: "Noto Serif TC", "PingFang TC", serif; }
body.lang-zh-cn { --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; --font-serif: "Noto Serif SC", "Songti SC", serif; }
body.lang-fa { --font-sans: "Vazirmatn", system-ui, sans-serif; --font-serif: "Vazirmatn", system-ui, sans-serif; }
body.lang-ja { --font-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", system-ui, sans-serif; --font-serif: "Noto Serif JP", "Hiragino Mincho ProN", serif; }
body.lang-ko { --font-sans: "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif; --font-serif: "Noto Serif KR", serif; }
body.lang-vi { --font-sans: "Noto Sans", system-ui, sans-serif; --font-serif: "Noto Serif", Georgia, serif; }
body.lang-th { --font-sans: "Noto Sans Thai", system-ui, sans-serif; --font-serif: "Noto Serif Thai", serif; }
body.lang-id, body.lang-ms { --font-sans: "Inter", system-ui, sans-serif; --font-serif: "Newsreader", Georgia, serif; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: .6rem;
  height: 57px;
  padding: 0 1.1rem;
  background: var(--topbar-bg);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); font-family: var(--font-serif); font-weight: 700; font-size: 1.02rem; letter-spacing: .01em; white-space: nowrap; overflow: hidden; }
.brand:hover { text-decoration: none; }
.brand-mark { flex: none; color: var(--ink); }
.top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: .35rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 9px; color: var(--ink-soft); }
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.drawer-btn { display: none; }
.ic-moon { display: none; }
:root[data-theme="dark"] .ic-moon { display: block; }
:root[data-theme="dark"] .ic-sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ic-sun { display: none; } :root:not([data-theme="light"]) .ic-moon { display: block; } }

.lang-switch { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: .42rem; height: 36px; padding: 0 .7rem; border-radius: 9px; color: var(--ink-soft); font-size: .92rem; font-weight: 500; }
.lang-btn:hover { background: var(--paper-2); color: var(--ink); }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 218px;
  padding: .4rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  z-index: 70;
}
.lang-menu.open { opacity: 1; visibility: visible; transform: none; }
.lang-menu a { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .52rem .65rem; border-radius: 8px; color: var(--ink); font-size: .95rem; }
.lang-menu a:hover { background: var(--paper-2); text-decoration: none; }
.lang-menu a.current { color: var(--accent); font-weight: 600; }
.lang-note { color: var(--muted); font-size: .8rem; }

.progress { position: fixed; top: 0; inset-inline-start: 0; height: 2.5px; width: 0; background: linear-gradient(90deg, var(--c-main), var(--c-feat), var(--c-fix)); z-index: 80; }

/* ---------- book shell ---------- */
.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr) 232px;
  gap: 0;
  max-width: 1500px;
  margin: 0 auto;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 57px;
  height: calc(100vh - 57px);
  overflow-y: auto;
  padding: 1.3rem 1.05rem 2rem 1.35rem;
  border-inline-end: 1px solid var(--line-soft);
  scrollbar-width: thin;
}
[dir="rtl"] .sidebar { padding: 1.3rem 1.35rem 2rem 1.05rem; }
.side-home { display: flex; align-items: center; gap: .5rem; color: var(--ink); font-weight: 600; font-size: .95rem; padding: .45rem .6rem; border-radius: 8px; }
.side-home:hover, .side-home.active { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.side-filter { margin: .8rem 0 .4rem; }
.side-filter input {
  width: 100%;
  padding: .5rem .7rem;
  font: inherit;
  font-size: .88rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.side-filter input::placeholder { color: var(--muted); }
.side-title { margin: .9rem .6rem .35rem; font-size: .78rem; font-weight: 700; letter-spacing: .14em; color: var(--muted); }
.side-group { margin: 1.05rem .6rem .3rem; font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.side-link {
  display: flex;
  gap: .6rem;
  align-items: baseline;
  padding: .34rem .6rem;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: .92rem;
  line-height: 1.45;
}
.side-link:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
.side-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-link .dnum { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); flex: none; transform: translateY(-1px); }
.side-link.active .dnum { color: var(--accent); }
.side-link.hidden, .side-group.hidden { display: none; }
.side-foot { margin-top: 1.6rem; padding: 0 .6rem; font-size: .85rem; }
.backdrop { display: none; }

.main { min-width: 0; padding: 2.6rem 3rem 3rem; }
.toc {
  position: sticky;
  top: 57px;
  height: calc(100vh - 57px);
  overflow-y: auto;
  padding: 2.6rem 1.2rem 2rem .4rem;
  scrollbar-width: thin;
}
[dir="rtl"] .toc { padding: 2.6rem .4rem 2rem 1.2rem; }
.toc:empty, .toc.no-items { display: none; }
.toc-title { font-size: .78rem; font-weight: 700; letter-spacing: .14em; color: var(--muted); margin-bottom: .55rem; }
.toc-nav a { display: block; padding: .26rem .6rem; border-inline-start: 2px solid var(--line); color: var(--ink-soft); font-size: .85rem; line-height: 1.5; }
.toc-nav a:hover { color: var(--ink); text-decoration: none; }
.toc-nav a.lvl3 { padding-inline-start: 1.15rem; font-size: .82rem; }
.toc-nav a.on { border-inline-start-color: var(--accent); color: var(--accent); font-weight: 600; }

/* ---------- prose ---------- */
.prose {
  max-width: 46.5rem;
  margin: 0 auto;
  font-size: 1.075rem;
  line-height: 1.78;
  color: var(--ink);
  overflow-wrap: break-word;
}
body.lang-zh-tw .prose, body.lang-zh-cn .prose { line-height: 1.92; letter-spacing: .012em; }
body.lang-fa .prose { line-height: 1.95; }
body.lang-ja .prose, body.lang-ko .prose { line-height: 1.9; }
body.lang-th .prose { line-height: 2.0; }
body.lang-vi .prose { line-height: 1.88; }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.35em; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  font-family: var(--font-serif);
  line-height: 1.35;
  color: var(--ink);
  scroll-margin-top: 84px;
}
body.lang-fa .prose h1, body.lang-fa .prose h2, body.lang-fa .prose h3 { font-family: var(--font-sans); font-weight: 800; }
.prose h1 { font-size: 2.15rem; font-weight: 900; margin: 0 0 1.6rem; padding-bottom: 1.1rem; border-bottom: 2px solid var(--line); letter-spacing: .01em; }
.prose h2 { font-size: 1.5rem; font-weight: 700; margin: 2.6rem 0 1rem; }
.prose h3 { font-size: 1.22rem; font-weight: 700; margin: 2.1rem 0 .8rem; }
.prose h4 { font-size: 1.08rem; margin: 1.8rem 0 .7rem; }
.prose a { font-weight: 500; border-bottom: 1px solid rgba(217, 72, 15, .35); }
.prose a:hover { border-bottom-color: var(--accent); text-decoration: none; }
.prose strong { font-weight: 700; }
.prose ul, .prose ol { margin: 0 0 1.35em; padding-inline-start: 1.55em; }
.prose li { margin: .34em 0; }
.prose li > ul, .prose li > ol { margin: .34em 0 .2em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.6rem auto; width: 62%; }
.prose blockquote {
  margin: 1.6em 0;
  padding: .9em 1.2em;
  border-inline-start: 3.5px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 10px 10px 0;
  color: var(--ink-soft);
}
[dir="rtl"] .prose blockquote { border-radius: 10px 0 0 10px; }
.prose blockquote p { margin: 0 0 .6em; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.4em auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  box-shadow: var(--shadow);
}
.prose code {
  font-family: var(--font-mono);
  font-size: .86em;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: .1em .38em;
  color: var(--accent);
  direction: ltr;
  unicode-bidi: embed;
}
.prose pre, .prose .highlight {
  background: var(--code-bg);
  border-radius: 12px;
  margin: 1.5em 0;
  box-shadow: var(--shadow);
}
.prose pre {
  padding: 1.05rem 1.2rem;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
}
.prose .highlight pre { margin: 0; box-shadow: none; }
.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  color: var(--code-ink);
  font-size: .875rem;
  line-height: 1.72;
  border-radius: 0;
}
.code-wrap { position: relative; }
.copy-btn {
  position: absolute;
  top: .55rem;
  inset-inline-end: .55rem;
  padding: .28rem .6rem;
  font-size: .75rem;
  font-weight: 600;
  color: #cfd6e4;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 7px;
  opacity: 0;
  transition: opacity .15s;
}
.code-wrap:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
@media (hover: none) { .copy-btn { opacity: .85; } }
/* rouge tokens (one-dark inspired) */
.highlight .c, .highlight .cm, .highlight .c1, .highlight .cs { color: #7f848e; font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kt { color: #c678dd; }
.highlight .s, .highlight .sb, .highlight .sc, .highlight .sd, .highlight .s1, .highlight .s2, .highlight .sh, .highlight .sx { color: #98c379; }
.highlight .na, .highlight .nb, .highlight .nc, .highlight .nf, .highlight .nt { color: #61afef; }
.highlight .mi, .highlight .mf, .highlight .mh, .highlight .mo, .highlight .il { color: #d19a66; }
.highlight .o, .highlight .ow { color: #56b6c2; }
.highlight .nv, .highlight .vi, .highlight .vg, .highlight .vc { color: #e06c75; }
.highlight .no, .highlight .ne, .highlight .nl { color: #e5c07b; }
.highlight .err { color: #f44747; }
.highlight .gd { color: #e06c75; }
.highlight .gi { color: #98c379; }
.highlight .ge { font-style: italic; }
.highlight .gs { font-weight: 700; }

.prose table {
  display: block;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: .94em;
  line-height: 1.6;
}
.prose th, .prose td { border: 1px solid var(--line); padding: .55em .85em; text-align: start; }
.prose th { background: var(--paper-2); font-weight: 700; }
.prose tr:nth-child(even) td { background: rgba(127, 110, 70, .045); }

/* ---------- prev / next + footer ---------- */
.prevnext { max-width: 46.5rem; margin: 3.2rem auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pn-card {
  display: block;
  padding: 1.05rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.pn-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--accent); }
.pn-next { text-align: end; }
.pn-label { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; color: var(--muted); margin-bottom: .35rem; }
.pn-title { font-family: var(--font-serif); font-weight: 700; font-size: 1.02rem; line-height: 1.5; }
body.lang-fa .pn-title { font-family: var(--font-sans); font-weight: 700; }
.pn-title .dnum { font-family: var(--font-mono); font-size: .8rem; color: var(--accent); }
.book-footer { max-width: 46.5rem; margin: 3.4rem auto 0; padding-top: 1.4rem; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .88rem; line-height: 1.7; }
.book-footer p { margin: .2rem 0; }
.bf-links a { color: var(--ink-soft); }

/* ---------- landing ---------- */
.landing .topbar { position: sticky; }
.hero { position: relative; z-index: 1; padding: 4.6rem 1.4rem 0; overflow: hidden; }
.hero-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3.4rem; align-items: center; }
.eyebrow { font-size: .83rem; font-weight: 700; letter-spacing: .22em; color: var(--accent); margin: 0 0 1.1rem; }
.hero h1 { font-family: var(--font-serif); font-size: clamp(2.6rem, 5.4vw, 4.3rem); font-weight: 900; line-height: 1.18; margin: 0 0 1.3rem; letter-spacing: .01em; }
.hero-sub { font-size: 1.13rem; line-height: 1.95; color: var(--ink-soft); margin: 0 0 2rem; max-width: 34rem; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .78rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: 1rem; border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1.5px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 12px 24px -12px rgba(217, 72, 15, .65); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.hero-note { margin-top: 1.15rem; font-size: .86rem; color: var(--muted); }
.hero-art { display: flex; justify-content: center; }
.book-card {
  width: min(430px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.5rem 1.6rem 1.4rem;
  transform: rotate(1.6deg);
}
.bc-chip { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .08em; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: .3rem .7rem; }
.book-card .graph { width: 100%; height: auto; margin: 1.2rem 0 .6rem; }
.graph .gl { stroke-width: 3; fill: none; stroke-linecap: round; }
.gl-main { stroke: var(--c-main); }
.gl-feat { stroke: var(--c-feat); }
.gl-fix { stroke: var(--c-fix); }
.graph circle { stroke: var(--card); stroke-width: 2.5; }
.d-main { fill: var(--c-main); } .d-feat { fill: var(--c-feat); } .d-fix { fill: var(--c-fix); }
.graph .tags text { font-family: var(--font-mono); font-size: 12.5px; fill: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .graph .gl { stroke-dasharray: 620; stroke-dashoffset: 620; animation: draw 2.2s ease forwards .2s; }
  .graph .gl-feat { animation-delay: .7s; } .graph .gl-fix { animation-delay: 1.1s; }
  .graph .dots circle { opacity: 0; animation: pop .4s ease forwards 1.5s; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes pop { to { opacity: 1; } }
}
.bc-title { font-family: var(--font-serif); font-weight: 900; font-size: 1.28rem; }
.bc-author { color: var(--muted); font-size: .9rem; margin-top: .2rem; }
.stats { max-width: 1180px; margin: 3.6rem auto 0; padding: 1.5rem 0 2.6rem; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat { text-align: center; }
.stat strong { display: block; font-family: var(--font-serif); font-size: 1.9rem; font-weight: 900; }
.stat span { color: var(--muted); font-size: .88rem; }
.section { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 3.4rem 1.4rem .6rem; }
.section-title { font-family: var(--font-serif); font-size: 1.85rem; font-weight: 900; margin: 0 0 1.7rem; }
.section-title-en { font-family: var(--font-sans); font-size: .95rem; font-weight: 600; color: var(--muted); letter-spacing: .06em; margin-inline-start: .7rem; }
.lang-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
@media (max-width: 1100px) { .lang-grid { grid-template-columns: repeat(3, 1fr); } }
.lang-card {
  display: flex; flex-direction: column; gap: .3rem;
  padding: 1.35rem 1.3rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform .16s ease, border-color .16s ease;
}
.lang-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--accent); }
.lc-name { font-size: 1.32rem; font-weight: 800; }
.lc-book { color: var(--ink-soft); font-size: .93rem; line-height: 1.55; min-height: 2.9em; }
.lc-meta { color: var(--muted); font-size: .82rem; }
.lc-go { margin-top: .7rem; color: var(--accent); font-weight: 700; font-size: .93rem; }
.phase-list { border-top: 1px solid var(--line); }
.phase { display: grid; grid-template-columns: 130px 210px 1fr; gap: 1.4rem; align-items: baseline; padding: 1.25rem .2rem; border-bottom: 1px solid var(--line); }
.phase-days { font-family: var(--font-mono); font-size: .85rem; color: var(--accent); font-weight: 600; }
.phase h3 { font-family: var(--font-serif); font-size: 1.18rem; margin: 0; }
.phase p { margin: 0; color: var(--ink-soft); line-height: 1.8; }
.peek-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: stretch; }
.shot { margin: 0; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.shot-body { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; background: var(--paper-2); padding: 1.1rem; }
.shot-body img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 6px; }
.shot-bar { display: flex; align-items: center; gap: 6px; padding: .55rem .9rem; background: var(--paper-2); border-bottom: 1px solid var(--line-soft); }
.shot-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.shot-bar span:nth-child(1) { background: #f0644f; } .shot-bar span:nth-child(2) { background: #f5bf4f; } .shot-bar span:nth-child(3) { background: #61c454; }
.shot-bar em { font-style: normal; font-size: .8rem; color: var(--muted); margin-inline-start: .5rem; }

.about-inner { max-width: 46.5rem; }
.about p { font-size: 1.06rem; line-height: 1.95; color: var(--ink-soft); }
.about-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.about-links a { font-weight: 600; }
.site-footer { position: relative; z-index: 1; max-width: 1180px; margin: 4rem auto 0; padding: 1.8rem 1.4rem 2.6rem; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .9rem; }
.site-footer p { margin: .25rem 0; }
.sf-sub { font-size: .84rem; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .shell { grid-template-columns: 292px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .drawer-btn { display: inline-flex; }
  .sidebar {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    width: min(320px, 86vw);
    height: 100dvh;
    background: var(--paper);
    z-index: 90;
    transform: translateX(-105%);
    transition: transform .24s ease;
    box-shadow: var(--shadow);
    padding-top: 1rem;
  }
  [dir="rtl"] .sidebar { transform: translateX(105%); }
  .sidebar.open { transform: none; }
  .backdrop { position: fixed; inset: 0; background: rgba(20, 16, 8, .42); z-index: 85; }
  .backdrop.show { display: block; }
  .main { padding: 1.9rem 1.25rem 2.6rem; }
  .brand-text { max-width: 38vw; overflow: hidden; text-overflow: ellipsis; }
  .hero-inner { grid-template-columns: 1fr; gap: 2.4rem; }
  .hero { padding-top: 3rem; }
  .hero-art { order: -1; }
  .book-card { transform: none; }
  .lang-grid { grid-template-columns: repeat(2, 1fr); }
  .phase { grid-template-columns: 1fr; gap: .35rem; }
  .peek-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 1.6rem 1rem; }
}
@media (max-width: 560px) {
  .prose { font-size: 1.03rem; }
  .prose h1 { font-size: 1.78rem; }
  .prose h2 { font-size: 1.34rem; }
  .prevnext { grid-template-columns: 1fr; }
  .pn-next { text-align: start; }
  .lang-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.45rem; }
  .lang-btn span { display: none; }
  .lang-btn { padding: 0 .5rem; }
}
@media print {
  .topbar, .sidebar, .toc, .prevnext, .progress, .side-filter { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  body::before { display: none; }
}
