/* SWEeper-Bench page: white, Inter throughout, figures straight on the page; the video's
   hand-drawn animations are the only illustrations. */
@font-face { font-family: 'Inter'; src: url(../fonts/Inter-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(../fonts/Inter-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(../fonts/Inter-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(../fonts/Inter-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(../fonts/JetBrainsMono.woff2) format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  --ink: #111; --ink2: #111; --soft: #111;   /* text is black unless colour is needed */ --faint: #A9AEB6; --line: #E6E8EB; --tint: #F6F7F8;
  --accent: #D97757; --peri: #5B5EC2; --red: #C8463A; --green: #2F8A55;
  --col: 680px; --wide: 1000px; --gut: 20px;
  --sans: 'Inter', system-ui, -apple-system, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font: 400 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
b, strong { font-weight: 600; }
q { quotes: '“' '”'; }
sup { font-size: .65em; line-height: 0; }
figure { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

main { padding: 0 var(--gut) 40px; }
main > section { max-width: var(--col); margin: 0 auto; }
p { margin: 0 0 1.1em; }
main h2 { font: 700 clamp(26px, 3.4vw, 32px)/1.2 var(--sans); letter-spacing: -.025em; margin: 84px 0 18px; }
main h2.small-h { font-size: 20px; margin-top: 56px; letter-spacing: -.01em; }
/* anything wider than the text column breaks out to the page width */
.wide, .wide-table, .two-up, .walk, .traj, .anim-fig { width: min(100vw - 2 * var(--gut), var(--wide)); margin-left: 50%; transform: translateX(-50%); }

/* ---------- header ---------- */
.hero { text-align: center; padding: 6px var(--gut) 28px; max-width: 1100px; margin: 0 auto; }
h1.title { --fs: clamp(40px, 7vw, 64px); font: 700 var(--fs)/1 var(--sans); letter-spacing: -.035em; margin: 4px 0 calc(var(--fs) * .55 + 22px); }
h1.title .part { position: relative; display: inline-block; }
/* the labels under SWE and eper write themselves in as the sweep happens (main.js adds the classes) */
h1.title .part::after { content: ''; position: absolute; left: 2%; right: 2%; bottom: calc(var(--fs) * -.2); height: 2px; border-radius: 2px; background: currentColor; opacity: .55; transform: scaleX(0); transform-origin: left; transition: transform .5s ease; }
h1.title .lab { position: absolute; top: calc(100% + var(--fs) * .3); font-size: max(11px, .2em); font-weight: 500; letter-spacing: .02em; color: var(--soft); white-space: nowrap; line-height: 1.5; clip-path: inset(-.3em 100% -.4em 0); transition: clip-path .7s ease; }
/* labels run outward from the SWE|eper boundary, so they never collide on narrow screens */
h1.title .swe .lab { right: .1em; }
h1.title .eper .lab { left: .12em; }
h1.title.show-swe .swe::after, h1.title.show-broom .eper::after { transform: scaleX(1); }
h1.title.show-swe .swe .lab, h1.title.show-broom .eper .lab { clip-path: inset(-.3em -.2em -.4em 0); }   /* room for descenders */
.subtitle { font: 400 clamp(19px, 2.4vw, 24px)/1.35 var(--sans); color: var(--ink); margin: 6px 0 20px; letter-spacing: -.015em; }
.subtitle b { font-weight: 700; }
.authors { font-size: 16px; font-weight: 500; line-height: 1.6; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 20px; }
.authors a { color: var(--ink); text-decoration-color: var(--faint); }
.authors a:hover { text-decoration-color: currentColor; }
.affil { font-size: 14px; color: var(--soft); margin: 4px 0 20px; }
.links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 0; }
.pill { padding: 7px 18px; border-radius: 99px; color: var(--ink); text-decoration: none; font: 500 15px/1.2 var(--sans); border: 1px solid #D5D8DD; }
.pill:hover { background: var(--tint); color: var(--ink); }
.pill[data-todo] { color: var(--faint); cursor: default; }

.tldr { margin-top: 34px !important; }
.tldr p { margin: 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
code { font-family: var(--mono); font-size: .86em; background: var(--tint); padding: 1px 5px; border-radius: 4px; color: inherit; }

.video-wrap { max-width: var(--wide) !important; margin: 40px auto 0 !important; }
.video-wrap video { width: 100%; display: block; border-radius: 12px; background: #ECEBE6; box-shadow: 0 0 0 1px var(--line); }

/* ---------- animations ---------- */
.anim { position: relative; aspect-ratio: 16 / 9; width: 100%; }
.anim canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.anim-fig { margin-top: 10px; margin-bottom: 18px; }
.anim-fig .anim { max-width: 860px; margin: 0 auto; }
.hero-anim { aspect-ratio: 1920 / 380; max-width: 860px; margin: 0 auto; }
@media (max-width: 599px) { .hero-anim { aspect-ratio: 1920 / 560; } }

/* ---------- figures ---------- */
.paper-fig, .chart-fig { margin-top: 28px; margin-bottom: 32px; }
.paper-fig svg.fig { display: block; width: 100%; height: auto; }
.paper-fig.narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
figcaption { font-size: 14px; line-height: 1.55; color: var(--soft); margin-top: 10px; }
.frame-box { position: relative; overflow: hidden; }
.frame-box iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; pointer-events: none; }
.chart-fig.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--sans); fill: #000; }
.tip { position: absolute; pointer-events: none; background: #fff; border: 1px solid #d5dae1; border-radius: 6px; padding: 6px 9px; font: 500 12.5px/1.4 var(--sans); color: #111; box-shadow: 0 4px 14px rgba(0,0,0,.12); white-space: nowrap; opacity: 0; transition: opacity .12s; z-index: 5; }
.tip .t-sub { font-weight: 400; }
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 18px; margin-bottom: 26px; }
.two-up > figure { margin: 0; }
@media (max-width: 760px) { .two-up { grid-template-columns: 1fr; } }

/* ---------- tweet ---------- */
.tweet-wrap { margin: 20px auto 26px; max-width: 550px; }
.tweet-wrap .twitter-tweet:not(.twitter-tweet-rendered) { border: 1px solid #e1e8ed; border-radius: 14px; padding: 16px 18px; margin: 0; font-size: 15px; line-height: 1.45; }
.tweet-wrap .twitter-tweet a { color: #1d9bf0; text-decoration: none; }

details.aside { border: 1px solid var(--line); border-radius: 10px; padding: 12px 18px; margin: -6px 0 32px; font-size: 15.5px; }
details.aside summary { cursor: pointer; font-weight: 600; }
details.aside p { margin: 10px 0 14px; }
table.mini { font-size: 13.5px; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; font: 400 14px/1.35 var(--sans); width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 7px 10px; text-align: center; border-bottom: 1px solid #EEF0F2; white-space: nowrap; }
th { font-weight: 600; font-size: .92em; border-bottom: 1.5px solid var(--ink); }
td:first-child, th:first-child { text-align: left; }
img.logo { width: 16px; height: 16px; vertical-align: -3px; margin-right: 7px; object-fit: contain; }
.wide-table { margin-top: 8px; }
.table-note { font-size: 13.5px; color: var(--soft); margin-top: 10px; }
table.results th { cursor: pointer; user-select: none; }
table.results th:hover { text-decoration: underline; }
table.results th.sorted::after { content: ' ↓'; }
table.results th.sorted.asc::after { content: ' ↑'; }
table.results tbody tr:hover { background: var(--tint); }
table.results td.model, table.results th:nth-child(2) { text-align: left; }
table.results td.model { font-weight: 600; }
table.results td.rank { color: var(--soft); width: 30px; }
table.results .bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--ink); vertical-align: 2px; margin-left: 8px; }
table.results tr.top td { background: #FDF5F1; }
table.results td.dim { color: var(--soft); }
table.results td.pass { font-weight: 600; text-align: left; min-width: 150px; }

/* ---------- Focalboard walkthrough ---------- */
.walk { display: grid; grid-template-columns: 200px 1fr; gap: 22px; margin-top: 24px; margin-bottom: 26px; }
.walk-steps { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.3; }
.walk-steps li { margin: 0 0 2px; }
.walk-steps button { width: 100%; text-align: left; border: 0; background: none; padding: 8px 8px 8px 38px; border-radius: 8px; cursor: pointer; font: inherit; color: var(--ink2); position: relative; }
.walk-steps button:hover { background: var(--tint); }
.walk-steps .n { position: absolute; left: 7px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 11.5px/1 var(--sans); border: 1.5px solid #C8CCD2; color: var(--soft); }
.walk-steps button[aria-selected=true] { background: var(--tint); color: var(--ink); font-weight: 500; }
.walk-steps button[aria-selected=true] .n { background: var(--ink); color: #fff; border-color: var(--ink); }
.walk-stage { min-width: 0; }
.browser { border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px #DCE1E7, 0 20px 40px -28px rgba(20,30,50,.5); }
.browser-bar { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; background: #F1F3F6; border-bottom: 1px solid #E1E5EA; }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #C9CFD7; flex: none; }
.browser-bar .url { margin-left: 10px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #fff; border-radius: 6px; height: 21px; font-size: 12px; line-height: 21px; color: var(--ink); padding: 0 10px; }
.browser-bar .who { font-size: 12px; font-weight: 600; line-height: 1; padding: 5px 9px; border-radius: 99px; color: #fff; flex: none; }
.who.owner { background: #B85C86; }
.who.recip { background: #3F8A80; }
.browser-view { position: relative; aspect-ratio: 1920 / 1200; overflow: hidden; background: #f4f6f8; }
.browser-view img.shot { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.browser-view .cur { position: absolute; width: 22px; height: 24px; filter: drop-shadow(0 0 2px #2684ff); pointer-events: none; }
.lens { position: absolute; border-radius: 10px; overflow: hidden; background-repeat: no-repeat; background-color: #fff; box-shadow: 0 0 0 2px #2D7FF9, 0 0 0 4000px rgba(20, 30, 50, .22), 0 18px 34px -12px rgba(0,0,0,.5); pointer-events: none; }
.walk-ctrl { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.walk-ctrl button { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid #D5D8DD; background: #fff; font: 500 17px/1 var(--sans); cursor: pointer; color: var(--ink); }
.walk-ctrl button:hover { background: var(--tint); }
.walk-ctrl button:disabled { opacity: .35; cursor: default; }
.walk-text { flex: 1; font-size: 15px; line-height: 1.5; color: var(--ink2); margin: 0; }
.seg { position: absolute; top: 10px; right: 10px; display: flex; background: rgba(255,255,255,.94); border-radius: 99px; padding: 3px; box-shadow: 0 2px 10px rgba(0,0,0,.18); z-index: 2; }
.seg button { border: 0; background: none; font: 600 12.5px/1 var(--sans); padding: 7px 12px; border-radius: 99px; cursor: pointer; color: var(--soft); }
.seg button.f.on { background: #B34646; color: #fff; }
.seg button.p.on { background: #1F7A3F; color: #fff; }
.verdict-lenses { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.vlens { border-radius: 10px; padding: 10px; }
.vlens.f { box-shadow: inset 0 0 0 1px #EBC4C0; background: #FDF3F2; }
.vlens.p { box-shadow: inset 0 0 0 1px #BFE0CB; background: #F0F8F3; }
.vlens .crop { aspect-ratio: 240 / 110; background-repeat: no-repeat; border-radius: 6px; }
.vlens p { margin: 8px 2px 0; font-size: 13.5px; line-height: 1.4; }
.rec-btn { display: inline-block; margin: 8px 0 0; font: 500 12.5px/1 var(--sans); padding: 7px 10px; border-radius: 99px; border: 1px solid #D5D8DD; background: #fff; color: var(--ink); cursor: pointer; }

@media (max-width: 820px) {
  .walk { grid-template-columns: 1fr; gap: 12px; }
  .walk-steps { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .walk-steps li { flex: none; }
  .walk-steps button { padding: 6px 10px 6px 36px; white-space: nowrap; }
}
@media (max-width: 520px) { .verdict-lenses { grid-template-columns: 1fr; } .seg button { padding: 6px 9px; font-size: 11.5px; } }

/* ---------- four trajectories ---------- */
.traj { margin-top: 20px; margin-bottom: 46px; position: relative; }
.traj-row { margin-bottom: 16px; }
.traj-head { font-size: 15px; line-height: 1.4; margin: 0 0 8px 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.traj-head img { width: 18px; height: 18px; }
.traj-head .verdict { font-size: 12px; font-weight: 600; line-height: 1; padding: 5px 9px; border-radius: 99px; color: #fff; }
.verdict.ok { background: var(--green); } .verdict.no { background: var(--red); }
.traj-flow { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 22px; position: relative; overflow-x: auto; padding: 2px 2px 6px; }
.tcard { position: relative; text-align: left; border: 0; border-radius: 10px; background: var(--tint); padding: 10px 11px; cursor: pointer; font: 500 13.5px/1.35 var(--sans); color: var(--ink); }
.tcard:hover { box-shadow: 0 0 0 1.5px var(--ink); }
.tcard + .tcard::before { content: '→'; position: absolute; left: -17px; top: 24px; color: var(--faint); font-size: 15px; }
.tcard .q { display: block; margin-top: 7px; font-size: 12px; font-weight: 400; line-height: 1.4; color: var(--ink2); background: #fff; border-radius: 6px; padding: 6px 7px; }
.tcard .q.code { font-family: var(--mono); font-size: 11.2px; }
.tcard .q { position: relative; padding-right: 20px; overflow-wrap: anywhere; }
.src { width: 11px; height: 11px; fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; flex: none; }
.tcard .q .src { position: absolute; right: 5px; bottom: 5px; }
.traj-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 18px; margin: 30px 0 0; font-size: 12.5px; }
.traj-legend span { display: inline-flex; align-items: center; gap: 5px; }
.tcard.seen { background: #ECEDF9; }
.tcard.ok { background: #E9F5ED; }
.tcard.no { background: #FBECEA; }
.traj-band { position: absolute; border-radius: 12px; border: 1.5px dashed rgba(91, 94, 194, .5); pointer-events: none; }
.traj-band span { position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
@media (max-width: 820px) { .traj-band { display: none; } }

/* ---------- ending ---------- */
.bib { position: relative; }
.bib pre { background: var(--tint); color: var(--ink); border-radius: 10px; padding: 18px 20px; overflow-x: auto; font: 400 13px/1.6 var(--mono); margin: 0 0 10px; border: 1px solid var(--line); }
.bib pre code { background: none; padding: 0; font-size: 1em; }
.bib .copy { position: absolute; top: 10px; right: 10px; font: 500 12px/1 var(--sans); padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink2); cursor: pointer; }
#cite p { font-size: 15.5px; }

/* ---------- dialog ---------- */
.dlg { border: 0; border-radius: 14px; padding: 20px 22px; width: min(860px, 94vw); max-height: 88vh; box-shadow: 0 30px 60px rgba(0,0,0,.3); font-family: var(--sans); }
.dlg::backdrop { background: rgba(20, 22, 26, .45); }
.dlg-title { font-size: 15px; font-weight: 600; line-height: 1.4; margin: 0 30px 12px 0; }
.dlg-body pre { white-space: pre-wrap; word-break: break-word; font: 400 12.5px/1.5 var(--mono); background: var(--tint); padding: 14px; border-radius: 8px; max-height: 66vh; overflow: auto; margin: 0; }
.dlg-body video { width: 100%; display: block; border-radius: 8px; }
.dlg-close { position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--soft); }

@media (max-width: 600px) { body { font-size: 16px; } main h2 { margin-top: 64px; } }
