:root {
  color-scheme: light;
  --ink: #18231f;
  --muted: #52605a;
  --paper: #f7f5ef;
  --card: #fff;
  --forest: #1f5a44;
  --forest-dark: #153e30;
  --mint: #d8eee3;
  --amber: #e3a53f;
  --border: #cad4ce;
  --display: Georgia, Cambria, "Times New Roman", serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 12px 36px rgb(24 35 31 / 9%);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--body); font-size: 1rem; line-height: 1.7; }
a { color: var(--forest); text-underline-offset: .2em; }
a:hover { color: var(--forest-dark); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.shell { width: min(1160px, calc(100% - 32px)); margin-inline: auto; }
.skip-link { position: fixed; inset: 8px auto auto 8px; z-index: 50; padding: 10px 14px; background: var(--ink); color: white; border-radius: var(--radius-sm); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; top: 0; z-index: 20; background: rgb(247 245 239 / 94%); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
.header-row { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--display); font-size: 1.15rem; font-weight: 700; text-decoration: none; }
.wordmark span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px 12px 4px; background: var(--forest); color: white; font-family: var(--body); font-size: .72rem; letter-spacing: .05em; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-header nav a { color: var(--ink); font-size: .92rem; font-weight: 650; text-decoration: none; }
.mobile-menu { display: none; position: static; }
.mobile-menu > summary { min-height: 48px; padding: 11px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-weight: 750; list-style: none; }
.mobile-menu > summary::-webkit-details-marker { display: none; }
.directory-taxonomy { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--border); }
.directory-taxonomy a { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 7px 12px; color: var(--ink); border-right: 1px solid var(--border); font-size: .78rem; font-weight: 750; line-height: 1.2; text-decoration: none; }
.directory-taxonomy a:first-child { border-left: 1px solid var(--border); }
.directory-taxonomy a:hover { color: var(--forest); background: var(--mint); }
.directory-taxonomy span { color: var(--forest); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .68rem; }

.article-hero { padding-block: clamp(64px, 9vw, 112px) 48px; }
.home-hero { max-width: 1000px; }
.kicker { margin: 0 0 12px; color: var(--forest); font-size: .77rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; text-wrap: balance; }
h1 { max-width: 950px; margin: 0; font-size: clamp(2.65rem, 7vw, 5.6rem); letter-spacing: -.045em; }
h2 { margin: 2.5em 0 .65em; font-size: clamp(1.7rem, 3.5vw, 2.6rem); letter-spacing: -.025em; }
.dek { max-width: 820px; margin: 24px 0; color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.35rem); }
.review-line { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 20px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--border); }
.article-grid { display: grid; grid-template-columns: minmax(0, 760px) minmax(200px, 1fr); align-items: start; gap: 56px; padding-bottom: 96px; }
.article-body { min-width: 0; }
.article-body.wide { max-width: 960px; padding-bottom: 96px; }
.article-body p, .prose p { max-width: 74ch; }
.record-card { position: sticky; top: 104px; padding: 24px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.record-card strong { font-family: var(--display); font-size: 1.5rem; }
.record-card dl { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 0; }
.record-card dt { color: var(--muted); }
.record-card dd { margin: 0; text-align: right; }

.table-scroll { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
table { width: 100%; min-width: 680px; border-collapse: collapse; }
caption { padding: 16px 20px; color: var(--muted); text-align: left; font-size: .9rem; }
th, td { padding: 16px 20px; border-top: 1px solid var(--border); text-align: left; vertical-align: top; }
thead th { background: var(--forest); color: white; border-top: 0; }
tbody th { width: 25%; background: #f0f4f1; }

figure { margin: 48px 0; }
figcaption { margin-top: 14px; color: var(--muted); font-size: .9rem; }
.boundary-map > div, .layer-figure, .decision-map { display: grid; gap: 12px; }
.boundary-map > div { grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; padding: 24px; background: var(--mint); border-radius: var(--radius-lg); }
.boundary-map span { padding: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); text-align: center; font-weight: 700; }
.decision-map { grid-template-columns: repeat(3, 1fr); padding: 24px; background: var(--ink); color: white; border-radius: var(--radius-lg); }
.decision-map > div { display: grid; gap: 10px; padding: 20px; background: rgb(255 255 255 / 8%); border-radius: var(--radius); }
.decision-map span { color: #dce7e1; }
.decision-map figcaption { grid-column: 1 / -1; color: #dce7e1; }
.layer-figure { grid-template-columns: repeat(4, 1fr); }
.layer-figure > div { display: grid; gap: 8px; min-height: 130px; padding: 20px; background: var(--card); border-top: 5px solid var(--forest); border-radius: var(--radius); box-shadow: var(--shadow); }
.layer-figure figcaption { grid-column: 1 / -1; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cards a { display: block; padding: 24px; color: var(--ink); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; box-shadow: var(--shadow); }
.cards a:hover { border-color: var(--forest); transform: translateY(-2px); }
.cards span { color: var(--forest); font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cards strong { display: block; margin: 10px 0; font-family: var(--display); font-size: 1.35rem; line-height: 1.2; }
.section-heading { margin-block: 56px 22px; }
.section-heading h2 { margin: 0 0 10px; }
.section-heading > p:last-child { max-width: 68ch; color: var(--muted); }
.featured-collections { margin-block: 72px; }
.featured-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.featured-record { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; min-height: 210px; padding: 26px; color: var(--ink); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; }
.featured-record::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--forest); border-radius: var(--radius) 0 0 var(--radius); }
.featured-record > span { color: var(--forest); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.featured-record strong { grid-column: 1 / -1; font-family: var(--display); font-size: 1.5rem; line-height: 1.15; }
.featured-record p { grid-column: 1 / -1; margin: 0; color: var(--muted); }
.featured-record small { grid-column: 2; grid-row: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.directory-shelf { margin-block: 72px; padding-top: 24px; border-top: 3px solid var(--ink); }
.shelf-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 22px; }
.shelf-heading h2 { margin: 0 0 8px; }
.shelf-heading p { max-width: 66ch; margin-bottom: 0; color: var(--muted); }
.shelf-heading > a { flex: 0 0 auto; padding: 9px 13px; border: 1px solid var(--forest); border-radius: var(--radius-sm); font-weight: 750; text-decoration: none; }
.shelf-records { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.shelf-records a { display: grid; gap: 7px; min-height: 168px; padding: 22px; color: var(--ink); background: var(--card); border-bottom: 1px solid var(--border); text-decoration: none; }
.shelf-records a:nth-child(odd) { border-right: 1px solid var(--border); }
.shelf-records a:nth-last-child(-n + 2) { border-bottom: 0; }
.shelf-records span, .record-type { color: var(--forest); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.shelf-records strong { font-family: var(--display); font-size: 1.2rem; line-height: 1.2; }
.shelf-records small { color: var(--muted); line-height: 1.45; }
.directory-browse { display: flex; flex-wrap: wrap; gap: 8px; padding: 22px; background: var(--mint); border: 1px solid #a9cdbb; border-radius: var(--radius); }
.directory-browse .kicker { flex-basis: 100%; }
.directory-browse a { padding: 7px 11px; color: var(--ink); background: var(--card); border: 1px solid var(--border); border-radius: 999px; font-size: .82rem; font-weight: 700; line-height: 1.35; text-decoration: none; }
.record-grid { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.record-listing { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; min-height: 230px; padding: 24px; color: var(--ink); background: var(--card); border-bottom: 1px solid var(--border); text-decoration: none; }
.record-listing:nth-child(odd) { border-right: 1px solid var(--border); }
.record-listing strong, .record-listing p, .record-listing small { grid-column: 1 / -1; }
.record-listing strong { font-family: var(--display); font-size: 1.25rem; line-height: 1.2; }
.record-listing p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.55; }
.record-listing small { align-self: end; color: var(--forest); font-weight: 750; }
.record-number { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; }
.comparison-paths { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-block: 48px; padding: 24px; background: var(--ink); border-radius: var(--radius); }
.comparison-paths .kicker { grid-column: 1 / -1; color: #b7dec9; }
.comparison-paths a { padding: 12px 14px; color: white; border: 1px solid rgb(255 255 255 / 26%); border-radius: var(--radius-sm); text-decoration: none; }
.profile-facts { padding-top: 2px; }
.commercial-note { margin: 56px 0; padding: clamp(24px, 5vw, 44px); background: var(--mint); border: 1px solid #a9cdbb; border-radius: var(--radius-lg); }
.commercial-note h2 { margin-top: 0; }
.button { display: inline-block; padding: 12px 18px; color: white; background: var(--forest); border-radius: var(--radius-sm); font-weight: 750; text-decoration: none; }
.sources-block { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--border); }
.sources-block li { margin-bottom: 12px; }
.related { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 40px; }
.related h2 { flex-basis: 100%; margin: 0; }
.prose { max-width: 820px; padding-block: 72px 96px; }

.site-footer { padding-block: 56px 28px; color: #dce7e1; background: var(--ink); }
.footer-grid { display: flex; justify-content: space-between; gap: 40px; }
.footer-grid p { max-width: 480px; }
.footer-grid nav { display: flex; flex-wrap: wrap; align-content: start; gap: 10px 18px; }
.site-footer a { color: white; }
.legal-line { padding-top: 24px; border-top: 1px solid rgb(255 255 255 / 18%); font-size: .9rem; }

@media (max-width: 850px) {
  body { font-size: 1rem; }
  .article-body, .prose { font-size: 1rem; }
  .site-header { position: sticky; }
  .header-row { min-height: 68px; flex-wrap: wrap; gap: 10px 16px; padding-block: 10px; }
  .desktop-nav { display: none !important; }
  .mobile-menu { display: block; position: static; margin-left: auto; }
  .mobile-menu[open] { flex-basis: 100%; margin-left: 0; padding-top: 8px; border-top: 1px solid var(--border); }
  .mobile-menu[open] > summary { width: max-content; margin-left: auto; }
  .mobile-menu nav { display: grid; gap: 0; width: 100%; padding-top: 8px; }
  .mobile-menu nav a { display: flex; align-items: center; min-height: 48px; padding: 10px 4px; border-top: 1px solid var(--border); font-size: 1rem; }
  .directory-taxonomy { display: flex; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .directory-taxonomy a { flex: 0 0 auto; white-space: nowrap; }
  .footer-grid { align-items: flex-start; flex-direction: column; padding-block: 14px; }
  .article-grid { grid-template-columns: 1fr; }
  .record-card { position: static; order: -1; }
  .cards, .decision-map, .layer-figure { grid-template-columns: 1fr; }
  .featured-grid, .shelf-records, .record-grid, .comparison-paths { grid-template-columns: 1fr; }
  .shelf-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .shelf-records a, .shelf-records a:nth-child(odd), .shelf-records a:nth-last-child(-n + 2), .record-listing, .record-listing:nth-child(odd) { border-right: 0; border-bottom: 1px solid var(--border); }
  .shelf-records a:last-child, .record-listing:last-child { border-bottom: 0; }
  .decision-map figcaption, .layer-figure figcaption { grid-column: auto; }
  .boundary-map > div { grid-template-columns: 1fr; }
  .boundary-map b { transform: rotate(90deg); text-align: center; }
}

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

/* support-sites:related-reading:start */
.related-reading{width:min(68rem,calc(100% - 2.5rem));margin:clamp(2rem,6vw,4rem) auto;padding:1.4rem 0;border-block:1px solid currentColor}
.related-reading-label{margin:0 0 .75rem;font-size:.78rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
.related-reading ul{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;margin:0;padding:0;list-style:none}
.related-reading a{display:block;height:100%;padding:.85rem;border:1px solid currentColor;text-decoration:none}
.related-reading a:hover{text-decoration:underline}
@media(max-width:720px){.related-reading ul{grid-template-columns:1fr}}
/* support-sites:related-reading:end */

.app-screenshot { margin: 2rem 0; border: 1px solid var(--rule, #ddd); border-radius: 8px; overflow: hidden; }
.app-screenshot img { width: 100%; height: auto; display: block; }
.app-screenshot figcaption { padding: 0.75rem 1rem; background: var(--paper-raised, #f5f5f5); font-size: 0.85rem; color: var(--ink-soft, #666); }
