:root {
  --ink: #262626;          /* textgray */
  --muted: #8a94a0;        /* mutegray */
  --paper: #f7f6f4;
  --panel: #ffffff;
  --line: #d9d5cf;
  --accent: #bf5700;       /* UT orange — sole accent */
  --perf: #2f6fa8;         /* performer twin */
  --inst: #3f9d6b;         /* instrument twin */
  --portc: #c25e00;        /* touch port */
  --datac: #9a6db0;        /* observations / corpus */
  --sans: "Source Sans Pro", "Source Sans 3", "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { background: #e8e5e0; color: var(--ink); font-family: var(--sans); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

.gate-banner {
  padding: 8px 20px; text-align: center; font-size: 0.85rem; font-weight: 600;
  color: #fff; background: var(--datac);
}
.m1-nav {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 8px; min-height: 50px;
  padding: 8px max(24px, calc((100% - 1180px) / 2));
  color: #fff; background: #23303a; border-bottom: 3px solid var(--accent);
}
.m1-nav .brand { font-weight: 750; text-decoration: none; }
.m1-nav .links { display: flex; flex-wrap: wrap; gap: 6px; }
.m1-nav a, .m1-nav button {
  font: inherit; font-size: 0.85rem; min-height: 30px; padding: 5px 10px; color: #fff;
  background: transparent; border: 1px solid rgba(255,255,255,0.35); border-radius: 4px;
  cursor: pointer; text-decoration: none;
}
main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 80px; }

.m1-header { padding: 26px 0 8px; }
.eyebrow { margin: 0 0 6px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); }
.m1-header h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 3.6vw, 2.35rem); font-variant: small-caps; line-height: 1.15; }
.subtitle { margin: 0 0 12px; font-style: italic; color: var(--accent); max-width: 62rem; }
.authors { margin: 0 0 4px; font-size: 1.02rem; }
.affil { margin: 0 0 18px; font-size: 0.85rem; color: var(--muted); }
.header-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; margin: 14px 0 6px; }
.header-facts div { padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.header-facts strong { display: block; font-size: 1.35rem; }
.header-facts span { font-size: 0.8rem; color: var(--muted); }

section { margin-top: 44px; }
.section-label { margin: 0 0 4px; font-size: 0.78rem; font-weight: 750; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); }
section > h2 { margin: 0 0 12px; font-size: 1.45rem; }
section > p, .panel p { line-height: 1.55; max-width: 72rem; }
section > h3 { margin: 30px 0 8px; font-size: 1.06rem; font-weight: 700; color: var(--ink);
  padding-bottom: 4px; border-bottom: 1px solid var(--line); max-width: 72rem; }

.abstract { padding: 18px 20px; background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: 6px; }
.abstract p { margin: 0; line-height: 1.6; }

.eq-block { margin: 14px 0; padding: 12px 16px; overflow-x: auto; background: var(--panel);
  border: 1px solid var(--line); border-radius: 6px; }
.eq-tag { float: right; color: var(--muted); font-size: 0.85rem; }

.c-perf { color: var(--perf); font-weight: 650; }
.c-inst { color: var(--inst); font-weight: 650; }
.c-port { color: var(--portc); font-weight: 650; }
.c-data { color: var(--datac); font-weight: 650; }

figure { margin: 20px 0; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
figure figcaption { margin-top: 10px; font-size: 0.88rem; line-height: 1.5; color: var(--ink); }
figure figcaption .figno { font-weight: 750; color: var(--accent); }
.fig-scroll { overflow-x: auto; }
.fig-gated { border-left: 4px solid var(--datac); }
.gated-chip { display: inline-block; margin-left: 6px; padding: 1px 8px; font-size: 0.72rem;
  font-weight: 700; color: #fff; background: var(--datac); border-radius: 10px; vertical-align: middle; }

.m1-table { width: 100%; margin: 14px 0; border-collapse: collapse; font-size: 0.9rem; background: var(--panel); }
.m1-table th, .m1-table td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.45; }
.m1-table th { background: #efece7; font-size: 0.82rem; letter-spacing: 0.02em; }
.m1-table .own { font-weight: 750; }
.table-scroll { overflow-x: auto; }

.prop { margin: 18px 0; padding: 14px 18px; background: var(--panel);
  border: 1px solid var(--line); border-left: 4px solid var(--perf); border-radius: 6px; }
.prop strong.kind { color: var(--perf); }

.tests { display: grid; gap: 10px; margin-top: 14px; }
.test { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.test > button {
  display: flex; width: 100%; gap: 12px; align-items: baseline; padding: 12px 16px;
  font: inherit; text-align: left; background: none; border: 0; cursor: pointer;
}
.test .tid { flex: 0 0 2.2rem; font-weight: 800; color: var(--accent); }
.test .tname { font-weight: 700; }
.test .tsum { color: var(--muted); font-size: 0.88rem; margin-left: auto; padding-left: 12px; }
.test .body { display: none; padding: 0 16px 14px 16px; border-top: 1px dashed var(--line); }
.test.open .body { display: block; }
.test .body dl { display: grid; grid-template-columns: 10.5rem 1fr; gap: 6px 14px; margin: 10px 0 0; font-size: 0.9rem; }
.test .body dt { font-weight: 700; color: var(--muted); }
.test .body dd { margin: 0; line-height: 1.5; }

.steps { counter-reset: step; margin: 14px 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.steps li { position: relative; padding: 10px 14px 10px 46px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 6px; line-height: 1.5; }
.steps li::before { counter-increment: step; content: counter(step);
  position: absolute; left: 12px; top: 10px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 750; font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center; }

.slot { margin: 16px 0; padding: 18px; border: 2px dashed var(--accent); border-radius: 6px; background: #fdf7f1; }
.slot .slot-title { font-weight: 750; color: var(--accent); }
.slot p { margin: 6px 0 0; font-size: 0.9rem; }

.refs ol { padding-left: 1.4rem; }
.refs li { margin: 7px 0; font-size: 0.9rem; line-height: 1.5; }
.rel { font-size: 0.72rem; font-weight: 750; color: #fff; border-radius: 3px; padding: 1px 5px; margin-left: 4px; }
.rel.A { background: var(--inst); } .rel.B { background: var(--muted); }
.rel.C { background: var(--datac); } .rel.D { background: var(--perf); }

.verif { font-size: 0.88rem; }
.verif li { margin: 5px 0; line-height: 1.5; }
code { font-family: var(--mono); font-size: 0.85em; background: #efece7; padding: 1px 5px; border-radius: 3px; }
footer { margin-top: 60px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--muted); }
@media (max-width: 720px) {
  /* long inline formulae cannot wrap; let them scroll rather than push the page */
  span[data-katex]:not([data-display]) { display: inline-block; max-width: 100%;
    overflow-x: auto; vertical-align: bottom; }
  .test .tsum { display: none; }
  .test .body dl { grid-template-columns: 1fr; }
}
@media print {
  .m1-nav, .gate-banner { display: none; }
  .test .body { display: block; }
}

.assume-lead { padding: 14px 18px; margin: 10px 0 4px; background: #fdf3ea;
  border: 1px solid var(--accent); border-left: 6px solid var(--accent); border-radius: 6px; }
.assume-lead p { margin: 0; }
.assume-table td:first-child { color: var(--accent); }

.pubvid { width:100%; max-width:900px; margin-top:12px; border:1px solid var(--line);
  border-radius:6px; background:#111; display:block; }
