/* Methods.info — site stylesheet
   Palette "Pine and saffron": pine #12261E, emerald #0F7B5F, saffron #F4B942, mint cream #D8F0E3
   Roles:   pine = text and footer, emerald = links and step numbers,
            saffron = rules and markers, mint cream = banner, tags and (lightened) highlight tint */

@font-face { font-family: "Zilla Slab"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/zilla-slab-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Zilla Slab"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/zilla-slab-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url("../fonts/source-sans-3-latin-wght-italic.woff2") format("woff2"); }

:root {
  --ink: #12261E;
  --ink-soft: #46584f;
  --link: #0F7B5F;
  --accent: #F4B942;
  --field: #D8F0E3;
  --tint: #ecf8f1;
  --paper: #ffffff;
  --rule: rgba(18, 38, 30, .2);
  --display: "Zilla Slab", Rockwell, "Roboto Slab", Georgia, serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wide: 70rem;
  --measure: 43rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.15; margin: 0; }
h1 { font-weight: 700; font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem); letter-spacing: -.01em; }
h2 { font-weight: 600; font-size: 1.55rem; }
h3 { font-weight: 600; font-size: 1.15rem; }
p { margin: 0 0 1rem; }
sub, sup { line-height: 0; }

.wrap { width: min(100% - 2.5rem, var(--wide)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

/* ---------- header ---------- */
.site-header { border-bottom: 4px solid var(--accent); background: var(--paper); }
.header-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 2rem; padding: 1.1rem 0 .9rem; }
.brand { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .7rem; text-decoration: none; color: var(--ink); }
.brand-name { font: 700 1.75rem/1 var(--display); letter-spacing: -.01em; }
.brand-tag { font-style: italic; font-size: 1rem; color: var(--link); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: .1rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: .3rem 0 .2rem; color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--accent); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }

/* ---------- home: banner ---------- */
.hero { background: var(--field); }
.hero-row { display: flex; align-items: center; gap: 1.1rem; padding: .85rem 0; }
.hero-art { flex: none; width: 2.1rem; transform: rotate(-6deg); }
.hero-quote { margin: 0; }
.hero-quote p { display: inline; font: 600 1.2rem/1.3 var(--display); margin: 0; }
.hero-quote footer { display: inline; font-style: italic; margin-left: .5rem; white-space: nowrap; }

/* ---------- home: sections ---------- */
.section { padding: 2.25rem 0 1.5rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; margin-bottom: 1.5rem; }
.section-head p { margin: 0; color: var(--ink-soft); }
.index { columns: 3 16rem; column-gap: 2.5rem; }
.index-group { break-inside: avoid; border-top: 3px solid var(--accent); padding: .75rem 0 1.5rem; }
.index-group h3 { margin-bottom: .45rem; }
.index-group ul { list-style: none; margin: 0; padding: 0; }
.index-group li { margin: .3rem 0; line-height: 1.4; }
.index-group a { text-decoration: none; }
.index-group a:hover { text-decoration: underline; }
.filetype { font-size: .8rem; font-weight: 600; color: var(--ink-soft); border: 1px solid var(--rule); border-radius: 3px; padding: 0 .3rem; margin-left: .25rem; white-space: nowrap; }

.band { background: var(--tint); padding: 2.75rem 0 1.75rem; margin-top: 1.5rem; }
.band a { color: var(--ink); }
.more { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .5rem 2.5rem; }
.more-item { padding-bottom: 1rem; }
.more-item h3 { margin-bottom: .2rem; }
.more-item p { margin: 0; color: var(--ink-soft); }

.course { border: 1px solid var(--rule); border-radius: 6px; padding: 1.5rem 1.6rem .9rem; margin: 3rem 0; }
.course h2 { font-size: 1.3rem; margin-bottom: .9rem; }
.course dl { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .35rem 1rem; margin: 0; }
.course dt { font-weight: 600; }
.course dd { margin: 0 0 .5rem; display: flex; flex-wrap: wrap; gap: .2rem 1rem; }
.course dd a { white-space: nowrap; }

/* ---------- article (protocol pages) ---------- */
.crumbs { font-size: .95rem; color: var(--ink-soft); padding: 1.4rem 0 0; }
.crumbs a { color: var(--ink-soft); }
.crumbs .sep { padding: 0 .35rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, var(--measure)) minmax(0, 1fr); gap: 0 4rem; align-items: start; }
.article { max-width: var(--measure); padding: 1.5rem 0 3rem; }
.article h2 { scroll-margin-top: 4rem; }
.toc { position: sticky; top: 4rem; margin-top: 5.6rem; padding-left: 1.25rem; border-left: 3px solid var(--accent); font-size: .98rem; max-width: 17rem; justify-self: end; width: 100%; }
.toc h2 { font-size: 1.05rem; margin-bottom: .5rem; }
.toc ul { list-style: none; margin: 0 0 .9rem; padding: 0; }
.toc li { margin: .35rem 0; line-height: 1.35; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.toc p { margin: 0; }
.article h1 { margin-bottom: .75rem; }
.article h2 { margin: 2.5rem 0 .8rem; padding-top: .9rem; border-top: 3px solid var(--accent); }
.byline { color: var(--ink-soft); font-size: .98rem; margin-bottom: 1.75rem; }
.byline a { color: var(--ink-soft); }
.lede { font-size: 1.15rem; }

.note { background: var(--tint); border-left: 4px solid var(--accent); padding: .9rem 1.1rem; margin: 1.5rem 0; }
.note p { margin: 0; }
.note a { color: var(--ink); }
.note strong { font-weight: 700; }

.steps { list-style: none; counter-reset: step; margin: 1.25rem 0 1.5rem; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: .15rem 0 .9rem 3rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--link); color: #fff; font: 700 1.05rem/2rem var(--display); text-align: center;
}

.table-scroll { overflow-x: auto; margin: 1rem 0 1.5rem; }
table.data { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
table.data caption { text-align: left; color: var(--ink-soft); font-size: .95rem; padding-bottom: .4rem; }
table.data th, table.data td { text-align: left; padding: .5rem .9rem; vertical-align: top; }
table.data thead th { font-weight: 600; border-bottom: 2px solid var(--ink); white-space: nowrap; }
table.data tbody th { font-weight: 400; }
table.data tbody tr > * { border-bottom: 1px solid var(--rule); }
table.data tr.fresh > * { background: var(--tint); }
table.data tr.fresh > :first-child { box-shadow: inset 4px 0 0 var(--accent); }
table.narrow { max-width: 31rem; }
.tag { display: inline-block; font-size: .8rem; font-weight: 600; line-height: 1.5; background: var(--field); color: var(--ink); padding: 0 .45rem; border-radius: 3px; margin-left: .4rem; white-space: nowrap; }

.article-foot { border-top: 1px solid var(--rule); margin-top: 2.5rem; padding-top: 1.1rem; display: flex; flex-wrap: wrap; gap: .4rem 2rem; justify-content: space-between; }

/* ---------- section pages, reviews, search ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.page-head { padding: 2.25rem 0 1.5rem; }
.page-head h1 { margin-bottom: .6rem; }
.page-head p { margin: 0; color: var(--ink-soft); max-width: var(--measure); }
.index.wide { columns: 2 22rem; }
.index-group h2 { font-size: 1.15rem; margin-bottom: .45rem; }
.index.wide .index-group li { margin: .55rem 0; }
main > .index { padding-bottom: 2rem; }

.article h3 { margin: 1.7rem 0 .5rem; }
.article ul { padding-left: 1.25rem; }
.article li { margin: .3rem 0; }
.article.plain h2 { border-top: 0; padding-top: 0; margin: 1.9rem 0 .4rem; font-size: 1.2rem; }
.article ol.refs { padding-left: 1.9rem; font-size: .97rem; }
.article ol.refs li { margin: .4rem 0; }
.article .steps li > ul, .article .steps li > ol { margin: .4rem 0 0; }
.figure { margin: 1.4rem 0; }
.figures { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: flex-start; margin: 1.4rem 0; }
.figures > div { max-width: 100%; }
.figures p { margin: .35rem 0 0; font-size: .95rem; color: var(--ink-soft); }
.article img { display: block; }
.article a.thumb { display: inline-block; }
.article a.thumb img { border: 1px solid var(--rule); }
table.spec { max-width: none; }
table.spec th { width: 11.5rem; font-weight: 600; }
table.spec ul { margin: 0; padding-left: 1.1rem; }
.pros, .cons { border-left: 4px solid var(--accent); background: var(--tint); padding: .8rem 1.1rem .5rem; margin: 1.1rem 0; }
.cons { background: none; border: 1px solid var(--rule); border-left: 4px solid var(--ink-soft); }
.pros h3, .cons h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.pros ul, .cons ul { margin: 0 0 .4rem; }

.search-form { display: flex; gap: .6rem; max-width: 36rem; margin: 0 0 1rem; }
.search-form input { flex: 1; min-width: 0; font: inherit; color: var(--ink); padding: .6rem .8rem; border: 1px solid var(--ink-soft); border-radius: 4px; background: #fff; }
.search-form input:focus-visible { outline: 3px solid var(--link); outline-offset: 1px; }
.search-form button { font: inherit; font-weight: 600; background: var(--ink); color: #fff; border: 0; border-radius: 4px; padding: .6rem 1.2rem; cursor: pointer; }
.search-status { color: var(--ink-soft); min-height: 1.6em; }
.results { list-style: none; margin: 0 0 3rem; padding: 0; max-width: var(--measure); }
.results li { border-top: 1px solid var(--rule); padding: .9rem 0; }
.results a { font: 600 1.15rem/1.3 var(--display); }
.results .where { margin-left: .6rem; font-size: .9rem; color: var(--ink-soft); }
.results p { margin: .3rem 0 0; font-size: .98rem; }
mark { background: var(--field); color: inherit; padding: 0 .1em; }

.todo { background: #ffe27a; color: #000; padding: 0 .25em; outline: 1px dashed #9a5b00; }
.article.plain section + section { margin-top: 3rem; padding-top: .5rem; border-top: 3px solid var(--accent); }
.article.plain h3 { font-size: 1.05rem; margin: 1.4rem 0 .3rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #eef2ee; margin-top: 2rem; padding: 1.75rem 0; font-size: .98rem; }
.footer-row { display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--field); }
.site-footer a:hover { color: #fff; }
.site-footer a:focus-visible { outline-color: var(--field); }
.site-footer ul { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; list-style: none; margin: 0; padding: 0; }

/* ---------- small screens ---------- */
@media (max-width: 62rem) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 46rem) {
  body { font-size: 1rem; }
  .hero-quote p { font-size: 1.05rem; }
  .course dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .course dd { margin-bottom: .9rem; }
  .steps li { padding-left: 2.6rem; }
  table.data th, table.data td { padding: .45rem .5rem; }
  table.data { font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- print: protocols for the bench ---------- */
@media print {
  .site-header nav, .site-footer, .crumbs, .article-foot, .toc, .skip { display: none; }
  .article-layout { display: block; }
  .site-header { border-bottom: 1px solid #000; }
  body { font-size: 11pt; color: #000; }
  a { color: #000; text-decoration: none; }
  .article { max-width: none; padding-top: .5rem; }
  .note, table.data tr.fresh > * { background: none; }
  .note { border: 1px solid #000; border-left-width: 4px; }
  .steps li::before { background: none; border: 1px solid #000; line-height: calc(2rem - 2px); }
  .steps li, table.data tr { break-inside: avoid; }
}
