/* The site's one stylesheet. Until 2026-11-12 it sat on top of Pico CSS
   (v2.1.1, archived upstream); this file now carries the parts of Pico the
   site actually used, written out, so the whole look is readable here.
   Sections, in order: fonts, colors and sizes, base elements (what Pico
   used to do), the admin pages, then the site's own rules. */

/* ---- Fonts ---- */

@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: italic; font-weight: 400; font-display: swap; src: url(/static/fonts/ibm-plex-mono-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/ibm-plex-mono-latin-700-normal.woff2) format('woff2'); }

/* ---- Colors and sizes ----
   Every color lives here, once for light mode and once for dark. The grays
   are Pico's (some have half-step values like 239.5; browsers accept them,
   and keeping them exact keeps the look exact).

   One green: P1 phosphor, the green of IBM green-screen terminals (#33ff33,
   the same hue as logo.png and favicon.ico). The logo uses it in both modes,
   and dark mode uses it for links and buttons too. On white it's too faint
   to read (1.4:1), so light-mode links use the same hue darkened: #007a00
   is 5.5:1 on white, #006800 (hover) is 7:1. */
:root {
  --font: 'IBM Plex Mono', ui-monospace, monospace;
  --line-height: 1.6;
  --radius: 3px;
  --nav-gap: 0.5rem;            /* space on each side of a header item */
  --phosphor: #33ff33;

  color-scheme: light;
  --bg: #fff;
  --text: #373c44;
  --muted: #646b79;             /* small print, the tagline, captions */
  --rule: rgb(231, 234, 239.5); /* thin lines between things */
  --panel: rgb(251, 251.5, 252.25); /* the faint boxes: contact ways, notices, answers */
  --contrast: #181c25;          /* the logo's dark squares and the brand */
  --h1: #2d3138;
  --h2: #373c44;
  --h3: #424751;
  --red: rgb(136, 56.5, 53);    /* errors and the required-field star */
  --selection: rgba(0, 122, 0, 0.2);  /* selected text: a tint of the link green */
  --link: #007a00;
  --link-underline: rgba(0, 122, 0, 0.5);
  --link-hover: #006800;
  --focus: rgba(0, 122, 0, 0.4); /* the ring around a focused link or button */
  --button: #007a00;
  --button-hover: #006800;
  --button-text: #fff;
  --field: rgb(251, 251.5, 252.25);
  --field-focus: #fff;
  --field-border: #cfd5e2;
  --field-text: #23262c;
  --mark: rgb(252.5, 230.5, 191.5);
  --mark-text: #0f1114;
  --secondary: #5d6b89;
}
/* Dark mode follows the visitor's system setting. Phosphor on near-black
   (13:1). Buttons are green with dark text, like a lit terminal; hover
   lightens. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: rgb(19, 22.5, 30.5);
    --text: #c2c7d0;
    --muted: #7b8495;
    --rule: #202632;
    --panel: rgb(26, 30.5, 40.25);
    --contrast: #dfe3eb;
    --h1: #f0f1f3;
    --h2: #e0e3e7;
    --h3: #c2c7d0;
    --red: rgb(205.5, 126, 123);
    --selection: rgba(51, 255, 51, 0.25);
    --link: #33ff33;
    --link-underline: rgba(51, 255, 51, 0.5);
    --link-hover: #99ff99;
    --focus: rgba(51, 255, 51, 0.35);
    --button: #33ff33;
    --button-hover: #66ff66;
    --button-text: #13171f;
    --field: rgb(28, 33, 43.5);
    --field-focus: rgb(26, 30.5, 40.25);
    --field-border: #2a3140;
    --field-text: #e0e3e7;
    --mark: #014063;
    --mark-text: #fff;
    --secondary: #969eaf;
  }
}

/* ---- Base elements ----
   What Pico did for the elements this site uses, and nothing more. Most
   selectors here are plain element names, so the site's rules further down
   win without any tricks. */

*, ::before, ::after { box-sizing: border-box; background-repeat: no-repeat; }
::before, ::after { text-decoration: inherit; vertical-align: inherit; }
::selection { background-color: var(--selection); }

/* The root font size stays at the browser's 16px at every width. (Pico grew
   it in steps up to 20px on wide screens; this site has turned that off
   since the start, so there's nothing to scale.) */
:root {
  font-family: var(--font); font-size: 100%; font-weight: 400; line-height: var(--line-height);
  background-color: var(--bg); color: var(--text);
  text-underline-offset: 0.1rem; text-rendering: optimizeLegibility; overflow-wrap: break-word; tab-size: 4;
  -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
body { width: 100%; margin: 0; }
body > header, body > main, body > footer { padding-block: 1rem; }
.container { width: 100%; margin-inline: auto; }

/* Text blocks set their own color rather than inheriting it, so a muted
   container (the footer) still shows its paragraphs in the body color. */
p, ul, table, blockquote { margin-top: 0; margin-bottom: 1rem; color: var(--text); font-style: normal; font-weight: 400; }
ul li { list-style: square; margin-bottom: 0.25rem; }
section { margin-bottom: 1rem; }
strong { font-weight: bolder; }
h1, h2, h3 { margin-top: 0; margin-bottom: 1rem; font-weight: 700; }
h1 { color: var(--h1); line-height: 1.125; }
h2 { color: var(--h2); line-height: 1.15; }
h3 { color: var(--h3); font-size: 1.5rem; line-height: 1.175; }
/* A heading after text gets room above it. */
:where(blockquote, figure, form, p, table, ul) ~ h3 { margin-top: 2.25rem; }

img { max-width: 100%; height: auto; border-style: none; vertical-align: middle; }
svg { vertical-align: middle; }
:where(svg:not([fill])) { fill: currentColor; }
figure { display: block; margin: 0; padding: 0; }
blockquote { display: block; margin: 1rem 0; padding: 1rem; border-inline-start: 0.25rem solid var(--rule); }

table { width: 100%; border-collapse: collapse; border-spacing: 0; text-indent: 0; }
th, td { padding: 0.5rem 1rem; border-bottom: 1px solid var(--rule); background-color: var(--bg); color: var(--text); font-weight: 400; text-align: start; }
thead th { font-weight: 600; border-bottom-width: 3px; }

/* Links: green and underlined, the underline at half strength until the
   pointer is on it. The darker hover green also marks a link that has
   focus or is being clicked. Keyboard focus adds a soft green ring. */
a {
  background-color: transparent; color: var(--link); outline: 0;
  text-decoration: underline; text-decoration-color: var(--link-underline); text-underline-offset: 0.125em;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, text-decoration 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
/* :where() keeps this rule as weak as plain "a", so the header's "no
   underline" rule still decides the underline there. */
a:where(:hover, :active, :focus) { color: var(--link-hover); text-decoration-color: var(--link-hover); }
a:focus-visible { box-shadow: 0 0 0 2px var(--focus); }

/* The header's navigation: three lists (the brand, the place, the links)
   spread across one row, each item padded by --nav-gap, and the outer
   lists pulled out by the same amount so the edges line up with the page.
   The zero-width space before each item is Pico's; it keeps every item one
   line tall. */
nav { display: flex; justify-content: space-between; overflow: visible; }
nav ul { display: flex; align-items: center; margin-block: 0; padding: 0; list-style: none; }
nav ul:first-of-type { margin-left: calc(var(--nav-gap) * -1); }
nav ul:last-of-type { margin-right: calc(var(--nav-gap) * -1); }
nav li { display: inline-block; margin: 0; padding: 1rem var(--nav-gap); }
nav li::before { float: left; content: "\200B"; }
nav li a { display: inline-block; margin: -0.5rem; padding: 0.5rem; border-radius: var(--radius); }

/* Forms (Contact, and the admin pages). Fields are full width with a
   faint fill; focus brightens the fill and draws a green border and ring.
   Errors are shown in a notice above the form, not on the fields. */
label { display: block; margin-bottom: 0.375rem; color: var(--text); font-weight: 400; }
input, textarea, button { margin: 0; font-family: inherit; font-size: 1rem; line-height: var(--line-height); letter-spacing: inherit; }
input:not([type=checkbox]), textarea {
  width: 100%; margin-bottom: 1rem; padding: 0.75rem 1rem; appearance: none;
  border: 1px solid var(--field-border); border-radius: var(--radius); outline: 0;
  background-color: var(--field); color: var(--field-text); font-weight: 400; box-shadow: none;
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
/* One line of text, plus the padding and border. */
input:not([type=checkbox]) { height: calc(1rem * var(--line-height) + 1.5rem + 2px); overflow: visible; }
textarea { display: block; resize: vertical; overflow: auto; }
input:not([type=checkbox]):is(:focus, :active), textarea:is(:focus, :active) { background-color: var(--field-focus); border-color: var(--button); }
input:not([type=checkbox]):focus, textarea:focus { box-shadow: 0 0 0 1px var(--button); }
::placeholder { color: var(--muted); opacity: 1; }

/* Buttons: solid green, as wide as their label plus generous side padding
   (Sam, 2026-11-12; under Pico the Send button was full width); a little
   darker (lighter in dark mode) under the pointer or focus, with the focus
   ring. */
button {
  padding: 0.75rem 1rem; overflow: visible; text-transform: none; appearance: button;
  border: 1px solid var(--button); border-radius: var(--radius); outline: 0;
  background-color: var(--button); color: var(--button-text); box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  font-weight: 400; text-align: center; text-decoration: none; cursor: pointer; user-select: none;
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
button[type=submit] { margin-bottom: 1rem; padding-inline: 2rem; }
button:is(:hover, :active, :focus) { background-color: var(--button-hover); border-color: var(--button-hover); }
button:focus { box-shadow: 0 0 0 rgba(0, 0, 0, 0), 0 0 0 2px var(--focus); }

/* ---- Admin pages (/admin/...) ----
   Only Sam sees these. They need to work and look close to the rest; the
   browser draws the checkboxes and date pickers, in the site's green. */
input[type=checkbox] { width: 1.25em; height: 1.25em; margin: 0 0.5em 0 0; vertical-align: middle; accent-color: var(--button); }
label:has(> input[type=checkbox]) { cursor: pointer; }
fieldset { width: 100%; margin: 0 0 1rem; padding: 0; border: 0; }
mark { padding: 0.125rem 0.25rem; background-color: var(--mark); color: var(--mark-text); }
.grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 48rem) { .grid { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
/* The tabs under "Admin": links to the admin pages in a row, the current
   one bold with the site nav's thick underline. The list's spacing is the
   general nav rules' above. */
.tabs { justify-content: flex-start; margin-bottom: 1rem; border-bottom: 1px solid var(--rule); }
.tabs a { text-decoration: none; }
.tabs a[aria-current=page] { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.45em; }
/* Topics on the Shelburne Buddy page fold away until clicked. */
summary { margin-bottom: 1rem; font-weight: 700; cursor: pointer; }
button.secondary { --button: var(--secondary); --button-hover: var(--secondary); }
button.outline { background-color: transparent; color: var(--button); }
button.outline:is(:hover, :active, :focus) { background-color: transparent; color: var(--button-hover); }

/* ---- The site ---- */

body { display: flex; flex-direction: column; min-height: 100vh; }
.container { max-width: 48rem; padding-inline: 1rem; }
main { flex: 1; width: 100%; overflow-wrap: break-word; }  /* project pages show long bare URLs */
body > header { padding-block: 0; border-bottom: 1px solid var(--rule); }
header nav, header nav ul { flex-wrap: wrap; }
header nav ul:last-child { margin-left: calc(var(--nav-gap) * -1); }
header a { text-decoration: none; }
/* Logo, brand and tagline are one link home (a.home-link), so a click on any of
   them goes to /. The layout lives on the link, not the list item.
   At every width the tagline sits under the brand, both starting at the
   same left edge, and the logo spans the two lines. */
header .masthead::before { content: none; }
header .home-link { display: grid; grid-template-columns: auto 1fr; column-gap: 0.7rem; align-items: center; margin-inline: 0; padding-inline: 0; color: var(--contrast); }
/* The brand turns the hover green under the pointer, like any link. */
header .home-link:is(:hover, :active, :focus) { color: var(--link-hover); }
/* The logo: a 2x2 block of "pixels", drawn here so there's no image to load.
   It follows logo.png (gray, black / black, phosphor green); the black flips
   to white in dark mode, the green stays phosphor in both. */
header .home-link::before { content: ""; display: block; grid-row: 1 / span 2; width: 2rem; height: 2rem; border-radius: 2px;
  background: conic-gradient(var(--contrast) 0 25%, var(--phosphor) 0 50%, var(--contrast) 0 75%, var(--muted) 0); }
/* "5250 Lab" is sized so its right edge lines up with "Tech Support" below
   it (Sam, 2026-11-12). The font is monospaced, every letter 0.6em wide, so
   it's arithmetic: the tagline is 12 letters at 0.75rem with 0.02em between
   them; the brand is 8 letters with -0.01em between them, which comes to
   1.18rem. A different tagline needs a new number here. */
header .brand { font-size: 1.18rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
header .tagline { font-size: 0.75rem; line-height: 1.3; letter-spacing: 0.02em; font-weight: 400; color: var(--muted); }
/* "Shelburne, Vermont", between the brand and the links: italic and muted,
   so it reads as a note, not a link. */
header .place { font-style: italic; color: var(--muted); }
/* Nav links are plain text, green under the pointer. The current page, and
   a link with focus or being clicked, are the darker hover green; the
   current page also gets a thicker underline. */
header nav ul:last-child a { color: var(--h1); }
header nav ul:last-child a:is(:focus, :active, [aria-current=page]) { color: var(--link-hover); }
header nav ul:last-child a:hover { color: var(--link); }
header a[aria-current=page] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.45em; }
/* Phones: the brand at the left and the place at the right share the first
   row; the links spread across a row of their own beneath (the nav wraps,
   and the links take a full row). The links are a little smaller than body
   text so they fit on one row. No negative margins or side padding here,
   so both edges keep the container's gutter. */
@media (max-width: 47.9375rem) {
  header nav { align-items: center; padding-block: 0.5rem; }
  header nav li { padding-block: 0.5rem; }
  header nav ul, header nav ul:last-child { margin-inline: 0; }
  header nav ul.place li { padding-inline: 0; }
  header nav ul.place { font-size: 0.8rem; }
  header nav ul:last-child { flex: 0 0 100%; justify-content: space-between; column-gap: 0.75rem; max-width: 26rem; font-size: 0.875rem; }
  header nav ul:last-child li { padding-inline: 0; }
  header nav ul:last-child a { margin-inline: 0; padding-inline: 0; }
}
@media (max-width: 24rem) {
  header nav { font-size: 0.875rem; }
  header nav ul.place { font-size: 0.75rem; }
  header nav ul:last-child { font-size: 0.8rem; column-gap: 0.5rem; }
}
@media (max-width: 21rem) { header nav ul:last-child { font-size: 0.75rem; } }
/* Desktop: brand, place, and links share one line, the place in the middle
   (the nav spreads its three lists apart), and the links close up a bit. */
@media (min-width: 48rem) {
  header nav { --nav-gap: 0.6rem; padding-block: 0.35rem; }
}
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; margin-top: 2rem; }
h2 a { text-decoration: none; }
h2 a:hover { text-decoration: underline; }
main.home h1 { font-size: 1.5rem; line-height: 1.35; margin-top: 1rem; }
main.home .subhead { font-size: 1.15rem; color: var(--muted); }
main.home .lead { font-size: 1.15rem; margin-top: 1rem; }
section.card { display: flex; gap: 1rem; align-items: flex-start; margin-block: 2rem; }
section.card h2 { margin: 0; }
section.card p { margin: 0.4rem 0 0; }
/* Live-information cards (latest bird, and more to come): a rule sets them
   apart from the page's copy. The label (on Home, the project's name) is
   bold, in the same size as the lines under it: one font size in a card,
   small print included (Sam, 2026-11-12). Stacked cards share the rule
   between them. */
section.status { border-top: 1px solid var(--rule); padding-top: 1.25rem; margin-top: 2.5rem; }
section.status + section.status { margin-top: 0; }
section.status :is(h2, h3) { margin: 0; font-size: 1rem; font-weight: 700; color: var(--muted); }
section.status :is(h2, h3) a { text-decoration: underline; }
/* Home's "Local Projects" group. Room above, and no rule (Sam, 2026-11-18:
   the space is enough), sets the group apart from Sam's note. The label
   stands alone, and every card below it, the first included, keeps its own
   thin rule, so the label reads as the group's heading rather than part of
   the first card (Sam, 2026-11-11). */
aside.live { margin-top: 5rem; }
aside.live h2 { margin: 0; font-size: 1.05rem; }
aside.live section.status:first-of-type { margin-top: 1.25rem; }
section.status small { font-size: 1em; color: var(--muted); }
/* Every live card is the same height: four lines beside the 96px picture
   (Sam, 2026-11-12), the project's name, a short description, the
   information, and the date. Four lines at the body's 1.6 line height is
   6.4rem, held here so a card still waiting on live.js is as tall as the
   rest. Each card's copy is written to fit (a long line can still wrap on
   a narrow phone). */
section.status > div { min-height: 6.4rem; }
/* Harbor stoplight (inline SVG, 96px like the photo thumbnails). All lamps
   dark until live.js sets data-state; then one lights up. Same colors in
   light and dark mode; the green is the site's phosphor. */
.stoplight { display: block; border-radius: var(--radius); background: var(--panel); outline: 1px solid var(--rule); outline-offset: -1px; }
.stoplight .housing { fill: #222; }
.stoplight .lamp { fill: #444; }
.harbor[data-state="red"] .lamp.red { fill: #ff3b30; }
.harbor[data-state="yellow"] .lamp.yellow { fill: #ffc400; }
.harbor[data-state="green"] .lamp.green { fill: var(--phosphor); }
/* Voice assistant benchmark (src/bench.js). Answers sit side by side and
   stack once a column would be narrower than 14rem, so a phone gets one
   column with no media query. */
.bench-question { margin-block: 1.75rem; }
.bench-question h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.bench-answers { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.bench-answer { padding: 0.75em 1em; background: var(--panel); border-radius: var(--radius); }
.bench-answer p { margin: 0; }
.bench-answer blockquote { margin: 0.5rem 0; padding: 0 0 0 0.75rem; font-style: normal; }
.bench-answer small { color: var(--muted); }
/* Each answer's mark, the score out of its maximum ("1/1", "7/10"): one
   style for every kind of question. */
.score { display: inline-block; padding-inline: 0.3em; text-align: center; font-weight: 700; border-radius: var(--radius); border: 2px solid var(--link); }
/* Each run on the project page, newest first, set apart by a rule. */
.bench-run + .bench-run { border-top: 1px solid var(--rule); margin-top: 3rem; padding-top: 1.5rem; }
/* A run's title, when the laptop sends one ("Cat jokes and haiku"). */
.bench-title { font-weight: 700; margin-top: -0.5rem; }
/* A run's scores: a row per kind of question, numbers right-aligned. */
.bench-scores { width: auto; margin-bottom: 0.25rem; }
.bench-scores :is(td, thead th:not(:first-child)) { text-align: right; padding-inline: 1rem 0.5rem; }
section.device { margin-block: 1.25rem; }
section.device h3 { font-size: 1rem; margin: 0; }
h3 a { text-decoration: none; }
h3 a:hover { text-decoration: underline; }
/* Square, at the exact size the thumbs/ files were made for. */
.thumb { flex: 0 0 auto; }
/* Outline, not border: a border would shrink the image area and force a rescale. */
.thumb img { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius); outline: 1px solid var(--rule); outline-offset: -1px; }
figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }
.req { color: var(--red); }
.req-note { font-size: 0.85rem; color: var(--muted); }
form p { margin-bottom: 0; }
ul.links { padding: 0; }
ul.links li { list-style: none; }
.todo { color: var(--muted); font-style: italic; border: 1px dashed var(--muted); padding: 0.5em; }
span.todo { padding: 0 0.25em; }
figure { margin: 1.5rem 0; }
figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--rule); border-radius: var(--radius); }
.notice { padding: 0.75em 1em; border-radius: var(--radius); background: var(--panel); }
.notice.error { color: var(--red); }
ul.ways { padding: 0; margin: 1.5rem 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
ul.ways li { list-style: none; margin: 0; padding: 0.75em 1em; background: var(--panel); border-radius: var(--radius); }
.way { display: block; font-size: 0.8em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
footer { padding-block: 1rem; border-top: 1px solid var(--rule); font-size: 0.8rem; color: var(--muted); }
footer p { margin: 0.25em 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip, .trap { position: absolute; left: -999em; }
/* Transparent: under Pico this background read the link's own transparent
   color, so that's the look we keep. Whether it should cover the header
   behind it is a question for Sam. */
.skip:focus { left: 1em; top: 0.5em; z-index: 1; background: transparent; padding: 0.25em 0.5em; }
