/* alinaschanz.life — hand-written, no framework. fourth design, september 2026:
   blue ink on ledger paper, one column, hairlines instead of cards, the numbers in mono. */

/* self-hosted, latin subsets, variable fonts. newsreader, inter and jetbrains mono are all under the sil open font license. */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/newsreader-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/newsreader-italic-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/inter-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* the palette. light is the paper; dark is the same page at night. the system decides
   until the button in the header does. */
:root {
  color-scheme: light;
  --bg: #f5f5f0;
  --surface: #fbfbf8;
  --surface-2: #ebebe4;
  --fg: #14161a;
  --muted: #5c6068;
  --faint: #8f939b;
  --line: #dcdcd3;
  --line-2: #c6c6bd;
  --accent: #1d3fbd;
  --accent-soft: rgba(29, 63, 189, .10);
  --accent-ink: #ffffff;
  --amber: #a86400;
  --up: #1e7a45;
  --down: #b8322a;
  --code-bg: #14171b;
  --code-fg: #dfe3e8;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1114;
    --surface: #15181c;
    --surface-2: #1e2227;
    --fg: #e7e7e1;
    --muted: #a0a4ab;
    --faint: #6e737b;
    --line: #262a30;
    --line-2: #383d45;
    --accent: #8fa6ff;
    --accent-soft: rgba(143, 166, 255, .14);
    --accent-ink: #0f1114;
    --amber: #e0a24a;
    --up: #5fcf8f;
    --down: #f0857a;
    --code-bg: #0b0d10;
    --code-fg: #dfe3e8;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1114;
  --surface: #15181c;
  --surface-2: #1e2227;
  --fg: #e7e7e1;
  --muted: #a0a4ab;
  --faint: #6e737b;
  --line: #262a30;
  --line-2: #383d45;
  --accent: #8fa6ff;
  --accent-soft: rgba(143, 166, 255, .14);
  --accent-ink: #0f1114;
  --amber: #e0a24a;
  --up: #5fcf8f;
  --down: #f0857a;
  --code-bg: #0b0d10;
  --code-fg: #dfe3e8;
}

/* base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16.5px/1.6 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-soft); }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.012em; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .08em .35em; border-radius: 3px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.label { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.label b { color: var(--faint); font-weight: 500; margin-right: 8px; }
.skip { position: absolute; left: -999px; top: 10px; background: var(--fg); color: var(--bg); padding: 8px 12px; border-radius: 4px; z-index: 20; font-size: 14px; text-decoration: none; }
.skip:focus { left: 12px; }

/* header: the name, four words, one button. sticky, and a hairline appears once you scroll */
.top { position: sticky; top: 0; z-index: 10; padding: 16px 0 10px; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid transparent; }
@supports (animation-timeline: scroll()) { .top { animation: topline linear both; animation-timeline: scroll(root); animation-range: 0 80px; } }
@keyframes topline { to { border-bottom-color: var(--line); } }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-family: var(--serif); font-size: 21px; font-weight: 500; text-decoration: none; letter-spacing: -.01em; font-variation-settings: "opsz" 32; white-space: nowrap; }
.brand svg { width: 20px; height: 20px; flex: none; }
.menu { display: flex; align-items: center; gap: 18px; list-style: none; margin: 0; padding: 0; }
.menu a { position: relative; display: inline-block; color: var(--muted); font-size: 14.5px; text-decoration: none; padding: 3px 0; }
.menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--fg); transform: scaleX(0); transform-origin: 0 50%; transition: transform .28s cubic-bezier(.2, .7, .2, 1); }
.menu a:hover { color: var(--fg); }
.menu a:hover::after, .menu a[aria-current="page"]::after { transform: scaleX(1); }
.menu a[aria-current="page"] { color: var(--fg); }
.menu a.ext::after { content: "↗"; margin-left: 3px; font-size: 12px; color: var(--faint); }
.theme { width: 30px; height: 30px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; padding: 0; }
.theme:hover { color: var(--fg); border-color: var(--fg); }
.theme:active { transform: scale(.92); }
.theme svg { width: 15px; height: 15px; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.theme:hover svg { transform: rotate(25deg); }
.theme .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .sun { display: block; }
  :root:not([data-theme="light"]) .theme .moon { display: none; }
}
:root[data-theme="dark"] .theme .sun { display: block; }
:root[data-theme="dark"] .theme .moon { display: none; }
@media (max-width: 440px) { .menu { gap: 13px; } .menu a { font-size: 14px; } .menu .hide-sm { display: none; } .brand { font-size: 19px; } .top { padding: 12px 0 8px; } }

/* home: the thesis, then the chain as it is right now */
html, body { overflow-x: clip; }
body { position: relative; }
.hero-art { position: absolute; left: 0; top: 0; width: 100%; height: 640px; z-index: -2; pointer-events: none; display: block;
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.28), rgba(0,0,0,.5) 50%, #000 78%); mask-image: linear-gradient(90deg, rgba(0,0,0,.28), rgba(0,0,0,.5) 50%, #000 78%); }
.hero { padding: 48px 0 36px; }
.painting { position: absolute; z-index: -1; top: 136px; right: 3vw; width: 240px; height: 240px; border-radius: 50%; object-fit: cover; display: none;
  box-shadow: 0 0 0 1px var(--line-2), 0 30px 60px -34px rgba(0, 0, 0, .5); }
@media (max-width: 760px) { .hero-art { height: 400px; opacity: .55; -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent); mask-image: linear-gradient(180deg, #000 45%, transparent); } }
@media (min-width: 1300px) { .painting { display: block; } }
@media (min-width: 1500px) { .painting { width: 300px; height: 300px; top: 112px; right: 4vw; } }
:root[data-theme="dark"] .painting { filter: brightness(.8) saturate(.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .painting { filter: brightness(.8) saturate(.9); } }
.hero .avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin: 0 0 26px; box-shadow: 0 0 0 1px var(--line-2); }
.hero h1 { font-size: clamp(36px, 6.8vw, 60px); line-height: 1.04; font-weight: 400; letter-spacing: -.02em; font-variation-settings: "opsz" 72; margin: 0 0 22px; }
.hero > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero > :nth-child(2) { animation-delay: .06s; } .hero > :nth-child(3) { animation-delay: .12s; } .hero > :nth-child(4) { animation-delay: .18s; } .hero > :nth-child(5) { animation-delay: .24s; }
@keyframes rise { from { opacity: .25; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.painting { animation: fadein 1.4s ease both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@supports (animation-timeline: scroll()) { .hero-art { animation: drift linear both; animation-timeline: scroll(root); animation-range: 0 640px; } }
@keyframes drift { to { transform: translateY(140px); opacity: 0; } }
.hero h1 b { font-weight: 600; }
.hero .lead { font-size: 17.5px; line-height: 1.6; color: var(--muted); max-width: 60ch; margin: 0 0 26px; }
.lead a { color: var(--fg); }
.status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--fg); }
.status .k { color: var(--muted); margin-right: 6px; }
.status span[id] { font-weight: 500; border-radius: 3px; transition: opacity .3s ease; }
.tick { animation: tick 1.1s ease-out; }
@keyframes tick { 0% { background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); } 100% { background: transparent; box-shadow: 0 0 0 4px transparent; } }
.in { animation: fadein .5s ease; }
.status .up { color: var(--up); } .status .down { color: var(--down); } .status .amber { color: var(--amber); }
.status a { color: var(--muted); }
.hero .links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; font-size: 14.5px; }
.hero .links a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 1px; transition: color .2s ease, border-color .2s ease; }
.hero .links a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.hero .links a.ext::after { content: "↗"; margin-left: 3px; font-size: 12px; color: var(--faint); }

/* sections are ruled, like a ledger */
section { padding: 34px 0; border-top: 1px solid var(--line); }
.hero { border-top: 0; }
@supports (animation-timeline: view()) { main > section:not(.hero) { animation: reveal .7s cubic-bezier(.2, .7, .2, 1) both; animation-timeline: view(); animation-range: entry 0% entry 30%; } }
@keyframes reveal { from { opacity: .3; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.sec-head h2 { font-size: 27px; line-height: 1.15; font-variation-settings: "opsz" 36; }
.sec-head a, .sec-head .links { font-size: 13.5px; color: var(--muted); white-space: nowrap; text-decoration: none; }
.sec-head a:hover, .sec-head .links a:hover { color: var(--accent); }
.sec-def { color: var(--muted); font-size: 15.5px; line-height: 1.55; max-width: 62ch; margin: 0 0 18px; }
.sec-def a { color: var(--muted); }

/* the live panel: the one object on the page with a frame, because it is an instrument */
.live { border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); overflow: hidden; box-shadow: 0 1px 2px rgba(20, 22, 26, .03), 0 22px 44px -32px rgba(20, 22, 26, .35); }
.tile .v, .tile .s { transition: color .3s ease; }
.blocks rect { transition: y .5s cubic-bezier(.2, .7, .2, 1), height .5s cubic-bezier(.2, .7, .2, 1), fill-opacity .5s ease; }
.live-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--muted); }
.live-head b { color: var(--fg); font-weight: 500; }
.pulse { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--up); margin-right: 8px; box-shadow: 0 0 0 0 var(--up); animation: pulse 2.4s ease-out infinite; vertical-align: 1px; }
.pulse.off { background: var(--faint); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--up) 45%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { padding: 14px 16px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.tile:nth-child(2n) { border-right: 0; }
@media (min-width: 640px) { .tile:nth-child(2n) { border-right: 1px solid var(--line); } .tile:last-child { border-right: 0; } }
.tile .k { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.tile .v { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 500; line-height: 1.1; letter-spacing: -.01em; }
.tile .s { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); margin-top: 7px; }
.tile .s.up { color: var(--up); } .tile .s.down { color: var(--down); }
.tile .v.amber { color: var(--amber); }
.spark { display: block; width: 100%; padding: 12px 16px 8px; }
.spark svg { display: block; width: 100%; height: 64px; overflow: visible; color: var(--accent); }
.spark path { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark .area { fill: url(#sparkfill); stroke: none; }
.spark-axis { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 6px; }
.spark-cap { margin-top: 8px; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); }
.spark-cap.up { color: var(--up); } .spark-cap.down { color: var(--down); }
.blocks { padding: 12px 16px 4px; border-top: 1px solid var(--line); }
.blocks svg { display: block; width: 100%; height: 36px; }
.blocks .muted { font-family: var(--mono); font-size: 12px; }
.blocks-cap { padding: 0 16px 10px; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); }
.live-foot { padding: 8px 16px 10px; font-size: 12px; color: var(--faint); border-top: 1px solid var(--line); }
.live-foot a { color: var(--muted); }
.skeleton { color: transparent !important; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; border-radius: 3px; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* rows: a date, a title, a line about it */
.notes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.notes li { border-bottom: 1px solid var(--line); }
.notes a.row { display: grid; grid-template-columns: 1fr; gap: 4px 20px; padding: 16px 12px; margin: 0 -12px; border-radius: 8px; color: inherit; text-decoration: none; transition: background-color .25s ease; }
.notes a.row:hover { background: var(--surface); }
.notes .t::after { content: "→"; display: inline-block; margin-left: 10px; color: var(--accent); opacity: 0; transform: translateX(-6px); transition: opacity .25s ease, transform .25s cubic-bezier(.2, .7, .2, 1); }
.notes a.row:hover .t::after { opacity: 1; transform: none; }
@media (min-width: 640px) { .notes a.row { grid-template-columns: 108px 1fr; } }
.notes time { font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding-top: 6px; }
.notes .t { display: block; font-family: var(--serif); font-size: 21px; line-height: 1.3; font-weight: 500; font-variation-settings: "opsz" 24; letter-spacing: -.008em; transition: color .12s ease; }
.notes a.row:hover .t { color: var(--accent); }
.notes .d { display: block; color: var(--muted); font-size: 15px; margin-top: 4px; }
.notes .m { display: block; color: var(--faint); font-family: var(--mono); font-size: 12px; margin-top: 8px; }
.notes .tag { display: inline-block; border: 1px solid var(--line-2); border-radius: 3px; padding: 0 5px; margin-right: 5px; color: var(--muted); line-height: 1.6; }

/* the terminal stays a terminal in both themes */
.term-win { border-radius: 6px; overflow: hidden; border: 1px solid #262b31; background: #111417; margin: 0 0 12px; }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: #171b1f; border-bottom: 1px solid #262b31; font-family: var(--mono); font-size: 12px; color: #7c8590; }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #3a4048; }
.term-bar i:nth-child(1) { background: #f26d5b; } .term-bar i:nth-child(2) { background: #f2bf5b; } .term-bar i:nth-child(3) { background: #5bd07f; }
.term-bar span { margin-left: 8px; }
.term { margin: 0; color: #d7dce2; padding: 16px 18px; font-family: var(--mono); font-size: 13px; line-height: 1.6; overflow-x: auto; }
.term .cmd { color: #9fb3ff; }
.term .cmd::before { content: "$ "; color: #6b7280; }
.term .dim { color: #7c8590; }
.term .up { color: #7bd88f; } .term .down { color: #f0907f; }
.term-cap { font-size: 14.5px; color: var(--muted); margin: 0 0 18px; }
.repos { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.repos li { display: grid; grid-template-columns: 1fr; gap: 2px 18px; padding: 11px 12px; margin: 0 -12px; border-bottom: 1px solid var(--line); font-size: 15px; border-radius: 6px; transition: background-color .25s ease; }
.repos li:hover { background: var(--surface); }
@media (min-width: 640px) { .repos li { grid-template-columns: 168px 1fr; } }
.repos a { font-family: var(--mono); font-size: 13.5px; text-decoration: none; padding-top: 2px; }
.repos a:hover { text-decoration: underline; }
.repos span { display: block; color: var(--muted); }

/* datasets */
.sets { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.sets li { display: grid; grid-template-columns: 1fr; gap: 4px 20px; padding: 12px 12px; margin: 0 -12px; border-bottom: 1px solid var(--line); border-radius: 6px; transition: background-color .25s ease; }
.sets li:hover { background: var(--surface); }
@media (min-width: 640px) { .sets li { grid-template-columns: 1fr 160px; } .sets .w { text-align: right; } }
.sets a { color: var(--fg); text-decoration: none; font-size: 15.5px; }
.sets a:hover { color: var(--accent); }
.sets .d { display: block; color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.sets .w { font-family: var(--mono); font-size: 12px; color: var(--faint); padding-top: 4px; }

/* github activity, as a log */
.activity { margin-top: 22px; }
.activity .k { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.activity .k .muted { text-transform: none; letter-spacing: 0; margin-left: 8px; }
.commits { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.commits li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.commits li:last-child { border-bottom: 1px solid var(--line); }
.commits .repo { font-family: var(--mono); font-size: 12.5px; color: var(--accent); margin-right: 8px; }
.commits .msg { color: var(--fg); min-width: 0; overflow-wrap: anywhere; }
.commits .when { font-family: var(--mono); font-size: 12px; color: var(--faint); white-space: nowrap; }
.commits a { color: inherit; text-decoration: none; }
.commits a:hover { color: var(--accent); }

/* now */
.now p { font-family: var(--serif); font-size: 19.5px; line-height: 1.5; font-variation-settings: "opsz" 20; max-width: 60ch; margin: 0 0 12px; }
.now .when { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--faint); }

/* elsewhere: the handful of places, each a row */
.stack { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.stack li { border-bottom: 1px solid var(--line); }
.stack a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 12px; margin: 0 -12px; border-radius: 6px; color: var(--fg); text-decoration: none; font-size: 15px; transition: background-color .25s ease; }
.stack a:hover { background: var(--surface); }
.stack a span:last-child { font-family: var(--mono); font-size: 12.5px; color: var(--muted); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.stack a:hover span:first-child { color: var(--accent); }

/* the theme switch fades instead of snapping */
body, .top, .live, .tile, .stats, .chart, .grid-table, .switch, .repo-card, .kv .item, .log li, .commits li, .notes li, .repos li, .sets li, .stack li, footer, code, .fpr, .tag { transition: background-color .35s ease, border-color .35s ease, color .35s ease; }
a { transition: color .2s ease, text-decoration-color .2s ease; }
.btn { transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .15s ease; }
.btn:active { transform: scale(.97); }
/* one page to the next: a short cross-fade where the browser supports it */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .26s; animation-timing-function: ease; }
/* how far you are into an article */
@supports (animation-timeline: scroll()) { .article { --progress: 1; } .article::before { content: ""; position: fixed; left: 0; top: 0; z-index: 30; height: 2px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); animation: progress linear both; animation-timeline: scroll(root); pointer-events: none; } }
@keyframes progress { to { transform: scaleX(1); } }

/* footer */
footer { margin-top: 44px; padding: 30px 0 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 560px) { .foot { grid-template-columns: 1fr 1fr; } }
@media (min-width: 760px) { .foot { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.foot h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 0 0 10px; font-weight: 500; }
.foot p { margin: 0 0 8px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 0 0 6px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--accent); text-decoration: underline; }
.foot .fine { color: var(--faint); font-size: 12.5px; margin-top: 14px; }

/* an article, a page of prose */
.article { padding: 40px 0 24px; }
.crumbs { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-bottom: 24px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.article h1 { font-size: clamp(30px, 5.2vw, 42px); line-height: 1.12; font-weight: 500; font-variation-settings: "opsz" 72; margin-bottom: 14px; max-width: 26ch; }
.article .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; color: var(--muted); font-size: 14px; margin-bottom: 32px; max-width: 62ch; }
.article .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.article .meta a { color: var(--muted); }
.prose { font-family: var(--serif); font-size: 18.5px; line-height: 1.62; font-variation-settings: "opsz" 18; max-width: 66ch; }
.prose p { margin: 0 0 1.15em; }
.prose .lede { font-size: 21px; line-height: 1.5; font-variation-settings: "opsz" 24; color: var(--fg); }
.prose h2 { font-size: 25px; line-height: 1.2; font-variation-settings: "opsz" 36; margin: 1.5em 0 .5em; }
.prose h2 + p, .prose h2 + ul, .prose h2 + ol { margin-top: 0; }
.prose ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.prose ol li { margin: 0 0 .8em; padding-left: .2em; }
.prose ol li::marker { font-family: var(--mono); color: var(--accent); font-size: 14px; }
.prose ul { padding-left: 1.15em; margin: 0 0 1.3em; }
.prose ul li { margin: 0 0 .45em; }
.prose ul li::marker { color: var(--faint); }
.prose strong { font-weight: 600; }
.prose em { font-style: italic; }
.prose code { font-size: .82em; }
.prose figure { margin: 0 0 1.4em; }
.prose figure img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.prose figcaption { font-family: var(--sans); font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.prose .fine { font-family: var(--sans); color: var(--muted); font-size: 14.5px; line-height: 1.55; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 28px; }
.prose .mono { font-size: .8em; }
.fine-top { font-family: var(--sans); color: var(--muted); font-size: 14.5px; }
.data-wrap { overflow-x: auto; margin: 4px 0 1.5em; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.data { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 15px; }
.data td, .data th { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.data th { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.data tr:last-child td { border-bottom: 0; }
.data td:first-child { color: var(--muted); width: 34%; }
.data td:not(:first-child) { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 14px; }
.data .up { color: var(--up); } .data .down { color: var(--down); }
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 36px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); font-family: var(--sans); }
.share .lbl { color: var(--muted); font-size: 14px; margin-right: 8px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--fg); background: transparent; font-family: var(--sans); font-size: 14px; font-weight: 500; text-decoration: none; }
.btn:hover { border-color: var(--fg); }
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn svg { width: 15px; height: 15px; }
.author { display: flex; gap: 14px; align-items: center; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-family: var(--sans); }
.author img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.author b { display: block; font-family: var(--serif); font-weight: 500; font-size: 17.5px; }
.author span { color: var(--muted); font-size: 14px; }

/* 404 */
.oops { padding: 100px 0 80px; text-align: center; border-top: 0; }
.oops h1 { font-size: clamp(40px, 8vw, 72px); font-weight: 400; font-variation-settings: "opsz" 72; }
.oops p { color: var(--muted); margin: 14px auto 28px; max-width: 40ch; }
.oops .mono { color: var(--faint); font-size: 13px; }

/* verify: where i am, as rows */
.kv { display: block; margin: 0 0 1.5em; border-top: 1px solid var(--line); }
.kv .item { display: grid; grid-template-columns: 1fr; gap: 2px 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .kv .item { grid-template-columns: 108px 1fr; } }
.kv .k { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 5px; }
.kv .v { font-size: 16.5px; line-height: 1.5; }
.fpr { display: block; font-family: var(--mono); font-size: 13.5px; letter-spacing: .04em; word-break: break-all; background: var(--surface-2); padding: 10px 12px; border-radius: 4px; margin: 0 0 12px; }
pre.code { font-family: var(--mono); font-size: 13px; line-height: 1.6; background: var(--code-bg); color: var(--code-fg); border-radius: 6px; padding: 12px 14px; overflow-x: auto; margin: 0 0 1.3em; }

/* source tables (methods, privacy) */
.src { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 14.5px; }
.src th, .src td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.src th { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.src tr:last-child td { border-bottom: 0; }
.src td:first-child { color: var(--fg); }

/* data page */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 0 0 14px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); overflow: hidden; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats .tile .v { font-size: 20px; }
@media (max-width: 639px) { .stats .tile:nth-last-child(-n+2) { border-bottom: 0; } }
@media (min-width: 640px) { .stats .tile { border-bottom: 0; } }
.chart { background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; padding: 16px 16px 10px; margin: 0 0 10px; }
.chart svg { display: block; width: 100%; height: 220px; overflow: visible; }
.chart .legend { display: flex; flex-wrap: wrap; gap: 14px; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 10px; }
.chart .legend i { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin-right: 6px; border-radius: 2px; background: var(--accent); }
.chart .legend i.band { height: 10px; opacity: .25; }
.chart .legend i.max { background: var(--amber); }
.grid-table { overflow-x: auto; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); margin: 18px 0 1.4em; }
.grid-table table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.grid-table th, .grid-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.grid-table th { color: var(--muted); font-weight: 500; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.grid-table th:first-child, .grid-table td:first-child { text-align: left; }
.grid-table tr:last-child td { border-bottom: 0; }

/* scripts page: the repositories as a ruled grid */
.repo-cards { display: grid; grid-template-columns: 1fr; gap: 0 28px; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .repo-cards { grid-template-columns: repeat(2, 1fr); } }
.repo-card { padding: 16px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; font-family: var(--sans); }
.repo-card h3 { font-family: var(--mono); font-weight: 500; font-size: 14px; letter-spacing: 0; margin-bottom: 6px; }
.repo-card h3 a { text-decoration: none; }
.repo-card h3 a:hover { text-decoration: underline; }
.repo-card p { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 0 0 10px; flex: 1; }
.repo-card .row { display: flex; flex-wrap: wrap; gap: 5px 12px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.repo-card .ok { color: var(--up); } .repo-card .bad { color: var(--down); }
.repo-card code { display: block; margin-top: 10px; padding: 6px 9px; font-size: 12.5px; overflow-x: auto; white-space: nowrap; border-radius: 3px; }

/* the one switch on the privacy page */
.switch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); font-family: var(--sans); font-size: 15px; margin: 0 0 10px; }
.switch button { font: inherit; font-weight: 500; font-size: 14px; padding: 7px 12px; border-radius: 4px; border: 1px solid var(--fg); background: var(--fg); color: var(--bg); cursor: pointer; }
.switch button.off { background: transparent; color: var(--fg); }

/* changelog */
.log { list-style: none; margin: 0 0 1.4em; padding: 0; border-top: 1px solid var(--line); }
.log li { display: grid; grid-template-columns: 1fr; gap: 4px 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .log li { grid-template-columns: 108px 1fr; } }
.log time { font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding-top: 4px; }
.log b { font-weight: 600; }
.log p { margin: 4px 0 0; color: var(--muted); font-size: 16px; }

/* currently looking at: research subjects, one row each */
.looking { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.looking li { display: grid; grid-template-columns: 1fr; gap: 4px 20px; padding: 13px 12px; margin: 0 -12px; border-bottom: 1px solid var(--line); border-radius: 6px; transition: background-color .25s ease; }
.looking li:hover { background: var(--surface); }
@media (min-width: 640px) { .looking li { grid-template-columns: 148px 1fr; } }
.looking .n { font-family: var(--serif); font-size: 19px; line-height: 1.3; font-weight: 500; font-variation-settings: "opsz" 20; letter-spacing: -.008em; padding-top: 1px; }
.looking .b { display: block; min-width: 0; }
.looking .d { display: block; color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 60ch; }
.looking .l { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--faint); margin-top: 6px; }
.looking .l a { color: var(--muted); text-decoration: none; transition: color .2s ease; }
.looking .l a:hover { color: var(--accent); text-decoration: underline; }
.looking-note { color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 62ch; margin: 16px 0 0; }

/* the front page about a person (15 september): a tagline, prose sections, the current research, the rules */
.hero .tagline { font-family: var(--serif); font-size: clamp(21px, 3.4vw, 27px); line-height: 1.3; font-variation-settings: "opsz" 24; color: var(--fg); margin: 0 0 18px; max-width: 32ch; letter-spacing: -.01em; }
.hero .lead p { margin: 0 0 12px; }
.hero .lead p:last-child { margin: 0; }
.prose.home { font-size: 17.5px; line-height: 1.6; max-width: 62ch; }
.prose.home p { margin: 0 0 .9em; }
.prose.home p:last-of-type { margin-bottom: 0; }
.prose.home .when { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--faint); margin-top: 16px; }
.current { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.current li { display: grid; grid-template-columns: 1fr; gap: 6px 20px; padding: 18px 12px; margin: 0 -12px; border-bottom: 1px solid var(--line); border-radius: 6px; transition: background-color .25s ease; }
.current li:hover { background: var(--surface); }
@media (min-width: 640px) { .current li { grid-template-columns: 148px 1fr; } }
.current .n { font-family: var(--serif); font-size: 21px; line-height: 1.3; font-weight: 500; font-variation-settings: "opsz" 24; letter-spacing: -.008em; padding-top: 1px; }
.current .b { min-width: 0; }
.current .b p { font-family: var(--serif); font-size: 17px; line-height: 1.55; font-variation-settings: "opsz" 18; margin: 0 0 .7em; max-width: 58ch; }
.current .l { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.current .l a { color: var(--muted); text-decoration: none; transition: color .2s ease; }
.current .l a:hover { color: var(--accent); text-decoration: underline; }
.rules { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rules li { display: grid; grid-template-columns: 1fr; gap: 2px 20px; padding: 11px 12px; margin: 0 -12px; border-bottom: 1px solid var(--line); border-radius: 6px; transition: background-color .25s ease; }
.rules li:hover { background: var(--surface); }
@media (min-width: 640px) { .rules li { grid-template-columns: 224px 1fr; } }
.rules .n { font-family: var(--serif); font-size: 17.5px; font-weight: 500; font-variation-settings: "opsz" 20; line-height: 1.45; }
.rules .d { color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 60ch; }
.sets-line { margin: 16px 0 0; }

/* print */
@media print {
  .top, footer, .share, .live, .skip, .activity, .switch, .status, .theme { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  a { color: #000; text-decoration: underline; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 10pt; color: #555; }
}
