/* Workshop: warm paper, near-black ink, one green accent. No gradients, no glass. */
:root {
  --paper: #f6f2e9;
  --paper-2: #efe9db;
  --card: #fbf8f1;
  --ink: #1c1a16;
  --muted: #5f594d;
  --faint: #8a8272;
  --line: #ddd3c0;
  --line-strong: #c4b89f;
  --accent: #205c40;
  --accent-ink: #f6f2e9;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --measure: 68ch;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--accent-ink); }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 8px 14px;
  border-radius: 6px; font-size: 14px; text-decoration: none;
}
.skip:focus { left: 8px; }
code, pre { font-family: var(--mono); }

/* masthead */
.masthead { border-bottom: 1px solid var(--line-strong); }
.masthead-row {
  display: flex; align-items: center; gap: 16px;
  padding-top: 14px; padding-bottom: 14px;
  font-family: var(--mono); font-size: 13px;
}
.site-path { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-path .dim { color: var(--faint); }
.masthead-meta { color: var(--muted); }
.index-nav {
  display: flex; gap: 4px; padding-bottom: 12px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12.5px;
}
.index-nav a { color: var(--muted); text-decoration: none; padding: 5px 10px; border-radius: 6px; }
.index-nav a:hover { color: var(--ink); background: var(--paper-2); }

/* opening */
.opening { padding-top: 72px; padding-bottom: 56px; max-width: 1060px; }
.kicker {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.opening h1 {
  font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em;
  font-size: clamp(40px, 6.5vw, 68px); line-height: 1.04;
}
.lede { max-width: var(--measure); margin-top: 18px; font-size: 17px; color: var(--muted); }

/* sections */
.section { padding-top: 64px; padding-bottom: 12px; }
.section-head { border-top: 2px solid var(--ink); padding-top: 14px; margin-bottom: 12px; }
.section-head h2 {
  font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em;
  font-size: clamp(30px, 4.2vw, 42px); line-height: 1.1;
}
.sub { max-width: var(--measure); color: var(--muted); margin-top: 8px; font-size: 15px; }

/* features */
.feature { border-top: 1px solid var(--line-strong); padding: 30px 0 34px; }
.feature-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.feature-head h3 { font-family: var(--serif); font-size: 25px; font-weight: 600; letter-spacing: -0.01em; }
.feature-head h3 .np { font-weight: 400; color: var(--muted); font-size: 20px; }
.status {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--accent);
}
.status-quiet { color: var(--muted); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.problem {
  font-family: var(--serif); font-size: 18px; line-height: 1.55;
  max-width: var(--measure); margin: 10px 0 16px; color: var(--ink);
}
.feature-body { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: start; }
.feature-body p { color: var(--muted); font-size: 15.5px; margin-bottom: 12px; max-width: var(--measure); }
.diagram {
  background: var(--ink); color: var(--paper); border-radius: 8px;
  padding: 14px 16px; font-size: 12.5px; line-height: 1.7; overflow-x: auto; margin: 14px 0 4px;
}
.diagram code { color: inherit; }
.spec { border: 1px solid var(--line); border-radius: 8px; background: var(--card); overflow: hidden; align-self: start; }
.spec div { padding: 11px 15px; border-bottom: 1px solid var(--line); }
.spec div:last-child { border-bottom: 0; }
.spec dt { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); }
.spec dd { font-size: 14px; margin-top: 2px; }
.links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 16px; font-size: 14.5px; font-weight: 500; }
.links .note { font-size: 13.5px; color: var(--faint); font-weight: 400; }
.btn {
  display: inline-block; background: var(--ink); color: var(--paper);
  text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: 8px;
}
.btn:hover { background: var(--accent); color: var(--accent-ink); }

/* tools */
.tool-list { border-top: 1px solid var(--line-strong); }
.tool { border-bottom: 1px solid var(--line); padding: 22px 0; }
.tool header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tool h3 { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.tool h3 .dim { color: var(--faint); font-weight: 400; font-size: 16px; }
.tool > p { color: var(--muted); font-size: 15px; max-width: var(--measure); margin-top: 8px; }
.mono-line {
  font-family: var(--mono); font-size: 12.5px; color: var(--faint);
  display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px;
}
.cmd-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.cmd-row code {
  background: var(--ink); color: var(--paper); font-size: 12px;
  padding: 8px 12px; border-radius: 7px; overflow-x: auto; max-width: 100%;
}
.mini-btn {
  font-family: var(--mono); font-size: 12.5px; background: transparent;
  border: 1px solid var(--line-strong); border-radius: 7px; padding: 7px 13px;
  cursor: pointer; color: var(--ink);
}
.mini-btn:hover { border-color: var(--ink); background: var(--paper-2); }

/* archive */
.archive-controls { margin: 18px 0 6px; }
.search-wrap input {
  width: 100%; font-family: var(--sans); font-size: 15px;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 11px 14px;
}
.search-wrap input::placeholder { color: var(--faint); }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chip {
  font-family: var(--mono); font-size: 12.5px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--muted); cursor: pointer;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.count { font-family: var(--mono); font-size: 12.5px; color: var(--faint); margin-top: 10px; }
.ledger { list-style: none; border-top: 1px solid var(--ink); margin-top: 8px; }
.ledger-row { border-bottom: 1px solid var(--line); padding: 15px 2px; }
.ledger-row > div { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ledger-row strong { font-size: 16px; }
.ledger-row a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.ledger-row a:hover { color: var(--accent); border-color: var(--accent); }
.kind {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--faint); border: 1px solid var(--line); border-radius: 5px; padding: 2px 8px;
}
.ledger-row > p { color: var(--muted); font-size: 14.5px; margin-top: 4px; max-width: var(--measure); }
.ledger-row .mono-line { margin-top: 6px; }
.ledger-row.hidden { display: none; }
.empty { padding: 26px 0; color: var(--muted); }
.empty button { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* teaching */
.playlist-list { display: flex; flex-direction: column; }
.playlist { border-top: 1px solid var(--line-strong); padding: 24px 0; }
.playlist:last-of-type { border-bottom: 1px solid var(--line-strong); }
.playlist h3 { font-family: var(--serif); font-size: 21px; font-weight: 600; }
.playlist > p { color: var(--muted); font-size: 15px; max-width: var(--measure); margin-top: 8px; }
.playlist > p strong { color: var(--ink); font-weight: 600; }

/* about */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; margin-top: 18px; align-items: start; }
.contact-list { list-style: none; border-top: 1px solid var(--line-strong); }
.contact-list li { border-bottom: 1px solid var(--line); padding: 11px 2px; display: flex; flex-direction: column; }
.contact-list a { font-weight: 600; font-size: 15px; }
.contact-list span { font-size: 13px; color: var(--faint); }

/* footer */
.footer {
  border-top: 1px solid var(--ink); margin-top: 56px;
  padding-top: 18px; padding-bottom: 40px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--muted);
}

@media (max-width: 880px) {
  body { overflow-x: clip; }
  .feature-body { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .opening { padding-top: 48px; }
  .search-wrap input { font-size: 16px; }
  .feature-head h3 { font-size: 23px; }
}
@media (max-width: 600px) {
  html { -webkit-text-size-adjust: 100%; }
  .wrap { padding: 0 16px; }
  .masthead-row { flex-wrap: wrap; gap: 8px 12px; }
  .masthead-meta { order: 3; flex-basis: 100%; font-size: 12px; }
  .index-nav {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    gap: 2px; scrollbar-width: none;
  }
  .index-nav::-webkit-scrollbar { display: none; }
  .index-nav a { white-space: nowrap; }
  .opening { padding-top: 36px; padding-bottom: 40px; }
  .problem { font-size: 18px; }
  .feature { padding: 22px 0 24px; }
  .feature-body { gap: 20px; }
  .cmd-row code { font-size: 11px; }
  .playlist h3 { font-size: 21px; }
  .footer { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
