/* EditHero additions on top of the Alaya Lab page styles (base.css + showcase.css) */
:root{
  --op-add:#7DAEE0; --op-remove:#299D8F; --op-replace:#E9C46A; --op-retexture:#D87659;
  --paper-bg:#fbfaf7;
}

/* operation chips: the paper's operation colours */
.op{display:inline-block;padding:2px 10px;border-radius:999px;font-family:var(--font-b);font-size:12.5px;font-weight:600;
  letter-spacing:.2px;color:#fff;line-height:1.6;white-space:nowrap}
.op-add{background:var(--op-add)} .op-remove{background:var(--op-remove)}
.op-replace{background:var(--op-replace);color:#3b2f10} .op-retexture{background:var(--op-retexture)}

/* numbers row */
.stat-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:30px 0 34px}
.stat{background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius-sm);padding:18px 18px 16px;
  display:flex;flex-direction:column;gap:2px;min-width:0}
.stat b{font-family:var(--font-d);font-size:30px;font-weight:700;color:var(--text);font-variant-numeric:tabular-nums;line-height:1.1}
.stat span{font-family:var(--font-b);font-size:13px;color:var(--text-2)}
.stat.ops{flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px}
.stat.ops .op{font-size:13px;padding:4px 12px}

/* paper figures sit on a warm paper card so the white figure backgrounds read as intentional */
.paper-fig{background:var(--paper-bg);border-radius:var(--radius);padding:18px;margin:22px 0;
  box-shadow:0 18px 50px rgba(0,0,0,.35)}
.paper-fig img{width:100%;height:auto;border-radius:6px}

/* findings */
.finding-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:26px 0 8px}
.finding{background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius-sm);padding:18px}
.finding b{display:block;font-family:var(--font-d);font-size:16px;color:var(--text);margin-bottom:6px}
.finding p{font-size:14.5px;line-height:1.55;color:var(--text-2)}

/* tables */
.table-card{padding:22px 24px;overflow-x:auto;margin:22px 0}
.table-title{font-family:var(--font-d);font-size:15px;font-weight:700;color:var(--text);margin:4px 0 6px}
.res-table tr.ref td{color:var(--text-3)}
.res-table td small{color:var(--text-3);font-size:12px}
.res-table td b{color:var(--text)}

/* chain explorer */
.explorer{padding:20px 22px 18px;margin-top:22px}
.chain-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.turn-bar{display:flex;align-items:center;gap:10px;margin:4px 0 10px}
.turn-steps{display:flex;gap:6px;flex-wrap:wrap}
.turn-step{min-width:44px;padding:6px 10px;border-radius:10px;border:1px solid var(--stroke-2);background:transparent;color:var(--text-2);
  font-family:var(--font-b);font-size:13px;font-weight:600;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:3px}
.turn-step i{display:block;width:18px;height:4px;border-radius:2px}
.turn-step.active{background:var(--surface-2);color:var(--text);border-color:var(--text-2)}
.turn-step:focus-visible,.chain-tabs button:focus-visible{outline:2px solid var(--accent-blue);outline-offset:2px}
.turn-instr{display:flex;gap:10px;align-items:baseline;min-height:3.2em;margin:6px 0 14px;font-size:17px;color:var(--text)}
.turn-instr .txt{font-family:var(--font-s)}
.method-grid{display:grid;grid-template-columns:repeat(var(--cols,4),minmax(0,1fr));gap:10px}
.mtile{background:#0b0b0d;border-radius:12px;overflow:hidden;position:relative;box-shadow:0 0 0 1px var(--stroke)}
.mtile img{width:100%;aspect-ratio:1/1;object-fit:cover}
.mtile figcaption{position:absolute;left:0;right:0;bottom:0;padding:5px 8px;font-family:var(--font-b);font-size:12px;font-weight:600;
  color:#fff;background:linear-gradient(transparent,rgba(0,0,0,.62))}
.mtile.ref{box-shadow:0 0 0 2px #e9e1d3}
.mtile.code figcaption::after{content:" · code";font-weight:400;opacity:.8}
.mtile.missing{background:var(--surface);display:flex;align-items:center;justify-content:center;aspect-ratio:1/1;color:var(--text-3);font-size:12px}
.explorer-note{font-size:13px;color:var(--text-3);margin-top:12px}

@media(max-width:1000px){
  .stat-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stat.ops{grid-column:1/-1}
  .finding-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
  .finding-grid{grid-template-columns:1fr}
  .method-grid{--cols:2 !important}
  .paper-fig{padding:10px}
}

/* game-title wordmark (hero and nav): solid fills, dark outline, stacked extrusion; no gradient */
.game-title{display:inline-block;font-family:'Luckiest Guy','Arial Black',system-ui,sans-serif;font-weight:400;letter-spacing:.04em;line-height:1;transform:rotate(-3deg)}
#hero h1 .game-title span,.nav-logo .game-title span{background:none;-webkit-background-clip:border-box;background-clip:border-box;-webkit-text-fill-color:currentColor;
  -webkit-text-stroke:.13em #fff7e6;paint-order:stroke fill;
  text-shadow:.02em .03em 0 #6C58A8,.04em .06em 0 #6C58A8,.06em .09em 0 #6C58A8,.08em .12em 0 #5a4792,.1em .15em 0 #4b3a7e,.12em .18em 0 #3d2f68,.14em .3em .25em rgba(0,0,0,.55)}
#hero h1 .game-title .gt-a,.nav-logo .game-title .gt-a{color:#7DAEE0}
#hero h1 .game-title .gt-b,.nav-logo .game-title .gt-b{color:#E9C46A;margin-left:.06em}
.hero-title{font-size:clamp(64px,11vw,132px);margin:10px 0 26px;padding:0 .12em .2em}
.nav-logo .game-title{font-size:25px;transform:rotate(-3deg) translateY(1px)}
#hero .authors{margin-top:26px}
.lab-foot{display:inline-flex;flex-direction:column;align-items:center;color:inherit;text-decoration:none}
@media(max-width:700px){.hero-title{font-size:64px}.nav-logo .game-title{font-size:20px}}
#hero h1 .game-title,.nav-logo .game-title{background:none;-webkit-text-fill-color:currentColor;color:inherit;filter:none}
#hero .affil{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 18px;margin:8px auto}
#hero .affil+.affil{margin-bottom:26px}
.dir-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;max-width:760px;margin:22px auto 34px}
.dir{border:1px solid var(--stroke);border-radius:var(--radius-sm);padding:14px 18px;display:flex;flex-direction:column;gap:4px;text-align:left;background:var(--surface)}
.dir b{font-family:'Luckiest Guy',var(--font-d);font-weight:400;font-size:22px;letter-spacing:.04em;color:#7DAEE0}
.dir+.dir b{color:#E9C46A}
.dir span{font-size:15px;color:var(--text-2)}
@media(max-width:560px){.dir-row{grid-template-columns:1fr}}

/* instruction structure in the chain explorer: verb in the operation colour, objects, attributes */
.turn-instr .txt .ins-v{font-weight:700}
.ins-v.ins-add{color:var(--op-add)} .ins-v.ins-remove{color:#4cc2b2} .ins-v.ins-replace{color:var(--op-replace)} .ins-v.ins-retexture{color:#ec8d70}
.turn-instr .txt .ins-o{color:#f2a7c3;font-weight:600}
.turn-instr .txt .ins-a{color:#b9a4f0}
.instr-legend{display:flex;gap:16px;font-size:12.5px;color:var(--text-3);margin:-6px 0 12px}
.instr-legend i{font-style:normal;font-weight:600}
/* the wordmark is the same image as in the video (compose_v3.wordmark) */
.nav-logo img.wordmark-nav{width:auto;height:34px;filter:none}
#hero h1 img.wordmark-hero{display:block;width:min(560px,86vw);height:auto;margin:6px auto 22px}
.dir b{text-transform:uppercase}

/* benchmark: edit types and object kinds */
.sub-h{font-family:var(--font-d);font-size:22px;font-weight:700;color:var(--text);margin:42px 0 14px}
.optypes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.optype{background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius-sm);padding:14px;display:flex;flex-direction:column;gap:10px;align-items:flex-start}
.optype .op{font-size:15px;padding:4px 14px}
.ba{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:6px;width:100%}
.ba img{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:10px;background:#fff}
.ba i{font-style:normal;color:var(--text-3)}
.cats{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}
.cat{background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius-sm);padding:10px;display:flex;flex-direction:column;gap:4px}
.cat-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin-bottom:6px}
.cat-grid img{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:8px;background:#fff}
.cat b{font-family:var(--font-d);font-size:15px;color:var(--text)} .cat span{font-size:13px;color:var(--text-3)}
.paper-summary b{color:var(--text)}
@media(max-width:1000px){.optypes{grid-template-columns:repeat(2,minmax(0,1fr))}.cats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){.optypes{grid-template-columns:1fr}.cats{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* selectable wordmark: the image is drawn, a transparent text layer on top carries the selectable, copyable word */
.wm{position:relative;display:inline-block;line-height:0}
.wm img{display:block;height:auto;user-select:none;-webkit-user-drag:none;pointer-events:none;filter:none}
.wm .wm-text{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;line-height:1;white-space:nowrap;
  font-family:'Luckiest Guy',var(--font-d);letter-spacing:.02em;color:transparent!important;-webkit-text-fill-color:transparent!important;
  background:none!important;-webkit-background-clip:border-box!important;background-clip:border-box!important;user-select:text;cursor:text}
.wm .wm-text::selection{background:rgba(125,174,224,.45)}
.wm-hero{display:block;width:min(560px,86vw);margin:6px auto 22px}
.wm-hero img{width:100%}
#hero h1 .wm-hero .wm-text{font-size:min(150px,23vw)!important;letter-spacing:.01em!important;transform:rotate(-3deg) translateY(4%)}
.wm-nav img{height:34px;width:auto}
.nav-logo .wm-nav .wm-text{font-size:32px!important;letter-spacing:.04em!important;cursor:pointer}
.wm .wm-text,.wm img{text-shadow:none!important;filter:none!important;-webkit-text-stroke:0!important}
#hero h1 .wm,.nav-logo .wm{filter:none!important;background:none!important;text-shadow:none!important}

/* text layer placed by assets/js/wordmark.js */
#hero h1 .wm .wm-text,.nav-logo .wm .wm-text{inset:auto;display:inline-block;width:auto;height:auto;line-height:1;letter-spacing:0!important;transform-origin:0 50%;justify-content:initial}
#hero h1 .wm-hero .wm-text,.nav-logo .wm-nav .wm-text{font-size:100px}

/* leaderboards */
.lb-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px}
.lb{padding:22px 24px}
.lb h3{font-family:var(--font-d);font-size:22px;font-weight:700;color:var(--text);margin:0}
.lb-sub{font-size:13.5px;color:var(--text-3);margin:4px 0 16px}
.lb ol{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.lb-row{display:grid;grid-template-columns:28px 170px 1fr 48px;align-items:center;gap:10px;font-size:15px}
.lb-rank{font-family:var(--font-d);font-weight:700;color:var(--text-3);text-align:right;font-variant-numeric:tabular-nums}
.lb-name{color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lb-bar{height:14px;border-radius:7px;background:rgba(255,255,255,.06);overflow:hidden}
.lb-bar i{display:block;height:100%;border-radius:7px}
.lb-3d .lb-bar i{background:#D87659} .lb-llm .lb-bar i{background:#7DAEE0}
.lb-val{font-variant-numeric:tabular-nums;color:var(--text);text-align:right;font-weight:600}
.lb-legend{display:flex;gap:18px;font-size:14px;color:var(--text-2);margin-top:6px}
.lb-legend span::before{content:"";display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:7px;vertical-align:-1px}
.lb-legend .lb-3d::before{background:#D87659} .lb-legend .lb-llm::before{background:#7DAEE0}
.lb-note{font-size:13.5px;color:var(--text-3);margin-top:14px}
@media(max-width:900px){.lb-grid{grid-template-columns:1fr}.lb-row{grid-template-columns:24px 140px 1fr 44px}}
/* top bar: larger type */
.nav-links{gap:30px!important}
.nav-links a{font-size:15.5px!important;font-weight:600;letter-spacing:.1px}
.nav-links .nav-cta{font-size:15px!important;padding:11px 22px!important}
.nav-logo .wm-nav img{height:42px}
@media(max-width:700px){.nav-links a{font-size:12px!important}.nav-logo .wm-nav img{height:30px}}

/* teaser: the source art itself (denoised), rounded with a white frame; labels are HTML at the positions of the paper's TikZ overlay */
.teaser-art{background:#fff;padding:10px;border-radius:22px;box-shadow:0 18px 50px rgba(0,0,0,.35)}
.teaser-art .tz{position:relative;border-radius:14px;overflow:hidden;line-height:0;container-type:inline-size}
.teaser-art .tz img{display:block;width:100%;height:auto}
.tz-t,.tz-op{position:absolute;transform:translate(-50%,50%);line-height:1;white-space:nowrap}
.tz-t{font-family:"Source Serif 4",serif;font-style:italic;font-weight:600;font-size:1.55cqw;color:#1c1c1c;background:rgba(255,255,255,.87);border-radius:.25em;padding:.12em .3em}
.tz-t sub{font-style:normal;font-size:.7em}
.tz-op{font-family:"Source Serif 4",serif;font-weight:700;font-variant:small-caps;font-size:1.05cqw;color:#fff;
  text-shadow:0 0 1px #000,0 0 1px #000,.04em .04em 0 #000,-.04em -.04em 0 #000,.04em -.04em 0 #000,-.04em .04em 0 #000}
