:root {
  --bg: #f7f5f0;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --ink-3: #8a887f;
  --line: #e3e0d8;
  --grid: #ebe8e1;
  --accent: #2a78d6;
  --accent-dark: #1c5cab;
  --s1: #2a78d6;  /* animals */
  --s2: #eb6834;  /* objects */
  --s3: #1baf7a;  /* food, nature, people */
  --muted-dot: #cfccc4;
  --good: #1baf7a;
  --bad: #e34948;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin: .1em 0 .6em; letter-spacing: -.01em; }
h3 { font-size: 1.35rem; margin: 1.4em 0 .4em; }
a { color: var(--accent-dark); }
kbd { font: 12px var(--sans); border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; opacity: .6; margin-left: 4px; }

/* nav */
.topnav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 24px; padding: 10px 24px;
  background: rgba(247,245,240,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); font-size: 15px; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
.brand span { font-family: var(--sans); font-weight: 400; font-size: 13px; color: var(--ink-3); margin-left: 6px; }
.navlinks { display: flex; gap: 18px; flex: 1; overflow-x: auto; white-space: nowrap; }
.navlinks a { color: var(--ink-2); text-decoration: none; }
.navlinks a:hover, .navlinks a.active { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.safe-toggle { white-space: nowrap; color: var(--ink-2); display: flex; gap: 6px; align-items: center; }

/* hero */
.hero { position: relative; min-height: 92vh; display: grid; place-items: center; overflow: hidden; background: #111; color: #fff; }
.mosaic { position: absolute; inset: -40px; display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 2px; opacity: .55; }
.mosaic img { width: 100%; aspect-ratio: 1; object-fit: cover; animation: fadeIn 1.2s both; }
@keyframes fadeIn { from { opacity: 0; } }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(10,10,10,.85) 0%, rgba(10,10,10,.55) 60%, rgba(10,10,10,.3) 100%); }
.hero-text { position: relative; z-index: 2; max-width: 860px; padding: 40px 24px; text-align: center; }
.kicker { text-transform: uppercase; letter-spacing: .15em; font-size: 13px; color: #d9d6cc; }
.hero h1 { font-size: clamp(3.5rem, 11vw, 8rem); margin: 0; letter-spacing: -.02em; }
.lede { font-size: clamp(1.15rem, 2.4vw, 1.5rem); color: #ece9e0; max-width: 640px; margin: 10px auto 36px; font-family: var(--serif); }
.hero-stats { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-stats div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius); padding: 14px 18px; min-width: 190px; }
.hero-stats b { display: block; font: 700 1.8rem var(--serif); }
.hero-stats span { font-size: 14px; color: #d9d6cc; }
.scroll-hint { display: inline-block; margin-top: 40px; color: #fff; opacity: .8; }

/* chapters */
.chapter { max-width: 1120px; margin: 0 auto; padding: 96px 24px 40px; }
.chapter.dark { max-width: none; background: #17171a; color: #ecebe6; padding-left: max(24px, calc((100vw - 1072px) / 2)); padding-right: max(24px, calc((100vw - 1072px) / 2)); margin: 60px 0 0; padding-bottom: 96px; }
.chapter.dark .prose { color: #d8d6ce; }
.chapter.dark .chapter-no { color: #9a988f; }
.chapter-no { text-transform: uppercase; letter-spacing: .14em; font-size: 13px; color: var(--ink-3); margin: 0; }
.prose { max-width: 700px; color: #222; }
.prose p { margin: 0 0 1em; }
.note { font-size: 15px; color: var(--ink-2); max-width: 760px; }
.chapter.dark .note { color: #b4b2aa; }
.center-note { text-align: center; margin: 8px auto 40px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.wide { margin: 32px 0 0; }
figcaption { font-size: 14px; color: var(--ink-2); margin-top: 10px; }
.link { background: none; border: 0; color: var(--accent-dark); text-decoration: underline; padding: 0; font-size: inherit; }
.btn { background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 10px 20px; font-size: 15px; font-weight: 600; }
.btn:hover { background: #333; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: #fff; }
.btn.small { padding: 6px 14px; font-size: 14px; }
.btn.big { font-size: 18px; padding: 14px 28px; }
.sub { font-size: 1.7rem; margin-top: 64px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 36px 0 44px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; font-size: 16px; }
.step h3 { margin-top: 8px; }
.step-n { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; }
.tree { display: flex; flex-direction: column; gap: 4px; font-size: 14px; margin-top: 12px; }
.tree span { padding: 3px 10px; border-left: 2px solid var(--line); color: var(--ink-2); }
.tree span:nth-child(2) { margin-left: 10px; } .tree span:nth-child(3) { margin-left: 20px; }
.tree span:nth-child(4) { margin-left: 30px; } .tree span:nth-child(5) { margin-left: 40px; }
.tree .leaf { margin-left: 50px; color: var(--ink); font-weight: 600; border-color: var(--accent); }

/* random sampler */
.sampler { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.thumb { position: relative; margin: 0; border-radius: 8px; overflow: hidden; background: #ddd; cursor: pointer; }
.thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .25s, filter .25s; }
.thumb:hover img { transform: scale(1.04); }
.thumb .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 13px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75)); line-height: 1.2; }
.sensitive.veiled img { filter: blur(18px) saturate(.5); }
.sensitive.veiled::after { content: "Blurred in classroom mode · click to show"; position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 10px; color: #fff; font-size: 12px; background: rgba(0,0,0,.25); }

/* training loop */
.loop { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; }
.loop li { position: relative; padding: 20px 22px 20px 22px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; }
.loop li:first-child { border-radius: 14px 0 0 14px; } .loop li:last-child { border-radius: 0 14px 14px 0; }
.loop li + li { border-left: 0; }
.loop li:not(:last-child)::after { content: "→"; position: absolute; right: -12px; top: 50%; transform: translateY(-50%); z-index: 2; background: var(--bg); border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; font-size: 14px; color: var(--ink-2); border: 1px solid var(--line); }
.loop b { display: block; font: 600 1.3rem var(--serif); margin-bottom: 4px; }
.loop span { color: var(--ink-2); }

.demo { display: grid; grid-template-columns: 300px 1fr; gap: 28px; padding: 24px; margin: 20px 0 12px; align-items: start; }
.demo-img img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.demo-label { margin: 0 0 14px; font-size: 18px; }
.demo-q { margin: 0 0 8px; color: var(--ink-2); font-size: 15px; }
.bars .bar { display: grid; grid-template-columns: 190px 1fr 52px; gap: 10px; align-items: center; font-size: 15px; margin: 6px 0; }
.bars .bar .track { height: 14px; background: var(--grid); border-radius: 4px; overflow: hidden; }
.bars .bar .fill { height: 100%; background: var(--muted-dot); border-radius: 0 4px 4px 0; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.bars .bar.hit .fill { background: var(--s1); }
.bars .bar.hit .nm { font-weight: 700; }
.bars .bar .pc { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.verdict { font-weight: 600; min-height: 1.6em; }

/* charts */
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin: 28px 0; }
.chart-title { font: 600 16px var(--sans); margin: 0 0 12px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font: 12px var(--sans); fill: var(--ink-2); }
.chart .lbl { fill: var(--ink); font-size: 13px; }
.chart .val { fill: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .val, .chart .halo { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.chart .gridline { stroke: var(--grid); }
.chart .axis { stroke: #bdbab1; }
.chart .hov { cursor: default; }
.chart .hov:hover rect.mark, .chart .hov.on rect.mark { filter: brightness(.88); }
.tooltip { position: fixed; z-index: 200; pointer-events: none; background: #1a1a19; color: #f0efec; padding: 8px 10px; border-radius: 8px; font-size: 13px; line-height: 1.4; max-width: 280px; box-shadow: 0 6px 20px rgba(0,0,0,.2); opacity: 0; transition: opacity .12s; }
.tooltip.show { opacity: 1; }
.tooltip .tt-imgs { display: flex; gap: 3px; margin-top: 6px; }
.tooltip .tt-imgs img { width: 62px; height: 62px; object-fit: cover; border-radius: 4px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.two-col .chart-card { margin: 12px 0; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 24px 0; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.tile b { display: block; font: 700 2.2rem var(--serif); }
.tile span { color: var(--ink-2); font-size: 15px; }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 48px 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 86px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 70px 1fr; gap: 34px; padding: 0 0 30px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 80px; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--ink-3); }
.timeline li.key::before { border-color: var(--s1); background: var(--s1); }
.timeline li.warn::before { border-color: var(--bad); background: var(--bad); }
.timeline .yr { font: 700 1.25rem var(--serif); text-align: right; }
.timeline h4 { margin: 0 0 4px; font: 600 1.15rem var(--serif); }
.timeline p { margin: 0; color: var(--ink-2); font-size: 16px; max-width: 680px; }
.timeline .tag { display: inline-block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding: 1px 8px; border-radius: 999px; background: #e9e6de; color: var(--ink-2); margin-left: 8px; vertical-align: 2px; }
.timeline li.warn .tag { background: #fbe3e2; color: #a12a29; }

/* means */
.means { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 12px; }
.mean { position: relative; border-radius: 8px; overflow: hidden; cursor: pointer; }
.mean div { width: 100%; aspect-ratio: 1; background-image: url(../img/means.webp); background-size: 3200% 3200%; image-rendering: auto; }
.mean span { position: absolute; inset: auto 0 0 0; padding: 14px 6px 5px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); opacity: 0; transition: opacity .2s; line-height: 1.2; }
.mean:hover span, .mean.show span { opacity: 1; }

/* nearest neighbours */
.nn-demo { padding: 20px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; margin: 24px 0 40px; }
.nn-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; align-content: start; }
.nn-pick .thumb.sel { outline: 3px solid var(--s1); outline-offset: 1px; }
.nn-query { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; font-size: 15px; color: var(--ink-2); }
.nn-query img { width: 84px; height: 84px; border-radius: 8px; object-fit: cover; }
.nn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.nn-grid .thumb .cap { font-size: 11px; }

/* map */
.map-wrap { padding: 0; overflow: hidden; margin: 24px 0 12px; }
.map-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.map-controls select, .map-controls input, .explore-controls select, .explore-controls input[type=search] { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.map-controls input { min-width: 200px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: #f1efe9; }
.seg button { border: 0; background: none; border-radius: 999px; padding: 5px 14px; font-size: 14px; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.map-stage { position: relative; height: min(78vh, 760px); background: #fbfaf7; }
.map-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.map-stage canvas.dragging { cursor: grabbing; }
.map-tip { position: absolute; pointer-events: none; background: #1a1a19; color: #f0efec; border-radius: 8px; padding: 6px; font-size: 13px; display: none; width: 150px; }
.map-tip img { width: 100%; border-radius: 4px; margin-bottom: 4px; }
.map-legend { position: absolute; left: 12px; bottom: 12px; background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; display: flex; gap: 14px; }
.map-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }

/* game */
.game { max-width: 560px; margin: 40px auto 0; padding: 28px; background: #232327; border-color: #34343a; color: #ecebe6; text-align: center; }
.game h3 { margin-top: 0; }
.game p { color: #c7c5bd; }
.game .btn { background: #ecebe6; color: #111; }
.game-head { display: flex; align-items: baseline; justify-content: center; gap: 10px; font-size: 18px; margin-bottom: 14px; position: relative; }
.game-head b { font: 700 1.6rem var(--serif); color: #fff; }
.timer { position: absolute; right: 0; top: 0; font: 700 1.4rem var(--sans); color: #eda100; font-variant-numeric: tabular-nums; }
.game-play img { width: 100%; max-width: 380px; aspect-ratio: 1; object-fit: cover; border-radius: 10px; margin: 0 auto; }
.game-btns { display: flex; gap: 14px; justify-content: center; margin: 18px 0 8px; }
.game-btns .btn { min-width: 130px; font-size: 18px; }
.game-btns .yes { background: #1baf7a; color: #fff; } .game-btns .no { background: #e34948; color: #fff; }
.game-count { color: #9a988f; font-size: 14px; }
.game-result { text-align: left; }
.game-result .big { font: 700 2.6rem var(--serif); color: #fff; display: block; }
.game-result .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.game-result .row div { background: #2c2c31; border-radius: 10px; padding: 14px; }
.game-result small { color: #b4b2aa; font-size: 14px; }

/* problems */
.problem { margin: 64px 0 0; padding-top: 32px; border-top: 1px solid var(--line); }
.problem > h3 { font-size: 1.8rem; margin-top: 0; display: flex; gap: 14px; align-items: center; }
.pn { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--bad); color: #fff; font: 700 18px var(--sans); display: grid; place-items: center; }
blockquote { font: italic 1.5rem/1.4 var(--serif); margin: 28px 0; padding-left: 22px; border-left: 4px solid var(--bad); max-width: 700px; }
blockquote cite { display: block; font: normal 14px var(--sans); color: var(--ink-2); margin-top: 8px; }
.judge { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 24px 0 12px; }
.jcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14px; }
.jcard img { width: 100%; aspect-ratio: 1; object-fit: cover; cursor: zoom-in; }
.jcard .jl { padding: 10px 12px 4px; }
.jcard .jl div { display: flex; justify-content: space-between; gap: 8px; }
.jcard .jl span { color: var(--ink-2); }
.jcard .jb { display: flex; gap: 6px; padding: 8px 12px 12px; }
.jcard .jb button { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 4px; font-size: 13px; }
.jcard .jb button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.strip-wrap { display: grid; gap: 14px; margin-top: 18px; }
.strip { display: grid; grid-template-columns: 150px repeat(8, 1fr); gap: 6px; align-items: center; }
.strip .sname { font: 600 1.05rem var(--serif); }
.strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; cursor: zoom-in; }
.faceblur { padding: 18px; margin-top: 18px; }
.face-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin: 14px 0; }
.fimg { position: relative; border-radius: 8px; overflow: hidden; }
.fimg img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.fimg .fb { position: absolute; border-radius: 40%; backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); transform: scale(1.35); display: none; }
.blurring .fimg .fb { display: block; }
.fimg .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.switch { display: inline-flex; gap: 8px; align-items: center; font-size: 15px; font-weight: 600; cursor: pointer; }

/* explorer */
.explore-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0 6px; }
.explore-controls input[type=search] { flex: 1; min-width: 260px; font-size: 16px; padding: 10px 14px; }
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ccard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; text-align: left; padding: 0; }
.ccard:hover { border-color: #bdbab1; }
.ccard .cimg { position: relative; aspect-ratio: 1; background: #ddd; }
.ccard .cimg img, .ccard .cimg .m { width: 100%; height: 100%; object-fit: cover; }
.ccard .cimg .m { background-image: url(../img/means.webp); background-size: 3200% 3200%; }
.ccard .cn { padding: 7px 9px 8px; font-size: 14px; line-height: 1.25; }
.ccard .cn small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(15,15,15,.6); display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-box { position: relative; background: var(--bg); border-radius: 16px; max-width: 1040px; width: 100%; max-height: 92vh; overflow: auto; padding: 28px; }
.modal-close { position: absolute; right: 12px; top: 8px; border: 0; background: none; font-size: 32px; color: var(--ink-2); }
.modal h2 { font-size: 2.2rem; margin: 0 0 4px; }
.modal .meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--ink-2); font-size: 14px; margin-bottom: 14px; }
.modal .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 18px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 12px; font-size: 13px; }
.chip:hover { border-color: var(--ink-3); }
.modal .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.img-view { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.img-view .big { position: relative; }
.img-view .big img { width: 100%; border-radius: 10px; }
.img-view h3 { margin-top: 0; }

.sources ul { padding-left: 20px; font-size: 15px; color: var(--ink-2); max-width: 860px; }
.sources li { margin-bottom: 6px; }

@media (max-width: 860px) {
  body { font-size: 17px; }
  .navlinks { display: none; }
  .steps, .two-col, .tiles { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .loop { grid-template-columns: 1fr 1fr; gap: 8px; }
  .loop li, .loop li + li { border: 1px solid var(--line); border-radius: 12px !important; }
  .loop li::after { display: none; }
  .demo, .nn-demo, .img-view { grid-template-columns: 1fr; }
  .bars .bar { grid-template-columns: 130px 1fr 44px; font-size: 14px; }
  .strip { grid-template-columns: repeat(4, 1fr); } .strip .sname { grid-column: 1 / -1; }
  .strip img:nth-of-type(n+5) { display: none; }
  .timeline::before { left: 56px; } .timeline li { grid-template-columns: 46px 1fr; gap: 26px; } .timeline li::before { left: 50px; }
}

.chart .val.in { fill: #fff; stroke: none; }

/* six degrees */
.deg { padding: 22px; margin: 24px 0 12px; }
.deg-ends { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; }
.deg-end { display: grid; grid-template-columns: 120px 1fr; grid-template-rows: auto auto 1fr; column-gap: 14px; row-gap: 8px; align-items: start; }
.deg-end .deg-pick { grid-row: 1 / 4; }
.deg-end .deg-pick .thumb { width: 120px; }
.deg-end input { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 0; }
.deg-end .btn { justify-self: start; }
.deg-tag { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); }
.deg-mid { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.deg-chain { display: grid; grid-template-columns: repeat(6, 1fr); gap: 28px; margin-top: 26px; position: relative; }
.deg-chain:empty { display: none; }
.deg-step { position: relative; opacity: 0; transform: translateY(8px); animation: degIn .45s forwards; }
@keyframes degIn { to { opacity: 1; transform: none; } }
.deg-step .thumb { border-radius: 10px; }
.deg-step .thumb.end { outline: 3px solid var(--ink); outline-offset: 2px; }
.deg-step .lbl { font-size: 14px; margin-top: 8px; line-height: 1.25; }
.deg-step .lbl small { display: block; color: var(--ink-3); font-size: 12px; }
.deg-step:not(:last-child)::after { content: "→"; position: absolute; right: -22px; top: calc(50% - 22px); font-size: 18px; color: var(--ink-3); }
.deg-status { margin: 14px 0 0; }
@media (max-width: 860px) {
  .deg-ends { grid-template-columns: 1fr; }
  .deg-mid { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .deg-chain { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .deg-step::after { display: none; }
}

.prose.finding { margin-top: 28px; }
