/* hexd — old-reddit bones, simpler and boxier. Square corners, 1px rules, dense lists. */
:root {
  --ink: #1f1f1f;
  --ink-2: #444;
  --meta: #888;
  --faint: #b5b5b5;
  --line: #d9d9d9;
  --line-2: #ececec;
  --paper: #ffffff;
  --tint: #f7f7f8;
  --tint-2: #f0f1f3;
  --link: #2547c9;
  --visited: #6b3fb3;
  --up: #ff4500;
  --down: #8a8aff;
  --gold: #f5c518;
  --gold-ink: #6b5200;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Verdana, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --wrap: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 13px/1.45 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; outline: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; border-radius: 0; }
input, textarea, select { font: inherit; color: inherit; border-radius: 0; }
img { display: block; max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--meta); }
.mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }

/* ---------- header ---------- */
.top { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 50; }
.top-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; height: 48px; display: flex; align-items: center; gap: 14px; }
.logo { display: flex; align-items: center; gap: 6px; font-weight: 800; letter-spacing: -0.02em; font-size: 15px; flex-shrink: 0; }
.logo-mark { width: 22px; height: 22px; background: var(--ink); color: var(--gold); display: grid; place-items: center; font: 800 11px var(--mono); }
.logo small { font-weight: 500; color: var(--meta); letter-spacing: 0; }
.nav { display: flex; align-self: stretch; }
.nav a { display: flex; align-items: center; gap: 6px; padding: 0 12px; white-space: nowrap; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.nav a:hover { color: var(--ink); background: var(--tint); }
.nav a.on { color: var(--ink); border-bottom-color: var(--ink); }
.count { font: 600 10px/1 var(--mono); background: var(--ink); color: #fff; padding: 3px 4px; min-width: 16px; text-align: center; display: inline-block; }
.count[data-n="0"] { display: none; }
.count.bump { animation: bump .45s var(--ease); }
@keyframes bump { 30% { transform: translateY(-3px); background: var(--gold); color: var(--ink); } }
.search { position: relative; flex: 1; min-width: 170px; max-width: 360px; margin-left: auto; }
.search input { width: 100%; height: 30px; border: 1px solid var(--line); background: var(--tint); padding: 0 10px; outline: none; font-size: 13px; }
.search input:focus { background: var(--paper); border-color: var(--ink); }
.search-results { position: absolute; top: 33px; left: 0; right: 0; background: var(--paper); border: 1px solid var(--ink); max-height: 70vh; overflow-y: auto; z-index: 60; }
.sr-item { display: flex; gap: 10px; padding: 6px 8px; align-items: center; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.sr-item:last-child { border-bottom: 0; }
.sr-item.active, .sr-item:hover { background: var(--tint-2); }
.sr-item img, .sr-item .ph { width: 30px; height: 44px; object-fit: cover; flex-shrink: 0; }
.sr-title { font-weight: 600; }
.sr-meta { font-size: 11px; color: var(--meta); }
.sr-empty { padding: 10px; color: var(--meta); }
.userbox { display: flex; align-items: center; gap: 8px; font-size: 12px; flex-shrink: 0; white-space: nowrap; }
.userbox a.me { font-weight: 700; color: var(--link); }
.userbox .karma { color: var(--meta); }
.userbox .sep { color: var(--line); }
.linkbtn { color: var(--link); }
.linkbtn:hover { text-decoration: underline; }

/* ---------- boxes & buttons ---------- */
.box { border: 1px solid var(--line); background: var(--paper); }
.box-h { padding: 7px 10px; border-bottom: 1px solid var(--line); background: var(--tint); font: 600 11px/1.2 var(--sans); letter-spacing: .02em; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; }
.box-b { padding: 10px; }
.box-b p { margin: 0 0 8px; }
.box-b p:last-child { margin-bottom: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 12px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 600; font-size: 12px; white-space: nowrap; transition: transform .08s; }
.btn:hover { background: #000; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.big { width: 100%; height: 36px; font-size: 13px; }
.btn.gold { background: var(--gold); border-color: #d8ab00; color: var(--ink); }
.btn.gold:hover { background: #ffd23a; }
.btn:disabled { opacity: .4; cursor: default; }
.field { width: 100%; border: 1px solid var(--line); padding: 7px 9px; background: var(--paper); outline: none; font-size: 13px; }
.field:focus { border-color: var(--ink); }
textarea.field { min-height: 110px; resize: vertical; line-height: 1.5; }
.field + .field { margin-top: 6px; }
select.field { height: 32px; padding: 0 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border: 1px solid var(--line); background: var(--paper); font-size: 12px; color: var(--ink-2); }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .n { font: 10px var(--mono); color: var(--meta); }
.chip.on .n { color: #bbb; }
.tag { display: inline-block; font-size: 11px; padding: 0 5px; border: 1px solid var(--line); color: var(--ink-2); background: var(--tint); line-height: 17px; }
.tag.gold { background: #fff7d1; border-color: #ecd57a; color: var(--gold-ink); }
.flair { display: inline-block; font-size: 11px; padding: 0 5px; border: 1px solid var(--line); color: var(--ink-2); background: var(--tint); line-height: 17px; margin-left: 6px; vertical-align: 1px; font-weight: 500; }

/* ---------- layout ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; padding: 14px 0 48px; }
.side { display: flex; flex-direction: column; gap: 12px; }

/* tab strip that joins the content box below it (old reddit) */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; align-items: flex-end; }
.tabs button, .tabs a { padding: 5px 10px; font-weight: 600; font-size: 12px; color: var(--link); border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px; background: none; }
.tabs button:hover, .tabs a:hover { text-decoration: underline; }
.tabs .on { color: var(--ink); background: var(--paper); border-color: var(--line); border-bottom: 1px solid var(--paper); text-decoration: none !important; }
.tabs .spacer { flex: 1; }
.tabs .note { font-size: 11px; color: var(--meta); padding: 0 4px 5px; }

/* points lens: for you (alignment) | everyone (votes). peeking with Alt lights the switch gold. */
.lens { display: inline-flex; border: 1px solid var(--line); align-self: center; background: var(--paper); }
.tabs .lens { margin: 0 0 4px 8px; }
.lens button, .tabs .lens button { font-size: 11px; padding: 2px 7px; color: var(--meta); font-weight: 600; border: 0; margin: 0; background: none; text-decoration: none; transition: background .15s, color .15s; }
.lens button + button, .tabs .lens button + button { border-left: 1px solid var(--line); }
.lens button.on, .tabs .lens button.on { background: var(--ink); color: #fff; }
.lens.peek button.on { background: var(--gold); color: var(--ink); }
.lens.off [data-lens="you"] { color: var(--faint); cursor: help; }
.score.you span { color: var(--gold-ink); }
.score.you span:last-child { box-shadow: inset 0 -2px 0 #f0dc8a; }

/* ---------- listing rows (posts + films) ---------- */
.list { border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.row { display: flex; gap: 8px; padding: 8px 8px 7px 0; border-top: 1px solid var(--line-2); background: var(--paper); position: relative; }
.row:first-child { border-top: 0; }
.row .rank { width: 26px; flex-shrink: 0; text-align: right; color: var(--faint); font: 12px/26px var(--mono); }
.votes { width: 34px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.vbtn { width: 22px; height: 17px; display: grid; place-items: center; color: var(--faint); transition: transform .15s var(--ease), color .15s; }
.vbtn svg { width: 14px; height: 14px; fill: currentColor; }
.vbtn:hover { color: var(--ink-2); }
.vbtn.up.on { color: var(--up); }
.vbtn.down.on { color: var(--down); }
.vbtn.up.press { transform: translateY(-2px); }
.vbtn.down.press { transform: translateY(2px); }
/* the score is an odometer: it rolls in the direction your vote pushed it */
.score { font-weight: 700; font-size: 12px; height: 17px; line-height: 17px; overflow: hidden; color: var(--ink-2); position: relative; min-width: 24px; text-align: center; }
.score.up { color: var(--up); }
.score.down { color: var(--down); }
.score span { display: block; }
.score .out-up { animation: outUp .22s var(--ease) forwards; position: absolute; inset: 0; }
.score .in-up { animation: inUp .22s var(--ease); }
.score .out-down { animation: outDown .22s var(--ease) forwards; position: absolute; inset: 0; }
.score .in-down { animation: inDown .22s var(--ease); }
@keyframes outUp { to { transform: translateY(-100%); opacity: 0; } }
@keyframes inUp { from { transform: translateY(100%); opacity: 0; } }
@keyframes outDown { to { transform: translateY(100%); opacity: 0; } }
@keyframes inDown { from { transform: translateY(-100%); opacity: 0; } }
.thumb { width: 46px; height: 68px; flex-shrink: 0; background: var(--tint-2); border: 1px solid var(--line-2); overflow: hidden; display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 15px; line-height: 1.3; font-weight: 500; overflow-wrap: anywhere; }
.row-title a { color: var(--link); }
.row-title a:visited { color: var(--visited); }
.row-title .yr { color: var(--meta); font-weight: 400; font-size: 13px; }
.tagline { font-size: 11px; color: var(--meta); margin-top: 2px; }
.tagline a { color: var(--link); }
.tagline a:hover { text-decoration: underline; }
.excerpt { font-size: 13px; color: var(--ink-2); margin-top: 4px; max-height: 3.9em; overflow: hidden; }
.excerpt p { margin: 0; }
.acts { display: flex; gap: 10px; margin-top: 4px; flex-wrap: wrap; align-items: center; }
.acts a, .acts button { font-size: 11px; font-weight: 700; color: var(--meta); }
.acts a:hover, .acts button:hover { text-decoration: underline; color: var(--ink-2); }
.acts .primary { color: var(--ink); }
.acts .done { color: var(--gold-ink); }
.essence { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.reasons { font-size: 11px; color: var(--meta); margin-top: 3px; }
.reasons b { color: var(--gold-ink); font-weight: 600; }
.themes { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
/* match meter: how strongly hexd thinks this film fits the moment */
.match { width: 34px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding-top: 3px; }
.match .bar { width: 4px; height: 50px; background: var(--line-2); position: relative; overflow: hidden; }
.match .bar i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--ink); transform-origin: bottom; animation: grow .6s var(--ease) backwards; }
.match .pct { font: 10px var(--mono); color: var(--meta); }
@keyframes grow { from { transform: scaleY(0); } }
.row.seen { background: var(--tint); }

.empty { padding: 30px 16px; text-align: center; border: 1px solid var(--line); border-top: 0; color: var(--meta); }
.empty h3 { margin: 0 0 4px; color: var(--ink); font-size: 15px; }
.empty p { margin: 0 0 12px; }
.loading { padding: 40px 16px; color: var(--meta); text-align: center; font: 11px var(--mono); }

/* year dividers in "new" — the conversation over the years */
.year-div { display: flex; align-items: center; gap: 8px; padding: 10px 8px 4px; border-top: 1px solid var(--line-2); font: 700 12px var(--mono); }
.list > .year-div:first-child { border-top: 0; }
.year-div span { color: var(--meta); font-weight: 400; }

/* ---------- movie header ---------- */
.mhead { display: flex; gap: 14px; padding: 16px 0 12px; }
.mhead .poster { width: 92px; flex-shrink: 0; border: 1px solid var(--line); align-self: flex-start; }
.mhead .poster img, .mhead .poster .ph { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.mhead h1 { font-size: 24px; letter-spacing: -0.02em; margin: 0; font-weight: 800; line-height: 1.15; }
.mhead h1 .yr { color: var(--meta); font-weight: 500; }
.mhead .facts { color: var(--meta); font-size: 12px; margin-top: 3px; }
.mhead .essence { font-size: 14px; margin-top: 8px; max-width: 640px; color: var(--ink); }
.mhead .plot { font-size: 12px; color: var(--ink-2); margin-top: 6px; max-width: 680px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.mhead .plot.open { -webkit-line-clamp: unset; }
.mhead .links { display: flex; gap: 12px; margin-top: 8px; font-size: 12px; }
.mhead .links a { color: var(--link); }
.mhead .links a:hover { text-decoration: underline; }

/* the cycle strip: where you are with this film. segments draw as steps complete. */
.cycle { display: flex; align-items: center; margin: 10px 0 0; font-size: 11px; color: var(--meta); user-select: none; }
.cycle .st { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.cycle .dot { width: 9px; height: 9px; border: 1px solid var(--faint); background: var(--paper); transition: background .3s, border-color .3s, box-shadow .3s; }
.cycle .st.done { color: var(--ink); }
.cycle .st.done .dot { background: var(--ink); border-color: var(--ink); }
.cycle .st.now { color: var(--ink); font-weight: 700; }
.cycle .st.now .dot { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 5px var(--gold); }
.cycle .seg { flex: 1; min-width: 14px; max-width: 64px; height: 1px; background: var(--line); margin: 0 6px; position: relative; }
.cycle .seg i { position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease) .1s; }
.cycle .seg.done i { transform: scaleX(1); }

/* ---------- check-in ---------- */
.checkin .box-b { display: grid; gap: 12px; }
.ci-label { font-weight: 700; font-size: 12px; margin-bottom: 5px; }
.ci-label span { font-weight: 400; color: var(--meta); }
/* the impact scale is a meter: choosing a level fills every level beneath it */
.meter { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.meter button { position: relative; padding: 8px 4px 7px; font-size: 12px; text-align: center; border-left: 1px solid var(--line); overflow: hidden; color: var(--ink-2); }
.meter button:first-child { border-left: 0; }
.meter button::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .16s var(--ease); transition-delay: calc(var(--i) * 40ms); }
.meter button span { position: relative; transition: color .16s; transition-delay: calc(var(--i) * 40ms); }
.meter button.fill::before { transform: scaleX(1); }
.meter button.fill span { color: #fff; }
.meter button.fill.top::before { background: var(--gold); }
.meter button.fill.top span { color: var(--ink); font-weight: 700; }
.meter button:hover:not(.fill) { background: var(--tint); }
.tagpick { display: flex; flex-wrap: wrap; gap: 4px; }
.check { display: flex; gap: 6px; align-items: center; font-size: 12px; }
.ci-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ci-done { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- impact distribution in the sidebar ---------- */
.dist { display: grid; gap: 4px; }
.dist div { display: grid; grid-template-columns: 124px 1fr 26px; align-items: center; gap: 6px; font-size: 12px; }
.dist .b { height: 8px; background: var(--line-2); position: relative; }
.dist .b i { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
.dist div:last-child .b i { background: var(--gold); }
.dist .n { font: 11px var(--mono); color: var(--meta); text-align: right; }
.mlist { list-style: none; margin: 0; padding: 0; }
.mlist li { border-top: 1px solid var(--line-2); }
.mlist li:first-child { border-top: 0; }
.mlist a { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; color: var(--link); font-size: 12px; }
.mlist a:hover { text-decoration: underline; }
.mlist a.on { color: var(--ink); font-weight: 700; }
.mlist .n { color: var(--meta); font: 11px var(--mono); }

/* ---------- watch when ---------- */
.when-hero { border: 1px solid var(--line); background: var(--tint); padding: 16px; margin-top: 16px; }
.when-hero h1 { margin: 0 0 2px; font-size: 26px; letter-spacing: -0.03em; font-weight: 800; }
.when-hero h1 em { font-style: normal; color: var(--meta); font-weight: 500; }
.when-hero p { margin: 0 0 12px; color: var(--ink-2); }
.when-form { display: flex; gap: 6px; max-width: 620px; }
.when-form .field { height: 34px; font-size: 14px; }
.when-form .btn { height: 34px; }
.moments { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
/* once a moment is chosen, the wall of moments folds into one scrollable line so the films lead */
.moments.compact { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.moments.compact .chip { flex-shrink: 0; }
.when-hero.asking { padding: 12px 16px; }
.when-hero.asking h1 { font-size: 18px; }
.when-hero.asking > p { display: none; }
.when-q { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin: 18px 0 8px; }
.when-q em { font-style: normal; color: var(--meta); font-weight: 500; }

/* ---------- post page + comments ---------- */
.crumb { display: inline-block; margin-top: 14px; font-size: 12px; color: var(--link); }
.crumb:hover { text-decoration: underline; }
.post-full { padding: 8px 0 0; display: flex; gap: 6px; }
.post-full h1 { font-size: 18px; margin: 0; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.md { font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.md p { margin: 0 0 8px; }
.md p:last-child { margin-bottom: 0; }
.md blockquote { margin: 0 0 8px; padding: 0 0 0 10px; border-left: 3px solid var(--line); color: var(--ink-2); }
.md code { font: 12px var(--mono); background: var(--tint-2); padding: 0 4px; }
.md a { color: var(--link); text-decoration: underline; }
.selftext { border: 1px solid var(--line); background: var(--tint); padding: 8px 10px; margin-top: 8px; max-width: 760px; }
.spoiler { background: var(--ink); color: transparent; cursor: pointer; padding: 0 2px; transition: background .25s, color .25s; }
.spoiler * { visibility: hidden; }
.spoiler.shown { background: var(--tint-2); color: inherit; cursor: auto; }
.spoiler.shown * { visibility: visible; }
.reply-box { max-width: 640px; margin: 6px 0; }
.reply-box textarea { width: 100%; min-height: 90px; border: 1px solid var(--line); padding: 7px 9px; outline: none; resize: vertical; display: block; font-size: 13px; line-height: 1.5; background: var(--paper); }
.reply-box textarea:focus { border-color: var(--ink); }
.reply-box .rb-foot { display: flex; gap: 6px; align-items: center; margin-top: 5px; }
.reply-box .hint { margin-left: auto; }
.hint { font-size: 11px; color: var(--meta); }
.hint code { font: 11px var(--mono); background: var(--tint-2); padding: 0 3px; }
.comments-head { display: flex; gap: 10px; align-items: baseline; border-bottom: 1px solid var(--line); padding: 14px 0 5px; margin-bottom: 4px; font-size: 12px; }
.comments-head b { font-size: 14px; }
.comments-head select { border: 1px solid var(--line); background: var(--paper); font-size: 12px; padding: 1px 3px; }
.login-line { border: 1px solid var(--line); background: var(--tint); padding: 8px 10px; max-width: 640px; margin: 8px 0; font-size: 12px; }

/* comments are boxes nested in boxes; alternate shades make the tree legible */
.cm { border: 1px solid var(--line-2); padding: 5px 0 4px 8px; margin: 6px 0 0; background: var(--paper); transition: border-color .15s; }
.cm .cm { margin-right: 0; border-right: 0; border-bottom: 0; }
.cm.odd { background: var(--tint); }
.cm.lit { border-left-color: var(--ink); }
.cm-head { font-size: 11px; color: var(--meta); display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.cm-head .tog { font: 11px var(--mono); color: var(--meta); padding: 0 2px; }
.cm-head .tog:hover { color: var(--ink); }
.cm-head .who { color: var(--link); font-weight: 700; }
.cm-head .who:hover { text-decoration: underline; }
.cm-head .op { color: #fff; background: var(--link); font-weight: 700; padding: 0 3px; font-size: 10px; }
.cm-head .pts { color: var(--ink-2); }
.cm-body { padding-right: 8px; }
.cm-text { margin: 2px 0 1px; }
.cm-text.deleted { color: var(--faint); font-style: italic; }
.cm-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cm-acts .iv { display: inline-flex; align-items: center; }
.cm-acts .iv .score { min-width: 0; padding: 0 3px; font-size: 11px; }
.cm-acts .iv .vbtn { width: 16px; }
.cm-acts .iv .vbtn svg { width: 12px; height: 12px; }
.cm-acts a, .cm-acts button.l { font-size: 11px; font-weight: 700; color: var(--meta); }
.cm-acts a:hover, .cm-acts button.l:hover { text-decoration: underline; color: var(--ink-2); }
.cm.collapsed > .cm-body { display: none; }
.cm.collapsed { padding-bottom: 5px; }
.cm.folding > .cm-body { animation: fold .2s var(--ease) forwards; transform-origin: top; }
@keyframes fold { to { opacity: 0; transform: scaleY(.6); } }
.cm.grow { animation: growIn .35s var(--ease); }
@keyframes growIn { from { opacity: 0; transform: translateY(-6px); } }
.cm.grow > .cm-head .who { background: #fff7d1; transition: background 1.5s; }

/* ---------- profile / journal ---------- */
.prow { display: flex; gap: 10px; padding: 8px; border-top: 1px solid var(--line-2); align-items: flex-start; }
.prow:first-child { border-top: 0; }
.prow .thumb { width: 36px; height: 54px; }
.prow .ctx { font-size: 11px; color: var(--meta); }
.prow .ctx a { color: var(--link); }
.prow .ctx a:hover { text-decoration: underline; }
.prow .grow-1 { flex: 1; min-width: 0; }
.impact-pill { font: 600 10px var(--mono); padding: 1px 4px; border: 1px solid var(--line); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.impact-pill.i3 { background: var(--gold); border-color: #d8ab00; color: var(--ink); }
.impact-pill.i2 { background: var(--ink); color: #fff; border-color: var(--ink); }

/* about page */
.prose { max-width: 680px; font-size: 14px; line-height: 1.65; padding: 8px 0 48px; }
.prose h1 { font-size: 24px; letter-spacing: -0.02em; margin: 18px 0 4px; }
.prose h2 { font-size: 15px; margin: 22px 0 6px; }
.prose ol, .prose ul { padding-left: 20px; }
.prose code { font: 12px var(--mono); background: var(--tint-2); padding: 0 4px; }
.cycle-big { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); margin: 14px 0; }
.cycle-big div { padding: 10px; border-left: 1px solid var(--line); font-size: 12px; line-height: 1.45; }
.cycle-big div:first-child { border-left: 0; }
.cycle-big b { display: block; font: 700 10px var(--mono); color: var(--meta); letter-spacing: .08em; margin-bottom: 3px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.stats div { padding: 8px 10px; border-left: 1px solid var(--line); font-size: 11px; color: var(--meta); }
.stats div:nth-child(3n+1) { border-left: 0; }
.stats div:nth-child(n+4) { border-top: 1px solid var(--line); }
.stats b { display: block; font: 700 16px var(--mono); color: var(--ink); }

/* ---------- modal / toast / footer ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .12s; }
.modal { background: var(--paper); width: 100%; max-width: 360px; border: 1px solid var(--ink); position: relative; }
.modal .box-h { background: var(--ink); color: #fff; border-color: var(--ink); font-size: 12px; }
.modal .box-h button { color: #fff; font-size: 14px; line-height: 1; }
.modal form { padding: 14px; }
.modal p.sub { color: var(--meta); font-size: 12px; margin: 0 0 6px; }
.modal label { display: block; font-size: 12px; font-weight: 700; margin: 10px 0 4px; }
.modal .field { height: 32px; }
.modal .btn { width: 100%; margin-top: 14px; height: 32px; }
.modal .switch { font-size: 12px; color: var(--meta); margin-top: 10px; }
.form-err { color: #c4161c; font-size: 12px; margin-top: 8px; min-height: 16px; }
@keyframes fade { from { opacity: 0; } }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 8px); background: var(--ink); color: #fff; padding: 7px 12px; font-size: 12px; opacity: 0; pointer-events: none; transition: all .18s; z-index: 200; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.flyer { position: fixed; z-index: 300; pointer-events: none; border: 1px solid var(--ink); object-fit: cover; background: var(--tint-2); }
.footer { border-top: 1px solid var(--line); margin-top: 24px; }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 14px 16px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--meta); }
.footer-inner a { color: var(--link); }
.ph { display: grid; place-items: center; text-align: center; padding: 4px; background: var(--tint-2); color: var(--meta); font-size: 9px; width: 100%; height: 100%; overflow: hidden; }

@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  .logo small { display: none; }
  .nav a { padding: 0 8px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 10px; }
  .top-inner { padding: 6px 10px 0; height: auto; flex-wrap: wrap; gap: 0 10px; }
  .logo small { display: none; }
  .nav { order: 3; flex-basis: 100%; height: 34px; }
  .nav a { padding: 0 12px 0 0; }
  .search { order: 4; flex-basis: 100%; max-width: none; margin: 0 0 8px; }
  .userbox { margin-left: auto; }
  .row .rank { display: none; }
  .row { padding-left: 4px; }
  .mhead .poster { width: 72px; }
  .mhead h1 { font-size: 20px; }
  .cycle .lbl { display: none; }
  .cycle .st.now .lbl { display: inline; }
  .dist div { grid-template-columns: 96px 1fr 22px; }
  .cycle-big { grid-template-columns: 1fr 1fr; }
  .cycle-big div:nth-child(3) { border-left: 0; }
  .cycle-big div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .when-form { flex-direction: column; }
  .meter button { font-size: 11px; padding: 8px 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
}
