/* ARC / arcltd.io. Direction: Notebook. Adapted from the Claude Design export (base.css + dir-notebook.css).
   Color tokens are set on <html> by js/palette.js from the visitor's clock. The :root values below are the
   noon palette, the no-JS fallback; the dark block is the night palette for no-JS visitors who prefer dark. */

@font-face { font-family: "Danh Da"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/danhda-bold.woff2") format("woff2"); }
@font-face { font-family: "Libre Franklin"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/libre-franklin-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/courier-prime-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/courier-prime-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Reenie Beanie"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/reenie-beanie-latin-400-normal.woff2") format("woff2"); }

/* tokens: noon (light) */
:root {
  color-scheme: light;
  --paper: #f7f8f7;
  --paper-sunk: #eceeec;
  --ink: #111418;
  --ink-muted: #535961;
  --rule: #d6d9da;
  --rule-strong: #7a8087;
  --pen: #097548;
  --signal: #1f3bd9;
  --on-signal: #ffffff;
  --margin: #9fb0f2;
  --overlay: #1114181f;
}
/* tokens: night (dark), no-JS fallback only. With JS the clock decides. */
@media (prefers-color-scheme: dark) {
  :root.no-js {
    color-scheme: dark;
    --paper: #111316;
    --paper-sunk: #1a1d22;
    --ink: #ecece8;
    --ink-muted: #a2a7ae;
    --rule: #2a2e34;
    --rule-strong: #6b717a;
    --pen: #4fd69a;
    --signal: #8ea2ff;
    --on-signal: #0b1030;
    --margin: #33407a;
    --overlay: #ecece81f;
  }
}
:root {
  --font-display: "Danh Da", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Libre Franklin", "Franklin Gothic Medium", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Courier Prime", "Courier New", Courier, monospace;
  --font-hand: "Reenie Beanie", "Bradley Hand", "Segoe Print", cursive;
}

*, *::before, *::after { box-sizing: border-box; }

:root {
  --gutter: 20px;
  --col-gap: 16px;
  --radius: 2px;
  --display-weight: 400;
  --display-tracking: -0.022em;
  --lede-weight: 400;
  --focus: var(--signal);
  --bar-h: 57px;
  --measure: 40em;
}
@media (min-width: 700px) { :root { --gutter: 48px; --col-gap: 24px; } }
@media (min-width: 1200px) { :root { --gutter: 96px; } }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
@media (min-width: 1000px) { body { font-size: 1.125rem; } }

h1, h2, h3, p, ul, ol, dl, dd, dt, figure, blockquote { margin: 0; padding: 0; }
h1, h2, h3 { font-weight: inherit; font-size: inherit; }
ul[role="list"], ol[role="list"] { list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--rule-strong);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover { color: var(--signal); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--paper); }

.mono { font-family: var(--font-mono); }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.skip { position: absolute; left: var(--gutter); top: -80px; z-index: 20; display: inline-flex; align-items: center; min-height: 44px; padding: 10px 14px; background: var(--ink); color: var(--paper); font-family: var(--font-mono); font-size: 0.8125rem; text-decoration: none; }
.skip:focus { top: 12px; color: var(--paper); }

.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Background pattern (picker carried over from arcltd.io v1) ---------- */
.overlay { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.site-head, main, .site-foot { position: relative; z-index: 1; }
.site-head { position: sticky; top: 0; z-index: 5; background: var(--paper); }
[data-overlay="dots"] .overlay { background-image: radial-gradient(circle, var(--overlay) 1px, transparent 1.5px); background-size: 40px 40px; }
[data-overlay="grid"] .overlay { background-image: linear-gradient(to right, var(--overlay) 1px, transparent 1px), linear-gradient(to bottom, var(--overlay) 1px, transparent 1px); background-size: 80px 80px; }
[data-overlay="noise"] .overlay { background-color: var(--ink); opacity: var(--noise-op, 0.16); -webkit-mask-image: var(--noise-svg); mask-image: var(--noise-svg); -webkit-mask-size: 400px 400px; mask-size: 400px 400px; }
[data-overlay="mesh"] .overlay { background-color: var(--ink); opacity: 0.1; -webkit-mask-image: var(--mesh-svg); mask-image: var(--mesh-svg); -webkit-mask-size: 60px 60px; mask-size: 60px 60px; }
:root {
  --noise-svg: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --mesh-svg: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0L60 60M60 0L0 60M30 0L30 60M0 30L60 30' stroke='%23000' stroke-width='0.75' fill='none'/%3E%3C/svg%3E");
}
/* ---------- Header ---------- */
.site-head { border-bottom: 1px solid var(--rule); }
.head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; padding-block: 14px; min-height: 64px; }
.brand { display: inline-flex; align-items: baseline; gap: 0.7ch; font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.04em; text-decoration: none; white-space: nowrap; -webkit-user-select: none; user-select: none; }
.brand:hover { color: inherit; }
.brand-mark { font-family: var(--font-display); font-weight: 700; font-size: 2.125rem; line-height: 1; letter-spacing: 0.01em; }
.brand-sep { color: var(--ink-muted); }
.head-tools { display: flex; align-items: center; gap: 20px; }
.head-tools .nav { margin-right: 8px; }
.nav ul { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.nav a { font-family: var(--font-body); font-weight: 500; font-size: 0.9375rem; letter-spacing: 0; text-decoration: none; padding-block: 6px; display: inline-block; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: currentColor; }
@media (max-width: 699px) {
  .head-row { padding-block: 12px 8px; }
  .head-tools { display: contents; }
  .disp { order: 2; margin-left: auto; }
      .nav { order: 3; flex-basis: 100%; }
  .nav ul { justify-content: space-between; gap: 0 12px; }
  .nav a { font-size: 0.875rem; letter-spacing: 0; padding-block: 8px; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(56px, 10.5vw, 152px) clamp(56px, 7vw, 112px); }
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: clamp(28px, 4vw, 56px); }
.hero-grid > * { grid-column: 1 / -1; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(3rem, 8.4vw, 7.5rem);
  line-height: 0.97;
  letter-spacing: var(--display-tracking);
  max-width: 13ch;
  text-wrap: balance;
}
.hero-sub { font-size: clamp(1.125rem, 1.55vw, 1.375rem); line-height: 1.45; color: var(--ink-muted); max-width: 40ch; }
.ships-more { display: none; }
.ships:hover .ships-more { display: inline; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }
.cta-row .email { font-family: var(--font-mono); font-size: 0.875rem; }
@media (min-width: 1000px) { .hero-copy { grid-column: 5 / span 7; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  font-family: var(--font-mono); font-size: 0.875rem; letter-spacing: 0.02em; line-height: 1;
  text-decoration: none; white-space: nowrap;
  border: 1px solid var(--ink); border-radius: var(--radius);
  background: transparent; color: var(--ink); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-primary { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- Sections ---------- */
.sec { border-top: 1px solid var(--rule); padding-block: clamp(56px, 6.6vw, 96px); }
.sec-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 28px; }
.sec-head, .sec-body { grid-column: 1 / -1; min-width: 0; }
.sec-head h2 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  line-height: 1.06;
  letter-spacing: -0.016em;
  text-wrap: balance;
}
@media (min-width: 1000px) {
  .sec-head { grid-column: 1 / span 3; align-self: start; position: sticky; top: 96px; }
  .sec-body { grid-column: 5 / span 7; }
}

.prose > * + * { margin-top: 1.05em; }
.prose { max-width: var(--measure); }
.lede {
  font-family: var(--font-display);
  font-weight: var(--lede-weight);
  font-size: clamp(1.4375rem, 2.2vw, 1.9375rem);
  line-height: 1.26;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}
.lede + * { margin-top: 1.4em; }

.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }

/* Now */
.now-list > li { padding-block: 18px; border-top: 1px solid var(--rule); max-width: var(--measure); }
.now-list > li:first-child { border-top: 0; padding-top: 0; }
.now-list > li:last-child { padding-bottom: 0; }

/* Work */
.eng { padding-block: 44px; border-top: 1px solid var(--rule); max-width: var(--measure); }
.eng:first-child { border-top: 0; padding-top: 0; }
.eng:last-child { padding-bottom: 0; }
.eng-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; margin-bottom: 18px; max-width: var(--measure); }
.eng-name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(1.5rem, 2vw, 1.75rem); line-height: 1.1; letter-spacing: -0.012em; }
.eng-dates { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-muted); white-space: nowrap; }
.pull { margin-top: 32px; max-width: 36em; }
.pull blockquote { font-family: var(--font-display); font-weight: var(--lede-weight); font-size: clamp(1.5rem, 2.3vw, 2rem); line-height: 1.22; letter-spacing: -0.014em; text-indent: -0.42em; text-wrap: pretty; }
.pull figcaption { margin-top: 14px; font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.5; color: var(--ink-muted); }

/* How */
.ways { margin-top: 36px; }
.way { padding-block: 26px; border-top: 1px solid var(--rule); max-width: var(--measure); }
.way-lead { display: block; margin-bottom: 8px; font-family: var(--font-display); font-weight: var(--lede-weight); font-size: clamp(1.3125rem, 1.7vw, 1.5rem); line-height: 1.25; letter-spacing: -0.01em; }
.how-after { margin-top: 0; padding-top: 26px; border-top: 1px solid var(--rule); max-width: var(--measure); }
.how-after > * + * { margin-top: 1.05em; }

/* On the record */
.record { max-width: var(--measure); }
.record > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 24px; padding-block: 16px; border-top: 1px solid var(--rule); }
.record > li:first-child { border-top: 0; padding-top: 0; }
.record > li:last-child { padding-bottom: 0; }
.rec-source { font-weight: 600; }
.rec-date { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-muted); white-space: nowrap; }
@media (max-width: 699px) { .record > li { grid-template-columns: minmax(0, 1fr); } }

/* Contact */
.contact-h { font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(2.25rem, 4.6vw, 4rem); line-height: 1; letter-spacing: var(--display-tracking); text-wrap: balance; }
.contact-body { margin-top: 20px; max-width: 34em; color: var(--ink-muted); }
.form { margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px var(--col-gap); max-width: var(--measure); }
.field { display: flex; flex-direction: column; gap: 8px; grid-column: 1 / -1; }
@media (min-width: 700px) { .field-half { grid-column: span 1; } }
.field label { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.02em; color: var(--ink-muted); }
.field input, .field textarea {
  width: 100%; padding: 12px 14px;
  background: var(--paper-sunk); color: var(--ink);
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  font-size: 1rem; line-height: 1.5;
  transition: border-color 0.15s ease;
}
.field textarea { min-height: 148px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
.form-actions { grid-column: 1 / -1; margin-top: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-links { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 8px 28px; font-family: var(--font-mono); font-size: 0.875rem; }
.legal { margin-top: 28px; display: flex; gap: 12px; align-items: flex-start; max-width: 44em; font-size: 0.9375rem; line-height: 1.55; color: var(--ink-muted); }
.fox { flex: none; width: 14px; height: 14px; margin-top: 0.3em; color: var(--fox, var(--ink)); }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--rule); padding-block: 32px 56px; font-family: var(--font-mono); font-size: 0.78125rem; line-height: 1.7; color: var(--ink-muted); }
.site-foot p + p { margin-top: 2px; }

/* ---------- Build log ---------- */
.log-head { padding-block: clamp(48px, 7.5vw, 112px) clamp(36px, 4vw, 56px); }
.eyebrow { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.02em; color: var(--ink-muted); }
.log-head h1, .simple h1 {
  margin-top: 20px;
  font-family: var(--font-display); font-weight: var(--display-weight);
  font-size: clamp(3rem, 7.4vw, 6.5rem); line-height: 0.98; letter-spacing: var(--display-tracking);
  text-wrap: balance;
}
.log-intro { margin-top: clamp(24px, 3vw, 40px); max-width: 38em; }
.tag-key { margin-top: clamp(28px, 3vw, 44px); display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 var(--col-gap); max-width: 1040px; }
.tag-key > div { display: flex; align-items: baseline; gap: 14px; padding-block: 10px; border-top: 1px solid var(--rule); font-size: 0.9375rem; }
.tag-key dt { flex: none; min-width: 5.5em; }
.tag-key dd { color: var(--ink-muted); }
@media (min-width: 1000px) {
  .log-head-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .log-head-grid > * { grid-column: 1 / -1; }
  .log-head-grid > .log-intro, .log-head-grid > .tag-key { grid-column: 5 / -1; }
}

.tag { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }

.filters { position: sticky; top: 64px; z-index: 4; background: var(--paper); border-block: 1px solid var(--rule); }
.filters-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--bar-h); }
.chips { display: flex; gap: 8px; padding-block: 10px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
  background: transparent; color: var(--ink);
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  cursor: pointer; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.count { flex: none; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-muted); white-space: nowrap; }
.no-js .filters { display: none; }
@media (max-width: 699px) {
  .filters .wrap { padding-right: 0; }
  .chips { padding-right: var(--gutter); }
  .count { display: none; }
}

.log-body { padding-bottom: clamp(56px, 6vw, 96px); }
.month { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); padding-top: clamp(36px, 4vw, 56px); }
.month + .month { margin-top: clamp(36px, 4vw, 56px); border-top: 1px solid var(--rule); }
.month-h, .entries { grid-column: 1 / -1; min-width: 0; }
.month-h { font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 24px; }
@media (min-width: 1000px) {
  .month-h { grid-column: 1 / span 3; align-self: start; position: sticky; top: calc(var(--bar-h) + 28px); margin-bottom: 0; }
  .entries { grid-column: 5 / span 7; }
}
.entry { padding-block: 28px; border-top: 1px solid var(--rule); max-width: var(--measure); }
.entry:first-child, .entry.is-first { border-top: 0; padding-top: 0; }
.entry:last-child { padding-bottom: 0; }
.entry-title { margin-top: 10px; font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(1.375rem, 1.8vw, 1.625rem); line-height: 1.16; letter-spacing: -0.012em; text-wrap: balance; }
.entry-body { margin-top: 12px; max-width: var(--measure); }
.entry-foot { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.5; }
.metric { color: var(--ink-muted); }
.entry-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.empty { padding-block: clamp(56px, 8vw, 120px); font-family: var(--font-display); font-weight: var(--lede-weight); font-size: clamp(1.4375rem, 2.2vw, 1.9375rem); line-height: 1.26; }
.endmark { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); color: var(--ink); }
.endmark svg { grid-column: 1 / -1; width: 12px; height: 12px; }
@media (min-width: 1000px) { .endmark svg { grid-column: 5 / -1; } }

.log-close { border-top: 1px solid var(--rule); padding-block: clamp(56px, 6.6vw, 96px); }
.log-close h2 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(2.25rem, 4.6vw, 4rem); line-height: 1; letter-spacing: var(--display-tracking); text-wrap: balance; }
.log-close p { margin-top: 20px; max-width: 34em; }
.log-close .email { display: inline-block; margin-top: 24px; font-family: var(--font-mono); font-size: 0.875rem; }
@media (min-width: 1000px) {
  .log-close-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .log-close-grid > * { grid-column: 5 / span 7; }
}

/* ---------- Simple pages: 404, thanks, plain ---------- */
.simple { padding-block: clamp(72px, 12vw, 184px); }
.simple .eyebrow + h1 { margin-top: 20px; }
.simple h1 { margin-top: 0; max-width: 12ch; }
.simple-body { margin-top: clamp(24px, 3vw, 40px); max-width: 30em; font-size: clamp(1.125rem, 1.55vw, 1.375rem); line-height: 1.45; color: var(--ink-muted); }
.simple-body a { color: var(--ink); }
.simple-body a:hover { color: var(--signal); }
.page-prose { margin-top: clamp(32px, 4vw, 56px); }
.page-prose h2 { margin-top: 2em; font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(1.5rem, 2vw, 1.75rem); line-height: 1.15; letter-spacing: -0.012em; }
.page-prose h2 + * { margin-top: 0.7em; }
@media (min-width: 1000px) {
  .simple-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .simple-grid > * { grid-column: 1 / -1; }
  .simple-grid > .simple-body, .simple-grid > .page-prose { grid-column: 5 / span 7; }
}


/* ---------- Notebook direction ---------- */
:root {
  --radius: 0px;
  --display-weight: 700;
  --display-tracking: 0;
  --lede-weight: 700;
  --fox: var(--ink);
  --measure: 38em;
}
body {
  line-height: 1.62;
  background-image: linear-gradient(var(--margin), var(--margin));
  background-repeat: no-repeat;
  background-size: 2px 100%;
  background-position: 9px 0;
}
@media (min-width: 1000px) { body { background-position: calc(48px + (100% - 96px - 264px) / 3 + 68px) 0; } }
@media (min-width: 1200px) { body { background-position: calc(96px + (100% - 192px - 264px) / 3 + 68px) 0; } }
@media (min-width: 1440px) { body { background-position: calc((100% - 1440px) / 2 + 492px) 0; } }

/* Header */
.site-head { border-bottom-color: var(--rule); background: var(--paper); }
.brand { font-weight: 700; }

/* Hero */
.hero { padding-block: clamp(48px, 8vw, 120px) clamp(56px, 7vw, 104px); }
.hero h1 { font-size: clamp(4.25rem, 11.4vw, 10.5rem); line-height: 0.86; max-width: none; }
@media (min-width: 1000px) {
  .hero h1,
  .log-head-grid > h1, .log-head-grid > .eyebrow,
  .simple-grid > h1, .simple-grid > .eyebrow { grid-column: 5 / -1; }
}
.hero-sub { font-family: var(--font-mono); font-size: clamp(1rem, 1.25vw, 1.125rem); line-height: 1.6; color: var(--ink); max-width: 52ch; }
.cta-row .email { font-size: 1rem; }

/* Buttons, chips, tags */
.btn { font-size: 1rem; letter-spacing: 0; border-width: 1.5px; }
.chip { font-size: 0.8125rem; font-weight: 400; letter-spacing: 0.04em; border-width: 1.5px; }
.tag { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; }

/* Sections: the title is a note in the margin */
.sec { border-top-color: var(--rule); }
.sec-head h2 { font-family: var(--font-hand); font-weight: 400; font-size: clamp(2.375rem, 3.4vw, 3rem); line-height: 0.95; letter-spacing: 0; color: var(--pen); }
@media (min-width: 1000px) {
  .sec-head { grid-column: 1 / span 4; padding-right: 56px; text-align: right; }
  .sec-head h2 { transform: rotate(-2deg); transform-origin: right center; }
}
.lede { font-size: clamp(2.125rem, 3.7vw, 3.5rem); line-height: 0.98; letter-spacing: 0; }
.lede + * { margin-top: 1.2em; }


/* Now: written by hand */
.now-list > li { border-top: 0; padding-block: 10px; font-family: var(--font-hand); font-size: clamp(1.75rem, 2.3vw, 2.125rem); line-height: 1.08; color: var(--pen); max-width: 30em; }

.eng-name { font-size: clamp(2rem, 2.8vw, 2.625rem); line-height: 0.95; letter-spacing: 0; }
.eng-dates, .rec-date { font-size: 0.9375rem; }
.pull blockquote { font-family: var(--font-hand); font-weight: 400; font-size: clamp(2rem, 2.9vw, 2.625rem); line-height: 1; letter-spacing: 0; color: var(--pen); text-indent: -0.3em; }
.pull figcaption { font-size: 0.9375rem; margin-top: 10px; }
.way-lead { font-size: clamp(1.75rem, 2.3vw, 2.125rem); line-height: 1; letter-spacing: 0; margin-bottom: 10px; }
.contact-h { font-size: clamp(3.25rem, 7.4vw, 6.75rem); line-height: 0.88; letter-spacing: 0; }

/* Form: ruled lines, like a paper form */
.field label { font-size: 0.9375rem; letter-spacing: 0; }
.field input, .field textarea { border: 0; border-bottom: 1.5px solid var(--ink); background: transparent; padding-inline: 2px; }
.field textarea { border: 1.5px solid var(--ink); padding-inline: 12px; }
.contact-links { font-size: 1rem; }

.site-foot { font-size: 0.875rem; background: var(--paper); border-top-color: var(--rule); }
.site-foot p + p { margin-top: 6px; font-family: var(--font-hand); font-size: 1.625rem; line-height: 1; color: var(--pen); }

/* Build log */
.eyebrow { font-size: 0.9375rem; letter-spacing: 0; }
.log-head h1, .simple h1 { font-size: clamp(4.25rem, 11.4vw, 10.5rem); line-height: 0.86; }
.count { font-size: 0.9375rem; }
.month-h { font-family: var(--font-hand); font-weight: 400; font-size: clamp(2rem, 2.6vw, 2.375rem); line-height: 1; letter-spacing: 0; text-transform: none; color: var(--pen); }
@media (min-width: 1000px) {
  .month-h { grid-column: 1 / span 4; padding-right: 56px; text-align: right; transform: rotate(-2deg); transform-origin: right center; }
}
.entry-title { font-size: clamp(1.75rem, 2.3vw, 2.125rem); line-height: 1; letter-spacing: 0; }
.entry-foot { font-size: 0.9375rem; }
.empty { font-family: var(--font-hand); font-weight: 400; color: var(--pen); font-size: clamp(2.25rem, 3.4vw, 3rem); line-height: 1; }
.log-close h2 { font-size: clamp(3.25rem, 7.4vw, 6.75rem); line-height: 0.88; letter-spacing: 0; }
.log-close .email { font-size: 1rem; }
.page-prose h2 { font-size: clamp(1.75rem, 2.3vw, 2.125rem); line-height: 1; letter-spacing: 0; }


/* ---------- Palette transitions ---------- */
/* The clock moves the tokens once a minute. Ease the change; reduced motion gets the new values with no animation. */
body, .site-head, .site-foot, .filters, .field input, .field textarea, .skip { transition: background-color 0.6s ease, color 0.6s ease, border-color 0.6s ease; }
@media (prefers-reduced-motion: reduce) {
  body, .site-head, .site-foot, .filters, .field input, .field textarea, .skip { transition: none; }
}

/* ---------- Hit areas: every interactive target at least 44px ---------- */
.nav a { min-height: 44px; display: inline-flex; align-items: center; padding-block: 0; }
.brand { min-height: 44px; align-items: center; }
.chip { min-height: 44px; }
.cta-row .email, .contact-links a, .log-close .email, .entry-links a, .simple-body a { padding-block: 12px; margin-block: -12px; display: inline-block; }
.contact-links, .entry-links { row-gap: 8px; }
@media (max-width: 699px) {
  .nav a { padding-block: 0; }
}

/* ---------- Display panel (top right): theme, pattern, time ---------- */
.disp { position: relative; }
.disp-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; margin-right: -10px; }
.disp-btn:hover, .disp-btn[aria-expanded="true"] { color: var(--signal); }
.disp-btn svg { width: 18px; height: 18px; }
.disp-panel { position: absolute; right: -10px; top: calc(100% + 8px); z-index: 30; width: min(360px, calc(100vw - 2 * var(--gutter))); padding: 14px 16px 16px; background: var(--paper); border: 1.5px solid var(--ink); box-shadow: 6px 6px 0 var(--rule); }
.disp-row { display: flex; align-items: center; gap: 12px; padding-block: 8px; }
.disp-row + .disp-row { border-top: 1px solid var(--rule); }
.disp-key { flex: none; width: 5.5em; font-family: var(--font-body); font-weight: 500; color: var(--ink-muted); }
.segs { display: flex; flex-wrap: wrap; gap: 6px; }
.seg { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-family: var(--font-body); font-weight: 500; background: transparent; color: var(--ink); border: 1.5px solid var(--rule-strong); border-radius: var(--radius); cursor: pointer; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.seg:hover { border-color: var(--ink); }
.seg[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.disp-clock { gap: 12px; }
.disp-clock input[type="range"] { flex: 1 1 auto; min-width: 0; height: 44px; margin: 0; background: transparent; cursor: pointer; touch-action: none; -webkit-appearance: none; appearance: none; }
.disp-clock input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--rule-strong); }
.disp-clock input[type="range"]::-moz-range-track { height: 2px; background: var(--rule-strong); }
.disp-clock input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin-top: -8px; background: var(--ink); border: 0; border-radius: 0; }
.disp-clock input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; background: var(--ink); border: 0; border-radius: 0; }
.disp-clock input[type="range"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.clock-time { flex: none; font-family: var(--font-mono); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 5ch; text-align: right; }
.no-js .disp { display: none; }

/* ---------- Contact: a conversation ---------- */
.convo { max-width: var(--measure); }
.contact-links { margin-top: 44px; }
.steps { display: grid; gap: 0; }
.step { padding-block: 18px; border-top: 1px solid var(--rule); }
.step:first-child { border-top: 0; padding-top: 0; }
.ask { font-family: var(--font-hand); font-size: clamp(1.75rem, 2.3vw, 2.125rem); line-height: 1; color: var(--pen); }
.answer { margin-top: 12px; }
.answer input, .answer textarea { width: 100%; padding: 10px 2px; background: transparent; color: var(--ink); border: 0; border-bottom: 1.5px solid var(--ink); font-family: var(--font-mono); font-size: 1.0625rem; line-height: 1.5; }
.answer textarea { border: 1.5px solid var(--ink); padding: 12px; min-height: 120px; resize: vertical; }
.answer input:focus-visible, .answer textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-family: var(--font-mono); font-size: 0.9375rem; border: 1.5px solid var(--rule-strong); cursor: pointer; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice:hover { border-color: var(--ink); }
.choice:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.step-actions { margin-top: 14px; }
.step.is-invalid .answer input, .step.is-invalid .answer textarea { border-color: #b3261e; }
.step.is-invalid .choices { outline: 1.5px solid #b3261e; outline-offset: 4px; }
.form-actions { margin-top: 20px; }
.form-note { margin-top: 12px; font-family: var(--font-mono); font-size: 0.9375rem; }
.form-sent { margin-top: 40px; font-family: var(--font-hand); font-size: clamp(2rem, 2.9vw, 2.625rem); line-height: 1; color: var(--pen); max-width: 20em; }
.form-sent:focus { outline: none; }
/* With script: one question at a time, answered ones collapse to a transcript line. Before contact.js runs, only the first step paints. */
html:not(.no-js) .convo:not(.is-live) .step + .step, html:not(.no-js) .convo:not(.is-live) [data-submit-row] { display: none; }
.convo.is-live .step.is-pending { display: none; }
.convo.is-live .step.is-done .answer, .convo.is-live .step.is-done .step-actions { display: none; }
.convo.is-live .step.is-done { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 12px; padding-block: 12px; }
.convo.is-live .step.is-done .ask { font-size: clamp(1.375rem, 1.8vw, 1.625rem); }
.echo { min-height: 44px; padding: 8px 0; background: transparent; border: 0; border-bottom: 1px solid var(--rule-strong); font-family: var(--font-mono); font-size: 1rem; color: var(--ink); text-align: right; cursor: pointer; max-width: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.echo:hover { color: var(--signal); border-color: currentColor; }
.convo.is-live .step.is-current { border-top: 0; }
.convo.is-live .steps { gap: 0; }
.convo.is-live [data-submit-row][hidden] { display: none; }

/* ---------- Services: outputs, and the visuals in the margin ---------- */
.span { font-family: var(--font-mono); font-size: 1rem; }
.specs { margin-top: 32px; display: grid; gap: 20px; max-width: var(--measure); }
.spec { padding-top: 16px; border-top: 1px solid var(--rule); }
.spec-h { font-family: var(--font-mono); font-size: 0.9375rem; color: var(--ink-muted); }
.spec-list { margin-top: 8px; display: grid; gap: 6px; }
.spec-list li { position: relative; padding-left: 22px; }
.spec-list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 9px; height: 9px; background: var(--ink); }
@media (min-width: 700px) { .specs { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px var(--col-gap); } }
.vis { display: block; width: min(240px, 100%); height: auto; margin-top: 20px; }
.sv-ink { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sv-pen { fill: none; stroke: var(--pen); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sv-sig { fill: var(--signal); }
@media (min-width: 1000px) { .sec-head .vis { margin-left: auto; margin-top: 28px; transform: rotate(-1deg); } }

/* ---------- What we cover ---------- */
.cover { margin-top: 28px; max-width: var(--measure); }
.cover > div { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 4px 20px; padding-block: 14px; border-top: 1px solid var(--rule); }
.cover > div:first-child { border-top: 0; padding-top: 0; }
.cover dt { font-family: var(--font-mono); font-weight: 700; }
.cover dd { color: var(--ink); }
@media (max-width: 699px) { .cover > div { grid-template-columns: 1fr; } }
.how-after { margin-top: 20px; }

/* ---------- The question box (Contact) ---------- */
.ask { max-width: var(--measure); }
.ask-log { display: grid; gap: 14px; margin-bottom: 20px; }
.ask-log:empty { display: none; }
.ask-turn { padding: 12px 14px; border: 1.5px solid var(--rule-strong); white-space: pre-wrap; }
.ask-user { font-family: var(--font-mono); font-size: 0.9375rem; border-style: dashed; margin-left: 12%; }
.ask-assistant { border-color: var(--ink); background: var(--paper-sunk); margin-right: 12%; }
.ask-form textarea { width: 100%; padding: 12px; background: transparent; color: var(--ink); border: 1.5px solid var(--ink); font-family: var(--font-mono); font-size: 1rem; line-height: 1.5; resize: vertical; min-height: 72px; }
.ask-form textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ask-form textarea::placeholder { color: var(--ink-muted); }
.ask-actions { margin-top: 12px; }
[aria-busy="true"] .ask-assistant:last-child { color: var(--ink-muted); }

/* ---------- Footer links, landing pages, privacy ---------- */
.foot-nav { margin-bottom: 10px; }
.foot-nav ul { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-nav a { display: inline-block; padding-block: 10px; margin-block: -10px; text-decoration-color: var(--rule-strong); }
.more { margin-top: 4px; }
.qa h3 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(1.375rem, 1.8vw, 1.625rem); line-height: 1.1; letter-spacing: 0; margin-top: 1.4em; }
.qa h3:first-child { margin-top: 0; }
.qa h3 + p { margin-top: 0.5em; }
.simple .page-prose { max-width: var(--measure); font-size: 1.0625rem; line-height: 1.6; }

/* ---------- Ink: writing, circles, checks (js/ink.js) ---------- */
/* Hand-written lines are held back until the script has split them into words, then each word wipes in like a pen stroke. */
html.ink:not(.ink-still) :is(.sec-head h2, p.ask, .form-sent, .now-list > li, .pull blockquote, .month-h, .empty):not(.is-in) { visibility: hidden; }
html.ink:not(.ink-still) .ink-w { display: inline-block; clip-path: inset(-0.4em 100% -0.4em -0.1em); }
html.ink:not(.ink-still) .is-in .ink-w { animation: ink-write var(--d, 300ms) cubic-bezier(0.45, 0, 0.55, 1) var(--t, 0ms) both; }
@keyframes ink-write {
  from { clip-path: inset(-0.4em 100% -0.4em -0.1em); }
  to { clip-path: inset(-0.4em -0.15em -0.4em -0.1em); }
}
/* A pen circle around a word. The SVG sits behind the text and stretches to the word. */
.ring { position: relative; isolation: isolate; white-space: nowrap; }
.ink-ring { position: absolute; z-index: 1; left: -1.3em; top: -0.62em; width: calc(100% + 2.6em); height: calc(100% + 1.24em); max-width: none; overflow: visible; pointer-events: none; }
.ink-ring path { fill: none; stroke: var(--pen); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); }
.ring.is-in .ink-ring path { animation: ink-draw 0.75s cubic-bezier(0.4, 0, 0.3, 1) 0.45s forwards; }
.hero h1 .ink-ring, .contact-h .ink-ring { left: -0.18em; top: -0.1em; width: calc(100% + 0.36em); height: calc(100% + 0.22em); }
.lede .ink-ring { left: -0.3em; top: -0.3em; width: calc(100% + 0.6em); height: calc(100% + 0.62em); }
.hero h1 .ink-ring path, .contact-h .ink-ring path { stroke-width: 3; }
/* A scribbled underline under a phrase, and under the current page in the nav. */
.scribble { position: relative; white-space: nowrap; }
.ink-under { position: absolute; left: -0.1em; bottom: -0.36em; width: calc(100% + 0.2em); height: 0.55em; max-width: none; overflow: visible; pointer-events: none; }
.ink-under path { fill: none; stroke: var(--pen); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; stroke-dasharray: var(--len, 1000); stroke-dashoffset: var(--len, 1000); }
.scribble.is-in .ink-under path { animation: ink-draw 0.55s cubic-bezier(0.4, 0, 0.3, 1) 0.25s forwards; }
html.ink .nav a[aria-current="page"] { text-decoration: none; position: relative; }
.nav .ink-under { bottom: calc(50% - 0.95em); height: 0.5em; }
.nav .ink-under path { stroke-width: 1.8; }
/* Check marks on lists. The square bullet stays for browsers without script. */
.ink-check { position: absolute; left: 0; width: 18px; height: 18px; pointer-events: none; }
.ink-check path { fill: none; stroke: var(--pen); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len, 40); stroke-dashoffset: var(--len, 40); }
.is-in .ink-check path { animation: ink-draw 0.4s cubic-bezier(0.4, 0, 0.3, 1) var(--t, 0ms) forwards; }
html.ink .spec-list li { padding-left: 26px; }
html.ink .spec-list li::before { display: none; }
.spec-list .ink-check { top: 0.3em; }
.ways-check .way { position: relative; }
html.ink .ways-check .way { padding-left: 30px; }
.ways-check .ink-check { top: calc(26px + 0.3em); width: 20px; height: 20px; }
@keyframes ink-draw { to { stroke-dashoffset: 0; } }
html.ink-still .ink-ring path, html.ink-still .ink-under path, html.ink-still .ink-check path { animation: none; stroke-dashoffset: 0; }
/* Reduced motion: these are reveals, not movement, so they stay. The palette transitions above are the ones that stop. */
