/* Ideas: the article index and article pages. Tokens match the Get in touch page; prose is set in Source Serif 4, as in the Wiki demo. */
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-latin-var.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-latin-var-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
:root {
  --bg: #FFF9F2; --panel: #FFFFFF; --ink: #0B1F36; --body: #22364B; --muted: #546779; --line: rgba(11, 31, 54, .14); --line-strong: rgba(11, 31, 54, .28);
  --orange: #FF6A00; --btn: #0B1F36; --btn-ink: #FFFFFF;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #0A1A2D; --panel: #0F2238; --ink: #EEF1F4; --body: #D5DDE5; --muted: #9FB0C2; --line: rgba(238, 241, 244, .14); --line-strong: rgba(238, 241, 244, .28); --btn: #EEF1F4; --btn-ink: #0B1F36; color-scheme: dark; } }
:root[data-theme="dark"] { --bg: #0A1A2D; --panel: #0F2238; --ink: #EEF1F4; --body: #D5DDE5; --muted: #9FB0C2; --line: rgba(238, 241, 244, .14); --line-strong: rgba(238, 241, 244, .28); --btn: #EEF1F4; --btn-ink: #0B1F36; color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
a { color: inherit; text-decoration-color: var(--orange); text-underline-offset: 3px; text-decoration-thickness: 2px; }
p, h1, h2, h3 { margin: 0; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--btn); color: var(--btn-ink); padding: 8px 14px; border-radius: 999px; text-decoration: none; z-index: 10; }
.skip:focus { top: 12px; }

/* top bar */
.bar { display: flex; align-items: center; gap: 18px; padding: 18px max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px)); max-width: 1200px; margin: 0 auto; }
.home { color: var(--ink); display: inline-flex; }
.lockup { height: 34px; width: auto; display: block; }
.spacer { flex: 1; }
.bar-link { font-size: 15px; font-weight: 600; text-decoration: none; }
.bar-link:hover, .bar-link[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--orange); }
.switch { position: relative; flex: none; width: 42px; height: 22px; padding: 0; border-radius: 999px; border: 1.5px solid var(--muted); background: transparent; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); transition: transform .2s ease; }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; text-decoration: none; border-radius: 999px; padding: 10px 18px; border: 1.5px solid var(--ink); color: var(--ink); white-space: nowrap; }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn-solid { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.btn-solid:hover { background: transparent; color: var(--ink); }
.btn svg { width: 18px; height: 18px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 40px max(16px, env(safe-area-inset-right, 0px)) 72px max(16px, env(safe-area-inset-left, 0px)); }

/* article head */
.kicker { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kicker svg { width: 30px; height: 30px; color: var(--ink); }
.article-head { display: grid; gap: 18px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.article-head h1 { font-size: clamp(38px, 6.4vw, 60px); font-weight: 800; letter-spacing: -.028em; line-height: 1.04; text-wrap: balance; }
.article-head h1 .dot { color: var(--orange); }
.dek { font-size: 20px; line-height: 1.5; color: var(--muted); max-width: 46ch; text-wrap: pretty; }
.meta { font-size: 14px; color: var(--muted); }

/* prose */
.prose { font-family: var(--serif); font-size: 20px; line-height: 1.7; color: var(--body); display: grid; gap: 1.05em; padding-top: 36px; max-width: 64ch; }
.prose p { text-wrap: pretty; }
.prose > p:first-child { font-size: 22px; line-height: 1.6; color: var(--ink); }
.prose .solo { color: var(--ink); font-weight: 600; }
.prose em { font-style: italic; }
.prose a { color: var(--ink); text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose .fig { margin: .6em 0 .4em; display: grid; gap: 10px; }
.prose .fig img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.prose .fig figcaption { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--muted); }
.prose .fig .credit { white-space: nowrap; }
.prose h2 { font-family: var(--font); font-size: 24px; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; color: var(--ink); margin-top: .9em; }

/* "see it working" card after a lab note */
.see { margin-top: 44px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; }
.see svg.app { width: 40px; height: 40px; grid-row: span 3; color: var(--ink); }
.see h2 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.see h2 .dot { color: var(--orange); }
.see p { font-size: 15px; color: var(--muted); }
.see .links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

/* more ideas + the article index */
.more { margin-top: 64px; display: grid; gap: 18px; }
.more h2, .index-head h2 { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.entries { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.entry a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 18px; align-items: start; text-decoration: none; padding: 20px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); transition: border-color .15s ease, transform .15s ease; }
.entry a:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.entry svg { width: 36px; height: 36px; grid-row: span 3; color: var(--ink); }
.entry .type { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.entry h3 { font-size: 21px; font-weight: 800; letter-spacing: -.012em; line-height: 1.2; }
.entry a:hover h3 { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.entry p { font-size: 15px; color: var(--muted); }

.index-head { display: grid; gap: 14px; margin-bottom: 36px; }
.index-head h1 { font-size: clamp(38px, 6.4vw, 60px); font-weight: 800; letter-spacing: -.028em; line-height: 1.04; }
.index-head p { font-size: 19px; color: var(--muted); max-width: 48ch; }

/* closing band */
.close { margin-top: 72px; padding: 28px; border-radius: 20px; background: var(--btn); color: var(--btn-ink); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.close h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.close p { font-size: 15px; opacity: .8; margin-top: 4px; }
.close .btn { border-color: var(--btn-ink); color: var(--btn-ink); }
.close .btn:hover { background: var(--btn-ink); color: var(--btn); }

.foot { max-width: 760px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }

@media (max-width: 600px) {
  .lockup { height: 28px; }
  .bar { gap: 14px; }
  .bar .btn { display: none; }
  .wrap { padding-top: 24px; }
  .prose { font-size: 18.5px; }
  .prose > p:first-child { font-size: 20px; }
  .dek { font-size: 18px; }
  .see, .entry a { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .see svg.app, .entry svg { grid-row: auto; }
  .close { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { .switch::after, .entry a { transition: none; } .entry a:hover { transform: none; } }
