/* Shared hierarchy for the static edition. Equivalent Chinese and English pages stay aligned. */
.tool-title:is(section),.sim-head,.nr-head,.ip-head{box-sizing:border-box;display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:24px!important;align-items:start!important;max-width:none!important;min-height:0!important;margin-top:-18px!important;padding:0 0 24px!important;border-bottom:1px solid var(--line-dark)!important}
.head-with-note{grid-template-columns:minmax(0,1fr) 320px!important;gap:42px!important}
.tool-title:is(section) h1,.sim-head h1,.nr-head h1,.ip-head h1{margin:0!important;font-family:var(--font-cjk)!important;font-size:clamp(24px,2.6vw,32px)!important;font-weight:500!important;line-height:1.25!important;letter-spacing:.012em!important}
:lang(en) .tool-title:is(section) h1,:lang(en) .sim-head h1,:lang(en) .nr-head h1,:lang(en) .ip-head h1{font-family:var(--font-display)!important}
.tool-title:is(section)>div>p:not(.kicker),.sim-head .intro,.nr-head>div>p:not(.kicker),.ip-head>div>p:not(.kicker){max-width:none!important;margin:15px 0 0!important;color:var(--muted)!important;font-family:var(--sans)!important;font-size:16px!important;line-height:1.7!important}
.head-with-note>div>p:not(.kicker),.sim-head.head-with-note .intro,.nr-head.head-with-note>div>p:not(.kicker),.ip-head.head-with-note>div>p:not(.kicker){max-width:720px!important}
.ip-form h2,.graph-card h2{font-size:clamp(17px,1.7vw,21px)!important;font-weight:500!important}
/* Set-theory calculator layout balance */
.workbench{grid-template-columns:minmax(300px,1.1fr) minmax(280px,.9fr)!important;gap:30px!important;align-items:start!important}
.workbench>.block{min-height:0!important}
#pc-clock{width:min(100%,380px)!important;height:auto!important}
.clock-area .hint{margin-top:10px!important;font-size:12px!important}
.clock-area{padding:12px 0!important}
.result-table{font-size:15px!important}
.result-table th,.result-table td{padding:13px 0!important;line-height:1.5!important}
.result-table th{width:110px!important;padding-right:14px!important}
.analysis-section{margin-top:32px!important}
.analysis-section .block>h2{font-size:18px!important;font-weight:500!important;margin-bottom:10px!important}
.analysis-card label{font-size:13px!important;color:var(--muted)!important;font-weight:500!important;margin-bottom:6px!important}
.analysis-grid{gap:16px!important;padding-top:14px!important}
.scroll-area{height:140px!important;padding:8px!important;font-size:13px!important;line-height:1.6!important}
@media(min-width:851px){html[lang="en"] .nr-head h1{font-size:clamp(26px,2.55vw,34px)!important;white-space:nowrap}}
.tool-meta,.theory-note,.nr-note,.ip-note{box-sizing:border-box;min-height:0!important;margin:0!important;padding:12px 15px!important;align-self:start!important;border-left:3px solid var(--accent)!important;background:var(--accent-quiet)!important;color:var(--muted)!important;font-size:13px!important;line-height:1.55!important}
.tool-meta strong,.theory-note strong,.nr-note strong,.ip-note strong{display:block;margin:0 0 4px!important;color:var(--ink)!important;font-size:14px!important}
input,textarea,select,.field input,.input-row input,.tool-meta,.tool-meta .pitch-name,.tool-meta .accidental{font-family:var(--sans)!important;font-variant-numeric:lining-nums tabular-nums}
.hero-title{font-family:var(--font-cjk)!important;font-size:clamp(29px,3.4vw,42px)!important;font-weight:600!important;line-height:1.18!important;letter-spacing:.015em!important}:lang(en) .hero-title{font-family:var(--font-display)!important}.hero-title em{font-family:var(--font-display)!important;font-size:clamp(15px,1.5vw,19px)!important;font-weight:500!important;letter-spacing:.04em!important}.lead{font-size:clamp(15px,1.3vw,18px)!important}
/* ===== Universal heading hierarchy (zh → CJK, en → geometric display) ===== */
.page-heading-hero,.hero-title{font-family:var(--font-cjk);font-size:clamp(29px,3.4vw,42px);font-weight:600;line-height:1.18;letter-spacing:.015em}
:lang(en) .page-heading-hero,:lang(en) .hero-title{font-family:var(--font-display)}
/* Section landing pages: bold but moderate, clearly smaller than the home hero, yet standing out from the H2 sub-headings below. */
.page-heading-section,.page-head h1,.catalog-head h1,.lib-head h1,.tools h1,.contact-layout h1{font-family:var(--font-cjk);font-size:clamp(24px,2.8vw,34px);font-weight:600;line-height:1.22;letter-spacing:.012em}
:lang(en) .page-heading-section,:lang(en) .page-head h1,:lang(en) .catalog-head h1,:lang(en) .lib-head h1,:lang(en) .tools h1,:lang(en) .contact-layout h1{font-family:var(--font-display)}
.page-heading-tool,.tool-title h1,.sim-head h1,.nr-head h1,.ip-head h1{font-family:var(--font-cjk);font-size:clamp(21px,2.4vw,29px);font-weight:600;line-height:1.25;letter-spacing:.012em}
:lang(en) .page-heading-tool,:lang(en) .tool-title h1,:lang(en) .sim-head h1,:lang(en) .nr-head h1,:lang(en) .ip-head h1{font-family:var(--font-display)}
.page-heading-entry,.entry-layout h1{font-family:var(--font-cjk);font-size:clamp(22px,2.5vw,31px);font-weight:600;line-height:1.22;letter-spacing:.012em}
:lang(en) .page-heading-entry,:lang(en) .entry-layout h1{font-family:var(--font-display)}
/* Catalog card titles: a distinct editorial voice (serif for zh, geometric display for en) so they read differently from the page H1s. */
.catalog h2{font-family:var(--font-serif);font-size:clamp(18px,1.9vw,22px);font-weight:600;letter-spacing:.01em;color:var(--ink)}
:lang(en) .catalog h2{font-family:var(--font-display)}
.atlas-grid strong{display:block;font-family:var(--font-serif);font-size:clamp(18px,1.9vw,22px);font-weight:600;letter-spacing:.01em}
:lang(en) .atlas-grid strong{font-family:var(--font-display)}
.home-section h2,.catalog h2,.lib-card h2,.contact-list h2,.block h2,.entry-section h2,.theory-references h2,.references h2,.nr-references h2,.ip-references h2,.workspace-head h2,.input-panel h2,.result-card h2,.graph-card h2,.analysis-card>label,.matrix-panel h2,.catalog-group h2,.analysis-section h2,.fourier-spectrum h2,.fourier-balance-workbench h2,.ip-form h2,.ip-forms h2,.archive-notice h2,.sim-head h2{font-family:var(--font-cjk);font-size:clamp(20px,2vw,26px);font-weight:500;line-height:1.25;color:var(--ink)}
:lang(en) .home-section h2,:lang(en) .catalog h2,:lang(en) .lib-card h2,:lang(en) .contact-list h2,:lang(en) .block h2,:lang(en) .entry-section h2,:lang(en) .theory-references h2,:lang(en) .references h2,:lang(en) .nr-references h2,:lang(en) .ip-references h2,:lang(en) .workspace-head h2,:lang(en) .input-panel h2,:lang(en) .result-card h2,:lang(en) .graph-card h2,:lang(en) .analysis-card>label,:lang(en) .matrix-panel h2,:lang(en) .catalog-group h2,:lang(en) .analysis-section h2,:lang(en) .fourier-spectrum h2,:lang(en) .fourier-balance-workbench h2,:lang(en) .ip-form h2,:lang(en) .ip-forms h2,:lang(en) .archive-notice h2,:lang(en) .sim-head h2{font-family:var(--font-display)}
/* Country directory (people pages) — wider label column, larger type, no overflow */
.country-index{margin-top:30px;border-top:1px solid var(--line)}
.country-group{display:grid;grid-template-columns:220px minmax(0,1fr);gap:30px;padding:24px 0;border-bottom:1px solid var(--line)}
.country-group h2{margin:0;font-family:var(--font-cjk);font-size:22px;font-weight:600;color:var(--ink);line-height:1.3}
:lang(en) .country-group h2{font-family:var(--font-display);font-size:21px}
.country-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 26px}
.country-links a{padding:10px 0;color:var(--accent);font-weight:500;font-size:16px;text-decoration:none}
.country-links a:hover{text-decoration:underline}
@media(max-width:700px){.country-group{grid-template-columns:1fr}.country-links{grid-template-columns:1fr}}
:lang(en) .catalog h2{font-family:var(--font-display)}
.person-entry{grid-template-columns:minmax(0,760px) minmax(230px,300px)!important}.person-portrait{display:block;width:100%;height:auto;margin-bottom:18px;border-radius:2px;filter:saturate(.86) contrast(1.03)}
.person-infobox{align-self:start;border:1px solid var(--line);border-top:3px solid var(--accent);padding:18px;background:var(--paper);color:var(--ink)}
.person-infobox>h2{margin:0 0 14px;font-size:20px;text-align:center}
.person-facts{margin:0}
.person-facts>div{display:grid;grid-template-columns:76px minmax(0,1fr);gap:10px;padding:8px 0;border-top:1px solid var(--line)}
.person-facts dt{font-weight:700;color:var(--ink)}
.person-facts dd{margin:0;color:var(--muted)}
.person-entry .entry-section p{margin:0;color:var(--soft-ink);line-height:1.85}.person-entry .entry-section p+p{margin-top:12px}.person-entry .works-list{margin:0;padding-left:20px}.source-link{display:inline-block;margin-top:14px;font-size:12px}
@media(max-width:800px){
  .person-entry{grid-template-columns:minmax(0,1fr)!important;gap:34px!important}
  .person-entry>div{min-width:0;grid-row:1}
  .person-entry>.entry-meta{min-width:0;grid-row:2}
  .person-infobox{width:100%;max-width:none}
  .person-facts>div{grid-template-columns:88px minmax(0,1fr)}
  .person-portrait{max-height:520px;object-fit:cover;object-position:center 28%}
}
@media(max-width:480px){
  .person-facts>div{grid-template-columns:1fr;gap:3px}
}
@media(max-width:850px){.tool-title:is(section),.sim-head,.nr-head,.ip-head,.head-with-note{grid-template-columns:1fr!important;min-height:0;margin-top:-8px!important;gap:20px!important}}
.fourier-head:is(section){padding-top:6px!important}
.fourier-head h1{margin-bottom:8px!important}
.fourier-head p{color:var(--muted)!important;font-size:15px!important;line-height:1.7!important}
.fourier-head .term-link{font-weight:600;color:var(--accent-dark)}

/* Method choice: the selected calculation must remain obvious after focus changes. */
.method-tabs{gap:8px!important}
.method-tab{padding:10px 14px!important;border:1px solid transparent!important;border-radius:2px;background:#fff!important}
.method-tab:hover{border-color:#c4c6ca!important;background:#f2f2f3!important}
.method-tab.active{border-color:#b9bbbf!important;background:#ececee!important;color:#121316!important;box-shadow:inset 3px 0 0 #121316!important}

.nr-head.nr-head-flat{grid-template-columns:minmax(0,1fr)!important}
/* Reusable editorial page primitives */
.page-heading { /* legacy alias, kept for safety */
    margin: 0;
    font-family: var(--font-cjk);
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 500;
    line-height: 1.22;
    letter-spacing: .012em;
}
:lang(en) .page-heading { font-family: var(--font-display); }

.page-deck {
    max-width: 780px;
    color: var(--muted);
    font-size: 1.0625rem;
}

.table-scroll { overflow-x: auto; }
.empty-table { text-align: center; color: var(--muted); }

site-header, site-footer { display: block; }

/* Alphabetical theory index */
.az-index { margin-top: 30px; border-top: 1px solid var(--line); }
.az-group { display: grid; grid-template-columns: 54px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.az-group h2 { margin: 0; padding: 18px 0; color: var(--accent); font-family: var(--num); font-size: 16px; font-weight: 600; }
.az-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.az-links a { display: flex; justify-content: space-between; gap: 18px; padding: 18px 20px; border-left: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.az-links a:hover, .az-links a:focus-visible { color: var(--accent-dark); background: var(--accent-quiet); outline: 0; }
.az-links span { color: var(--accent); }

/* Tool directory rows — shared by zh and en, abbreviations included. */
.tools .tool-list { margin-top: 32px; border-top: 1px solid var(--line); }
.tools .tool { display: grid; grid-template-columns: 90px minmax(220px, .85fr) minmax(0, 1fr); gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.tools .tool small { font-family: var(--num); font-size: 11px; font-weight: 500; letter-spacing: .18em; color: var(--accent); align-self: baseline; }
.tools .tool b { color: var(--accent); font-size: 19px; font-weight: 600; }
.tools .tool span { color: var(--muted); font-size: 14px; line-height: 1.6; }
.tools .tool:hover b, .tools .tool:focus-visible b { color: var(--accent-dark); }
@media (max-width: 760px) {
  .az-links { grid-template-columns: 1fr; }
  .tools .tool { grid-template-columns: 1fr; gap: 4px; }
}

/* Twelve-tone matrix tool */
.twelve-tone-input{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px 18px;align-items:end;margin-top:28px;padding-bottom:26px;border-bottom:1px solid var(--line)}
.tone-picker{grid-column:1/-1;display:grid;grid-template-columns:repeat(12,minmax(48px,1fr));gap:6px;margin-top:4px}
.tone-picker button{display:grid;place-items:center;gap:2px;min-height:56px;padding:6px 2px;border:1px solid var(--line-dark);border-radius:4px;background:#f7f8f9;color:var(--ink);font:inherit;cursor:pointer;transition:background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease}
.tone-picker button:hover,.tone-picker button:focus-visible{border-color:var(--ink);background:#f0f1f2;color:var(--ink);outline:0;transform:translateY(-1px)}
.tone-picker button.active{border-color:#000;background:#121316;color:#fff;box-shadow:inset 0 -3px 0 rgba(0,0,0,.22),0 3px 9px rgba(18,19,22,.16);cursor:default}
.tone-picker button strong{font:600 14px var(--num)}
.tone-picker button span{font-size:10px;opacity:.72}
.twelve-tone-input .field input{min-height:46px;font-variant-numeric:tabular-nums}
.twelve-tone-input .input-actions{padding-bottom:1px}
.twelve-tone-input .error-message{grid-column:1/-1;margin:0;min-height:20px}
.twelve-tone-output{margin-top:30px}
.matrix-toolbar{display:flex;justify-content:space-between;align-items:center;gap:18px;padding-bottom:16px;border-bottom:1px solid var(--line-dark);color:var(--muted);font-size:13px}
.notation-switch{display:flex;flex-wrap:wrap;gap:0;border:1px solid var(--line-dark)}
.notation-switch button{min-height:36px;padding:0 14px;border:0;border-right:1px solid var(--line-dark);background:#f7f8f9;color:var(--muted);font:inherit;cursor:pointer;transition:background .16s ease,color .16s ease,box-shadow .16s ease}
.notation-switch button:last-child{border-right:0}
.notation-switch button:hover,.notation-switch button:focus-visible{background:#f0f1f2;color:var(--ink);outline:0}
.notation-switch button[aria-pressed="true"]{background:#121316;color:#fff;box-shadow:inset 0 -3px 0 rgba(0,0,0,.22)}
.matrix-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:30px;margin-top:28px}
.matrix-panel{min-width:0}
.matrix-panel h2{margin:0;font-family:var(--font-cjk);font-size:22px;font-weight:600}
.matrix-panel>p{min-height:42px;margin:8px 0 13px;color:var(--muted);font-family:var(--num);font-size:12px;line-height:1.55}
.matrix-scroll{max-width:100%;overflow-x:auto;padding-bottom:8px;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.tone-matrix{width:max-content;border-collapse:collapse;border-spacing:0;font-family:var(--num);font-size:12px;font-variant-numeric:tabular-nums;text-align:center}
.tone-matrix th,.tone-matrix td{box-sizing:border-box;width:34px;min-width:34px;height:34px;padding:0;border:1px solid var(--line)}
.tone-matrix .matrix-pitch{background:var(--paper);color:var(--ink)}
.tone-matrix .matrix-pitch:empty{background:color-mix(in srgb,var(--paper) 72%,var(--line) 28%)}
.tone-matrix .matrix-axis{border-color:transparent;color:var(--accent);font-size:10px;font-weight:600}
.tone-matrix tbody .matrix-axis:first-child{border-right-color:var(--line-dark)}
.tone-matrix tbody .matrix-axis:last-child{border-left-color:var(--line-dark)}
.tone-matrix thead .matrix-axis{border-bottom-color:var(--line-dark)}
.tone-matrix tfoot .matrix-axis{border-top-color:var(--line-dark)}
.tone-matrix tbody tr:hover .matrix-pitch{background:var(--accent-quiet)}
.tone-matrix.notation-notes{font-family:MusGlyphs,var(--sans);font-size:11px}
.tone-matrix.notation-notes th,.tone-matrix.notation-notes td{width:52px;min-width:52px}
.tone-matrix.notation-notes .matrix-axis{font-family:var(--sans);font-size:9px}
@media(max-width:1020px){.matrix-pair{grid-template-columns:1fr;gap:42px}}
@media(max-width:680px){
  .twelve-tone-input{grid-template-columns:1fr}.twelve-tone-input .input-actions{display:grid;grid-template-columns:1fr 1fr}.tone-picker{grid-template-columns:repeat(6,1fr)}.matrix-toolbar{align-items:flex-start;flex-direction:column}
  .notation-switch{width:100%;display:grid;grid-template-columns:repeat(3,1fr)}.notation-switch button{padding:0 7px;font-size:11px}
  .tone-matrix th,.tone-matrix td{width:32px;min-width:32px;height:32px}.matrix-panel>p{min-height:0}
}
.catalog-note{max-width:760px;margin:14px 0 18px;color:var(--muted,#666);font-size:.88rem;line-height:1.65}
.formula-math{display:block;margin:14px 0 2px;color:var(--ink);font-size:1.1rem;text-align:center;overflow-x:auto;line-height:2.4}.formula-math math{font-size:1.1rem}

/* Fourier spectrum and Quinn-style balance diagrams */
.fourier-spectrum{margin-top:34px}.fourier-spectrum .section-head,.fourier-balance-workbench .section-head{display:block}.fourier-spectrum .section-head h2,.fourier-balance-workbench h2{margin-bottom:6px}.fourier-spectrum .section-head p,.fourier-balance-workbench .section-head p{max-width:820px;margin:0;color:var(--muted);font-size:13px;line-height:1.65}
.fourier-table{min-width:780px;margin-top:16px;font-family:var(--num);font-size:12px;font-variant-numeric:tabular-nums}.fourier-table th,.fourier-table td{white-space:nowrap;text-align:right}.fourier-table th:first-child,.fourier-table td:first-child{text-align:left}.fourier-table button{min-width:42px;padding:5px 8px;border:1px solid var(--line-dark);background:var(--paper);color:var(--accent-dark);font:600 12px var(--num);cursor:pointer}.fourier-table button:disabled{border-color:transparent;color:var(--muted);cursor:default}.fourier-table tr.selected{background:var(--accent-quiet)}
.balanced-label{fill:var(--ink);font:700 13px var(--num);text-anchor:middle;dominant-baseline:middle}
.fourier-table .exact-cell{font-family:var(--font-mono);font-size:12px;white-space:nowrap;text-align:left;color:var(--ink);line-height:1.4}
.fourier-table .exact-bin{margin-bottom:3px}
.fourier-table .exact-mag{color:var(--accent-dark);font-weight:600}
.fourier-balance-workbench{margin-top:22px;padding-top:16px;border-top:1px solid var(--line)}.balance-selector{display:flex;flex-wrap:wrap;margin-top:18px;border:1px solid var(--line-dark);width:max-content}.balance-selector button{width:52px;height:38px;border:0;border-right:1px solid var(--line-dark);background:var(--paper);color:var(--ink);font:600 12px var(--num);cursor:pointer}.balance-selector button:last-child{border-right:0}.balance-selector button:hover,.balance-selector button:focus-visible{background:var(--accent-quiet);outline:0}.balance-selector button[aria-pressed="true"]{background:var(--accent-dark);color:#fff}.balance-graph{display:block;width:min(100%,520px);height:auto;margin:18px auto 0;overflow:visible}.balance-ring{fill:none;stroke:var(--line-dark);stroke-width:1.2}.balance-axis{stroke:var(--line);stroke-width:.8}.resultant-vector+defs marker path,#balanceArrow path{fill:var(--accent-dark)}.balance-origin{fill:var(--ink)}.balanced-mark{fill:none;stroke:#26865b;stroke-width:4}.balance-pan circle{fill:var(--paper);stroke:var(--line-dark);stroke-width:1.2}.balance-pan.weighted circle{fill:var(--accent-quiet);stroke:var(--accent-dark);stroke-width:2}.balance-pan text{fill:var(--muted);font:9px var(--num);text-anchor:middle;dominant-baseline:middle}.balance-pan.weighted text{fill:var(--accent-dark);font-weight:700}.balance-summary{max-width:720px;margin:8px 0 0;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:transparent}.balance-summary h3{margin:0 0 13px;font:600 18px var(--font-cjk);color:var(--ink)}.balance-summary dl{margin:0}.balance-summary dl>div{display:grid;grid-template-columns:150px 1fr;gap:18px;padding:9px 0;border-top:1px solid var(--line)}.balance-summary dl>div:first-child{border-top:0}.balance-summary dt{color:var(--muted);font-size:12px}.balance-summary dd{margin:0;color:var(--ink);font:500 13px var(--num)}.balance-summary p{margin:13px 0 0;padding-top:13px;border-top:1px solid var(--line);color:var(--soft-ink);font-size:13px;line-height:1.65}.plain-data-list{border-top:1px solid var(--line);margin-top:18px}.plain-data-list p{margin:0;padding:12px 0;border-bottom:1px solid var(--line)}
/* Hide raw LaTeX source until KaTeX renders it, preventing the FOUC flash. */
.math-block{visibility:hidden;margin:18px 0;padding:15px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);overflow-x:auto;color:var(--ink)}.math-loaded .math-block{visibility:visible}.math-block .katex-display{margin:0;padding:.1rem 0;font-size:1.12rem;text-align:center}.math-block .katex-display>.katex{white-space:normal}
.archive-notice{max-width:760px;margin-top:46px;padding:34px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.archive-notice h2{margin:4px 0 12px;font-size:25px}.archive-notice>p:last-child{margin:0;color:var(--muted);line-height:1.8}
@media(max-width:820px){.balance-selector{display:grid;grid-template-columns:repeat(7,1fr);width:100%}.balance-selector button{width:auto;border-bottom:0}.fourier-spectrum{margin-top:26px}}
@media(max-width:520px){.balance-selector{grid-template-columns:repeat(4,1fr)}.balance-selector button{border-bottom:1px solid var(--line-dark)}.balance-selector button:nth-child(4){border-right:0}.balance-graph{margin-top:8px}.balance-summary dl>div{grid-template-columns:110px 1fr}}
.balance-pan.reachable circle{fill:var(--paper);stroke:var(--line-dark)}.balance-pan.unreachable{opacity:.18}.balance-pan.unreachable circle{fill:var(--line);stroke:var(--muted)}.balance-pan.reachable text{fill:var(--ink);font-size:9.5px}.balance-pan.weighted circle{fill:var(--accent-quiet);stroke:var(--accent-dark);stroke-width:2}.balance-pan.weighted text{fill:var(--accent-dark);font-weight:700}
.unit-segment-chain{stroke:#2a2a2a;stroke-width:1.5;stroke-linecap:round;stroke-dasharray:1000;stroke-dashoffset:1000;opacity:0;animation:seg-chain-draw .45s calc(var(--seg-index)*120ms) ease forwards,seg-chain-in .35s calc(var(--seg-index)*120ms) ease forwards}.unit-head-chain{fill:#2a2a2a;opacity:0;animation:seg-head-in .35s calc(var(--seg-index)*120ms + .28s) ease forwards}.resultant-vector{stroke:url(#resultantGradient);stroke-width:3.4;stroke-linecap:round;filter:url(#resultantGlow);opacity:0;animation:res-show .5s var(--res-delay,.6s) ease forwards}@keyframes seg-chain-draw{to{stroke-dashoffset:0}}@keyframes seg-chain-in{to{opacity:1}}@keyframes seg-head-in{to{opacity:1}}@keyframes res-show{to{opacity:1}}@media(prefers-reduced-motion:reduce){.unit-segment-chain,.unit-head-chain,.resultant-vector{animation:none;stroke-dashoffset:0;opacity:1}}
/* Result relation output box (input-like, less AI-card feel) */
.results{gap:20px!important}
.result-card{min-height:0!important;padding:20px!important;border:1px solid var(--line-dark)!important;border-radius:3px!important;background:var(--paper)!important}
.relation{display:block;margin:16px 0 12px;padding:10px 14px;border:1px solid var(--line-dark);border-radius:3px;background:#f7f8f9;color:var(--ink);font:500 15px var(--sans);line-height:1.45}
.result-card.interval .relation{border-color:var(--line-dark);background:#f7f8f9}
.result-plain{margin-top:14px}.result-plain .data-table{margin-top:16px}.empty-hint{color:var(--muted);font-size:.9rem;margin:14px 0 0}
