/* guides.rogerle.com · V1.3.0
   Colours follow RogerLe.com's Ink (dark) and Paper (light) palettes.
   Every colour is a variable; the light theme only swaps the tokens.
   Guide components (code blocks, callouts, steps, contents) from the
   Claude Design handoff of 2026-09-16. */

/* RogerLe.com wordmark: Bree Serif (TypeTogether, SIL OFL 1.1), served unmodified from /assets/fonts/ */
@font-face { font-family: "Bree Serif"; src: url("/assets/fonts/BreeSerif-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --bg: oklch(0.16 0.012 260);
  --bg-card: oklch(0.19 0.013 260);
  --line: oklch(0.30 0.014 260);
  --text: oklch(0.96 0.008 90);
  --text-soft: oklch(0.80 0.012 90);
  --muted: oklch(0.66 0.014 90);
  --accent: oklch(0.74 0.14 60);
  --accent-ink: oklch(0.16 0.012 260);
  --link: oklch(0.78 0.13 65);
  --code-bg: oklch(0.13 0.012 260);
  --sunk: oklch(0.21 0.013 260);
  --note: oklch(0.80 0.09 235);
  --note-bg: oklch(0.21 0.022 235);
  --note-line: oklch(0.34 0.04 235);
  --warn: oklch(0.78 0.13 35);
  --warn-bg: oklch(0.215 0.03 35);
  --warn-line: oklch(0.36 0.06 35);
  --ok: oklch(0.80 0.11 150);
  --shadow: 0 12px 30px rgba(0, 0, 0, .28);
  --brand: "Bree Serif", Georgia, serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 14px;
  --shell: 1120px;
  --article: 800px;
  --gutter: 24px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: oklch(0.975 0.008 85);
  --bg-card: oklch(0.99 0.005 85);
  --line: oklch(0.88 0.010 70);
  --text: oklch(0.22 0.012 60);
  --text-soft: oklch(0.38 0.012 60);
  --muted: oklch(0.52 0.012 60);
  --accent: oklch(0.58 0.15 55);
  --accent-ink: oklch(0.99 0.010 80);
  --link: oklch(0.50 0.14 50);
  --code-bg: oklch(0.945 0.010 80);
  --sunk: oklch(0.955 0.010 80);
  --note: oklch(0.47 0.11 240);
  --note-bg: oklch(0.965 0.018 240);
  --note-line: oklch(0.87 0.03 240);
  --warn: oklch(0.50 0.16 32);
  --warn-bg: oklch(0.97 0.02 32);
  --warn-line: oklch(0.88 0.05 32);
  --ok: oklch(0.45 0.12 150);
  --shadow: 0 12px 30px rgba(60, 40, 10, .10);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.65; overflow-wrap: break-word; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible, details:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.shell { max-width: var(--shell); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }
.ico { flex: none; }
@media (prefers-reduced-motion: no-preference) {
  a, button, summary, .topic, .row, .index-row { transition: color .12s ease, border-color .12s ease, background-color .12s ease; }
}

/* Topic mark: ">_" Claude Code, "#" Linux */
.mark { display: inline-block; font-family: var(--mono); font-size: 11px; line-height: 1.4; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-right: 7px; font-weight: 400; letter-spacing: 0; text-transform: none; vertical-align: .1em; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-row { display: flex; align-items: center; gap: 12px 20px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); white-space: nowrap; margin-right: auto; }
.brand:hover { color: var(--text); }
.brand-mark { font-family: var(--brand); font-size: 24px; line-height: 1; }
.brand-mark .dot { color: var(--accent); }
.brand-sub { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; line-height: 1.5; }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 10px; border: 1px solid transparent; border-radius: 8px; color: var(--text-soft); text-decoration: none; font-size: 15px; }
.site-nav a .mark { margin-right: 7px; }
.site-nav a:hover { color: var(--text); background: var(--bg-card); }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--bg-card); border-color: var(--line); }
.header-tools { display: flex; align-items: center; gap: 8px; }
.theme-toggle { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: transparent; color: var(--accent); border-radius: 8px; cursor: pointer; }
.theme-toggle:hover { border-color: var(--accent); }
[data-theme="dark"] .ico-sun, [data-theme="light"] .ico-moon { display: none; }

/* Language menu */
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-soft); font-family: var(--mono); font-size: 13px; font-weight: 600; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary .chev { color: var(--muted); }
.lang[open] summary, .lang summary:hover { border-color: var(--accent); color: var(--text); }
.lang[open] summary .chev { transform: rotate(180deg); }
.lang-panel { position: absolute; right: 0; top: calc(100% + 6px); width: 268px; max-width: calc(100vw - 32px); background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); z-index: 20; }
.lang-hint { font-size: 12px; line-height: 1.4; color: var(--muted); margin: 0; padding: 2px 6px 9px; }
.lang-panel ul { list-style: none; margin: 0; padding: 0; }
.lang-panel a { display: flex; align-items: baseline; gap: 10px; min-height: 40px; padding: 8px 6px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 15px; }
.lang-panel a:hover { background: var(--sunk); color: var(--text); }
.lang-panel a[aria-current="true"] { background: var(--sunk); }
.lang-panel .lang-code { font-family: var(--mono); font-size: 12px; color: var(--muted); width: 46px; flex: none; }
.lang-panel a[aria-current="true"] .lang-code { color: var(--accent); }
.lang-name small { font-size: 13px; color: var(--muted); }
.lang-check { margin-left: auto; color: var(--accent); align-self: center; }

/* Main */
main { padding-top: 44px; padding-bottom: 72px; min-height: 60vh; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; }
.lede { font-size: 20px; line-height: 1.5; color: var(--text-soft); margin: 0 0 26px; text-wrap: pretty; }
.eyebrow { display: flex; align-items: center; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.eyebrow a { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--text); }

/* Home */
.hero { max-width: var(--article); }
.hero h1 { font-size: 56px; line-height: 1.08; letter-spacing: -.02em; margin: 0 0 20px; text-wrap: balance; }
.hero .lede { max-width: 640px; }
.section { margin-top: 48px; }
.section-label { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.topics { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .topics { grid-template-columns: 1fr 1fr; } }
.topic { display: block; padding: 20px 22px 22px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; }
.topic:hover { border-color: var(--accent); color: inherit; }
.topic-top { display: flex; align-items: center; gap: 4px; }
.topic-top .mark { font-size: 13px; padding: 3px 7px; border-radius: 6px; color: var(--accent); }
.topic .count { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.topic h3 { font-size: 24px; line-height: 1.25; margin: 14px 0 8px; }
.topic p { margin: 0; color: var(--text-soft); font-size: 15px; line-height: 1.6; }

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.row-side { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.row-side time { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.row-topic { display: flex; align-items: center; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.row-topic .mark { font-size: 10px; margin-right: 6px; }
.row h3 { font-size: 21px; line-height: 1.3; margin: 0 0 6px; }
.row h3 a, .index-row h3 a { color: var(--text); text-decoration: none; }
.row h3 a:hover, .index-row h3 a:hover { color: var(--accent); }
.row-main p { margin: 0; color: var(--text-soft); font-size: 15px; line-height: 1.55; }
.row-main .row-meta { margin-top: 8px; font-size: 13px; color: var(--muted); }
.row-meta time { font-family: var(--mono); font-size: 12px; }

/* Topic index */
.topic-page .page-head { max-width: var(--article); }
.month { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 36px 0 0; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.index { list-style: none; margin: 0; padding: 0; }
.index-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 110px; gap: 4px 20px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.index-row time { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.index-row h3 { font-size: 19px; line-height: 1.3; margin: 0 0 4px; }
.index-main p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.index-min { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; }

/* Pages (About, 404) */
.page { max-width: var(--article); }
.page-head h1 { font-size: 44px; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 16px; text-wrap: balance; }

/* Guide */
.guide { display: block; }
.post { min-width: 0; max-width: var(--article); }
.post-head h1 { font-size: 42px; line-height: 1.12; letter-spacing: -.015em; margin: 0 0 16px; text-wrap: pretty; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.byline .by { font-family: var(--serif); font-size: 17px; }
.byline .by a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 1px; }
.byline .by a:hover { color: var(--accent); }
.ai-tag { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; line-height: 1.5; color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: 1px 5px; }
.byline .sep { color: var(--line); }
.byline .meta { font-size: 14px; color: var(--muted); }
.byline time { font-family: var(--mono); font-size: 12px; }
.verified { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 34px; padding: 9px 12px; background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; line-height: 1.45; color: var(--text-soft); }
.verified .ico { color: var(--ok); margin-top: 2px; }
.verified strong { color: var(--text); font-weight: 600; }

/* Contents: collapsible below 1100px, sticky column above */
.toc-inline { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-card); margin: 0 0 34px; }
.toc-inline summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; }
.toc-inline summary::-webkit-details-marker { display: none; }
.toc-label { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0; }
.toc-inline .toc-label { flex: 1 1 auto; }
.toc-count { font-size: 12px; color: var(--muted); }
.toc-inline .chev { color: var(--accent); }
.toc-inline[open] .chev { transform: rotate(180deg); }
.toc-inline ol { list-style: none; margin: 0; padding: 6px 14px 10px; border-top: 1px solid var(--line); }
.toc-inline a { display: flex; align-items: center; gap: 12px; min-height: 44px; color: var(--text); text-decoration: none; font-size: 16px; line-height: 1.35; }
.toc-inline a:hover { color: var(--accent); }
.toc-inline .n, .toc-side .n { font-family: var(--mono); font-size: 13px; color: var(--muted); flex: none; }
.toc-side { display: none; }
@media (min-width: 1100px) {
  .guide.has-toc { display: grid; grid-template-columns: minmax(0, 1fr) 216px; gap: 56px; align-items: start; }
  .guide.has-toc .toc-inline { display: none; }
  .toc-side { display: block; position: sticky; top: 28px; }
  .toc-side .toc-label { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .toc-side ol { list-style: none; margin: 0; padding: 8px 0 0; }
  .toc-side a { display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 6px 0; color: var(--text-soft); text-decoration: none; font-size: 14px; line-height: 1.4; }
  .toc-side .n { font-size: 12px; }
  .toc-side a:hover { color: var(--text); }
  .toc-side a[aria-current="true"] { color: var(--accent); font-weight: 600; }
  .toc-side a[aria-current="true"] .n { color: var(--accent); }
}

/* Prose */
.prose h2 { font-size: 27px; line-height: 1.2; letter-spacing: -.01em; margin: 34px 0 12px; }
.prose h3 { font-size: 20px; line-height: 1.3; margin: 26px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose ul, .prose ol:not(.steps) { padding-left: 1.4em; }
.prose li { margin: 5px 0; }
.prose li::marker { color: var(--muted); }
.prose blockquote { margin: 0 0 26px; padding: 2px 0 2px 18px; border-left: 2px solid var(--accent); color: var(--text-soft); font-family: var(--serif); font-size: 18px; line-height: 1.55; }
.prose blockquote p { margin: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }
.prose :not(pre) > code { font-family: var(--mono); font-size: .88em; background: var(--code-bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose img { max-width: 100%; height: auto; }

/* Code blocks: shell-user, shell-root, claude, file, plain; output joins the block above */
.code { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--code-bg); margin: 0 0 22px; }
.code-head { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 6px 0 12px; border-bottom: 1px solid var(--line); background: var(--bg-card); }
.code-head .ico { color: var(--muted); }
.code-label { flex: 1 1 auto; min-width: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code[data-role="file"] .code-label { font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--text-soft); }
.code[data-role="shell-root"] .code-label, .code[data-role="shell-root"] .prompt { color: var(--warn); }
.code pre { margin: 0; padding: 13px 14px; overflow-x: auto; overscroll-behavior-x: contain; font-family: var(--mono); font-size: 14px; line-height: 1.7; color: var(--text); tab-size: 4; }
.code code { font-family: inherit; white-space: pre; }
.prompt { color: var(--muted); user-select: none; -webkit-user-select: none; }
.code-copy { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 6px; background: transparent; border: 0; cursor: pointer; }
.code-copy span { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-soft); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }
.code-copy:hover span { color: var(--text); border-color: var(--accent); }
.code-copy.is-done span { color: var(--ok); border-color: var(--ok); }
.code-out { border-top: 1px dashed var(--line); background: var(--bg); }
.code[data-role="output"] .code-out { border-top: 0; }
.code-out-label { margin: 0; padding: 7px 14px 0; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.code-out pre { padding-top: 6px; color: var(--muted); }

/* Callouts: shape + word + colour, never colour alone */
.callout { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0 0 24px; background: var(--sunk); }
.callout-label { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.callout-body { font-size: 16px; line-height: 1.55; color: var(--text-soft); }
.callout-body > :last-child { margin-bottom: 0; }
.callout-body p { margin: 0 0 10px; }
.callout-note { background: var(--note-bg); border-color: var(--note-line); }
.callout-note .callout-label { color: var(--note); }
.callout-warning { background: var(--warn-bg); border-color: var(--warn-line); margin-bottom: 30px; }
.callout-warning .callout-label { color: var(--warn); }
.callout-checked .callout-label { color: var(--ok); }

/* Numbered procedures */
.prose .steps { list-style: none; margin: 0 0 28px; padding: 0; }
.step { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 18px; margin: 0; padding-bottom: 26px; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 16.5px; top: 42px; bottom: 0; width: 1px; background: var(--line); }
.step:last-child { padding-bottom: 0; }
.step-n { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-card); font-family: var(--mono); font-size: 14px; color: var(--accent); }
.step-body { min-width: 0; }
.prose .step-body h3 { margin: 5px 0 8px; }
.step-body > p { color: var(--text-soft); margin-bottom: 14px; }
.step-body > :last-child { margin-bottom: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-card); }
.foot-row { padding-top: 20px; padding-bottom: 24px; font-size: 14px; color: var(--muted); }
.foot-row p { margin: 0 0 6px; }
.version { font-family: var(--mono); font-size: 12px; margin-right: 8px; }
.foot-links a { color: var(--text-soft); }
.foot-links a:hover { color: var(--accent); }

/* Visually hidden live region for "Copied" */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 1099px) and (min-width: 421px) { :root { --gutter: 20px; } }
@media (max-width: 760px) {
  main { padding-top: 28px; padding-bottom: 56px; }
  .hero h1 { font-size: 36px; }
  .page-head h1 { font-size: 32px; }
  .post-head h1 { font-size: 30px; }
  .lede { font-size: 18px; }
  .prose h2 { font-size: 22px; }
  .prose h3 { font-size: 18px; }
  .code pre { font-size: 13px; }
  .step { gap: 12px; }
  .site-nav { order: 3; width: 100%; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row-side { flex-direction: row; align-items: center; gap: 12px; padding-top: 0; }
  .index-row { grid-template-columns: minmax(0, 1fr) auto; }
  .index-row time { grid-column: 1; }
  .index-main { grid-column: 1 / -1; grid-row: 2; }
  .index-min { grid-column: 2; grid-row: 1; }
  .index-main p { white-space: normal; }
}
@media (max-width: 420px) {
  :root { --gutter: 16px; }
  .brand-mark { font-size: 22px; }
  .site-nav a { font-size: 14px; padding: 4px 8px; }
  .code-copy { min-height: 44px; min-width: 44px; }
  .toc-inline a { min-height: 44px; }
}
