/* ==========================================================================
   AI Leverage Playbook — static stylesheet
   Editorial light theme, vermilion accent, full bilingual support.
   ========================================================================== */

:root {
  --paper: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f5f3ee;
  --ink: #14181d;
  --ink-2: #434a54;
  --ink-3: #767d88;
  --line: #e7e3da;
  --line-strong: #d6d1c5;
  --accent: #c2410c;
  --accent-soft: rgba(194, 65, 12, 0.08);
  --accent-line: rgba(194, 65, 12, 0.28);
  --teal: #0f766e;
  --dark: #0e1116;
  --dark-2: #161b22;
  --dark-line: rgba(255, 255, 255, 0.12);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 29, 0.05);
  --shadow-md: 0 10px 30px -12px rgba(20, 24, 29, 0.22);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", "Songti SC",
    "Noto Serif SC", "Source Han Serif SC", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;
  --wrap: 1140px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.72;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.01em;
  margin: 0;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 26px;
}

/* --------------------------------------------------------------------------
   Bilingual switching
   Both languages live in the DOM. The head script sets `lang-zh` / `lang-en`
   on <html> from localStorage, so the initial language is deterministic and
   cannot be flipped by a browser-restored form control. The hidden checkbox
   keeps the site usable without JavaScript.
   -------------------------------------------------------------------------- */

/* The bare class must never target <html> itself, which carries lang-zh /
   lang-en — that would hide the entire document. Every rule below therefore
   uses a descendant combinator, or is scoped to the no-JS fallback. */
html.no-js .lang-zh {
  display: none;
}

html.lang-zh .lang-en {
  display: none;
}

html.lang-zh .lang-zh {
  display: revert;
}

html.lang-en .lang-zh {
  display: none;
}

html.lang-en .lang-en {
  display: revert;
}

/* Fallback for visitors without JavaScript: unchecked = English (default),
   checked = Chinese. */
html.no-js body:has(#lang-switch-input:checked) .lang-zh {
  display: revert;
}

html.no-js body:has(#lang-switch-input:checked) .lang-en {
  display: none;
}

html.no-js .lang-toggle {
  display: none;
}

html:not(.no-js) .lang-fallback {
  display: none;
}

.lang-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-2);
}

html.no-js body:has(#lang-switch-input:checked) .lang-fb-en {
  display: none;
}

html.no-js body:not(:has(#lang-switch-input:checked)) .lang-fb-zh {
  display: none;
}

/* --------------------------------------------------------------------------
   Skip link
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 247, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 600;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  color: var(--accent);
  display: inline-flex;
}

.brand-text {
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 0.9rem;
}

.site-nav a {
  color: var(--ink-2);
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 1.5px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.site-nav a:hover {
  color: var(--ink);
  text-decoration: none;
  border-bottom-color: var(--accent);
}

.lang-control {
  display: flex;
  align-items: center;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* The toggle always shows the language you would switch TO. */
.lang-toggle .lbl-zh {
  display: inline;
}

.lang-toggle .lbl-en {
  display: none;
}

html.lang-zh .lang-toggle .lbl-zh {
  display: none;
}

html.lang-zh .lang-toggle .lbl-en {
  display: inline;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 520px at 12% -10%, rgba(194, 65, 12, 0.22), transparent 62%),
    radial-gradient(900px 460px at 88% 0%, rgba(15, 118, 110, 0.16), transparent 58%),
    linear-gradient(180deg, var(--dark) 0%, #10151c 100%);
  color: #eef1f5;
  border-bottom: 1px solid var(--dark-line);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(900px 420px at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(900px 420px at 50% 0%, #000 0%, transparent 78%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: 86px;
  padding-bottom: 84px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f0a58a;
  border: 1px solid rgba(240, 165, 138, 0.3);
  background: rgba(240, 165, 138, 0.08);
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 26px;
}

.hero-title {
  font-size: clamp(2.15rem, 5.4vw, 3.65rem);
  line-height: 1.12;
  color: #fff;
  max-width: 17ch;
  margin-bottom: 22px;
}

.hero-lead {
  font-size: clamp(1.02rem, 1.6vw, 1.16rem);
  line-height: 1.78;
  color: rgba(238, 241, 245, 0.8);
  max-width: 62ch;
  margin-bottom: 38px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 720px;
  margin-bottom: 38px;
}

.stat {
  border: 1px solid var(--dark-line);
  background: rgba(255, 255, 255, 0.045);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
}

.stat-num {
  display: block;
  font-family: var(--serif);
  font-size: 1.85rem;
  line-height: 1.1;
  color: #fff;
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: rgba(238, 241, 245, 0.62);
  margin-top: 3px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #a8360a;
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.28);
  color: #eef1f5;
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
}

.hero-note {
  font-size: 0.88rem;
  color: rgba(238, 241, 245, 0.52);
  max-width: 68ch;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding: 78px 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 38px;
}

.section-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  color: var(--ink);
}

.section-lead {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 1.02rem;
  max-width: 68ch;
}

/* --------------------------------------------------------------------------
   Principles
   -------------------------------------------------------------------------- */

.principles-section {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 18px;
}

.principle {
  position: relative;
  padding: 26px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.principle:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.principle-num {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
}

.principle h3 {
  font-size: 1.13rem;
  margin-bottom: 9px;
}

.principle p {
  color: var(--ink-2);
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Library toolbar
   -------------------------------------------------------------------------- */

.library-section {
  background: var(--paper);
}

.toolbar {
  position: sticky;
  top: 66px;
  z-index: 20;
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 42px;
  box-shadow: var(--shadow-sm);
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 13px;
  color: var(--ink-3);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.search-field input::placeholder {
  color: var(--ink-3);
}

.search-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 13px;
}

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

.chip {
  height: 33px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  border-color: var(--accent-line);
  color: var(--ink);
}

.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.chip-sm {
  height: 30px;
  font-size: 0.8rem;
  padding: 0 12px;
}

.filter-status {
  margin-top: 11px;
  font-size: 0.82rem;
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   Domain blocks
   -------------------------------------------------------------------------- */

.domain {
  margin-bottom: 62px;
}

.domain-head {
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.domain-title {
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 6px;
}

.domain-desc {
  color: var(--ink-2);
  font-size: 0.98rem;
  max-width: 74ch;
}

.tip-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* --------------------------------------------------------------------------
   Tip card
   -------------------------------------------------------------------------- */

.tip {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.tip:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.tip-head {
  display: flex;
  gap: 18px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--paper));
}

.tip-index {
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.1;
  color: var(--accent);
  opacity: 0.85;
  flex: 0 0 auto;
}

.tip-headings {
  min-width: 0;
}

.tip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 9px;
}

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid var(--line-strong);
  color: var(--ink-3);
  background: var(--surface);
}

.tag-domain {
  color: var(--teal);
  border-color: rgba(15, 118, 110, 0.3);
  background: rgba(15, 118, 110, 0.07);
}

.tag-level-advanced {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.tip-title {
  font-size: 1.28rem;
  margin-bottom: 7px;
}

.tip-summary {
  color: var(--ink-2);
  font-size: 1rem;
  max-width: 78ch;
}

.tip-body {
  padding: 22px 26px 26px;
}

.tip-block {
  margin-bottom: 20px;
}

.tip-block:last-child {
  margin-bottom: 0;
}

.block-label {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 9px;
}

.steps {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.steps li {
  position: relative;
  counter-increment: step;
  padding-left: 32px;
  color: var(--ink);
  font-size: 0.97rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.prompt-box {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--dark);
  overflow: hidden;
}

.prompt-box pre {
  margin: 0;
  padding: 17px 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.855rem;
  line-height: 1.68;
  color: #e8edf3;
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt-box pre code {
  font-family: inherit;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #dfe6ee;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
}

.copy-btn.is-copied {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

/* Copy button labels: idle / done, per language. Kept outside the .lang
   system so the done state can be toggled independently. */
.copy-txt {
  display: none;
}

.copy-idle-en {
  display: inline;
}

html.lang-zh .copy-idle-en {
  display: none;
}

html.lang-zh .copy-idle-zh {
  display: inline;
}

.copy-btn.is-copied .copy-idle-zh,
.copy-btn.is-copied .copy-idle-en {
  display: none;
}

.copy-btn.is-copied .copy-done-en {
  display: inline;
}

html.lang-zh .copy-btn.is-copied .copy-done-en {
  display: none;
}

html.lang-zh .copy-btn.is-copied .copy-done-zh {
  display: inline;
}

/* No-JS fallback labels follow the checkbox instead. */
html.no-js body:has(#lang-switch-input:checked) .copy-idle-en {
  display: none;
}

html.no-js body:has(#lang-switch-input:checked) .copy-idle-zh {
  display: inline;
}

.prompt-note {
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--ink-3);
}

.tip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.tip-grid .tip-block {
  margin-bottom: 0;
  padding: 15px 17px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.tip-block-why {
  border-left: 3px solid var(--teal) !important;
}

.tip-block-fail {
  border-left: 3px solid #b45309 !important;
}

.tip-grid p {
  font-size: 0.94rem;
  color: var(--ink-2);
}

.tip-block-impact {
  padding: 15px 17px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}

.tip-block-impact p {
  font-size: 0.95rem;
  color: var(--ink);
}

.tip-block-sources p {
  margin-bottom: 6px;
}

.sources {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.sources a {
  font-size: 0.85rem;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
}

.sources a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

.empty-state {
  padding: 44px;
  text-align: center;
  color: var(--ink-3);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

/* --------------------------------------------------------------------------
   Caveat band
   -------------------------------------------------------------------------- */

.caveat-section {
  background: var(--dark);
  color: #eef1f5;
  border-block: 1px solid var(--dark-line);
}

.caveat-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 44px;
  align-items: start;
}

.caveat-section .section-kicker {
  color: #f0a58a;
}

.caveat-section .section-title {
  color: #fff;
}

.caveat-body {
  margin-top: 16px;
  color: rgba(238, 241, 245, 0.76);
  font-size: 1rem;
}

.caveat-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.caveat-points li {
  position: relative;
  padding: 15px 17px 15px 46px;
  border: 1px solid var(--dark-line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(238, 241, 245, 0.84);
  font-size: 0.95rem;
}

.caveat-points li::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 22px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #f0a58a;
  transform: rotate(45deg);
}

/* --------------------------------------------------------------------------
   Tool index
   -------------------------------------------------------------------------- */

.tools-section {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.tool-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}

.tool-link {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name arrow"
    "cat  arrow"
    "note arrow";
  gap: 2px 12px;
  height: 100%;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.tool-link:hover {
  text-decoration: none;
  border-color: var(--accent-line);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.tool-name {
  grid-area: name;
  font-family: var(--serif);
  font-size: 1.04rem;
  font-weight: 600;
}

.tool-cat {
  grid-area: cat;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
}

.tool-note {
  grid-area: note;
  font-size: 0.89rem;
  color: var(--ink-2);
  margin-top: 5px;
}

.tool-arrow {
  grid-area: arrow;
  align-self: center;
  color: var(--ink-3);
  font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-foot {
  padding: 46px 0 60px;
  background: var(--paper);
}

.foot-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot-brand {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
}

.foot-note {
  font-size: 0.88rem;
  color: var(--ink-2);
  max-width: 82ch;
}

.foot-meta {
  font-size: 0.8rem;
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   Back to top
   -------------------------------------------------------------------------- */

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 40;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  color: var(--accent);
  border-color: var(--accent-line);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 940px) {
  .caveat-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 860px) {
  .site-nav {
    display: none;
  }

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

  .toolbar {
    position: static;
  }

  .hero-inner {
    padding-top: 62px;
    padding-bottom: 62px;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .tip-head {
    flex-direction: column;
    gap: 10px;
    padding: 20px 18px 16px;
  }

  .tip-index {
    font-size: 1.25rem;
  }

  .tip-body {
    padding: 18px 18px 22px;
  }

  .section {
    padding: 58px 0;
  }

  .wrap {
    padding: 0 18px;
  }
}

/* --------------------------------------------------------------------------
   Print — turns the page into a working cheat sheet
   -------------------------------------------------------------------------- */

@media print {
  .site-head,
  .to-top,
  .toolbar,
  .hero-actions,
  .copy-btn,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }

  .hero,
  .caveat-section {
    background: #fff;
    color: #000;
  }

  .hero-title,
  .section-title,
  .caveat-section .section-title {
    color: #000;
  }

  .tip {
    break-inside: avoid;
    border-color: #ccc;
  }

  .prompt-box {
    background: #f6f6f6;
    border-color: #ddd;
  }

  .prompt-box pre {
    color: #111;
  }
}
