/* =============================================================
   Neofetch.net — "Terminal Ledger" design
   1. Fonts   2. Settings (edit colors/sizes here)   3. Base
   4. Header  5. Buttons  6. Homepage sections  7. Inner pages
   8. Footer  9. Animations  10. Responsive  11. Reduced motion
   ============================================================= */

/* ---------- 1. Fonts (self-hosted Poppins, OFL licence) ---------- */
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url("../fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("../fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("../fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("../fonts/poppins-700.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 800; font-display: swap; src: url("../fonts/poppins-800.woff2") format("woff2"); }

/* ---------- 2. Settings you can edit ---------- */
:root {
  /* Brand colors (no blue) — taken from the Neofetch logo */
  --ink: #141414;          /* terminal black, headings */
  --ink-2: #242320;
  --stone: #65635A;        /* logo grey */
  --wheat: #F3CA8E;        /* logo beak/feet colour */
  --wheat-soft: #FBEBD3;
  --amber: #FFC72C;        /* accent + buttons */
  --amber-dark: #8A5A00;   /* accent text on light backgrounds */
  --ok: #2F7A3E;  --ok-soft: #E4F1E3;     /* success */
  --warn: #9A4A06; --warn-soft: #FFF0D2;  /* warning */
  --fail: #B42318; --fail-soft: #FDE7E5;  /* error */

  /* Neutrals */
  --text: #46433D;
  --muted: #6F6B63;
  --bg: #F7F4EC;           /* page (paper) */
  --paper-2: #EFEADC;      /* alternate band */
  --surface: #FFFFFF;
  --border: #DDD6C6;

  /* Type */
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --hero-h1-size: 4rem;       /* hero H1 on desktop */
  --hero-h1-mobile: 2.15rem;  /* hero H1 on phones */
  --h2-size: 2.2rem;
  --body-size: 1.02rem;

  /* Layout */
  --container: 1140px;
  --radius: 12px;
  --radius-sm: 6px;
  --header-h: 68px;
}

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--body-size); line-height: 1.72; color: var(--text); background: var(--bg); overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--amber-dark); }
h1, h2, h3 { font-family: var(--font); color: var(--ink); line-height: 1.18; margin: 0 0 .6em; letter-spacing: -.015em; }
h2 { font-size: var(--h2-size); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); }
code { font-size: .88em; background: var(--paper-2); color: var(--ink); padding: 2px 6px; border-radius: 4px; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--amber-dark); outline-offset: 3px; border-radius: 4px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 900px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; color: #fff; }

/* ---------- 4. Header: logo left, menu right ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(247, 244, 236, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--ink); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.28rem; letter-spacing: -.02em; flex-shrink: 0; }
.logo img { width: 54px; height: 32px; border-radius: 5px; transition: transform .4s ease; }
.logo:hover img { transform: translateY(-2px) rotate(-3deg); }
.logo b { font-weight: 700; background: linear-gradient(transparent 62%, var(--wheat) 62%); }
.logo:hover { color: var(--ink); }
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a { position: relative; display: block; padding: 7px 11px 7px 15px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: .95rem; border-radius: 6px; transition: background .2s, color .2s; }
.nav a::before { content: ">"; position: absolute; left: 3px; top: 7px; font-family: var(--mono); color: var(--amber-dark); opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; }
.nav a:hover { background: var(--wheat-soft); color: var(--ink); }
.nav a:hover::before, .nav a[aria-current="page"]::before { opacity: 1; transform: none; }
.nav a[aria-current="page"] { font-weight: 600; }
.menu-toggle { display: none; width: 46px; height: 42px; border: 1px solid var(--ink); border-radius: 8px; background: var(--ink); cursor: pointer; align-items: center; justify-content: center; }
.menu-toggle .bars { display: grid; gap: 5px; }
.menu-toggle i { display: block; width: 20px; height: 2px; background: var(--amber); transition: transform .25s, opacity .25s; }
.menu-toggle[aria-expanded="true"] i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 22px; border-radius: 8px; font: 600 1rem/1.2 var(--font); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s, background .2s, color .2s, box-shadow .2s; text-align: center; }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-big { padding: 16px 26px; font-size: 1.04rem; }
.btn-block { width: 100%; }
.btn-amber { background: var(--amber); color: var(--ink); border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.btn-amber:hover { background: #FFD457; color: var(--ink); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn-amber:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-amber svg { transition: transform .25s; }
.btn-amber:hover svg { transform: translateY(2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--amber); }
.btn-ghost svg { transition: transform .2s; }
.btn-ghost:hover svg { transform: translateX(4px); }

/* ---------- 6. Homepage ---------- */
.section { padding: 92px 0; position: relative; }
.band-paper { background: var(--paper-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band-wheat { background: var(--wheat); }
.tag { display: inline-block; font-family: var(--mono); font-size: .85rem; font-weight: 600; color: var(--amber-dark); margin-bottom: 8px; }
.tag::before { content: "# "; color: var(--stone); }
.tag.dark { color: var(--ink); }
.tag.dark::before { color: var(--ink); }
.sec-head { max-width: 720px; margin: 0 0 44px; }
.sec-head p:last-child { margin-bottom: 0; }
.note-text { max-width: 860px; margin: 24px 0 0; color: var(--muted); font-size: .96rem; }

/* 6.1 Hero */
.hero { padding: 44px 0 80px; background-image: radial-gradient(rgba(20, 20, 20, .09) 1px, transparent 1.4px); background-size: 22px 22px; border-bottom: 1px solid var(--ink); }
.hero-path { font-family: var(--mono); font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.hero-path span:first-child { color: var(--amber-dark); font-weight: 700; }
.hero-path .sep { color: var(--border); margin: 0 4px; }
.hero h1 { font-size: var(--hero-h1-size); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; max-width: 1000px; margin-bottom: 36px; }
.h1-key { display: inline-block; background: var(--ink); color: var(--wheat); padding: 0 .18em; border-radius: 6px; transform: rotate(-1.5deg); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 44px; align-items: start; }
.lead { font-size: 1.06rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 24px 0 26px; }
.hero-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px dashed var(--stone); }
.hero-kv div { display: flex; gap: 8px; padding: 10px 2px; border-bottom: 1px dashed var(--stone); font-family: var(--mono); font-size: .92rem; }
.hero-kv dt { color: var(--amber-dark); font-weight: 700; }
.hero-kv dt::after { content: ":"; }
.hero-kv dd { margin: 0; color: var(--ink); }

/* Terminal illustration */
.term { margin: 0; background: var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 50px -30px rgba(20, 20, 20, .6); border: 1px solid var(--ink); }
.term figcaption { font-size: .78rem; color: #A39E94; padding: 0 18px 14px; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: var(--ink-2); border-bottom: 1px solid #2F2D29; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--stone); }
.term-bar i:nth-child(2) { background: var(--wheat); }
.term-bar i:nth-child(3) { background: var(--amber); }
.term-bar span { margin-left: auto; margin-right: auto; font-family: var(--mono); font-size: .78rem; color: #A39E94; padding-right: 40px; }
.term-body { padding: 18px 20px 12px; font-family: var(--mono); font-size: .84rem; line-height: 1.55; color: #EDE8DD; min-height: 360px; overflow-x: auto; }
.term-body p { margin: 0; }
.prompt { color: var(--amber); font-weight: 700; }
.term-out { display: flex; gap: 22px; margin: 12px 0; }
.tux { margin: 2px 0 0; color: var(--wheat); font-size: .84rem; line-height: 1.32; flex-shrink: 0; }
.term-info { display: flex; flex-direction: column; min-width: 0; }
.term-info span { white-space: nowrap; }
.term-info b { color: var(--amber); font-weight: 700; }
.term-info .dash { color: var(--stone); }
.blocks { display: flex !important; gap: 0; margin-top: 8px; }
.blocks i { width: 22px; height: 14px; }
.c0 { background: #3A3834; } .c1 { background: #E5484D; } .c2 { background: #46A758; } .c3 { background: var(--amber); }
.c4 { background: #D6409F; } .c5 { background: var(--wheat); } .c6 { background: #A8A29E; } .c7 { background: #F7F4EC; }
.cursor { display: inline-block; width: .6em; height: 1.1em; background: var(--amber); vertical-align: -2px; animation: blink 1s steps(1) infinite; }

/* 6.2 Features — key/value rows */
.split { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: 56px; align-items: start; }
.side-head { position: sticky; top: calc(var(--header-h) + 30px); }
.frows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.frow { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; padding: 22px 12px; border-bottom: 1px dashed var(--stone); transition: background .25s; }
.frow:hover { background: var(--wheat-soft); }
.fkey { display: flex; align-items: flex-start; gap: 12px; font-weight: 600; color: var(--ink); transition: transform .25s; }
.frow:hover .fkey { transform: translateX(6px); }
.fkey svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--amber-dark); margin-top: 2px; }
.fkey span::after { content: ":"; color: var(--amber-dark); }
.frow p { margin: 0; font-size: .97rem; }

/* 6.3 Download — plain text + config file */
.dl-wrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.dl-main h2 { font-size: 2.5rem; }
.dl-main .btn { margin-top: 10px; }
.dl-note { display: flex; gap: 10px; align-items: flex-start; margin: 22px 0 10px; font-size: .93rem; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--amber); border-radius: 0 8px 8px 0; }
.dl-note svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--amber-dark); }
.dl-alt { font-size: .9rem; color: var(--muted); }
.cfg { margin: 0; background: var(--ink); border-radius: var(--radius); overflow: hidden; color: #EDE8DD; font-family: var(--mono); font-size: .88rem; box-shadow: 10px 10px 0 var(--wheat); }
.cfg figcaption { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 11px 16px; background: var(--ink-2); border-bottom: 1px solid #2F2D29; color: #CFC8BB; font-size: .82rem; }
.cfg figcaption span:first-child { display: inline-flex; gap: 8px; align-items: center; }
.cfg figcaption svg { width: 16px; height: 16px; color: var(--wheat); }
.cfg-tag { font-family: var(--font); background: var(--amber); color: var(--ink); padding: 2px 10px; border-radius: 20px; font-weight: 600; font-size: .75rem; }
.cfg dl { margin: 0; padding: 16px 18px 6px; counter-reset: ln; }
.cfg-line { display: grid; grid-template-columns: 2.2em auto minmax(0, 1fr); gap: 0 6px; padding: 3px 0; counter-increment: ln; border-radius: 4px; transition: background .2s; }
.cfg-line::before { content: counter(ln); color: #5E5A53; text-align: right; padding-right: 6px; }
.cfg-line:hover { background: #24221E; }
.cfg-line dt { color: var(--amber); }
.cfg-line dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.cfg .v { color: var(--wheat); }
.cfg .cm { color: #8E897F; }
.cfg-foot { margin: 0; padding: 6px 18px 18px; color: #8E897F; font-size: .8rem; }

/* 6.4 How to download — package manager progress */
.pkgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pkg { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; padding: 18px 20px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.pkg-n { font-family: var(--mono); font-weight: 700; background: var(--ink); color: var(--amber); padding: 4px 10px; border-radius: 4px; height: fit-content; font-size: .88rem; }
.pkg h3 { margin-bottom: 4px; }
.pkg p { margin: 0; font-size: .96rem; }
.pkg-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--paper-2); }
.pkg-bar i { display: block; height: 100%; width: 100%; background: repeating-linear-gradient(90deg, var(--ink) 0 8px, var(--amber) 8px 16px); transform-origin: left; }
.js .pkg .pkg-bar i { transform: scaleX(0); transition: transform 1.1s calc(.2s + var(--i, 0) * 120ms) cubic-bezier(.3, .8, .3, 1); }
.js .pkg.show .pkg-bar i { transform: scaleX(1); }
.callout { display: flex; gap: 14px; align-items: flex-start; margin: 30px 0 0; padding: 18px 22px; background: var(--wheat-soft); border: 1px solid var(--ink); border-radius: var(--radius-sm); }
.callout svg { width: 24px; height: 24px; color: var(--amber-dark); flex-shrink: 0; margin-top: 3px; }

/* 6.5 What it does — wheat band */
.band-wheat .tag, .band-wheat a { color: var(--ink); }
.wid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.wid h2 { font-size: 2.6rem; }
.wid-lead { font-size: 1.06rem; color: var(--ink-2); }
.uses { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.uses li { display: grid; grid-template-columns: 80px minmax(0, 1fr); column-gap: 18px; padding: 22px 0; border-bottom: 2px solid var(--ink); }
.use-n { grid-row: span 2; font-family: var(--mono); font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--ink); transition: color .3s; }
.uses li:hover .use-n { color: #fff; }
.uses h3 { margin-bottom: 4px; }
.uses p { margin: 0; color: var(--ink-2); }

/* 6.6 Install — tabs */
.tabs { background: var(--surface); border: 1px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.tablist { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; background: var(--paper-2); border-bottom: 1px solid var(--ink); }
.no-js .tablist { display: none; }
.tab { font: 600 .92rem var(--font); color: var(--ink); background: transparent; border: 1px solid var(--border); border-radius: 30px; padding: 8px 16px; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.tab:hover { border-color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--amber); border-color: var(--ink); }
.panel { padding: 26px; }
.no-js .panel + .panel { border-top: 1px dashed var(--stone); }
.panel[hidden] { display: none; }
.js .panel:not([hidden]) { animation: drop .35s ease; }
.panel p { margin: 14px 0 0; font-size: .95rem; }
.code { position: relative; background: var(--ink); border-radius: 8px; }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; color: #EDE8DD; font-size: .9rem; line-height: 1.65; }
.code pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.code pre code::before { content: ""; }
.copy { position: absolute; top: 10px; right: 10px; display: inline-flex; gap: 6px; align-items: center; font: 600 .78rem var(--font); color: var(--ink); background: var(--wheat); border: 0; border-radius: 6px; padding: 6px 10px; cursor: pointer; transition: background .2s; }
.copy svg { width: 14px; height: 14px; }
.copy:hover { background: var(--amber); }
.copy.done { background: #9FD6A8; }
.no-js .copy { display: none; }
.content pre { background: var(--ink); color: #EDE8DD; padding: 16px 18px; border-radius: 8px; overflow-x: auto; font-size: .88rem; line-height: 1.6; }
.content pre code { background: none; color: inherit; padding: 0; }
.first-use { margin-top: 30px; padding: 24px 28px; border: 1px dashed var(--stone); border-radius: var(--radius); }
.first-use ol { margin: 0; padding-left: 22px; }
.first-use li { margin-bottom: 8px; }

/* 6.7 Tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--ink); border-radius: var(--radius-sm); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
.data th, .data td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.data thead th { background: var(--ink); color: var(--wheat); font-weight: 600; font-size: .86rem; }
.data tbody th { color: var(--ink); font-weight: 600; }
.data tbody tr:last-child > * { border-bottom: 0; }
.data tbody tr { transition: background .2s; }
.data tbody tr:hover { background: var(--wheat-soft); }
.boot { font-family: var(--mono); font-weight: 700; white-space: pre; font-size: .86rem; }
.boot.ok { color: var(--ok); }
.boot.warn { color: var(--warn); }
.boot.fail { color: var(--fail); }
.boot-table td:first-child { width: 120px; }
.legend { margin-top: 14px; font-size: .9rem; color: var(--muted); }
.compare th.hl, .compare td.hl { background: var(--wheat-soft); color: var(--ink); font-weight: 600; }
.compare thead th.hl { background: var(--amber); color: var(--ink); }
.compare tbody th { position: sticky; left: 0; background: var(--surface); z-index: 1; }

/* 6.8 Pros and cons — diff */
.diff { background: var(--surface); border: 1px solid var(--ink); border-radius: var(--radius-sm); overflow: hidden; font-size: .98rem; }
.diff-head { margin: 0; padding: 10px 18px; background: var(--paper-2); font-family: var(--mono); font-size: .85rem; color: var(--stone); border-bottom: 1px solid var(--border); }
.diff-list { list-style: none; margin: 0; padding: 0; }
.diff-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr); padding: 11px 18px 11px 0; border-bottom: 1px solid rgba(0, 0, 0, .04); }
.diff-list li span { font-family: var(--mono); font-weight: 700; text-align: center; }
.add { background: var(--ok-soft); color: #1E4D27; }
.add span { color: var(--ok); }
.del { background: var(--fail-soft); color: #6E1A13; }
.del span { color: var(--fail); }
.js .diff-list li.reveal { translate: -24px 0; }
.js .diff-list li.reveal.show { translate: 0 0; }

/* 6.9 Troubleshooting — stderr */
.errs { display: grid; gap: 10px; }
.err { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--stone); border-radius: var(--radius-sm); transition: border-color .2s; }
.err[open] { border-left-color: var(--fail); border-color: var(--ink); }
.err summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 15px 18px; font-weight: 600; }
.err summary::-webkit-details-marker { display: none; }
.err summary::after { content: "+"; margin-left: auto; font-family: var(--mono); font-size: 1.2rem; color: var(--stone); transition: transform .25s; }
.err[open] summary::after { transform: rotate(45deg); color: var(--fail); }
.err summary code { background: none; padding: 0; font-size: .92rem; color: var(--ink); }
.err-tag { flex-shrink: 0; font-family: var(--mono); font-size: .72rem; font-weight: 700; color: #fff; background: var(--fail); padding: 2px 7px; border-radius: 4px; }
.err > div { padding: 0 18px 14px 18px; animation: drop .3s ease; }
.err p { margin: 0 0 8px; font-size: .95rem; }
.best { margin-top: 28px; padding: 22px 26px; background: var(--ok-soft); border-radius: var(--radius-sm); border: 1px solid #BFDDBF; }
.best h3 { display: flex; gap: 10px; align-items: center; }
.best h3 svg { width: 22px; height: 22px; color: var(--ok); }
.best ul { margin: 0; padding-left: 20px; }

/* 6.10 Editorial perspectives — sticky notes */
.notes { list-style: none; margin: 0; padding: 10px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; }
.note { position: relative; padding: 30px 22px 24px; background: var(--wheat-soft); box-shadow: 0 12px 20px -14px rgba(20, 20, 20, .45); transform: rotate(-1.4deg); transition: transform .35s ease, box-shadow .35s; }
.note:nth-child(2) { background: #FFF6CF; transform: rotate(1.2deg); }
.note:nth-child(3) { background: #F1EBDD; transform: rotate(-.6deg); }
.note:nth-child(4) { background: #FDE9C4; transform: rotate(1.6deg); }
.note::before { content: ""; position: absolute; top: -10px; left: 50%; width: 76px; height: 22px; margin-left: -38px; background: rgba(101, 99, 90, .28); transform: rotate(-2deg); }
.note:hover { transform: rotate(0) translateY(-6px); box-shadow: 0 20px 26px -16px rgba(20, 20, 20, .5); }
.js .note.reveal.show { translate: 0 0; }
.note-tag { display: block; font-family: var(--mono); font-size: .72rem; color: var(--stone); margin-bottom: 8px; }
.note h3 { font-size: 1.05rem; }
.note p { margin: 0; font-size: .93rem; }

/* 6.11 FAQ — two columns */
.faq-cols { columns: 2; column-gap: 36px; }
.faq-item { break-inside: avoid; border-top: 1px solid var(--ink); margin-bottom: 4px; }
.faq-item summary { list-style: none; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; padding: 16px 2px; font-weight: 600; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.q { flex-shrink: 0; display: grid; place-items: center; width: 26px; height: 26px; font-family: var(--mono); font-weight: 700; background: var(--wheat); color: var(--ink); border-radius: 4px; transition: background .25s, transform .3s; }
.faq-item summary:hover .q { background: var(--amber); }
.faq-item[open] .q { background: var(--ink); color: var(--amber); transform: rotate(360deg); }
.faq-item > div { padding: 0 2px 18px 38px; animation: drop .3s ease; }
.faq-item > div p { margin: 0; }

/* 6.12 Final CTA */
.cta { background: var(--ink); color: #CFC8BB; padding: 100px 0; text-align: center; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 4px); pointer-events: none; }
.cta-inner { position: relative; }
.cta-cmd { font-family: var(--mono); font-size: 1.5rem; color: #EDE8DD; margin-bottom: 18px; }
.cta h2 { color: #fff; font-size: 2.6rem; max-width: 760px; margin-left: auto; margin-right: auto; }
.cta p { max-width: 660px; margin: 0 auto 28px; }
.cta .btn-amber { box-shadow: 4px 4px 0 var(--wheat); border-color: var(--wheat); }
.cta .btn-amber:hover { box-shadow: 6px 6px 0 var(--wheat); }
.cta .small { font-size: .85rem; margin: 22px auto 0; color: #A39E94; }

/* ---------- 7. Inner pages ---------- */
.page-top { padding: 52px 0 40px; border-bottom: 1px solid var(--ink); background-image: radial-gradient(rgba(20, 20, 20, .08) 1px, transparent 1.4px); background-size: 22px 22px; }
.page-top h1 { font-size: 2.6rem; font-weight: 800; max-width: 900px; letter-spacing: -.025em; }
.page-top > .container > p { max-width: 760px; font-size: 1.05rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 16px; font-family: var(--mono); font-size: .85rem; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--stone); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--amber-dark); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.label { display: inline-block; background: var(--ink); color: var(--amber); font-family: var(--mono); font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 4px; margin-bottom: 12px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--muted); }
.meta span + span::before { content: "·"; margin-right: 12px; color: var(--amber-dark); font-weight: 700; }
.guides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.guide-card { position: relative; display: grid; grid-template-columns: 230px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--ink); border-radius: var(--radius-sm); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.guide-card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--amber); }
.guide-card img { width: 100%; height: 100%; object-fit: contain; background: var(--paper-2); border-right: 1px solid var(--ink); }
.guide-card .body { padding: 18px 20px 20px; }
.guide-card .cat { font-family: var(--mono); font-size: .78rem; font-weight: 700; color: var(--amber-dark); }
.guide-card h2, .guide-card h3 { font-size: 1.06rem; margin: 6px 0 8px; }
.guide-card h2 a, .guide-card h3 a { color: var(--ink); text-decoration: none; }
.guide-card h2 a::after, .guide-card h3 a::after { content: ""; position: absolute; inset: 0; }
.guide-card p { font-size: .9rem; margin: 0; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; }
.content { max-width: 780px; }
.content h2 { font-size: 1.6rem; margin-top: 1.8em; }
.content h2::before { content: "## "; font-family: var(--mono); color: var(--amber-dark); font-size: .8em; }
.content h3 { margin-top: 1.4em; }
.content ul, .content ol { padding-left: 22px; }
.content li { margin-bottom: 6px; }
.content .table-wrap { margin: 20px 0; }
.cover { margin: 0 0 28px; border: 1px solid var(--ink); border-radius: var(--radius-sm); overflow: hidden; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); background: var(--surface); border: 1px solid var(--ink); border-radius: var(--radius-sm); padding: 20px; }
.toc h2 { font-size: 1rem; }
.toc ol { margin: 0 0 18px; padding-left: 20px; font-size: .9rem; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--amber-dark); }
.toc .btn { width: 100%; }
.toc .btn-amber, .toc .btn-amber:hover { color: var(--ink); }
.end-cta { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 40px; padding: 26px 28px; background: var(--ink); border-radius: var(--radius-sm); color: #CFC8BB; }
.end-cta h2 { color: #fff; margin: 0 0 4px; font-size: 1.4rem; }
.end-cta h2::before { content: none; }
.end-cta p { margin: 0; }
.end-cta .btn-amber { box-shadow: 4px 4px 0 var(--wheat); }
.related { margin-top: 70px; }
.cols, .map-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; margin-top: 24px; }
.map-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px 20px; }
.mail-link { display: inline-flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 700; }
.mail-link svg { width: 24px; height: 24px; }
.error-page { text-align: center; padding: 80px 24px 100px; }
.error-page img { margin: 0 auto; animation: bob 3s ease-in-out infinite; }
.error-page .big { font-family: var(--mono); font-size: 5rem; font-weight: 700; line-height: 1; margin: 14px 0; color: var(--ink); }
.error-page .row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* ---------- 8. Footer ---------- */
.footer { background: var(--bg); padding-top: 26px; }
.ascii-rule { margin: 0 0 30px; font-family: var(--mono); color: var(--stone); white-space: nowrap; overflow: hidden; letter-spacing: 2px; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 48px; padding-bottom: 30px; }
.footer .logo { margin-bottom: 14px; }
.footer-brand p { font-size: .94rem; margin: 0; }
.footer-info { margin: 0; display: grid; gap: 16px; }
.footer-info div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; border-bottom: 1px dashed var(--border); }
.footer-info dt { font-family: var(--mono); font-weight: 700; color: var(--amber-dark); }
.footer-info dt::after { content: ":"; }
.footer-info dd { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-info a { color: var(--ink); text-decoration: none; font-size: .93rem; background: linear-gradient(var(--wheat), var(--wheat)) 0 100% / 0 2px no-repeat; transition: background-size .25s; }
.footer-info a:hover { background-size: 100% 2px; color: var(--ink); }
.footer-note { margin: 0 0 30px; font-family: var(--mono); font-size: .84rem; color: var(--muted); }
.footer-note span { color: var(--amber-dark); font-weight: 700; }
.footer-bottom { background: var(--ink); color: #A39E94; text-align: center; padding: 16px 24px; font-size: .9rem; }
.footer-bottom a { color: var(--wheat); font-weight: 600; text-decoration: none; }
.footer-bottom a:hover { color: var(--amber); }

/* ---------- 9. Animations ---------- */
.js .reveal { opacity: 0; translate: 0 22px; transition: opacity .6s ease, translate .6s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.show { opacity: 1; translate: 0 0; }
.js .frow.reveal { clip-path: inset(0 100% 0 0); translate: 0 0; transition: clip-path .7s cubic-bezier(.6, 0, .2, 1), opacity .4s; transition-delay: calc(var(--i, 0) * 80ms); }
.js .frow.reveal.show { clip-path: inset(0 0 0 0); }
/* terminal typing: lines appear one by one when JS adds .play */
.js .term .tl { opacity: 0; transition: opacity .25s ease; }
.js .term.play .tl { opacity: 1; transition-delay: calc(.7s + var(--n) * 90ms); }
.js .term.play .tl.cmd:first-child { transition-delay: 0s; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- 10. Responsive ---------- */
@media (max-width: 1080px) {
  .nav a { padding: 7px 8px; font-size: .9rem; }
  .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  :root { --h2-size: 1.9rem; --hero-h1-size: 3rem; }
  .menu-toggle { display: inline-flex; }
  .header-row { position: relative; }
  .js .nav { position: absolute; left: 50%; width: 100vw; transform: translateX(-50%); top: calc(100% + 1px); background: var(--bg); border-bottom: 1px solid var(--ink); box-shadow: 0 24px 30px -22px rgba(0, 0, 0, .35); max-height: 0; overflow: hidden; visibility: hidden; transition: max-height .35s ease, visibility .35s; }
  .js .nav.open { max-height: 80vh; overflow-y: auto; visibility: visible; }
  .js .nav ul { flex-direction: column; padding: 6px 24px 16px; gap: 0; max-width: var(--container); margin: 0 auto; }
  .js .nav a { padding: 13px 4px 13px 18px; border-bottom: 1px dashed var(--border); border-radius: 0; font-size: 1rem; }
  .js .nav a::before { top: 13px; }
  .no-js .menu-toggle { display: none; }
  .no-js .header-row { flex-wrap: wrap; padding-bottom: 8px; }
  .no-js .nav { width: 100%; }
  .no-js .nav ul { flex-wrap: wrap; }
  .hero-grid, .split, .dl-wrap, .wid, .article-layout, .footer-top { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: 32px; }
  .side-head { position: static; }
  .frow { grid-template-columns: 210px minmax(0, 1fr); }
  .toc { position: static; order: -1; }
  .faq-cols { columns: 1; }
}
@media (max-width: 640px) {
  :root { --h2-size: 1.62rem; --header-h: 62px; }
  body { font-size: 1rem; }
  .container { padding: 0 18px; }
  .section { padding: 66px 0; }
  .hero { padding: 30px 0 56px; }
  .hero h1 { font-size: var(--hero-h1-mobile); margin-bottom: 26px; }
  .hero-actions .btn { width: 100%; }
  .hero-kv { grid-template-columns: minmax(0, 1fr); }
  .term-body { font-size: .72rem; padding: 14px 14px 10px; min-height: 0; }
  .term-out { flex-direction: column; gap: 10px; }
  .tux { font-size: .72rem; }
  .term-info span { white-space: normal; }
  .frow { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 18px 6px; }
  .dl-main h2, .wid h2 { font-size: 2rem; }
  .cfg { font-size: .78rem; box-shadow: 6px 6px 0 var(--wheat); }
  .cfg-line { grid-template-columns: 1.8em minmax(0, 1fr); }
  .cfg-line dd { grid-column: 2; }
  .pkg { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px 16px 22px; }
  .pkg-n { width: fit-content; }
  .uses li { grid-template-columns: 56px minmax(0, 1fr); }
  .use-n { font-size: 1.9rem; }
  .panel { padding: 18px 14px; }
  .code pre { font-size: .8rem; padding: 46px 14px 14px; }
  .tab { font-size: .85rem; padding: 7px 12px; }
  .notes { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .cta { padding: 76px 0; }
  .cta h2 { font-size: 1.85rem; }
  .cta-cmd { font-size: 1.2rem; }
  .page-top h1 { font-size: 1.9rem; }
  .content h2 { font-size: 1.36rem; }
  .guides, .cols, .map-cols { grid-template-columns: minmax(0, 1fr); }
  .guide-card { grid-template-columns: minmax(0, 1fr); }
  .guide-card img { height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-right: 0; border-bottom: 1px solid var(--ink); }
  .footer-info div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .callout { flex-direction: column; }
  .err summary { flex-wrap: wrap; }
}

/* ---------- 11. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js .reveal, .js .term .tl { opacity: 1; translate: none; clip-path: none; }
  .js .pkg .pkg-bar i { transform: none; }
}
