@font-face {
  font-family: "Outfit"; font-weight: 100 900; font-style: normal; font-display: swap;
  src: url("../vendor/fonts/outfit-latin-wght-normal.woff2") format("woff2");
}
:root {
  --ink: #151a21; --muted: #56616d; --line: #dde3e9; --card: #ffffff; --paper: #eef4f9;
  --red: #d5211e; --yellow: #f6c400; --blue: #0f63c8; --green: #35a84a;
  --copper: #c2601a; --copper-soft: #fdeedd; --warn: #7a5200; --warn-bg: #fff4cf;
  --panel-w: 420px;
  font-family: "Outfit", "Avenir Next", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--paper); color: var(--ink); overflow: hidden; font-size: 16px; line-height: 1.5; }
h1, h2, h3, h4, p { margin: 0; }

/* Buttons press like bricks. */
button { font: inherit; color: inherit; cursor: pointer; font-weight: 600; border: 2px solid var(--ink); background: var(--card); border-radius: 12px; padding: .42rem .9rem;
  box-shadow: 0 3px 0 var(--ink); transition: transform .06s, box-shadow .06s; }
button:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); }
button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
button[disabled] { opacity: .4; cursor: default; transform: none; box-shadow: 0 3px 0 var(--ink); }
button:focus-visible, canvas:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
button.primary { background: var(--yellow); }
button.copper { background: var(--copper); color: #fff; }
button.big { font-size: 1.1rem; padding: .7rem 1.25rem; font-weight: 700; }
button.link { border: 0; background: none; box-shadow: none; padding: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; color: var(--blue); border-radius: 4px; transform: none; }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#stage.pointing { cursor: pointer; }
#labels { position: fixed; top: 0; left: 0; width: 0; height: 0; pointer-events: none; }
/* Each chip is its own layer, moved only by transform, so following the model never forces a repaint over the canvas. */
.chip { position: absolute; left: 0; top: 0; will-change: transform; transition: none; pointer-events: auto; white-space: nowrap; box-shadow: none;
  font-size: 13px; font-weight: 700; padding: .12rem .55rem; border-radius: 999px; background: var(--copper); color: #fff; border: 2px solid var(--ink); }
.chip:hover, .chip:active { box-shadow: none; }
.chip.open { background: #fff; color: var(--copper); border: 2px dashed var(--copper); }
.chip.zero { background: #7d8fa1; }
.chip.excluded { background: #fff; color: var(--muted); border: 2px dotted var(--muted); }
.chip.name { background: var(--ink); }
.chip.part { background: var(--ink); color: #fff; font-weight: 600; }
.chip.part.open { background: #fff; color: var(--ink); border: 2px dashed var(--ink); }
.chip.demo, .chip.demo:hover { position: static; transform: none; will-change: auto; display: inline-block; cursor: default; }
#tooltip { position: fixed; pointer-events: none; background: var(--ink); color: #fff; padding: .25rem .6rem; border-radius: 8px; font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .12s; transform: translate(12px, 14px); z-index: 5; }
#tooltip.on { opacity: 1; }

#top { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; gap: 1rem; padding: .8rem 1rem; pointer-events: none; z-index: 6; }
#top > * { pointer-events: auto; }
.brand-title { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
#crumb { font-size: 13.5px; color: var(--muted); display: flex; gap: .35rem; align-items: center; min-height: 1.3rem; }
#crumb button { border: 0; background: none; box-shadow: none; padding: 0; text-decoration: underline; color: var(--muted); border-radius: 4px; font-weight: 500; transform: none; }
#crumb .here { color: var(--ink); font-weight: 700; }
#tabs { margin: 0 auto; display: flex; gap: 3px; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 3px; box-shadow: 0 3px 0 var(--ink); }
#tabs button { border: 0; box-shadow: none; background: none; padding: .42rem 1rem; border-radius: 9px; transform: none; }
#tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.top-actions { display: flex; gap: .5rem; }

#hero { position: fixed; left: clamp(1rem, 5vw, 4rem); top: 50%; transform: translateY(-50%); max-width: 27rem; z-index: 4;
  background: var(--card); border: 2px solid var(--ink); border-radius: 22px; padding: 1.7rem 1.8rem 1.4rem; box-shadow: 0 8px 0 var(--ink); }
#hero .studs { position: absolute; top: -13px; left: 1.6rem; display: flex; gap: .7rem; }
#hero .studs i { width: 2.1rem; height: 13px; border: 2px solid var(--ink); border-bottom: 0; border-radius: 6px 6px 0 0; background: var(--red); }
#hero .studs i:nth-child(2) { background: var(--yellow); } #hero .studs i:nth-child(3) { background: var(--blue); } #hero .studs i:nth-child(4) { background: var(--green); }
.eyebrow { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
#hero h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); line-height: 1.04; text-wrap: balance; margin: .45rem 0 .7rem; font-weight: 800; letter-spacing: -.025em; }
#hero .sub { font-size: 1.2rem; color: var(--muted); line-height: 1.35; }
#hero .descriptor { font-size: .85rem; color: var(--muted); line-height: 1.4; margin-top: .8rem; }
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.3rem 0 .9rem; }
#hero .hint { font-size: 14.5px; color: var(--muted); }

#panel { position: fixed; top: 4.6rem; right: 1rem; bottom: 3.4rem; width: var(--panel-w); max-width: calc(100vw - 2rem); z-index: 5;
  /* Not fully opaque on purpose: an opaque sheet over the canvas makes some compositors cull the model above it. */
  background: rgba(255, 255, 255, 0.985); border: 2px solid var(--ink); border-radius: 18px; box-shadow: 0 6px 0 var(--ink); overflow: auto; padding: 1.2rem 1.3rem 1.5rem; overscroll-behavior: contain; }
#panel:empty { display: none; }
#panel h2 { font-size: 1.7rem; line-height: 1.12; font-weight: 800; letter-spacing: -.02em; margin: .3rem 2.2rem .6rem 0; }
#panel h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1.2rem 0 .35rem; font-weight: 700; }
#panel p { margin: .55rem 0; }
#panel .lede { font-size: 1.14rem; line-height: 1.42; font-weight: 500; }
.sys { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; background: var(--c); color: var(--ink); padding: .12rem .6rem; border-radius: 6px; border: 2px solid var(--ink); margin: 0 !important; }
.sys { color: var(--on, var(--ink)); }
.close { position: sticky; top: 0; float: right; width: 2.2rem; height: 2.2rem; padding: 0; line-height: 1; z-index: 2; font-size: 1.2rem; }
.badges { display: flex; gap: .5rem; flex-wrap: wrap; }
.count { display: inline-flex; align-items: baseline; gap: .4rem; background: var(--yellow); border: 2px solid var(--ink); border-radius: 10px; padding: .1rem .65rem; font-size: 14.5px; font-weight: 600; }
.count b { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.count.out { background: #eef0f2; border-style: dashed; color: var(--muted); }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: .9rem 0 !important; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { border-top: 1px solid var(--line); }
.rows li:last-child { border-bottom: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 1fr auto; gap: .1rem .8rem; width: 100%; text-align: left; border: 0; box-shadow: none; border-radius: 8px; background: none; padding: .55rem .25rem; font-weight: 500; transform: none; }
button.row:hover { background: #f3f6f9; transform: none; box-shadow: none; }
button.row:active { transform: none; box-shadow: none; }
button.row.off { color: var(--muted); box-shadow: none; }
button.row.on { background: #fff6cf; }
.row .v { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.row .s { grid-column: 1 / -1; font-size: 14px; color: var(--muted); font-weight: 400; }
.row .s .how { display: block; margin-top: .15rem; font-size: 13px; }
.open { color: var(--copper); font-weight: 600; }
.row.q span:first-child { font-weight: 600; }
.sw { display: inline-block; width: .85rem; height: .85rem; border-radius: 3px; border: 2px solid var(--ink); margin-right: .5rem; vertical-align: -1px; }
.sw.q { background: var(--yellow); }
.sw.m-copper { background: #e08a3e; } .sw.m-aluminum { background: #dfe6ec; } .sw.m-ferrous { background: #5b6f86; }
.sw.m-conductor { background: linear-gradient(90deg, #e08a3e 50%, #dfe6ec 50%); } .sw.m-lfp { background: #3a3f4a; } .sw.m-refrigerant { background: #a8e02a; } .sw.m-other { background: #fff; }
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: 12.5px; padding: .05rem .5rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; white-space: nowrap; font-weight: 600; }
.badge.observed { border-color: #2c7a4b; color: #1d5a35; } .badge.engineering { border-color: #1f6f8b; color: #17566c; }
.badge.proxy { border-color: #7a5ea8; color: #5a4182; } .badge.assumption { border-color: #9a6b00; color: #6f4d00; }
.badge.open { border-style: dashed; border-color: var(--copper); color: var(--copper); }
.badge.illus { background: var(--warn-bg); border-color: #d9b45a; color: var(--warn); font-weight: 700; }
.status { border: 2px dashed var(--copper); border-radius: 14px; padding: .65rem .85rem; margin: .8rem 0; background: var(--copper-soft); }
.status b { display: block; font-size: 1.2rem; font-weight: 800; }
.illus-box { border: 2px solid #d9b45a; background: var(--warn-bg); border-radius: 14px; padding: .75rem .9rem; margin: 1rem 0 .5rem; font-size: 14.5px; }
.illus-box .big { font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.note { font-size: 13.5px; color: var(--muted); }
details { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .7rem; }
details summary { cursor: pointer; font-weight: 700; border-radius: 4px; }
details.deeper > summary { font-size: 1.02rem; }
.ev { font-size: 14px; }
.ev h4 { margin: .9rem 0 .2rem; font-size: 13.5px; }
.ev ul { margin: .2rem 0; padding-left: 1.1rem; }
.ev li { margin: .25rem 0; }
.ev code { font-size: 12px; background: #eef2f6; padding: 0 .25rem; border-radius: 4px; word-break: break-all; }
.eq { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; background: #eef2f6; border-radius: 8px; padding: .5rem .6rem; margin: .5rem 0; overflow-x: auto; white-space: nowrap; }
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 12px; padding: 2px; margin: .5rem .5rem .5rem 0; flex-wrap: wrap; box-shadow: 0 3px 0 var(--ink); }
.seg button { border: 0; box-shadow: none; background: none; padding: .35rem .9rem; border-radius: 8px; transform: none; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
table.diff { width: 100%; border-collapse: collapse; margin: .5rem 0; font-variant-numeric: tabular-nums; }
table.diff th { text-align: right; font-size: 12px; color: var(--muted); font-weight: 600; padding: .2rem .25rem; white-space: nowrap; }
table.diff th:first-child, table.diff td:first-child { text-align: left; }
table.diff td { text-align: right; padding: .35rem .25rem; border-top: 1px solid var(--line); white-space: nowrap; font-size: 14px; }
table.diff td.d { font-weight: 800; }
.exp { border: 2px solid var(--ink); border-radius: 14px; padding: .85rem .95rem; margin: .9rem 0; background: #fffdf3; }
.exp h4 { margin: 0 0 .2rem; font-size: 1.08rem; font-weight: 800; }
.legend { display: flex; flex-direction: column; gap: .35rem; margin: .7rem 0; font-weight: 500; }
.matpick { display: flex; gap: .4rem; flex-wrap: wrap; margin: .3rem 0 .7rem; }
.matpick button { padding: .3rem .7rem; font-size: 14.5px; }
.matpick button[aria-pressed="true"] { background: var(--ink); color: #fff; }

#camera { position: fixed; left: 1rem; bottom: 3.6rem; display: flex; flex-direction: column; gap: .45rem; z-index: 5; }
#camera button { width: 2.6rem; height: 2.6rem; padding: 0; font-size: 1.15rem; }

#buildbar { position: fixed; left: calc(50% - var(--panel-w) / 2 - .5rem); bottom: 3.5rem; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: .6rem;
  background: var(--card); border: 2px solid var(--ink); border-radius: 16px; padding: .5rem .6rem; box-shadow: 0 5px 0 var(--ink); max-width: calc(100vw - var(--panel-w) - 8rem); }
#buildbar[hidden] { display: none; }
#buildbar .dots { display: flex; gap: 4px; }
#buildbar .dot { width: 15px; height: 15px; padding: 0; border-radius: 50%; border: 2px solid var(--ink); background: #fff; box-shadow: none; }
#buildbar .dot.on { background: var(--c); }
#buildbar .dot.now { outline: 3px solid var(--ink); outline-offset: 1px; }
#buildbar .where { font-size: 14.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
#buildbar .where b { font-size: 1.1rem; font-weight: 800; }
#buildbar button { white-space: nowrap; }

#foot { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 1rem; align-items: center; padding: .5rem 1rem; font-size: 13px; color: var(--muted); z-index: 7;
  background: color-mix(in srgb, var(--paper) 90%, transparent); border-top: 1px solid var(--line); }
#foot button.link { font-size: 13px; color: var(--muted); white-space: nowrap; }
#foot #snap { margin-left: auto; white-space: nowrap; }

#diagram { position: fixed; inset: 7.6rem calc(var(--panel-w) + 2rem) 3.2rem 1rem; overflow: auto; z-index: 3; background: var(--paper); padding: .5rem; }
#diagram .flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .9rem; }
#diagram .col h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin: .2rem 0 .5rem; font-weight: 700; display: inline-block; background: var(--c); border: 2px solid var(--ink); border-radius: 6px; padding: .05rem .5rem; color: var(--on, var(--ink)); }
#diagram .cardbtn { display: block; width: 100%; text-align: left; padding: .65rem .75rem; margin-bottom: .6rem; font-weight: 500; }
#diagram .cardbtn[aria-current="true"] { background: #fff6cf; }
#diagram .cardbtn .m { display: block; font-size: 13.5px; color: var(--muted); margin-top: .15rem; }
body.no3d #stage, body.no3d #camera, body.no3d #labels, body.no3d #buildbar, body.diagram #stage, body.diagram #camera, body.diagram #labels { display: none; }

#tour { position: fixed; left: 50%; bottom: 3.6rem; transform: translateX(-50%); width: min(48rem, calc(100vw - 2rem)); z-index: 8;
  background: var(--ink); color: #fff; border-radius: 20px; padding: 1.2rem 1.4rem; box-shadow: 0 8px 0 rgba(0,0,0,.25); }
#tour h2 { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: .3rem; }
#tour p { font-size: 1.15rem; color: #e6eaee; line-height: 1.4; }
#tour .stat { font-size: 1.5rem; font-weight: 800; color: #ffb37a; margin-top: .5rem; font-variant-numeric: tabular-nums; }
#tour .nav { display: flex; align-items: center; gap: .6rem; margin-top: 1rem; }
#tour .nav button { background: transparent; color: #fff; border-color: #fff; box-shadow: none; }
#tour .nav button.primary { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
#tour .nav .count { margin-right: auto; font-size: 14px; color: #b9c1c9; background: none; border: 0; padding: 0; }
body.touring #panel, body.touring #hero, body.touring #lens, body.touring #tabs, body.touring .top-actions, body.touring #camera, body.touring #diagram, body.touring #buildbar { display: none; }

#toast { position: fixed; left: 50%; top: 4.6rem; transform: translate(-50%, -8px); background: var(--ink); color: #fff; padding: .5rem .9rem; border-radius: 10px; font-weight: 600; font-size: 14.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 30; max-width: 90vw; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#loading { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: var(--paper); z-index: 20; color: var(--muted); font-weight: 600; font-size: 1.1rem; }
body.loading #loading { display: flex; }
#hero[hidden], #tour[hidden], #diagram[hidden] { display: none; }

#lens { display: flex; gap: 2px; background: var(--card); border: 2px solid var(--ink); border-radius: 12px; padding: 2px; box-shadow: 0 3px 0 var(--ink); }
#lens button { border: 0; box-shadow: none; background: none; padding: .32rem .7rem; border-radius: 8px; transform: none; font-size: 14px; }
#lens button[aria-pressed="true"] { background: var(--blue); color: #fff; }
#ledger { position: fixed; top: 4.5rem; left: 1rem; z-index: 5; display: flex; gap: .4rem; flex-wrap: wrap; max-width: calc(100vw - var(--panel-w) - 3rem); }
#ledger[hidden] { display: none; }
.tile { background: rgba(255,255,255,.96); border: 2px solid var(--ink); border-radius: 10px; padding: .15rem .6rem .2rem; line-height: 1.2; }
.tile span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.tile b { font-size: 1.02rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile.ill { background: var(--warn-bg); border-color: #d9b45a; } .tile.ill span { color: var(--warn); }
.tile.mine { background: var(--yellow); }
.three { display: grid; gap: .5rem; margin: .7rem 0; }
.three > div { border: 2px solid var(--ink); border-radius: 12px; padding: .5rem .7rem; background: #fff; }
.three h3 { margin: 0 0 .1rem !important; color: var(--ink) !important; }
.three p { margin: 0 !important; }
.perspective { background: var(--yellow); border: 2px solid var(--ink); border-radius: 12px; padding: .5rem .7rem; font-weight: 500; }
.perspective b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
.steps { padding-left: 1.3rem; margin: .6rem 0; } .steps li { margin: .5rem 0; font-size: 1.08rem; font-weight: 500; }
.losses { max-width: 60rem; } .losses h3, .dh { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1rem 0 .4rem; font-weight: 700; }
.stage { display: block; width: 100%; text-align: left; border: 0; box-shadow: none; background: none; padding: .25rem 0; border-radius: 8px; font-weight: 500; transform: none; }
.stage:hover { background: #e3ebf2; transform: none; box-shadow: none; }
.stage .lab { display: flex; justify-content: space-between; gap: 1rem; font-size: 14px; } .stage .lab i { font-style: normal; color: var(--muted); font-size: 13px; text-align: right; }
.stage .bar { display: flex; height: 1.7rem; margin-top: .15rem; }
.stage .bar span { display: flex; align-items: center; padding: 0 .5rem; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; border: 2px solid var(--ink); }
.stage .it { background: var(--yellow); border-radius: 6px 0 0 6px; } .stage .fac { background: #9fd3f2; border-left: 0 !important; border-radius: 0 6px 6px 0; } .stage .heat { background: #f4a59f; border-radius: 6px; }
@media (max-width: 1180px) { #buildbar .dots { display: none; } }
@media (max-width: 820px) {
  body { font-size: 15.5px; }
  #top { flex-wrap: wrap; gap: .45rem .5rem; padding: .5rem .6rem; }
  .brand { flex: 1; min-width: 0; }
  .brand { overflow: hidden; }
  .brand-title { font-size: .95rem; line-height: 1.2; text-wrap: balance; }
  #shareBtn { display: none; }
  #tabs { order: 3; width: 100%; margin: 0; }
  #tabs button { padding: .4rem .3rem; flex: 1; font-size: 14.5px; }
  .top-actions button { padding: .28rem .6rem; font-size: 13.5px; box-shadow: 0 2px 0 var(--ink); }
  #presentBtn { display: none; }
  #lens { order: 2; } #lens button { padding: .25rem .5rem; font-size: 13px; }
  #ledger { top: 6.5rem; left: .5rem; right: 3.4rem; max-width: none; flex-wrap: nowrap; overflow-x: auto; }
  .tile { flex: 0 0 auto; } .tile b { font-size: .92rem; }
  #panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 48vh; border-radius: 20px 20px 0 0; border-bottom: 0; box-shadow: none; padding-bottom: 3.2rem; }
  #panel h2 { font-size: 1.4rem; }
  #panel .lede { font-size: 1.05rem; }
  #hero { left: .7rem; right: .7rem; top: auto; bottom: 3.6rem; transform: none; max-width: none; padding: 1.3rem 1.2rem 1rem; }
  #hero h1 { font-size: 2.1rem; }
  #hero .sub { font-size: 1.05rem; }
  #hero button.big { font-size: 1rem; padding: .6rem .9rem; }
  #camera { bottom: auto; top: 6.6rem; left: auto; right: .6rem; }
  #camera button { width: 2.3rem; height: 2.3rem; box-shadow: 0 2px 0 var(--ink); }
  #buildbar { left: 50%; bottom: 2.9rem; max-width: calc(100vw - 1rem); gap: .4rem; padding: .4rem; }
  body.sheet #buildbar { bottom: calc(48vh + .5rem); }
  #buildbar .where .nm { display: none; }
  #buildbar button { padding: .35rem .6rem; font-size: 14px; }
  #foot { font-size: 11.5px; padding: .35rem .6rem; gap: .6rem; }
  #foot .fine { display: none; }
  #foot button.link { font-size: 12px; }
  #diagram { inset: 9.6rem .5rem 49vh .5rem; }
  #tour { bottom: 2.8rem; padding: .9rem 1rem; }
  #tour h2 { font-size: 1.3rem; } #tour p { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Keep navigation and provenance readable on narrow screens. */
#foot { flex-wrap: wrap; gap: .35rem 1rem; }
#foot .fine { flex: 1 1 22rem; }
#foot #snap { white-space: normal; }
@media (min-width: 821px) and (max-width: 1100px) {
  #top { gap: .45rem; }
  #tabs button { padding: .42rem .65rem; }
  #presentBtn { display: none; }
  #ledger { top: 6.2rem; }
}
@media (max-width: 820px) {
  #crumb { white-space: nowrap; overflow: hidden; }
  #foot { gap: .2rem .6rem; }
  #foot #snap { flex-basis: 100%; margin: 0; font-size: 10.5px; }
  #foot a { white-space: nowrap; }
  #panel { padding-bottom: 4rem; }
  #hero { bottom: 4.2rem; }
  #hero .hero-content { max-height: calc(100dvh - 17rem); overflow-y: auto; }
  #tour { bottom: 3.8rem; }
  #buildbar { bottom: 3.9rem; }
}

@media (max-width: 480px) {
  .brand { flex: 1 0 100%; display: flex; align-items: baseline; gap: .75rem; }
  .brand-title { white-space: nowrap; }
  #crumb { margin-left: auto; min-width: 0; }
  #lens { order: 0; }
  .top-actions { margin-left: auto; }
  #camera, #ledger { top: 9rem; }
  #diagram { top: 12rem; }
}
@media (max-width: 360px) {
  #hero { bottom: 5.4rem; }
  #tabs button { font-size: 13px; padding-inline: .1rem; }
}
@media (max-width: 480px) and (max-height: 700px) {
  body:has(#hero:not([hidden])) #camera { visibility: hidden; }
}
