/* Deep Dish Dungeon Guide — dungeon-kitchen editorial system */

:root {
  --bg: #120f0c;
  --bg-2: #17120e;
  --surface: #1d1712;
  --surface-2: #241c15;
  --surface-3: #2c221a;
  --line: #3a2d23;
  --line-soft: #2a211a;
  --text: #f2e8da;
  --muted: #b7a692;
  --faint: #8d7c6a;
  --ember: #e0702f;
  --ember-2: #f2a65a;
  --ember-dark: #a94c1d;
  --moss: #8fa06a;
  --moss-dark: #647447;
  --danger: #d96b5f;
  --paper: #eadcc6;
  --paper-2: #e2d1b6;
  --ink: #2a211a;
  --ink-muted: #6a5947;
  --display: "Gloock", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --radius: 4px;
  --shadow-ember: 0 24px 70px -32px rgba(224, 112, 47, .55);
  --container: 1160px;
  --reading: 71ch;
}

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

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 82% -8%, rgba(224, 112, 47, .13), transparent 62%),
    radial-gradient(700px 500px at -8% 24%, rgba(143, 160, 106, .07), transparent 60%),
    var(--bg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: rgba(224, 112, 47, .35); color: #fff; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ember-2); text-decoration-color: rgba(242, 166, 90, .35); text-underline-offset: 3px; }
a:hover { color: #ffd0a1; }

button, input { font: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--ember-2);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--bg);
  background: var(--ember-2);
  border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(18, 15, 12, .88);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(14px);
}
.header-inner {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand-mark { width: 34px; height: 34px; color: var(--ember-2); flex: none; }
.brand-name {
  font-family: var(--display);
  font-size: 1.28rem;
  letter-spacing: -.015em;
}
.brand-name span { color: var(--ember-2); }
.brand-sub {
  margin-left: 2px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .06em;
  text-transform: lowercase;
}
.nav-desktop { display: flex; align-items: center; gap: 24px; }
.nav-desktop > a, .mobile-nav > a {
  position: relative;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
  padding-block: 6px;
}
.nav-desktop > a::after, .mobile-nav > a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--ember-2);
  transition: right .2s ease;
}
.nav-desktop > a:hover, .nav-desktop > a[aria-current="page"],
.mobile-nav > a:hover, .mobile-nav > a[aria-current="page"] {
  color: var(--text);
}
.nav-desktop > a:hover::after, .nav-desktop > a[aria-current="page"]::after,
.mobile-nav > a:hover::after, .mobile-nav > a[aria-current="page"]::after { right: 0; }

.search-open {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: .84rem;
}
.search-open:hover { color: var(--text); border-color: var(--faint); }
.search-open svg { width: 15px; height: 15px; }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: .84rem;
}
.menu-toggle svg { width: 18px; height: 18px; }
.mobile-nav {
  padding: 10px 20px 20px;
  border-top: 1px solid var(--line-soft);
}
.mobile-nav > a { display: block; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.mobile-nav .search-open { margin-top: 14px; width: 100%; justify-content: center; }

/* Search */

.search-dialog {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: start center;
  padding: 10vh 20px 20px;
  background: rgba(10, 8, 6, .72);
  backdrop-filter: blur(8px);
}
.search-panel {
  width: min(680px, 100%);
  max-height: 78vh;
  overflow: auto;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-ember);
}
.search-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.search-head label { font-family: var(--display); font-size: 1.4rem; }
.search-close {
  padding: 5px 9px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: .8rem;
}
#search-input {
  width: 100%;
  margin-top: 14px;
  padding: 13px 14px;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 1rem;
}
#search-input::placeholder { color: var(--faint); }
#search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-results { margin-top: 16px; display: grid; gap: 8px; }
.search-result {
  display: block;
  padding: 12px 13px;
  color: var(--text);
  text-decoration: none;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
}
.search-result:hover { border-color: var(--ember-dark); color: var(--text); }
.search-result strong { display: block; font-size: .98rem; }
.search-result span { display: block; color: var(--muted); font-size: .82rem; margin-top: 3px; }
.search-hint { margin: 16px 0 0; color: var(--faint); font-size: .76rem; }
kbd {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
}

/* Breadcrumbs */

.breadcrumbs {
  width: min(var(--container), calc(100% - 40px));
  margin: 24px auto 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: .73rem;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ember-2); }
.breadcrumbs span[aria-hidden] { margin: 0 7px; color: var(--line); }

/* Typography */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -.018em;
}
h1 { font-size: clamp(2.55rem, 5.6vw, 4.4rem); line-height: 1.02; margin: 0; }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); line-height: 1.15; margin: 2.3em 0 .65em; }
h3 { font-size: 1.24rem; line-height: 1.25; margin: 1.8em 0 .45em; }
p { margin: 0 0 1em; }
strong { font-weight: 700; color: #fff5e8; }
mark { background: rgba(224, 112, 47, .28); color: var(--text); padding: 0 2px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--ember-2);
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .02em;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--ember);
}

/* Home hero */

.hero { padding: 64px 0 26px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero-copy .lede {
  max-width: 53ch;
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  line-height: 1.62;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 17px;
  border-radius: 3px;
  font-size: .93rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button--primary { color: #24160c; background: var(--ember-2); border-color: var(--ember-2); }
.button--primary:hover { color: #1b1008; background: #ffc27e; }
.button--ghost { color: var(--text); background: transparent; border-color: var(--line); }
.button--ghost:hover { color: var(--text); border-color: var(--faint); background: var(--surface); }
.button svg { width: 15px; height: 15px; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 26px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: .74rem;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--moss); }

.hero-media { position: relative; }
.hero-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-ember);
  background: var(--surface);
}
.hero-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(18, 15, 12, .55));
  pointer-events: none;
}
.hero-frame img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.hero-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: .68rem;
}
.quick-card {
  position: absolute;
  left: -22px;
  bottom: 42px;
  width: min(260px, 80%);
  padding: 14px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--ember);
  border-radius: 3px;
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .9);
}
.quick-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; }
.quick-card dt { color: var(--faint); font-family: var(--mono); font-size: .67rem; }
.quick-card dd { margin: 0; color: var(--text); font-size: .78rem; text-align: right; }

/* Sections */

.section { padding: 54px 0; }
.section--tight { padding: 34px 0; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.section-head h2 { margin: 0; }
.section-head p { max-width: 48ch; margin: 0; color: var(--muted); font-size: .93rem; }
.section-link {
  flex: none;
  color: var(--muted);
  font-size: .86rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.section-link:hover { color: var(--ember-2); border-color: var(--ember-dark); }

/* Guide cards */

.guide-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.guide-card {
  grid-column: span 4;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 20px;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.guide-card:hover {
  color: var(--text);
  border-color: var(--ember-dark);
  transform: translateY(-2px);
  background: linear-gradient(160deg, var(--surface-3), var(--surface));
}
.guide-card--featured {
  grid-column: span 7;
  min-height: 240px;
  padding: 26px;
  border-left: 2px solid var(--ember);
}
.guide-card--wide { grid-column: span 5; }
.guide-card .card-cat {
  color: var(--ember-2);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .03em;
}
.guide-card h3 {
  margin: 10px 0 8px;
  font-size: 1.35rem;
  color: var(--text);
}
.guide-card--featured h3 { font-size: clamp(1.55rem, 2.4vw, 2rem); }
.guide-card p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.guide-card .card-foot {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: .68rem;
}
.guide-card .card-arrow { color: var(--ember-2); font-size: .9rem; transition: transform .18s ease; }
.guide-card:hover .card-arrow { transform: translateX(3px); }

/* Tool cards — the recipe-card moment */

.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 18px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #cdb995;
  border-radius: 2px;
  text-decoration: none;
  box-shadow: 5px 6px 0 rgba(0, 0, 0, .28);
  transition: transform .16s ease, box-shadow .16s ease;
}
.tool-card:nth-child(2) { background: #e6d6bc; }
.tool-card:nth-child(3) { background: #efe3cf; }
.tool-card:hover {
  color: var(--ink);
  transform: translate(-1px, -2px);
  box-shadow: 7px 9px 0 rgba(0, 0, 0, .3);
}
.tool-card::before {
  content: attr(data-label);
  position: absolute;
  top: -1px;
  left: 18px;
  transform: translateY(-100%);
  padding: 4px 10px 3px;
  color: #f7ead7;
  background: var(--ember-dark);
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .04em;
  border-radius: 2px 2px 0 0;
}
.tool-card h3 { margin: 0 0 7px; color: var(--ink); font-size: 1.3rem; }
.tool-card p { margin: 0 0 16px; color: var(--ink-muted); font-size: .86rem; line-height: 1.5; }
.tool-card .tool-foot {
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px dashed #b9a582;
  display: flex;
  justify-content: space-between;
  color: #7b6447;
  font-family: var(--mono);
  font-size: .68rem;
}
.tool-card .tool-foot span:last-child { color: var(--ember-dark); font-weight: 500; }

/* Depth rail */

.depth-section {
  padding: 54px 0 58px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(36, 28, 21, .25), transparent);
}
.depth-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 44px; align-items: start; }
.depth-intro h2 { margin-top: 0; }
.depth-intro p { color: var(--muted); max-width: 42ch; }
.depth-rail { position: relative; display: grid; gap: 0; }
.depth-rail::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  border-left: 1px dashed var(--line);
}
.depth-stop {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 13px;
  padding: 11px 0;
  color: var(--text);
  text-decoration: none;
}
.depth-stop:hover { color: var(--text); }
.depth-dot {
  position: relative;
  z-index: 1;
  width: 15px;
  height: 15px;
  margin-top: 4px;
  border: 1px solid var(--faint);
  border-radius: 50%;
  background: var(--bg);
  transition: border-color .15s ease, background .15s ease;
}
.depth-stop:hover .depth-dot, .depth-stop--current .depth-dot {
  border-color: var(--ember-2);
  background: var(--ember);
}
.depth-label { display: block; font-family: var(--mono); font-size: .68rem; color: var(--faint); }
.depth-title { display: block; font-family: var(--display); font-size: 1.22rem; line-height: 1.25; margin-top: 2px; }
.depth-desc { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.depth-stop--current .depth-title { color: var(--ember-2); }

/* Update strip */

.update-strip {
  display: grid;
  grid-template-columns: 170px 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.update-strip .update-label { color: var(--ember-2); font-family: var(--mono); font-size: .7rem; }
.update-strip h3 { margin: 4px 0 0; font-size: 1.2rem; }
.update-strip p { margin: 5px 0 0; color: var(--muted); font-size: .86rem; }
.update-strip .button { justify-self: end; }

/* Article */

.article-header { padding: 32px 0 8px; max-width: 860px; }
.article-header .kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: var(--ember-2);
  font-family: var(--mono);
  font-size: .74rem;
}
.article-header .kicker::before { content: ""; width: 18px; height: 1px; background: var(--ember); }
.article-header h1 { max-width: 20ch; }
.article-header .standfirst {
  max-width: 62ch;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.62;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--faint);
  font-family: var(--mono);
  font-size: .71rem;
}
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta .dot { width: 4px; height: 4px; background: var(--moss); border-radius: 50%; }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 48px;
  align-items: start;
  padding-bottom: 40px;
}
.prose { max-width: var(--reading); min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose h2 {
  padding-top: .2em;
  border-top: 1px solid var(--line-soft);
}
.prose h2:first-of-type { border-top: 0; }
.prose h2::before {
  content: "";
  display: block;
  width: 26px;
  height: 2px;
  margin-bottom: 12px;
  background: var(--ember);
}
.prose h3 { color: #fff0dd; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.25em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--ember-2); }
.prose hr { border: 0; border-top: 1px dashed var(--line); margin: 2.2em 0; }
.prose blockquote {
  margin: 1.6em 0;
  padding: 2px 0 2px 18px;
  border-left: 2px solid var(--moss);
  color: var(--muted);
  font-style: italic;
}
.prose code {
  padding: 2px 5px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: .84em;
  color: var(--ember-2);
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0 1.7em; font-size: .88rem; }
.prose th, .prose td { padding: 10px 11px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.prose th { color: var(--text); background: var(--surface-2); font-family: var(--mono); font-size: .72rem; font-weight: 500; }
.prose td { color: var(--muted); }
.prose tr:last-child td { border-bottom: 0; }

.quick-answer {
  margin: 26px 0 30px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--ember);
  border-radius: 3px;
}
.quick-answer .qa-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ember-2);
  font-family: var(--mono);
  font-size: .68rem;
}
.quick-answer p { margin: 0; color: var(--text); font-size: .96rem; }
.quick-answer p + p { margin-top: .6em; }

.callout {
  margin: 1.6em 0;
  padding: 15px 17px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--moss);
  border-radius: 3px;
}
.callout--warning { border-left-color: var(--ember); }
.callout--community { border-left-color: var(--faint); }
.callout .callout-label {
  display: block;
  margin-bottom: 4px;
  color: var(--moss);
  font-family: var(--mono);
  font-size: .67rem;
}
.callout--warning .callout-label { color: var(--ember-2); }
.callout--community .callout-label { color: var(--muted); }
.callout p:last-child { margin-bottom: 0; }
.callout p { font-size: .92rem; color: var(--muted); }
.callout strong { color: var(--text); }

.source-note {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: .7rem;
  line-height: 1.7;
}
.source-note a { color: var(--muted); }

.sidebar { position: sticky; top: 92px; display: grid; gap: 18px; }
.side-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
}
.side-card .side-label {
  display: block;
  margin-bottom: 9px;
  color: var(--ember-2);
  font-family: var(--mono);
  font-size: .66rem;
}
.side-card h2, .side-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.side-card p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.side-card ul { margin: 0; padding: 0; list-style: none; }
.side-card li { padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.side-card li:last-child { border-bottom: 0; }
.side-card li a { color: var(--muted); font-size: .84rem; text-decoration: none; }
.side-card li a:hover { color: var(--ember-2); }
.side-card .button { width: 100%; justify-content: center; margin-top: 12px; padding: 9px 12px; font-size: .82rem; }

/* Related */

.related {
  width: min(var(--container), calc(100% - 40px));
  max-width: var(--container);
  margin: 0 auto;
  padding: 36px 0 58px;
  border-top: 1px solid var(--line-soft);
}
.related-heading { margin: 0 0 18px; font-size: 1.5rem; }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.related-item {
  display: block;
  padding: 16px;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
}
.related-item:hover { color: var(--text); border-color: var(--ember-dark); }
.related-cat { display: block; color: var(--ember-2); font-family: var(--mono); font-size: .65rem; }
.related-title { display: block; margin-top: 5px; font-family: var(--display); font-size: 1.08rem; line-height: 1.25; }
.related-desc { display: block; margin-top: 5px; color: var(--muted); font-size: .8rem; line-height: 1.45; }

/* Tools */

.tool-page .article-header { max-width: 820px; }
.tool-shell {
  max-width: 820px;
  margin: 26px 0 60px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.tool-shell--paper {
  background: var(--paper);
  border-color: #cdb995;
  color: var(--ink);
}
.tool-shell--paper h2, .tool-shell--paper h3 { color: var(--ink); }
.tool-shell--paper p { color: var(--ink-muted); }
.tool-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.tool-progress {
  flex: 1;
  min-width: 200px;
  height: 7px;
  background: var(--bg-2);
  border-radius: 99px;
  overflow: hidden;
}
.tool-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ember-dark), var(--ember-2)); transition: width .25s ease; }
.tool-count { color: var(--ember-2); font-family: var(--mono); font-size: .78rem; white-space: nowrap; }
.tool-bar .button { padding: 7px 11px; font-size: .78rem; }

.check-group { margin-top: 22px; }
.check-group h2 { margin: 0 0 8px; font-size: 1.25rem; }
.check-group .group-note { margin: 0 0 10px; color: var(--faint); font-size: .8rem; }
.check-list { display: grid; gap: 2px; }
.check-item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}
.check-item:hover { background: rgba(255, 255, 255, .02); }
.check-item input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  border: 1px solid var(--faint);
  border-radius: 2px;
  background: transparent;
  display: grid;
  place-items: center;
}
.check-item input::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #24160c;
  border-bottom: 2px solid #24160c;
  transform: rotate(-45deg) scale(0);
  transition: transform .12s ease;
}
.check-item input:checked { background: var(--ember-2); border-color: var(--ember-2); }
.check-item input:checked::after { transform: rotate(-45deg) scale(1); }
.check-item .check-title { font-size: .92rem; color: var(--text); }
.check-item .check-note { display: block; margin-top: 2px; color: var(--faint); font-size: .76rem; line-height: 1.45; }
.check-item .check-link { color: var(--muted); font-family: var(--mono); font-size: .66rem; white-space: nowrap; padding-top: 3px; }
.check-item input:checked ~ .check-title { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--line); }
.check-item input:checked ~ .check-link { color: var(--line); }

.timer-display {
  display: grid;
  place-items: center;
  gap: 6px;
  margin: 18px auto 6px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: conic-gradient(var(--ember) var(--p, 0%), var(--surface-2) 0);
  position: relative;
}
.timer-display::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
}
.timer-time {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 2.6rem;
  color: var(--text);
  letter-spacing: -.03em;
}
.timer-label { position: relative; z-index: 1; color: var(--faint); font-family: var(--mono); font-size: .7rem; }
.timer-presets { display: flex; justify-content: center; gap: 8px; margin: 18px 0; }
.timer-presets button {
  padding: 7px 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: .75rem;
}
.timer-presets button[aria-pressed="true"] { color: #24160c; background: var(--ember-2); border-color: var(--ember-2); }
.timer-actions { display: flex; justify-content: center; gap: 10px; }
.timer-note { margin: 18px auto 0; max-width: 46ch; color: var(--faint); font-size: .78rem; text-align: center; }

/* FAQ */

.faq-list { display: grid; gap: 0; margin-top: 12px; }
.faq-item { border-bottom: 1px solid var(--line-soft); }
.faq-item summary {
  padding: 15px 30px 15px 0;
  position: relative;
  cursor: pointer;
  color: var(--text);
  font-family: var(--display);
  font-size: 1.13rem;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 12px;
  color: var(--ember-2);
  font-family: var(--sans);
  font-size: 1.2rem;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-answer { padding: 0 30px 16px 0; color: var(--muted); font-size: .92rem; }
.faq-item .faq-answer p:last-child { margin-bottom: 0; }

/* 404 */

.not-found { padding: 100px 0 120px; max-width: 620px; }
.not-found h1 { font-size: clamp(3rem, 9vw, 5.5rem); }
.not-found p { color: var(--muted); max-width: 46ch; margin-top: 16px; }

/* Footer */

.site-footer {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  background: #0e0b09;
}
.footer-inner {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
  padding: 46px 0 30px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
}
.footer-name { margin: 0 0 8px; font-family: var(--display); font-size: 1.3rem; color: var(--text); }
.footer-note { margin: 0; max-width: 40ch; color: var(--faint); font-size: .8rem; line-height: 1.6; }
.footer-heading { margin: 0 0 10px; color: var(--muted); font-family: var(--mono); font-size: .7rem; }
.footer-col a { display: block; padding: 4px 0; color: var(--faint); font-size: .82rem; text-decoration: none; }
.footer-col a:hover { color: var(--ember-2); }
.footer-bottom {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
  padding: 16px 0 22px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: #6f5f4f;
  font-size: .72rem;
}
.footer-bottom p { margin: 0; }
.footer-patch { font-family: var(--mono); white-space: nowrap; }

/* Responsive */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { margin-top: 10px; }
  .quick-card { left: 14px; bottom: -24px; }
  .depth-grid { grid-template-columns: 1fr; gap: 22px; }
  .article-layout { grid-template-columns: 1fr; gap: 30px; }
  .sidebar { position: static; grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-card, .guide-card--wide { grid-column: span 6; }
  .guide-card--featured { grid-column: span 12; }
  .tool-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-inner .footer-col:last-child { grid-column: 2 / span 2; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-desktop { display: none; }
  .menu-toggle { display: inline-flex; }
  .brand-name { font-size: 1.12rem; }
  .brand-sub { display: none; }
  .hero { padding-top: 42px; }
  .hero-actions .button { flex: 1 1 auto; justify-content: center; }
  .hero-meta { gap: 6px 12px; }
  .section { padding: 40px 0; }
  .section-head { display: block; }
  .section-head p { margin-top: 8px; }
  .section-head .section-link { display: inline-block; margin-top: 10px; }
  .guide-grid { gap: 10px; }
  .guide-card, .guide-card--wide, .guide-card--featured { grid-column: span 12; min-height: 0; }
  .guide-card { padding: 17px; }
  .update-strip { grid-template-columns: 1fr; gap: 14px; }
  .update-strip .button { justify-self: start; }
  .article-header { padding-top: 22px; }
  .article-header h1 { max-width: none; }
  .sidebar { display: none; }
  .related-grid { grid-template-columns: 1fr; }
  .check-item { grid-template-columns: 22px 1fr; }
  .check-item .check-link { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer-inner .footer-brand { grid-column: 1 / -1; }
  .footer-inner .footer-col:last-child { grid-column: 1 / -1; }
  .footer-bottom { display: block; }
  .footer-patch { margin-top: 8px; }
  .quick-card { position: static; width: 100%; margin-top: 14px; }
  .hero-caption { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

@media print {
  .site-header, .site-footer, .sidebar, .search-dialog, .hero-actions, .related, .tool-bar .button { display: none !important; }
  body { background: #fff; color: #111; }
  .article-layout { display: block; }
  .prose { max-width: none; }
  a { color: #111; }
}
