/* Steady PC Guide. Calm, plain, readable. See DESIGN.md for the system behind these values. */

@font-face {
  font-family: 'Atkinson Next';
  src: url('fonts/atkinson-next-latin.woff2') format('woff2');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Next';
  src: url('fonts/atkinson-next-latin-italic.woff2') format('woff2');
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Literata';
  src: url('fonts/literata-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Surfaces */
  --white: oklch(1 0 0);
  --surface: oklch(0.973 0.009 115);
  --surface-2: oklch(0.945 0.016 115);
  --line: oklch(0.875 0.018 115);
  --line-strong: oklch(0.70 0.03 115);

  /* Ink */
  --ink: oklch(0.22 0.025 120);
  --ink-2: oklch(0.38 0.022 120);
  --on-dark: oklch(0.975 0.008 110);
  --on-dark-2: oklch(0.86 0.025 110);

  /* Moss: the brand */
  --moss-950: oklch(0.205 0.035 118);
  --moss-900: oklch(0.275 0.05 116);
  --moss-800: oklch(0.355 0.07 115);
  --moss-700: oklch(0.43 0.085 115);
  --moss-600: oklch(0.52 0.10 113);
  --moss-400: oklch(0.69 0.115 110);
  --moss-200: oklch(0.89 0.075 110);
  --moss-100: oklch(0.955 0.03 112);

  /* Links: conventional ink blue, because older readers expect links to look like links */
  --link: oklch(0.44 0.14 258);
  --link-hover: oklch(0.36 0.13 258);
  --link-visited: oklch(0.42 0.12 305);

  /* Callouts */
  --note-bg: oklch(0.965 0.018 245);
  --note-line: oklch(0.80 0.06 245);
  --note-ink: oklch(0.38 0.10 252);
  --caution-bg: oklch(0.965 0.045 88);
  --caution-line: oklch(0.80 0.12 80);
  --caution-ink: oklch(0.40 0.09 65);
  --stop-bg: oklch(0.965 0.022 25);
  --stop-line: oklch(0.74 0.12 25);
  --stop-ink: oklch(0.44 0.15 28);

  /* Type */
  --font-body: 'Atkinson Next', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Literata', Georgia, 'Times New Roman', serif;
  --fs-small: 1rem;
  --fs-body: 1.1875rem;
  --fs-lead: clamp(1.25rem, 1.15rem + 0.4vw, 1.4rem);
  --fs-h3: 1.4rem;
  --fs-h2: clamp(1.75rem, 1.4rem + 1.3vw, 2.35rem);
  --fs-h1: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);
  --fs-hero: clamp(2.6rem, 1.5rem + 4.4vw, 4.75rem);

  /* Space & shape */
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(3.5rem, 7vw, 6.5rem);
  --radius: 14px;
  --radius-sm: 10px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-settle: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layers */
  --z-sticky: 10;
  --z-menu: 20;
  --z-toast: 40;
  --z-skip: 50;
}

/* "Larger text" control: every size is in rem, so one switch scales the whole page. */
html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html[data-text='large'] { font-size: 118.75%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

h1, h2, h3 {
  overflow-wrap: break-word;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.012em;
  margin: 0 0 0.5em;
  text-wrap: balance;
  font-optical-sizing: auto;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
p { margin: 0 0 1em; text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }
svg.icon { display: inline-block; flex: none; vertical-align: middle; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:visited { color: var(--link-visited); }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.wrap { width: 100%; max-width: 78rem; margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 1rem; top: -6rem; z-index: var(--z-skip);
  background: var(--ink); color: var(--white); padding: 0.75rem 1.25rem; border-radius: var(--radius-sm);
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 1rem; color: var(--white); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 3rem; padding: 0.7rem 1.3rem;
  border: 2px solid transparent; border-radius: var(--radius-sm);
  font: 700 1.0625rem/1.2 var(--font-body);
  text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-primary, .btn-primary:visited { background: var(--moss-700); color: var(--white); }
.btn-primary:hover { background: var(--moss-800); color: var(--white); }
.btn-quiet, .btn-quiet:visited { background: var(--white); color: var(--ink); border-color: var(--line-strong); }
.btn-quiet:hover { background: var(--surface); color: var(--ink); border-color: var(--moss-700); }
.btn-light, .btn-light:visited { background: var(--on-dark); color: var(--moss-950); }
.btn-light:hover { background: var(--white); color: var(--moss-950); }
.btn-ghost-light, .btn-ghost-light:visited { color: var(--on-dark); border-color: oklch(0.975 0.008 110 / 0.5); }
.btn-ghost-light:hover { color: var(--white); background: oklch(1 0 0 / 0.1); border-color: var(--on-dark); }
.btn-sm { min-height: 2.75rem; padding: 0.45rem 0.95rem; font-size: 1rem; }

.linklike {
  background: none; border: 0; padding: 0.25rem 0; color: var(--link); cursor: pointer;
  font: inherit; text-decoration: underline; text-underline-offset: 0.18em;
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem;
}
.linklike:hover { color: var(--link-hover); text-decoration-thickness: 2px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border: 0; background: transparent; color: var(--ink-2); border-radius: 8px; cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- Search fields ---------- */
.search-field {
  display: flex; align-items: center; gap: 0.7rem;
  background: var(--white); border: 2px solid var(--line-strong); border-radius: var(--radius);
  padding: 0.35rem 0.35rem 0.35rem 1rem;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.search-field:focus-within { border-color: var(--link); box-shadow: 0 0 0 4px oklch(0.44 0.14 258 / 0.18); }
.search-field > .icon { color: var(--ink-2); }
.search-field input {
  flex: 1; min-width: 0; min-height: 3rem; border: 0; background: transparent; color: var(--ink);
  font: 400 var(--fs-body) var(--font-body); padding: 0;
}
.search-field input:focus { outline: none; }
.search-field input::placeholder { color: oklch(0.47 0.02 120); opacity: 1; }
.search-field-lg { padding: 0.45rem 0.45rem 0.45rem 1.15rem; }
.search-field-lg input { min-height: 3.4rem; font-size: 1.25rem; }
.search-field-lg .btn { min-height: 3.4rem; padding-inline: 1.5rem; }
input[type='search']::-webkit-search-cancel-button { cursor: pointer; }
@media (max-width: 34rem) {
  .search-field, .search-field-lg { flex-wrap: wrap; padding: 0.45rem; gap: 0.35rem 0.6rem; }
  .search-field > .icon { margin-left: 0.55rem; }
  .search-field input { flex: 1 1 calc(100% - 3.5rem); }
  .search-field .btn { flex: 1 1 100%; }
}

/* ---------- Header ---------- */
.strip { background: var(--moss-100); color: var(--moss-950); border-bottom: 1px solid oklch(0.88 0.04 112); }
.strip-inner { display: flex; align-items: center; gap: 0.6rem; padding-block: 0.55rem; font-size: var(--fs-small); line-height: 1.4; }
.strip-inner .icon { color: var(--moss-700); }
.strip p { margin: 0; }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: relative; z-index: var(--z-menu); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 5.25rem; }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); flex: none; }
.brand:visited, .brand:hover { color: var(--ink); }
.brand-name { font-family: var(--font-display); font-weight: 650; font-size: 1.45rem; letter-spacing: -0.015em; line-height: 1; white-space: nowrap; }
.brand-name span { color: var(--moss-700); font-weight: 500; }

.mark .mark-body { fill: var(--moss-700); }
.mark .mark-vial { fill: var(--moss-100); }
.mark .mark-tick { stroke: var(--moss-700); stroke-width: 1.6; fill: none; }
.mark .mark-bubble { fill: var(--moss-400); }

.primary { margin-left: auto; }
.primary ul { display: flex; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.primary a {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.35rem 0.7rem; white-space: nowrap;
  color: var(--ink); font-weight: 600; font-size: 1.0625rem; text-decoration: none; border-radius: 8px;
}
.primary a:hover { background: var(--surface); color: var(--ink); }
.primary a[aria-current='page'] { text-decoration: underline; text-decoration-color: var(--moss-400); text-decoration-thickness: 4px; text-underline-offset: 0.45em; }

.header-tools { display: flex; align-items: center; gap: 0.6rem; }
.tool-link, .text-size, .menu-btn {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.75rem; padding: 0.35rem 0.8rem;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--white); color: var(--ink);
  font: 700 1rem var(--font-body); cursor: pointer; white-space: nowrap;
}
.tool-link, .tool-link:visited { color: var(--ink); text-decoration: none; }
.tool-link:hover, .text-size:hover, .menu-btn:hover { background: var(--surface); border-color: var(--moss-700); color: var(--ink); }
.text-size[aria-pressed='true'] { background: var(--moss-100); border-color: var(--moss-700); }
.menu-btn { display: none; }
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded='true'] .i-open { display: none; }
.menu-btn[aria-expanded='true'] .i-close { display: inline-block; }

.menu-panel { border-top: 1px solid var(--line); background: var(--white); padding-block: 1.25rem 1.75rem; box-shadow: 0 18px 30px -24px oklch(0.22 0.025 120 / 0.45); }
.menu-search label { display: block; font-weight: 700; margin-bottom: 0.5rem; }
.menu-links { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 1.5rem; }
.menu-links a {
  display: flex; align-items: center; min-height: 3.25rem; border-bottom: 1px solid var(--line);
  color: var(--ink); font-weight: 600; font-size: 1.125rem; text-decoration: none;
}
.menu-links a[aria-current='page'] { color: var(--moss-700); }

@media (max-width: 79.99rem) {
  .primary, .tool-link { display: none; }
  .menu-btn { display: inline-flex; }
  .header-tools { margin-left: auto; }
}
@media (min-width: 80rem) { html:not([data-text='large']) .menu-panel { display: none !important; } }
/* Larger text makes everything about 19% bigger, so the full menu needs proportionally more room. */
@media (max-width: 95rem) {
  html[data-text='large'] .primary, html[data-text='large'] .tool-link { display: none; }
  html[data-text='large'] .menu-btn { display: inline-flex; }
  html[data-text='large'] .header-tools { margin-left: auto; }
}
@media (min-width: 95.0625rem) { .menu-panel { display: none !important; } }
@media (max-width: 35rem) {
  .text-size span, .menu-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .text-size, .menu-btn { width: 2.9rem; height: 2.9rem; padding: 0; justify-content: center; }
  .brand-name { font-size: 1.25rem; }
  .brand .mark { width: 38px; height: 38px; }
  .header-inner { gap: 0.75rem; min-height: 4.5rem; }
}
@media (max-width: 22rem) { .brand-name span { display: none; } }
@media (max-width: 30rem) { html[data-text='large'] .brand-name span { display: none; } html[data-text='large'] .header-inner { gap: 0.5rem; } }

/* ---------- Home: hero ---------- */
.hero { padding-block: clamp(2.75rem, 6vw, 5rem) clamp(2rem, 4vw, 3.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem clamp(2rem, 6vw, 5.5rem); align-items: start; }
@media (min-width: 62rem) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .hero-grid h1 { grid-column: 1 / -1; } }
.hero h1 { font-size: var(--fs-hero); line-height: 1.04; letter-spacing: -0.022em; max-width: 19ch; margin: 0 0 0.15em; }
.hero .lede { font-size: var(--fs-lead); color: var(--ink-2); max-width: 38ch; margin: 0; padding-top: 0.35rem; }
.hero-search label { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; margin-bottom: 0.7rem; }
.hero-popular { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1rem; margin: 1rem 0 0; font-size: 1.0625rem; }
.hero-popular span { color: var(--ink-2); }

.level { margin-top: clamp(2.75rem, 5vw, 4rem); }
.level svg { width: 100%; height: auto; overflow: visible; transform-origin: 50% 40%; }
.level-frame { fill: var(--moss-700); }
.level-edge { fill: var(--moss-600); }
.level-window { fill: var(--moss-100); stroke: var(--moss-900); stroke-width: 2.5; }
.level-marks { stroke: var(--moss-800); stroke-width: 2.5; fill: none; }
.level-bubble ellipse { fill: var(--moss-400); }
.level-bubble .level-glint { fill: oklch(1 0 0 / 0.7); }
.level-hole { fill: var(--white); }
.level-ruler path { stroke: var(--line-strong); stroke-width: 2; }
@media (prefers-reduced-motion: no-preference) {
  .level svg { animation: level-tilt 2.2s var(--ease-settle) 0.2s both; }
  .level-bubble { transform-box: view-box; animation: bubble-settle 2.2s var(--ease-settle) 0.2s both; }
}
@keyframes level-tilt { from { transform: rotate(-1.4deg); } to { transform: rotate(0); } }
@keyframes bubble-settle { from { transform: translateX(-120px); } to { transform: translateX(0); } }
@media (max-width: 40rem) { .level-hole { display: none; } }

/* ---------- Home: shared section heads ---------- */
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--ink-2); font-size: var(--fs-lead); margin: 0; }

/* ---------- Home: chooser ---------- */
.chooser { background: var(--surface); padding-block: var(--section); border-top: 1px solid var(--line); }
.chooser-grid { display: grid; gap: clamp(2.5rem, 4vw, 3.5rem) clamp(2rem, 5vw, 4.5rem); align-items: start; }
.chooser-col { display: grid; gap: clamp(2.5rem, 4vw, 3.5rem); }
@media (min-width: 56rem) { .chooser-grid { grid-template-columns: 1fr 1fr; } }
.chooser-group h3 { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.75rem; }
.chooser-group h3 .icon { color: var(--moss-700); }
.chooser-group ul { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.chooser-group li a {
  display: flex; align-items: center; gap: 1rem; min-height: 3.6rem; padding: 0.8rem 0.5rem;
  border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 1.15rem; font-weight: 500; line-height: 1.35;
  transition: background-color 160ms var(--ease-out);
}
.chooser-group li a span:first-child { flex: 1; }
.chooser-group .when { color: var(--ink-2); font-size: var(--fs-small); white-space: nowrap; }
.row-arrow { color: var(--moss-700); transition: transform 180ms var(--ease-out); }
@media (hover: hover) {
  .chooser-group li a:hover { background: var(--white); }
  a:hover .row-arrow { transform: translateX(4px); }
}
.chooser-group .more { display: inline-flex; align-items: center; gap: 0.25rem; margin-top: 0.9rem; font-weight: 700; min-height: 2.75rem; }

/* ---------- Home: pause band ---------- */
.pause { background: var(--moss-900); color: var(--on-dark); padding-block: var(--section); }
.pause :focus-visible { outline-color: var(--moss-200); }
.pause-inner { display: grid; gap: 2.5rem clamp(2rem, 6vw, 5rem); }
@media (min-width: 62rem) { .pause-inner { grid-template-columns: 1fr 1fr; align-items: start; } .pause-links { grid-column: 1 / -1; } }
.pause h2 { color: var(--white); max-width: 18ch; }
.pause-copy p { color: var(--on-dark-2); font-size: var(--fs-lead); max-width: 40ch; margin: 0; }
.pause-list { list-style: none; margin: 0; padding: 0; }
.pause-list li {
  display: flex; align-items: center; gap: 1.1rem; padding: 1.15rem 0;
  border-bottom: 1px solid oklch(1 0 0 / 0.16); font-family: var(--font-display); font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); font-weight: 500; line-height: 1.3;
}
.pause-list li:first-child { border-top: 1px solid oklch(1 0 0 / 0.16); }
.pause-list .icon { width: 3.25rem; height: 3.25rem; padding: 0.7rem; border-radius: 50%; border: 1.5px solid var(--moss-400); color: var(--moss-200); }
.pause-links { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Home: route ---------- */
.route-section { padding-block: var(--section); }
.route { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; position: relative; }
.route li { position: relative; padding-left: 4.25rem; }
.route-dot {
  position: absolute; left: 0; top: 0; width: 3rem; height: 3rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--white); border: 2.5px solid var(--moss-700); color: var(--moss-700);
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; z-index: 1;
}
.route::before { content: ''; position: absolute; left: calc(1.5rem - 1.5px); top: 1.5rem; bottom: 1.5rem; width: 3px; background: var(--moss-200); }
.route a { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; line-height: 1.25; display: inline-block; padding-top: 0.45rem; }
.route p { color: var(--ink-2); margin: 0.4rem 0 0.5rem; }
.route .when { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--ink-2); font-size: var(--fs-small); }
@media (min-width: 62rem) {
  .route { grid-template-columns: repeat(4, 1fr); gap: 2.5rem; }
  .route li { padding-left: 0; padding-top: 4.25rem; }
  .route::before { left: 1.5rem; right: calc((100% - 7.5rem) / 4 - 1.5rem); top: calc(1.5rem - 1.5px); bottom: auto; width: auto; height: 3px; }
}
.route-aside { display: flex; gap: 0.75rem; align-items: flex-start; margin: clamp(2.5rem, 4vw, 3.5rem) 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line); max-width: 52rem; }
.route-aside .icon { color: var(--stop-ink); margin-top: 0.2rem; }

/* ---------- Home: antivirus ---------- */
.av { background: var(--surface); border-block: 1px solid var(--line); padding-block: var(--section); }
.av-grid { display: grid; gap: 2.5rem; }
@media (min-width: 56rem) { .av-grid { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }
.av-col { border-top: 2px solid var(--ink); padding-top: 1.25rem; display: flex; flex-direction: column; }
.av-col h3 { font-size: 1.65rem; }
.av-col ul { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.av-col li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.av-col li a { font-weight: 600; line-height: 1.35; display: inline-block; padding-block: 0.2rem; }
.official { margin-top: auto; font-size: var(--fs-small); color: var(--ink-2); }
a.ext { display: inline; white-space: normal; }
a.ext .icon { display: inline; margin-left: 0.2em; vertical-align: -0.12em; width: 0.85em; height: 0.85em; }
.feature-link {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: clamp(2.5rem, 4vw, 3.5rem);
  padding: 1.5rem 1.75rem; background: var(--white); border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; transition: border-color 160ms var(--ease-out);
}
.feature-link:visited, .feature-link:hover { color: var(--ink); }
.feature-link:hover { border-color: var(--moss-700); }
.feature-text { display: grid; gap: 0.3rem; }
.feature-title { font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; line-height: 1.25; color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.feature-text span:last-child { color: var(--ink-2); }

/* ---------- Home: everyday ---------- */
.everyday { padding-block: var(--section); }
.everyday-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem 2.5rem; }
@media (min-width: 56rem) { .everyday-list { grid-template-columns: repeat(3, 1fr); } }
.everyday-list a { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem 0; border-top: 2px solid var(--ink); text-decoration: none; color: var(--ink); }
.everyday-list a:visited { color: var(--ink); }
.everyday-list a > .icon { color: var(--moss-700); margin-top: 0.15rem; }
.ev-text { display: grid; gap: 0.6rem; }
.ev-title { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; line-height: 1.25; color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.everyday-list a:hover .ev-title { text-decoration-thickness: 2px; color: var(--link-hover); }
.ev-meta { display: flex; gap: 1.25rem; flex-wrap: wrap; color: var(--ink-2); font-size: var(--fs-small); }

/* ---------- Home: promise ---------- */
.promise { padding-block: var(--section); background: var(--surface); border-top: 1px solid var(--line); }
.promise h2 { max-width: 22ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.promise-grid { display: grid; gap: 2.5rem; }
@media (min-width: 56rem) { .promise-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.promise h3 { font-size: 1.35rem; }
.ticks, .crosses { list-style: none; margin: 0; padding: 0; }
.ticks li, .crosses li { display: flex; gap: 0.85rem; align-items: flex-start; padding: 0.85rem 0; border-top: 1px solid var(--line); }
.ticks .icon, .crosses .icon { width: 2rem; height: 2rem; padding: 0.3rem; border-radius: 50%; margin-top: -0.05rem; }
.ticks .icon { background: var(--moss-700); color: var(--white); }
.crosses .icon { background: var(--white); color: var(--ink-2); border: 1.5px solid var(--line-strong); }
.promise-foot { display: flex; gap: 0.75rem; align-items: flex-start; margin: clamp(2.5rem, 4vw, 3.5rem) 0 0; max-width: 52rem; color: var(--ink-2); }
.promise-foot .icon { color: var(--moss-700); margin-top: 0.2rem; }

/* ---------- Shared: difficulty, minutes ---------- */
.difficulty { display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap; }
.difficulty .bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 1rem; }
.difficulty .bars i { width: 4px; border-radius: 1px; background: var(--line-strong); opacity: 0.55; }
.difficulty .bars i:nth-child(1) { height: 40%; }
.difficulty .bars i:nth-child(2) { height: 70%; }
.difficulty .bars i:nth-child(3) { height: 100%; }
.difficulty[data-level='1'] .bars i:nth-child(-n + 1),
.difficulty[data-level='2'] .bars i:nth-child(-n + 2),
.difficulty[data-level='3'] .bars i:nth-child(-n + 3) { background: var(--moss-700); opacity: 1; }
.minutes { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }

/* ---------- Guide lists (library, topics, related) ---------- */
.guide-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.guide-row a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 1.5rem; align-items: center;
  padding: 1.15rem 0.75rem; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none;
  transition: background-color 160ms var(--ease-out);
}
.guide-row a:visited { color: var(--ink); }
.guide-row-text { display: grid; gap: 0.25rem; }
.guide-row-topic { color: var(--moss-700); font-size: var(--fs-small); font-weight: 700; }
.guide-row-title { font-family: var(--font-display); font-weight: 600; font-size: 1.28rem; line-height: 1.28; color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.guide-row-summary { color: var(--ink-2); font-size: 1.0625rem; }
.guide-row-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; color: var(--ink-2); font-size: var(--fs-small); }
.guide-row .row-arrow { display: none; }
@media (hover: hover) {
  .guide-row a:hover { background: var(--surface); }
  .guide-row a:hover .guide-row-title { color: var(--link-hover); text-decoration-thickness: 2px; }
}
@media (min-width: 48rem) {
  .guide-row a { grid-template-columns: minmax(0, 1fr) 9rem 1.5rem; }
  .guide-row .row-arrow { display: block; }
}
@media (max-width: 47.99rem) {
  .guide-row a { grid-template-columns: 1fr; padding-inline: 0.25rem; }
  .guide-row-meta { flex-direction: row; gap: 1.25rem; }
}

/* ---------- Page heads ---------- */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: clamp(2rem, 4vw, 3.25rem) clamp(2rem, 4vw, 2.75rem); }
.page-head h1 { max-width: 24ch; }
.page-head .lede { font-size: var(--fs-lead); color: var(--ink-2); max-width: 60ch; margin: 0; }
.updated { display: flex; align-items: center; gap: 0.5rem; color: var(--ink-2); font-size: var(--fs-small); margin: 1rem 0 0; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; margin: 0 0 1.25rem; padding: 0; font-size: var(--fs-small); }
.crumbs li { display: inline-flex; align-items: center; gap: 0.25rem; }
.crumbs a { display: inline-flex; align-items: center; min-height: 2.25rem; }
.crumbs .icon { color: var(--ink-2); }
.crumbs [aria-current] { color: var(--ink-2); }

/* ---------- Topic pages ---------- */
.topic-title { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.topic-title h1 { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.topic-title h1 { margin: 0; }
.topic-title .icon { width: 4.25rem; height: 4.25rem; padding: 0.8rem; border-radius: 50%; background: var(--white); border: 1.5px solid var(--line-strong); color: var(--moss-700); }
.topic-count { margin: 1.25rem 0 0; font-weight: 700; color: var(--moss-800); }
.topic-body { padding-block: clamp(2.5rem, 5vw, 4rem) var(--section); display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 4rem); }
.topic-route h2 { font-size: 1.6rem; }
.route-compact { margin-top: 1.5rem; }
.other-topics h2 { font-size: 1.6rem; }
.other-topics ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 2.5rem; }
@media (min-width: 56rem) { .other-topics ul { grid-template-columns: repeat(3, 1fr); } }
.other-topics a { display: flex; gap: 0.85rem; align-items: flex-start; padding: 1.1rem 0; border-top: 2px solid var(--ink); color: var(--ink); text-decoration: none; }
.other-topics a:visited { color: var(--ink); }
.other-topics a > .icon { color: var(--moss-700); margin-top: 0.2rem; }
.other-topics a > span { display: grid; gap: 0.25rem; }
.ot-title { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.ot-blurb { color: var(--ink-2); font-size: 1.0625rem; }

/* ---------- Library ---------- */
.lib-search { margin-top: 1.75rem; max-width: 46rem; }
.lib-search label { display: block; font-weight: 700; margin-bottom: 0.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.9rem; padding: 0.4rem 0.6rem 0.4rem 0.9rem;
  border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--white); color: var(--ink);
  font: 600 1.0625rem var(--font-body); cursor: pointer; transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.chip .icon { color: var(--moss-700); }
.chip:hover { border-color: var(--moss-700); }
.chip-count { min-width: 1.85rem; padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--surface-2); font-size: 0.95rem; text-align: center; }
.chip[aria-pressed='true'] { background: var(--moss-700); border-color: var(--moss-700); color: var(--white); }
.chip[aria-pressed='true'] .icon { color: var(--white); }
.chip[aria-pressed='true'] .chip-count { background: oklch(1 0 0 / 0.2); }
.lib-body { padding-block: 2rem var(--section); }
.lib-status { color: var(--ink-2); margin: 0 0 1rem; }
.lib-group { margin-top: 2.5rem; }
.lib-group:first-of-type { margin-top: 1rem; }
.lib-group h2 { display: flex; align-items: center; gap: 0.7rem; font-size: 1.65rem; }
.lib-group h2 .icon { color: var(--moss-700); }
.lib-empty { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; margin-bottom: 2rem; }
.lib-empty h2 { font-size: 1.5rem; }
.lib-empty ul { margin: 0; padding-left: 1.25rem; }
.lib-empty li { margin: 0.4rem 0; }
mark { background: var(--moss-200); color: inherit; border-radius: 3px; padding: 0 0.1em; }

/* ---------- Guide page ---------- */
.guide-head { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: clamp(1.75rem, 3.5vw, 2.75rem) 1.75rem; }
.guide-head h1 { max-width: 24ch; }
.deck { font-size: var(--fs-lead); color: var(--ink-2); max-width: 58ch; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: 1rem 2rem; margin: 1.75rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid var(--line); max-width: 64rem; }
.facts dt { display: flex; align-items: center; gap: 0.4rem; color: var(--ink-2); font-size: var(--fs-small); }
.facts dt .icon { color: var(--moss-700); }
.facts dd { margin: 0.2rem 0 0; font-weight: 700; font-size: 1.0625rem; line-height: 1.4; }
.guide-tools { margin-top: 1.5rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-block: clamp(1.5rem, 3vw, 2.75rem) var(--section); }
@media (min-width: 64rem) {
  .guide-layout { grid-template-columns: minmax(0, 46rem) minmax(16rem, 20rem); justify-content: space-between; gap: 4rem; }
}
@media (max-width: 63.99rem) { .progress { order: -1; } }

.quick { background: var(--moss-100); border: 1px solid oklch(0.82 0.06 112); border-radius: 16px; padding: 1.4rem 1.6rem; }
.quick h2 { font-size: 1.3rem; display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.quick h2::before { content: ''; width: 0.85rem; height: 0.85rem; border-radius: 50%; background: var(--moss-600); box-shadow: 0 0 0 4px oklch(0.69 0.115 110 / 0.35); }
.quick p { margin: 0; font-size: 1.1875rem; }

.brand-notice { display: flex; gap: 0.85rem; align-items: flex-start; margin-top: 1.25rem; padding: 1rem 1.25rem; background: var(--note-bg); border: 1px solid var(--note-line); border-radius: var(--radius); font-size: 1.0625rem; }
.brand-notice > .icon { color: var(--note-ink); margin-top: 0.1rem; }
.brand-notice p { margin: 0; }

.intro { margin-top: 2rem; }
.intro p:last-child { margin-bottom: 0; }
.steps-hint { display: flex; align-items: center; gap: 0.6rem; margin: 1.75rem 0 0; color: var(--ink-2); font-size: var(--fs-small); }
.steps-hint .icon { color: var(--moss-700); }

.step, .sect { margin-top: 2.5rem; padding-top: 2.25rem; border-top: 1px solid var(--line); scroll-margin-top: 1.5rem; }
.step-head { display: flex; gap: 1rem; align-items: flex-start; }
.step-head h2 { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.step-num {
  flex: none; width: 3.25rem; height: 3.25rem; border-radius: 50%; display: grid; place-items: center;
  border: 2.5px solid var(--moss-700); color: var(--moss-700); background: var(--white);
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem;
  transition: background-color 220ms var(--ease-out), color 220ms var(--ease-out);
}
.step h2, .sect h2 { font-size: clamp(1.55rem, 1.35rem + 0.7vw, 1.9rem); margin: 0.45rem 0 0.9rem; }
.step-body { margin-top: 0.25rem; }
@media (min-width: 44rem) { .step-body, .step-done { margin-left: 4.25rem; } }
@media (max-width: 30rem) { .step-num { width: 2.6rem; height: 2.6rem; font-size: 1.15rem; } .step-head { gap: 0.75rem; } }
.step.is-done .step-num { background: var(--moss-700); color: var(--white); }

.step-done {
  position: relative; display: inline-flex; align-items: center; gap: 0.75rem; margin-top: 1.25rem;
  min-height: 3.25rem; padding: 0.55rem 1.2rem 0.55rem 0.7rem; cursor: pointer;
  border: 2px solid var(--line-strong); border-radius: 12px; background: var(--white); font-weight: 700;
  transition: background-color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}
.step-done:hover { border-color: var(--moss-700); }
.step-done input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.step-done:has(input:focus-visible) { outline: 3px solid var(--link); outline-offset: 3px; }
.step-done-box { width: 1.85rem; height: 1.85rem; border: 2px solid var(--moss-700); border-radius: 7px; display: grid; place-items: center; background: var(--white); }
.step-done-box .icon { color: var(--white); opacity: 0; transform: scale(0.5); transition: opacity 160ms var(--ease-out), transform 220ms var(--ease-out); }
.step-done:has(input:checked) { background: var(--moss-100); border-color: var(--moss-700); }
.step-done:has(input:checked) .step-done-box { background: var(--moss-700); }
.step-done:has(input:checked) .step-done-box .icon { opacity: 1; transform: scale(1); }

/* Progress / contents panel */
.progress-box { border: 1px solid var(--line-strong); border-radius: 16px; padding: 1.1rem 1.25rem 1rem; background: var(--white); }
@media (min-width: 64rem) { .progress { position: sticky; top: 1.25rem; align-self: start; max-height: calc(100vh - 2.5rem); overflow: auto; } }
.progress-box summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; min-height: 2.75rem;
}
.progress-box summary::-webkit-details-marker { display: none; }
.progress-box summary::after { content: ''; width: 0.6rem; height: 0.6rem; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg) translateY(-3px); transition: transform 200ms var(--ease-out); flex: none; }
.progress-box[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.progress-count { margin-left: auto; font-family: var(--font-body); font-size: var(--fs-small); font-weight: 700; color: var(--moss-800); white-space: nowrap; }
.progress-bar { height: 0.6rem; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 0.6rem 0 0.75rem; }
.progress-bar span { display: block; height: 100%; background: var(--moss-600); transform-origin: left; transform: scaleX(0); transition: transform 420ms var(--ease-out); }
.progress-list, .toc-list { list-style: none; margin: 0; padding: 0; }
.progress-list a {
  display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.6rem 0.25rem; border-top: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: 1.0625rem; line-height: 1.35;
}
.progress-list a:hover .pl-text { text-decoration: underline; }
.pl-num { flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--moss-700); color: var(--moss-700); font-weight: 700; font-size: 0.95rem; }
.pl-text { flex: 1; padding-top: 0.1rem; }
.progress-list .pl-check { display: none; color: var(--moss-700); margin-top: 0.15rem; }
.progress-list li.is-done .pl-num { background: var(--moss-700); color: var(--white); }
.progress-list li.is-done .pl-text { color: var(--ink-2); }
.progress-list li.is-done .pl-check { display: inline-block; }
.progress-list a[aria-current='step'] { background: var(--surface); border-radius: 8px; }
.progress-list a[aria-current='step'] .pl-text { font-weight: 700; }
.clear-ticks { margin-top: 0.5rem; font-size: var(--fs-small); }
.toc-list a { display: block; padding: 0.6rem 0.25rem; border-top: 1px solid var(--line); font-size: 1.0625rem; line-height: 1.35; }

.solved { margin-top: 3rem; padding: 1.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.solved h2 { font-size: 1.6rem; }
.solved-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.solved-reply { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.solved-reply p { margin: 0; }
.solved-reply:focus { outline: none; }

.safety { margin-top: 2.5rem; padding: 1.5rem 1.75rem; border: 1px solid var(--line-strong); border-radius: 16px; }
.safety h2 { display: flex; align-items: center; gap: 0.6rem; font-size: 1.35rem; }
.safety h2 .icon { color: var(--moss-700); }
.safety p { margin: 0; }
.related { margin-top: 3rem; }
.related h2 { font-size: 1.6rem; }

/* ---------- Prose ---------- */
.prose { max-width: 68ch; }
.prose > :last-child { margin-bottom: 0; }
.prose h3 { margin-top: 1.75rem; }
.prose ul, .prose ol { padding-left: 1.5em; margin: 0 0 1.1em; }
.prose li { margin: 0.45em 0; padding-left: 0.2em; }
.prose li::marker { color: var(--moss-700); font-weight: 700; }
.prose strong, .prose b { font-weight: 700; }
kbd {
  font: 700 0.9em/1 var(--font-body); padding: 0.18em 0.5em 0.22em; white-space: nowrap;
  border: 1.5px solid var(--line-strong); border-bottom-width: 3px; border-radius: 7px; background: var(--white);
}
code {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 0.9em;
  background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 6px; word-break: break-word;
}
.path { display: inline; }
.path-item {
  display: inline; padding: 0.05em 0.45em; border: 1px solid var(--line-strong); border-radius: 7px;
  background: var(--surface); font-weight: 700; font-size: 0.95em; line-height: 1.9;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.path-sep { margin: 0 0.15em; color: var(--ink-2); vertical-align: -0.15em; }
.prose details { border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 1.1rem; margin: 1.25rem 0; background: var(--white); }
.prose details[open] { padding-bottom: 1rem; }
.prose summary {
  display: flex; align-items: center; gap: 0.75rem; min-height: 3.25rem; cursor: pointer; font-weight: 700; list-style: none;
}
.prose summary::-webkit-details-marker { display: none; }
.prose summary::before { content: ''; flex: none; width: 0.55rem; height: 0.55rem; border-right: 2.5px solid var(--moss-700); border-bottom: 2.5px solid var(--moss-700); transform: rotate(-45deg); transition: transform 200ms var(--ease-out); }
.prose details[open] summary::before { transform: rotate(45deg); }

.callout { border: 1px solid; border-radius: var(--radius); padding: 1rem 1.25rem 1.1rem; margin: 1.5rem 0; }
.callout p { margin: 0 0 0.6em; }
.callout p:last-child { margin-bottom: 0; }
.callout-label { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.0625rem; }
.callout.note { background: var(--note-bg); border-color: var(--note-line); }
.callout.note .callout-label { color: var(--note-ink); }
.callout.caution { background: var(--caution-bg); border-color: var(--caution-line); }
.callout.caution .callout-label { color: var(--caution-ink); }
.callout.stop { background: var(--stop-bg); border-color: var(--stop-line); }
.callout.stop .callout-label { color: var(--stop-ink); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line-strong); border-radius: 12px; margin: 1.5rem 0; max-width: 100%; }
.prose .table-wrap { max-width: none; }
table { width: 100%; border-collapse: collapse; min-width: 34rem; font-size: 1.0625rem; line-height: 1.45; }
caption { caption-side: top; text-align: left; padding: 0.9rem 1rem; font-weight: 700; border-bottom: 1px solid var(--line-strong); }
th, td { text-align: left; vertical-align: top; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
thead th { background: var(--surface); font-weight: 700; }
tbody th { font-weight: 700; }
tbody tr:last-child > * { border-bottom: 0; }

/* ---------- Doc (policy) pages ---------- */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-block: clamp(2rem, 4vw, 3rem) var(--section); }
@media (min-width: 64rem) {
  .doc-layout { grid-template-columns: 15rem minmax(0, 46rem); gap: 5rem; }
  .doc-layout.no-toc { grid-template-columns: minmax(0, 46rem); }
  .doc-toc { position: sticky; top: 1.5rem; align-self: start; }
}
.doc-toc h2 { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 700; margin-bottom: 0.5rem; }
.doc-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.doc-toc a { display: block; padding: 0.4rem 0 0.4rem 1rem; font-size: 1.0625rem; line-height: 1.35; }
.doc h2 { font-size: clamp(1.5rem, 1.3rem + 0.7vw, 1.85rem); margin-top: 2.5rem; scroll-margin-top: 1.5rem; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 1.3rem; }
.doc .contact-card { display: flex; gap: 1rem; align-items: center; padding: 1.25rem 1.5rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius); margin: 1.5rem 0; }
.doc .contact-card .icon { color: var(--moss-700); width: 2.25rem; height: 2.25rem; }
.doc .contact-card p { margin: 0; }
.doc .contact-card a { font-weight: 700; font-size: 1.25rem; overflow-wrap: anywhere; }
.doc dl { margin: 1rem 0; }
.doc dt { font-weight: 700; }
.doc dd { margin: 0 0 0.85rem; }

.notfound { padding-block: var(--section); max-width: 46rem; }
.notfound h1 { font-size: var(--fs-h1); }

/* ---------- Footer ---------- */
.site-footer { background: var(--moss-950); color: var(--on-dark); font-size: 1.0625rem; }
.site-footer a, .site-footer a:visited { color: var(--on-dark); }
.site-footer a:hover { color: var(--white); }
.site-footer :focus-visible { outline-color: var(--moss-200); }
.footer-top { display: grid; gap: 2.5rem; padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem; }
@media (min-width: 56rem) { .footer-top { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem; } }
.footer-about p { color: var(--on-dark-2); max-width: 36ch; }
.publisher { font-size: var(--fs-small); }
.brand-footer { color: var(--white); margin-bottom: 1.25rem; }
.brand-footer:visited, .brand-footer:hover { color: var(--white); }
.brand-footer .brand-name span { color: var(--moss-200); }
.site-footer .mark .mark-body { fill: var(--moss-600); }
.site-footer .mark .mark-tick { stroke: var(--moss-600); }
.footer-nav h2 { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 700; color: var(--moss-200); letter-spacing: 0; margin-bottom: 0.75rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li a { display: inline-flex; align-items: center; min-height: 2.6rem; }
.footer-legal { border-top: 1px solid oklch(1 0 0 / 0.16); padding-block: 1.5rem 2.5rem; }
.legal-links { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin: 0 0 1rem; padding: 0; }
.legal-links a, .legal-links .linklike { display: inline-flex; align-items: center; min-height: 2.6rem; color: var(--on-dark); }
.footer-legal > p { color: var(--on-dark-2); font-size: var(--fs-small); max-width: 90ch; margin: 0; }

/* ---------- Cookie message ----------
   Phones: a sheet docked to the bottom edge, with full-width buttons.
   Wider screens: a card floating bottom-left, clear of the sticky progress panel on the right.
   It never blocks the page and never takes focus on its own. */
.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-toast);
  max-height: 80vh; max-height: 80dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--white); color: var(--ink);
  border-top: 1px solid var(--line-strong); border-radius: 18px 18px 0 0;
  padding: 1rem var(--gutter) calc(1rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -16px 40px -24px oklch(0.22 0.025 120 / 0.5);
}
.consent-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.6rem; }
.consent-head .icon {
  flex: none; width: 2.75rem; height: 2.75rem; padding: 0.45rem; border-radius: 50%;
  background: var(--moss-100); color: var(--moss-700);
}
.consent h2 { font-size: 1.3rem; margin: 0; text-wrap: balance; }
.consent p { font-size: 1.0625rem; line-height: 1.55; margin: 0 0 0.6rem; max-width: 62ch; }
.consent-current { font-weight: 700; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.9rem; }
.consent-actions .btn { flex: 1 1 100%; }
/* Accept and Reject share the row equally, or stack full width when there is no room. */
[data-consent='choice'] .consent-actions .btn { flex: 1 1 auto; }
@media (min-width: 36rem) { [data-consent='notice'] .consent-actions .btn { flex: 0 1 auto; } }
@media (max-width: 24rem) { .consent-head .icon { display: none; } }
@media (min-width: 52rem) {
  .consent {
    left: 1.5rem; right: auto; bottom: 1.5rem; width: min(41rem, calc(100vw - 3rem));
    border: 1px solid var(--line-strong); border-radius: 18px; padding: 1.5rem 1.75rem;
    box-shadow: 0 28px 56px -24px oklch(0.22 0.025 120 / 0.5);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .consent:not([hidden]) { animation: consent-in 480ms var(--ease-settle) both; }
}
@keyframes consent-in { from { opacity: 0; transform: translateY(1.5rem); } }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Print: readers often print a guide before restarting into Safe Mode ---------- */
@media print {
  @page { margin: 16mm 14mm; }
  html, html[data-text='large'] { font-size: 11pt; }
  body { color: #000; background: #fff; }
  .strip, .site-header, .site-footer, .progress, .guide-tools, .solved, .related, .consent, .skip, .steps-hint, .crumbs, .doc-toc { display: none !important; }
  .guide-head, .page-head { background: none; border: 0; padding: 0 0 6mm; }
  .guide-layout, .doc-layout { display: block; padding: 0; }
  .step, .sect, .callout, .quick, details { break-inside: avoid; }
  .step-done { border: 0; padding: 0; margin-left: 0 !important; min-height: 0; font-weight: 400; }
  .step-done-text::before { content: 'Done: '; }
  .prose details > *:not(summary) { display: block !important; }
  a { color: #000; }
  a.ext::after { content: ' (' attr(href) ')'; font-size: 0.85em; color: #333; word-break: break-all; }
  a.ext .icon, a.ext .visually-hidden { display: none; }
  .quick, .callout, .brand-notice { background: none !important; border: 1px solid #555 !important; }
  .safety { border: 1px solid #555; }
}
