/* e01.org visual layer — Apple-like document surface.
   Tokens: 8/14/22 radii, 240ms eased transitions, 44px controls, two-layer shadows.
   Loaded after each host stylesheet and the shared artifact CSS. */

:root {
  --e-bg: #ffffff;
  --e-bg2: #f5f5f7;
  --e-surface: #ffffff;
  --e-fg: #1d1d1f;
  --e-mut: #6e6e73;
  --e-line: rgba(29, 29, 31, .13);
  --e-line-soft: rgba(29, 29, 31, .07);
  --e-acc: var(--acc, #0066cc);
  --e-acc-soft: color-mix(in srgb, var(--e-acc) 11%, transparent);
  --e-ok: #1f7a3d;
  --e-warn: #946200;
  --e-bad: #b42318;
  --e-r1: 8px;
  --e-r2: 14px;
  --e-r3: 22px;
  --e-dur: 240ms;
  --e-ease: cubic-bezier(.32, .72, 0, 1);
  --e-shadow1: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 18px rgba(15, 23, 42, .07);
  --e-shadow2: 0 2px 6px rgba(15, 23, 42, .08), 0 20px 46px rgba(15, 23, 42, .14);
  --e-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --e-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --e-wrap: 1120px;
  --e-read-scale: 1;
}

@media (prefers-color-scheme: dark) {
  :root {
    --e-bg: #0b0f14;
    --e-bg2: #121820;
    --e-surface: #121820;
    --e-fg: #e6ebf0;
    --e-mut: #93a1ad;
    --e-line: rgba(230, 235, 240, .14);
    --e-line-soft: rgba(230, 235, 240, .08);
    --e-shadow1: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 20px rgba(0, 0, 0, .28);
    --e-shadow2: 0 3px 8px rgba(0, 0, 0, .42), 0 22px 50px rgba(0, 0, 0, .48);
  }
}
html[data-theme="light"] {
  --e-bg: #ffffff; --e-bg2: #f5f5f7; --e-surface: #ffffff;
  --e-fg: #1d1d1f; --e-mut: #6e6e73;
  --e-line: rgba(29, 29, 31, .13); --e-line-soft: rgba(29, 29, 31, .07);
  --e-shadow1: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 18px rgba(15, 23, 42, .07);
  --e-shadow2: 0 2px 6px rgba(15, 23, 42, .08), 0 20px 46px rgba(15, 23, 42, .14);
}
html[data-theme="dark"] {
  --e-bg: #0b0f14; --e-bg2: #121820; --e-surface: #121820;
  --e-fg: #e6ebf0; --e-mut: #93a1ad;
  --e-line: rgba(230, 235, 240, .14); --e-line-soft: rgba(230, 235, 240, .08);
  --e-shadow1: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 20px rgba(0, 0, 0, .28);
  --e-shadow2: 0 3px 8px rgba(0, 0, 0, .42), 0 22px 50px rgba(0, 0, 0, .48);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
html body {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  background: var(--e-bg) !important;
  color: var(--e-fg) !important;
  font: 17px/1.6 var(--e-font) !important;
  overflow-x: hidden;
  overflow-wrap: anywhere;
}
img, svg, video, canvas, iframe { max-width: 100%; }
main, .e-main, .e-wrap, .artifact, .artifact-layout, .artifact-layout > * { min-width: 0; }
a { color: var(--e-acc); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--e-acc); outline-offset: 3px; }

a, button, .e-card, .card, summary, input, select {
  transition: background-color var(--e-dur) var(--e-ease),
              color var(--e-dur) var(--e-ease),
              border-color var(--e-dur) var(--e-ease),
              box-shadow var(--e-dur) var(--e-ease),
              transform var(--e-dur) var(--e-ease);
}

.e-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.e-ico { width: 22px; height: 22px; flex: 0 0 auto; stroke: currentColor; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ── chrome ─────────────────────────────────────────────────────────── */
.e-header {
  display: block !important;
  position: sticky !important;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--e-bg) 80%, transparent) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--e-line);
}
html[data-theme="dark"] .e-header {
  background: color-mix(in srgb, #0b0f14 82%, transparent) !important;
}
.e-headrow {
  display: flex;
  align-items: center;
  gap: 12px 18px;
  min-height: 64px;
  padding: 6px clamp(14px, 3vw, 26px);
}
.e-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--e-fg);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -.015em;
  text-decoration: none;
  flex: 0 0 auto;
}
.e-brand:hover { text-decoration: none; }
.e-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--e-acc);
  color: #fff;
  box-shadow: var(--e-shadow1);
}
.e-brand-mark .e-ico { width: 19px; height: 19px; stroke-width: 2; }
.e-brand-estate { color: var(--e-mut); font-weight: 500; }
.e-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.e-nav::-webkit-scrollbar { display: none; }
.e-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--e-mut);
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.e-nav a:hover { color: var(--e-fg); background: var(--e-bg2); text-decoration: none; }
.e-nav a[aria-current="page"] { color: var(--e-fg); background: var(--e-surface); box-shadow: var(--e-shadow1); }
.e-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
  flex: 1 1 280px;
  max-width: 430px;
}
.e-search .e-searchbox {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
}
.e-search .e-searchbox .e-ico {
  position: absolute;
  left: 13px;
  width: 18px; height: 18px;
  color: var(--e-mut);
  pointer-events: none;
}
.e-search input[type="search"],
.e-search input[type="text"] {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 14px 9px 39px;
  border: 1px solid var(--e-line);
  border-radius: 999px;
  background: var(--e-bg2);
  color: var(--e-fg);
  font-size: .92rem;
  appearance: none;
}
.e-search input:focus { outline: none; border-color: var(--e-acc); box-shadow: 0 0 0 4px var(--e-acc-soft); }
.e-btn, .e-search button, button.e-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--e-line);
  border-radius: 999px;
  background: var(--e-bg2);
  color: var(--e-fg);
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.e-btn:hover, .e-search button:hover { filter: brightness(.97); text-decoration: none; }
.e-btn:active { transform: scale(.985); }
.e-btn-primary { background: var(--e-acc); border-color: var(--e-acc); color: #fff; }
.e-btn-primary:hover { filter: brightness(1.04); }

.e-main { width: min(100%, var(--e-wrap)); margin: 0 auto; padding: 30px clamp(14px, 3vw, 26px) 72px; }

/* ── hero ───────────────────────────────────────────────────────────── */
.e-hero { padding: 16px 0 8px; }
.e-kicker {
  margin: 0 0 9px;
  color: var(--e-mut);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.e-hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5.2vw, 3.45rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.e-lede {
  max-width: 68ch;
  margin: 14px 0 0;
  color: var(--e-mut);
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.5;
  text-wrap: pretty;
}
.e-hero .e-search {
  max-width: 620px;
  margin: 22px 0 0;
  flex-wrap: wrap;
}
.e-hero .e-search .e-searchbox { flex: 1 1 260px; }
.e-hero .e-search button { flex: 0 0 auto; }

.e-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0 0;
}
.e-stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-height: 126px;
  min-width: 0;
  padding: 18px 19px;
  border: 1px solid var(--e-line);
  border-radius: var(--e-r3);
  background: var(--e-surface);
  box-shadow: var(--e-shadow1);
}
.e-stat-label {
  color: var(--e-mut);
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.e-stat-value {
  font-size: clamp(1.28rem, 2.7vw, 2.15rem);
  font-weight: 680;
  line-height: 1.02;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.e-stat-note { color: var(--e-mut); font-size: .78rem; line-height: 1.4; }

/* ── sections + cards ───────────────────────────────────────────────── */
.e-sec { margin: 44px 0 0; min-width: 0; }
.e-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.e-sec-head h2, .e-sec > h2 {
  margin: 0;
  font-size: clamp(1.28rem, 2vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: -.022em;
}
.e-sec-head p { margin: 0; color: var(--e-mut); font-size: .88rem; }
.e-sec-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--e-acc);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}
.e-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 13px;
}
.e-grid.e-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.e-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  min-height: 0;
  padding: 19px;
  border: 1px solid var(--e-line);
  border-radius: var(--e-r2);
  background: var(--e-surface);
  box-shadow: var(--e-shadow1);
  color: inherit;
  text-decoration: none;
}
a.e-card:hover, .e-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--e-shadow2);
  border-color: color-mix(in srgb, var(--e-acc) 42%, var(--e-line));
  text-decoration: none;
}
a.e-card:active { transform: translateY(-1px) scale(.996); }
.e-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.e-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  flex: 0 0 auto;
  border-radius: var(--e-r2);
  background: var(--e-acc-soft);
  color: var(--e-acc);
}
.e-card h3, .e-card h2 { margin: 0; font-size: 1.06rem; line-height: 1.28; letter-spacing: -.014em; }
.e-card p { margin: 0; color: var(--e-mut); font-size: .9rem; line-height: 1.48; }
.e-card .e-card-count { margin-left: auto; color: var(--e-mut); font-size: .78rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.e-card .e-card-arrow { color: var(--e-mut); font-size: 1rem; transition: transform var(--e-dur) var(--e-ease); }
.e-card:hover .e-card-arrow { transform: translateX(3px); color: var(--e-acc); }
.e-clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.e-clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.e-result-list { display: grid; gap: 12px; }
.e-result {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px 19px;
  border: 1px solid var(--e-line);
  border-radius: var(--e-r2);
  background: var(--e-surface);
  box-shadow: var(--e-shadow1);
  min-width: 0;
}
.e-result:hover { transform: translateY(-2px); box-shadow: var(--e-shadow2); }
.e-result h3, .e-result h2 { margin: 0; font-size: 1.06rem; line-height: 1.3; letter-spacing: -.012em; }
.e-result p { margin: 0; color: var(--e-mut); font-size: .9rem; line-height: 1.5; }
.e-result .e-result-title { color: var(--e-fg); font-weight: 650; }
.e-result .e-result-title:hover { color: var(--e-acc); text-decoration: none; }

.e-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.e-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  max-width: 100%;
  padding: 3px 10px;
  border: 1px solid var(--e-line);
  border-radius: 999px;
  background: var(--e-bg2);
  color: var(--e-mut);
  font-size: .76rem;
  font-weight: 600;
  line-height: 1.3;
}
.e-chip b { color: var(--e-fg); font-weight: 650; }
.e-chip-acc { background: var(--e-acc-soft); border-color: color-mix(in srgb, var(--e-acc) 28%, var(--e-line)); color: var(--e-acc); }
.e-chip-ok { color: var(--e-ok); border-color: color-mix(in srgb, var(--e-ok) 30%, var(--e-line)); background: color-mix(in srgb, var(--e-ok) 9%, transparent); }
.e-chip .e-ico { width: 14px; height: 14px; }
.e-small { color: var(--e-mut); font-size: .84rem; }
.e-rule { border: 0; border-top: 1px solid var(--e-line); margin: 32px 0; }

.e-crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  color: var(--e-mut);
  font-size: .84rem;
}
.e-crumbs li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.e-crumbs li + li::before { content: "/"; color: var(--e-line); }
.e-crumbs a { color: var(--e-mut); text-decoration: none; }
.e-crumbs a:hover { color: var(--e-acc); text-decoration: underline; }
.e-crumbs [aria-current="page"] { color: var(--e-fg); }

/* ── artifact surface ───────────────────────────────────────────────── */
.artifact {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  --art-bg: var(--e-bg);
  --art-fg: var(--e-fg);
  --art-mut: var(--e-mut);
  --art-card: var(--e-surface);
  --art-line: var(--e-line);
  --art-acc: var(--e-acc);
  --art-serif: var(--e-font);
  --art-sans: var(--e-font);
  --art-mono: var(--e-mono);
  max-width: var(--e-wrap);
  padding: 0 0 2.6rem;
  color: var(--e-fg);
}
.artifact-head { display: block !important; position: static !important; top: auto !important; max-width: 100%; margin: 0 0 1.25rem; padding: 0; background: none !important; border: 0 !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.artifact-eyebrow {
  margin: 0 0 10px;
  color: var(--e-mut);
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.artifact h1 {
  margin: 0 0 8px;
  max-width: 30ch;
  font-family: var(--e-font);
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.034em;
}
.artifact-sub { max-width: 68ch; margin: 0 0 12px; color: var(--e-mut); font-size: clamp(.98rem, 1.4vw, 1.1rem); line-height: 1.5; }
.artifact-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.artifact-meta-i {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid var(--e-line);
  border-radius: 999px;
  background: var(--e-bg2);
  font-size: .78rem;
  line-height: 1.35;
}
.artifact-meta-k { color: var(--e-mut); text-transform: uppercase; letter-spacing: .05em; font-size: .66rem; }
.artifact-meta-v { overflow-wrap: anywhere; }
.artifact-layout {
  grid-template-columns: minmax(0, 68ch) minmax(16rem, 21rem);
  gap: clamp(1.3rem, 3vw, 3rem);
  padding: 0;
  justify-content: space-between;
}
.artifact-body-col { min-width: 0; }
.artifact-body {
  font-size: calc(1.04rem * var(--e-read-scale));
  line-height: 1.7;
  color: var(--e-fg);
  overflow-wrap: break-word;
  counter-reset: e-sense;
}
.artifact-body p { margin: 0 0 1.05em; }
.artifact-body h2 { margin: 2em 0 .6em; padding-top: .55em; border-top: 1px solid var(--e-line); font-size: clamp(1.18rem, 2vw, 1.4rem); }
.artifact-body h3 { margin: 1.55em 0 .45em; font-size: 1.06rem; }
.artifact-body a { color: var(--e-acc); }
.artifact-body blockquote { border-left: 3px solid var(--e-acc); padding: .35em 0 .35em 1em; }
.artifact-body .artifact-tablewrap { border: 1px solid var(--e-line); border-radius: var(--e-r2); }
.artifact-body table { font-size: .88rem; }
.artifact-body th, .artifact-body td { padding: .55rem .7rem; }
.artifact-body > p:first-of-type::first-letter,
.artifact-body > .prose > p:first-of-type::first-letter { float: none; font-size: inherit; margin: 0; font-weight: inherit; line-height: inherit; }
.artifact-empty { color: var(--e-mut); font-size: .95rem; }

.artifact-rail {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow: auto;
  padding-bottom: .5rem;
  gap: 11px;
}
.artifact-rail-card {
  padding: 16px 17px;
  border: 1px solid var(--e-line);
  border-radius: var(--e-r2);
  background: var(--e-surface);
  box-shadow: var(--e-shadow1);
}
.artifact-rail-card h2 {
  margin: 0 0 .6rem;
  color: var(--e-mut);
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.artifact-fact { grid-template-columns: minmax(4.8rem, 40%) minmax(0, 1fr); padding: .42rem 0; }
.artifact-fact dt { font-size: .75rem; }
.artifact-fact dd { font-size: .84rem; }
.artifact-export { min-height: 44px; padding: 7px 11px; border-radius: 999px; }
.artifact-export:hover { transform: translateY(-2px); }
.artifact-rail-card .cite, .artifact-rail-card pre { border-radius: var(--e-r1); }
.artifact-foot { max-width: 100%; padding: 1.2rem 0 0; border-top: 1px solid var(--e-line); }

/* ── reading toolbar (injected by e01.js) ───────────────────────────── */
.e-readbar {
  position: sticky;
  top: 74px;
  z-index: 30;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  margin: 0 0 16px;
  padding: 5px;
  border: 1px solid var(--e-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--e-bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: var(--e-shadow1);
}
.e-readbar-label {
  padding: 0 8px 0 10px;
  color: var(--e-mut);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.e-readbar button {
  display: inline-flex;
  white-space: nowrap;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--e-fg);
  font-size: .88rem;
  font-weight: 650;
  cursor: pointer;
}
.e-readbar button:hover { background: var(--e-bg2); }
.e-readbar button[aria-pressed="true"] { background: var(--e-surface); box-shadow: var(--e-shadow1); color: var(--e-acc); }

/* ── dictionary senses ──────────────────────────────────────────────── */
.e-pron {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 4px;
  color: var(--e-mut);
  font-size: .9rem;
}
.e-pron b { color: var(--e-fg); font-family: var(--e-mono); font-weight: 600; letter-spacing: .01em; }
.e-speak {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--e-line);
  border-radius: 999px;
  background: var(--e-bg2);
  color: var(--e-fg);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
}
.e-speak .e-ico { width: 15px; height: 15px; }
.e-sense { margin: 0 0 10px; padding: 0 0 16px; border-bottom: 1px solid var(--e-line-soft); }
.e-sense:last-child { border-bottom: 0; padding-bottom: 0; }
.e-sense-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 24px 0 8px; }
.e-sense-pos {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--e-acc-soft);
  color: var(--e-acc);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.e-sense-count { color: var(--e-mut); font-size: .8rem; font-variant-numeric: tabular-nums; }
.e-senses { margin: 0; padding: 0; list-style: none; counter-reset: none; }
.e-senses > li {
  position: relative;
  counter-increment: e-sense;
  margin: 11px 0;
  padding-left: 2.6rem;
  min-width: 0;
}
.e-senses > li::before {
  content: counter(e-sense);
  position: absolute;
  left: 0;
  top: .06em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--e-line);
  border-radius: 50%;
  background: var(--e-bg2);
  color: var(--e-mut);
  font-size: .74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.e-senses > li > p { margin: 0; }
.e-quote {
  margin: 9px 0 0;
  padding: 7px 0 7px 14px;
  border-left: 2px solid var(--e-line);
  color: var(--e-mut);
  font-size: .94em;
  font-style: italic;
}
.e-quote::before { content: "\201C"; }
.e-quote::after { content: "\201D"; }

/* ── wikidata statements + labels ───────────────────────────────────── */
.e-stmt-groups { display: grid; gap: 11px; margin: 0 0 8px; }
.e-stmt-group {
  padding: 14px 15px;
  border: 1px solid var(--e-line);
  border-radius: var(--e-r2);
  background: var(--e-bg2);
  min-width: 0;
}
.e-stmt-group h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
  font-size: .98rem;
  line-height: 1.3;
}
.e-stmt-pid {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--e-surface);
  border: 1px solid var(--e-line);
  color: var(--e-mut);
  font-family: var(--e-mono);
  font-size: .72rem;
  font-weight: 600;
}
.e-stmt-n { color: var(--e-mut); font-size: .76rem; font-weight: 500; }
.e-stmt-values { margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.e-stmt-values li {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  padding: 6px 0;
  border-top: 1px solid var(--e-line-soft);
  font-size: .93rem;
}
.e-stmt-values li:first-child { border-top: 0; padding-top: 0; }
.e-stmt-values a { font-weight: 600; }
.e-rank { color: var(--e-mut); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.e-langs { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.e-langs li {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid var(--e-line);
  border-radius: 999px;
  background: var(--e-bg2);
  font-size: .8rem;
}
.e-langs b { color: var(--e-mut); font-family: var(--e-mono); font-size: .72rem; font-weight: 600; text-transform: lowercase; }

/* ── pubmed structured abstract ─────────────────────────────────────── */
.e-abstract { display: grid; gap: 10px; }
.e-abs-sec {
  padding: 14px 16px;
  border: 1px solid var(--e-line);
  border-radius: var(--e-r2);
  background: var(--e-bg2);
}
.e-abs-sec h3 {
  margin: 0 0 6px;
  color: var(--e-acc);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.e-abs-sec p { margin: 0; }
.e-abs-sec p + p { margin-top: .6em; }

/* ── research chips ─────────────────────────────────────────────────── */
.e-work-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.e-work-chips .e-chip { min-height: 30px; }

/* ── mdn document sidebar ───────────────────────────────────────────── */
.e-doc-layout .artifact-rail { position: sticky; top: 84px; }
.artifact-rail-card .toc, .artifact-rail-card ul { margin: 0; padding-left: 1rem; }
.artifact-rail-card .toc ul, .artifact-rail-card nav ul { padding-left: .85rem; }
.artifact-rail-card .toc a, .artifact-rail-card nav a {
  display: block;
  padding: 4px 0;
  color: var(--e-mut);
  font-size: .82rem;
  line-height: 1.4;
  text-decoration: none;
}
.artifact-rail-card .toc a:hover, .artifact-rail-card nav a:hover { color: var(--e-acc); }
.artifact-rail-card .toc li, .artifact-rail-card nav li { margin: 1px 0; }

/* ── tables + notices retained ──────────────────────────────────────── */
.card {
  min-width: 0;
  padding: 18px 19px;
  border: 1px solid var(--e-line);
  border-radius: var(--e-r2);
  background: var(--e-surface);
  box-shadow: var(--e-shadow1);
  margin: 0 0 13px;
}
.card h1 { margin-top: 0; }
.mut { color: var(--e-mut); }
.small { font-size: .84rem; }
.table-wrap, .artifact-tablewrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--e-line-soft); }
th { color: var(--e-mut); font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
tbody tr:hover { background: color-mix(in srgb, var(--e-acc) 5%, transparent); }
.stale-banner { border: 1px solid color-mix(in srgb, var(--e-bad) 45%, var(--e-line)); border-radius: var(--e-r2); background: color-mix(in srgb, var(--e-bad) 7%, transparent); color: var(--e-bad); padding: 10px 13px; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 9999; background: #111; color: #fff; padding: .6rem 1rem; border-radius: 0 0 10px 0; }
.skip-link:focus { left: .5rem; top: .5rem; }

footer {
  max-width: var(--e-wrap);
  margin: 0 auto;
  padding: 22px clamp(14px, 3vw, 26px);
  color: var(--e-mut);
  font-size: .82rem;
  border-top: 1px solid var(--e-line);
}
footer a { color: inherit; }
footer p { margin: .35rem 0; }

/* ── responsive: 390 / 320 never scroll sideways ────────────────────── */
@media (max-width: 920px) {
  .artifact-layout { grid-template-columns: minmax(0, 1fr); }
  .artifact-rail { position: static; max-height: none; overflow: visible; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
  .artifact-facts-card { grid-column: 1 / -1; }
  .e-doc-layout .artifact-rail { position: static; }
}
@media (max-width: 760px) {
  .e-headrow { flex-wrap: wrap; gap: 4px 12px; padding-top: 8px; padding-bottom: 8px; }
  .e-nav { order: 3; width: 100%; }
  .e-search { order: 2; flex: 1 1 100%; max-width: none; margin-left: 0; }
  .e-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .e-stat { min-height: 116px; padding: 15px 16px; }
  .e-sec { margin-top: 34px; }
  .e-readbar { top: 122px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .e-main { padding-top: 22px; padding-bottom: 56px; }
  .artifact { padding-top: 0; }
  .artifact h1 { max-width: none; }
  .artifact-body { font-size: calc(1rem * var(--e-read-scale)); }
  .e-hero h1 { font-size: clamp(1.9rem, 8.4vw, 2.5rem); }
  .e-hero .e-search button { width: 100%; }
  .e-search button { width: 100%; }
  .artifact-meta { gap: 4px; }
  .artifact-meta-i { font-size: .74rem; }
  .e-card { padding: 16px; }
  .e-result { padding: 15px 16px; }
  .e-readbar { top: 132px; }
}
@media (max-width: 420px) {
  .e-main { padding-left: 14px; padding-right: 14px; }
  .e-headrow { padding-left: 14px; padding-right: 14px; }
  .e-stat-value { font-size: clamp(1.15rem, 4.8vw, 1.5rem); }
  .e-nav a { padding: 0 10px; font-size: .84rem; }
  .e-brand { font-size: .96rem; }
  .e-brand-estate { display: none; }
  .e-readbar { width: 100%; border-radius: var(--e-r2); top: 126px; }
  .e-readbar-label { width: 100%; padding: 4px 8px 0; }
  .e-readbar button { flex: 0 0 auto; }
}
@media (max-width: 340px) {
  .e-stats { grid-template-columns: 1fr; }
  .e-stat { min-height: 0; }
  .e-card, .e-result { padding: 14px; }
  .artifact h1 { font-size: clamp(1.5rem, 8vw, 1.9rem); }
  .e-senses > li { padding-left: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
  .e-card:hover, .e-result:hover, .artifact-export:hover { transform: none; }
}
@media print {
  .e-header, .e-readbar, .e-nav, .artifact-rail, footer { display: none !important; }
  .e-main, .artifact { max-width: none; padding: 0; }
  .artifact-layout { display: block; }
  .artifact-body { max-width: none; font-size: 11.5pt; }
}

/* Subtitle rows: pronunciation and header chips sit inside .artifact-sub. */
.artifact-sub .e-pron { display: flex; margin: 0 0 8px; }
.artifact-sub .e-chips { display: flex; margin: 0 0 9px; }
a.e-result { color: inherit; text-decoration: none; }
a.e-result:hover { text-decoration: none; }
.e-result .e-chips { margin: 2px 0 0; }
.e-result p { margin: 0; }

/* app.js marks the host header as legacy chrome once the estate header is
   cloned. Respect that even though this layer sets its own header display. */
.e-header.gov-legacy-chrome { display: none !important; }
