/* Amaze OS site: components shared by the content pages. */
/* ---------- Hero ---------- */
.hero {
  text-align: center; max-width: 980px; margin: 0 auto;
  padding: clamp(40px, 9vw, 112px) var(--gutter) clamp(36px, 6vw, 64px);
}
.hero h1 {
  font-weight: 500; font-size: clamp(44px, 8.2vw, 108px);
  line-height: 1.0; letter-spacing: -0.025em; margin: 0 0 28px;
}
.hero-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.pill { font-size: 16px; color: #000; text-decoration: none; background: var(--field); border: 1px solid var(--edge); border-radius: 4px; padding: 7px 16px; }
.pill:hover { background: #fff; border-color: #000; }
.hero p { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.45; color: var(--quiet); max-width: 36em; margin: 0 auto; }

/* ---------- Stage: the running system in a panel ---------- */
.stage { max-width: 1248px; margin: 0 auto; padding: 0 var(--gutter); position: relative; }
.stage .screen { position: relative; background: var(--night); border-bottom: 1px solid var(--edge); }
.stage .screen img { width: 100%; height: auto; }
.hotspot {
  position: absolute; left: 1.35%; top: 35.8%; width: 7.4%; aspect-ratio: 1;
  border-radius: 50%; border: 1.5px dashed rgba(255,255,255,.7);
  background: transparent; cursor: pointer; padding: 0;
}
.hotspot:hover, .hotspot[aria-expanded="true"] { border-style: solid; border-color: #fff; }
.inspector {
  position: absolute; top: 15%; right: calc(var(--gutter) + 2.5%);
  width: min(470px, 56%);
  animation: open .2s ease-out;
}
.inspector[hidden] { display: none; }
@keyframes open { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.inspector pre {
  margin: 10px; padding: 12px 14px;
  font-size: 12.5px; line-height: 1.6; overflow-x: auto; white-space: pre;
}
.inspector .info-bar a { color: var(--lapis); font-weight: 500; }
.btn {
  background: var(--field); border: 1px solid var(--edge); border-radius: 3px;
  font: inherit; font-size: 12.5px; padding: 1px 10px; cursor: pointer; color: #000;
}
.btn:hover { background: #f2f2f2; }
.panel-head a.src { font-size: 12.5px; color: #000; text-decoration: none; background: var(--field); border: 1px solid var(--edge); border-radius: 3px; padding: 1px 8px; }
.panel-head a.src:hover { background: #fff; }
.k { color: #b3550d; } .s { color: #4a7a00; } .nm { color: #1f4fa3; }

/* ---------- The dig ---------- */
.dig { border-top: 1px solid var(--edge); }
.dig[hidden] { display: none; }
.dig-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--panel-head); border-bottom: 1px solid var(--edge); flex-wrap: wrap; }
.dig-head .spacer { flex: 1; }
.trail { display: flex; align-items: center; flex-wrap: wrap; row-gap: 4px; }
.trail .chip { cursor: pointer; font-size: 12px; padding: 0 7px; }
.trail .tw { width: 10px; height: 2px; background: #555; }
.btn.primary { background: #000; color: #fff; border-color: #000; }
.btn.primary:hover { background: #333; }
.btn:disabled { opacity: .55; cursor: default; }
.dig-chain { display: flex; overflow-x: auto; padding: 10px; gap: 0; height: 340px; background: #bdbdbd; }
.dig-chain .dev { flex: none; width: min(460px, 78vw); display: flex; flex-direction: column; min-height: 0; background: var(--panel); border: 1px solid var(--edge); border-radius: 3px; }
.dig-chain .dev + .dev { margin-left: 18px; position: relative; }
.dig-chain .dev + .dev::before { content: ""; position: absolute; left: -18px; top: 15px; width: 18px; height: 2px; background: #555; }
.dig-chain .dev header { display: flex; align-items: center; gap: 7px; padding: 4px 8px; background: var(--panel-head); border-bottom: 1px solid var(--edge); font-size: 12px; white-space: nowrap; overflow: hidden; }
.dig-chain .dev header b { font-weight: 500; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; }
.dig-chain .dev header .kind { color: var(--panel-quiet); }
.dig-chain .dev header .spacer { flex: 1; }
.dig-chain .dev header a { font-size: 11.5px; color: #000; background: var(--field); border: 1px solid var(--edge); border-radius: 3px; padding: 0 7px; text-decoration: none; line-height: 18px; }
.dig-chain .dev .code { flex: 1; overflow: auto; background: var(--field); }
.dig-chain .ln { display: grid; grid-template-columns: 42px 1fr; font-family: var(--mono); font-size: 12px; line-height: 1.6; white-space: pre; font-variant-ligatures: none; }
.dig-chain .ln b { font-weight: 400; color: #8a8a8a; text-align: right; padding-right: 10px; }
.dig-chain .sep { color: #7a7a7a; font-family: var(--mono); font-size: 12px; padding: 6px 0 2px 52px; }
.dig-chain a.sym { color: inherit; text-decoration: underline; text-decoration-color: #9a9a9a; text-underline-offset: 3px; cursor: pointer; }
.dig-chain a.sym:hover { color: var(--lapis); text-decoration-color: currentColor; }
.dig-chain a.sym.on { background: var(--c-sigil); text-decoration: none; border-radius: 2px; }
.dig-chain .tk-c { color: #7a7a7a; font-style: italic; }
.dig-chain .tk-s { color: #4a7a00; }
.dig-chain .tk-n, .dig-chain .tk-k { color: #b3550d; }
.dig-chain .dev.metal .code { padding: 14px; display: grid; align-content: center; gap: 6px; }
.dig-bits { display: grid; grid-template-columns: repeat(32, minmax(0, 1fr)); gap: 1px; font-family: var(--mono); }
.dig-bits i { font-style: normal; text-align: center; font-size: 11px; padding: 4px 0; background: var(--tc); border: 1px solid rgba(0,0,0,.3); }
.dig-fields { display: grid; grid-template-columns: repeat(32, minmax(0, 1fr)); gap: 1px; }
.dig-fields span { font-size: 10.5px; line-height: 1.3; padding: 3px; background: #fff; border: 1px solid var(--edge-soft); overflow: hidden; }
.dig-fields b { display: block; font-weight: 500; }
#digSay code { font-size: .92em; background: var(--field); border: 1px solid var(--edge-soft); padding: 0 4px; border-radius: 2px; }
.pill { font: inherit; cursor: pointer; }
.pill.primary { background: #000; color: #fff; border-color: #000; }
.pill.primary:hover { background: #333; }

/* ---------- Section frame ---------- */
.section { max-width: 1200px; margin: 0 auto; padding: clamp(72px, 11vw, 140px) var(--gutter) 0; }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head h2 {
  font-weight: 500; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 16px;
}
.section-head p { font-size: 19px; color: var(--quiet); margin: 0; max-width: 38em; }

/* ---------- The descent ---------- */
.descent { display: grid; gap: 0; }
.layer { position: relative; display: grid; grid-template-columns: 6px 1fr; }
.layer + .layer { margin-top: 14px; }
.layer::before {
  /* the trace: a cable from one layer to the next */
  content: ""; position: absolute; left: 2px; top: -14px; height: 14px; width: 2px; background: var(--edge);
}
.layer:first-child::before { display: none; }
.strip { background: var(--tc); border: 1px solid var(--edge); border-right: 0; border-radius: 4px 0 0 4px; }
.layer .panel { border-radius: 0 4px 4px 0; }
.layer-body {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 18px; padding: 14px;
}
.layer-body .say { font-size: 15.5px; line-height: 1.55; color: var(--panel-text); align-self: center; max-width: 34em; }
.layer-body .say p { margin: 0 0 .7em; }
.layer-body .say p:last-child { margin-bottom: 0; }
.layer-body .say code { font-size: .88em; background: var(--field); border: 1px solid var(--edge-soft); padding: 0 4px; border-radius: 2px; white-space: nowrap; }
.fig { padding: 12px; min-width: 0; }
.fig.flush { padding: 0; overflow: hidden; }
.fig.flush img { width: 100%; height: auto; }

/* slot table (Rose) */
.slots { width: 100%; border-collapse: collapse; font-size: 13px; }
.slots td { padding: 3px 8px; border-bottom: 1px solid #cfcfcf; font-variant-numeric: tabular-nums; }
.slots tr:last-child td { border-bottom: 0; }
.slots td:first-child { color: var(--panel-quiet); width: 40%; }
.slots td:last-child { font-family: var(--mono); text-align: right; }
.swatch { display: inline-block; width: 11px; height: 11px; border: 1px solid rgba(0,0,0,.4); vertical-align: -1px; margin-right: 6px; background: #FF7F1A; }
.chain { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; font-size: 12.5px; color: var(--panel-quiet); }

/* device row (Flux, Aether) */
.devices { display: flex; align-items: stretch; flex-wrap: wrap; gap: 0; row-gap: 10px; }
.device {
  background: var(--field); border: 1px solid var(--edge); border-radius: 3px;
  min-width: 92px; display: flex; flex-direction: column;
}
.device .dh { font-size: 11.5px; padding: 2px 7px; background: var(--tc, #c9c9c9); border-bottom: 1px solid var(--edge); font-weight: 500; }
.device .dv { font-family: var(--mono); font-size: 16px; padding: 6px 8px 7px; font-variant-numeric: tabular-nums; }
.wire { align-self: center; width: 22px; height: 2px; background: #555; position: relative; }
.wire::after { content: ""; position: absolute; right: -1px; top: -3px; border: 4px solid transparent; border-left: 5px solid #555; border-right: 0; }

/* grammar match (Azoth) */
.match { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; font-family: var(--mono); }
.match .ch { text-align: center; background: var(--field); border: 1px solid var(--edge-soft); padding: 6px 0; font-size: 16px; }
.match .part {
  background: var(--tc); border: 1px solid rgba(0,0,0,.35); border-radius: 2px;
  font-family: var(--sans); font-size: 11.5px; font-weight: 500; text-align: center; padding: 2px 2px; margin-top: 2px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.rule { margin-top: 12px; padding: 8px 10px; font-size: 12.5px; overflow-x: auto; white-space: pre; }
.result { margin-top: 8px; font-size: 12.5px; color: var(--panel-quiet); }
.result code { color: #000; }

/* listing (Prima) */
.listing { font-family: var(--mono); font-size: 12px; line-height: 1.55; max-height: 330px; overflow: auto; }
.listing .ln { display: grid; grid-template-columns: 74px 70px 1fr; gap: 8px; padding: 0 8px; border-left: 4px solid transparent; }
.listing .ln.dim { color: #8a8a8a; }
.listing .ln.hot { background: #fff4c2; border-left-color: #000; }
.listing .ln span:first-child { color: #777; }
.ir { padding: 8px 10px; font-size: 12px; margin-bottom: 10px; overflow-x: auto; white-space: pre; }

/* bits (metal) */
.bits { display: grid; grid-template-columns: repeat(32, minmax(0, 1fr)); gap: 1px; font-family: var(--mono); }
.bits .b { text-align: center; font-size: 13px; padding: 5px 0; background: var(--tc); border: 1px solid rgba(0,0,0,.3); }
.fields { display: grid; grid-template-columns: repeat(32, minmax(0, 1fr)); gap: 1px; margin-top: 4px; }
.fields div { font-size: 11px; line-height: 1.3; padding: 3px 4px; background: var(--field); border: 1px solid var(--edge-soft); overflow: hidden; }
.fields b { display: block; font-weight: 500; font-size: 11.5px; }
.word { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.word .mono { font-size: 13.5px; }

/* budget meter */
.meter { margin-top: 28px; }
.meter .bar { display: flex; height: 26px; background: var(--field); border: 1px solid var(--edge); border-radius: 2px; overflow: hidden; }
.meter .seg { background: var(--tc); border-right: 1px solid rgba(0,0,0,.35); }
.meter .legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--panel-quiet); }
.meter .legend span { display: inline-flex; gap: 6px; align-items: center; font-variant-numeric: tabular-nums; }
.meter .legend i { width: 10px; height: 10px; background: var(--tc); border: 1px solid rgba(0,0,0,.35); display: inline-block; }
.meter .total { font-size: 15px; color: var(--ink); }
.meter .total b { font-weight: 500; }

/* ---------- Notes (essay) ---------- */
.notes {
  display: grid; grid-template-columns: minmax(0, 38rem) minmax(0, 15rem);
  column-gap: clamp(32px, 5vw, 72px);
  max-width: 1200px; margin: 0 auto; padding: clamp(72px, 11vw, 140px) var(--gutter) 0;
}
.notes > * { grid-column: 1; }
.notes h2 { font-weight: 500; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 28px; }
.notes h3 { font-weight: 500; font-size: 24px; letter-spacing: -0.01em; margin: 56px 0 12px; }
.notes p { font-family: var(--serif); font-size: 19px; line-height: 1.72; margin: 0 0 1.1em; }
.notes p code { font-size: .82em; white-space: nowrap; background: var(--field); border: 1px solid var(--edge-soft); padding: 0 5px; border-radius: 2px; }
.side {
  grid-column: 2; font-size: 14.5px; line-height: 1.5; color: var(--quiet);
  border-top: 1px solid var(--rule); padding-top: 10px; margin: 0 0 20px; align-self: start;
}
.side b { color: var(--ink); font-weight: 500; }
figure.code { margin: 8px 0 28px; }
figure.code pre { margin: 10px; padding: 12px 14px; font-size: 13.5px; line-height: 1.65; overflow-x: auto; }

/* ---------- Status ---------- */
.status { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.status ul { list-style: none; padding: 0; margin: 0; }
.status li {
  display: grid; grid-template-columns: 18px 1fr; column-gap: 10px;
  padding: 10px 12px; border-bottom: 1px solid var(--edge-soft); background: var(--field); font-size: 15.5px;
}
.status li:nth-child(even) { background: var(--field-alt); }
.status li:last-child { border-bottom: 0; }
.status li span { grid-column: 2; color: var(--panel-quiet); font-size: 13.5px; }
.status li::before {
  content: ""; width: 12px; height: 12px; margin-top: 5px; border-radius: 2px; border: 1px solid rgba(0,0,0,.45);
  grid-row: span 2;
}
.status .yes li::before { background: var(--c-works); }
.status .not li::before { background: transparent; }

/* ---------- Principles ---------- */
.principle { max-width: 1200px; margin: 0 auto; padding: clamp(80px, 12vw, 152px) var(--gutter) 0; }
.principle .lede {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 20px clamp(32px, 5vw, 80px); margin-bottom: 40px; align-items: start;
}
.principle h2 {
  font-weight: 500; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.04; letter-spacing: -0.02em; margin: 0;
}
.principle .lede p { font-family: var(--serif); font-size: 19px; line-height: 1.7; margin: 0 0 1em; max-width: 34em; }
.principle .lede p:last-child { margin-bottom: 0; }
.principle > .panel + .panel { margin-top: 14px; }
.principle figure { margin: 0; }
.principle figure pre, .principle .panel > pre { margin: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.6; overflow-x: auto; }

/* track rows: a label column and a body, like a mixer */
.tracks .track { display: grid; grid-template-columns: 92px minmax(0, 1fr); border-bottom: 1px solid var(--edge); }
.tracks .th { padding: 10px; font-weight: 500; font-size: 13px; border-right: 1px solid var(--edge); background: var(--panel); }
.tracks .tb { min-width: 0; padding: 10px; }
.tracks .tb.shot { padding: 10px; }
.tracks .tb.shot img { width: 100%; height: auto; border: 1px solid var(--edge); }
.console { margin: 0; padding: 10px 12px; font-size: 12.5px; line-height: 1.7; overflow-x: auto; white-space: pre; }

/* books */
.books { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 0; }
.books-col { padding: 16px; min-width: 0; }
.books-col + .books-col { border-left: 1px solid var(--edge); }
.books-label { font-size: 13px; color: var(--panel-quiet); margin-bottom: 12px; }
.books-label b { display: block; font-weight: 500; font-size: 15px; color: #000; }
.book-grid { display: grid; grid-template-columns: repeat(60, minmax(0, 1fr)); gap: 2px; }
.book-grid.one { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.book-grid i { aspect-ratio: 1; background: var(--tc, #9a9a9a); border: 1px solid rgba(0,0,0,.3); display: block; }
.books-count { margin-top: 12px; font-size: 22px; font-weight: 500; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.meter-panel .meter { padding: 14px; margin: 0; }

/* stream operations */
.ops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.op .panel-head .meta { font-family: var(--mono); }
.op .lanes { padding: 12px; display: grid; gap: 6px; }
.lane-row { display: grid; grid-template-columns: 30px repeat(5, minmax(0, 1fr)); gap: 4px; align-items: center; }
.lane-row .lbl { font-size: 11.5px; color: var(--panel-quiet); }
.bead {
  height: 28px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px;
  background: var(--tc, var(--c-flux)); border: 1px solid rgba(0,0,0,.35); border-radius: 2px;
}
.bead.gap { background: transparent; border: 1px dashed var(--edge-soft); }
.lane-row.out .bead { --tc: var(--c-sigil); }
.lane-row.out .bead.gap { background: transparent; }
.op .rule-line { height: 1px; background: var(--edge-soft); margin: 2px 0; }
.compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; align-items: start; }

/* apps */
.apps { display: grid; grid-template-columns: 540fr 380fr 600fr; gap: 14px; align-items: start; }
.apps img { width: 100%; height: 340px; object-fit: cover; background: var(--night); border-bottom: 1px solid var(--edge); }
.apps pre { font-size: 12px !important; }

/* portable */
.portable { display: grid; grid-template-columns: minmax(0, 1.5fr) 48px minmax(0, 0.75fr); align-items: center; }
.portable .panel + .panel { margin-top: 0; }
.wire.big { width: 100%; height: 2px; }
.file { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 12px; }
.file:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.part-pixels { padding: 8px; display: grid; gap: 6px; font-size: 12.5px; }
.part-pixels img { width: 100%; height: auto; border: 1px solid var(--edge); }
.part-world { display: grid; gap: 4px; align-content: start; font-size: 12.5px; }
.wseg { background: var(--tc); border: 1px solid rgba(0,0,0,.35); border-radius: 2px; padding: 8px; font-weight: 500; font-size: 12.5px; }
.status-strip { margin-top: 14px; }
.srow { display: grid; grid-template-columns: 14px 56px 1fr; gap: 10px; align-items: center; padding: 10px 12px; background: var(--field); font-size: 14.5px; }
.srow + .srow { border-top: 1px solid var(--edge-soft); background: var(--field-alt); }
.srow b { font-weight: 500; }
.sq { width: 12px; height: 12px; border-radius: 2px; border: 1px solid rgba(0,0,0,.45); display: block; }
.sq.on { background: var(--c-works); }

/* language vs language */
.vs { padding: 6px 14px 14px; }
.vs-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--edge-soft); }
.vs-row:last-child { border-bottom: 0; }
.vs-row .what { font-weight: 500; font-size: 14px; grid-row: span 2; align-self: center; }
.vs-bar { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 10px; align-items: center; font-size: 12.5px; }
.vs-bar .track-bg { height: 18px; background: var(--field); border: 1px solid var(--edge-soft); border-radius: 2px; position: relative; }
.vs-bar .fill { position: absolute; inset: -1px auto -1px -1px; background: var(--tc); border: 1px solid rgba(0,0,0,.4); border-radius: 2px; min-width: 4px; }
.vs-bar span { color: var(--panel-quiet); font-variant-numeric: tabular-nums; }
.vs-bar span b { color: #000; font-weight: 500; }

/* lineage stacks */
.stacks { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: end; }
.stacks .panel + .panel { margin-top: 0; }
.stack { padding: 12px; display: grid; gap: 4px; }
.blk {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 8px 10px; font-weight: 500; font-size: 13.5px;
  background: var(--tc); border: 1px solid rgba(0,0,0,.35); border-radius: 2px;
}
.blk span { font-weight: 400; font-size: 12.5px; color: rgba(0,0,0,.65); }
.blk.out {
  background: repeating-linear-gradient(135deg, #e4e4e4 0 6px, #d2d2d2 6px 12px);
  border-style: dashed; color: #555;
}
.blk.metal { background: #595959; color: #fff; }
.aside-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); margin-top: 32px; }
.aside-row p { margin: 0; font-size: 15px; color: var(--quiet); line-height: 1.6; }
.aside-row p:first-child { font-family: var(--serif); font-size: 17px; color: var(--ink); }
.aside-row b { color: var(--ink); font-weight: 500; }

/* every world starts empty */
.build { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.build figure { margin: 0; }
.mini { position: relative; aspect-ratio: 16 / 9; background: var(--night); margin: 10px; border: 1px solid var(--edge); }
.mini-shelf { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 5px; padding: 5px; background: #e4e4e4; border: 1px solid #000; border-radius: 3px; }
.mini-shelf i { width: 14px; height: 14px; border: 1px solid rgba(0,0,0,.5); border-radius: 2px; display: block; }
.mini-bar { position: absolute; left: 0; right: 0; top: 0; height: 22px; display: flex; align-items: center; gap: 6px; padding: 0 8px; background: #e4e4e4; border-bottom: 1px solid #000; font-size: 11px; }
.mini-bar.empty { background: repeating-linear-gradient(135deg, #e4e4e4 0 6px, #d2d2d2 6px 12px); outline: 2px dashed #ffd447; outline-offset: -2px; }
.mini-bar b { font-weight: 500; margin-right: 6px; }
.mini-bar span { background: #fff; border: 1px solid #8c8c8c; border-radius: 2px; padding: 0 6px; line-height: 15px; }
.worlds-bars .wb { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--edge-soft); background: var(--field); }
.worlds-bars .wb:nth-of-type(even) { background: var(--field-alt); }
.worlds-bars .who { font-size: 13px; color: var(--panel-quiet); }
.bar-demo { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid #000; border-radius: 3px; font-size: 13px; overflow: hidden; white-space: nowrap; }
.bar-demo b { font-weight: 500; margin-right: 10px; }
.bar-demo span { padding: 2px 10px; border-radius: 2px; }
.bar-demo.music { background: #2a2a2a; color: #e8e8e8; }
.bar-demo.music span { background: #474747; border: 1px solid #111; }
.bar-demo.music span.rec { background: #ff5a4f; color: #000; }
.bar-demo.student { background: #fff7d6; color: #000; }
.bar-demo.student span { background: #fff; border: 1px solid #c9b46a; }
.bar-demo.shot { padding: 0; height: auto; }
.bar-demo.shot img { width: 100%; height: auto; display: block; }
.worlds-bars .wb.code pre { margin: 0 !important; padding: 8px 10px !important; font-size: 12.5px !important; overflow-x: auto; }

/* ---------- From VPRI ---------- */
.mathrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; align-items: stretch; }
.mathrow .panel + .panel { margin-top: 0; }
.calc { padding: 18px 14px; align-items: center; justify-content: center; height: calc(100% - 34px); }
.calc .device { min-width: 110px; }
.calc .dv { font-size: 24px; }
.op-sym { font-size: 26px; padding: 0 12px; color: var(--panel-quiet); align-self: center; }
.nile { display: grid; gap: 8px; padding: 10px; }
.nile pre { margin: 0 !important; font-size: 15px !important; line-height: 1.6; }
.eq { padding: 10px 12px; font-family: var(--serif); font-size: 20px; }
.eq .lbl { display: block; font-family: var(--sans); font-size: 12px; color: var(--panel-quiet); margin-bottom: 2px; }
.grammars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.grammars .panel + .panel { margin-top: 0; }
.gcard pre { margin: 10px !important; padding: 8px 10px !important; font-size: 11.5px !important; line-height: 1.55; white-space: pre; overflow: hidden !important; height: 6.6em; }
.gcard .gnum { padding: 6px 12px 0; font-size: 28px; font-weight: 500; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.gcard .gnum small { font-size: 13px; font-weight: 400; color: var(--panel-quiet); margin-left: 6px; letter-spacing: 0; }
.gcard .info-bar { font-size: 12.5px; }
.gcard .panel-head a.src { margin-left: auto; }
.graph { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 70px; padding: 18px 20px; background: var(--field); }
.graph .col { display: grid; gap: 10px; align-content: center; }
.graph .colhead { font-size: 12px; color: var(--panel-quiet); }
.graph .device { position: relative; z-index: 1; }
.graph .device .dh { display: flex; justify-content: space-between; gap: 8px; }
.graph .device .dh span { font-weight: 400; font-family: var(--mono); font-size: 11px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.graph .device .dv { font-size: 14px; background: #fff; }
.graph svg.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.late-rows { padding: 12px; display: grid; gap: 8px; background: var(--field); }
.lr { display: grid; grid-template-columns: 190px 70px minmax(0, 1fr); align-items: center; }
.lr .chip { justify-self: start; white-space: normal; }
.lr .wire { width: 100%; justify-self: stretch; }
.chip.ghost { background: transparent; border-style: dashed; border-color: var(--edge); font-weight: 400; }
.worlds { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0; padding: 16px; background: var(--field); align-items: center; }
.wnode { margin: 0; width: 180px; font-size: 12.5px; color: var(--panel-quiet); }
.wnode img { width: 100%; height: auto; display: block; border: 1px solid var(--edge); }
.wnode figcaption { margin-top: 4px; }
.wnode b { display: block; color: #000; font-weight: 500; }
.wnode.root img { outline: 2px solid var(--c-works); }
.wnode.root { position: relative; }
.wnode.root::after { content: ""; position: absolute; left: 100%; top: 34%; width: 40px; height: 2px; background: var(--edge); }
.branches { display: grid; gap: 12px; border-left: 2px solid var(--edge); }
.branch { display: flex; align-items: center; gap: 12px; }
.branch .wnode { width: 140px; }
.bline { width: 40px; height: 2px; background: var(--edge); flex: none; }
.done ol { list-style: none; margin: 0; padding: 0; counter-reset: d; }
.done li { counter-increment: d; display: grid; grid-template-columns: 22px 16px minmax(0, 1fr); column-gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--edge-soft); background: var(--field); font-size: 15.5px; }
.done li:nth-child(even) { background: var(--field-alt); }
.done li:last-child { border-bottom: 0; }
.done li::before { content: counter(d); grid-row: span 2; color: var(--panel-quiet); font-variant-numeric: tabular-nums; }
.done li::after { content: ""; grid-row: 1 / span 2; grid-column: 2; width: 12px; height: 12px; margin-top: 5px; border-radius: 2px; border: 1px solid rgba(0,0,0,.45); }
.done li.yes::after { background: var(--c-works); }
.done li.part::after { background: linear-gradient(135deg, var(--c-works) 50%, transparent 50%); }
.done li b { grid-column: 3; grid-row: 1; font-weight: 500; }
.done li span { grid-column: 3; grid-row: 2; color: var(--panel-quiet); font-size: 13.5px; }

@media (max-width: 900px) {
  .mathrow { grid-template-columns: minmax(0, 1fr); }
  .build { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .build figure:last-child { grid-column: 1 / -1; }
  .grammars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .graph { gap: 14px 36px; padding: 14px; }
  .worlds { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .wnode.root::after { display: none; }
  .principle .lede { grid-template-columns: minmax(0, 1fr); }
  .ops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare, .stacks, .aside-row { grid-template-columns: minmax(0, 1fr); }
  .apps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .apps figure:last-child { grid-column: 1 / -1; }
  .portable { grid-template-columns: minmax(0, 1fr); }
  .wire.big { width: 2px; height: 24px; justify-self: center; }
  .books { grid-template-columns: 120px minmax(0, 1fr); }
  .vs-row { grid-template-columns: minmax(0, 1fr); }
  .vs-row .what { grid-row: auto; }
  .layer-body { grid-template-columns: minmax(0, 1fr); }
  .notes { grid-template-columns: minmax(0, 1fr); }
  .side { grid-column: 1; }
  .status { grid-template-columns: 1fr; }
  .inspector { position: static; width: auto; margin-top: 12px; }
}
@media (max-width: 560px) {
  .build { grid-template-columns: minmax(0, 1fr); }
  .worlds-bars .wb { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .grammars { grid-template-columns: minmax(0, 1fr); }
  .graph { grid-template-columns: minmax(0, 1fr); }
  .graph svg.wires { display: none; }
  .lr { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .lr .wire { display: none; }
  .calc { flex-direction: column; }
  .branch .wnode { width: 110px; }
  .ops, .apps { grid-template-columns: minmax(0, 1fr); }
  .apps figure:last-child { grid-column: auto; }
  .books { grid-template-columns: minmax(0, 1fr); }
  .books-col + .books-col { border-left: 0; border-top: 1px solid var(--edge); }
  .book-grid { grid-template-columns: repeat(40, minmax(0, 1fr)); gap: 1px; }
  .book-grid.one { grid-template-columns: repeat(40, minmax(0, 1fr)); }
  .tracks .track { grid-template-columns: minmax(0, 1fr); }
  .tracks .th { border-right: 0; border-bottom: 1px solid var(--edge); padding: 6px 10px; }
  .vs-bar { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .file { grid-template-columns: minmax(0, 1fr); }
  .nav { flex-wrap: wrap; row-gap: 12px; }
  .nav ul { flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
  .bits .b { font-size: 10px; }
  .fields div { font-size: 9.5px; padding: 2px; }
  .fields b { font-size: 10px; }
  .listing .ln { grid-template-columns: 0 64px 1fr; }
  .listing .ln span:first-child { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { .inspector { animation: none; } }

/* ---------- Page heads and the homepage's way onward ---------- */
.pagehead { max-width: 1200px; margin: 0 auto; padding: clamp(40px, 7vw, 96px) var(--gutter) 0; }
.pagehead h1, .principle h1 { font-weight: 500; font-size: clamp(44px, 7vw, 92px); line-height: 1.0; letter-spacing: -0.025em; margin: 0; }
.pagehead p { font-family: var(--serif); font-size: clamp(18px, 2vw, 22px); line-height: 1.6; color: var(--quiet); max-width: 36em; margin: 20px 0 0; }
.principle.pagetop { padding-top: clamp(40px, 7vw, 96px); }
.principle.pagetop .lede { align-items: end; }
.more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.more .panel { display: flex; flex-direction: column; text-decoration: none; color: #000; }
.more .panel:hover { border-color: #000; }
.more .panel:hover b { text-decoration: underline; text-underline-offset: 3px; }
.more b { font-weight: 500; font-size: 17px; padding: 12px 12px 4px; }
.more span:not(.chip) { padding: 0 12px 14px; color: var(--panel-quiet); font-size: 14px; line-height: 1.45; }
@media (max-width: 900px) { .more { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .more { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Old way and Amaze way, as pictures ---------- */
.vs-key { display: grid; grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 4px; }
.vs-key .chip { font-size: 14px; justify-self: start; }
.vpair { display: grid; grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: stretch; padding: 16px 0; border-top: 1px solid var(--rule); }
.vpair .vq { font-weight: 500; font-size: 18px; color: #000; text-decoration: none; padding-top: 6px; }
.vpair .vq:hover { text-decoration: underline; text-underline-offset: 3px; }
.vpair figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.vpair figcaption { font-size: 14px; line-height: 1.45; color: var(--quiet); }

/* generic "old" interface pieces: soft, rounded, grey */
.og-win { background: #fafafa !important; border: 1px solid #d0d0d4 !important; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.og-win.small { flex: 1; }
.og-title { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: #ececef; border-bottom: 1px solid #dadade; font-size: 12.5px; color: #555; }
.og-title i { width: 10px; height: 10px; border-radius: 50%; background: #c9c9ce; }
.og-title span { margin-left: 8px; }
.og-body { padding: 6px 12px; }
.og-body.pad { padding: 14px; min-height: 90px; }
.og-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #ececef; font-size: 13.5px; color: #333; }
.og-row:last-child { border-bottom: 0; }
.og-row.dim { color: #a0a0a5; }
.og-row svg { width: 16px; height: 16px; }
.og-tog { width: 30px; height: 18px; border-radius: 9px; background: #d4d4d8; position: relative; }
.og-tog::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.og-tog.on { background: #8a8a8f; }
.og-tog.on::after { left: 14px; }
.og-trio, .ng-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px; }
.og-desk { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(160deg, #dcdce2, #c9c9d1); border-radius: 6px; overflow: hidden; }
.og-top { position: absolute; left: 0; right: 0; top: 0; height: 9%; background: rgba(255,255,255,.7); }
.og-dock { position: absolute; left: 12%; right: 12%; bottom: 6%; height: 14%; display: flex; gap: 6%; justify-content: center; align-items: center; background: rgba(255,255,255,.6); border-radius: 5px; }
.og-dock i { width: 9%; aspect-ratio: 1; border-radius: 25%; background: #a9a9b0; }
.og-desk span, .mini .mlabel { position: absolute; left: 6px; top: 14%; font-size: 11px; color: #555; }
.ng-trio { background: var(--panel); border: 1px solid var(--edge); }
.ng-trio .mini { margin: 0; }
.ng-trio .mini .mlabel { color: #aaa; top: auto; bottom: 6px; left: auto; right: 6px; }
.mini-bar.dark { background: #2a2a2a; color: #e8e8e8; }
.mini-bar.dark span { background: #474747; border-color: #111; color: #e8e8e8; }
.mini-bar.dark span.rec { background: #ff5a4f; color: #000; }
.mini-bar.yellow { background: #fff7d6; }
.og-books { display: grid; grid-template-columns: repeat(50, minmax(0, 1fr)); gap: 1px; padding: 12px; align-content: start; }
.og-books i { aspect-ratio: 1; background: #b4b4ba; border-radius: 1px; display: block; }
.ng-book { display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--panel); border: 1px solid var(--edge); }
.ng-book i { width: 18px; height: 18px; background: var(--c-lapis); border: 1px solid rgba(0,0,0,.4); flex: none; }
.ng-book span { font-size: 14px; color: var(--panel-quiet); }
.ng-book b { display: block; font-size: 26px; font-weight: 500; color: #000; }
.og-flow { padding: 12px; display: grid; justify-items: center; gap: 0; font-size: 12px; }
.og-flow .st { background: #fff; border: 1px solid #c4c4ca; border-radius: 6px; padding: 4px 10px; color: #444; text-align: center; }
.og-flow .st.q { border-radius: 14px; background: #ececef; }
.og-flow .ar { width: 1px; height: 10px; background: #a0a0a5; }
.og-flow .split { display: flex; gap: 8px; margin-top: 6px; }
.og-flow .split + .ar { margin-top: 0; }
.og-flow .loop { margin-top: 8px; padding: 3px 10px; border: 1px dashed #a0a0a5; border-radius: 12px; color: #777; }
.og-flow .st.q + .split { position: relative; }
.ng-cells { display: grid; gap: 10px; align-content: center; padding: 14px; background: var(--field); border: 1px solid var(--edge); }
.ng-cells .device .dh { display: flex; justify-content: space-between; gap: 10px; }
.ng-cells .device .dh span { font-weight: 400; font-family: var(--mono); font-size: 11px; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-cells .device .dv { background: #fff; font-size: 14px; }
.og-apps { display: flex; align-items: stretch; gap: 0; padding: 14px; }
.og-apps .og-win { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.og-wall { width: 22px; margin: 0 6px; background: repeating-linear-gradient(45deg, #c9c9ce 0 4px, transparent 4px 8px); border-radius: 3px; }
.ball { display: block; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0,0,0,.4); }
.ball.ghost { opacity: .5; border-style: dashed; }
.ng-nest { display: grid; grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr); align-items: center; padding: 14px; background: var(--night); border: 1px solid var(--edge); }
.nbox { min-height: 100px; border: 1px solid #4d4d4d; background: #1a1a1a; display: flex; flex-direction: column; justify-content: space-between; padding: 6px; gap: 10px; }
.nbox .chip { align-self: flex-start; font-size: 11.5px; }
.nbox .ball { align-self: center; margin-bottom: 8px; }
.hop { width: 100%; height: auto; }
.hop path { stroke: #e6e6f2; }
.og-files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; font-size: 12px; }
.og-files div { background: #fff; border: 1px solid #d6d6da; border-radius: 6px; padding: 6px 8px; display: grid; gap: 3px; }
.og-files b { font-weight: 500; color: #444; padding-left: 18px; position: relative; }
.og-files b::before { content: ""; position: absolute; left: 0; top: 3px; width: 13px; height: 10px; background: #b4b4ba; border-radius: 2px; }
.og-files span { color: #777; padding-left: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-world { position: relative; display: grid; place-items: center; padding: 14px; background: var(--panel); border: 1px solid var(--edge); }
.ng-world img { width: min(100%, 300px); height: auto; border: 1px solid var(--edge); outline: 2px solid var(--c-works); }
.ng-world .chip { position: absolute; top: 20px; right: 20px; }
.og-msg { margin: 0 0 12px; font-size: 13.5px; color: #555; line-height: 1.45; }
.og-msg b { display: block; color: #333; font-weight: 500; }
.og-btns { display: flex; justify-content: flex-end; gap: 8px; font-size: 12.5px; }
.og-btns span { padding: 3px 12px; border-radius: 6px; background: #e6e6ea; color: #444; }
.og-btns span.def { background: #8a8a8f; color: #fff; }
.ng-shot { padding: 10px 10px 0; }
.ng-shot img { width: 100%; height: auto; display: block; border: 1px solid var(--edge); }
.vnew .panel > pre { margin: 10px !important; padding: 8px 10px !important; font-size: 12px !important; overflow-x: auto; }
.ng-ask { display: flex; flex-direction: column; justify-content: center; }
.ask { margin: 12px 12px 0; padding: 8px 12px; background: #fff; border: 1px solid var(--edge); border-radius: 14px 14px 14px 3px; font-size: 14px; align-self: flex-start; }
.ask-btns { display: flex; gap: 6px; padding: 0 10px 10px; }
@media (max-width: 900px) {
  .vs-key { display: none; }
  .vpair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .vpair .vq { grid-column: 1 / -1; }
  .vold figcaption::before { content: "The old way. "; font-weight: 500; color: #000; }
  .vnew figcaption::before { content: "Amaze. "; font-weight: 500; color: #000; }
}
@media (max-width: 560px) {
  .vpair { grid-template-columns: minmax(0, 1fr); }
  .og-books { grid-template-columns: repeat(40, minmax(0, 1fr)); }
}
.ng-trio .mini { overflow: hidden; }
.ng-trio .mini-bar { height: 16px; gap: 3px; padding: 0 4px; font-size: 9.5px; overflow: hidden; white-space: nowrap; }
.ng-trio .mini-bar b { margin-right: 2px; }
.ng-trio .mini-bar span { padding: 0 3px; line-height: 11px; }
.ng-trio .mini-shelf { left: 5px; bottom: 5px; padding: 3px; gap: 3px; }
.ng-trio .mini-shelf i { width: 9px; height: 9px; }
.vnew > .panel { display: flex; flex-direction: column; justify-content: center; }
.vnew .panel > pre { white-space: pre-wrap; word-break: break-word; }

/* ---------- Ideas: No ___, the old way and Amaze ---------- */
.nocase { max-width: 1320px; margin: 0 auto; padding: clamp(64px, 9vw, 120px) var(--gutter) 0; }
.nohead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px clamp(32px, 5vw, 80px); align-items: start; margin-bottom: 28px; }
.nohead h2 { font-weight: 500; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.04; letter-spacing: -0.02em; margin: 0; }
.nohead p { font-family: var(--serif); font-size: 18.5px; line-height: 1.7; margin: 0; max-width: 34em; }
.vs2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 22px; align-items: stretch; }
.vs2 figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.vs2 figure > .chip.side { align-self: flex-start; flex: none; font-size: 14px; padding: 2px 10px; }
.vs2 figure > :nth-child(2) { flex: none; }
.vs2 figcaption { font-size: 14.5px; line-height: 1.5; color: var(--quiet); }
.vs2 figcaption b { color: #000; font-weight: 500; }
.vold > .og-win, .vold > .og-stack, .vold > .og-update, .vold > .og-books, .vold > .og-code, .vold > .og-langs, .vold > .og-trio { background: #f1f1f3; border: 1px solid #d6d6da; border-radius: 10px; }
.vold > .og-win { background: #fafafa; }
.nofoot { margin: 14px 0 0; font-size: 13.5px; color: var(--quiet); }
.og-pick { display: flex; gap: 5px; } .og-pick i { width: 14px; height: 14px; border-radius: 50%; display: block; border: 1px solid #c4c4ca; }
.og-stack { position: relative; padding: 12px; display: grid; }
.og-stack .og-files { padding: 0; }
.og-dialog { position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%); width: min(320px, 88%); background: #fff; border: 1px solid #c9c9ce; border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.18); padding: 14px; display: grid; gap: 6px; font-size: 13px; color: #555; }
.og-dialog b { color: #222; font-weight: 500; }
.og-dialog .og-btns { margin-top: 6px; }
.og-update { position: relative; min-height: 220px; display: grid; place-items: center; padding: 16px; overflow: hidden; }
.og-update .og-win { width: min(340px, 100%); }
.og-update button { font: inherit; cursor: pointer; border: 0; }
.og-btns button.def { padding: 3px 12px; border-radius: 6px; background: #8a8a8f; color: #fff; font-size: 12.5px; }
.upd-step[hidden] { display: none !important; }
.upd-bar { display: grid; gap: 10px; width: 70%; font-size: 13px; color: #555; text-align: center; }
.upd-bar i { display: block; height: 6px; border-radius: 3px; background: #dcdce0; overflow: hidden; }
.upd-bar b { display: block; height: 100%; width: 0; background: #8a8a8f; }
.og-update.go .upd-bar b { animation: fillbar 2.5s linear forwards; }
@keyframes fillbar { to { width: 100%; } }
.upd-black { position: absolute; inset: 0; background: #000; border-radius: 10px; display: grid; place-items: center; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #444; border-top-color: #bbb; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.upd-empty { position: absolute; inset: 0; border-radius: 10px; background: linear-gradient(160deg, #dcdce2, #c9c9d1); display: grid; place-content: center; justify-items: center; gap: 10px; font-size: 13.5px; color: #444; }
.upd-empty button { background: #fff; border: 1px solid #c4c4ca !important; border-radius: 6px; padding: 3px 12px; font-size: 12.5px; }
.og-books.big { display: grid; grid-template-columns: repeat(50, minmax(0, 1fr)); gap: 1px; padding: 14px; align-content: start; }
.ng-onebook { display: flex; align-items: center; gap: 22px; padding: 22px; background: var(--panel); border: 1px solid var(--edge); border-radius: 4px; }
.ng-onebook i { width: 22px; height: 22px; flex: none; background: var(--c-lapis); border: 1px solid rgba(0,0,0,.4); }
.ng-onebook b { display: block; font-size: 34px; font-weight: 500; letter-spacing: -0.01em; }
.ng-onebook span { display: block; color: var(--panel-quiet); font-size: 14.5px; margin: 4px 0 14px; }
.ng-onebook .pill { font-size: 14px; padding: 5px 12px; }
.og-code { margin: 0; padding: 16px; font-size: 12.5px; line-height: 1.65; color: #444; overflow-x: auto; }
.og-langs { display: grid; gap: 10px; padding: 12px; }
.og-langs > div { background: #fff; border: 1px solid #d6d6da; border-radius: 8px; overflow: hidden; }
.og-tag { display: block; padding: 4px 10px; background: #ececef; border-bottom: 1px solid #dadade; font-size: 12px; color: #555; }
.og-langs pre { margin: 0; padding: 8px 10px; font-size: 12px; line-height: 1.55; color: #555; overflow-x: auto; }

/* ---------- The Amaze mock screen ---------- */
.am { background: #2a2a2a; border: 1px solid #000; border-radius: 6px; overflow: hidden; color: #e8e8e8; font-family: var(--sans); }
.am-wrap { display: flex; flex-direction: column; background: #2a2a2a; border: 1px solid #000; border-radius: 6px; overflow: hidden; }
.am-wrap > .am { border: 0; border-radius: 0; }
.am-bar { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 10px; font-size: 12px; white-space: nowrap; overflow: hidden; transition: background-color .25s, color .25s; }
.am-bar[role="button"] { cursor: pointer; }
.am-bar[role="button"]:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.am.selected .am-bar { box-shadow: inset 0 0 0 2px #ffd447; }
.am-title { font-weight: 500; letter-spacing: .05em; }
.am-btns { display: flex; gap: 2px; overflow: hidden; }
.am-btns span { padding: 2px 7px; border-radius: 3px; opacity: .85; }
.am-right { margin-left: auto; display: flex; gap: 10px; align-items: center; font-variant-numeric: tabular-nums; opacity: .75; font-size: 11.5px; }
.am-right i { width: 8px; height: 8px; border-radius: 2px; background: var(--c-works); border: 1px solid rgba(0,0,0,.4); }
.am-world { display: block; width: 100%; }
.am-html { position: relative; background: #222222; min-height: 240px; display: grid; grid-template-columns: 150px minmax(0, 1fr); }
.am-hint { padding: 8px 12px; font-size: 13px; color: #cfcfcf; background: #3a3a3a; border-top: 1px solid #111; }
.am-hint[hidden], .am-insp[hidden] { display: none; }
.am-insp { background: #3a3a3a; border-top: 1px solid #111; }
.am-ih { display: flex; align-items: center; gap: 8px; padding: 5px 10px; background: #474747; border-bottom: 1px solid #111; font-size: 12px; color: #9b9b9b; }
.am-ih b { color: #e8e8e8; font-weight: 500; font-family: var(--mono); font-size: 12px; }
.am-ih .chip { font-size: 11.5px; padding: 0 6px; }
.am-code { margin: 0; padding: 10px 12px; background: #1e1e1e; color: #e8e8e8; font-family: var(--mono); font-size: 12.5px; line-height: 1.75; white-space: pre-wrap; font-variant-ligatures: none; }
.am-code .k { color: #ff9f4a; }
.am-swatches { display: inline-flex; gap: 4px; vertical-align: middle; }
.am-swatches button { font: inherit; font-size: 11px; cursor: pointer; padding: 0 6px 0 18px; line-height: 18px; border-radius: 3px; background: #2e2e2e; color: #cfcfcf; border: 1px solid #555; position: relative; }
.am-swatches button::before { content: ""; position: absolute; left: 4px; top: 4px; width: 9px; height: 9px; background: var(--c); border: 1px solid rgba(255,255,255,.4); }
.am-swatches button[aria-pressed="true"] { border-color: #ffd447; color: #fff; }
.am-code input:not([type]), .am-code input[type="text"], #ti { font: inherit; color: #9ccc65; background: #2e2e2e; border: 1px solid #555; border-radius: 3px; padding: 0 4px; width: 9em; }
.am-code input[type="range"] { vertical-align: middle; width: 160px; accent-color: #ffd447; }
.am-code output { color: #ffd447; display: inline-block; min-width: 3ch; }
.am-knob { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px 10px; font-size: 12.5px; color: #cfcfcf; border-top: 1px solid #111; }
.am-knob input { accent-color: #ffd447; width: 140px; }
.am-knob code { font-family: var(--mono); font-size: 12px; color: #8a8a8a; }
.am-knob.live code { color: #ffd447; }
.am-cells { display: flex; gap: 8px; padding: 10px 12px; background: #3a3a3a; border-top: 1px solid #111; }
.am-cells span { background: #1e1e1e; border: 1px solid #555; border-radius: 3px; padding: 3px 10px; font-family: var(--mono); font-size: 12.5px; color: #ffd447; }
.am-cells b { font-weight: 400; color: #9b9b9b; margin-right: 8px; }
.am-dark { background: #3a3a3a; }
.am-side { background: #3a3a3a; border-right: 1px solid #111; padding: 6px 0; font-size: 12px; }
.am-side-h { padding: 4px 10px 6px; color: #9b9b9b; font-size: 11.5px; }
.am-g { display: flex; justify-content: space-between; gap: 6px; padding: 4px 10px; border-left: 3px solid transparent; }
.am-g.on { background: #1e1e1e; border-left-color: var(--c-lapis); }
.am-g small { color: #9b9b9b; }
.am-things { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; align-content: start; }
.am-thing { background: #e4e4e4; color: #111; border: 1px solid #000; border-radius: 3px; padding: 6px; display: grid; gap: 6px; align-content: start; font-size: 12px; }
.am-thing .chip { justify-self: start; font-size: 11px; padding: 0 6px; }
.am-thing p { margin: 0; line-height: 1.4; }
.am-thing svg { width: 100%; height: auto; background: #10221A; border-radius: 2px; }
.am-thing table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.am-thing td { padding: 1px 2px; border-bottom: 1px solid #cfcfcf; } .am-thing td + td { text-align: right; }
.am-thing.photos div { display: flex; gap: 4px; } .am-thing.photos i { flex: 1; aspect-ratio: 1; border-radius: 2px; }
.am-lang { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.am-lang > div + div { border-left: 1px solid #111; }
.am-rail { display: block; width: 100%; height: auto; border-top: 1px solid #111; }
.am-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.am-trio > div { border-radius: 4px; }
.am-blank { position: relative; min-height: 150px; background: #222222 !important; }
.am-blank span { position: absolute; right: 8px; bottom: 6px; font-size: 11px; color: #8a8a9a; }
.am-shelf { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 4px; padding: 4px; background: #e4e4e4; border: 1px solid #000; border-radius: 3px; }
.am-shelf i { width: 11px; height: 11px; border: 1px solid rgba(0,0,0,.5); border-radius: 2px; display: block; }
.am-trio .am-bar { font-size: 10.5px; gap: 6px; padding: 0 6px; height: 26px; }
.am-trio .am-right { display: none; }

@media (max-width: 900px) {
  .nohead { grid-template-columns: minmax(0, 1fr); }
  .vs2 { grid-template-columns: minmax(0, 1fr); }
  .am-trio { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .am-html { grid-template-columns: minmax(0, 1fr); }
  .am-side { display: none; }
  .am-lang { grid-template-columns: minmax(0, 1fr); }
  .am-lang > div + div { border-left: 0; border-top: 1px solid #111; }
  .og-books.big { grid-template-columns: repeat(40, minmax(0, 1fr)); }
  .am-btns { display: none; }
}

.vs2 .am-bar { height: 34px; font-size: 13px; }
.vs2 .am-code { font-size: 13.5px; }
.vs2 .og-row { font-size: 14.5px; padding: 10px 0; }
.vs2 .og-title { font-size: 13.5px; }

/* ideas: second pass */
.og-library { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 1px; padding: 14px; background: #f1f1f3; border: 1px solid #d6d6da; border-radius: 10px; row-gap: 0; }
.og-library i { display: block; width: 3px; flex: none; }
.og-library { background-image: repeating-linear-gradient(to bottom, transparent 0 17px, #c4c4ca 17px 19px); background-origin: content-box; line-height: 0; }
.og-library i { margin-bottom: 2px; }
.ng-desk { flex: 1; display: grid; place-items: center; gap: 18px; padding: 28px 16px; background: var(--panel); border: 1px solid var(--edge); border-radius: 4px; align-content: center; }
.ng-bookart { position: relative; width: 190px; height: 250px; transform: perspective(700px) rotateY(-14deg); }
.ng-bookart .cover { position: absolute; inset: 0; background: var(--lapis); border: 1px solid #000; border-radius: 3px 6px 6px 3px; color: #fff; display: grid; align-content: space-between; padding: 22px 18px; box-shadow: 10px 12px 0 rgba(0,0,0,.15); }
.ng-bookart .cover::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.25); }
.ng-bookart .t { font-weight: 300; letter-spacing: .08em; font-size: 22px; }
.ng-bookart .bs { font-family: var(--serif); font-size: 15px; color: #fff; opacity: .85; }
.ng-bookart .n { font-size: 13px; opacity: .8; font-variant-numeric: tabular-nums; }
.ng-bookart .pages { position: absolute; top: 5px; bottom: 5px; right: -10px; width: 10px; background: repeating-linear-gradient(to bottom, #f4f4f4 0 2px, #d8d8d8 2px 3px); border: 1px solid #000; border-left: 0; border-radius: 0 3px 3px 0; }
.am-live { background: #1e1e1e; padding: 6px 0; }
.lv { display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 10px; align-items: center; padding: 3px 12px; }
.lv code { font-family: var(--mono); font-size: 13px; color: #e8e8e8; white-space: pre; overflow: hidden; text-overflow: ellipsis; font-variant-ligatures: none; }
.lv code .k { color: #ff9f4a; }
.lv output { font-family: var(--mono); font-size: 13px; text-align: right; color: #ffd447; background: #2e2e2e; border: 1px solid #555; border-radius: 3px; padding: 0 6px; font-variant-numeric: tabular-nums; }
.lv.hit output { animation: lvflash .5s ease-out; }
@keyframes lvflash { from { background: #6b5a10; } to { background: #2e2e2e; } }
@media (prefers-reduced-motion: reduce) { .lv.hit output { animation: none; } }
.og-stack2 { display: grid; gap: 12px; padding: 12px; background: #f1f1f3; border: 1px solid #d6d6da; border-radius: 10px; align-content: start; }
.og-stack2 .og-apps { padding: 0; }
.og-line { display: block; height: 6px; border-radius: 3px; background: #d8d8dc; margin: 6px 0; } .og-line.short { width: 60%; }
.og-shotcard { font: inherit; display: flex; gap: 12px; align-items: center; text-align: left; background: #fff; border: 1px solid #d6d6da; border-radius: 8px; padding: 8px; cursor: pointer; color: #555; font-size: 13px; }
.og-shotcard b { display: block; color: #333; font-weight: 500; }
.og-thumb { width: 72px; height: 48px; flex: none; border-radius: 4px; background: linear-gradient(160deg, #dcdce2, #c9c9d1); border: 1px solid #c4c4ca; }
.og-note { font-size: 13px; color: #555; background: #fff; border: 1px dashed #c4c4ca; border-radius: 8px; padding: 8px 10px; }
.og-note[hidden], .ng-shotcard[hidden], #theirsWrap[hidden] { display: none; }
.ng-handover { display: grid; gap: 12px; }
.am-action { font: inherit; font-size: 13px; cursor: pointer; background: #ffd447; color: #000; border: 1px solid #000; border-radius: 3px; padding: 4px 12px; margin: 8px 10px; justify-self: start; align-self: flex-start; }
.am-action:hover { background: #ffe27a; }
.ng-shotcard { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--edge); border-radius: 4px; padding: 8px; font-size: 13px; color: var(--panel-quiet); }
.ng-shotcard img { width: 120px; height: auto; border: 1px solid var(--edge); flex: none; }
.ng-shotcard b { display: block; color: #000; font-weight: 500; font-family: var(--mono); }
.langlab .ll-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.langlab .ll-col { display: flex; flex-direction: column; min-width: 0; }
.langlab .ll-col + .ll-col { border-left: 1px solid #111; }
.ll-words { background: #1e1e1e; padding: 6px 12px; display: grid; gap: 4px; font-size: 12.5px; color: #9b9b9b; }
.ll-words div { display: grid; gap: 1px; }
.ll-words code { font-family: var(--mono); color: #e8e8e8; font-size: 12.5px; }
.ll-words .new code { color: #ffd447; }
.ll-teach { display: grid; gap: 6px; padding: 8px 12px; background: #3a3a3a; border-top: 1px solid #111; font-size: 12.5px; color: #cfcfcf; }
.ll-teach input, .ll-teach textarea, .ll-prog { font-family: var(--mono); font-size: 12.5px; color: #e8e8e8; background: #1e1e1e; border: 1px solid #555; border-radius: 3px; padding: 4px 6px; }
.ll-teach input { width: 8em; margin-left: 6px; color: #ffd447; }
.ll-teach textarea { resize: vertical; }
.ll-teach .am-action { margin: 0; }
.ll-prog { border-radius: 0; border: 0; border-bottom: 1px solid #111; resize: vertical; min-height: 120px; line-height: 1.7; padding: 10px 12px; }
.ll-err { padding: 6px 12px; font-size: 12.5px; color: #9ccc65; background: #2a2a2a; border-bottom: 1px solid #111; }
.ll-err.bad { color: #ff8a80; }
.langlab #scr-lang { flex: 1; }
.langlab #scr-lang .am-bar { height: 26px; }
@media (max-width: 760px) {
  .langlab .ll-grid { grid-template-columns: minmax(0, 1fr); }
  .langlab .ll-col + .ll-col { border-left: 0; border-top: 1px solid #111; }
}

/* ideas: third pass */
.am-solo { border: 0; border-radius: 0; }
.am-solo .am-bar { height: 40px; font-size: 14px; }
.am-clock { font-size: 15px; font-variant-numeric: tabular-nums; opacity: 1; color: inherit; }
.am-clockslot { opacity: 1; }
.am-bar.flash { animation: barflash .6s ease-out; }
@keyframes barflash { from { box-shadow: inset 0 0 0 2px #ffd447; } to { box-shadow: inset 0 0 0 2px transparent; } }
.am-opts { display: inline-flex; gap: 4px; vertical-align: middle; }
.am-opts button { font: inherit; font-size: 12.5px; cursor: pointer; padding: 0 7px; line-height: 20px; border-radius: 3px; background: #2e2e2e; color: #cfcfcf; border: 1px solid #555; }
.am-opts button[aria-pressed="true"] { border-color: #ffd447; color: #ffd447; }
.am-opts button:hover { color: #fff; }
.am-surface { position: relative; background: #222222; min-height: 250px; padding: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-content: start; }
.am-surface.one { grid-template-columns: minmax(0, 1fr); min-height: 140px; }
.am-ask { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; padding: 6px 10px; background: #2e2e2e; border: 1px solid #555; border-radius: 3px; font-size: 13px; color: #9b9b9b; }
.am-ask b { color: #ffd447; font-weight: 400; }
.am-surface .am-thing.hit { outline: 2px solid #ffd447; outline-offset: 1px; }
.am-surface .am-thing.dim { opacity: .45; }
.am-thing.big p { font-size: 14px; line-height: 1.5; }
.caret { display: inline-block; width: 2px; height: 1.1em; background: #000; vertical-align: -2px; margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret, .am-bar.flash { animation: none; } }
.am-diff .del { color: #ff8a80; display: block; }
.am-diff .add { color: #9ccc65; display: block; }
.am-diff.applied .del { text-decoration: line-through; opacity: .5; }
#updBtns .new { background: #ffd447; color: #000; animation: barflash .8s; }
.am-action:disabled { background: #9ccc65; cursor: default; }
.am-worlds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px; background: var(--panel); border: 1px solid var(--edge); border-radius: 4px; align-content: start; }
.wt { aspect-ratio: 4 / 3; border: 1px solid #000; border-radius: 3px; overflow: hidden; display: flex; flex-direction: column; background: var(--bg); }
.wt-bar { display: flex; gap: 4px; align-items: center; height: 18px; padding: 0 5px; font-size: 9.5px; white-space: nowrap; overflow: hidden; flex: none; }
.wt-bar b { font-weight: 500; margin-right: 2px; }
.wt-bar span { padding: 0 3px; border-radius: 2px; background: rgba(255,255,255,.25); }
.wt-bar span.rec { background: #ff5a4f; color: #000; }
.wt-body { flex: 1; position: relative; }
.wt-shelf { position: absolute; left: 5px; bottom: 5px; display: flex; gap: 3px; padding: 3px; background: #e4e4e4; border: 1px solid #000; border-radius: 2px; }
.wt-shelf i { width: 7px; height: 7px; background: #888; display: block; }
.wt-new { font: inherit; cursor: pointer; background: transparent; border: 1px dashed #555; color: #333; display: grid; place-content: center; justify-items: center; font-size: 12.5px; gap: 2px; }
.wt-new span { font-size: 26px; line-height: 1; }
.wt-new:hover { background: #e4e4e4; }
.wt.fresh { animation: barflash .6s; }
@media (max-width: 560px) { .am-worlds { grid-template-columns: repeat(2, minmax(0, 1fr)); } .am-surface { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ---------- Homepage: how it works ---------- */
.how { max-width: 1100px; margin: 0 auto; padding: 0 var(--gutter); }
.how-steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.how-steps button { width: 100%; font: inherit; font-size: 16px; text-align: left; cursor: pointer; display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--field); color: #000; border: 1px solid var(--edge); border-radius: 4px; }
.how-steps button .n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 3px; background: #fff; border: 1px solid var(--edge); font-size: 13px; flex: none; }
.how-steps button[aria-pressed="true"] { background: #000; color: #fff; border-color: #000; }
.how-steps button[aria-pressed="true"] .n { background: var(--c-sigil); color: #000; border-color: #000; }
.how-screen { border: 1px solid #000 !important; border-radius: 6px !important; }
.how-screen .am-bar { height: 44px; font-size: 14px; background: #2f2f2f; color: #ececec; }
.how-right { opacity: 1; gap: 16px; }
.how-saved { display: inline-flex; align-items: center; gap: 6px; opacity: .75; font-size: 12.5px; }
.how-saved i { width: 8px; height: 8px; border-radius: 2px; background: var(--c-works); border: 1px solid rgba(0,0,0,.4); }
.how-clockwrap { position: relative; padding: 4px 8px; }
.how-halo { position: absolute; inset: -3px -4px; border: 3px solid rgba(205,205,205,.92); box-shadow: 0 0 0 1px #111, inset 0 0 0 1px #111; opacity: 0; transition: opacity .25s; pointer-events: none; }
.how-halo b { position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); background: var(--c-rose); color: #000; border: 1px solid #000; border-radius: 3px; padding: 0 6px; font-size: 11.5px; font-weight: 500; line-height: 18px; }
.how-stage[data-s="0"] .how-halo, .how-stage[data-s="1"] .how-halo, .how-stage[data-s="2"] .how-halo { opacity: 1; }
.how-surface { min-height: 200px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-content: start; padding-top: 40px; }
.how-pointer { position: absolute; width: 18px; height: 18px; right: 46px; top: 10px; transition: right .4s, top .4s; }
.how-insp { max-height: 0; overflow: hidden; transition: max-height .45s ease; background: #3a3a3a; }
.how-stage[data-s="1"] .how-insp, .how-stage[data-s="2"] .how-insp { max-height: 220px; border-top: 1px solid #111; }
.how-edit { color: #9ccc65; border-radius: 2px; }
.how-stage[data-s="2"] .how-edit { background: #6b5a10; color: #ffd447; outline: 1px solid #ffd447; }
.how-say { font-family: var(--serif); font-size: 19px; line-height: 1.6; margin: 16px 0 0; min-height: 3.2em; max-width: 46em; }
@media (prefers-reduced-motion: reduce) { .how-insp, .how-halo, .how-pointer { transition: none; } }
.stage-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px clamp(32px, 5vw, 80px); align-items: start; margin: clamp(72px, 10vw, 128px) 0 28px; }
.stage-head h2 { font-weight: 500; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.04; letter-spacing: -0.02em; margin: 0; }
.stage-head p { font-family: var(--serif); font-size: 18.5px; line-height: 1.7; margin: 0; max-width: 34em; }
.screen-mock .am { border: 0; border-radius: 0; }
.stage .info-bar .btn { font-size: 13px; padding: 3px 12px; }
@media (max-width: 760px) {
  .how-steps { grid-template-columns: minmax(0, 1fr); }
  .stage-head { grid-template-columns: minmax(0, 1fr); }
  .how-surface { grid-template-columns: minmax(0, 1fr); }
  .how-saved { display: none; }
}

/* ---------- Features ---------- */
.feat-lang { overflow: hidden; }
.feat-lang .info-bar { background: #3a3a3a; color: #cfcfcf; border-top: 1px solid #111; }
.feat-lang .info-bar a { color: #ffd447; }
.pkt { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.pkt .panel + .panel { margin-top: 0; }
.pkt-art { margin: 10px; padding: 12px; font-size: 12px; line-height: 1.5; overflow-x: auto; white-space: pre; }
.pkt-f { font: inherit; padding: 0; border: 0; background: none; color: #1f4fa3; cursor: pointer; text-decoration: underline; text-decoration-color: #9ab; text-underline-offset: 2px; }
.pkt-f:hover { color: #000; }
.pkt-f[aria-pressed="true"] { background: var(--c-sigil); color: #000; text-decoration: none; }
.pkt-bytes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 12px; background: var(--field); margin: 10px; border: 1px solid var(--edge-soft); }
.pkt-bytes span { font-family: var(--mono); font-size: 16px; text-align: center; padding: 6px 0; background: #fff; border: 1px solid var(--edge-soft); border-radius: 2px; }
.pkt-bytes span.on { background: var(--c-sigil); border-color: #000; }
.pkt-read { margin: 0 10px 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--edge-soft); font-size: 15px; display: grid; gap: 2px; }
.pkt-read b { font-weight: 500; }
.pkt-read span { color: var(--panel-quiet); font-size: 13px; }
.wnode-tile { width: 180px; aspect-ratio: 4 / 3; }
.branch .wnode-tile { width: 140px; }
.wt-balls { position: absolute; left: 8px; bottom: 6px; display: flex; gap: 4px; }
.wt-balls i { width: 10px; height: 10px; border-radius: 50%; display: block; }
@media (max-width: 900px) { .pkt { grid-template-columns: minmax(0, 1fr); } }

.pkt-read code { font-family: var(--mono); }

/* ---------- Homepage title: an Amaze object with a halo ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero-obj { padding-top: clamp(64px, 10vw, 128px); }
.title-obj { position: relative; display: block; width: min(calc(100% - 84px), 900px); margin: 0 auto; padding: clamp(18px, 3vw, 34px) clamp(20px, 3.5vw, 40px); }
.title-obj > svg { display: block; width: 100%; height: auto; }
.title-obj .tf { position: absolute; inset: 0; border: 9px solid rgba(205,205,205,.9); box-shadow: 0 0 0 1px #111, inset 0 0 0 1px #111; pointer-events: none; }
.tname { position: absolute; left: -1px; top: -38px; display: flex; align-items: center; gap: 3px; padding: 2px 3px 2px 9px; background: var(--c-rose); border: 1px solid #000; border-radius: 3px; font-size: 14px; font-weight: 500; line-height: 20px; }
.tname span { margin-right: 4px; }
.tname button { width: 24px; height: 20px; display: grid; place-items: center; padding: 0; background: #e4e4e4; border: 1px solid #111; border-radius: 2px; cursor: pointer; }
.tname button:hover, .tname button[aria-expanded="true"] { background: #fff; }
.tname svg { width: 12px; height: 12px; }
.th { position: absolute; width: 24px; height: 24px; display: grid; place-items: center; background: #e4e4e4; border: 1px solid #111; border-radius: 3px; }
.th svg { width: 13px; height: 13px; }
.th.hr { right: -38px; top: calc(50% - 12px); }
.th.vr { left: calc(50% - 12px); bottom: -38px; }
.th.rs { right: -38px; bottom: -38px; }
.th.ro { left: -38px; bottom: -38px; }
.title-code { width: min(100%, 620px); margin: 56px auto 0; text-align: left; }
.title-code[hidden] { display: none; }
.hero-obj .hero-links { margin-top: 64px; }
.how-lede { font-family: var(--serif); font-size: clamp(18px, 2vw, 21px); line-height: 1.65; margin: 28px 0 0; max-width: 40em; color: var(--ink); }
@media (max-width: 760px) {
  .th.hr, .th.rs { right: -30px; } .th.ro { left: -30px; }
  .th.vr, .th.rs, .th.ro { bottom: -32px; }
  .th { width: 20px; height: 20px; }
}
.how-saved { display: none; }

/* the title's working halo and its dig */
.title-obj { touch-action: none; transform-origin: 50% 50%; }
.title-obj .tf { pointer-events: auto; cursor: move; border-color: rgba(205,205,205,.9); background: transparent; }
.title-obj .tf { -webkit-mask: none; }
.title-obj .th { cursor: pointer; }
.th.hr { cursor: ew-resize; } .th.vr { cursor: ns-resize; } .th.rs { cursor: nwse-resize; } .th.ro { cursor: grab; }
.title-obj.dragging .tf { border-color: rgba(255,212,71,.9); }
.title-dig { width: min(100%, 1100px); margin: 64px auto 0; text-align: left; }
.title-dig[hidden] { display: none; }
.dig-chain .ln.mark { background: #fff4c2; }

/* the title as a live object */
.title-obj { display: flex !important; align-items: center; justify-content: center; padding: 0 !important; box-sizing: border-box; }
.title-obj > svg { flex: none; width: auto; }
.live-code { display: block; width: 100%; min-height: 250px; resize: vertical; border: 0; outline: none; padding: 10px 12px; background: var(--field); color: #111; font-family: var(--mono); font-size: 13px; line-height: 1.65; font-variant-ligatures: none; tab-size: 4; }
.live-code:focus { background: #fff; box-shadow: inset 0 0 0 2px var(--c-sigil); }
.live-status { padding: 6px 12px; font-size: 13px; color: #2f7a2f; border-top: 1px solid var(--edge-soft); background: #f4f4f4; }
.live-status.bad { color: #b3261e; }
.live-status code { font-family: var(--mono); font-size: 12px; }

/* ---------- Homepage story, told in the serif over time ---------- */
.story { max-width: 1000px; margin: 0 auto; padding: clamp(80px, 12vw, 160px) var(--gutter) 0; }
.beat { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 6vh 0; opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.beat.in { opacity: 1; transform: none; }
.beat .when { align-self: flex-start; font-family: var(--sans); font-size: 14px; font-weight: 500; padding: 2px 10px; background: var(--field); border: 1px solid var(--edge); border-radius: 3px; }
.beat.turn .when { background: var(--c-lapis); border-color: #000; }
.beat p { font-family: var(--serif); font-size: clamp(28px, 4.2vw, 50px); line-height: 1.28; letter-spacing: -0.01em; margin: 0; max-width: 20em; }
.beat.last p { font-size: clamp(40px, 6.5vw, 84px); font-family: var(--sans); font-weight: 500; letter-spacing: -0.025em; line-height: 1.02; }
.beat.last .hero-links { justify-content: flex-start; margin-top: 18px; }
@media (prefers-reduced-motion: reduce) { .beat { opacity: 1; transform: none; transition: none; } }

/* story beats: words on one side, a picture in Amaze's style on the other */
.story { max-width: 1240px; }
.beat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.beat .beat-text { display: flex; flex-direction: column; gap: 18px; }
.beat p { font-size: clamp(26px, 3vw, 40px); max-width: 16em; }
.beat.last p { font-size: clamp(40px, 5.6vw, 76px); }
.beat-fig { margin: 0; overflow: hidden; }
.beat-fig > svg { display: block; width: 100%; height: auto; }
.beat-today { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: 12px; padding: 14px; background: #f1f1f3; align-items: center; }
.beat-today .og-win { background: #fafafa; border: 1px solid #d0d0d4; border-radius: 10px; overflow: hidden; }
.beat-wall { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 1px; padding: 10px; background-image: repeating-linear-gradient(to bottom, transparent 0 13px, #c4c4ca 13px 15px); background-color: #e8e8ec; border-radius: 8px; line-height: 0; }
.beat-wall i { display: block; width: 3px; margin-bottom: 2px; flex: none; }
.beat-bookfig .ng-desk { border: 0; border-radius: 0; padding: 36px 16px; }
.beat-worlds { border: 0; border-radius: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.beat .beat-fig { opacity: 0; transform: translateY(28px); transition: opacity .8s ease .12s, transform .8s ease .12s; }
.beat.in .beat-fig { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .beat .beat-fig { opacity: 1; transform: none; transition: none; } }
@media (max-width: 860px) {
  .beat { grid-template-columns: minmax(0, 1fr); min-height: auto; padding: 8vh 0; }
  .beat p { max-width: none; }
}
.beat-fig svg text { font-variant-ligatures: none; }

/* ---------- Ask it: the Studio, building a cipher ---------- */
.beat.beat-wide { grid-template-columns: minmax(0, 1fr); min-height: auto; }
.beat.beat-wide .beat-text p { max-width: 24em; }
.studio-fig .panel-head .btn { font-size: 12.5px; padding: 1px 10px; }
.studio { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 0; background: #0c0c18; }
.chatbox { display: flex; flex-direction: column; background: #222222; border-right: 1px solid #4d4d4d; min-height: 460px; }
.chat-lines { flex: 1; overflow-y: auto; padding: 12px 12px 6px; display: grid; gap: 8px; align-content: start; max-height: 520px; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; font-variant-ligatures: none; }
.cl { white-space: pre-wrap; word-break: break-word; }
.cl.you { color: #fff; }
.cl.you::before { content: "> "; color: #8c8c8c; }
.cl.model { color: #C8E0FF; }
.cl.tool { color: #9AD39A; border-left: 2px solid #3a5a3a; padding-left: 8px; }
.cl.tool b { font-weight: 400; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl.tool span { color: #8c8c8c; display: block; }
.cl.tool span::before { content: "\2192  "; }
.chat-status { padding: 4px 12px; border-top: 1px solid #4d4d4d; color: #8c8c8c; font-family: var(--mono); font-size: 11.5px; }
.chat-input { min-height: 30px; margin: 4px; padding: 5px 8px; background: #2A2A60; color: #fff; font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; }
.chat-caret { display: inline-block; width: 7px; height: 13px; background: #fff; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
.studiobox { position: relative; background: #101818; padding: 14px; display: flex; flex-direction: column; justify-content: center; }
.studio-mark { position: absolute; top: 8px; right: 12px; font-weight: 300; letter-spacing: .12em; font-size: 12px; color: #2A4A3A; }
.cipher { background: #3a3a3a; border: 1px solid #000; border-radius: 3px; overflow: hidden; color: #e8e8e8; }
.cipher[hidden] { display: none; }
.cipher.arrive { animation: arrive .5s ease-out; }
@keyframes arrive { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.cipher-rules { display: block; width: 100%; border: 0; resize: vertical; background: #1e1e1e; color: #e8e8e8; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; padding: 8px 12px; font-variant-ligatures: none; outline: none; }
.cipher-rules:focus { box-shadow: inset 0 0 0 2px #ffd447; }
.cipher-row { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 12px; border-top: 1px solid #111; font-size: 12.5px; color: #9b9b9b; }
.cipher-row input { font-family: var(--mono); font-size: 12.5px; color: #ffd447; background: #1e1e1e; border: 1px solid #555; border-radius: 3px; padding: 3px 6px; }
.cipher-row code { font-family: var(--mono); font-size: 11.5px; color: #C8E0FF; word-break: break-all; }
.cipher-checks { display: grid; gap: 2px; padding: 6px 12px 10px; border-top: 1px solid #111; font-size: 12.5px; }
.cipher-checks .ok { color: #9AD39A; } .cipher-checks .ok::before { content: "\2713  "; }
.cipher-checks .bad { color: #ff8a80; } .cipher-checks .bad::before { content: "\2717  "; }
@media (prefers-reduced-motion: reduce) { .cipher.arrive { animation: none; } .chat-caret { animation: none; } }
@media (max-width: 860px) { .studio { grid-template-columns: minmax(0, 1fr); } .chatbox { border-right: 0; border-bottom: 1px solid #4d4d4d; min-height: 340px; } }
.chat-lines { grid-template-columns: minmax(0, 1fr); overflow-x: hidden; }
.cl { min-width: 0; }
/* the whole OS fits in one request */
.fit { display: grid; gap: 8px; padding: 12px 14px 14px; background: #e4e4e4; border-top: 1px solid var(--edge); }
.fit-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) 150px; gap: 12px; align-items: center; font-size: 13px; }
.fit-l { color: var(--panel-quiet); } .fit-l b { display: block; color: #000; font-weight: 500; font-size: 14px; }
.fit-track { position: relative; height: 18px; background: #fff; border: 1px solid var(--edge); border-radius: 2px; overflow: hidden; }
.fit-amaze { position: absolute; left: 0; top: 0; bottom: 0; width: 6%; min-width: 14px; background: var(--c-lapis); border-right: 1px solid #000; }
.fit-linux { position: absolute; left: 0; top: 0; bottom: 0; right: -40px; background: repeating-linear-gradient(90deg, #9a9a9a 0 6px, #b4b4b4 6px 12px); -webkit-mask: linear-gradient(90deg, #000 80%, transparent); mask: linear-gradient(90deg, #000 80%, transparent); }
.fit-r { font-weight: 500; }
@media (max-width: 760px) { .fit-row { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* Studio extras: watch it run, and three ways */
.studio-extra { border-top: 1px solid var(--edge); }
.watch-head, .three-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 10px; background: var(--panel-head); border-bottom: 1px solid var(--edge); }
.watch-head .spacer { flex: 1; }
.watch-head .btn { font-size: 12.5px; padding: 2px 10px; }
.watch-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; padding: 14px; background: #222222; }
.grid16 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.grid16 .w { position: relative; background: #2a2a2a; border: 1px solid #4d4d4d; border-radius: 3px; padding: 14px 6px 8px; text-align: center; transition: background-color .15s; }
.grid16 .w span { position: absolute; left: 5px; top: 3px; font-size: 10px; color: #8c8c8c; font-family: var(--mono); }
.grid16 .w b { font-family: var(--mono); font-weight: 400; font-size: clamp(11px, 1.3vw, 14px); color: #ececec; letter-spacing: .02em; }
.grid16 .w.role { background: color-mix(in srgb, var(--tc) 30%, #2a2a2a); border-color: var(--tc); }
.grid16 .w.hot { animation: hot .45s ease-out; }
@keyframes hot { from { box-shadow: 0 0 0 3px #fff; } to { box-shadow: 0 0 0 0 transparent; } }
.watch-side { display: grid; gap: 10px; align-content: start; color: #ececec; }
.watch-now { font-size: 15px; min-height: 2.4em; }
.watch-now code { font-family: var(--mono); font-size: 22px; color: #ffd447; }
.watch-where { font-size: 13px; color: #a6a6a6; min-height: 1.4em; }
.watch-key { display: flex; gap: 12px; font-family: var(--mono); font-size: 13px; color: #a6a6a6; }
.watch-key i { display: inline-block; width: 10px; height: 10px; background: var(--tc); margin-right: 5px; border-radius: 2px; }
.watch-out { display: grid; gap: 4px; font-size: 13.5px; }
.watch-out code { font-family: var(--mono); font-size: 12.5px; color: #C8E0FF; word-break: break-all; }
.watch-out .ok { color: #9AD39A; } .watch-out .ok::before { content: "\2713  "; }
.watch-out .bad { color: #ff8a80; } .watch-out .bad::before { content: "\2717  "; }
.three { border-top: 1px solid var(--edge); }
.three-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px; background: var(--field); }
.three-cols figure { margin: 0; display: grid; gap: 6px; align-content: start; }
.three-cols figcaption { font-size: 12.5px; color: var(--panel-quiet); }
.three-cols figcaption b { display: block; color: #000; font-weight: 500; font-size: 14px; }
.three-cols pre { margin: 0; padding: 10px; font-family: var(--mono); font-size: 12px; line-height: 1.6; background: #fff; border: 1px solid var(--edge-soft); border-radius: 2px; overflow-x: auto; font-variant-ligatures: none; }
.three-cols .us pre { background: #1e1e1e; color: #e8e8e8; border-color: #000; }
.three-note { margin: 0; padding: 12px 14px 16px; font-family: var(--serif); font-size: 17px; line-height: 1.65; background: var(--field); max-width: 52em; }
@media (prefers-reduced-motion: reduce) { .grid16 .w.hot { animation: none; } }
@media (max-width: 860px) { .watch-body, .three-cols { grid-template-columns: minmax(0, 1fr); } }

/* Features: the bridge, described in its own language */
.panel-head .ph-name { font-family: var(--mono); font-weight: 500; font-size: 12.5px; }
.truss-body { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); background: #0E1420; }
.truss-prog { height: 0; min-height: 100%; overflow: auto; line-height: 1.6; border-right: 1px solid #111; }
.truss-shot { margin: 0; display: flex; align-items: center; justify-content: center; }
.truss-shot img { display: block; width: 100%; height: auto; }
.truss-lang { margin-top: 16px; }
.truss-words { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1px; background: #111; }
.truss-words > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: #1e1e1e; }
.truss-words code { font-family: var(--mono); font-size: 12.5px; color: #e8e8e8; font-variant-ligatures: none; }
.truss-words code .k, .truss-prog .k { color: #ff9f4a; }
.truss-words span { font-size: 13px; color: #9b9b9b; }
.truss-how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; background: #1e1e1e; border-top: 1px solid #111; }
.truss-how p { margin: 0; padding: 12px 14px; font-size: 14px; line-height: 1.6; color: #cfcfcf; }
.truss-how .am-code { border-left: 1px solid #111; }
@media (max-width: 720px) {
  .truss-body, .truss-how { grid-template-columns: minmax(0, 1fr); }
  .truss-prog { height: auto; min-height: 0; max-height: 14rem; border-right: 0; border-bottom: 1px solid #111; }
  .truss-how .am-code { border-left: 0; border-top: 1px solid #111; }
}

/* The room: out of the screen */
.room-stage { background: #242320; }
.room-stage canvas { display: block; width: 100%; aspect-ratio: 1000 / 560; touch-action: pan-y pinch-zoom; cursor: default; }
.room-stage canvas.can-grab { cursor: grab; }
.room-stage canvas.grabbing { cursor: grabbing; }
.room-reset { font: inherit; font-size: 13px; padding: 2px 10px; border: 1px solid var(--edge); border-radius: 3px; background: var(--field); color: var(--panel-text); cursor: pointer; }
.room-reset:hover { background: #fff; }

.vs-grid { display: grid; background: var(--field); }
.vs-row { display: grid; grid-template-columns: minmax(8rem, 1fr) repeat(3, minmax(0, 1.4fr)); border-top: 1px solid var(--edge-soft); }
.vs-row:first-child { border-top: 0; }
.vs-row > * { padding: 9px 12px; font-size: 14px; line-height: 1.45; }
.vs-row b { font-weight: 500; }
.vs-row > span { color: var(--panel-quiet); }
.vs-row > span.on { color: var(--panel-text); background: color-mix(in srgb, var(--c-aether) 22%, var(--field)); }
.vs-cols > span { font-size: 12.5px; color: var(--panel-quiet); padding-top: 7px; padding-bottom: 7px; }

.tag-body { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 0; background: var(--field); }
.tag-big { display: grid; grid-template-columns: repeat(10, 1fr); aspect-ratio: 1; margin: 18px; border: 1px solid var(--edge-soft); }
.tag-big i { display: block; }
.tag-big i.b { background: #111; }
.tag-big i.w { background: #fff; }
.tag-big i.d { box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--c-azoth) 70%, transparent); }
.tag-read { padding: 16px 18px 18px 0; display: flex; flex-direction: column; gap: 10px; }
.tag-read p { margin: 0; font-size: 14.5px; line-height: 1.55; }
.tag-bits { font-size: 13.5px; letter-spacing: .04em; background: #fff; border: 1px solid var(--edge-soft); padding: 6px 9px; border-radius: 2px; }
.tag-read .am-code { border-radius: 2px; }
.tag-read .tag-note { font-size: 12.5px; color: var(--panel-quiet); }

.talk-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--edge-soft); counter-reset: step; }
.talk-steps li { display: flex; flex-direction: column; gap: 6px; padding: 14px; background: var(--field); counter-increment: step; }
.talk-steps li .chip { align-self: flex-start; }
.talk-steps li b { font-weight: 500; font-size: 16px; }
.talk-steps li b::before { content: counter(step) ". "; color: var(--panel-quiet); font-weight: 400; }
.talk-steps li span:last-child { font-size: 14px; color: var(--panel-quiet); line-height: 1.5; }

.takes .take { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 12px; background: var(--field); border-top: 1px solid var(--edge-soft); }
.takes .take:first-of-type { border-top: 0; }
.takes .take .chip { justify-self: start; }
.takes .take p { margin: 0; font-size: 14px; line-height: 1.5; }
.takes .st { font-size: 12.5px; padding: 1px 8px; border-radius: 3px; border: 1px solid rgba(0,0,0,.25); white-space: nowrap; }
.takes .st.has { background: var(--c-works); }
.takes .st.part { background: var(--c-sigil); }
.takes .st.next { background: var(--field-alt); color: var(--panel-quiet); }

@media (max-width: 720px) {
  .vs-row { grid-template-columns: minmax(0, 1fr) repeat(3, minmax(0, 1fr)); }
  .vs-row > * { padding: 8px 7px; font-size: 12.5px; }
  .tag-body { grid-template-columns: minmax(0, 1fr); }
  .tag-big { max-width: 12rem; }
  .tag-read { padding: 0 16px 16px; }
  .talk-steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .takes .take { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .takes .st { justify-self: start; }
}
.room-hero { max-width: 1200px; margin: clamp(28px, 5vw, 56px) auto 0; padding: 0 var(--gutter); }
.room-hero img { width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--edge); }
.room-hero figcaption { margin-top: 10px; font-size: 13.5px; color: var(--quiet); }
.room-shot { margin: 0 0 16px; }
.room-shot img { width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--edge); }
.room-shot figcaption { margin-top: 8px; font-size: 13.5px; color: var(--quiet); }

/* The whole house: a lamp, its dial, its rule */
.lamp-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: #1e1e1e; }
.lamp-scene { display: block; width: 100%; height: auto; touch-action: pan-y pinch-zoom; }
.lamp-scene .dial { cursor: grab; outline: none; }
.lamp-scene .dial:focus-visible circle:first-child { stroke: rgba(160,200,255,.5); }
.lamp-lbl { fill: rgba(255,255,255,.5); font: 11px var(--sans); }
.lamp-proj { fill: #dcebff; font: 13px var(--mono); opacity: .8; }
.dial-num { fill: #fff; font: 500 28px var(--mono); }
.lamp-code { display: flex; flex-direction: column; border-left: 1px solid #111; }
.lamp-rules { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-bottom: 1px solid #111; background: #262626; }
.lamp-rules button { font: inherit; font-size: 13px; padding: 3px 10px; border-radius: 3px; border: 1px solid #555; background: #333; color: #ddd; cursor: pointer; }
.lamp-rules button[aria-checked="true"] { background: var(--c-rose); color: #000; border-color: rgba(0,0,0,.4); }
.lamp-code .am-code { flex: 1; }
.lamp-code .am-code .ref { color: #9fd0ff; }
.lamp-code .am-code .c { color: #8a8a8a; }
.lamp-ctl { display: grid; gap: 6px; padding: 10px 12px; border-top: 1px solid #111; background: #262626; color: #ccc; font: 12.5px var(--mono); }
.lamp-ctl label { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) 2.5ch; align-items: center; gap: 8px; }
.lamp-ctl input { width: 100%; accent-color: var(--c-sigil); }
.lamp-ctl output { color: var(--c-sigil); text-align: right; }
@media (max-width: 720px) {
  .lamp-body { grid-template-columns: minmax(0, 1fr); }
  .lamp-code { border-left: 0; border-top: 1px solid #111; }
}

.room-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; background: var(--field); border-bottom: 1px solid var(--edge); }
.room-ask .say { font-size: 12.5px; color: var(--panel-quiet); margin-right: 4px; }
.room-ask button { font: inherit; font-size: 13.5px; padding: 3px 10px; border-radius: 3px; border: 1px solid var(--edge); background: #fff; color: var(--panel-text); cursor: pointer; }
.room-ask button:hover:not(:disabled) { background: color-mix(in srgb, var(--c-aether) 30%, #fff); }
.room-ask button:disabled { opacity: .45; cursor: default; }
.room-ask .room-reset { margin-left: auto; background: var(--field); }
.seen-code { margin-top: 16px; }
.cook-shots { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.cook-shots figure { margin: 0; }
.cook-shots img { width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--edge); display: block; }
.cook-shots .cook-main { grid-column: 1 / -1; }
.cook-shots figcaption { grid-column: 1 / -1; font-size: 13.5px; color: var(--quiet); }
.cook-code { margin-top: 16px; }
@media (max-width: 720px) { .cook-shots { grid-template-columns: minmax(0, 1fr); } }

/* The kitchen story */
.ks { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); grid-template-areas: "steps steps" "frame code"; gap: 12px 16px; align-items: start; }
.ks-steps { grid-area: steps; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--edge); border: 1px solid var(--edge); border-radius: 4px; overflow: hidden; }
.ks-steps button { font: inherit; font-size: 14.5px; text-align: left; padding: 9px 12px; border: 0; background: var(--field); color: var(--panel-text); cursor: pointer; display: flex; gap: 10px; align-items: baseline; }
.ks-steps button b { font: 500 13px var(--mono); color: var(--panel-quiet); }
.ks-steps button:hover { background: #f2f2f2; }
.ks-steps button[aria-selected="true"] { background: var(--panel-head); }
.ks-steps button[aria-selected="true"] b { color: #000; }
.ks-frame { grid-area: frame; margin: 0; }
.ks-frame img { width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--edge); display: block; }
.ks-frame figcaption { margin-top: 10px; font-family: var(--serif); font-size: 17px; line-height: 1.6; min-height: 3.2em; }
.ks-code { grid-area: code; }
.ks-code .am-code { transition: opacity .3s; }
.ks-code .am-code.ks-dim { opacity: .35; }
.ks-notes { padding: 4px 12px 10px; background: var(--field); }
.ks-notes p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; }
.ks-notes code { display: block; font-size: 12.5px; color: var(--panel-quiet); margin-bottom: 2px; }
@media (max-width: 900px) {
  .ks { grid-template-columns: minmax(0, 1fr); grid-template-areas: "steps" "frame" "code"; }
  .ks-steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .ks-code .am-code { transition: none; } }
.ks-steps { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ks-prog { font-size: 12px; line-height: 1.6; max-height: 34rem; overflow: auto; }
.ks-prog .ln { display: block; padding: 0 6px; margin: 0 -6px; border-left: 3px solid transparent; }
.ks-prog .ln.add { background: rgba(46, 198, 230, .14); border-left-color: #2ec6e6; }
.ks-prog .ln.gone { color: #8a8a8a; text-decoration: line-through; text-decoration-color: rgba(255, 140, 120, .8); }
.ks-prog .c { color: #8a8a8a; }
.ks-key { display: flex; gap: 16px; padding: 6px 12px; background: var(--field); font-size: 12.5px; color: var(--panel-quiet); }
.ks-key i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border-radius: 2px; }
.ks-key i.add { background: rgba(46, 198, 230, .5); border-left: 3px solid #2ec6e6; }
.ks-key i.gone { background: linear-gradient(transparent 45%, #e58 45%, #e58 60%, transparent 60%); }
@media (max-width: 900px) { .ks-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
