/* Loftia Field Guide — a solarpunk field-notebook system.
   Original theme for the Forge staging build. No game assets. */

:root {
  --sky: #e7f2ef;
  --sky-2: #dcece7;
  --paper: #fbfdfb;
  --paper-2: #f2f8f5;
  --paper-3: #eaf3ee;
  --ink: #173b34;
  --ink-2: #2a574b;
  --muted: #5d746c;
  --faint: #7f948c;
  --line: #c9ded7;
  --line-strong: #a9c8bf;
  --sun: #e6a23c;
  --sun-2: #f3c56f;
  --sun-soft: #f8e8c6;
  --canopy: #2f6b57;
  --canopy-dark: #1f4d3f;
  --water: #5c9fb3;
  --water-soft: #d9ebf0;
  --blossom: #c76b7e;
  --blossom-soft: #f6e1e5;
  --danger: #a94b4b;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1180px;
  --reading: 70ch;
}

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

[hidden] { display: none !important; }

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

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 88% -10%, rgba(230, 162, 60, .11), transparent 62%),
    radial-gradient(760px 520px at -8% 18%, rgba(92, 159, 179, .12), transparent 60%),
    linear-gradient(180deg, var(--sky) 0%, #f0f7f4 42%, var(--paper) 100%);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .45;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='520' viewBox='0 0 520 520'%3E%3Cg fill='none' stroke='%23a9c8bf' stroke-width='1'%3E%3Cpath d='M-20 120c70-48 130-48 196 0s126 48 196 0 126-48 196 0'/%3E%3Cpath d='M-20 156c70-48 130-48 196 0s126 48 196 0 126-48 196 0'/%3E%3Cpath d='M-20 192c70-48 130-48 196 0s126 48 196 0 126-48 196 0'/%3E%3Cpath d='M-20 340c70-48 130-48 196 0s126 48 196 0 126-48 196 0'/%3E%3Cpath d='M-20 376c70-48 130-48 196 0s126 48 196 0 126-48 196 0'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 520px 520px;
}

::selection { background: rgba(230, 162, 60, .32); color: var(--ink); }

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

a {
  color: var(--canopy-dark);
  text-decoration-color: rgba(47, 107, 87, .38);
  text-underline-offset: 3px;
}
a:hover { color: var(--canopy); text-decoration-color: var(--sun); }

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

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

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  color: var(--paper);
  background: var(--canopy-dark);
  border-radius: 999px;
  font-family: var(--display);
}
.skip-link:focus { top: 12px; }

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(231, 242, 239, .9);
  border-bottom: 1px solid rgba(169, 200, 191, .65);
  backdrop-filter: blur(14px);
}
.header-inner {
  width: min(var(--container), calc(100% - 44px));
  margin-inline: auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 38px; height: 38px; color: var(--canopy); flex: none; }
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -.02em;
}

.nav-desktop { display: flex; align-items: center; gap: 4px; }
.nav-desktop a,
.mobile-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-family: var(--display);
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.nav-desktop a:hover,
.mobile-nav a:hover { background: var(--paper-2); color: var(--canopy-dark); }
.nav-desktop a[aria-current="page"],
.mobile-nav a[aria-current="page"] { background: var(--canopy-dark); color: var(--paper); }

.search-open {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 8px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--display);
  font-size: .9rem;
  font-weight: 600;
}
.search-open svg { width: 17px; height: 17px; }
.search-open:hover { background: var(--paper); border-color: var(--canopy); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-family: var(--display);
  font-weight: 600;
}
.menu-toggle svg { width: 18px; height: 18px; }
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 22px 16px;
  border-top: 1px solid var(--line);
}
.mobile-nav a { border-radius: 10px; }
.mobile-nav .search-open { margin: 8px 0 0; justify-content: center; }

/* Search */

.search-dialog {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: start center;
  padding: 12vh 20px 20px;
  background: rgba(23, 59, 52, .42);
  backdrop-filter: blur(5px);
}
.search-panel {
  width: min(680px, 100%);
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  box-shadow: 0 30px 80px -34px rgba(23, 59, 52, .55);
}
.search-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.search-head label { font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.search-close {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--display);
  font-size: .85rem;
}
#search-input {
  width: 100%;
  margin: 12px 0 6px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
}
.search-results { display: grid; gap: 6px; margin-top: 10px; }
.search-result {
  display: grid;
  gap: 2px;
  padding: 11px 13px;
  border-radius: 11px;
  text-decoration: none;
}
.search-result:hover { background: var(--paper-2); }
.search-result strong { font-family: var(--display); font-size: .98rem; }
.search-result span { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.search-hint { margin: 8px 0 0; color: var(--faint); font-size: .82rem; }

/* Breadcrumbs */

.breadcrumbs {
  width: min(var(--container), calc(100% - 44px));
  margin: 18px auto 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--display);
  font-size: .82rem;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--canopy); text-decoration: underline; }
.breadcrumbs span[aria-hidden] { color: var(--line-strong); }

/* Shared type */

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.08;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--canopy);
  font-family: var(--body);
  font-size: 1rem;
  font-style: italic;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--sun);
  border-radius: 2px;
}

.lede { font-size: 1.16rem; line-height: 1.62; color: var(--ink-2); }

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--display);
  font-size: .94rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
}
.button--primary { background: var(--canopy-dark); color: var(--paper); }
.button--primary:hover { background: var(--canopy); color: #fff; }
.button--ghost { border-color: var(--line-strong); color: var(--ink-2); background: transparent; }
.button--ghost:hover { border-color: var(--canopy); color: var(--canopy-dark); background: var(--paper); }
.button:disabled { opacity: .55; cursor: not-allowed; }

/* Hero */

.hero { padding: 54px 0 36px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(3rem, 6.2vw, 5.3rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .95;
  max-width: 11ch;
}
.hero .lede { max-width: 50ch; margin: 22px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
  color: var(--muted);
  font-family: var(--display);
  font-size: .83rem;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sun); display: inline-block; }

.hero-media { position: relative; }
.hero-frame {
  overflow: hidden;
  border-radius: 30px;
  background: linear-gradient(160deg, #d9ece8, #f4f9f6 55%, #e8f2ee);
  border: 1px solid var(--line);
}
.hero-frame img { width: 100%; }
.hero-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 9px 4px 0;
  color: var(--faint);
  font-family: var(--display);
  font-size: .74rem;
}
.quick-card {
  position: relative;
  width: calc(100% - 36px);
  margin: -24px auto 0;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: 8px 8px 0 rgba(230, 162, 60, .22);
}
.quick-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.quick-card dt {
  color: var(--muted);
  font-family: var(--display);
  font-size: .68rem;
  font-weight: 600;
}
.quick-card dd { margin: 2px 0 0; font-family: var(--display); font-size: .82rem; font-weight: 600; color: var(--ink); }

/* Sections */

.section { padding: 52px 0; }
.section--tight { padding: 30px 0; }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 30px;
  align-items: end;
  margin-bottom: 26px;
}
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); }
.section-head p { margin: 0; color: var(--muted); font-size: .98rem; }

/* Home cards */

.guide-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.guide-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .18s ease, background .18s ease;
}
.guide-card:hover { border-color: var(--canopy); background: #fff; color: var(--ink); }
.guide-card--featured {
  grid-column: span 7;
  background: var(--sun-soft);
  border-color: #e7c98c;
  box-shadow: 10px 10px 0 rgba(47, 107, 87, .09);
}
.guide-card--featured:hover { background: #fbedd1; }
.guide-card--wide { grid-column: span 5; }
.card-cat {
  color: var(--canopy);
  font-family: var(--display);
  font-size: .76rem;
  font-weight: 700;
}
.guide-card h3 { font-size: 1.34rem; }
.guide-card--featured h3 { font-size: clamp(1.6rem, 2.4vw, 2rem); max-width: 18ch; }
.guide-card p { margin: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.55; }
.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 10px;
  color: var(--muted);
  font-family: var(--display);
  font-size: .76rem;
}
.card-arrow { color: var(--canopy); font-weight: 700; }

/* Fact strips */

.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.fact {
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.fact b {
  display: block;
  font-family: var(--display);
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: -.03em;
}
.fact span { display: block; margin-top: 5px; color: var(--muted); font-size: .82rem; line-height: 1.4; }

/* Related */

.related { padding: 46px 0 66px; }
.related-heading { margin-bottom: 18px; font-size: 1.5rem; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.related-item {
  display: grid;
  gap: 4px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(251, 253, 251, .7);
  text-decoration: none;
  color: var(--ink);
}
.related-item:hover { border-color: var(--canopy); background: var(--paper); color: var(--ink); }
.related-cat { color: var(--canopy); font-family: var(--display); font-size: .73rem; font-weight: 700; }
.related-title { font-family: var(--display); font-size: 1.04rem; font-weight: 700; line-height: 1.25; }
.related-desc { color: var(--muted); font-size: .86rem; line-height: 1.45; }

/* Article */

.article-header {
  max-width: 820px;
  padding: 38px 0 26px;
}
.article-header h1 {
  margin-top: 8px;
  font-size: clamp(2.55rem, 5vw, 4.1rem);
  font-weight: 800;
  letter-spacing: -.045em;
}
.kicker {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--paper-3);
  color: var(--canopy-dark);
  font-family: var(--display);
  font-size: .74rem;
  font-weight: 700;
}
.standfirst {
  max-width: 62ch;
  margin: 16px 0 0;
  color: var(--ink-2);
  font-size: 1.16rem;
  line-height: 1.6;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  color: var(--faint);
  font-family: var(--display);
  font-size: .78rem;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: clamp(30px, 5vw, 62px);
  align-items: start;
  padding-bottom: 60px;
}
.prose { max-width: var(--reading); }
.prose > p { margin: 0 0 1.05em; }
.prose > p:first-child { font-size: 1.06rem; }

.prose h2 {
  margin: 2.1em 0 .55em;
  padding-top: .1em;
  font-size: 1.62rem;
  letter-spacing: -.03em;
}
.prose h2::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--sun);
  vertical-align: .12em;
}
.prose h3 { margin: 1.6em 0 .45em; font-size: 1.16rem; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--paper-3);
  color: var(--canopy-dark);
  font-family: var(--mono);
  font-size: .84em;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }

.prose a { font-weight: 600; }
.prose a:hover { background: var(--sun-soft); }

.prose blockquote {
  margin: 1.4em 0;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--sun);
  color: var(--ink-2);
  font-style: italic;
}

/* Tables */

.table-wrap {
  margin: 1.2em 0 1.6em;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.fact-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--display);
  font-size: .86rem;
  line-height: 1.45;
}
.fact-table caption {
  padding: 12px 14px 0;
  color: var(--muted);
  font-family: var(--body);
  font-size: .82rem;
  font-style: italic;
  text-align: left;
}
.fact-table th,
.fact-table td {
  padding: 11px 13px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.fact-table th {
  background: var(--paper-3);
  color: var(--canopy-dark);
  font-weight: 700;
  font-size: .78rem;
}
.fact-table tr:last-child td { border-bottom: 0; }
.fact-table td:first-child { font-weight: 600; color: var(--ink); }
.table-note { margin-top: -.9em; color: var(--faint); font-size: .8rem; }

/* Quick answer + callouts */

.quick-answer {
  margin: 0 0 1.5em;
  padding: 17px 19px;
  background: var(--sun-soft);
  border: 1px solid #e8cb90;
  border-radius: 14px;
}
.qa-label {
  display: block;
  margin-bottom: 4px;
  color: #7a5417;
  font-family: var(--display);
  font-size: .76rem;
  font-weight: 700;
}
.quick-answer p { margin: 0; }

.callout {
  margin: 1.4em 0;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--canopy);
  border-radius: 0 12px 12px 0;
  background: var(--paper-2);
  font-size: .95rem;
}
.callout > p { margin: 0; }
.callout > p + p { margin-top: .7em; }
.callout-label {
  display: block;
  margin-bottom: 5px;
  color: var(--canopy-dark);
  font-family: var(--display);
  font-size: .78rem;
  font-weight: 700;
}
.callout--community { border-left-color: var(--water); background: var(--water-soft); }
.callout--community .callout-label { color: #2d6475; }
.callout--unverified { border-left-color: var(--blossom); background: var(--blossom-soft); }
.callout--unverified .callout-label { color: #8b3f50; }
.callout--official { border-left-color: var(--canopy); background: var(--paper-3); }

.tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-family: var(--display);
  font-size: .68rem;
  font-weight: 700;
  vertical-align: .08em;
}
.tag--official { background: var(--paper-3); color: var(--canopy-dark); border: 1px solid var(--line-strong); }
.tag--demo { background: var(--sun-soft); color: #7a5417; border: 1px solid #e7c98c; }
.tag--community { background: var(--water-soft); color: #2d6475; border: 1px solid #b9d8e2; }
.tag--unverified { background: var(--blossom-soft); color: #8b3f50; border: 1px solid #e5bcc5; }

/* Sources */

.sources {
  margin: 2.4em 0 0;
  padding: 22px 22px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--canopy);
  border-radius: 0 0 14px 14px;
}
.sources h2 {
  margin: 0 0 8px;
  padding: 0;
  font-size: 1.24rem;
}
.sources h2::before { display: none; }
.sources-checked,
.sources-evidence {
  margin: 0 0 .8em;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.55;
}
.sources-evidence { color: var(--ink-2); font-style: italic; }
.source-list { margin: 0; padding: 0; list-style: none; }
.source-list li {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 2px 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-family: var(--display);
  font-size: .82rem;
}
.source-kind {
  color: var(--canopy);
  font-size: .7rem;
  font-weight: 700;
}
.source-kind--official { color: var(--canopy-dark); }
.source-kind--community { color: #2d6475; }
.source-kind--demo { color: #7a5417; }
.source-list a { font-weight: 700; }
.source-note-text {
  grid-column: 2;
  color: var(--muted);
  font-family: var(--body);
  font-size: .8rem;
  line-height: 1.45;
}
.sources-rule {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
  color: var(--faint);
  font-size: .78rem;
  line-height: 1.5;
}

/* Sidebar */

.sidebar { position: sticky; top: 96px; display: grid; gap: 12px; }
.side-card {
  padding: 16px 17px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.side-label {
  display: block;
  margin-bottom: 7px;
  color: var(--canopy);
  font-family: var(--display);
  font-size: .74rem;
  font-weight: 700;
}
.side-card ul { margin: 0; padding: 0; list-style: none; }
.side-card li { margin-bottom: 5px; }
.side-card li a {
  color: var(--ink-2);
  font-family: var(--display);
  font-size: .82rem;
  text-decoration: none;
}
.side-card li a:hover { color: var(--canopy); text-decoration: underline; }
.side-card p { margin: 0 0 10px; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.side-card p:last-child { margin-bottom: 0; }
.side-card .button { width: 100%; padding: 9px 12px; font-size: .8rem; }
.side-card--evidence { border-top: 3px solid var(--sun); }
.side-checked { font-family: var(--display); font-size: .72rem !important; color: var(--faint) !important; }

/* Tools */

.tool-shell {
  margin: 1.4em 0 1.8em;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 rgba(47, 107, 87, .08);
}
.tool-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.tool-progress {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--paper-3);
  overflow: hidden;
}
.tool-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--canopy), var(--sun));
  transition: width .2s ease;
}
.tool-count {
  color: var(--muted);
  font-family: var(--display);
  font-size: .78rem;
  white-space: nowrap;
}
.check-group { margin-top: 18px; }
.check-group h2 {
  margin: 0 0 2px;
  padding: 0;
  font-size: 1.1rem;
}
.check-group h2::before { display: none; }
.group-note { margin: 0 0 9px; color: var(--faint); font-size: .8rem; }
.check-list { display: grid; gap: 6px; }
.check-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-2);
}
.check-item input {
  width: 17px;
  height: 17px;
  margin: 3px 0 0;
  accent-color: var(--canopy);
}
.check-title {
  display: grid;
  gap: 1px;
  font-family: var(--display);
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.35;
}
.check-note { color: var(--muted); font-family: var(--body); font-size: .76rem; font-weight: 400; line-height: 1.4; }
.check-link {
  align-self: center;
  color: var(--canopy);
  font-family: var(--display);
  font-size: .7rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.check-link:hover { text-decoration: underline; }

.tool-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 1.3em;
}
.tool-nav a {
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--display);
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
}
.tool-nav a[aria-current="page"] { background: var(--canopy-dark); color: var(--paper); border-color: var(--canopy-dark); }

.tool-lock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 11px 14px;
  border: 1px dashed var(--blossom);
  border-radius: 11px;
  background: var(--blossom-soft);
  color: #8b3f50;
  font-family: var(--display);
  font-size: .82rem;
  font-weight: 600;
}
.tool-lock span { font-family: var(--body); font-weight: 400; color: #6d4550; }

.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}
.calc-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-family: var(--display);
  font-size: .78rem;
  font-weight: 600;
}
.calc-grid input,
.calc-grid select {
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--display);
  font-size: .88rem;
}
.calc-grid input:disabled,
.calc-grid select:disabled { opacity: .55; cursor: not-allowed; }
.calc-result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 11px;
  background: var(--paper-3);
  font-family: var(--display);
}
.calc-result strong { font-size: 1.5rem; letter-spacing: -.03em; }
.calc-result span { color: var(--muted); font-size: .78rem; }

/* Planner */

.planner-controls fieldset {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
}
.planner-controls legend {
  padding: 0 6px;
  color: var(--canopy-dark);
  font-family: var(--display);
  font-size: .82rem;
  font-weight: 700;
}
.planner-options { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.planner-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--display);
  font-size: .82rem;
  font-weight: 600;
}
.planner-options input { accent-color: var(--canopy); }
.planner-row { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.planner-row label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-family: var(--display);
  font-size: .78rem;
  font-weight: 600;
}
.planner-row select {
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--paper-2);
  font-family: var(--display);
  font-size: .86rem;
}
.planner-output { margin-top: 16px; }
.planner-output:empty { display: none; }
.plan-block {
  margin-bottom: 9px;
  padding: 12px 14px;
  border-left: 3px solid var(--sun);
  border-radius: 0 10px 10px 0;
  background: var(--paper-2);
}
.plan-block h3 { margin: 0 0 4px; font-size: .98rem; }
.plan-block ul { margin: 0; padding-left: 18px; }
.plan-block li { margin: 2px 0; font-family: var(--display); font-size: .82rem; line-height: 1.4; }
.plan-note { margin: 10px 0 0; color: var(--faint); font-size: .78rem; }

/* Region / map */

.region-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 1.2em 0 1.6em; }
.region-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.region-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.region-card p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.region-card span {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--canopy);
  font-family: var(--display);
  font-size: .7rem;
  font-weight: 700;
}
.map-figure {
  margin: 1.4em 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, #e3f1ee, #f7fbf9);
}
.map-figure svg { width: 100%; height: auto; display: block; }
.map-figure figcaption { margin-top: 10px; color: var(--faint); font-size: .78rem; line-height: 1.45; }

/* Home extras */

.ledger {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.ledger-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(251, 253, 251, .75);
}
.ledger-item b {
  display: block;
  margin-bottom: 4px;
  font-family: var(--display);
  font-size: .9rem;
}
.ledger-item p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }

.tool-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tool-card {
  display: grid;
  gap: 5px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
}
.tool-card:hover { border-color: var(--canopy); color: var(--ink); }
.tool-card[data-label]::before {
  content: attr(data-label);
  color: var(--canopy);
  font-family: var(--display);
  font-size: .7rem;
  font-weight: 700;
}
.tool-card b { font-family: var(--display); font-size: 1.08rem; }
.tool-card span { color: var(--muted); font-size: .84rem; line-height: 1.45; }

/* Footer */

.site-footer {
  margin-top: 20px;
  padding: 42px 0 22px;
  background: var(--canopy-dark);
  color: #dcebe4;
}
.footer-inner {
  width: min(var(--container), calc(100% - 44px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 28px;
}
.footer-name {
  margin: 0 0 8px;
  color: #f7fbf8;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
}
.footer-note { margin: 0; max-width: 34ch; color: #b9d0c6; font-size: .82rem; line-height: 1.55; }
.footer-heading {
  margin: 0 0 8px;
  color: #f3c56f;
  font-family: var(--display);
  font-size: .78rem;
  font-weight: 700;
}
.footer-col { display: flex; flex-direction: column; gap: 5px; }
.footer-col a {
  color: #dcebe4;
  font-family: var(--display);
  font-size: .82rem;
  text-decoration: none;
}
.footer-col a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--sun-2); }
.footer-bottom {
  width: min(var(--container), calc(100% - 44px));
  margin: 30px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(220, 235, 228, .18);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  color: #9fbab0;
  font-size: .74rem;
  line-height: 1.5;
}
.footer-bottom p { margin: 0; }
.footer-patch { font-family: var(--display); }

/* Responsive */

@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 680px; }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; grid-template-columns: repeat(2, 1fr); }
  .sidebar .side-card:first-child { grid-column: 1 / -1; }
  .footer-inner { grid-template-columns: 1.3fr repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-desktop { display: none; }
  .menu-toggle { display: inline-flex; }
  .section-head { grid-template-columns: 1fr; gap: 10px; }
  .guide-card, .guide-card--featured, .guide-card--wide { grid-column: span 6; }
  .fact-grid { grid-template-columns: repeat(2, 1fr); }
  .region-grid, .tool-cards, .ledger { grid-template-columns: 1fr; }
  .source-list li { grid-template-columns: 1fr; }
  .source-note-text { grid-column: 1; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .container, .header-inner, .breadcrumbs, .footer-inner, .footer-bottom {
    width: min(var(--container), calc(100% - 30px));
  }
  .hero { padding-top: 30px; }
  .hero h1 { font-size: clamp(2.7rem, 12vw, 4rem); }
  .quick-card { position: static; width: auto; margin-top: 12px; box-shadow: none; }
  .quick-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-card, .guide-card--featured, .guide-card--wide { grid-column: 1 / -1; }
  .related-grid { grid-template-columns: 1fr; }
  .fact-grid { grid-template-columns: 1fr 1fr; }
  .article-header { padding-top: 24px; }
  .article-header h1 { font-size: clamp(2.2rem, 11vw, 3.2rem); }
  .sidebar { grid-template-columns: 1fr; }
  .tool-bar { flex-wrap: wrap; }
  .tool-progress { flex-basis: 100%; }
  .calc-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .hero-caption { flex-direction: column; gap: 2px; }
}

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

/* Print: keep the guide readable */

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