/* PawsomePlan — field-notebook design system
   Fonts: Bricolage Grotesque (OFL), Source Serif 4 (OFL), self-hosted. */

@font-face { font-family: "Bricolage"; src: url("/assets/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Source Serif"; src: url("/assets/fonts/serif-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Serif"; src: url("/assets/fonts/serif-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif"; src: url("/assets/fonts/serif-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #f4f6f5;
  --paper-2: #e6ede9;
  --ink: #1e2a33;
  --ink-2: #4a5a64;
  --leash: #2e6b4e;
  --leash-deep: #1f4d37;
  --ball: #d6e85a;
  --line: #c9d3cd;
  --warn: #8a3b12;
  --sans: "Bricolage", "Segoe UI", system-ui, sans-serif;
  --serif: "Source Serif", Georgia, "Times New Roman", serif;
  --measure: 66ch;
  --r-sm: 6px;
  --r-lg: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.55; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--leash-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--leash); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--ball); border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; top: 1rem; color: #fff; }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand svg { width: 2rem; height: 2rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.6rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--leash-deep); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.menu { display: none; }
@media (max-width: 720px) {
  .nav { display: none; }
  .menu { display: block; position: relative; }
  .menu summary { list-style: none; cursor: pointer; font-weight: 600; padding: .45rem .8rem; border: 1px solid var(--ink); border-radius: 999px; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu ul { position: absolute; right: 0; top: 2.9rem; list-style: none; margin: 0; padding: .6rem 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); min-width: 13rem; box-shadow: 0 12px 30px -12px rgba(30,42,51,.35); }
  .menu a { display: block; padding: .6rem 1.1rem; color: var(--ink); text-decoration: none; }
}

/* Type */
h1, h2, h3 { font-family: var(--sans); line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); font-weight: 750; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.05rem); font-weight: 700; margin-top: 2.2em; }
h3 { font-size: 1.25rem; font-weight: 650; margin-top: 1.8em; }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 44rem; }

/* Home hero */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.hero h1 { max-width: 14ch; }
.hero .lede { max-width: 34rem; }
.hero-path { margin-top: 2rem; color: var(--leash); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } .hero h1 { max-width: 18ch; } }

/* Calculator (the signature element) */
.calc { background: #fff; border: 2px solid var(--ink); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 2rem); position: relative; }
.calc::before { content: ""; position: absolute; inset: 10px; border: 1.5px dashed var(--leash); border-radius: 12px; pointer-events: none; opacity: .55; }
.calc h2, .calc h3 { margin-top: 0; font-size: 1.35rem; }
.calc form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; position: relative; }
.calc .full { grid-column: 1 / -1; }
.field label, .field legend { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.field input, .field select { width: 100%; font: inherit; font-size: 1.05rem; padding: .7rem .8rem; border: 1.5px solid var(--ink-2); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); }
.field input:focus, .field select:focus { border-color: var(--ink); }
.field .hint { font-size: .85rem; color: var(--ink-2); margin-top: .3rem; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; }
.sizes label { margin: 0; font-weight: 500; }
.sizes input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sizes span { display: block; text-align: center; border: 1.5px solid var(--ink-2); border-radius: var(--r-sm); padding: .55rem .2rem; cursor: pointer; font-size: .92rem; line-height: 1.2; }
.sizes span small { display: block; color: var(--ink-2); font-size: .78rem; }
.sizes input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.sizes input:checked + span small { color: #d9e3dd; }
.sizes input:focus-visible + span { outline: 3px solid var(--ink); box-shadow: 0 0 0 6px var(--ball); }
@media (max-width: 460px) { .sizes { grid-template-columns: repeat(2, 1fr); } .calc form { grid-template-columns: 1fr; } }
.result { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1.5px solid var(--line); position: relative; }
.result .big { font-size: clamp(3rem, 8vw, 4.6rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em; display: inline-block; background: linear-gradient(transparent 62%, var(--ball) 62%, var(--ball) 92%, transparent 92%); padding: 0 .1em; }
.result .unit { font-size: 1.1rem; font-weight: 600; margin-left: .35rem; }
.result p { margin: .6rem 0 0; color: var(--ink-2); font-size: .98rem; }
.btn { display: inline-flex; align-items: center; gap: .5rem; font: inherit; font-weight: 650; background: var(--leash-deep); color: #fff; border: 0; border-radius: 999px; padding: .8rem 1.4rem; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--ink); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }

/* Problem index (home) */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section.alt { background: var(--paper-2); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.problems { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.problems li { border-bottom: 1px solid var(--line); }
.problems a { display: grid; grid-template-columns: minmax(12rem, 1fr) 2fr auto; gap: 1.5rem; align-items: baseline; padding: 1.15rem .25rem; color: var(--ink); text-decoration: none; }
.problems a:hover { background: #fff; }
.problems .q { font-weight: 650; font-size: 1.15rem; }
.problems .a { color: var(--ink-2); font-family: var(--serif); }
.problems .go { font-weight: 600; color: var(--leash-deep); white-space: nowrap; }
@media (max-width: 760px) { .problems a { grid-template-columns: 1fr; gap: .3rem; } }

.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.tool { border-top: 4px solid var(--leash); padding-top: 1rem; }
.tool h3 { margin: .2rem 0 .4rem; }
.tool p { color: var(--ink-2); }
.tool svg { width: 3rem; height: 3rem; color: var(--leash); }
@media (max-width: 820px) { .tools { grid-template-columns: 1fr; } }

.method { display: grid; grid-template-columns: 1fr 1.4fr; gap: 3rem; align-items: start; }
.method p { font-family: var(--serif); font-size: 1.1rem; }
@media (max-width: 820px) { .method { grid-template-columns: 1fr; gap: 1rem; } }

/* Article */
.crumbs { font-size: .9rem; color: var(--ink-2); padding-top: 1.6rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--line); }
.crumbs a { color: var(--ink-2); }
.article-head { padding: 1.5rem 0 1.5rem; border-bottom: 1px solid var(--line); }
.article-head h1 { max-width: 22ch; }
.article-head .lede { font-family: var(--serif); }
.meta { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-size: .92rem; color: var(--ink-2); margin-top: 1rem; }
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: 3.5rem; padding: 2rem 0 4rem; }
@media (max-width: 960px) { .article-grid { grid-template-columns: 1fr; gap: 1rem; } .toc { order: -1; } }
.prose { font-family: var(--serif); font-size: 1.15rem; line-height: 1.7; max-width: var(--measure); }
.prose h2, .prose h3 { font-family: var(--sans); }
.prose h2 { padding-top: .2rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--leash); font-family: var(--sans); font-weight: 700; }
.prose blockquote { margin: 1.5rem 0; padding: .2rem 0 .2rem 1.2rem; border-left: 4px solid var(--leash); color: var(--ink-2); }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .97rem; margin: 1.5rem 0; }
.prose th, .prose td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { border-bottom: 2px solid var(--ink); font-weight: 650; }
.table-scroll { overflow-x: auto; }
.prose figure { margin: 2rem 0; }
.prose figcaption { font-family: var(--sans); font-size: .9rem; color: var(--ink-2); margin-top: .6rem; }
.prose a[rel~="sponsored"] { font-weight: 600; }
.short-answer { background: #fff; border-left: 6px solid var(--leash); padding: 1.1rem 1.3rem; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 0 0 2rem; }
.short-answer h2 { font-size: 1.05rem; margin: 0 0 .4rem; letter-spacing: 0; }
.short-answer p:last-child { margin-bottom: 0; }
.note { font-family: var(--sans); font-size: .95rem; background: var(--paper-2); padding: 1rem 1.2rem; border-radius: var(--r-sm); margin: 1.5rem 0; }
.note.warn { background: #f8ece3; color: #4a240c; }
.affiliate { font-family: var(--sans); border: 2px solid var(--ink); border-radius: var(--r-lg); padding: 1.3rem 1.4rem; margin: 2.2rem 0; background: #fff; }
.affiliate .disclose { font-size: .82rem; color: var(--ink-2); margin-bottom: .6rem; }
.affiliate h3 { margin-top: 0; }
.toc { font-size: .95rem; }
.toc nav { position: sticky; top: 6rem; border-top: 2px solid var(--ink); padding-top: .8rem; }
.toc h2 { font-size: 1rem; margin: 0 0 .6rem; letter-spacing: 0; }
.toc ol { margin: 0; padding-left: 1.1rem; }
.toc li { margin-bottom: .45rem; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--leash-deep); text-decoration: underline; }
.sources { font-size: .95rem; }
.sources li { word-break: break-word; }
.related { border-top: 2px solid var(--ink); padding: 2rem 0 0; margin-top: 3rem; font-family: var(--sans); }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem 2rem; }
.related a { font-weight: 600; }

/* Video (click-to-load) */
.video { position: relative; aspect-ratio: 16 / 9; background: var(--ink); border-radius: var(--r-sm); overflow: hidden; margin: 1.5rem 0 .6rem; }
.video button { all: unset; cursor: pointer; position: absolute; inset: 0; display: grid; place-items: center; }
.video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.video .play { position: relative; background: var(--ball); color: var(--ink); font-family: var(--sans); font-weight: 700; padding: .8rem 1.3rem; border-radius: 999px; }
.video button:focus-visible .play { outline: 3px solid #fff; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.checklist li { border-bottom: 1px solid var(--line); }
.checklist label { display: flex; gap: .8rem; align-items: flex-start; padding: .7rem .2rem; cursor: pointer; font-family: var(--sans); font-size: 1.02rem; }
.checklist input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; accent-color: var(--leash-deep); flex: none; }
.checklist input:checked + span { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--leash); }
.progress { font-family: var(--sans); font-weight: 650; margin: 1rem 0; }
.progress-bar { height: 10px; background: var(--paper-2); border-radius: 999px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--leash); width: 0; transition: width .25s ease; }

/* Plain pages */
.page { padding: 2.5rem 0 4rem; }
.page .prose { max-width: 70ch; }

/* Footer */
.site-footer { background: var(--ink); color: #dfe7e2; padding: 3.5rem 0 2rem; margin-top: 0; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid h2 { font-size: 1rem; margin: 0 0 .8rem; letter-spacing: 0; color: #fff; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .5rem; }
.site-footer .fine { border-top: 1px solid #3a4a55; margin-top: 2.5rem; padding-top: 1.3rem; font-size: .88rem; color: #b9c6bf; }
.site-footer .brand { color: #fff; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .toc, .video, .affiliate, .btn { display: none !important; } body { background: #fff; } }
