/* Editorial serif, technical mono, one blue. Restraint is the whole trick. */
:root {
  /* light-dark(): one token, both themes. data-theme overrides the system */
  color-scheme: light dark;
  --bg: light-dark(#fbfbfa, #07090e);
  --ink: light-dark(#091120, #eef1f6);
  --muted: light-dark(#5b6472, #98a1b0);
  --faint: light-dark(#9aa1ad, #5d6677);
  --line: light-dark(#e4e7ec, #1a202c);
  --line-2: light-dark(#cfd4dc, #2a3241);
  --panel: light-dark(#f2f3f5, #0d1119);
  --card: light-dark(#fff, #0b0e15);
  --blue: light-dark(#1a4cf0, #4a76ff);
  --warn: light-dark(#9a5a0b, #e3a857);
  --r-lg: 14px; /* cards, panels, dialogs: same as the sidebar */
  --r-md: 8px;  /* buttons, inputs, menus */
  --r-sm: 5px;  /* tags, keycaps, avatars */
  --pencil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='1.8'/%3E%3C/filter%3E%3Cg filter='url(%23g)' fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cpath d='M3 6.2C38 3.4 74 7.6 112 5.1S172 3.8 197 5.7' stroke-width='2.3'/%3E%3Cpath d='M10 7.6C62 5.5 118 8 191 6.2' stroke-width='1.1' opacity='.5'/%3E%3C/g%3E%3C/svg%3E");
  --serif: Newsreader, "Iowan Old Style", Georgia, serif;
  --sans: Geist, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* film grain behind everything; cards and panels stay crisp on top */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--noise); opacity: .1; }

* { box-sizing: border-box; margin: 0; }
body { font: 15.5px/1.6 var(--sans); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
::selection { background: var(--blue); color: #fff; }

.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }

/* ── shell: a floating sidebar panel + the column ───── */
.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.folded .shell { grid-template-columns: 76px minmax(0, 1fr); }
.folding .shell { transition: grid-template-columns .45s cubic-bezier(.2, .9, .25, 1); } /* no overshoot here: overshooting the layout flips grids mid-animation */
aside {
  position: sticky; top: 16px; z-index: 5; margin: 16px 0 16px 16px; height: calc(100vh - 32px);
  display: flex; flex-direction: column; padding: 22px 21px 18px; font-size: 14.5px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(9, 17, 32, .04), 0 18px 48px -24px rgba(9, 17, 32, .28);
}
.logo { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 16px; letter-spacing: -.02em; margin-bottom: 36px; }
.logo { margin-left: -7px; gap: 5px; } /* the 30px mark bleeds 7px left so its centre sits on the 16px icon column, inside the clip box */
.folded .logo { overflow: visible; }
.folded .logo .label { display: none; }
.logo .mark { flex: none; width: 30px; height: 30px; margin: -5px 0; display: grid; place-items: center; padding-bottom: 8px; font: italic 400 32px/1 var(--serif); color: var(--ink); } /* the mark is just a serif u */
aside nav, .logo { overflow: hidden; } /* hidden labels must not stretch the folded rail */
aside nav { display: grid; gap: 2px; }
aside nav a { display: flex; align-items: center; gap: 12px; padding: 7px 0; color: var(--muted); transition: color .15s; }
aside nav a:hover, aside nav a[aria-current] { color: var(--ink); }
aside nav a[aria-current] .ico { color: var(--blue); }
aside nav hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.ico.fill { fill: currentColor; stroke: none; }
aside nav .star .ico { transition: transform .5s cubic-bezier(.34, 1.6, .64, 1), fill .2s, stroke .2s; }
aside nav .star:hover .ico { fill: #f5b301; stroke: #f5b301; transform: rotate(72deg) scale(1.15); }
.label { white-space: nowrap; transition: opacity .25s ease, transform .4s cubic-bezier(.34, 1.4, .64, 1); }
.folded aside .label { opacity: 0; transform: translateX(-8px); pointer-events: none; transition-duration: .12s; }
/* labels come back one after another when the panel pops open */
aside nav a:nth-child(2) .label { transition-delay: .04s; }
aside nav a:nth-child(3) .label { transition-delay: .08s; }
aside nav a:nth-child(5) .label { transition-delay: .12s; }
aside nav a:nth-child(6) .label { transition-delay: .16s; }
.folded aside nav a .label { transition-delay: 0s; }
.fold {
  position: absolute; top: 24px; right: -13px; width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); color: var(--muted); cursor: pointer;
  box-shadow: 0 2px 8px -2px rgba(9, 17, 32, .2); transition: color .15s, border-color .15s, transform .2s;
}
.fold:hover { color: var(--blue); border-color: var(--blue); transform: scale(1.08); }
.fold svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s cubic-bezier(.34, 1.4, .64, 1); }
.folded .fold svg { transform: rotate(180deg); }
.status { margin-top: auto; display: flex; align-items: center; gap: 8px; min-height: 16px; }
.status i { width: 6px; height: 6px; margin-left: 5px; flex: none; background: var(--blue); }
.theme { margin-top: 14px; width: fit-content; display: inline-flex; align-items: center; gap: 8px; padding: 5px 9px; border: 1px solid var(--line-2); background: var(--card); border-radius: var(--r-md); cursor: pointer; }
.theme:hover { color: var(--ink); border-color: var(--faint); }
.folded .status .label, .folded .theme .label { display: none; }
.folded .theme { padding: 5px; margin-left: -6px; } /* 28px button centred on the 16px icon column */
main { padding: 104px clamp(24px, 5vw, 80px) 120px; min-width: 0; width: 100%; max-width: 1280px; justify-self: center; }

/* ── hero ─────────────────────────────────────────────── */
h1 { font: 400 clamp(34px, 3.6vw, 46px)/1.1 var(--serif); letter-spacing: -.025em; max-width: 22ch; }
h2 { font: 400 clamp(26px, 2.6vw, 34px)/1.15 var(--serif); letter-spacing: -.02em; }
.lead { margin-top: 22px; font-size: 17px; max-width: 62ch; }
.lead + .lead { margin-top: 12px; color: var(--muted); }
.lead a { position: relative; color: var(--ink); white-space: nowrap; }
/* a pencil line, not an underline: an SVG stroke used as a mask so it takes the theme's blue */
.lead a::after, .sig .name::after {
  content: ""; position: absolute; left: -3px; right: -3px; bottom: -7px; height: 9px; background: var(--blue);
  -webkit-mask: var(--pencil) center / 100% 100% no-repeat; mask: var(--pencil) center / 100% 100% no-repeat;
  animation: sketch .8s .5s cubic-bezier(.6, .1, .2, 1) both;
}
.sig .name::after { bottom: -5px; transition: opacity .3s; }
.lead a:hover::after { animation: resketch .45s cubic-bezier(.6, .1, .2, 1) both; } /* new name = the animation restarts */
@keyframes sketch { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes resketch { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-md); font-size: 14.5px; font-weight: 500; border: 1px solid var(--line-2); background: var(--card); cursor: pointer; white-space: nowrap; transition: border-color .15s, transform .15s; }
.btn:hover { border-color: var(--faint); }
.btn.primary { color: #fff; border-color: #1238c4; background: linear-gradient(#2d5cff, #1642dc); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(10, 30, 120, .3); }
.btn.primary:hover { background: linear-gradient(#3a66ff, #1a48e8); }
.btn.primary:disabled { opacity: .6; cursor: wait; }
.cmd { flex: 1 1 320px; min-width: 0; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--panel); font: 13px var(--mono); max-width: 520px; }
.cmd:focus-within { border-color: var(--blue); background: var(--card); }
.cmd > span { color: var(--faint); }
.cmd input { flex: 1; width: 0; min-width: 0; border: 0; background: none; outline: none; font: inherit; }
.cmd input::placeholder { color: var(--faint); }
.cmd kbd { font: 11px var(--mono); color: var(--muted); border: 1px solid var(--line-2); background: var(--card); padding: 2px 7px; border-radius: var(--r-sm); }

/* ── language panel ───────────────────────────────────── */
.langs-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 80px 0 14px; }
.langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.langs button { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 14px 16px; border: 0; border-radius: var(--r-md); background: transparent; cursor: pointer; font-size: 14.5px; color: var(--muted); text-align: left; transition: background .15s, color .15s, box-shadow .15s; }
.langs button:hover { color: var(--ink); background: color-mix(in srgb, var(--card) 60%, transparent); }
.langs button[aria-pressed="true"] { background: var(--card); color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.langs small { font: 11px var(--mono); color: var(--faint); }

/* ── feed ─────────────────────────────────────────────── */
.feed-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin: 104px 0 24px; }
.feed-head p { color: var(--muted); margin-top: 8px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 12px 0; margin-bottom: -1px; font: 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); cursor: pointer; border-bottom: 1px solid transparent; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.tools { display: flex; align-items: center; gap: 18px; }
.btn.small { height: 30px; padding: 0 12px; font: 11.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.keys { color: var(--faint); }
.keys kbd { font: inherit; border: 1px solid var(--line-2); padding: 0 5px; border-radius: var(--r-sm); color: var(--muted); }
.tabs .n { color: var(--blue); margin-left: 4px; }
.picker { position: relative; }
.picker-btn { display: inline-flex; align-items: center; gap: 10px; height: 30px; padding: 0 10px 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--card); font-size: 13.5px; color: var(--ink); cursor: pointer; transition: border-color .15s; }
.picker-btn .mono { font-size: 10.5px; }
.picker-btn:hover, .picker-btn[aria-expanded="true"] { border-color: var(--faint); }
.picker-btn svg { width: 9px; height: 6px; fill: none; stroke: var(--muted); stroke-width: 1.3; transition: transform .3s cubic-bezier(.34, 1.4, .64, 1); }
.picker-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.picker-list {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 268px; margin: 0; padding: 6px; list-style: none;
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-lg); outline: none;
  box-shadow: 0 1px 2px rgba(9, 17, 32, .06), 0 24px 60px -20px rgba(9, 17, 32, .4);
  transform-origin: top right; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.95);
  transition: opacity .15s, transform .25s cubic-bezier(.34, 1.4, .64, 1), visibility 0s .25s;
}
.picker.open .picker-list { opacity: 1; visibility: visible; transform: none; transition: opacity .15s, transform .3s cubic-bezier(.34, 1.4, .64, 1); }
.picker-list li { display: grid; grid-template-columns: 14px 1fr; column-gap: 6px; padding: 8px 10px; border-radius: var(--r-md); font-size: 14px; cursor: pointer; transition: background .12s; }
.picker-list li::before { content: ""; grid-row: span 2; align-self: center; width: 6px; height: 6px; border-radius: 1px; transform: scale(0); transition: transform .3s cubic-bezier(.34, 1.6, .64, 1); background: var(--blue); }
.picker-list li[aria-selected="true"] { color: var(--blue); }
.picker-list li[aria-selected="true"]::before { transform: none; }
.picker-list li.active { background: var(--panel); }
.picker-list small { grid-column: 2; font: 11px var(--mono); color: var(--faint); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); transition: border-color .3s, box-shadow .3s, background-color .3s; animation: in .45s cubic-bezier(.2, .8, .2, 1) both; }
/* hover: "claim the slot". A dashed outline marches round the card like an empty slot,
   then the gaps close into a solid line. Claimed. (svg.slot comes from card() in app.js) */
.slot { position: absolute; inset: -.5px; width: calc(100% + 1px); height: calc(100% + 1px); overflow: visible; pointer-events: none; }
.slot rect { fill: none; stroke: var(--blue); stroke-width: 1.5; stroke-dasharray: 5 7; opacity: 0; }
.card:hover .slot rect, .card:focus-within .slot rect { animation: claim 1.1s cubic-bezier(.6, 0, .2, 1) forwards; }
@keyframes claim {
  0% { opacity: 0; stroke-dasharray: 5 7; stroke-dashoffset: 0; }
  15% { opacity: 1; }
  65% { stroke-dasharray: 5 7; stroke-dashoffset: -48; }
  100% { opacity: 1; stroke-dasharray: 12 0; stroke-dashoffset: -60; }
}
.card h3 a { outline: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card is the link */
.card:has(h3 a:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } }
.card-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.card-top img { border-radius: var(--r-sm); flex: none; background: var(--panel); }
.repo { font: 11.5px var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stars { margin-left: auto; flex: none; font: 11px var(--mono); color: var(--faint); }
.card h3 { font-size: 15.5px; font-weight: 500; line-height: 1.45; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.tag { display: inline-flex; align-items: center; gap: 6px; font: 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); padding: 2px 6px; border-radius: var(--r-sm); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag i { width: 6px; height: 6px; flex: none; }
.meta { position: relative; display: flex; gap: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); white-space: nowrap; }
.risk { display: flex; align-items: center; gap: 7px; margin-top: -4px; font-size: 12px; line-height: 1.4; color: var(--warn); }
.risk.soft { color: var(--faint); }
.risk i { width: 6px; height: 6px; border-radius: 50%; flex: none; background: currentColor; opacity: .85; }
.save { position: relative; z-index: 1; margin-left: auto; border: 0; background: none; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--faint); cursor: pointer; transition: color .15s; }
.save:hover, .card:hover .save { color: var(--blue); }
.save[aria-pressed="true"] { color: var(--blue); }
.save.pop { animation: pop .3s; }

.more { display: flex; margin: 40px auto 0; }
.empty, .error { grid-column: 1 / -1; padding: 72px 16px; text-align: center; color: var(--muted); font: 400 22px var(--serif); }
.empty .mono, .error .mono { display: block; margin-bottom: 10px; }
.skeleton { height: 190px; border: 1px solid var(--line); border-radius: var(--r-lg); background: linear-gradient(90deg, var(--panel), var(--card), var(--panel)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── surprise me ─────────────────────────────────────── */
dialog { margin: auto; width: min(520px, calc(100vw - 32px)); padding: 28px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--bg); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); }
dialog[open] { animation: in .35s cubic-bezier(.2, .8, .2, 1); }
dialog::backdrop { background: color-mix(in srgb, var(--ink) 25%, transparent); backdrop-filter: blur(6px); }
#pick.landed { animation: thunk .35s cubic-bezier(.34, 1.6, .64, 1); }
@keyframes thunk { 40% { transform: scale(1.015); } }
.pick-head { display: flex; justify-content: space-between; align-items: center; }
#pickState { display: inline-flex; align-items: center; gap: 10px; }
.die { width: 12px; height: 12px; border: 1.5px solid var(--blue); border-radius: 2px; position: relative; }
.die::after { content: ""; position: absolute; inset: 0; margin: auto; width: 3px; height: 3px; border-radius: 50%; background: var(--blue); }
#pick:not(.landed) .die { animation: tumble .45s linear infinite; }
@keyframes tumble { to { transform: rotate(360deg); } }
.landed .die { background: var(--blue); animation: pop .35s cubic-bezier(.34, 1.6, .64, 1); }
.landed .die::after { background: #fff; }
.reel { height: 150px; margin: 18px 0 14px; display: grid; align-items: center; overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 24%, #000 76%, transparent); mask-image: linear-gradient(transparent, #000 24%, #000 76%, transparent); }
.landed .reel { -webkit-mask-image: none; mask-image: none; }
.reel p { margin-top: 6px; font: 400 27px/1.2 var(--serif); letter-spacing: -.015em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.reel .tick { color: var(--muted); filter: blur(.7px); animation: tick .14s ease-out both; }
@keyframes tick { from { transform: translateY(45%); opacity: 0; } }
.reel .land { animation: land .7s cubic-bezier(.34, 1.45, .64, 1) both; }
@keyframes land { from { transform: translateY(35%) scale(.97); opacity: 0; filter: blur(6px); } }
.reel .land::after { content: ""; display: block; width: 56px; height: 2px; margin-top: 14px; background: var(--blue); transform-origin: left; animation: sweep .6s .3s cubic-bezier(.2, .9, .25, 1) both; }
@keyframes sweep { from { transform: scaleX(0); } }
.pick-detail { min-height: 78px; display: grid; gap: 14px; align-content: start; margin-bottom: 22px; }
.pick-detail > * { animation: in .45s cubic-bezier(.2, .8, .2, 1) .35s both; }
.pick-detail > :nth-child(2) { animation-delay: .45s; }
.pick-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ── scroll reveal (JS adds .reveal, so no-JS still sees everything) ── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.seen { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .1s; }
.reveal:nth-child(3) { transition-delay: .2s; }

/* ── how we pick: dreamy cards ────────────────────────── */
.how { margin-top: 128px; }
.how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 36px; }
/* columns follow the window, not the column width, so folding the sidebar can't reshuffle them mid-animation */
@media (max-width: 1200px) { .how-grid { grid-template-columns: 1fr; } .how-grid > div { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 8px 32px; align-items: center; } .how-grid .sky { grid-row: span 2; } .how-grid h3 { margin-top: 0; align-self: end; } .how-grid p { align-self: start; } }
@media (max-width: 640px) { .how-grid > div { display: block; } .how-grid h3 { margin-top: 22px; } }
.sky { border-radius: var(--r-lg); position: relative; aspect-ratio: 5 / 6; display: grid; place-items: center; padding: 28px; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 60% at 30% 110%, #ffd9a8 0%, transparent 55%), radial-gradient(80% 50% at 80% 95%, #ff9fb6 0%, transparent 60%), linear-gradient(180deg, #2f6df0 0%, #6f9cf7 45%, #b8cdf5 75%, #f2d9c4 100%); }
.sky.b { background: radial-gradient(90% 50% at 70% 105%, #ffc8a0 0%, transparent 60%), linear-gradient(180deg, #4b78e8 0%, #8eaef2 50%, #d8c7d8 85%, #f1c3a8 100%); }
.sky.c { background: radial-gradient(100% 45% at 50% 108%, #ff9f6e 0%, transparent 60%), radial-gradient(60% 40% at 15% 90%, #ffe08a 0%, transparent 60%), linear-gradient(180deg, #1d4fd8 0%, #5583ef 50%, #a9bff0 80%, #e6c9b5 100%); }
.sky::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35; mix-blend-mode: overlay; background: var(--noise); }
.how h3 { font-size: 21px; font-weight: 500; letter-spacing: -.02em; line-height: 1.25; margin-top: 22px; }
.how p { margin-top: 10px; color: var(--muted); }
.how p b { color: var(--ink); font-weight: 400; }
/* little mock UIs that sit in the sky. always light, like paper */
.paper { border-radius: var(--r-md); width: 100%; background: #fff; color: #091120; font-size: 13px; box-shadow: 0 12px 40px -10px rgba(10, 25, 80, .45); }
.stack { width: 100%; display: grid; }
.stack .paper { padding: 9px 12px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.stack .ghost { width: 90%; justify-self: center; background: rgba(255, 255, 255, .55); color: #3a4560; text-decoration: line-through; margin-bottom: -1px; }
.stack .ghost:first-child { width: 82%; background: rgba(255, 255, 255, .4); }
.stack .ghost s { text-decoration: none; }
.stack .now { display: block; padding: 14px; }
.stack .now b { display: block; font-weight: 500; font-size: 14.5px; margin: 8px 0 4px; }
.pill { font: 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; white-space: nowrap; color: #5b6472; }
.pill.on { background: #1a4cf0; color: #fff; }
.toggles { border-radius: var(--r-md); overflow: hidden; background: rgba(14, 32, 100, .3); text-shadow: 0 1px 2px rgba(0, 0, 0, .15); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .5); color: #fff; width: 100%; }
.toggles div { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, .35); font-size: 13.5px; }
.toggles div:last-child { border: 0; }
.toggles small { display: block; font-size: 11px; opacity: .75; }
.sw { width: 26px; height: 14px; border: 1.5px solid #fff; padding: 1.5px; display: flex; justify-content: flex-end; }
.sw::after { content: ""; width: 9px; background: #1a4cf0; }
.code { width: 100%; display: grid; gap: 6px; }
.code .paper { padding: 9px 12px; font: 11.5px var(--mono); }
.code pre { border-radius: var(--r-md); background: #0a1124; color: #c9d4f0; font: 11px/1.7 var(--mono); padding: 14px; overflow: hidden; white-space: pre-wrap; box-shadow: 0 12px 40px -10px rgba(10, 25, 80, .5); }
.code pre em { color: #7fa0ff; font-style: normal; }
.code .foot { border: 1px solid rgba(255, 255, 255, .6); color: #fff; font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 8px 12px; background: rgba(255, 255, 255, .12); }

/* ── scan page ────────────────────────────────────────── */
.cmd.big { height: 48px; max-width: 560px; font-size: 14px; padding-right: 4px; }
.cmd.big .btn { height: 38px; }
.profile { display: grid; grid-template-columns: auto 1fr minmax(240px, 340px); gap: 28px; align-items: center; margin-top: 72px; padding: 28px; background: var(--panel); border: 1px solid var(--line);  border-radius: var(--r-lg); }
.profile > img { width: 80px; height: 80px; border-radius: var(--r-md); }
.profile h2 { font-size: 30px; }
.profile .mono { margin-top: 6px; }
.verdict { display: inline-flex; gap: 8px; align-items: center; margin-top: 14px; font-size: 14px; color: var(--muted); }
.pixels { display: grid; gap: 10px; }
.px { display: grid; grid-template-columns: 84px 1fr 34px; gap: 12px; align-items: center; }
.px > span:first-child { font-size: 13.5px; }
.px > span:last-child { text-align: right; }
.cells { display: grid; grid-template-columns: repeat(20, 1fr); gap: 2px; }
.cells i { aspect-ratio: 1; background: var(--line); }
.cells i.on { background: var(--blue); animation: pop .4s both; }
@keyframes pop { from { transform: scale(0); } }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 80px 0 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.section-head a { font: 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--blue); white-space: nowrap; }

footer { margin-top: 128px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }

/* the signature: pencil underline, a ring that draws itself on hover, then the credits write in */
.sig { flex-basis: 100%; margin: 28px 0 8px; font: 400 15px/1.4 var(--sans); letter-spacing: -.01em; text-transform: none; color: var(--muted); }
.sig .name { position: relative; display: inline-block; margin: 0 .55em; font-weight: 500; color: var(--ink); outline: none; cursor: default; }
.ring { position: absolute; left: -9px; top: -6px; width: calc(100% + 18px); height: calc(100% + 12px); overflow: visible; pointer-events: none; }
.ring path { fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset .4s cubic-bezier(.6, .1, .2, 1), opacity 0s .4s; } /* opacity hides the round cap's leftover dot */
.sig .name:hover .ring path, .name:focus-visible .ring path { stroke-dashoffset: 0; opacity: 1; transition: stroke-dashoffset .7s cubic-bezier(.6, .1, .2, 1), opacity 0s; }
.sig .name:hover::after, .name:focus-visible::after { opacity: 0; }
.heart { color: #e5484d; }

/* ── small screens: sidebar becomes a top bar ─────────── */
@media (max-width: 900px) {
  .shell, .folded .shell { grid-template-columns: 1fr; }
  aside { position: sticky; top: 0; margin: 0; height: auto; padding: 12px 16px; flex-direction: row; align-items: center; gap: 16px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .logo { margin: 0 auto 0 0; }
  .folded aside .label { opacity: 1; transform: none; pointer-events: auto; }
  .fold, aside nav .ico, .theme .label { display: none; }
  .theme { margin: 0; padding: 4px 8px; }
  .keys { display: none; }
  aside nav { display: flex; gap: 16px; font-size: 14px; }
  aside nav a { padding: 0; }
  aside nav hr, aside nav .opt, .status { display: none; }
  main { padding: 40px 16px 96px; }
  .profile { grid-template-columns: auto 1fr; }
  .pixels { grid-column: 1 / -1; }
}
.measuring *, .measuring *::before, .measuring *::after { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .card:hover .slot rect, .card:focus-within .slot rect { opacity: 1; stroke-dasharray: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
