:root {
  color-scheme: light dark;
  --bg: #fafafa;
  --surface: #fff;
  --ink: #1c1d24;
  --muted: #5b606b;
  --line: #dedfe5;
  --soft: #f2f2f5;
  --accent: #4649a8;
  --tint: #eeeffb;
  font-family: Geist, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181b; --surface: #202126; --ink: #f7f7f9; --muted: #b4b5c0;
    --line: #393b43; --soft: #2a2c34; --accent: #babdfc; --tint: #31324d;
  }
  .brand img { filter: invert(1); }
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { position: absolute; z-index: 1; padding: .65rem 1rem; background: var(--surface); }
.wrap { width: min(1136px, calc(100% - 64px)); margin-inline: auto; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 21px; font-weight: 700; letter-spacing: -.055em; }
.brand img { width: 25px; height: 30px; object-fit: contain; }
.repo, .back { color: var(--muted); font-size: .88rem; }
.repo:hover, .back:hover, .pager a:hover { color: var(--accent); text-decoration: underline; }
main { padding-block-end: 48px; }
.intro { padding-block: clamp(32px, 5vw, 64px) 28px; }
h1, h2, p, pre { margin: 0; }
h1 { line-height: 1.2; letter-spacing: -.045em; font-size: clamp(2.05rem, 4.4vw, 3.25rem); }
.search { display: flex; align-items: center; gap: 5px; max-width: 660px; min-height: 50px; margin-top: 23px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.search:focus-within { border-color: var(--accent); }
.search input { min-width: 0; flex: 1; border: 0; border-radius: 5px; background: transparent; color: var(--ink); padding: 7px 12px; }
.search input:focus-visible { outline-offset: -2px; }
.search input::placeholder { color: var(--muted); }
button { border: 0; border-radius: 6px; background: var(--ink); color: var(--surface); font-weight: 600; padding: 9px 21px; cursor: pointer; }
button:hover { opacity: .84; }
.types { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 22px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.types a { padding: 7px 12px; border-radius: 6px; display: inline-flex; align-items: baseline; gap: 6px; font-size: .9rem; color: var(--muted); }
.types a:hover { background: var(--soft); }
.types a[aria-current] { color: var(--accent); background: var(--tint); font-weight: 650; }
.types small { font-size: .75rem; font-variant-numeric: tabular-nums; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.card { display: flex; min-width: 0; flex-direction: column; align-items: start; gap: 10px; padding: 21px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.card:hover { border-color: var(--accent); }
.kind, .author, .excerpt { color: var(--muted); }
.kind { font-size: .73rem; font-weight: 600; letter-spacing: .035em; }
.card h2 { font-size: 1.15rem; line-height: 1.32; letter-spacing: -.025em; overflow-wrap: anywhere; }
.card:hover h2 { color: var(--accent); }
.excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.55; font-size: .9rem; overflow-wrap: anywhere; }
.author { font-size: .79rem; overflow-wrap: anywhere; }
.card .author { margin-top: auto; padding-top: 8px; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 30px; }
.pager a, .pager span, #summary { font-size: .9rem; }
.pager span, #summary { color: var(--muted); }
.pager a { width: fit-content; padding: 8px 0; }
.pager :last-child { justify-self: end; }
#summary:not(:empty) { margin: 0 0 20px; }
.reading { max-width: 840px; margin-inline: auto; padding-top: 32px; }
.details-meta { margin: 32px 0 12px; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.reading h1 { overflow-wrap: anywhere; font-size: clamp(1.9rem, 4.1vw, 3rem); }
.copy-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 26px 0 16px; }
#feedback { font-size: .88rem; color: var(--muted); }
#prompt { padding: clamp(18px, 4vw, 32px); border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font: inherit; font-size: 1rem; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .wrap { width: calc(100% - 32px); }
  .bar { min-height: 55px; }
  .types { gap: 2px; }
  .types a { padding: 7px 8px; }
  .intro { padding-bottom: 20px; }
  .card { padding: 17px; }
}
