:root {
  --ink: #102b35;
  --ink-2: #183c48;
  --paper: #f5f1e8;
  --paper-2: #ebe5d9;
  --white: #fffdf8;
  --mint: #69d2bd;
  --mint-deep: #267b70;
  --gold: #e4b85d;
  --line: rgba(16, 43, 53, .16);
  --muted: #66777a;
  --shadow: 0 18px 60px rgba(9, 39, 48, .12);
}

@font-face {
  font-family: "Noto Sans Math";
  src: url("fonts/NotoSansMath-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+1EE00-1EEFF;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.6;
}
button, input, select { font: inherit; }
button { cursor: pointer; }

.hero {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    radial-gradient(circle at 76% 30%, rgba(105,210,189,.16), transparent 28%),
    var(--ink);
  background-size: 38px 38px, 38px 38px, auto, auto;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -190px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(105,210,189,.22);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(105,210,189,.035), 0 0 0 160px rgba(105,210,189,.025);
}
.nav, .hero-content, main, footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.nav { height: 92px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-weight: 750; letter-spacing: .02em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; color: var(--ink); background: var(--mint); border-radius: 50%; font-family: Georgia, serif; font-size: 23px; }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.theme-lab-link { color: rgba(255,255,255,.72); text-decoration: none; font-size: 12px; letter-spacing: .08em; border-bottom: 1px solid transparent; }
.theme-lab-link:hover, .theme-lab-link:focus-visible { color: var(--mint); border-color: currentColor; outline: 0; }
.theme-lab-link[data-active-theme] { color: var(--mint); }
.edition { font-size: 12px; letter-spacing: .18em; color: rgba(255,255,255,.58); text-transform: uppercase; }
.language-select { min-height: 38px; padding: 7px 30px 7px 12px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; color: var(--theme-hero-text, var(--white)); background-color: rgba(255,255,255,.06); font-size: 12px; font-weight: 750; letter-spacing: .04em; transition: .2s ease; }
.language-select option { color: var(--ink); background: var(--paper); }
.language-select:hover, .language-select:focus-visible { border-color: var(--mint); background-color: rgba(105,210,189,.12); outline: 0; transform: translateY(-1px); }
.hero-content { position: relative; z-index: 2; padding: 66px 0 72px; }
.eyebrow { margin: 0 0 14px; color: var(--mint); font-size: 11px; font-weight: 800; letter-spacing: .22em; }
.eyebrow.dark { color: var(--mint-deep); }
h1 { max-width: 760px; margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(54px, 8vw, 98px); line-height: .96; font-weight: 500; letter-spacing: -.045em; }
h1 em { color: var(--mint); font-weight: 400; }
.hero-copy { max-width: 630px; margin: 28px 0 20px; color: rgba(255,255,255,.7); font-size: 17px; }
.hero-hint { margin: 0; color: rgba(255,255,255,.42); font-size: 12px; letter-spacing: .04em; }
kbd { padding: 7px 10px; border: 1px solid var(--line); background: var(--paper); color: var(--muted); font: 12px/1 system-ui, sans-serif; }
.hero-formula { position: absolute; z-index: 1; color: rgba(255,255,255,.055); font-family: Georgia, serif; font-style: italic; white-space: nowrap; }
.formula-one { right: 5%; top: 130px; font-size: 100px; transform: rotate(-5deg); }
.formula-two { right: 15%; bottom: 40px; font-size: 64px; transform: rotate(8deg); }

main { padding: 80px 0 96px; }
.controls { margin-bottom: 34px; }
.section-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 25px; }
h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(34px, 5vw, 52px); line-height: 1.05; font-weight: 500; }
.result-count { margin: 0; color: var(--muted); font-size: 13px; }
.result-count strong { color: var(--ink); font-size: 26px; font-family: Georgia, serif; }
.filter-row { display: flex; flex-wrap: wrap; gap: 9px; }
.filter-chip { padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: transparent; font-size: 13px; transition: .2s ease; }
.filter-chip:hover { border-color: var(--mint-deep); transform: translateY(-1px); }
.filter-chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--white); }
.filter-chip .count { margin-left: 6px; color: var(--muted); }
.filter-chip[aria-pressed="true"] .count { color: var(--mint); }
.secondary-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.secondary-filters label { display: flex; flex-direction: column; align-items: stretch; gap: 8px; color: var(--muted); font-size: 12px; }
.secondary-filters select { min-width: 112px; height: 38px; padding: 8px 30px 8px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--white); }
.inline-search { flex: 1; min-width: min(300px, 100%); }
.inline-search-field { display: flex; flex: none; width: 100%; align-items: center; gap: 8px; min-width: 0; height: 38px; padding: 0 8px 0 12px; border: 1px solid var(--line); border-radius: 4px; color: var(--mint-deep); background: var(--white); }
.inline-search-field > span { font-size: 20px; transform: rotate(-18deg); }
.inline-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.inline-search kbd { padding: 5px 7px; }
.active-context { min-height: 34px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.active-context button { border: 0; border-bottom: 1px solid currentColor; padding: 2px 0; background: transparent; color: var(--mint-deep); font-size: 12px; }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
table { width: 100%; min-width: 1900px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
th { position: sticky; top: 0; z-index: 2; padding: 13px 12px; text-align: left; color: var(--paper); background: var(--ink); font-size: 10px; letter-spacing: .06em; font-weight: 650; white-space: nowrap; }
th:nth-child(1) { width: 105px; left: 0; z-index: 4; }
th:nth-child(2) { width: 270px; }
th:nth-child(3) { width: 140px; }
th:nth-child(4) { width: 90px; }
th:nth-child(5) { width: 96px; }
th:nth-child(6) { width: 220px; }
th:nth-child(7) { width: 140px; }
th:nth-child(8) { width: 140px; }
th:nth-child(9) { width: 170px; }
th:nth-child(10) { width: 220px; }
th:nth-child(11) { width: 250px; }
td { padding: 13px 12px; vertical-align: middle; border-bottom: 1px solid var(--line); background: var(--white); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
td:first-child { position: sticky; left: 0; z-index: 1; background: var(--white); box-shadow: 8px 0 14px -14px var(--ink); }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .18s; }
tbody tr:hover td { background: #f0f8f4; }
.level, .frequency { display: inline-flex; padding: 2px 7px; border-radius: 999px; font-style: normal; white-space: nowrap; }
.level { color: var(--mint-deep); background: rgba(105,210,189,.15); }
.frequency { color: #775413; background: rgba(228,184,93,.18); }
.frequency-常用 { color: #176b5f; background: rgba(105,210,189,.22); }
td code { color: var(--ink-2); font: 10px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
.symbol-button { min-width: 64px; padding: 0; border: 0; background: transparent; color: var(--ink); font-family: "Noto Sans Math", "Times New Roman", "STIX Two Math", serif; font-size: 27px; line-height: 1.1; text-align: left; }
.symbol-button:hover { color: var(--mint-deep); }
.symbol-name { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-family: system-ui, sans-serif; }
.subject-badge { display: inline-flex; padding: 4px 9px; border: 1px solid rgba(38,123,112,.28); border-radius: 999px; color: var(--mint-deep); background: rgba(105,210,189,.11); font-size: 11px; }
.example { font-family: "Noto Sans Math", Georgia, "Songti SC", serif; font-size: 12px; }
.industries { color: var(--muted); }
.aliases, .related { color: var(--muted); }
.related { font-family: "Noto Sans Math", Inter, system-ui, sans-serif; }
.empty-state { padding: 76px 20px; text-align: center; }
.empty-state > span { font-family: Georgia, serif; font-size: 60px; color: var(--mint-deep); }
.empty-state h3 { margin: 6px 0; font-family: Georgia, "Songti SC", serif; font-size: 27px; }
.empty-state p { margin: 0 0 18px; color: var(--muted); }
.empty-state button { border: 0; padding: 10px 18px; color: var(--white); background: var(--ink); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { display: grid; place-items: center; width: 38px; height: 36px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font-size: 20px; }
.pagination button:hover:not(:disabled) { border-color: var(--ink); background: var(--ink); color: var(--white); }
.pagination button:disabled { opacity: .35; cursor: not-allowed; }
.pagination span { min-width: 220px; text-align: center; color: var(--muted); font-size: 12px; }
.note-card { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; margin-top: 60px; padding: 38px 42px; border: 1px solid var(--line); background: var(--paper-2); }
.note-card h2 { font-size: 31px; }
.note-card p:last-child { max-width: 740px; margin-bottom: 0; color: var(--muted); }
.note-symbol { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: var(--white); background: var(--ink); font-family: Georgia, serif; font-size: 28px; }
.references { color: var(--white); background: var(--ink-2); }
.references-inner { width: min(1180px, calc(100% - 40px)); margin-inline: auto; padding: 58px 0; }
.references h2 { margin-bottom: 16px; font-size: 36px; }
.references-note { max-width: 820px; margin: 0 0 28px; color: rgba(255,255,255,.58); font-size: 13px; }
.reference-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 38px; border-top: 1px solid rgba(255,255,255,.14); }
.reference-list p { margin: 0; padding: 17px 0; border-bottom: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.58); font-size: 12px; }
.reference-list a { color: var(--mint); text-decoration: none; }
.reference-list a:hover, .reference-list a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
footer { display: flex; align-items: center; gap: 30px; padding: 34px 0 46px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer-brand { color: var(--ink); }
footer p { margin: 0; flex: 1; }
footer button { border: 0; background: transparent; color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 10; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--white); box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: .2s ease; font-size: 13px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1050px) and (min-width: 801px) {
  .secondary-filters label:not(.inline-search) select { width: 126px; min-width: 126px; }
}

@media (max-width: 800px) {
  .hero { min-height: 500px; }
  .nav { height: 76px; }
  .hero-content { padding-top: 58px; }
  .edition, kbd, .formula-two { display: none; }
  .formula-one { right: -140px; font-size: 72px; }
  main { padding-top: 56px; }
  .section-heading { align-items: start; }
  .table-wrap { width: calc(100vw - 40px); }
  .note-card { padding: 28px 24px; }
  .secondary-filters { align-items: flex-start; flex-wrap: wrap; }
  .inline-search { flex-basis: 100%; }
  .reference-list { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .nav, .hero-content, main, footer { width: min(100% - 28px, 1180px); }
  .references-inner { width: min(100% - 28px, 1180px); }
  h1 { font-size: 50px; }
  .hero-copy { font-size: 15px; }
  .section-heading { display: block; }
  .result-count { margin-top: 18px; }
  .secondary-filters label:not(.inline-search) { flex: 1; min-width: 135px; flex-wrap: wrap; }
  .secondary-filters select { width: 100%; }
  .pagination { gap: 5px; }
  .pagination span { min-width: 150px; }
  .note-card { grid-template-columns: 1fr; }
  footer { align-items: flex-start; flex-wrap: wrap; }
  footer p { width: 100%; flex-basis: 100%; order: 3; }
  .brand { font-size: 13px; }
  .theme-lab-link { display: none; }
  .language-select { min-height: 36px; padding-left: 10px; }
}

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

/* Unified atlas shell */
.has-site-rail { padding-left: 248px; }
.atlas-page-view { min-width: 0; }
.atlas-navigating .atlas-page-view { cursor: progress; }
.atlas-navigating::before { content:""; position:fixed; z-index:80; top:0; left:248px; right:0; height:2px; background:linear-gradient(90deg,transparent,var(--mint),transparent); background-size:45% 100%; animation:atlas-progress .7s linear infinite; }
@keyframes atlas-progress { from{background-position:-80% 0} to{background-position:180% 0} }
.site-rail { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 248px; display: flex; flex-direction: column; color: #dfece8; background: #0b232c; border-right: 1px solid rgba(255,255,255,.1); box-shadow: 12px 0 35px rgba(5,24,31,.12); }
.rail-head { height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid rgba(255,255,255,.1); }
.rail-home-mark { display: grid; place-items: center; width: 40px; height: 40px; color: #102b35; background: var(--mint); border-radius: 50%; font: 26px/1 Georgia,serif; text-decoration: none; }
.rail-close { display: none; border: 0; color: white; background: transparent; font-size: 28px; }
.rail-nav { flex: 1; overflow-y: auto; padding: 18px 12px 24px; scrollbar-width: thin; scrollbar-color: rgba(105,210,189,.35) transparent; }
.rail-primary,.rail-child { display: flex; align-items: center; gap: 11px; color: rgba(255,255,255,.64); text-decoration: none; transition: .18s ease; }
.rail-primary { margin-bottom: 18px; padding: 11px 12px; border-radius: 7px; }
.rail-primary span,.rail-child span { width: 23px; color: var(--mint); font-family: "Noto Sans Math",Georgia,serif; text-align: center; }
.rail-primary b,.rail-child b { font-size: 12px; font-weight: 620; }
.rail-group { margin-top: 13px; }
.rail-group > p { display: flex; align-items: center; gap: 9px; margin: 0 10px 8px; color: rgba(255,255,255,.34); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.rail-group > p span { color: var(--gold); }
.rail-child { min-height: 36px; padding: 7px 12px; border-left: 2px solid transparent; border-radius: 0 5px 5px 0; }
.rail-primary:hover,.rail-child:hover,.rail-primary.is-active,.rail-child.is-active { color: white; background: rgba(105,210,189,.1); }
.rail-child.is-active { border-left-color: var(--mint); }
.rail-foot { padding: 18px 22px 22px; border-top: 1px solid rgba(255,255,255,.1); }
.rail-foot span { display: block; color: var(--mint); font-family: Georgia,serif; letter-spacing: .12em; }
.rail-foot small { color: rgba(255,255,255,.3); font-size: 8px; letter-spacing: .12em; }
.rail-toggle { display: none; position: fixed; left: 16px; top: calc((var(--atlas-nav-height, 92px) - 42px) / 2); z-index: 29; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: white; background: #102b35; box-shadow: var(--shadow); }
.has-site-rail .nav,.has-site-rail .hero-content,.has-site-rail main,.has-site-rail footer { width: min(1180px, calc(100% - 48px)); }
.has-site-rail .references-inner { width: min(1180px, calc(100% - 48px)); }

/* Atlas home */
.home-hero { min-height: 610px; }
.home-page .formula-one { top: 180px; right: 3%; font-size: clamp(42px,6vw,84px); }
.world-intro { padding-top: 6px; }
.section-copy { max-width: 660px; margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.text-link { margin-bottom: 8px; color: var(--mint-deep); font-size: 13px; font-weight: 750; text-decoration: none; }
.discipline-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-top: 28px; }
.discipline-card { position: relative; min-height: 260px; padding: 25px; overflow: hidden; border: 1px solid var(--line); color: var(--ink); background: var(--white); text-decoration: none; box-shadow: 0 8px 28px rgba(9,39,48,.05); transition: .22s ease; }
.discipline-card:hover { transform: translateY(-4px); border-color: var(--mint-deep); box-shadow: var(--shadow); }
.card-number { color: var(--muted); font: 10px/1 ui-monospace,monospace; letter-spacing: .12em; }
.card-symbol { display: block; margin: 29px 0 16px; color: var(--mint-deep); font: 46px/1 "Noto Sans Math",Georgia,serif; }
.discipline-card h3 { margin: 0; font: 500 23px/1.15 Georgia,"Songti SC",serif; }
.discipline-card p { margin: 11px 0 32px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.card-count { position: absolute; left: 25px; bottom: 20px; color: var(--mint-deep); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.card-arrow { position: absolute; right: 22px; top: 20px; color: var(--muted); font-size: 20px; }
.discipline-card::after { content:""; position:absolute; width:120px; height:120px; right:-65px; bottom:-65px; border:1px solid rgba(105,210,189,.3); border-radius:50%; box-shadow:0 0 0 25px rgba(105,210,189,.04); }
.size-placeholder-card { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; margin-top: 72px; padding: 54px; border: 1px dashed rgba(16,43,53,.3); background: var(--paper-2); }
.size-placeholder-card p:last-child { max-width: 680px; margin: 18px 0 0; color: var(--muted); }
.placeholder-link { display: grid; place-items: center; gap: 6px; width: 150px; height: 150px; border-radius: 50%; color: white; background: var(--ink); text-decoration: none; font-size: 11px; letter-spacing: .08em; }
.placeholder-link span:first-child { color: var(--mint); font-size: 28px; }
.compact-hero { min-height: 480px; }
.empty-world { max-width: 760px; min-height: 420px; display: grid; place-items: center; align-content: center; margin-inline: auto; text-align: center; }
.empty-world > span { display: grid; place-items: center; width: 96px; height: 96px; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 50%; color: var(--mint-deep); font: 42px/1 Georgia,serif; }
.empty-world p { max-width: 600px; color: var(--muted); }
.primary-link { display: inline-flex; margin-top: 16px; padding: 11px 19px; color: white; background: var(--ink); text-decoration: none; }

@media (max-width: 1180px) {
  .has-site-rail { padding-left: 220px; }
  .site-rail { width: 220px; }
  .atlas-navigating::before { left:220px; }
  .discipline-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 860px) {
  .has-site-rail { padding-left: 0; }
  .site-rail { width: min(310px,88vw); transform: translateX(-105%); transition: transform .22s ease; }
  .atlas-navigating::before { left:0; }
  .rail-open .site-rail { transform: translateX(0); }
  .rail-open::after { content:""; position:fixed; inset:0; z-index:28; background:rgba(3,20,26,.58); }
  .rail-close,.rail-toggle { display: block; }
  .has-site-rail .nav,.has-site-rail .lab-nav { padding-left: 56px; }
  .has-site-rail .lab-nav { width: min(100% - 32px,1320px); }
  .has-site-rail .nav,.has-site-rail .hero-content,.has-site-rail main,.has-site-rail footer { width: min(100% - 32px,1180px); }
  .has-site-rail .references-inner { width: min(100% - 32px,1180px); }
}
@media (max-width: 600px) {
  .discipline-grid { grid-template-columns: 1fr; }
  .discipline-card { min-height: 235px; }
  .size-placeholder-card { grid-template-columns: 1fr; padding: 32px 24px; }
  .placeholder-link { width: 118px; height: 118px; }
  .home-page .hero-content { padding-top: 64px; }
}

/* Error codes share the symbol index layout; long identifiers need more room. */
.error-page th:first-child { width: 220px; }
.error-page .symbol-button { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 17px; overflow-wrap: anywhere; }
.error-page .symbol-name { line-height: 1.5; }
.error-page td a { color: var(--mint-deep); }

/* Keep the floating menu centered on each page's actual header row. */
body[data-page="themes"] { --atlas-nav-height: 86px; }
@media (max-width: 800px) {
  body:not([data-page="themes"]) { --atlas-nav-height: 76px; }
}
@media (max-width: 560px) {
  body[data-page="themes"] { --atlas-nav-height: 72px; }
}

/* Column preferences and synchronized, viewport-bound table affordances. */
.table-wrap:focus-visible,.floating-table-scroll:focus-visible { outline: 2px solid var(--mint-deep); outline-offset: 2px; }
.active-context { gap: 14px; flex-wrap: wrap; }
.column-settings { position: relative; margin-left: auto; text-transform: none; letter-spacing: normal; }
.column-settings summary { cursor: pointer; padding: 7px 12px; border: 1px solid var(--line); background: var(--white); color: var(--ink); }
.column-options { position: absolute; top: 100%; right: 0; z-index: 26; min-width: 200px; max-height: 60vh; overflow: auto; padding: 12px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.column-options label { display: flex; align-items: center; gap: 10px; padding: 6px; cursor: pointer; }
.column-options input { accent-color: var(--mint-deep); }
th[hidden],td[hidden] { display: none; }
th:first-child,td:first-child { position: static; }
th.pinned-column { position: sticky; left: 0; z-index: 4; }
td.pinned-column { position: sticky; left: 0; z-index: 1; background: var(--white); box-shadow: 8px 0 14px -14px var(--ink); }
.floating-table-header { position: fixed; top: 0; z-index: 24; overflow: hidden; background: var(--ink); box-shadow: 0 3px 8px rgba(0,0,0,.12); }
.floating-table-header table { margin: 0; }
.floating-table-scroll { position: fixed; bottom: 0; z-index: 25; height: 20px; overflow-x: scroll; overflow-y: hidden; background: var(--paper); border-top: 1px solid var(--line); scrollbar-color: var(--muted) var(--paper); }
.floating-table-scroll > div { height: 1px; }
.floating-table-scroll::-webkit-scrollbar { height: 16px; }
.floating-table-scroll::-webkit-scrollbar-track { background: var(--paper); }
.floating-table-scroll::-webkit-scrollbar-thumb { background: var(--muted); border: 3px solid var(--paper); border-radius: 8px; }
.floating-table-header[hidden],.floating-table-scroll[hidden] { display: none; }

/* Reading typography for generated guides and supporting copy, separate from landing headings. */
.editorial-block {
  min-width: 0;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.85;
}
.editorial-block:first-child { margin-top: 0; }
.editorial-block h2 {
  margin: 28px 0 10px;
  font-size: clamp(19px, 1.7vw, 23px);
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: 0;
}
.editorial-block h2:first-child, .editorial-block .eyebrow + h2 { margin-top: 0; }
.editorial-block p, .editorial-block ol, .editorial-block ul {
  max-width: 80ch;
  margin: 0 0 14px;
}
.editorial-block .section-copy { font-size: inherit; line-height: inherit; }
.editorial-block li + li { margin-top: 6px; }
.editorial-block code { font-size: .92em; overflow-wrap: anywhere; }
.editorial-block .text-link { font-size: 14px; line-height: 1.8; white-space: normal; }
.code-workspace > .editorial-block { grid-column: 1 / -1; }
.code-panel.editorial-block { margin-top: 12px; padding: clamp(20px, 3vw, 32px); }
body[data-page="guide"] .hero h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.25; max-width: 22em; }
body[data-page="guide"] main { padding-top: 36px; }
body[data-page="guide"] article.editorial-block { max-width: 880px; border-top: 0; padding-top: 0; }
.directory-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.directory-pages a, .directory-pages > span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; min-height: 34px; padding: 3px 9px;
  font-size: 13px; line-height: 1.5; border-radius: 4px;
}
.directory-pages a { color: var(--mint-deep); text-decoration: none; border: 1px solid var(--line); }
.directory-pages a:hover, .directory-pages a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }
.directory-pages a[aria-current="page"] { font-weight: 700; }
.directory-pages a:focus-visible, .directory-all summary:focus-visible { outline: 2px solid var(--mint-deep); outline-offset: 3px; }
.directory-all { margin-top: 14px; }
.directory-all summary { width: fit-content; cursor: pointer; color: var(--muted); font-size: 13px; }
@media (max-width: 640px) {
  .editorial-block { margin-top: 28px; padding-top: 22px; }
  .editorial-block h2 { margin-top: 24px; }
  .directory-pages a { min-height: 40px; }
}

.mobile-symbol-tools, .mobile-row-toggle, .mobile-password-toggle { display: none; }
@media (max-width: 767px) {
  body.rail-open { overflow: hidden; }
  .rail-open .site-rail { z-index: 31; }
  .site-rail { max-width: calc(100vw - 48px); height: 100dvh; }
  .rail-child, .rail-primary, .rail-close { min-height: 44px; }
  .rail-close { min-width: 44px; }
  .hero, .home-hero { min-height: 0; padding-bottom: 36px; }
  .hero-content { padding-top: 32px; }
  .hero h1, body[data-page="guide"] .hero h1 { font-size: clamp(28px, 7.5vw, 34px); line-height: 1.3; overflow-wrap: anywhere; }
  .hero-formula { display: none; }
  .nav, .hero-content, main, footer, .references-inner { width: calc(100% - 36px); }
  .nav { min-height: 76px; height: auto; gap: 8px; }
  .nav-actions { gap: 8px; }
  .language-select { min-height: 44px; font-size: 16px; }
  main { padding-top: 32px; padding-bottom: 44px; }
  .discipline-grid { grid-template-columns: minmax(0,1fr); }
  .discipline-card { min-height: 0; padding: 22px; }
  .section-heading h2, .references h2, .note-card h2 { font-size: 23px; line-height: 1.4; }
  .editorial-block { font-size: 16px; overflow-wrap: anywhere; }
  .editorial-block h2 { font-size: 20px; }
  .editorial-block p, .editorial-block ol { max-width: 100%; }
  .editorial-block .text-link { font-size: 15px; }
  .note-card { padding: 22px; gap: 14px; }
  .size-placeholder-card { flex-wrap: wrap; padding: 22px; gap: 16px; }
  .mobile-symbol-tools { display: flex; gap: 10px; margin-bottom: 20px; }
  .mobile-symbol-tools button, .mobile-row-toggle, .mobile-password-toggle { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); border-radius: 6px; }
  body[data-page="symbol"] .controls:not(.mobile-filters-open) #subjectFilters,
  body[data-page="symbol"] .controls:not(.mobile-filters-open) .secondary-filters > label:not(.inline-search) { display: none; }
  .filter-row { flex-wrap: wrap; }
  .filter-chip { min-height: 44px; }
  input, select, textarea { font-size: 16px; }
  .inline-search, .secondary-filters { min-width: 0; width: 100%; }
  body[data-page="symbol"] .table-wrap { width: 100%; }
  body[data-page="symbol"] .table-wrap.symbol-enhanced:not(.mobile-table-view) { overflow: visible; border: 0; }
  body[data-page="symbol"] .table-wrap.symbol-enhanced:not(.mobile-table-view) table,
  body[data-page="symbol"] .table-wrap.symbol-enhanced:not(.mobile-table-view) tbody { display: block; width: 100% !important; min-width: 0 !important; }
  body[data-page="symbol"] .table-wrap.symbol-enhanced:not(.mobile-table-view) thead { display: none; }
  body[data-page="symbol"] .table-wrap.symbol-enhanced:not(.mobile-table-view) tr { display: block; margin-bottom: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
  body[data-page="symbol"] .table-wrap.symbol-enhanced:not(.mobile-table-view) td { display: none !important; position: static; width: auto !important; min-width: 0; padding: 7px 0; border: 0; box-shadow: none; background: transparent; white-space: normal; overflow-wrap: anywhere; font-size: 15px; }
  body[data-page="symbol"] .table-wrap.symbol-enhanced:not(.mobile-table-view) td:nth-child(1),
  body[data-page="symbol"] .table-wrap.symbol-enhanced:not(.mobile-table-view) td:nth-child(2),
  body[data-page="symbol"] .table-wrap.symbol-enhanced:not(.mobile-table-view) td:nth-child(10),
  body[data-page="symbol"] .table-wrap.symbol-enhanced:not(.mobile-table-view) .mobile-row-open td { display: block !important; }
  body[data-page="symbol"] .table-wrap.symbol-enhanced:not(.mobile-table-view) td:not(:first-child)::before { content: attr(data-mobile-label); display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
  .table-wrap.symbol-enhanced:not(.mobile-table-view) .mobile-row-toggle { display: inline-block; float: right; font-size: 13px; }
  body[data-page="symbol"] .column-settings, body[data-page="symbol"] .floating-table-header, body[data-page="symbol"] .floating-table-scroll { display: none !important; }
  .pagination { flex-wrap: wrap; }
  .pagination button { min-width: 44px; min-height: 44px; }
  .pagination span { min-width: 100px; }
  .code-workspace { grid-template-columns: minmax(0,1fr); }
  .code-workspace .code-example { flex-direction: column; align-items: stretch; padding: 20px; }
  .code-workspace .code-panel { padding: 20px; scroll-margin-top: 16px; }
  .code-workspace input, .code-workspace textarea, .code-workspace select { font-size: 16px; max-width: 100%; min-height: 44px; }
  .code-workspace input[type="checkbox"] { min-height: 24px; width: 24px; }
  .code-workspace .code-button { min-height: 44px; }
  .code-generate { width: 100%; }
  .code-actions { display: grid; grid-template-columns: minmax(0,1fr); }
  .code-preview canvas { max-width: 100%; height: auto; }
  .mobile-password-toggle { display: inline-block; margin-top: 8px; font-size: 14px; }
  .code-payload, footer, .references { overflow-wrap: anywhere; }
}
@media (max-width: 767px) {
  .rail-toggle { position: absolute; }
  body[data-page="symbol"] .table-wrap.symbol-enhanced:not(.mobile-table-view) .symbol-button > span { font-size: 30px; line-height: 1.3; }
  body[data-page="symbol"] .table-wrap.symbol-enhanced:not(.mobile-table-view) .symbol-name { font-size: 15px; }
  body[data-page="symbol"] .table-wrap.symbol-enhanced:not(.mobile-table-view) [data-mobile-copy]::after { content: attr(data-mobile-copy); display: block; font: 12px/1.8 system-ui,sans-serif; color: var(--mint-deep); }
}

/* Keep complete, offscreen static catalogs out of early layout work. */
html[data-static-symbols] .table-wrap:not(.symbol-enhanced) {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}
@media print {
  html[data-static-symbols] .table-wrap { content-visibility: visible; }
}

/* JS-only guard: the hero and prose paint while the complete table is parsed.
   No-JS readers retain the full table; bootstrap also clears this on load. */
html[data-symbol-enhancing] #symbolTable { display: none; }

/* Static tool headings and reading content can paint before encoder startup.
   Controls keep their existing ready-to-use behavior, without accepting edits
   that initialization would overwrite. No-JS pages have no enhancement flag. */
html[data-tool-enhancing] #codeForm,
html[data-tool-enhancing] .code-preview,
html[data-tool-enhancing] .code-actions,
html[data-tool-enhancing] #loadCodeExample { visibility: hidden; }

/* Section identity: the same physics-wave chip mark in navigation and content. */
.silicon-mark { color: #102b35; display: block; width: 36px; height: 36px; flex: 0 0 auto; }
.rail-nav .silicon-mark { width: 24px; height: 24px; }

/* Shared identity palette resolves on :root, including alternate themes. */
:root { --section-icon-fill: var(--mint); --section-icon-ink: #102b35; }
.rail-home-mark { background: var(--section-icon-fill); color: var(--section-icon-ink); }
.section-icon { display: block; width: 36px; height: 36px; flex: 0 0 auto; color: var(--section-icon-ink); }
.section-icon-host { background: transparent; }
.rail-nav .section-icon { width: 23px; height: 23px; }
.card-symbol .section-icon { width: 48px; height: 48px; }
.silicon-footer-brand .section-icon { width: 24px; height: 24px; }
.lab-brand > span.section-icon-host { background: transparent; padding: 0; }
