/* Fittings on the working pages. The stock, ink and lamp colours follow the shell. */
:root {
  --plate-edge: color-mix(in srgb, var(--ink) 67%, var(--gold));
  --plate-inset: color-mix(in srgb, var(--gold) 60%, var(--paper));
  --stamp-red: #90271f;
  --instrument-green: #305d51;
  --plate-shadow: 0 3px 10px rgb(61 39 17 / 9%);
  --rivet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cdefs%3E%3CradialGradient id='b' cx='.33' cy='.28' r='.78'%3E%3Cstop stop-color='%23fff0c0'/%3E%3Cstop offset='.56' stop-color='%23c7974a'/%3E%3Cstop offset='1' stop-color='%23714f23'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='5' cy='5' r='4.4' fill='url(%23b)' stroke='%23563b20' stroke-width='.9'/%3E%3Cpath d='m3.2 3.2 3.6 3.6m0-3.6L3.2 6.8' fill='none' stroke='%23533a21' stroke-width='1.05'/%3E%3C/svg%3E");
}
:root[data-light="night"] {
  --plate-edge: #ab8a58;
  --plate-inset: #705738;
  --stamp-red: #ffad91;
  --instrument-green: #a8d2bd;
  --plate-shadow: 0 3px 12px rgb(8 5 2 / 26%);
}
.sr-only {
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0;
}
body[data-page="legal"] { --folio-mark: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2084%2084'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.5'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M46%2014v54M30%2068h32M22%2026l48-4M26%2026l-9%2018h18zm40-4-9%2018h18z'%2F%3E%20%3Ccircle%20cx%3D'46'%20cy%3D'24'%20r%3D'4'%2F%3E%3C%2Fsvg%3E"); }
body[data-page="invest"] { --folio-mark: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2084%2084'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.5'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Ccircle%20cx%3D'48'%20cy%3D'48'%20r%3D'24'%20stroke-dasharray%3D'2%203'%2F%3E%3Cpath%20d%3D'M48%2018v60M18%2048h60'%2F%3E%3Cpolygon%20points%3D'58%2C32%2050%2C50%2038%2C64%2046%2C46'%2F%3E%3C%2Fsvg%3E"); }
body:is([data-page="content"],[data-page="operations"]) { --folio-mark: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2088%2088'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.5'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Crect%20x%3D'14'%20y%3D'40'%20width%3D'42'%20height%3D'28'%2F%3E%20%3Cpath%20d%3D'M56%2046l20-10v32l-20-10'%2F%3E%20%3Ccircle%20cx%3D'26'%20cy%3D'26'%20r%3D'11'%2F%3E%3Ccircle%20cx%3D'48'%20cy%3D'24'%20r%3D'13'%2F%3E%20%3Ccircle%20cx%3D'26'%20cy%3D'26'%20r%3D'3'%2F%3E%3Ccircle%20cx%3D'48'%20cy%3D'24'%20r%3D'3.5'%2F%3E%3C%2Fsvg%3E"); }
body[data-page="novel"] { --folio-mark: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2088%2088'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.5'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M22%2072c10-2%2018-10%2028-22%2010-12%2018-24%2022-34-12%204-24%2012-34%2022C28%2048%2022%2060%2022%2072z'%2F%3E%20%3Cpath%20d%3D'M18%2076l28-28M46%2066h24v12H46zM52%2058h12v8H52z'%2F%3E%3C%2Fsvg%3E"); }
body[data-page="fitness"] { --folio-mark: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2088%2088'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.5'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Ccircle%20cx%3D'48'%20cy%3D'50'%20r%3D'24'%2F%3E%20%3Ccircle%20cx%3D'48'%20cy%3D'50'%20r%3D'18'%20stroke-dasharray%3D'2%204'%2F%3E%20%3Cpath%20d%3D'M40%2016h16M48%2016v10M48%2050l13-11M48%2050v12'%2F%3E%20%3Ccircle%20cx%3D'48'%20cy%3D'50'%20r%3D'3'%2F%3E%3C%2Fsvg%3E"); }

:where(body:not([data-page="home"],.locked-desk) .main) :is(.panel,.health-panel) {
  min-width: 0;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
}

/* Only work surfaces carry the engraved fittings. Controls and inset sections use a single rule. */
:where(body:not([data-page="home"],.locked-desk) .main)
  :is(.panel,.health-panel):not(:where(.panel *, .health-panel *, .lib-stats > *, .lib-board,
    .studio-card, .studio-search, .studio-filter, .studio-context, .health-overview-columns > *, [data-expired-conflict],
    [data-legal-stage-locked], [data-missing-record])) {
  position: relative;
  border-color: var(--plate-edge);
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--plate-inset), var(--plate-shadow);
  &::before, &::after {
    content: "";
    position: absolute;
    pointer-events: none;
  }
  &::before {
    inset: 5px;
    z-index: 1;
    background: var(--rivet) left top, var(--rivet) right top, var(--rivet) left bottom, var(--rivet) right bottom;
    background-repeat: no-repeat;
    background-size: 7px 7px;
  }
  &::after {
    inset: auto 12px 5px auto;
    width: 31px;
    height: 24px;
    background-color: var(--ink);
    mask: var(--folio-mark) right bottom / contain no-repeat;
    opacity: .14;
  }
}

body:not([data-page="home"]) .page-head {
  align-items: baseline;
  padding: clamp(8px,1.2vw,20px) 0 15px;
  margin-bottom: 19px;
  border-bottom: 3px double var(--plate-edge);
}
body:not([data-page="home"]) .page-head h1 {
  color: var(--ink);
  font: 850 clamp(1.9rem, 3.5vw, 3.25rem)/1.24 var(--head);
  letter-spacing: .035em;
}
body:not([data-page="home"]) .page-head p { color: var(--secondary); margin-top: .45em; max-width: 65ch; }
body:not([data-page="home"]) :is(.panel-head,.studio-panel-title,.health-panel>header) h2 {
  font: 750 clamp(1.1rem,1.75vw,1.48rem)/1.38 var(--head);
}

.tag, .tag.amber, .tag.green {
  display: inline-block;
  padding: 3px 8px;
  line-height: 1.35;
  font-weight: 700;
  white-space: normal;
  border: 1px solid currentColor;
  outline: 1px solid color-mix(in srgb,currentColor 45%,transparent);
  outline-offset: -3px;
  border-radius: 1px;
  color: var(--stamp-red);
  background: color-mix(in srgb, var(--paper) 94%, var(--stamp-red));
  transform: rotate(-1.75deg);
}
.tag.green { color: var(--instrument-green); background: color-mix(in srgb, var(--paper) 95%, var(--instrument-green)); transform: rotate(1deg); }

.stage-ruler {
  display:flex; align-items:center; gap:10px; margin:9px 0;
  color:var(--ink); font:12px/1.55 var(--mono); font-variant-numeric:tabular-nums;
}
.stage-ruler i {
  display: block;
  position: relative;
  height: 13px;
  min-width: 22px;
  flex: 1;
  border: 1px solid var(--plate-edge);
  background: repeating-linear-gradient(90deg, transparent 0 7px,var(--line-strong) 7px 8px),var(--pale);
}
.stage-ruler i::before {
  content:""; position:absolute; inset:0 auto 0 0; width:var(--stage-position);
  background:linear-gradient(90deg,#294e42,#4a7660);
}
.stage-ruler i b {
  position:absolute; top:-1px; bottom:-1px; left:clamp(0px,var(--stage-position),100%); width:4px;
  border:1px solid #66392b; background:#d7965d; transform:translateX(-100%);
}
.activity-progress {
  display:block; width:100%; min-width:0; margin-block:8px;
  font-size:.86rem; font-variant-numeric:tabular-nums;
}
.activity-progress-label {
  display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap;
  gap:2px 12px; margin-bottom:4px; color:var(--ink);
}
.activity-progress-label span,.activity-progress-time { color:var(--secondary); }
.activity-progress-time { display:block; margin-top:4px; font-size:inherit; }
.activity-progress progress {
  display:block; appearance:none; width:100%; min-width:0; height:12px; border:1px solid var(--plate-edge);
  border-radius:0; background:repeating-linear-gradient(90deg,transparent 0 7px,var(--line-strong) 7px 8px),var(--pale);
}
.activity-progress progress::-webkit-progress-bar { background:transparent; }
.activity-progress progress::-webkit-progress-value { background:#416a58; border-right:3px solid #ca8860; }
.activity-progress progress::-moz-progress-bar { background:#416a58; border-right:3px solid #ca8860; }
.activity-progress progress[value="0"]::-webkit-progress-value { border:0; }
.activity-progress progress[value="0"]::-moz-progress-bar { border:0; }
topic-agent .activity-progress { padding:5px 3px; }
.steps li { border-radius: 0; border-color: var(--rule); }
.steps .here { color:var(--stamp-red); background:var(--paper); border-color:var(--stamp-red); }
.steps .here::before { width: 3px; height:.8em; margin: 0 6px 0 0; border-radius: 0; background: var(--stamp-red); }
.steps .complete { color:var(--instrument-green); background:var(--green-paper); }
body .main meter {
  display: block; appearance: none; width: 100%; height: 12px; min-width: 0; border: 1px solid var(--plate-edge);
  border-radius: 0; background: var(--pale);
}
body .main meter::-webkit-meter-bar {
  height: 100%; border:0; border-radius:0;
  background:repeating-linear-gradient(90deg, transparent 0 7px,var(--line-strong) 7px 8px),var(--pale);
}
body .main meter::-webkit-meter-optimum-value { border-radius:0; border-right:3px solid #ad5133; background: linear-gradient(90deg,#294e42,#568169); }
body .main meter::-moz-meter-bar { border-right:3px solid #ad5133; background:#446f58; }
body .main meter[value="0"]::-webkit-meter-optimum-value { border:0; }
.chart .bar-slot { background:repeating-linear-gradient(to top,transparent 0 7px,var(--line) 7px 8px); }
.chart .bar:not(.rest) { background:var(--instrument-green); border-top:3px solid var(--copper); }
.health-stat meter { margin-top:5px; }

body :is(input:not([type=checkbox]):not([type=radio]),textarea,select) { max-width:100%; min-width:0; }
body :is(.field,.fields,fieldset,.iv-row,.iv-candidate,.book-brief,.studio-entry>*,.row-start>div,.studio-panel-title>*) { min-width:0; }
body :is(textarea, input:not([type=checkbox]):not([type=radio]), select), #dialog, .studio-reader textarea {
  color:var(--ink); background-color:var(--paper); border-color:var(--line-strong); border-radius:2px;
}
body textarea,.formatted,.studio-reader textarea { line-height:1.8; }
body :is(.iv-cost-ref,.studio-source,.iv-candidate,.studio-entry h3,.health-source,.formatted,.novel-spot,.legal-evidence) { overflow-wrap:anywhere; }
.legal-stage-records { margin-block:14px; padding:10px 12px; border:1px solid var(--rule); }
.legal-stage-records summary { font-weight:650; }
.legal-stage-records [data-legal-job-count] { margin-inline-start:.4rem; font-weight:normal; }
.legal-stage-job-list { padding-top:.5rem; }
.legal-issue-list, .legal-issue-results { display:grid; gap:14px; }
.legal-issue-card {
  min-width:0; margin:0; padding:12px 14px;
  border:1px solid var(--rule); background:color-mix(in srgb, var(--paper) 95%, var(--ink));
  overflow-wrap:anywhere;
}
.legal-issue-card legend { padding-inline:6px; font-weight:700; }
.legal-issue-card h3 { margin:0; font-size:1.12rem; }
.legal-issue-card dl { margin:10px 0 0; font-size:.92rem; }
.legal-issue-card dt { font-weight:700; }
.legal-issue-card dd { margin:0; }
.legal-home { display:grid; gap:1.15rem; min-width:0; }
.legal-home > .rg-columns { align-items:start; }
.legal-home .rg-head h2 { margin:0; }
.legal-home .rg-week-choice { min-width:0; }
.legal-home .rg-week-choice input { max-width:100%; }
.legal-home-cases { list-style:none; padding:0; }
.legal-home-cases > li { padding-block:.85rem; border-bottom:1px dotted var(--line); }
.legal-home-cases > li:first-child { padding-block-start:0; }
.legal-home-cases > li:last-child { padding-block-end:0; border-bottom:0; }
.legal-home-case-heading { display:flex; flex-wrap:wrap; align-items:baseline; gap:.4rem .75rem; }
.legal-home-case-heading h3 { margin:0; min-width:0; overflow-wrap:anywhere; }
.legal-home-progress {
  list-style:none; padding:0; margin:.5rem 0 0; display:flex; flex-wrap:wrap; gap:.25rem .4rem;
  font-size:.875rem; line-height:1.5;
}
.legal-home-progress li { min-width:0; display:flex; }
.legal-home-progress :is(a, span) { display:block; padding:.33rem .45rem; border:1px solid var(--line); }
.legal-home-progress [data-state="approved"] a { color:var(--instrument-green); }
.legal-home-progress [data-state="pending"] span { color:var(--secondary); border-style:dotted; }
.legal-home-progress [aria-current] { border-color:var(--mark); color:var(--mark); font-weight:700; background:var(--red-paper); }
.legal-home-progress [aria-current="page"] { color:var(--mark); }
.legal-home-progress a:focus-visible { outline:2px solid var(--mark); outline-offset:2px; }
.legal-home :is(.rg-events a,.rg-events p) { overflow-wrap:anywhere; }
.record-trash-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:.35rem; }
.record-trash-row[hidden] { display:none; }
.record-trash-row > :first-child { min-width:0; overflow-wrap:anywhere; }
.legal-home-cases > .record-trash-row { align-items:start; column-gap:.65rem; }
.icon-button.record-trash-button {
  flex:none; min-width:40px; min-height:40px;
  border:0; color:color-mix(in srgb,var(--secondary) 83%,var(--paper));
  background:transparent; box-shadow:none;
}
.icon-button.record-trash-button:is(:hover,:focus-visible) { color:var(--stamp-red); background:var(--red-paper); }
.record-trash-button:focus-visible { outline:2px solid var(--stamp-red); outline-offset:1px; }
.record-trash-tools { margin-inline-start:auto; justify-content:flex-end; column-gap:.75rem; }
.studio-entry.studio-entry-with-trash {
  grid-template-columns:auto minmax(0,1fr) auto auto; align-items:center;
}
.studio-entry-with-trash > .record-trash-button { grid-row:1; grid-column:-2/-1; justify-self:end; }
@media(pointer:coarse){
  .icon-button.record-trash-button { min-width:44px; min-height:44px; }
}
@media(max-width:730px){
  .lib-history .studio-entry.studio-entry-with-trash { grid-template-columns:auto minmax(0,1fr) auto; }
  .lib-history .studio-entry.studio-entry-with-trash > .form-actions { grid-area:2 / 2 / auto / -1; }
  .lib-history .studio-entry.studio-entry-with-trash > .record-trash-button { grid-area:1 / -2 / auto / -1; justify-self:end; }
}
.record-trash-list { list-style:none; margin:0; padding:0; }
.record-trash-list li { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.45rem 1rem; padding:.7rem 0; border-bottom:1px solid var(--rule); overflow-wrap:anywhere; }
.record-trash-list p { margin:.2rem 0 0; }
#dialog { border:3px double var(--plate-edge);max-width:min(850px,calc(100vw - 20px)); }
#dialog .dialog-body { background:var(--paper); }
body:not([data-page="fitness"]) #dialog > .dialog-body > .dialog-heading {
  position:sticky;
  top:-1px;
  z-index:3;
  padding-block:5px;
  background:var(--paper);
  border-bottom:1px solid var(--rule);
}
#dialog .dialog-heading h2{margin:0;overflow-wrap:anywhere}
#dialog .dialog-heading [data-close]{flex:none}
#book-reader,.book-import,[data-desk-destination]{scroll-margin-top:4.5rem}
.draft-close-options{padding:10px 12px;margin-block:8px;border:1px solid var(--line-strong)}
.draft-close-options p{margin:0 0 8px}
#generation-compare{
  width:min(860px,calc(100vw - 20px));
  max-height:calc(100dvh - 24px);
  overscroll-behavior:contain;
  color:var(--ink);
  background:var(--paper);
  border:3px double var(--line-strong);
}
#generation-compare::backdrop{background:rgb(35 24 14 / 55%)}
.draft-compare-field{min-width:0;padding:12px;border:1px solid var(--line-strong)}
.draft-compare-field legend{font-weight:700}
.draft-compare-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.draft-compare-columns > div{min-width:0}
.draft-compare-columns pre{max-height:18rem;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:620px){.draft-compare-columns{grid-template-columns:minmax(0,1fr)}}
#dialog:has(> [data-clip-view]) {
  width:min(1000px,calc(100% - 20px));
  max-width:none;
  max-height:calc(100dvh - 20px);
  overscroll-behavior:contain;
  scrollbar-color:var(--line-strong) var(--pale);
}
#dialog:has(> .creative-result) {
  width:min(1040px,calc(100% - 20px));
  max-width:none;
  overscroll-behavior:contain;
}
.creative-result :is(h2,h3,h4) { overflow-wrap:anywhere; }
.creative-choices,.creative-prompts {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,234px),1fr));
  gap:14px;
}
.creative-choices article,.creative-prompts section {
  min-width:0;
  padding:12px;
  border:1px solid var(--line-strong);
  background:var(--paper);
}
.creative-choices h3,.creative-prompts h4 { margin:0; }
.creative-sections { display:grid; gap:6px; margin-block:12px; }
.creative-sections > div { border-top:1px solid var(--rule); padding-block:6px; }
.creative-sections dt { font-weight:700; color:var(--green-ink); }
.creative-sections dd { margin:2px 0 0; overflow-wrap:anywhere; }
.creative-choices article{display:flex;flex-direction:column;min-width:0}
.creative-choices article > .button{margin-block-start:auto;align-self:flex-start}
.creative-shot { margin-top:18px; padding-top:12px; border-top:1px solid var(--line-strong); }
.creative-shot h3 { margin:0 0 10px; }
.creative-prompts p { overflow-wrap:anywhere; }
.creative-shot-table { min-width:46rem; }
.creative-shot-table th:first-child { white-space:nowrap; }
.clip-reader-bar {
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:8px clamp(10px,2.5vw,26px);
  background:var(--paper);
  border-bottom:1px solid var(--plate-edge);
}
.clip-reader-bar .form-actions { margin:0; gap:6px; }
.clip-reader-bar .button { padding:6px 10px; min-height:38px; }
.clip-reader-close { display:inline-flex; align-items:center; gap:3px; flex:none; white-space:nowrap; }
.clip-reader-close svg { width:16px; height:16px; }
.clip-reader-content { padding:clamp(14px,2.7vw,30px); }
.clip-reader-content h2 { margin:0 0 7px; line-height:1.4; overflow-wrap:anywhere; font-size:clamp(1.28rem,2.4vw,2rem); }
.clip-reader-content .formatted { max-width:76ch; overflow-wrap:anywhere; }
.clip-reader-content .lib-copy li { grid-template-columns:clamp(28px,5vw,44px) minmax(0,1fr); }
.clip-reader-metrics {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:1px;
  margin:12px 0 8px;
  background:var(--line-strong);
  border-block:1px solid var(--line-strong);
}
.clip-reader-metrics > div { display:grid; gap:4px; padding:9px 12px; background:var(--paper); }
.clip-reader-metrics dt { font-size:.86rem; color:var(--secondary); }
.clip-reader-metrics dd { margin:0; font-size:clamp(1rem,2.4vw,1.65rem); font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap; }
@media(max-width:560px) {
  .clip-reader-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .clip-reader-metrics > div { padding:6px 8px; }
  .clip-reader-metrics dd { white-space:normal; overflow-wrap:anywhere; }
  .clip-reader-bar .button { padding-inline:7px; font-size:.83rem; }
}
.table-wrap { max-width:100%; overflow-x:auto; }
.table-wrap th { color:var(--ink); background:var(--pale); border-block:1px solid var(--line-strong); font-family:var(--head); }
.table-wrap td { border-bottom:1px solid var(--line); }
.table-wrap :is(th,td) { padding:7px 9px; }
.table-wrap td :is(input,select) { min-width:5.8em; }
body:not([data-page="home"]) .item-button { border-radius:2px; }
body:not([data-page="home"]) :is(.notice,.estimate-totals,.novel-spot,.iv-row) { border-radius:2px; }
body .main .button { border-radius:2px; }
body :is(.main,dialog) .button.primary:not(.seal-button) { background:#8d3026; color:#fffaee; border:1px solid #6f291e; box-shadow:inset 0 0 0 2px #b86a4f; }
body :is(.main,dialog) .button.primary:not(.seal-button):hover { background:#742a22; }
.button.outline { background:var(--paper); border-color:var(--line-strong); }
.button.outline:hover:not(:disabled) { background:var(--pale); border-color:var(--stamp-red); }
:focus-visible { outline:2px solid var(--instrument-green);outline-offset:3px; }
::selection { color:#231912;background:#ecd092; }

.content-desk .studio-search form { gap:12px; }
.studio-search form>label { font:750 clamp(1.25rem,2vw,1.65rem)/1.3 var(--head); }
.studio-search-row { gap:0; align-items:stretch; }
.studio-search-row input, .studio-search-row .button { min-height:46px; border-radius:1px; }
.studio-search-row input { border-right-width:0; padding-inline-start:39px; }
.studio-search form>small { color:var(--secondary); }
.studio-tabs, .health-trend-tabs {
  display:flex; flex-wrap:wrap; align-items:stretch; gap:0; width:fit-content; max-width:100%;
  padding:0; background:transparent; border:0; border-block:1px solid var(--plate-edge); border-radius:0;
}
.studio-tabs { margin:18px 0 12px; }
.studio-tabs a,.health-trend-tabs button {
  display:inline-flex; align-items:center; padding:7px 14px; margin:0; min-height:36px; border:0;
  border-inline-end:1px solid var(--line); border-radius:0; background:transparent; cursor:pointer;
  color:var(--ink); font:650 .91rem/1.35 var(--head); text-decoration:none;
}
.studio-tabs a:last-child,.health-trend-tabs button:last-child { border-inline-end:0; }
.studio-tabs a[aria-current=page],.health-trend-tabs button[aria-pressed=true] { background:var(--ink); color:var(--paper); }
.studio-tabs a[aria-current=page] small { color:inherit; border-color:currentColor; }
.studio-tabs a:hover:not([aria-current]),.health-trend-tabs button:hover:not([aria-pressed=true]) { color:var(--stamp-red); background:var(--pale); }
@media(max-width:730px) {
  .studio-tabs a,.health-trend-tabs button { padding-inline:9px; min-height:40px; }
}
.studio-filter-fields { background:var(--pale); border-block:1px solid var(--line); border-radius:0; }
.studio-filter-fields a { border-radius:1px; }
.studio-foot { align-items:end; padding-top:12px; border-top:1px solid var(--line-strong); }
.studio-card-top small,.lib-boards .rank-no { color:var(--instrument-green); font:700 .79rem/1.6 var(--mono); }
.studio-card h3 { color:var(--ink); font:750 clamp(1.16rem,1.8vw,1.52rem)/1.48 var(--head); }
.studio-card>p { color:var(--ink); line-height:1.75; }
.studio-empty { border:1px solid var(--rule); border-radius:0; }
.lib-boards { align-items:start; }
.lib-boards li { padding-block:6px; border-bottom:1px dotted var(--line-strong); align-items:baseline; min-height:40px; }
.lib-boards li strong { font:650 .94rem/1.54 var(--head); }
.lib-boards li .text-button { padding-inline:3px; color:var(--stamp-red); font-size:.75rem; }
:is(.rg-tiles,.lib-stats,.health-hero-stats) {
  display:grid; grid-template-columns:repeat(var(--ledger-columns,3),minmax(0,1fr));
  border-block:3px double var(--line-strong); background:var(--paper);
}
.lib-stats { --ledger-columns:4; margin-block:14px 18px; }
:is(.rg-tiles,.lib-stats,.health-hero-stats) > * {
  display:grid; align-content:start; gap:.22rem; min-width:0; padding:.65rem clamp(.65rem,1.8vw,1.35rem);
  border:0; border-radius:0; background:transparent; color:var(--ink); text-decoration:none;
}
:is(.rg-tiles,.lib-stats,.health-hero-stats) > * + * { border-inline-start:1px solid var(--rule); }
:is(.rg-tiles,.lib-stats,.health-hero-stats) > * > span {
  color:var(--ink); font:700 .93rem/1.45 var(--head);
}
:is(.rg-tiles,.lib-stats,.health-hero-stats) > * > strong {
  font:700 clamp(1.35rem,2.45vw,2.1rem)/1.2 var(--mono);
  letter-spacing:-.025em; font-variant-numeric:tabular-nums; overflow-wrap:anywhere;
}
:is(.rg-tiles,.lib-stats,.health-hero-stats) > * > :is(small,p) {
  font-size:.8rem; color:var(--secondary); margin:0;
}
.lib-stats > a:is(:hover,:focus-visible,[aria-current="page"]) { background:var(--pale); color:var(--stamp-red); }
.lib-stats > a[aria-current="page"] > span { color:inherit; text-decoration:underline; text-underline-offset:.25em; }
.lib-stats > a:focus-visible { outline-offset:-3px; }
@media(max-width:700px) {
  :is(.rg-tiles,.lib-stats,.health-hero-stats) { grid-template-columns:minmax(0,1fr); }
  :is(.rg-tiles,.lib-stats,.health-hero-stats) > * {
    grid-template-columns:minmax(0,.8fr) minmax(0,1fr); align-items:baseline; column-gap:.7rem;
  }
  :is(.rg-tiles,.lib-stats,.health-hero-stats) > * + * { border-inline:0; border-block-start:1px solid var(--rule); }
  :is(.rg-tiles,.lib-stats,.health-hero-stats) > * > :is(small,p,meter) { grid-column:2; }
}
.studio-entry-icon,.lib-cover { color:var(--instrument-green); background:var(--pale); border-radius:1px; }
.studio-entry .form-actions { flex-wrap:wrap; }
.studio-reader details,.studio-panel details { max-width:100%; }
.studio-review-note { color:var(--stamp-red); background:var(--red-paper); }
.studio-thumb { border-radius:1px; }
@media(max-width:960px) {
  .studio-entry-icon { width:32px; height:32px; }
  .table-wrap { overscroll-behavior-x:contain; }
}
@media(max-width:570px) {
 .main .panel-head,.iv-candidate { flex-wrap:wrap; }
 .lib-performance > .lib-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .lib-performance > .lib-stats > div { display:grid;grid-template-columns:minmax(0,1fr);padding:.36rem .6rem; }
 .lib-performance > .lib-stats small { grid-column:1;overflow-wrap:anywhere; }
 .lib-performance > .lib-stats strong { white-space:normal;overflow-wrap:anywhere; }
 .lib-performance > .lib-stats > div:nth-child(even) { border-inline-start:1px solid var(--rule); }
 .lib-performance > .lib-stats > div:nth-child(2) { border-block-start:0; }
 body[data-page="operations"] .lib-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
 body[data-page="operations"] .lib-stats>a { padding:.4rem .6rem; }
 body[data-page="operations"] .lib-stats>a:nth-child(even) { border-inline-start:1px solid var(--rule); }
 body[data-page="operations"] .lib-stats>a:nth-child(2) { border-block-start:0; }
 .studio-entry,.lib-history .studio-entry { grid-template-columns:32px minmax(0,1fr); align-items:baseline; }
 .studio-entry>:last-child:not(:nth-child(2)),.lib-history .studio-entry>.form-actions { grid-column:2; justify-self:start; }
 .lib-boards { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:370px) {
 .studio-search-row>.button { padding-inline:12px; }
 .health-form-grid { grid-template-columns:minmax(0,1fr); }
 .panel .form-actions { flex-wrap:wrap; }
}
@media(prefers-reduced-motion:reduce) {
 .chart-day:hover .bar { animation:none; }
}

