@font-face {
  font-family: "DM Sans";
  src: url("dm-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("dm-sans-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1EFF;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("instrument-serif-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("instrument-serif-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1EFF;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("instrument-serif-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("instrument-serif-italic-latin-ext.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1EFF;
}

:root {
  color-scheme: light;
  --paper: #f8f6ef;
  --cream: #f0eddf;
  --card: #fcfaf3;
  --pine: #172f26;
  --text: #273a31;
  --muted: #4c5d50;
  --olive: #526228;
  --lime: #e0ed93;
  --lime-hover: #d5e57e;
  --rule: #c7c9b7;
  --edge: #a4ad99;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --mono: ui-monospace, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 16px/1.58 var(--sans);
  text-rendering: optimizeLegibility;
}
main { flex: 1; }
a { color: var(--pine); text-underline-offset: .23em; text-decoration-thickness: .08em; }
a:hover { color: var(--olive); }
img { display: block; max-width: 100%; }
p, figure { margin: 0; }
h1, h2, h3 {
  margin: 0;
  color: var(--pine);
  font-family: var(--serif);
  font-weight: 400;
  line-height: .99;
}
h1 { letter-spacing: -.028em; }
h2 { letter-spacing: -.02em; }
button, input, textarea, select { font: inherit; }
button, input[type="file"], select { cursor: pointer; }
:focus-visible { outline: 2px solid #485d1a; outline-offset: 4px; }
::selection { background: var(--lime); color: var(--pine); }

.shell { width: min(calc(100% - 96px), 1224px); margin-inline: auto; }
.skip-link {
  position: absolute;
  top: 0;
  left: 12px;
  z-index: 2;
  transform: translateY(-130%);
  padding: .65rem 1rem;
  background: var(--pine);
  color: white;
}
.skip-link:focus { transform: translateY(0); }
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 78px;
  border-bottom: 1px solid var(--edge);
}
.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 9px;
  color: var(--pine);
  font: 400 34px/1 var(--serif);
  letter-spacing: -.024em;
  text-decoration: none;
  white-space: nowrap;
}
.brand img { flex: none; object-fit: contain; }
.site-nav, .site-footer nav { display: flex; align-items: center; gap: clamp(20px, 3.3vw, 48px); }
.site-nav a, .site-footer nav a { font-weight: 600; font-size: .94rem; text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-footer nav a:hover, .site-nav a[aria-current] { text-decoration: underline; }
.header-cta { justify-self: end; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .69rem 1.43rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color .17s ease, border-color .17s ease;
}
.button-lime { color: var(--pine); background: var(--lime); }
.button-lime:hover { color: var(--pine); background: var(--lime-hover); }
.button-pine { color: var(--paper); background: var(--pine); }
.button-pine:hover { color: white; background: #2a4737; }
.header-cta { min-height: 43px; font-size: .91rem; padding: .49rem 1.14rem; }
.text-link { font-weight: 700; }
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem 1.5rem; }
.hero {
  display: grid;
  grid-template-columns: .93fr 1.07fr;
  align-items: center;
  gap: clamp(28px, 3.4vw, 52px);
  padding: clamp(35px, 4.1vw, 61px) 0 clamp(46px, 4.4vw, 69px);
}
.hero-image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  object-fit: cover;
  background: #c4c29c;
}
.eyebrow, .kicker {
  color: var(--olive);
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.1rem; }
.eyebrow::before { display: block; content: ""; width: 24px; height: 2px; background: #82904a; }
.hero h1 { font-size: clamp(3.7rem, 7.45vw, 7.1rem); line-height: .9; }
.hero h1 em { display: block; color: #304a38; font-weight: 400; }
.lead { color: var(--muted); font-size: clamp(1.04rem, 1.47vw, 1.2rem); line-height: 1.53; }
.hero .lead { max-width: 31rem; margin-top: 1.42rem; }
.hero .action-row { margin-top: 1.8rem; }

.band { border-top: 1px solid var(--edge); padding: 31px 0 40px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .8rem 1.5rem; margin-bottom: 21px; }
.section-heading h2 { font-size: clamp(2.5rem, 4.6vw, 4.1rem); }
.section-heading p { color: var(--muted); font-size: .94rem; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tool-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 22px;
  padding: clamp(18px, 2.1vw, 30px);
  color: var(--pine);
  border: 1px solid #dfdfcc;
  border-radius: 17px;
  background: var(--cream);
  text-decoration: none;
  transition: border-color .17s ease, background-color .17s ease;
}
.tool-card:hover { border-color: #9da887; background: #eae9d7; color: var(--pine); }
.tool-card:hover strong { text-decoration: underline; text-underline-offset: .14em; }
.tool-icon { display: grid; place-items: center; width: 61px; height: 61px; background: #e1e8ca; border-radius: 14px; }
.tool-icon img { width: 43px; height: 43px; object-fit: contain; }
.tool-card strong { display: block; margin-bottom: 5px; font: 400 clamp(2rem, 3vw, 2.6rem)/1 var(--serif); }
.tool-card strong + span { display: block; color: var(--muted); font-size: .95rem; line-height: 1.45; }

.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.guide-card { min-width: 0; }
.guide-card a { display: block; text-decoration: none; }
.guide-card a:hover .guide-title { text-decoration: underline; text-underline-offset: .13em; }
.guide-card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; background: var(--cream); }
.guide-card .kicker { margin: 1rem 0 .52rem; }
.guide-card .guide-title { font-size: clamp(1.8rem, 2.7vw, 2.48rem); letter-spacing: normal; text-wrap: balance; }
.guide-title + p { margin-top: .52rem; color: var(--muted); font-size: .96rem; }
.guide-list .guide-card { padding-top: 1rem; border-top: 1px solid var(--rule); }
.guide-list .guide-card p:first-child { margin-top: 0; }
.guide-list img { margin-bottom: 1.2rem; }
.site-footer { margin-top: clamp(40px, 7vw, 90px); background: var(--cream); border-top: 1px solid #d9dcc7; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.6rem; padding-block: 31px; }
.footer-brand { font-size: 29px; }
.footer-inner p { margin-top: .24rem; color: var(--muted); font-size: .88rem; }
.site-footer nav { flex-wrap: wrap; gap: .7rem 1.85rem; }

.page-head { max-width: 820px; padding: clamp(37px, 5.5vw, 75px) 0 35px; }
.page-head > .kicker { margin-bottom: .8rem; }
.page-head h1 { font-size: clamp(3.25rem, 6.5vw, 6.15rem); text-wrap: balance; }
.page-head .lead { margin-top: 1rem; max-width: 39rem; }
.page-head + .tool-grid, .page-head + .guide-grid { margin-bottom: 42px; }
.crumbs { margin: 0 0 1.15rem; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; padding: 0; list-style: none; font-size: .89rem; }
.crumbs li + li::before { margin-right: .5rem; color: var(--muted); content: "/"; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.byline { color: var(--muted); font-size: .92rem; }
.page-head .byline { margin-top: 1.2rem; }
.article-shell .page-head { padding-bottom: 27px; }
.article-image { max-width: 900px; margin-bottom: 2.2rem; }
.article-image img { width: 100%; height: auto; max-height: 385px; object-fit: cover; border-radius: 21px; }
.article-content { max-width: 720px; }
.article-shell .band { margin-top: 43px; }
.two-guides { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 850px; }
.resource-section { margin-top: 42px; }
.prose { max-width: 720px; font-size: 1.065rem; line-height: 1.7; }
.prose h2 { margin: 2.1rem 0 .62rem; font-size: clamp(2rem, 4vw, 3rem); text-wrap: balance; }
.prose h2:first-child { margin-top: 0; }
.prose p + p { margin-top: .88rem; }
.prose ol, .prose ul { margin: .7rem 0 1rem; padding-left: 1.55rem; }
.prose li + li { margin-top: .4rem; }
.prose li::marker { color: var(--olive); font-weight: 700; }
.prose code, .prose pre, .timing-preview { font-family: var(--mono); font-size: .86em; }
.prose p code, .prose li code { padding: .08em .28em; background: var(--cream); border-radius: 4px; }
.prose pre, .timing-preview {
  max-width: 100%;
  margin: .9rem 0 1.1rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-radius: 11px;
  padding: .95rem 1.12rem;
  background: var(--pine);
  color: var(--paper);
  line-height: 1.6;
}
.prose pre code { font-size: 1em; }
.callout { padding: 1rem 1.3rem; background: #edf0dc; border-radius: 0 11px 11px 0; border-left: 4px solid #84964a; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2rem 0 1.6rem; text-align: left; line-height: 1.42; font-size: .92rem; }
.prose caption { color: var(--muted); font-weight: 700; text-align: left; margin-bottom: .6rem; }
.prose td, .prose th { padding: .65rem .64rem; vertical-align: top; border-bottom: 1px solid var(--rule); }
.prose thead th { background: var(--cream); }
.prose tbody th { font-weight: 600; }
.prose .source-note { margin-top: 1.4rem; font-size: .93rem; }
.example-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: 1rem 0; }
.example-pair figcaption { font-size: .83rem; font-weight: 700; }
.example-pair pre { margin: .3rem 0; }
.contact-address { font-size: 1.22rem; overflow-wrap: anywhere; }

.tool-title > .tool-icon { width: 50px; height: 50px; margin-bottom: .65rem; }
.tool-title .tool-icon img { width: 36px; height: 36px; }
.workbench { display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 34px); align-items: start; }
.tool-form, .report {
  padding: clamp(17px, 3.1vw, 34px);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 20px;
}
.tool-aside { padding: clamp(16px, 2.6vw, 26px); background: var(--cream); border-radius: 17px; font-size: .96rem; }
.tool-aside h2 { font-size: clamp(2rem, 3.3vw, 2.8rem); }
.tool-aside > a:last-child { display: inline-block; margin-top: .95rem; }
.tool-form label, legend { color: var(--pine); font-size: .91rem; font-weight: 700; }
.input-row, .field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.input-row { grid-template-columns: minmax(0, 1.24fr) minmax(0, 1fr); }
.tool-form input:not([type="checkbox"]), .tool-form select, .tool-form textarea {
  display: block;
  max-width: 100%;
  width: 100%;
  min-height: 44px;
  margin-top: .4rem;
  padding: .5rem .65rem;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: white;
  color: var(--pine);
  font-weight: 400;
}
.tool-form input[type="file"] { padding: .38rem .45rem; }
.tool-form input[type="file"]::file-selector-button { padding: .18rem .42rem; border: 0; border-radius: 4px; background: #eceddf; color: var(--pine); cursor: pointer; }
.tool-form textarea { min-height: 185px; padding: .85rem; resize: vertical; font: 400 .93rem/1.5 var(--mono); }
.field-hint { margin-top: .46rem; color: var(--muted); font-size: .86rem; }
.editor-label { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem .7rem; margin-top: 1.1rem; }
.plain-button { padding: .25rem 0; background: none; border: 0; color: var(--pine); font-size: .91rem; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }
.plain-button:hover { color: var(--olive); }
.setting-group { margin: 1.3rem 0 1.15rem; padding: .65rem .85rem .85rem; border: 1px solid var(--rule); border-radius: 9px; min-inline-size: 0; }
.setting-group legend { padding-inline: .38rem; }
.offset-settings { margin: 1rem 0 1.15rem; }
.tool-form #offset { max-width: 15rem; }
.check-label { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; margin-top: .9rem; }
.check-label input { flex: none; width: 1rem; height: 1rem; margin: .25rem 0 0; accent-color: var(--pine); }
.report { margin-top: 13px; }
.report[data-status="success"] { border-color: #8da359; }
.report[data-status="warning"], .report[data-status="error"] { border-color: #ba8a68; }
.report h2 { font-size: clamp(2.1rem, 4vw, 3.21rem); margin-bottom: .75rem; }
.report h2:focus { outline: none; }
.report p + p { margin-top: .45rem; }
.report .button { margin-top: .6rem; }
.report-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: 0 0 1rem; }
.report-stats div { padding: .55rem .6rem; background: var(--cream); border-radius: 9px; text-align: center; }
.report-stats dt { font-size: .77rem; }
.report-stats dd { margin: 0; font-weight: 700; font-size: 1.2rem; }
.issues { display: grid; gap: .5rem; padding-left: 0; list-style: none; }
.issue { border-top: 1px solid var(--rule); padding: .65rem 0 .1rem; font-size: .93rem; }
.issue strong { color: var(--pine); }
.issue span:last-child { display: block; margin-top: .15rem; }
.issue-kind { display: inline-block; margin-right: .5rem; color: #634422; font-weight: 700; }
.issue[data-level="error"] .issue-kind { color: #84322a; }
.muted { color: var(--muted); }

@media (max-width: 1020px) {
  .shell { width: calc(100% - 64px); }
  .site-nav { gap: 24px; }
  .tool-card { gap: 15px; }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { grid-template-columns: auto 1fr; min-height: 68px; gap: 16px; }
  .brand { font-size: 28px; gap: 6px; }
  .brand img { width: 33px; height: 33px; }
  .site-nav { justify-content: flex-end; gap: clamp(12px, 3vw, 20px); }
  .site-nav a { font-size: .87rem; }
  .header-cta { display: none; }
  .hero { grid-template-columns: 1fr; gap: 1.8rem; padding-block: 32px 39px; }
  .hero h1 { font-size: clamp(3.8rem, 11.7vw, 6.3rem); }
  .hero .lead { margin-top: 1rem; }
  .hero .action-row { margin-top: 1.32rem; }
  .hero-image { max-height: 460px; border-radius: 17px; }
  .band { padding-block: 24px 32px; }
  .section-heading { gap: .5rem 1rem; margin-bottom: 16px; }
  .section-heading p { font-size: .87rem; }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px 13px; }
  .guide-grid:not(.guide-list) .guide-card:first-child { grid-column: 1 / -1; }
  .guide-grid:not(.guide-list) .guide-card:first-child img { aspect-ratio: 2 / 1; }
  .guide-card .guide-title { text-wrap: initial; }
  .guide-title + p { font-size: .89rem; }
  .workbench { grid-template-columns: 1fr; }
  .article-image { margin-bottom: 1.4rem; }
  .site-footer { margin-top: 38px; }
}

@media (max-width: 530px) {
  .tool-grid { grid-template-columns: 1fr; gap: 10px; }
  .tool-card { padding: 15px; }
  .tool-icon { width: 51px; height: 51px; }
  .tool-icon img { width: 35px; height: 35px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .page-head { padding-block: 32px 25px; }
  .prose td, .prose th { padding: .52rem .35rem; font-size: .86rem; }
  .input-row { grid-template-columns: 1fr; gap: .5rem; }
}

@media (max-width: 365px) {
  .header-inner { grid-template-columns: 1fr; gap: 4px; padding-block: .55rem; }
  .site-nav { justify-content: flex-start; }
  .hero h1 { font-size: 3.5rem; }
  .guide-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
