/* Materials & the Environment — Distill-style article system.
   Layout concept: Distill's article grid (body column, page/screen outsets, margin gutter)
   set on a cool "lab notebook" paper with a verdigris accent and an ochre guideline colour. */
:root {
  --paper: #f9faf7;
  --paper-2: #f0f3ef;
  --ink: #1a211f;
  --ink-2: #47524e;
  --muted: #6f7a76;
  --rule: #d9dfda;
  --accent: #2c7665;        /* verdigris: links, active controls */
  --accent-ink: #1d5649;
  --accent-wash: #e2eee9;
  --hi: #b05f1c;            /* ochre: guidelines, optima, highlights */
  --hi-wash: #f6e9dc;
  --bad: #b3362f;
  --good: #2f7d32;
  --shadow: 0 1px 2px rgba(20,30,25,.06), 0 6px 24px rgba(20,30,25,.06);

  /* categorical series (validated reference palette, fixed order) */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Literata", Georgia, "Times New Roman", serif;
  --f-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --step--1: 0.82rem; --step-0: 1.0625rem; --step-1: 1.3rem; --step-2: 1.7rem; --step-3: 2.4rem; --step-4: 3.3rem;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121715; --paper-2: #1a201e; --ink: #e8ece9; --ink-2: #bcc6c1; --muted: #8e9994;
    --rule: #2c3532; --accent: #5fb8a2; --accent-ink: #8ad0bd; --accent-wash: #1d2f2a;
    --hi: #e09a55; --hi-wash: #33261a; --bad: #ec7a72; --good: #6cc070;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 24px rgba(0,0,0,.3);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --s5: #d55181; --s6: #2f9a2f; --s7: #9085e9; --s8: #e66767;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121715; --paper-2: #1a201e; --ink: #e8ece9; --ink-2: #bcc6c1; --muted: #8e9994;
  --rule: #2c3532; --accent: #5fb8a2; --accent-ink: #8ad0bd; --accent-wash: #1d2f2a;
  --hi: #e09a55; --hi-wash: #33261a; --bad: #ec7a72; --good: #6cc070;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 24px rgba(0,0,0,.3);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #2f9a2f; --s7: #9085e9; --s8: #e66767;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: var(--step-0); line-height: 1.68;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  overflow-x: hidden;
}
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
img, svg, canvas { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--f-display); text-wrap: balance; color: var(--ink); line-height: 1.15; }
code, kbd { font-family: var(--f-mono); font-size: .88em; background: var(--paper-2); padding: .08em .3em; border-radius: 3px; }
.mono, .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ---------- site header ---------- */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  margin-left: calc(-1 * var(--gutter-l)); margin-right: calc(-1 * var(--gutter-r));
  padding: 10px var(--gutter-r) 10px var(--gutter-l);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-head .wrap { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--f-display); font-weight: 700; letter-spacing: .01em; font-size: .98rem; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand:hover { color: var(--ink); }
.site-nav { display: flex; gap: 4px 16px; flex-wrap: wrap; margin-left: auto; align-items: center; font-family: var(--f-ui); font-size: .86rem; }
.site-nav a { color: var(--ink-2); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent-ink); }
.theme-btn { font: inherit; background: none; border: 1px solid var(--rule); color: var(--ink-2); border-radius: 999px; padding: 2px 10px; cursor: pointer; font-family: var(--f-ui); font-size: .8rem; }
.theme-btn:hover { border-color: var(--accent); color: var(--accent-ink); }

/* ---------- Distill article grid ---------- */
d-title, d-byline, d-article, d-appendix, .d-grid {
  display: grid;
  grid-template-columns:
    [screen-start] minmax(0, 1fr)
    [page-start kicker-start] minmax(0, 120px)
    [middle-start] minmax(0, 40px)
    [text-start kicker-end] minmax(0, 680px)
    [text-end gutter-start] minmax(0, 40px)
    [middle-end] minmax(0, 200px)
    [page-end gutter-end] minmax(0, 1fr) [screen-end];
  column-gap: 28px;
}
d-title > *, d-byline > *, d-article > *, d-appendix > *, .d-grid > * { grid-column: text; min-width: 0; }
.l-body { grid-column: text; }
.l-body-outset { grid-column: middle; }
.l-middle { grid-column: middle; }
.l-page { grid-column: page; }
.l-page-outset { grid-column: page; }
.l-screen { grid-column: screen; }
.l-gutter, aside { grid-column: gutter; }
d-front-matter { display: none; }

/* margin notes */
d-article aside {
  font-family: var(--f-ui); font-size: .8rem; line-height: 1.5; color: var(--muted);
  align-self: start; border-top: 1px solid var(--rule); padding-top: 6px;
}

d-title { padding-block: 56px 18px; }
d-title .kicker { font-family: var(--f-ui); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 14px; font-weight: 600; }
d-title h1 { grid-column: middle; font-size: clamp(2.1rem, 5vw, var(--step-4)); font-weight: 800; letter-spacing: -.02em; margin: 0 0 18px; font-stretch: 92%; }
d-title p { grid-column: middle; font-size: var(--step-1); line-height: 1.45; color: var(--ink-2); margin: 0; font-style: italic; max-width: 46ch; }
d-title figure { grid-column: page; margin: 30px 0 0; }

d-byline {
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding-block: 16px; font-family: var(--f-ui); font-size: .82rem; line-height: 1.55; margin-bottom: 36px;
}
d-byline .byline { grid-column: middle; display: grid; grid-template-columns: 1.4fr 1.4fr 1fr; gap: 6px 24px; }
d-byline h3 { font-family: var(--f-ui); font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
d-byline .author, d-byline .affil { margin: 0; color: var(--ink); }
d-byline .affil { color: var(--ink-2); }
d-byline a { color: inherit; }
d-byline .row { display: contents; }
@media (max-width: 700px) { d-byline .byline { grid-template-columns: 1fr; } d-byline .byline > * { grid-column: 1 !important; grid-row: auto !important; } d-byline .affil { margin-bottom: 6px; } d-byline h3:not(:first-child) { display: none; } }

d-article { font-size: var(--step-0); padding-bottom: 40px; }
d-article p, d-article li { max-width: 68ch; }
d-article h2 {
  font-size: var(--step-2); font-weight: 750; letter-spacing: -.01em; margin: 56px 0 10px;
  padding-top: 18px; border-top: 1px solid var(--rule);
}
d-article h2 .sec { font-family: var(--f-mono); font-weight: 500; font-size: .62em; color: var(--accent-ink); margin-right: 10px; vertical-align: .18em; }
d-article h3 { font-size: var(--step-1); font-weight: 700; margin: 34px 0 4px; }
d-article p { margin: 0 0 1.05em; }
d-article ul, d-article ol { padding-left: 1.3em; margin: 0 0 1.1em; }
d-article li { margin-bottom: .35em; }
d-article blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--hi); color: var(--ink-2); font-style: italic; }
d-article hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
d-article .lede::first-letter { font-family: var(--f-display); font-weight: 800; float: left; font-size: 3.5em; line-height: .86; margin: .06em .1em 0 0; color: var(--accent-ink); }

/* math */
d-math { font-size: 1.04em; }
d-math[block] { display: block; position: relative; overflow-x: auto; overflow-y: hidden; padding: 6px 0; margin: .4em 0 1.1em; }
.katex { color: var(--ink); }

/* tables */
.table-wrap { overflow-x: auto; margin: 1em 0 1.6em; }
d-article table { border-collapse: collapse; font-family: var(--f-ui); font-size: .84rem; width: 100%; font-variant-numeric: tabular-nums; }
d-article th { text-align: left; font-weight: 600; color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--ink-2); padding: 6px 10px 6px 0; white-space: nowrap; }
d-article td { border-bottom: 1px solid var(--rule); padding: 6px 10px 6px 0; vertical-align: top; }
d-article td.n, d-article th.n { text-align: right; font-family: var(--f-mono); }
d-article tr.win td { background: var(--hi-wash); }

/* figures */
d-figure, figure.fig { display: block; margin: 22px 0 30px; }
.fig-panel {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 6px;
  padding: 16px 16px 12px; box-shadow: var(--shadow);
}
figcaption, .caption { font-family: var(--f-ui); font-size: .82rem; line-height: 1.5; color: var(--ink-2); margin-top: 10px; max-width: 80ch; }
figcaption b, .caption b { color: var(--ink); }
.fig-num { font-family: var(--f-mono); color: var(--accent-ink); font-weight: 600; margin-right: 6px; }
.controls { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-family: var(--f-ui); font-size: .82rem; color: var(--ink-2); margin-bottom: 10px; }
.controls label { display: inline-flex; align-items: center; gap: 6px; }
.controls select, .controls input[type="number"] {
  font: inherit; color: var(--ink); background: var(--paper-2); border: 1px solid var(--rule); border-radius: 4px; padding: 3px 6px;
}
.controls input[type="range"] { accent-color: var(--accent); width: 150px; max-width: 40vw; }
.controls output { font-family: var(--f-mono); color: var(--ink); min-width: 4ch; display: inline-block; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 5px; overflow: hidden; }
.seg button { font: inherit; border: 0; background: var(--paper); color: var(--ink-2); padding: 3px 10px; cursor: pointer; border-right: 1px solid var(--rule); }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--paper); }
.btn { font: inherit; font-family: var(--f-ui); font-size: .82rem; border: 1px solid var(--accent); color: var(--accent-ink); background: var(--accent-wash); border-radius: 5px; padding: 4px 12px; cursor: pointer; }
.btn:hover { background: var(--accent); color: var(--paper); }
.fig-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.fig-row.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 760px) { .fig-row, .fig-row.even { grid-template-columns: minmax(0, 1fr); } }
.readout { font-family: var(--f-ui); font-size: .82rem; color: var(--ink-2); }
.readout .big { font-family: var(--f-mono); font-size: 1.15rem; color: var(--ink); }
.readout ol { padding-left: 1.4em; margin: 6px 0; }
.readout li { margin: 2px 0; }
.readout li.top { color: var(--hi); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: var(--f-ui); font-size: .76rem; color: var(--ink-2); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.warn { font-family: var(--f-ui); font-size: .8rem; color: var(--bad); }
.pill { display: inline-block; font-family: var(--f-ui); font-size: .72rem; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; }
.pill.ok { color: var(--good); } .pill.no { color: var(--bad); }

/* charts */
svg.chart { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--f-ui); }
svg.chart text { fill: var(--ink-2); font-size: 11px; }
svg.chart .axis path, svg.chart .axis line { stroke: var(--rule); }
svg.chart .axis text { fill: var(--muted); font-family: var(--f-mono); font-size: 10px; }
svg.chart .grid line { stroke: var(--rule); stroke-opacity: .7; }
svg.chart .grid path { display: none; }
svg.chart .axis-label { fill: var(--ink-2); font-size: 11.5px; font-weight: 500; }
svg.chart .lbl { fill: var(--ink); font-size: 10.5px; paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
svg.chart .guide { stroke: var(--hi); stroke-width: 2; }
svg.chart .guide-hit { stroke: transparent; stroke-width: 22; cursor: ns-resize; }
svg.chart .dim { opacity: .22; }
.tip {
  position: fixed; pointer-events: none; z-index: 60; background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule); box-shadow: var(--shadow); border-radius: 5px; padding: 7px 9px;
  font-family: var(--f-ui); font-size: .78rem; line-height: 1.4; max-width: 280px; opacity: 0; transition: opacity .1s;
}
.tip b { font-weight: 600; }
.tip .mono { font-size: .74rem; color: var(--ink-2); }

/* footnotes + citations */
d-cite, d-footnote { display: inline; }
.cite-ref, .fn-ref { font-family: var(--f-ui); font-size: .72em; color: var(--accent-ink); cursor: help; text-decoration: none; vertical-align: super; line-height: 0; }
.cite-ref::before { content: "["; } .cite-ref::after { content: "]"; }
.hover-box {
  position: absolute; z-index: 70; max-width: 380px; background: var(--paper); border: 1px solid var(--rule); box-shadow: var(--shadow);
  border-radius: 5px; padding: 10px 12px; font-family: var(--f-ui); font-size: .8rem; line-height: 1.5; color: var(--ink-2);
}

/* appendix */
d-appendix { background: var(--paper-2); margin-left: calc(-1 * var(--gutter-l)); margin-right: calc(-1 * var(--gutter-r)); padding: 34px var(--gutter-r) 50px var(--gutter-l); border-top: 1px solid var(--rule); font-family: var(--f-ui); font-size: .82rem; line-height: 1.6; color: var(--ink-2); }
d-appendix h3 { grid-column: page-start / text-start; font-family: var(--f-ui); font-size: .78rem; font-weight: 600; color: var(--ink); margin: 18px 0 0; letter-spacing: .02em; }
d-appendix h3 + * { grid-column: text-start / page-end; }
d-appendix > section, d-appendix > div, d-appendix > p, d-appendix > ol { grid-column: text-start / page-end; margin-top: 18px; }
d-appendix ol { padding-left: 1.4em; } d-appendix li { margin-bottom: 6px; }
d-appendix pre { white-space: pre-wrap; background: var(--paper); border: 1px solid var(--rule); padding: 10px; border-radius: 4px; font-size: .74rem; overflow-x: auto; }
@media (max-width: 900px) {
  d-title, d-byline, d-article, d-appendix, .d-grid { grid-template-columns: [screen-start page-start middle-start text-start kicker-start gutter-start] minmax(0,1fr) [screen-end page-end middle-end text-end kicker-end gutter-end]; column-gap: 0; }
  d-appendix h3, d-appendix h3 + *, d-appendix > * { grid-column: text !important; }
  d-article aside { margin: 0 0 1em; }
}

/* book navigation */
.chapter-nav { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; margin: 44px 0 10px; font-family: var(--f-ui); }
.chapter-nav a { display: block; border: 1px solid var(--rule); border-radius: 6px; padding: 12px 14px; text-decoration: none; color: var(--ink); background: var(--paper); }
.chapter-nav a:hover { border-color: var(--accent); }
.chapter-nav small { display: block; color: var(--muted); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.chapter-nav .next { text-align: right; grid-column: 2; }
.toc { font-family: var(--f-ui); font-size: .84rem; border-left: 2px solid var(--accent); padding: 2px 0 2px 14px; margin: 0 0 28px; }
.toc b { display: block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 28px; }
@media (max-width: 600px) { .toc ol { columns: 1; } }
.toc a { color: var(--ink-2); text-decoration: none; } .toc a:hover { color: var(--accent-ink); }

.site-foot { max-width: 1180px; margin: 0 auto; padding-block: 26px 40px; font-family: var(--f-ui); font-size: .78rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-foot a { color: var(--ink-2); }

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

@media (max-width: 600px) { .site-nav a.ch { display: none; } .brand span { font-size: .9rem; } }

/* ---------- Virtual Prof ---------- */
.prof-fab { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 80;
  display: inline-flex; align-items: center; gap: 8px; font: 600 .86rem var(--f-ui); color: var(--paper); background: var(--accent);
  border: 0; border-radius: 999px; padding: 10px 16px 10px 12px; cursor: pointer; box-shadow: var(--shadow); }
.prof-fab svg { width: 20px; height: 20px; }
.prof-fab:hover { background: var(--accent-ink); }
.prof-fab.open { display: none; }
.prof-panel { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 81;
  width: min(420px, calc(100vw - 32px)); height: min(620px, calc(100vh - 90px)); display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.25); overflow: hidden; }
.prof-panel[hidden] { display: none; }
.prof-panel header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--rule); font-family: var(--f-ui); font-size: .82rem; background: var(--paper-2); }
.prof-panel header b { font-family: var(--f-display); font-size: .98rem; color: var(--ink); }
.prof-panel header span { color: var(--muted); }
.prof-panel header a { margin-left: auto; color: var(--accent-ink); font-size: .76rem; }
.prof-close { font: inherit; font-size: 1.3rem; line-height: 1; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 4px; }
.prof-body { flex: 1; min-height: 0; display: flex; }
@media (max-width: 600px) { .prof-panel { inset: 0; width: auto; height: auto; border-radius: 0; } }

.prof-chat { display: flex; flex-direction: column; width: 100%; min-height: 0; font-family: var(--f-ui); font-size: .86rem; color: var(--ink); }
.prof-chat:not(.compact) { height: 560px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); }
.prof-log { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.prof-msg { max-width: 92%; padding: 8px 12px; border-radius: 10px; line-height: 1.5; }
.prof-msg p { margin: 0 0 6px; } .prof-msg p:last-child { margin-bottom: 0; }
.prof-msg ul { margin: 4px 0 6px; padding-left: 1.2em; }
.prof-user { align-self: flex-end; background: var(--accent); color: var(--paper); border-bottom-right-radius: 3px; }
.prof-bot { align-self: flex-start; background: var(--paper-2); border: 1px solid var(--rule); border-bottom-left-radius: 3px; }
.prof-wait { color: var(--muted); font-style: italic; }
.prof-ref { display: inline-grid; place-items: center; min-width: 1.35em; height: 1.35em; margin: 0 1px; padding: 0 3px; border-radius: 4px; background: var(--accent-wash); color: var(--accent-ink); font-size: .72em; font-weight: 600; text-decoration: none; vertical-align: .15em; }
.prof-src { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--rule); font-size: .76rem; }
.prof-src span { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .66rem; font-weight: 600; }
.prof-src a { color: var(--ink-2); text-decoration: none; } .prof-src a:hover { color: var(--accent-ink); }
.prof-src a b, .prof-quote a b { color: var(--accent-ink); margin-right: 4px; }
.prof-quote { margin: 6px 0; padding: 4px 0 4px 10px; border-left: 3px solid var(--accent); font-style: normal; color: var(--ink-2); }
.prof-quote a { display: block; font-size: .76rem; font-weight: 600; color: var(--ink); text-decoration: none; margin-bottom: 2px; }
.prof-quote mark { background: var(--hi-wash); color: var(--ink); padding: 0 1px; border-radius: 2px; }
.prof-tip { font-size: .76rem; color: var(--muted); }
.prof-caret { display: inline-block; width: 7px; height: 1em; background: var(--accent); vertical-align: -2px; animation: prof-blink 1s steps(2) infinite; }
@keyframes prof-blink { 50% { opacity: 0; } }
.prof-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.prof-suggest .chip { font: inherit; font-size: .74rem; border: 1px solid var(--rule); background: var(--paper); color: var(--ink-2); border-radius: 999px; padding: 3px 10px; cursor: pointer; text-align: left; }
.prof-suggest .chip:hover { border-color: var(--accent); color: var(--accent-ink); }
.prof-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--rule); }
.prof-in { font: inherit; font-size: .9rem; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); color: var(--ink); min-width: 0; }
.prof-in:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.prof-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 0 12px 8px; font-size: .74rem; color: var(--ink-2); }
.prof-ai { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.prof-ai input { accent-color: var(--accent); }
.prof-model { font: inherit; font-size: .74rem; color: var(--ink); background: var(--paper-2); border: 1px solid var(--rule); border-radius: 4px; padding: 2px 4px; max-width: 100%; }
.prof-status { color: var(--muted); flex-basis: 100%; }
.prof-bar { height: 3px; background: var(--paper-2); }
.prof-bar > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
@media print { .prof-fab, .prof-panel { display: none !important; } }
.prof-suggest[hidden] { display: none; }
