/* Guides (/guides/): extras on top of /styles.css. Light theme only.
   Page shape: .tut-hero (crumb, h1, lead, meta) → .tut-layout (sticky .tut-toc + .tut-body article)
   → .tut-related cards → .tut-cta band. Components: .tut-summary, .tut-callout, .tprompt,
   .tut-plist (one-line prompts), .tut-checklist, .tut-compare, .tut-steps, .tut-table, .tut-fix. */

.tut-offscreen { position: fixed; top: 0; left: -9999px; opacity: 0; }

/* ---------- Hero ---------- */
.tut-hero { padding: clamp(28px, 5vw, 56px) 0 clamp(24px, 4vw, 40px); border-bottom: 1px solid var(--line); background: var(--paper); }
.tut-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; font: 500 var(--fs-xs)/1.2 var(--mono); }
.tut-crumb a { color: var(--muted); }
.tut-crumb .tut-chip { margin: 0; }
.tut-chip {
  display: inline-block; padding: 5px 10px; border-radius: 999px;
  background: var(--field); color: var(--ink); border: 1px solid var(--line-strong);
  font: 500 var(--fs-xs)/1 var(--mono); letter-spacing: 0.02em; text-decoration: none;
}
.tut-hero h1 { max-width: 20em; margin: 0 0 14px; }
.tut-hero .tut-lead { max-width: 40em; margin: 0 0 18px; font-size: var(--fs-lede); line-height: 1.5; color: var(--muted); }
.tut-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font: 500 var(--fs-xs)/1.4 var(--mono); color: var(--muted); }
.tut-meta li::before { content: "● "; color: var(--field); -webkit-text-stroke: 1px var(--line-strong); }
.tut-hero-actions { margin-top: 20px; }

/* ---------- Layout: sticky contents on desktop ---------- */
.tut-layout { padding-top: clamp(24px, 4vw, 40px); padding-bottom: 8px; }
@media (min-width: 1040px) {
  .tut-layout { display: grid; grid-template-columns: 220px minmax(0, 740px); gap: 64px; align-items: start; }
}
.tut-body { max-width: 740px; }
.tut-body > :first-child { margin-top: 0; }
.prose.tut-body h2 { font-size: clamp(24px, 1vw + 20px, 28px); margin: 48px 0 12px; }

.tut-toc { font-size: var(--fs-sm); margin: 0 0 28px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tut-toc-title { margin: 0 0 8px; font: 500 var(--fs-xs)/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.tut-toc ol { margin: 0; padding: 0; list-style: none; columns: 2 200px; column-gap: 24px; }
.tut-toc li { margin: 0; break-inside: avoid; }
.tut-toc a { display: block; padding: 5px 0; color: var(--ink); text-decoration: none; line-height: 1.35; }
.tut-toc a:hover { color: var(--primary); text-decoration: underline; }
@media (min-width: 1040px) {
  .tut-toc { position: sticky; top: 100px; margin: 0; padding: 0; background: none; border: 0; max-height: calc(100vh - 120px); overflow-y: auto; }
  .tut-toc ol { columns: auto; border-left: 2px solid var(--line); }
  .tut-toc a { padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); }
  .tut-toc a[aria-current="true"] { color: var(--ink); font-weight: 600; border-left-color: var(--line-strong); }
}

/* ---------- In short ---------- */
.tut-summary { margin: 0 0 32px; padding: 18px 20px; background: var(--surface); border: 2px solid var(--line-strong); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--field); }
.tut-summary-title { margin: 0 0 8px !important; font: 500 var(--fs-xs)/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand); }
.prose .tut-summary ul { margin: 0; padding-left: 1.2em; }
.prose .tut-summary li { margin: 4px 0; }

/* ---------- Callouts ---------- */
.tut-callout { margin: 22px 0; padding: 14px 16px 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-left: 4px solid var(--field); background: var(--surface); }
.tut-callout > :last-child { margin-bottom: 0; }
.tut-callout p { margin: 0 0 6px; }
.tut-callout-title { font: 600 var(--fs-sm)/1.3 var(--body); color: var(--ink); }
.tut-callout-title::before { content: "Tip · "; font: 500 var(--fs-xs)/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.tut-warn { border-left-color: var(--alert); background: var(--alert-bg); }
.tut-warn .tut-callout-title::before { content: "Watch out · "; color: var(--alert); }
.tut-good { border-left-color: var(--ok); background: var(--ok-bg); }
.tut-good .tut-callout-title::before { content: "Good to know · "; color: var(--ok); }

/* ---------- Copyable prompt blocks ---------- */
.tprompt { margin: 18px 0 24px; border: 2px solid var(--line-strong); border-radius: 12px; background: var(--surface); overflow: hidden; }
.tprompt-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 14px; background: var(--bg); border-bottom: 1px solid var(--line); }
.tprompt-label { margin: 0 !important; font: 500 13.5px/1.3 var(--mono); color: var(--ink); min-width: 0; }
.tprompt .copy-btn { min-height: 40px; min-width: 76px; }
.tprompt pre { margin: 0; padding: 14px 16px; border: 0; border-radius: 0; font: 400 14.5px/1.6 var(--mono); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 28em; overflow-y: auto; }
.tprompt pre:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }

/* ---------- One-line prompts with a copy button each ---------- */
.prose ul.tut-plist { list-style: none; padding: 0; margin: 10px 0 18px; display: grid; gap: 8px; }
.prose .tut-plist li { margin: 0; display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 10px 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tut-p { font: 400 15px/1.5 var(--mono); color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.copy-mini { flex: 0 0 auto; min-height: 36px; min-width: 64px; padding: 6px 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 8px; font: 600 13px/1 var(--body); cursor: pointer; }
.copy-mini:hover { background: var(--bg); }
.copy-mini[data-copied] { background: var(--ink); color: var(--paper); }

/* ---------- Numbered steps ---------- */
.prose ol.tut-steps { list-style: none; counter-reset: step; padding: 0; margin: 16px 0 24px; }
.prose ol.tut-steps > li { counter-increment: step; position: relative; padding: 2px 0 14px 48px; margin: 0; }
.prose ol.tut-steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--field); border: 2px solid var(--line-strong);
  font: 700 15px/1 var(--body); color: var(--ink);
}
.prose ol.tut-steps > li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 2px; width: 2px; background: var(--line); }

/* ---------- Before / after ---------- */
.tut-compare { display: grid; gap: 12px; margin: 20px 0; }
@media (min-width: 640px) { .tut-compare { grid-template-columns: 1fr 1fr; } }
.tut-before, .tut-after { border-radius: 12px; padding: 14px 16px; border: 1px solid var(--line); min-width: 0; }
.tut-before { background: var(--surface); }
.tut-after { background: var(--ok-bg); border-color: rgba(30, 91, 52, 0.25); }
.tut-before p, .tut-after p { margin: 0; }
.tut-before p + p, .tut-after p + p { margin-top: 6px; }
.tut-compare-label { font: 500 12.5px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px !important; color: var(--muted); }
.tut-after .tut-compare-label { color: var(--ok); }

/* ---------- Checklist ---------- */
.prose ul.tut-checklist { list-style: none; padding: 0; margin: 12px 0 8px; }
.prose .tut-checklist li { margin: 0 0 8px; }
.tut-checklist label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.tut-checklist input { flex: 0 0 auto; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--primary); }
.tut-checklist label:has(input:checked) { background: var(--ok-bg); border-color: rgba(30, 91, 52, 0.25); }
.tut-needs { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font: 500 11.5px/1.3 var(--mono); color: var(--muted); vertical-align: 1px; }
.tut-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 20px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font: 500 var(--fs-sm)/1.3 var(--mono); }
.tut-progress-bar { flex: 1 1 160px; height: 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.tut-progress-bar span { display: block; height: 100%; width: 0; background: var(--live); transition: width var(--ease); }
.tut-progress .btn-quiet { min-height: 36px; padding: 6px 12px; }

/* ---------- Tables ---------- */
.prose .tut-table { margin: 18px 0 24px; }
.tut-table table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
.tut-table th, .tut-table td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tut-table thead th { background: var(--bg); font-weight: 700; }
.tut-table tbody tr:last-child > * { border-bottom: 0; }
.tut-table td code { white-space: nowrap; }
.tut-ok, .tut-mid, .tut-bad { display: inline-block; padding: 2px 8px; border-radius: 999px; font: 600 12.5px/1.4 var(--mono); white-space: nowrap; }
.tut-ok { background: var(--ok-bg); color: var(--ok); }
.tut-mid { background: var(--hl); color: #6B4E00; }
.tut-bad { background: var(--alert-bg); color: var(--alert); }

/* ---------- Symptom → fix list ---------- */
.prose dl.tut-fix { margin: 16px 0 24px; display: grid; gap: 8px; }
.tut-fix > div { display: grid; gap: 4px 16px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
@media (min-width: 640px) { .tut-fix > div { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }
.tut-fix dt { font-weight: 600; }
.tut-fix dd { margin: 0; font: 400 14.5px/1.5 var(--mono); color: var(--ink); }

/* ---------- Design visuals ---------- */
.tut-scale { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin: 16px 0 24px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.tut-scale span { display: flex; flex-direction: column; align-items: center; gap: 6px; font: 500 12px/1 var(--mono); color: var(--muted); }
.tut-scale i { display: block; background: var(--field); border: 1px solid var(--line-strong); }
.tut-s4 { width: 4px; height: 4px; } .tut-s8 { width: 8px; height: 8px; } .tut-s16 { width: 16px; height: 16px; }
.tut-s24 { width: 24px; height: 24px; } .tut-s32 { width: 32px; height: 32px; } .tut-s48 { width: 48px; height: 48px; }
.tut-s64 { width: 64px; height: 64px; } .tut-s96 { width: 96px; height: 96px; }

.tut-type { margin: 16px 0 24px; padding: 8px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.tut-type p { display: flex; align-items: baseline; gap: 14px; margin: 0; padding: 6px 0; border-bottom: 1px solid var(--line); line-height: 1.15; color: var(--ink); min-width: 0; }
.tut-type span { min-width: 0; overflow-wrap: anywhere; }
.tut-type p:last-child { border-bottom: 0; }
.tut-type b { flex: 0 0 46px; font: 500 12px/1 var(--mono); color: var(--muted); }
.tut-t14 { font-size: 14px; } .tut-t18 { font-size: 18px; } .tut-t22 { font-size: 22px; }
.tut-t28 { font-size: 28px; font-weight: 600; } .tut-t35 { font-size: 35px; font-weight: 700; } .tut-t44 { font-size: 44px; font-weight: 700; letter-spacing: -0.02em; }

.tut-contrast { display: grid; gap: 10px; margin: 16px 0 24px; }
@media (min-width: 560px) { .tut-contrast { grid-template-columns: repeat(3, 1fr); } }
.tut-contrast div { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: #FFFFFF; min-width: 0; }
.tut-contrast p { margin: 0; }
.tut-contrast .tut-sample { font-size: 18px; margin-bottom: 8px; }
.tut-c-bad { color: #A3A3A3; } .tut-c-ok { color: #767676; } .tut-c-best { color: #222222; }

.tut-target { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px; margin: 16px 0 24px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font: 500 12.5px/1.3 var(--mono); color: var(--muted); }
.tut-target span { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.tut-target i { display: block; border: 2px solid var(--line-strong); border-radius: 6px; background: var(--field); }
.tut-target .tut-t24 { width: 24px; height: 24px; } .tut-target .tut-t44box { width: 44px; height: 44px; }

/* Palettes and font specimens (colours-and-fonts) */
.prose ul.tut-palettes { list-style: none; padding: 0; display: grid; gap: 12px; margin: 16px 0; }
@media (min-width: 640px) { .prose ul.tut-palettes { grid-template-columns: 1fr 1fr; } }
.tut-palette { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0 !important; min-width: 0; }
.tut-palette h3 { margin: 10px 0 4px !important; font-size: 17px; }
.tut-palette p { margin: 0 0 4px; font-size: 15px; }
.tut-swatches { display: flex; height: 44px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.sw { flex: 1; }
.sw-cafe-bg { background: #FBF7F2; } .sw-cafe-text { background: #2B2118; } .sw-cafe-brand { background: #9C4A1A; } .sw-cafe-accent { background: #E8B04B; }
.sw-studio-bg { background: #FFFFFF; } .sw-studio-text { background: #111827; } .sw-studio-brand { background: #0F766E; } .sw-studio-accent { background: #F59E0B; }
.sw-calm-bg { background: #F5F8FA; } .sw-calm-text { background: #1E293B; } .sw-calm-brand { background: #2563EB; } .sw-calm-accent { background: #10B981; }
.sw-bold-bg { background: #FFF1E6; } .sw-bold-text { background: #1F1300; } .sw-bold-brand { background: #C1121F; } .sw-bold-accent { background: #003049; }
/* Mini page mock in each palette */
.tut-mock { margin: 10px 0 8px; padding: 12px; border-radius: 8px; border: 1px solid var(--line); }
.tut-mock b { display: block; font-size: 16px; line-height: 1.25; margin-bottom: 4px; }
.tut-mock small { display: block; font-size: 13px; line-height: 1.4; margin-bottom: 8px; }
.tut-mock em { display: inline-block; font-style: normal; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 6px; }
.tut-mock-cafe { background: #FBF7F2; color: #2B2118; } .tut-mock-cafe em { background: #9C4A1A; color: #FFFFFF; }
.tut-mock-studio { background: #FFFFFF; color: #111827; } .tut-mock-studio em { background: #0F766E; color: #FFFFFF; }
.tut-mock-calm { background: #F5F8FA; color: #1E293B; } .tut-mock-calm em { background: #2563EB; color: #FFFFFF; }
.tut-mock-bold { background: #FFF1E6; color: #1F1300; } .tut-mock-bold em { background: #C1121F; color: #FFFFFF; }
.tut-ratio { font: 500 12px/1.3 var(--mono); color: var(--muted); }

.tut-ratio-bar { display: flex; height: 40px; margin: 16px 0 6px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-strong); font: 600 12.5px/1 var(--mono); }
.tut-ratio-bar span { display: grid; place-items: center; }
.tut-r60 { flex: 60; background: #FBF7F2; color: #2B2118; } .tut-r30 { flex: 30; background: #2B2118; color: #FBF7F2; } .tut-r10 { flex: 10; background: #E8B04B; color: #2B2118; }

.tut-specimens { display: grid; gap: 10px; margin: 16px 0 24px; }
@media (min-width: 640px) { .tut-specimens { grid-template-columns: 1fr 1fr; } }
.tut-specimen { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.tut-specimen p { margin: 0; }
.tut-specimen .tut-spec-h { font-size: 24px; line-height: 1.2; margin-bottom: 6px; color: var(--ink); }
.tut-specimen .tut-spec-b { font-size: 15px; line-height: 1.55; color: var(--ink); margin-bottom: 10px; }
.tut-specimen .tut-spec-name { font: 500 12px/1.3 var(--mono); color: var(--muted); }
.tut-f-serif { font-family: ui-serif, Georgia, 'Times New Roman', serif; }
.tut-f-sans { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.tut-f-round { font-family: ui-rounded, 'SF Pro Rounded', system-ui, sans-serif; }
.tut-f-mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.tut-f-bold { font-weight: 800; letter-spacing: -0.02em; }

/* ---------- Related guides + CTA ---------- */
.tut-related { padding-top: clamp(40px, 6vw, 64px); }
.tut-related h2 { font-size: clamp(22px, 1vw + 18px, 26px); margin: 0 0 16px; }
.tut-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 720px) { .tut-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .tut-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tut-cards li { display: flex; min-width: 0; }
.tut-card {
  display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 20px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: box-shadow var(--ease), border-color var(--ease), transform var(--ease);
}
.tut-card:hover, .tut-card:focus-visible { border-color: var(--line-strong); box-shadow: 4px 4px 0 var(--line-strong); transform: translate(-2px, -2px); }
.tut-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.tut-card-time { font: 500 var(--fs-xs)/1 var(--mono); color: var(--muted); }
.tut-card h3 { margin: 0; font-size: 19px; line-height: 1.3; color: var(--ink); }
.tut-card p { margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.tut-card-go { margin-top: auto !important; padding-top: 6px; color: var(--primary) !important; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .tut-card, .tut-card:hover { transition: none; transform: none; } }

.tut-cta { margin: clamp(48px, 7vw, 80px) 0 16px; }
.tut-cta code { background: var(--surface); }
.tut-fallback { font-size: var(--fs-sm); color: var(--muted); margin-top: 16px !important; }

/* ---------- Hub ---------- */
.tut-hub-hero { padding: clamp(32px, 6vw, 64px) 0 clamp(24px, 4vw, 40px); }
.tut-hub-hero h1 { margin: 0 0 12px; }
.tut-hub-hero p { max-width: 38em; margin: 0; font-size: var(--fs-lede); line-height: 1.5; color: var(--muted); }
.tut-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.tut-jump a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font: 500 var(--fs-sm)/1 var(--body); }
.tut-jump a:hover { border-color: var(--line-strong); background: var(--paper); }

.tut-start { display: grid; gap: 20px; padding: clamp(20px, 4vw, 32px); background: var(--field); border: 2px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--pop); }
@media (min-width: 900px) { .tut-start { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 32px; } }
.tut-start h2 { margin: 0 0 8px; font-size: clamp(24px, 1.4vw + 18px, 30px); }
.tut-start > div > p { margin: 0; }
.tut-start ol { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 10px; }
.tut-start li { counter-increment: s; margin: 0; }
.tut-start li a { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 14px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.tut-start li a::before { content: counter(s); grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: var(--band-ink); font: 700 18px/1 var(--body); }
.tut-start li a:hover { box-shadow: 3px 3px 0 var(--line-strong); }
.tut-start li b { font-size: 17px; line-height: 1.3; }
.tut-start li span { font-size: var(--fs-sm); color: var(--muted); line-height: 1.4; }

.tut-group { margin-top: clamp(40px, 6vw, 64px); }
.tut-group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--line-strong); }
.tut-group-head h2 { margin: 0; font-size: clamp(22px, 1.2vw + 18px, 28px); }
.tut-group-head p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }

.tut-hub-tip { max-width: 46em; margin: 0; }
.tut-hub .tprompt { max-width: 860px; }
.tut-sheet-promo { display: grid; gap: 16px; margin-top: clamp(40px, 6vw, 64px); padding: 22px; background: var(--band-bg); color: var(--band-ink); border-radius: var(--radius-lg); }
@media (min-width: 800px) { .tut-sheet-promo { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 28px 32px; } }
.tut-sheet-promo h2 { color: var(--band-ink); margin: 0 0 6px; font-size: clamp(22px, 1.2vw + 18px, 28px); }
.tut-sheet-promo p { margin: 0; opacity: 0.9; max-width: 40em; }
.tut-sheet-promo .btn { background: var(--field); color: var(--ink); border-color: var(--band-ink); }

/* ---------- Cheat sheet ---------- */
.tut-sheet-nav { position: sticky; top: 0; z-index: 5; margin: 0 0 8px; padding: 10px 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.tut-sheet-nav ul { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.tut-sheet-nav a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border-radius: 999px; white-space: nowrap; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font: 500 14px/1 var(--body); }
.tut-sheet-nav a:hover { border-color: var(--line-strong); }
.tut-sheet-sec { padding-top: clamp(28px, 4vw, 44px); scroll-margin-top: 40px; }
@media (min-width: 760px) { .tut-sheet-nav { top: 66px; } }
.tut-sheet-sec > h2 { margin: 0 0 6px; font-size: clamp(24px, 1.4vw + 18px, 32px); }
.tut-sheet-sec > p { margin: 0 0 18px; max-width: 46em; color: var(--muted); }
.tut-sheet-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .tut-sheet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .tut-sheet-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tut-sheet-card { min-width: 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--field); border-radius: 12px; }
.tut-sheet-card h3 { margin: 0 0 8px; font-size: 18px; }
.tut-sheet-card ul { margin: 0; padding-left: 1.1em; font-size: 15.5px; line-height: 1.5; }
.tut-sheet-card li { margin: 3px 0; }
.tut-sheet-card li b { font-weight: 700; }
.tut-pgroups { display: grid; gap: 14px; }
@media (min-width: 900px) { .tut-pgroups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tut-pgroup { min-width: 0; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-top: 6px solid var(--brand); border-radius: 12px; }
.tut-pgroup h3 { margin: 0 0 4px; font-size: 18px; }
.tut-pgroup > p { margin: 0 0 10px; font-size: var(--fs-sm); color: var(--muted); }
.tut-pgroup ul.tut-plist { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.tut-pgroup .tut-plist li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 8px 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tut-pgroup .tut-p { font-size: 14px; }
.tut-sheet .tut-fix { max-width: none; }
.tut-print-foot { display: none; }

/* ---------- Print (cheat sheet and checklists) ---------- */
@media print {
  .site-head, .site-foot, .skip, .tut-crumb, .tut-related, .tut-cta, .tut-hero-actions, .copy-btn, .copy-mini,
  .tut-toc, .tut-sheet-nav, .tut-progress, .tut-fallback, .lang-switch { display: none !important; }
  body { background: #fff; font-size: 10.5pt; }
  .tut-hero { padding: 0 0 8px; background: none; }
  .tut-layout { display: block; padding-top: 8px; }
  .tut-card, .tut-sheet-card, .tut-pgroup, .tut-callout, .tut-summary, .tprompt, .tut-checklist li, .tut-fix > div { break-inside: avoid; box-shadow: none; }
  .tprompt { border-width: 1px; }
  .tprompt pre { max-height: none; overflow: visible; font-size: 9pt; }
  .tut-sheet-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .tut-pgroups { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .tut-sheet-card, .tut-pgroup { padding: 6px 8px; }
  .tut-sheet-card ul, .tut-pgroup .tut-p { font-size: 8.5pt; }
  .tut-pgroup .tut-plist li { padding: 2px 6px; border: 0; }
  .tut-sheet-sec { padding-top: 10px; }
  .tut-print-foot { display: block; margin-top: 12px; font: 8pt/1.3 var(--mono); }
  a { color: inherit; }
}

/* Design brief: numbered rules (R1, R2, …) */
.prose ul.brief-rules { list-style: none; padding: 0; margin: 12px 0 24px; }
.prose ul.brief-rules li { margin: 0 0 8px; padding: 10px 14px 10px 54px; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.brief-id { position: absolute; left: 14px; top: 10px; font: 500 var(--fs-xs)/1.9 var(--mono); color: var(--brand); }
.tut-body h2[id], .brief-rules li[id] { scroll-margin-top: 90px; }
@media (max-width: 520px) {
  .prose ul.brief-rules li { padding: 10px 12px 10px 48px; }
  .brief-id { left: 10px; }
}
