/* TeTI Atlas — light, print-inspired theme.
   Sky-white paper, navy ink, and three inks (coral, lavender, sky) used for
   ball-and-stick crystal sketches, gradient blobs, outline rings and lattice line-work. */
:root {
  --bg: #f4f9fd;
  --paper: #ffffff;
  --paper-2: #eef5fb;
  --ink: #132541;
  --ink-2: #3d4c68;
  --muted: #5b6985;
  --faint: #8592aa;
  --line: rgba(19, 37, 65, 0.13);
  --line-soft: rgba(19, 37, 65, 0.07);
  --coral: #f26b6b;
  --coral-deep: #d94848;
  --lav: #b399ff;
  --lav-deep: #6c4fe0;
  --sky: #6ec0f0;
  --sky-deep: #1f7fc0;
  --te: #d94f2e;
  --topo: #6c4fe0;
  --good: #198754;
  --ok: #b07800;
  --bad: #d63c3c;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(19, 37, 65, 0.05), 0 8px 28px -12px rgba(19, 37, 65, 0.18);
  --shadow-lift: 0 2px 4px rgba(19, 37, 65, 0.06), 0 18px 40px -16px rgba(19, 37, 65, 0.28);
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --accent: var(--coral);
  --hex: url("../img/hex-lattice.svg");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans);
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
::selection { background: color-mix(in srgb, var(--lav) 45%, transparent); }
a { color: var(--sky-deep); text-decoration: none; font-weight: 500; }
a:hover { color: var(--lav-deep); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin: 0 0 0.35em; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 2.4em 0 0.6em; }
h3 { font-size: 1.18rem; margin: 1.4em 0 0.5em; }
h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 1em 0 0.5em; font-weight: 700; }
code, .mono { font-family: var(--mono); font-size: 0.86em; }
sub { font-size: 0.72em; line-height: 0; }
.ovl { text-decoration: overline; }
.muted { color: var(--muted); }
.faint, .na { color: var(--faint); }
.unit { color: var(--muted); font-size: 0.85em; }
.small { font-size: 0.86rem; }

/* ── header / footer ── */
.site-header {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px); background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand svg { width: 32px; height: 32px; }
.brand em { font-style: normal; color: var(--coral); }
.nav { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-2); padding: 7px 13px; border-radius: 999px; font-weight: 600; font-size: 0.94rem; }
.nav a:hover { color: var(--ink); background: var(--paper); text-decoration: none; }
.nav a.active { color: var(--ink); background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1.5px solid var(--ink); color: var(--ink); border-radius: 10px; padding: 4px 10px; font-size: 1.1rem; }
@media (max-width: 820px) {
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--paper); padding: 12px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  body.menu-open .nav { display: flex; }
}
.site-footer {
  position: relative; overflow: hidden; margin-top: auto; padding: 44px clamp(16px, 4vw, 48px); background: var(--ink); color: #c9d3e6;
  font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; align-items: flex-end;
}
.site-footer::before {
  content: ""; position: absolute; right: -40px; top: -60px; width: 420px; height: 260px; background: var(--hex) 0 0 / 84px auto repeat;
  opacity: 0.18; filter: invert(1); pointer-events: none;
}
.site-footer strong { color: #fff; font-size: 1.1rem; }
.site-footer a { color: var(--sky); }
.site-footer a:hover { color: #fff; }
.site-footer > div { position: relative; max-width: 760px; }

main { transition: opacity 0.15s; overflow-x: clip; }
main.leaving { opacity: 0.35; }
.page { position: relative; max-width: 1240px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 48px) 80px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.76rem; color: var(--accent); font-weight: 800; }
.eyebrow::before { content: ""; display: inline-block; width: 22px; height: 2px; background: currentColor; vertical-align: middle; margin-right: 10px; border-radius: 2px; }
.lead { font-size: 1.14rem; color: var(--ink-2); max-width: 760px; }
.crumbs { font-size: 0.88rem; color: var(--faint); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }

/* full-bleed bands inside a centred page */
.bleed { margin-inline: calc(50% - 50vw); padding-inline: calc(50vw - 50%); }

/* ── decorative art ── */
.deco { position: absolute; pointer-events: none; z-index: -1; }
.page, .hero, .fact, .hall-head, .question, .sec-head { isolation: isolate; }
.blob { border-radius: 50%; background: linear-gradient(135deg, #dff4fd 0%, #d9e3fd 50%, #dcd0ff 100%); }
.blob.warm { background: linear-gradient(135deg, #ffe1dc 0%, #f4dcff 100%); }
.blob.sky { background: linear-gradient(225deg, #8ed0f5 0%, #c9ecfb 60%, #eef9fe 100%); }
.ring { border-radius: 50%; border: 7px solid color-mix(in srgb, var(--lav) 28%, transparent); }
.ring.thin { border-width: 2px; border-color: color-mix(in srgb, var(--lav-deep) 30%, transparent); }
.hexes { background: var(--hex) 0 0 / 96px auto repeat; -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent); mask-image: radial-gradient(closest-side, #000 35%, transparent); }
.lineart { color: color-mix(in srgb, var(--lav-deep) 40%, transparent); }
.lineart svg { width: 100%; height: 100%; overflow: visible; }

/* ── hero ── */
.hero { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 32px; align-items: center; padding-top: 24px; min-height: 520px; }
.hero h1 { font-size: clamp(3.4rem, 9vw, 7rem); line-height: 0.95; letter-spacing: -0.045em; margin-bottom: 0.25em; }
.hero h1 em { font-style: normal; color: var(--coral); }
.hero h1 .dot { color: var(--lav-deep); }
.hero .lead { font-size: 1.18rem; }
.hero-art { position: relative; height: 520px; }
.hero-art .hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 2; }
.hero-art .caption, .hall-art .caption { position: absolute; z-index: 3; right: 8px; bottom: 6px; font-size: 0.78rem; color: var(--muted); background: color-mix(in srgb, var(--paper) 75%, transparent); padding: 3px 10px; border-radius: 999px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; min-height: 0; } .hero-art { height: 340px; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 700;
  background: var(--ink); color: #fff; border: 0; cursor: pointer; font-size: 0.96rem; font-family: var(--sans);
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}
.btn:hover { text-decoration: none; color: #fff; background: var(--lav-deep); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.ghost:hover { background: var(--paper); color: var(--ink); }
.btn.small { padding: 7px 14px; font-size: 0.86rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 48px 0 8px; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.stat { padding: 20px 22px; border-right: 1px solid var(--line-soft); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-size: 2.3rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.stat:nth-child(3n+1) b { color: var(--coral-deep); }
.stat:nth-child(3n+2) b { color: var(--lav-deep); }
.stat:nth-child(3n) b { color: var(--sky-deep); }
.stat span { color: var(--muted); font-size: 0.86rem; font-weight: 500; }

/* "Did you know?" band */
.fact { position: relative; overflow: hidden; margin-top: 72px; padding-block: 64px; background: linear-gradient(120deg, #e3f4fd, #e9e4ff 70%, #fde6e6); }
.fact .inner { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
.fact .tag { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: var(--lav-deep); }
.fact p.big { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.75rem); font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; }
.fact .src { margin-top: 14px; font-size: 0.85rem; color: var(--ink-2); }
@media (max-width: 760px) { .fact .inner { grid-template-columns: 1fr; gap: 10px; } }

/* questions */
.questions { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.question { position: relative; background: var(--paper); border-radius: var(--radius); padding: 26px 26px 22px; box-shadow: var(--shadow); overflow: hidden; }
.question .q-ic { width: 54px; height: 54px; margin-bottom: 14px; }
.question h3 { margin: 0 0 8px; font-size: 1.28rem; }
.question p { margin: 0 0 12px; color: var(--ink-2); }
.question a.more { font-weight: 700; }

/* section heading with art */
.sec-head { position: relative; display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; margin: 88px 0 18px; }
.sec-head h2 { margin: 6px 0 0; }
.sec-head p { margin: 8px 0 0; max-width: 760px; }
.sec-head .lineart { position: static; width: 140px; height: 90px; flex: none; }
@media (max-width: 700px) { .sec-head .lineart { display: none; } }

/* ── knowledge graph ── */
.kg { position: relative; background: var(--paper); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.kg-toolbar { display: flex; gap: 12px; padding: 14px; align-items: flex-start; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.kg-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font: 600 0.8rem var(--sans);
  background: transparent; color: var(--faint); border: 1.5px solid var(--line); cursor: pointer;
}
.chip.on { color: var(--ink); background: var(--paper-2); border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; opacity: 0.35; }
.chip.on .dot { opacity: 1; }
.chip .count { color: var(--faint); font-size: 0.74rem; }
.kg-search, .input, select.input {
  background: var(--paper); border: 1.5px solid var(--line); color: var(--ink); border-radius: 12px; padding: 8px 13px; font: 500 0.92rem var(--sans); min-width: 180px;
}
.kg-search:focus, .input:focus { outline: none; border-color: var(--lav-deep); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lav) 35%, transparent); }
.kg-stage { position: relative; height: 580px; background: radial-gradient(circle at 20% 15%, #eef8fe, transparent 45%), radial-gradient(circle at 85% 90%, #f1ecff, transparent 45%), var(--paper); }
.kg-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.kg-hint { position: absolute; bottom: 10px; right: 14px; color: var(--faint); font-size: 0.76rem; pointer-events: none; }
.kg-tip {
  position: absolute; max-width: 260px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 12px; font-size: 0.8rem; pointer-events: none; box-shadow: var(--shadow-lift);
}
.kg-tip-cls { font-family: var(--mono); font-size: 0.7rem; color: var(--lav-deep); }
.kg-tip-label { font-weight: 800; font-size: 0.98rem; }
.kg-tip-name { color: var(--muted); margin-bottom: 4px; }
.kg-tip .rel { color: var(--faint); font-family: var(--mono); font-size: 0.7rem; }
.kg-legend { display: flex; gap: 18px; flex-wrap: wrap; padding: 12px 6px; font-size: 0.8rem; color: var(--muted); }
.kg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.shape-circle, .shape-diamond, .shape-square { display: inline-block; width: 9px; height: 9px; background: var(--ink-2); }
.shape-circle { border-radius: 50%; }
.shape-diamond { transform: rotate(45deg); width: 8px; height: 8px; }

/* ── halls ── */
.halls { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.hall-card {
  --accent: var(--coral); position: relative; display: block; padding: 22px 22px 14px; border-radius: var(--radius); color: var(--ink);
  background: var(--paper); box-shadow: var(--shadow); overflow: hidden; transition: transform 0.18s, box-shadow 0.18s;
}
.hall-card::before {
  content: ""; position: absolute; width: 230px; height: 230px; right: -70px; bottom: -90px; border-radius: 50%;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, #fff), color-mix(in srgb, var(--accent) 26%, #fff));
}
.hall-card::after {
  content: ""; position: absolute; width: 120px; height: 120px; right: 120px; bottom: -40px; border-radius: 50%;
  border: 4px solid color-mix(in srgb, var(--accent) 16%, transparent);
}
.hall-card { isolation: isolate; }
.hall-card::before, .hall-card::after { z-index: -1; }
.hall-card:hover { transform: translateY(-3px); text-decoration: none; color: var(--ink); box-shadow: var(--shadow-lift); }
.hall-card h3 { margin: 0 0 4px; font-size: 1.35rem; }
.hall-card .sub { color: var(--muted); font-size: 0.9rem; }
.hall-card .n { position: absolute; top: 16px; right: 20px; color: var(--accent); font-size: 1.7rem; font-weight: 800; }
.hall-card canvas { width: 100%; height: 150px; display: block; margin-top: 8px; }

/* ── cards & collection ── */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 22px 0; padding: 14px; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); }
.filters .grow { flex: 1; min-width: 200px; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--paper); }
.seg button { background: none; border: 0; color: var(--muted); padding: 7px 13px; font: 600 0.84rem var(--sans); cursor: pointer; }
.seg button.on { background: var(--ink); color: #fff; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card {
  --accent: var(--coral); display: flex; flex-direction: column; background: var(--paper); border-radius: var(--radius);
  color: var(--ink); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.18s, box-shadow 0.18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); text-decoration: none; color: var(--ink); }
.card .thumb { height: 160px; position: relative; background: radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--accent) 16%, #fff), color-mix(in srgb, var(--accent) 5%, var(--bg)) 70%); }
.card .thumb canvas { width: 100%; height: 100%; display: block; }
.card .thumb .alloy-mark { position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent); font-size: 1.15rem; font-weight: 800; text-align: center; padding: 10px; background: var(--hex) center / 70px auto repeat; }
.card .body { padding: 13px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .formula { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.01em; }
.card .name { color: var(--muted); font-size: 0.88rem; }
.card .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; border: 1.5px solid; }
.badge-thermoelectric { color: var(--te); border-color: color-mix(in srgb, var(--te) 40%, transparent); background: color-mix(in srgb, var(--te) 8%, #fff); }
.badge-topological { color: var(--topo); border-color: color-mix(in srgb, var(--topo) 40%, transparent); background: color-mix(in srgb, var(--topo) 8%, #fff); }
.badge-sg { color: var(--sky-deep); border-color: color-mix(in srgb, var(--sky-deep) 35%, transparent); font-family: var(--mono); font-weight: 500; }
.badge-muted { color: var(--muted); border-color: var(--line); font-weight: 600; }
.badge-warn { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 7%, #fff); }
.badge-good { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); background: color-mix(in srgb, var(--good) 7%, #fff); }
.badge-bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 7%, #fff); }

/* structure status: what is ambiguous, what is missing, what to keep in mind */
.issues { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.issues li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: baseline; font-size: 0.92rem; }
.issues li .badge { justify-self: start; }

table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th, table.data td { padding: 9px 11px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
table.data th { color: var(--muted); font-weight: 700; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; position: sticky; top: 0; background: var(--paper); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr:hover td { background: color-mix(in srgb, var(--sky) 7%, transparent); }
table.data tr.rec td { background: color-mix(in srgb, var(--accent) 9%, transparent); }
table.data tr.exp td { border-top: 1.5px dashed var(--line); color: var(--ink-2); font-style: italic; }
table.data.compact th, table.data.compact td { padding: 5px 8px; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.panel .table-wrap { box-shadow: none; border: 1px solid var(--line-soft); }
th.sortable { cursor: pointer; }
th.sortable:hover { color: var(--ink); }

.dev-good { color: var(--good); font-weight: 600; }
.dev-ok { color: var(--ok); font-weight: 600; }
.dev-bad { color: var(--bad); font-weight: 600; }

/* ── material page ── */
.mat-head { position: relative; display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: flex-end; justify-content: space-between; }
.mat-head h1 { margin: 0; font-size: clamp(2.8rem, 6vw, 4.4rem); letter-spacing: -0.04em; }
.mat-head .name { color: var(--muted); font-size: 1.15rem; font-weight: 600; }
.mat-head .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.mat-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 20px; margin-top: 22px; }
.mat-grid > .panel + .panel { margin-top: 0; }
.mat-grid + h2, .highlights + .mat-grid { margin-top: 26px; }
@media (max-width: 960px) { .mat-grid { grid-template-columns: 1fr; } }
.panel { background: var(--paper); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.panel h3:first-child, .panel h2:first-child { margin-top: 0; }
.panel + .panel { margin-top: 18px; }
.panel .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.panel-title h3 { margin: 0; }
details.panel summary { cursor: pointer; }

.viewer { position: relative; background: radial-gradient(circle at 50% 38%, #ffffff 0%, #f3f8fd 55%, #e6effa 100%); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.viewer canvas { width: 100%; height: 460px; display: block; cursor: grab; touch-action: none; }
.viewer canvas.grabbing { cursor: grabbing; }
.viewer-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border-top: 1px solid var(--line-soft); background: var(--paper); align-items: center; }
.viewer-bar .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.tool { background: var(--paper); border: 1.5px solid var(--line); color: var(--ink); padding: 4px 11px; border-radius: 999px; font: 600 0.8rem var(--sans); cursor: pointer; }
.tool:hover { border-color: var(--ink); }
.tool.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.viewer-legend { position: absolute; top: 12px; left: 14px; display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; font-weight: 600; }
.viewer-legend span { display: inline-flex; align-items: center; gap: 6px; }
.viewer-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(19, 37, 65, 0.2); }
.viewer-src { position: absolute; top: 12px; right: 14px; font-size: 0.78rem; color: var(--muted); text-align: right; }
.viewer-hover { position: absolute; bottom: 12px; left: 14px; font-family: var(--mono); font-size: 0.76rem; color: #fff; background: var(--ink); padding: 3px 9px; border-radius: 8px; }

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; margin: 0; font-size: 0.93rem; }
dl.kv dt { color: var(--muted); font-weight: 500; }
dl.kv dd { margin: 0; font-variant-numeric: tabular-nums; }

.callout { border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--paper)); padding: 14px 18px; border-radius: 0 14px 14px 0; font-size: 0.94rem; }
.callout.warn { --accent: #e0a100; }
.callout.info { --accent: var(--sky-deep); }
.callout p { margin: 0.3em 0; }

.highlights { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.highlight { position: relative; overflow: hidden; background: var(--paper); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.highlight .p { color: var(--muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
.highlight .v { font-size: 1.4rem; font-weight: 800; margin: 2px 0; letter-spacing: -0.01em; }
.highlight .c { color: var(--muted); font-size: 0.84rem; }
.highlight .src { font-size: 0.8rem; margin-top: 6px; }

.meter { position: relative; height: 10px; border-radius: 6px; background: linear-gradient(90deg, #dde6f2, #dde6f2 50%, #cdbfff 50%, var(--lav-deep)); margin: 8px 0 4px; }
.meter i { position: absolute; top: -4px; width: 4px; height: 18px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px #fff; }
.meter-scale { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--faint); }

.refs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.refs li { font-size: 0.92rem; padding-left: 14px; border-left: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.cite i { color: var(--ink); font-style: normal; font-weight: 600; }

.downloads { display: flex; flex-wrap: wrap; gap: 8px; }
.robo { font-size: 0.98rem; line-height: 1.75; color: var(--ink-2); }
.robo p { margin: 0 0 0.7em; }
iframe.genui { width: 100%; height: 720px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; color: var(--muted); padding: 8px 14px; font: 600 0.92rem var(--sans); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
details.more summary { cursor: pointer; color: var(--muted); font-size: 0.88rem; }

/* ── hall page ── */
.hall-head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; align-items: center; }
.hall-art { position: relative; height: 380px; }
.hall-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
@media (max-width: 900px) { .hall-head { grid-template-columns: 1fr; } .hall-art { height: 300px; } }

/* ── tutorials / plugins / about ── */
.tut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.tut { background: var(--paper); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.tut h3 { margin: 0; font-size: 1.08rem; }
.tut h3 a { color: var(--ink); font-weight: 800; }
.tut h3 a:hover { color: var(--lav-deep); }
.tut .why { color: var(--ink-2); font-size: 0.92rem; }
.tut .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tut .cite { font-size: 0.8rem; color: var(--muted); }
.plugin { display: grid; grid-template-columns: 58px 1fr; gap: 16px; background: var(--paper); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.plugin .ic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; background: linear-gradient(135deg, #dff4fd, #e4dcff); }
.plugin.planned { opacity: 0.8; box-shadow: none; border: 1.5px dashed var(--line); background: transparent; }
.plugin h3 { margin: 0 0 4px; }
.plugins { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.prose { max-width: 860px; }
.prose p, .prose li { color: var(--ink-2); }
pre.code { background: var(--ink); color: #e3e9f5; border-radius: 14px; padding: 14px 16px; overflow-x: auto; font-size: 0.82rem; }
.empty { padding: 40px; text-align: center; color: var(--muted); }
.onto-tree ul { list-style: none; padding-left: 18px; border-left: 2px solid var(--line-soft); margin: 4px 0; }
.onto-tree > ul { border-left: 0; padding-left: 0; }
.onto-tree li { padding: 3px 0; }
.onto-tree code { color: var(--muted); font-size: 0.78rem; }

/* page-top art used by inner pages */
.page-art { position: absolute; top: -40px; right: -120px; width: 520px; height: 360px; z-index: -1; pointer-events: none; }
@media (max-width: 900px) { .page-art { opacity: 0.5; right: -260px; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
