/* W3S shell: the chrome every Worker page and static page shares.
   The "record" style (site/DESIGN.md): paper, ink and grey only; a serif for headings, Helvetica for reading,
   and a terminal face for navigation, labels, buttons and anything that is data. No shadows, no badges.
   One file, two consumers: build.sh copies it to _site/shared/shell.css; Workers import it as text. */
:root { --k: #141414; --w: #FAFAFA; --white: #fff; --dim: #5E5E5E; --dim-on-k: #B4B4B4; --hair: #D9D9D9; --hair-on-k: #3C3C3C; --serif: 'Instrument Serif', 'Times New Roman', Times, serif; --sans: Helvetica, 'Helvetica Neue', Arial, sans-serif; --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; --ease: cubic-bezier(.2, .7, .2, 1); }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--w); color: var(--k); }
body { font: 17px/1.55 var(--sans); min-height: 100dvh; display: flex; flex-direction: column; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 28px); }
.hide { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Top bar */
.sh-nav { color: var(--k); background: var(--w); border-bottom: 1px solid var(--hair); }
.sh-nav .wrap { display: flex; align-items: center; gap: 22px; height: 60px; }
.sh-brand { display: flex; align-items: center; gap: 10px; color: var(--k); text-decoration: none; font: 400 25px/1 var(--serif); }
.sh-brand img { width: 28px; height: 28px; }
.sh-nav nav { margin-left: auto; display: flex; gap: 22px; font: 13px var(--mono); }
.sh-nav nav a { color: var(--dim); text-decoration: none; white-space: nowrap; transition: color .2s var(--ease); }
.sh-nav nav a:hover, .sh-nav nav a[aria-current] { color: var(--k); }
.sh-nav .sh-cta { color: var(--k); background: transparent; border: 1px solid var(--k); padding: 7px 14px; font: 13px var(--mono); text-decoration: none; white-space: nowrap; }
.sh-nav .sh-cta:hover { background: var(--k); color: var(--w); }
.sh-nav .sh-signin { color: var(--dim); font: 13px var(--mono); text-decoration: none; white-space: nowrap; } .sh-nav .sh-signin:hover { color: var(--k); }

/* Page body */
main.sh-main { flex: 1; }
.sh-head { padding: 44px 0 20px; }
.sh-eyebrow { margin: 0 0 12px; font: 12.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.sh-head h1 { margin: 0 0 14px; font: 400 clamp(38px, 5vw, 60px)/1.02 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.sh-head .sh-lede { margin: 0; max-width: 62ch; font-size: 18px; color: var(--dim); }
.sh-section { padding: 28px 0 40px; border-top: 1px solid var(--hair); }
main.sh-main { counter-reset: sec; }
.sh-section { counter-increment: sec; }
.sh-section h2 { margin: 0 0 10px; font: 400 clamp(28px, 3.2vw, 40px)/1.08 var(--serif); }
/* The record style: every section is numbered with a section mark, as on the home page. */
.sh-section > h2:first-child::before, .sh-section > .wrap > h2:first-child::before { content: '§ ' counter(sec); display: block; margin: 0 0 8px; font: 12.5px/1 var(--mono); letter-spacing: .04em; color: var(--dim); }
.sh-section p { max-width: 64ch; }
.sh-badge { display: inline; font: 12.5px/1.4 var(--mono); color: var(--k); }
.sh-badge.quiet { color: var(--dim); }
.sh-badge + .sh-badge::before { content: '/'; margin: 0 .6em; color: var(--hair); }

/* Buttons and fields */
.sh-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 22px; font: 14px/1.25 var(--mono); text-align: center; color: var(--w); background: var(--k); border: 1px solid var(--k); border-radius: 0; text-decoration: none; cursor: pointer; }
.sh-btn:hover { background: #333; border-color: #333; }
.sh-btn.ghost { color: var(--k); background: transparent; }
.sh-btn.ghost:hover { background: var(--k); color: var(--w); }
.sh-btn:disabled { opacity: .5; cursor: default; }
.sh-field { display: block; margin: 0 0 14px; font: 12.5px var(--mono); color: var(--dim); }
.sh-field input, .sh-field select, .sh-field textarea { display: block; width: 100%; margin-top: 6px; font: 16px var(--sans); color: var(--k); background: var(--white); border: 1px solid var(--k); border-radius: 0; padding: 11px 13px; }
.sh-note { font-size: 14px; color: var(--dim); }
.sh-line { margin: 20px 0 0; padding: 12px 16px; border: 1px solid var(--k); border-left-width: 5px; font-size: 14.5px; }

/* Cards for the modules */
.sh-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin: 18px 0 0; }
.sh-card { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 20px; border: 1px solid var(--k); }
.sh-card h3 { margin: 4px 0 0; font: 400 30px/1.08 var(--serif); }
.sh-card p { margin: 0; color: var(--dim); font-size: 15.5px; }
.sh-card .sh-row { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 10px; }
.sh-card .sh-row small { color: var(--dim); font: 12.5px var(--mono); }

/* Footer */
.sh-foot { color: var(--dim); background: var(--w); border-top: 3px double var(--hair); padding: 26px 0 30px; font: 12.5px var(--mono); }
.sh-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.sh-foot img { width: 20px; height: 20px; }
.sh-foot span { color: var(--dim); }
.sh-foot nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 16px; }
.sh-foot a { color: var(--dim); text-decoration: none; } .sh-foot a:hover { color: var(--k); }

@media (max-width: 760px) {
  .sh-nav .wrap { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; row-gap: 8px; }
  .sh-nav nav { margin-left: 0; width: 100%; order: 3; gap: 16px; overflow-x: auto; }
  .sh-nav .sh-signin { margin-left: auto; }
  .sh-nav .sh-cta { margin-left: 0; }
  .sh-foot nav { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
