/* Catalog Utility components as CSS classes.

   Translated from the design system's React components (FFUI3 on claude.ai/design:
   components/core, data, forms, navigation) so Flask templates can use them without
   React. Values come from the tokens in ds/; when a component changes in the design
   system, change it here to match. */

@import "ds/styles.css";

/* ---------------------------------------------------------------- NavBar */

.nav {
  position: sticky; top: 0; z-index: 100; height: 44px;
  display: flex; align-items: center; gap: 16px; padding: 0 20px;
  background: var(--nav-bg);
  backdrop-filter: var(--blur-nav); -webkit-backdrop-filter: var(--blur-nav);
  border-bottom: 0.5px solid var(--border-2);
}
.nav-mark {
  font-size: var(--fs-ui); font-weight: 600; letter-spacing: var(--track-eyebrow);
  text-transform: uppercase; color: var(--brand); flex-shrink: 0;
}
.nav-mark:hover { text-decoration: none; color: var(--brand); }
.nav-rule { width: 0.5px; height: 16px; background: var(--border-2); flex-shrink: 0; }
.nav-links { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; }
.nav-links a {
  font-size: var(--fs-ui); color: var(--text-2); padding: 4px 10px; border-radius: var(--r);
  white-space: nowrap; transition: background var(--speed-fast) var(--ease), color var(--speed-fast) var(--ease);
}
.nav-links a:hover { background: var(--bg-2); color: var(--text); text-decoration: none; }
.nav-out { margin-left: auto; flex-shrink: 0; }
.nav-links a.active { background: var(--brand-light); color: var(--brand); }

/* ---------------------------------------------------------------- Page */

.page { max-width: 1160px; margin: 0 auto; padding: 24px 20px 48px; animation: fadeUp 0.25s var(--ease); }
.page-narrow { max-width: 800px; }
.eyebrow {
  font-size: var(--fs-micro); font-weight: 500; letter-spacing: var(--track-eyebrow);
  text-transform: uppercase; color: var(--text-3);
}
.title { font-size: var(--fs-title); font-weight: 500; letter-spacing: var(--track-tight); margin: 4px 0 4px; }
.sub { font-size: var(--fs-sub); font-weight: 300; color: var(--text-2); line-height: var(--lh-sub); margin: 0 0 20px; }
.mono { font-family: var(--mono); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }

/* ---------------------------------------------------------------- Button */

.btn {
  font-family: var(--sans); font-weight: 500; cursor: pointer; border-radius: var(--r);
  display: inline-flex; align-items: center; gap: 5px; text-decoration: none;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease), border-color var(--speed) var(--ease);
  background: var(--brand); color: #fff; border: none; font-size: var(--fs-ui); padding: 6px 16px;
}
.btn:hover { background: var(--brand-mid); color: #fff; text-decoration: none; }
.btn-subtle { background: var(--bg-3); color: var(--text-2); border: 0.5px solid var(--border-2); font-size: var(--fs-small); padding: 4px 10px; }
.btn-subtle:hover { background: var(--brand-light); color: var(--brand); border-color: var(--brand-border); }
.btn-action { background: var(--brand-light); color: var(--brand); border: 0.5px solid var(--brand-border); font-size: var(--fs-small); padding: 5px 12px; }
.btn-action:hover { background: var(--brand-border); color: var(--brand); }
.btn[disabled], .btn[disabled]:hover { opacity: 0.5; cursor: default; background: var(--bg-3); color: var(--text-2); }

/* ---------------------------------------------------------------- Badge */

.badge {
  font-size: 11px; font-family: var(--sans); font-weight: 500; padding: 3px 9px; border-radius: var(--r-pill);
  display: inline-block; background: var(--brand-light); color: var(--brand); border: 0.5px solid var(--brand-border);
}
.badge-ok   { background: var(--ok-bg);   color: var(--ok-text);   border-color: var(--ok-border); }
.badge-geo  { background: var(--info-bg); color: var(--info-text); border-color: var(--info-border); }
.badge-warn { background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-border); }
.badge-err  { background: var(--err-bg);  color: var(--err-text);  border-color: var(--err-border); }

/* ---------------------------------------------------------------- SectionCard + StatementRow */

.section { margin-bottom: 8px; }
.section-head {
  background: var(--bg-3); border: 0.5px solid var(--border-2); border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 8px 16px; font-size: var(--fs-label); font-weight: 500; text-transform: uppercase;
  letter-spacing: var(--track-section); color: var(--text-2);
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.section-body {
  border: 0.5px solid var(--border-2); border-top: none; border-radius: 0 0 var(--r-lg) var(--r-lg);
  background: var(--bg); overflow: hidden;
}
.section-pad { padding: 12px 16px; }
.row { display: grid; grid-template-columns: 200px 1fr; border-bottom: 0.5px solid var(--border); }
.row:last-child { border-bottom: none; }
.row-prop {
  font-size: var(--fs-label); font-weight: 500; text-transform: uppercase; letter-spacing: var(--track-label);
  color: var(--text-3); padding: 12px 16px 10px; background: var(--bg-2); border-right: 0.5px solid var(--border);
}
.row-val { padding: 10px 16px; line-height: var(--lh-body); font-size: var(--fs-body); }
.row-val.mono { font-size: var(--fs-ui); color: var(--brand); }
.row-val.long { font-size: var(--fs-ui); line-height: var(--lh-long); color: var(--text-2); }

/* Empty state inside a section: states what is missing and why, nothing more. */
.empty { padding: 14px 16px; font-size: var(--fs-ui); color: var(--text-2); line-height: var(--lh-body); }

/* ---------------------------------------------------------------- TextInput */

.input {
  font-family: var(--sans); font-size: var(--fs-ui); color: var(--text);
  background: var(--bg-2); border: 0.5px solid var(--border-2); border-radius: var(--r);
  padding: 5px 9px; transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.input.mono { font-family: var(--mono); }
.input:focus { outline: none; border-color: var(--brand-mid); box-shadow: var(--focus-ring); }

/* ---------------------------------------------------------------- DomainCard (launchers) */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.card {
  background: var(--bg); border: 0.5px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px; color: var(--text);
  transition: transform var(--speed) var(--ease), border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
a.card:hover { border-color: var(--brand-border); transform: translateY(-1px); box-shadow: var(--shadow-hover); text-decoration: none; color: var(--text); }
.card-name { font-size: var(--fs-ui); font-weight: 500; }
.card-meta { font-size: var(--fs-small); color: var(--text-2); }

/* ---------------------------------------------------------------- Today layout */

.today { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.today-main { flex: 1 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.today-rail { flex: 0 0 220px; min-width: 0; }
.today-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

/* ---------------------------------------------------------------- 3×5 task card
   From the Cataloger dashboard template: ruled index-card stock, red header rule,
   blue margin line. */

.index-card {
  background-color: #fdfcf7;
  background-image: linear-gradient(to right, transparent 52px, rgba(147,197,253,0.45) 52px, rgba(147,197,253,0.45) 53px, transparent 53px);
  border: 0.5px solid #d6d3c9; border-radius: var(--r); overflow: hidden; font-family: var(--mono);
}
.index-card-head {
  margin: 10px 10px 8px; padding-bottom: 5px; border-bottom: 1.5px solid rgba(225,29,72,0.55);
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.index-card-title { font-weight: 500; color: #78352b; font-size: 11px; letter-spacing: -0.01em; }
.index-card-lines { display: flex; flex-direction: column; gap: 5px; padding: 0 10px 8px 62px; font-size: 11px; line-height: 1.6; }
.task-line { display: flex; gap: 8px; align-items: flex-start; }
.task-line form { margin: 0; }
.task-time { color: var(--text-3); flex: none; }
.task-tag { color: var(--brand); font-weight: 500; flex: none; }
.task-text { flex: 1; min-width: 0; }
.task-hours { color: var(--text-2); flex: none; }
.task-del { background: none; border: none; color: var(--text-3); cursor: pointer; font-family: var(--mono); font-size: 11px; padding: 0 2px; }
.task-del:hover { color: var(--warn-text); }
.index-card-entry {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  padding: 8px 10px 10px 62px; border-top: 0.5px solid var(--border); background: rgba(248,246,238,0.8);
}
.index-card-entry .input { background: #fff; font-size: 11px; font-family: var(--mono); }

/* ---------------------------------------------------------------- Bookmark rail */

.rail { background: #fafaf8; border: 0.5px solid var(--border); border-radius: var(--r); padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.rail-label {
  font-family: var(--mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: var(--track-label);
  color: var(--text-2); border-bottom: 0.5px solid var(--border); padding-bottom: 6px;
}
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
.tile {
  aspect-ratio: 1; background: var(--bg); border: 0.5px solid var(--border); border-radius: var(--r);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px;
  color: var(--text); text-align: center;
  transition: border-color var(--speed) var(--ease), transform var(--speed) var(--ease);
}
.tile:hover { border-color: var(--brand-border); transform: translateY(-1px); text-decoration: none; color: var(--text); }
.tile-glyph {
  width: 26px; height: 26px; border-radius: var(--r); background: var(--brand-light); border: 0.5px solid var(--brand-border);
  display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--brand);
}
.tile-name { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.3; word-break: break-word; }
.rail form { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.rail .input { font-size: 11px; width: 100%; }

/* ---------------------------------------------------------------- Tables (Task page, bookmark list) */

.table { width: 100%; border-collapse: collapse; font-size: var(--fs-ui); }
.table th {
  text-align: left; font-size: var(--fs-label); font-weight: 500; text-transform: uppercase; letter-spacing: var(--track-label);
  color: var(--text-3); padding: 8px 16px; border-bottom: 0.5px solid var(--border); background: var(--bg-2);
}
.table td { padding: 8px 16px; border-bottom: 0.5px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fbfbfa; }

.flash { margin-bottom: 12px; padding: 8px 12px; border-radius: var(--r); font-size: var(--fs-ui);
  background: var(--warn-bg); color: var(--warn-text); border: 0.5px solid var(--warn-border); }

@media (max-width: 720px) {
  .row { grid-template-columns: 1fr; }
  .row-prop { border-right: none; padding-bottom: 4px; }
  .today-rail { flex: 1 1 100%; }
  .index-card-lines, .index-card-entry { padding-left: 14px; }
  .index-card { background-image: none; }
}

/* ================================================================ Cataloger dashboard
   From templates/cataloger-dashboard/CatalogerDashboard.dc.html (FFUI3). The template's
   inline styles, named. */

@keyframes dsBlink { 50% { opacity: 0; } }
@keyframes dsPulse { 50% { opacity: .35; } }

.page-wide { max-width: 1720px; padding: 16px; }
.dash {
  background: var(--bg); border: 0.5px solid rgba(0,0,0,0.14); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 8px; display: flex; flex-direction: column; gap: 8px;
}
.dash-top { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.dash-main { flex: 1 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.dash-block { background: var(--bg); border: 0.5px solid var(--border); border-radius: var(--r); padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 8px; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px; }

.kpi { background: var(--bg); border: 0.5px solid var(--border); border-radius: var(--r); padding: 10px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.panel { background: #fafaf8; border: 0.5px solid var(--border); border-radius: var(--r); padding: 10px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.k-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.k-label { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: var(--track-label); color: var(--text-2); }
.p-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }
.k-badge { font-family: var(--mono); font-size: 9.5px; font-weight: 500; color: var(--brand); background: var(--brand-light);
  border: 0.5px solid var(--brand-border); border-radius: var(--r); padding: 1px 5px; white-space: nowrap; }
.k-badge.warn { color: var(--warn-text); background: var(--warn-bg); border-color: var(--warn-border); }
.k-big { font-family: var(--mono); font-size: 30px; font-weight: 500; letter-spacing: var(--track-tight); line-height: 1.05; }
.k-mid { font-family: var(--mono); font-size: 22px; font-weight: 500; letter-spacing: var(--track-tight); color: var(--brand); }
.k-mid small, .k-unit { font-size: 11px; color: var(--text-2); font-weight: 400; }
.k-note { font-family: var(--mono); font-size: 10px; color: var(--text-2); }
.k-mono { font-family: var(--mono); font-size: 10px; }
.k-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; border-top: 0.5px solid var(--border);
  padding-top: 7px; font-family: var(--mono); font-size: 9.5px; color: var(--text-2); }
.k-foot a { font-weight: 500; }
.pulse { width: 6px; height: 6px; border-radius: 100px; background: var(--brand); animation: dsPulse 2s ease-in-out infinite; flex: none; }
.dot { width: 6px; height: 6px; border-radius: 100px; flex: none; display: inline-block; }

.stack-bar { display: flex; height: 6px; border-radius: 100px; overflow: hidden; background: var(--bg-3); }
.legend { display: flex; flex-direction: column; gap: 3px; font-family: var(--mono); font-size: 10px; }
.legend div { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.legend span:first-child { display: flex; align-items: center; gap: 5px; }
.meter { height: 4px; border-radius: 100px; background: var(--bg-3); overflow: hidden; }
.meter > div { height: 100%; background: var(--brand); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 52px; border-bottom: 0.5px solid var(--border); padding-bottom: 4px; }
.bars > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 100%; }
.bars .bar { width: 100%; background: #bec9c3; border-radius: 2px 2px 0 0; min-height: 1px; }
.bars .bar.cur { background: var(--brand); }
.bars .v { font-family: var(--mono); font-size: 9px; color: var(--text-3); }
.bars .l { font-family: var(--mono); font-size: 9px; color: var(--text-2); }
.bars .cur-l { color: var(--brand); font-weight: 500; }
.quarters { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; background: var(--bg);
  border: 0.5px solid var(--border); border-radius: var(--r); padding: 8px; }
.quarters > div { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.quarters .qn { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.quarters .ql { font-family: var(--mono); font-size: 9.5px; color: var(--text-3); }
.minirows { display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 10px; }
.minirow { display: flex; align-items: center; justify-content: space-between; gap: 6px; background: var(--bg);
  border: 0.5px solid var(--border); border-radius: var(--r); padding: 4px 8px; }
.minirow .ok { color: var(--brand); font-weight: 500; }
.minirow .warn { color: var(--warn-text); font-weight: 500; background: var(--warn-bg); border: 0.5px solid var(--warn-border);
  border-radius: var(--r); padding: 0 5px; }

/* Task log card with terminal header */
.term-card { cursor: pointer; transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease); }
.term-card:hover { border-color: var(--brand); box-shadow: var(--shadow-hover); }
.term-bar { background: #242625; border-bottom: 0.5px solid #3f4441; padding: 6px 8px; display: flex; align-items: center;
  justify-content: space-between; gap: 8px; flex-wrap: wrap; color: #fafaf8; font-size: 10px; user-select: none; }
.term-lights { display: flex; gap: 4px; }
.term-lights span { width: 8px; height: 8px; border-radius: 100px; }
.term-pill { display: flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: var(--r); background: var(--brand);
  border: 0.5px solid rgba(159,225,203,0.4); font-size: 9.5px; font-weight: 500; }
.term-pill .pulse { background: #86f8c9; width: 5px; height: 5px; }
.term-hint { font-size: 9px; color: #86f8c9; padding: 2px 6px; border-radius: var(--r); background: rgba(15,110,86,0.35);
  border: 0.5px solid rgba(134,248,201,0.3); }
.term-body { padding: 10px 10px 14px; font-size: 10.5px; line-height: 1.6; color: #1a1c1b; position: relative; }
.term-body .index-card-head { margin: 0 0 8px; }
.term-body .index-card-lines { padding: 0 0 8px 34px; }
.term-prompt { display: flex; align-items: center; gap: 6px; padding-top: 7px; padding-left: 34px; border-top: 0.5px solid var(--border); }
.term-prompt b { color: var(--brand); font-weight: 500; user-select: none; }
.cursor { display: inline-block; width: 6px; height: 12px; background: var(--brand); animation: dsBlink 1s step-start infinite; flex: none; }
.hole { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 100px;
  background: #f4f2ea; border: 2px solid #b8b3a5; display: flex; align-items: center; justify-content: center; }
.hole div { width: 6px; height: 6px; border-radius: 100px; background: rgba(36,38,37,0.2); }

/* Pop-out 3×5 card */
dialog.card-pop { border: none; padding: 0; background: transparent; width: min(740px, calc(100vw - 32px)); max-width: none; }
dialog.card-pop::backdrop { background: rgba(17,17,16,0.6); backdrop-filter: blur(4px); }
.card-pop .index-card { border-radius: 4px; box-shadow: 0 20px 45px -10px rgba(0,0,0,0.3);
  background-image: linear-gradient(to right, transparent 72px, rgba(147,197,253,0.5) 72px, rgba(147,197,253,0.5) 73.5px, transparent 73.5px); }
.card-pop .index-card-head { margin: 0; padding: 12px 20px 8px; }
.card-pop .index-card-lines { padding: 10px 20px 10px 80px; font-size: 11px; max-height: 50vh; overflow-y: auto; }
.card-pop .index-card-entry { padding: 10px 20px 10px 80px; }

/* Launcher row */
.launchers { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.launcher { aspect-ratio: 4/3; background: var(--bg); border: 0.5px solid var(--border); border-radius: var(--r); padding: 8px;
  display: flex; flex-direction: column; gap: 6px; color: var(--text);
  transition: transform var(--speed) var(--ease), border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease); }
.launcher:hover { border-color: var(--brand-border); transform: translateY(-1px); box-shadow: var(--shadow-hover); text-decoration: none; color: var(--text); }
.launcher-face { flex: 1; border-radius: var(--r); background: var(--brand-light); border: 0.5px solid var(--brand-border);
  display: flex; align-items: center; justify-content: center; padding: 10px; color: var(--brand); min-height: 0; }
.launcher-face svg { width: 100%; height: 100%; max-height: 44px; }
.launcher-name { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; text-align: center; }

.dash-rail { flex: 0 0 192px; min-width: 0; }
.rail details summary { list-style: none; cursor: pointer; }
.rail details summary::-webkit-details-marker { display: none; }

@media (max-width: 720px) {
  .dash-rail { flex: 1 1 100%; }
  .term-body .index-card-lines, .term-prompt { padding-left: 0; }
}

/* ================================================================ LCSH Validator
   From templates/lcsh-validator/LcshValidator.dc.html (FFUI3). */

.lcsh { max-width: 980px; }
.lcsh-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.lcsh-title { font-size: 25px; font-weight: 500; letter-spacing: var(--track-tight); line-height: 1.2; }
.lcsh-sub { font-size: var(--fs-ui); color: var(--text-2); margin-top: 5px; }
.stamp { font-family: var(--mono); font-size: var(--fs-micro); color: var(--text-3); background: var(--bg);
  border: 0.5px solid var(--border-2); border-radius: var(--r); padding: 4px 9px; white-space: nowrap; }

/* Segmented tabs */
.seg { display: flex; gap: 2px; background: var(--bg-3); border: 0.5px solid var(--border-2); border-radius: 9px; padding: 2px; margin-bottom: 14px; flex-wrap: wrap; }
.seg a { font-size: var(--fs-small); font-weight: 500; padding: 5px 13px; border-radius: 7px; border: 0.5px solid transparent; color: var(--text-2); }
.seg a:hover { color: var(--text); text-decoration: none; }
.seg a.on { border-color: var(--border-2); background: var(--bg); color: var(--brand); }

/* SearchBar */
.searchbar { background: var(--bg); border: 0.5px solid var(--border-2); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  overflow: hidden; margin-bottom: 12px; }
.searchbar-row { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 0.5px solid var(--border); }
.searchbar-row svg { color: var(--text-3); flex-shrink: 0; }
.searchbar-row input { flex: 1; min-width: 0; border: none; outline: none; font-size: var(--fs-lead); font-family: var(--sans);
  color: var(--text); background: transparent; font-weight: 300; }
.searchbar-foot { padding: 10px 20px; font-size: var(--fs-small); color: var(--text-3); }

/* Result and record cards */
.panel-card { background: var(--bg); border: 0.5px solid var(--border-2); border-radius: var(--r-lg); padding: 16px 18px;
  margin-bottom: 8px; }
.status-line { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 11px; }
.marc-line { font-family: var(--mono); font-size: 13.5px; line-height: 1.7; overflow-wrap: anywhere; }
.marc-line .tag { color: var(--text-3); }
.marc-line .sf { color: var(--brand); font-weight: 500; }
.interp { font-size: var(--fs-ui); color: var(--text-2); line-height: var(--lh-sub); margin-top: 11px; padding-top: 11px;
  border-top: 0.5px solid var(--border); text-wrap: pretty; }
.grid-table { background: var(--bg); border: 0.5px solid var(--border-2); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 8px; }
.grid-table .gh, .grid-table .gr { display: grid; grid-template-columns: 52px minmax(0,1.3fr) minmax(0,1fr) minmax(0,1.8fr) 96px; gap: 0 14px; padding: 11px 16px; align-items: center; }
.grid-table .gh { background: var(--bg-3); padding: 8px 16px; font-size: var(--fs-label); font-weight: 500; text-transform: uppercase;
  letter-spacing: var(--track-label); color: var(--text-2); border-bottom: 0.5px solid var(--border-2); }
.grid-table .gr + .gr { border-top: 0.5px solid var(--border); }
.grid-table .sfc { font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--brand); }
.grid-table .small { font-size: var(--fs-small); color: var(--text-2); }
.issue { padding: 12px 16px; display: flex; gap: 11px; align-items: flex-start; font-size: var(--fs-ui); color: var(--text-2); line-height: var(--lh-body); }
.issue + .issue { border-top: 0.5px solid var(--border); }
.issue-kind { font-family: var(--mono); font-size: var(--fs-micro); color: var(--text-3); background: var(--bg-2);
  border: 0.5px solid var(--border-2); border-radius: 6px; padding: 2px 7px; flex-shrink: 0; margin-top: 1px; }
.issue-kind.error { color: var(--warn-text); background: var(--warn-bg); border-color: var(--warn-border); }

.divider-label { display: flex; align-items: center; gap: 10px; margin: 0 2px 8px; }
.divider-label .rule { flex: 1; height: 0.5px; background: rgba(0,0,0,0.12); }
.sugg { padding: 14px 16px; display: grid; grid-template-columns: minmax(0,1fr) 168px; gap: 16px; align-items: center; color: var(--text); }
.sugg + .sugg { border-top: 0.5px solid var(--border); }
.sugg:hover { background: #fbfbfa; text-decoration: none; color: var(--text); }
.sugg-name { font-size: 15px; color: var(--brand); font-weight: 500; }
.sugg-meta { font-size: var(--fs-small); color: var(--text-2); margin-top: 5px; }
.score { display: flex; align-items: center; gap: 9px; justify-content: flex-end; }
.score-bar { width: 72px; height: 4px; background: var(--bg-3); border-radius: 2px; overflow: hidden; }
.score-bar span { display: block; height: 100%; background: var(--brand); }
.score b { font-family: var(--mono); font-size: var(--fs-ui); font-weight: 400; width: 26px; text-align: right; }
.fineprint { font-size: var(--fs-small); color: var(--text-3); line-height: var(--lh-body); padding: 0 2px; text-wrap: pretty; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 12px; }
.facts .row-prop { background: none; border: none; padding: 0 0 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-size: var(--fs-small); color: var(--brand); background: var(--brand-light); border: 0.5px solid var(--brand-border);
  border-radius: var(--r); padding: 2px 10px; display: inline-block; transition: background var(--speed-fast) var(--ease); }
a.chip:hover { background: var(--brand-border); text-decoration: none; color: var(--brand); }
.tag-grey { font-size: var(--fs-micro); background: var(--bg-2); border: 0.5px solid var(--border); border-radius: var(--r); padding: 2px 8px; color: var(--text-2); }
.lccn-pill { font-family: var(--mono); font-size: var(--fs-small); color: var(--brand); background: #eef5f2; border: 0.5px solid rgba(15,110,86,0.2);
  border-radius: var(--r); padding: 4px 9px; white-space: nowrap; }
.row-chips { padding: 8px 16px 10px; }

@media (max-width: 720px) {
  .grid-table .gh { display: none; }
  .grid-table .gr { grid-template-columns: 52px 1fr; row-gap: 4px; }
  .sugg { grid-template-columns: 1fr; }
}

/* ================================================================ Archive
   From templates/card-catalog (CardCatalog, CatalogCard) and
   templates/marc-record (MarcRecord), FFUI3. */

.archive { max-width: 1160px; }
.drawer-hint { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.drawer-hint .sp { flex: 1; }
.hint { font-size: var(--fs-small); color: var(--text-3); }

/* Cabinet: three drawer fronts */
.cabinet { position: relative; height: 460px; padding: 10px 0 14px; overflow: hidden; }
.face { position: absolute; top: 14px; left: 50%; margin-left: -310px; width: 620px; height: 430px; background: var(--bg);
  border-radius: var(--r-lg); border: 0.5px solid var(--border-2); cursor: pointer; overflow: hidden; transform-origin: 50% 0;
  transition: transform 0.28s ease, opacity 0.28s ease; box-shadow: var(--shadow); }
.face .inset1, .face .inset2 { position: absolute; border: 0.5px solid var(--border); border-radius: var(--r); pointer-events: none; }
.face .inset1 { inset: 11px; } .face .inset2 { inset: 19px; opacity: 0.6; }
.face .num, .face .cnt { position: absolute; top: 30px; font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; }
.face .num { left: 34px; color: var(--text-3); } .face .cnt { right: 34px; color: var(--brand); }
.face .plate { position: absolute; top: 92px; left: 50%; margin-left: -170px; width: 340px; display: flex; align-items: center; gap: 10px; }
.face .rivet { width: 6px; height: 6px; border-radius: 100px; background: var(--bg-3); border: 0.5px solid var(--border-2); flex-shrink: 0; }
.face .holder { flex: 1; background: var(--bg-2); border: 0.5px solid var(--border-2); border-radius: var(--r); padding: 4px; }
.face .label { background: var(--bg); border: 0.5px solid var(--border); border-radius: 5px; padding: 14px 20px 15px; text-align: center; }
.face .deck { font-family: var(--mono); font-size: 19px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--brand); }
.face .range { font-family: var(--mono); font-size: 12px; color: var(--text-3); margin-top: 5px; }
.face .blurb { position: absolute; top: 226px; left: 50%; margin-left: -170px; width: 340px; text-align: center; font-size: 14px; color: var(--text-2); line-height: 1.6; }
.face .pull { position: absolute; bottom: 54px; left: 50%; margin-left: -84px; width: 168px; height: 34px; background: var(--bg-2);
  border: 0.5px solid var(--border-2); border-radius: 100px; padding: 5px; }
.face .pull div { width: 100%; height: 100%; background: var(--bg-3); border-radius: 100px; box-shadow: inset 0 1px 2px rgba(0,0,0,0.10); }
.face .base { position: absolute; bottom: 30px; left: 34px; right: 34px; height: 0.5px; background: var(--border); }
.face .fhint { position: absolute; bottom: 16px; left: 34px; right: 34px; text-align: center; font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); }
.cab-arrows { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 6px; }

/* Drawer toolbar */
.drawer-bar { position: sticky; top: 44px; z-index: 90; background: var(--bg); border-bottom: 0.5px solid var(--border-2); margin: -24px -20px 20px; }
.drawer-bar-in { max-width: 1160px; margin: 0 auto; padding: 11px 24px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.drawer-bar .sp { flex: 1; }
.seg2 { display: flex; gap: 2px; background: var(--bg-3); border: 0.5px solid var(--border-2); border-radius: var(--r); padding: 2px; }
.seg2 button { display: flex; align-items: center; gap: 6px; font-family: var(--sans); font-size: 12px; font-weight: 500; padding: 4px 12px;
  cursor: pointer; border-radius: 4px; border: 0.5px solid transparent; background: transparent; color: var(--text-2); }
.seg2 button.on { border-color: var(--border-2); background: var(--bg); color: var(--brand); }
.seg2 .n { font-family: var(--mono); font-size: 10px; color: var(--text-3); }
.statpills { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.statpill { font-size: var(--fs-small); color: var(--text-2); background: var(--bg); border: 0.5px solid var(--border-2); border-radius: 100px; padding: 5px 12px; }
.statpill b { font-family: var(--mono); font-weight: 500; color: var(--brand); margin-right: 4px; }

/* Carousel and catalog card */
.carousel { position: relative; height: 440px; padding: 14px 0 18px; overflow: hidden; user-select: none; }
.slot { position: absolute; top: 14px; left: 50%; margin-left: -330px; width: 660px; height: 396px; cursor: pointer; transform-origin: 50% 0;
  transition: transform 0.28s ease, opacity 0.28s ease; }
.ccard { width: 660px; height: 396px; background: var(--bg); border-radius: var(--r); border: 0.5px solid var(--border-2); box-shadow: var(--shadow);
  padding: 22px 26px 0; display: flex; flex-direction: column; position: relative; font-family: var(--mono); overflow: hidden; }
.ccard .top { display: grid; grid-template-columns: 110px 1fr; gap: 14px; min-height: 0; overflow: hidden; }
.ccard .call { font-size: 12px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.ccard .first { font-size: 12px; line-height: 1.6; font-weight: 500; margin-bottom: 2px; color: var(--brand); }
.ccard .main { font-size: 12px; line-height: 1.6; color: var(--text); font-weight: 500; }
.ccard .stmt { font-size: 12px; line-height: 1.6; color: var(--text-2); padding-left: 16px; }
.ccard .coll { font-size: 12px; line-height: 1.6; color: var(--text-3); padding-left: 32px; }
.ccard .trace { margin-top: auto; padding: 10px 0 0 124px; font-size: 11px; line-height: 1.6; color: var(--text-3);
  max-height: 88px; overflow: hidden; }
.ccard .foot { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 9px 0 22px; border-top: 0.5px solid var(--border);
  font-size: 10px; color: var(--text-3); white-space: nowrap; }
.ccard .foot .sp { flex: 1; } .ccard .foot .d { color: var(--text-2); }
.ccard .punch { position: absolute; bottom: 9px; left: 50%; margin-left: -5px; width: 10px; height: 10px; border-radius: 100px;
  background: var(--bg-2); border: 0.5px solid var(--border-2); }
.car-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.car-controls .sp { flex: 1; }
.counter { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.current { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--brand); max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-ticks { display: flex; gap: 1px; align-items: flex-end; height: 22px; margin-top: 16px; }
.rail-ticks div { flex: 1; cursor: pointer; border-radius: 1px; height: 11px; background: #9FE1CB; min-width: 1px; }
.rail-ticks div.on { height: 22px; background: var(--brand); }
.master { display: grid; grid-template-columns: repeat(auto-fill, 540px); gap: 14px; justify-content: start; align-items: start; }
.master .mslot { width: 540px; height: 324px; cursor: pointer; overflow: hidden; }
.master .mslot .ccard { transform: scale(0.8181); transform-origin: 0 0; }

/* Full-record side panel */
.scrim { position: fixed; inset: 0; background: rgba(17,17,16,0.12); z-index: 200; }
.sidepanel { position: fixed; top: 0; right: 0; bottom: 0; width: 470px; max-width: 100vw; z-index: 201; background: var(--bg-2);
  border-left: 0.5px solid var(--border-2); box-shadow: var(--shadow-lg); overflow-y: auto; animation: dsSlideIn 0.18s ease; }
@keyframes dsSlideIn { from { transform: translateX(16px); opacity: 0 } to { transform: none; opacity: 1 } }
.sidepanel-head { position: sticky; top: 0; background: rgba(255,255,255,0.88); backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid var(--border-2); height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.sidepanel-head .sp { flex: 1; }
.sidepanel-body { padding: 16px; }
.head-card { background: var(--bg); border: 0.5px solid var(--border-2); border-radius: var(--r-xl); padding: 18px 20px; margin-bottom: 10px; box-shadow: var(--shadow-lg); }
.head-card .first { font-family: var(--mono); font-size: 12px; color: var(--brand); font-weight: 500; margin-bottom: 8px; }
.head-card .ttl { font-size: 22px; font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 4px; }
.head-card .by { font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.head-card .actions { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 12px; border-top: 0.5px solid var(--border); }

/* MARC record page */
.marcrec { max-width: 960px; }
.rec-head { background: var(--bg); border: 0.5px solid var(--border-2); border-radius: var(--r-xl); padding: 22px 24px; margin-bottom: 10px; box-shadow: var(--shadow-lg); }
.rec-head .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.rec-head .ttl { font-size: 27px; font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; }
.rec-head .by { font-size: 14px; color: var(--text-2); margin-top: 6px; }
.rec-head .pill { font-family: var(--mono); font-size: 11px; color: var(--text-3); background: var(--bg-2); border: 0.5px solid var(--border-2);
  border-radius: var(--r); padding: 3px 8px; white-space: nowrap; flex-shrink: 0; margin-top: 6px; }
.rec-head .meta { font-size: 12px; color: var(--text-2); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rec-head .meta .mono { color: var(--text); }
.rec-head .actions { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 14px; border-top: 0.5px solid var(--border); }
.view-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 10px; }
.view-bar .sp { flex: 1; }
.mtable { background: var(--bg); border: 0.5px solid var(--border-2); border-radius: var(--r-lg); margin-bottom: 8px; overflow: hidden; }
.mtable .mh { background: var(--bg-3); padding: 7px 18px; font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-2); border-bottom: 0.5px solid var(--border-2); }
.mtable .mh.cols { display: grid; grid-template-columns: 44px 40px minmax(0,1fr); gap: 0 14px; }
.mrow { display: grid; grid-template-columns: 44px 40px minmax(0,1fr) 150px; gap: 0 14px; padding: 6px 18px; border-top: 0.5px solid var(--border); align-items: baseline; }
.mrow:hover { background: #fbfbfa; }
.mrow .t { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--brand); }
.mrow .i { font-family: var(--mono); font-size: 12px; color: var(--text-3); white-space: pre; }
.mrow .v { font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
.mrow .v .sf { color: var(--brand); font-weight: 500; }
.mrow .l { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); text-align: right; line-height: 1.5; }
.bytes { border-top: 0.5px solid var(--border); padding: 12px 18px 14px; background: #fbfbfa; }
.bytes .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 8px; }
.bytes .b { border-left: 2px solid #e2e2de; padding-left: 9px; }
.bytes .b .k { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.bytes .b .c { font-family: var(--mono); font-size: 12.5px; color: var(--text); }

@media (max-width: 720px) {
  .face { width: 320px; margin-left: -160px; }
  .face .plate, .face .blurb { width: 260px; margin-left: -130px; }
  .slot, .master .mslot { transform-origin: 0 0; }
  .mrow { grid-template-columns: 40px 34px minmax(0,1fr); }
  .mrow .l { display: none; }
}

/* Version history — templates/record-history/RecordHistory.dc.html (FFUI3) */
.vh-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 0 12px; padding: 13px 16px; align-items: baseline; }
.vh-num { font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--brand); }
.vh-saved { font-size: 14px; }
.vh-meta { font-size: 12px; color: var(--text-2); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.vh-meta .mono { color: var(--text); }
.vh-reason { font-size: 12.5px; color: var(--text-2); margin-top: 7px; }
.vh-reason .eyebrow { margin-right: 7px; }
.vh-note { font-size: 13px; color: var(--text-2); line-height: 1.55; margin-top: 6px; padding-left: 10px; border-left: 2px solid #e2e2de; text-wrap: pretty; }
.vh-baseline { font-family: var(--mono); font-size: 11px; color: var(--text-2); background: var(--bg-2); border: 0.5px solid var(--border-2);
  border-radius: 100px; padding: 3px 9px; white-space: nowrap; }
.vh-foot { padding: 10px 16px; border-top: 0.5px solid var(--border); background: #fbfbfa; font-size: 12px; color: var(--text-3); }
.vh-item + .vh-item { border-top: 0.5px solid var(--border); }
.vh-toggle { margin-top: 9px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--sans); font-size: 12px; font-weight: 500;
  color: var(--brand); background: var(--brand-light); border: 0.5px solid var(--brand-border); border-radius: var(--r); padding: 4px 10px; cursor: pointer; }
.vh-toggle:hover { background: #9FE1CB; }
.vh-toggle .caret::before { content: "▸"; font-family: var(--mono); font-size: 10px; }
.vh-toggle.open .caret::before { content: "▾"; }
.vh-changes { background: #fbfbfa; border-top: 0.5px solid var(--border); padding: 4px 0; }
.vh-change { display: grid; grid-template-columns: 104px minmax(0,1fr); gap: 0 14px; padding: 12px 16px; align-items: start; }
.vh-change + .vh-change { border-top: 0.5px solid var(--border); }
.vh-kind { display: flex; flex-direction: column; gap: 5px; }
.vh-pill { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; padding: 2px 7px; border-radius: 100px; text-align: center;
  background: var(--bg-3); color: var(--text-2); border: 0.5px solid var(--border-2); }
.vh-pill.added { background: #E1F5EE; color: var(--brand); border-color: #9FE1CB; }
.vh-pill.removed { background: var(--err-bg); color: var(--err-text); border-color: var(--err-border); }
.vh-tag { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--text); text-align: center; }
.vh-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 8px; }
.vh-box { border-radius: var(--r); padding: 8px 10px; }
.vh-box.old { background: var(--err-bg); border: 0.5px solid var(--err-border); }
.vh-box.new { background: #eef5f2; border: 0.5px solid #9FE1CB; }
.vh-lab { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 5px; }
.vh-box.old .vh-lab { color: #7c2b28; } .vh-box.new .vh-lab { color: var(--brand); }
.vh-val { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: var(--text); overflow-wrap: anywhere; }
.vh-val .sf { color: var(--brand); font-weight: 500; }
.vh-mark { border-radius: 3px; padding: 0 2px; }
.vh-box.old .vh-mark { background: #f0d6d3; } .vh-box.new .vh-mark { background: #c9ecdd; }
@media (max-width: 720px) { .vh-change { grid-template-columns: 1fr; row-gap: 8px; } }

/* ================================================================ Restyle (FFUI3, 2026-09-25)
   Vocabulary colour answers "which vocabulary is this from": it owns gutters, tag cells,
   section heads and identifiers. Status colour stays on badges and note tags. */
.voc-lcsh { --voc: var(--voc-lcsh); --voc-bg: var(--voc-lcsh-bg); }
.voc-lcnaf { --voc: var(--voc-lcnaf); --voc-bg: var(--voc-lcnaf-bg); }
.voc-lcgft { --voc: var(--voc-lcgft); --voc-bg: var(--voc-lcgft-bg); }
.voc-class { --voc: var(--voc-class); --voc-bg: var(--voc-class-bg); }
.voc-local { --voc: var(--voc-local); --voc-bg: var(--voc-local-bg); }
.voc-obsolete { --voc: var(--voc-obsolete); --voc-bg: var(--voc-obsolete-bg); }
.voc-stripe { display: flex; height: 4px; }
.voc-stripe span { flex: 1; }
.id-chip { font-family: var(--mono); font-size: 11px; color: #fff; background: var(--voc, var(--brand)); border-radius: var(--r);
  padding: 2px 7px; white-space: nowrap; display: inline-block; font-variant-numeric: tabular-nums; }
.section.toned .section-head { background: var(--voc); border-color: var(--voc); color: #fff; font-weight: 600; }
.mrow .t.chip-tag { color: #fff; background: var(--voc); border-radius: 4px; padding: 1px 5px; text-align: center; font-weight: 600; }

/* LCSH Validator — templates/lcsh-validator (restyle) */
.hero-card { background: var(--bg); border: 0.5px solid var(--rule-2); border-top: 5px solid var(--voc, var(--brand)); border-radius: var(--r-lg);
  padding: 16px 18px; margin-bottom: 8px; box-shadow: var(--shadow-lg); }
.status-pill { font-family: var(--mono); font-size: 12px; font-weight: 500; color: #fff; background: var(--voc, var(--brand));
  border-radius: var(--r-pill); padding: 4px 11px; }
.marc-line .sf.voc-lcsh, .marc-line .sf.voc-lcnaf, .marc-line .sf.voc-lcgft, .marc-line .sf.voc-class, .marc-line .sf.voc-local { color: var(--voc); font-weight: 600; }
.tag-chip { font-family: var(--mono); color: #fff; background: var(--voc); border-radius: 4px; padding: 1px 6px; }
.ledger { background: var(--bg); border: 0.5px solid var(--rule-2); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 8px; }
.ledger .lhead, .ledger .lrow { display: grid; grid-template-columns: 74px minmax(0,1.5fr) minmax(0,1.2fr) minmax(0,1.6fr) 96px; gap: 0 14px; }
.ledger .lhead { background: var(--bg-3); padding: 8px 16px 8px 0; font-size: var(--fs-label); font-weight: 500; text-transform: uppercase;
  letter-spacing: var(--track-label); color: var(--text-2); border-bottom: 0.5px solid var(--rule-2); }
.ledger .lhead > :first-child { padding-left: 16px; }
.ledger .lrow { padding-right: 16px; align-items: center; background: var(--voc-bg, var(--ledger-tint)); }
.ledger .lrow + .lrow { border-top: 0.5px solid var(--rule); }
.ledger .gut { font-family: var(--mono); font-size: 14px; font-weight: 600; color: #fff; background: var(--voc, var(--text-3));
  align-self: stretch; display: flex; align-items: center; justify-content: center; padding: 12px 0; }
.ledger .cell { font-size: 13px; padding: 12px 0; }
.ledger .cell-2 { font-size: 12px; color: var(--text-2); padding: 12px 0; }
.ledger a.id-chip:hover { text-decoration: none; opacity: 0.9; }
.notes-card { background: var(--bg); border: 0.5px solid var(--rule-2); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 8px; }
.notes-head { background: var(--voc, var(--text)); padding: 9px 16px; font-size: var(--fs-label); font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--track-section); color: #fff; }
.note-row { padding: 12px 16px; display: flex; gap: 11px; align-items: flex-start; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.note-row + .note-row { border-top: 0.5px solid var(--rule); }
.note-tag { font-family: var(--mono); font-size: 11px; color: var(--text-3); background: var(--bg-2); border: 0.5px solid var(--rule-2);
  border-radius: var(--r); padding: 2px 7px; flex-shrink: 0; margin-top: 1px; }
.note-row.warning { background: var(--warn-bg); color: var(--warn-text); }
.note-row.warning .note-tag { background: var(--warn-text); color: #fff; border-color: transparent; }
.note-row.error { background: var(--err-bg); color: var(--err-text); }
.note-row.error .note-tag { background: var(--danger); color: #fff; border-color: transparent; }
.recent-row { padding: 11px 16px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center;
  border-left: 4px solid var(--voc); background: var(--voc-bg); color: var(--text); }
.recent-row + .recent-row { border-top: 0.5px solid var(--rule); }
.recent-row:hover { text-decoration: none; color: var(--text); filter: brightness(0.98); }
.sugg[class*="voc-"] { border-left: 4px solid var(--voc); }
.sugg-name { color: var(--voc, var(--brand)); }
@media (max-width: 720px) {
  .ledger .lhead { display: none; }
  .ledger .lrow { grid-template-columns: 52px 1fr; row-gap: 0; }
  .ledger .lrow > :nth-child(n+3) { grid-column: 2; padding: 0 0 8px; }
}
.status-pill.sans { font-family: var(--sans); font-size: 11px; padding: 3px 10px; }
.mrow .v .sf[class*="voc-"] { color: var(--voc); font-weight: 600; }

/* ---------------------------------------------------------------- Performance
   FFUI3 templates/performance/Performance.dc.html and RatingChip.dc.html. */

.perf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.perf-title { font-size: var(--fs-title); font-weight: 500; letter-spacing: var(--track-tight); margin: 5px 0 0; }
.perf-sub { font-size: var(--fs-ui); color: var(--text-2); margin-top: 4px; }
.perf-sum { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.perf-score { font-family: var(--mono); font-size: 26px; font-weight: 500; letter-spacing: var(--track-tight); }
.perf-word { font-size: 14px; color: var(--text-2); }
.perf-label { font-size: var(--fs-label); font-weight: 500; text-transform: uppercase; letter-spacing: var(--track-section); color: var(--text-3); }

.rchip { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 500; padding: 2px 8px;
  border-radius: var(--r-pill); white-space: nowrap; border: 0.5px solid var(--border-2); background: var(--bg); color: var(--text-3); }
.rchip-outstanding { background: var(--brand); color: #fff; border-color: var(--brand); }
.rchip-exceeds { background: var(--brand-light); color: var(--brand); border-color: var(--brand-border); }
.rchip-meets { background: var(--bg-2); color: var(--text-2); }
.rchip-unacceptable { background: var(--err-bg); color: var(--err-text); border-color: var(--err-border); }

.perf-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 7px; margin-bottom: 12px; }
.perf-tab { display: flex; flex-direction: column; gap: 4px; padding: 9px 11px; border-radius: var(--r);
  background: var(--bg); border: 0.5px solid var(--border); text-decoration: none; transition: background var(--speed-fast), border-color var(--speed-fast); }
.perf-tab:hover { background: var(--bg-2); border-color: var(--brand-border); text-decoration: none; }
.perf-tab.on { background: var(--brand-light); border-color: var(--brand-border); }
.perf-tab-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.perf-tab-label { font-size: var(--fs-ui); font-weight: 500; color: var(--text); }
.perf-tab-chip { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: var(--track-label); color: var(--text-3); }
.perf-tab-span { font-family: var(--mono); font-size: 10px; color: var(--text-3); }
.perf-tab.on .perf-tab-label, .perf-tab.on .perf-tab-chip { color: var(--brand); }
.perf-tab.on .perf-tab-span { color: var(--text-2); }

.perf-card { background: var(--bg); border: 0.5px solid var(--border-2); border-radius: var(--r-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04); padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.psec { border: 0.5px solid var(--border); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.psec.strong-border { border-color: var(--border-2); }
.psec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px;
  background: var(--bg-3); border-bottom: 0.5px solid var(--border); }
.psec-title { font-size: var(--fs-label); font-weight: 500; text-transform: uppercase; letter-spacing: var(--track-section); color: var(--text-2); }
.psec-crit { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: var(--track-label); color: var(--text-3); margin-left: 9px; }
.psec-body { padding: 13px 14px; }
.psec-body.stack { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.psec-rule { border-bottom: 0.5px solid var(--border); }
.psec-band, .psec-foot { padding: 9px 14px; background: #fbfbfa; font-size: var(--fs-micro); color: var(--text-2); }
.psec-band { border-bottom: 0.5px solid var(--border); }
.psec-foot { border-top: 0.5px solid var(--border); color: var(--text-3); }

.perf-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.perf-big { font-family: var(--mono); font-size: 30px; font-weight: 500; letter-spacing: var(--track-tight); line-height: 1.1; }
.perf-mid { font-family: var(--mono); font-size: 24px; font-weight: 500; letter-spacing: var(--track-tight); line-height: 1.1; margin-top: 5px; }
.perf-note { font-size: var(--fs-micro); color: var(--text-2); }
.perf-h { font-size: var(--fs-micro); font-weight: 500; margin-right: 9px; }
.perf-mono-faint { font-family: var(--mono); font-size: 10px; color: var(--text-3); }
.perf-fine { margin-top: 7px; font-size: 11.5px; color: var(--text-3); line-height: 1.55; }
.perf-fine.pad { margin: 0; padding: 0 11px 9px; }
.perf-foot { margin-top: 11px; padding-top: 9px; border-top: 0.5px solid var(--border); font-size: 11.5px; color: var(--text-3); }
.perf-prose { font-size: var(--fs-micro); line-height: 1.6; color: var(--text-2); max-width: 72ch; display: block; }
.perf-prose.pad { padding: 13px; }
.perf-prose.top { margin-top: 12px; }
.perf-notice { margin-top: 9px; padding: 7px 10px; border-radius: var(--r); background: var(--warn-bg);
  border: 0.5px solid var(--warn-border); color: var(--warn-text); font-size: 11.5px; }
.perf-bar { height: 8px; border-radius: var(--r-pill); background: var(--bg-3); overflow: hidden; margin-top: 12px; }
.perf-bar > div { height: 100%; background: var(--brand); }
.perf-ticks { position: relative; height: 14px; margin-top: 4px; font-family: var(--mono); font-size: 9px; color: var(--text-3); }
.perf-ticks span { position: absolute; top: 0; white-space: nowrap; }
.perf-ticks .mid { transform: translateX(-50%); }
.perf-ticks .end { transform: translateX(-100%); padding-right: 7px; }
.perf-pace { margin-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: #fbfbfa; border: 0.5px solid var(--border); border-radius: var(--r); padding: 9px 11px; }
.perf-pace-n { font-family: var(--mono); font-size: 17px; font-weight: 500; color: var(--brand); margin: 0 4px 0 8px; }

.ptable, .perf-box { border: 0.5px solid var(--border); border-radius: var(--r); overflow: hidden; }
.ptable { margin-top: 10px; }
.perf-box { padding: 11px; margin-top: 11px; }
.perf-box.flush { padding: 0; }
.perf-box.dashed { border-style: dashed; border-color: var(--border-2); background: #fbfbfa; }
.perf-two .perf-box { margin-top: 0; }
.perf-box-head { padding: 8px 11px; background: var(--bg-2); border-bottom: 0.5px solid var(--border);
  font-size: var(--fs-label); font-weight: 500; text-transform: uppercase; letter-spacing: var(--track-section); color: var(--text-2); }
.perf-box-foot { padding: 8px 11px; background: #fbfbfa; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-2); }
.perf-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 9px; margin-top: 11px; }
.perf-est { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: var(--track-label); color: var(--err-text); margin-left: 7px; }
.perf-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 10px; }

.ptr { display: grid; gap: 0 10px; padding: 8px 11px; border-bottom: 0.5px solid var(--border); align-items: baseline; font-size: var(--fs-micro); }
.ptr-head { padding: 7px 11px; background: var(--bg-2); font-size: 9.5px; font-weight: 500; text-transform: uppercase; letter-spacing: var(--track-label); color: var(--text-3); }
.ptr-total { background: #fbfbfa; font-family: var(--mono); font-size: 10.5px; color: var(--text-2); border-bottom: none; }
.ptr-rev { grid-template-columns: 104px minmax(0,1fr) 92px 96px 74px; }
.ptr-rev.rej { background: #fdf7f6; }
.ptr-err { grid-template-columns: 104px 40px minmax(0,1fr) 88px 60px 26px; font-size: 11.5px; padding: 7px 11px; }
.ptr-fail { grid-template-columns: 88px minmax(0,1fr) 26px; align-items: start; }
.ptr-train { grid-template-columns: 88px minmax(0,1fr) 70px 26px; }
.ptr-sum { grid-template-columns: minmax(0,1fr) 92px 126px; padding: 9px 14px; font-size: 12.5px; }
.ptr-sum.ptr-total { font-family: inherit; font-size: var(--fs-ui); padding: 11px 14px; border-bottom: 0.5px solid var(--border); }
.ptr-roll { grid-template-columns: 64px 128px 106px minmax(0,1fr) 92px 126px; padding: 9px 14px; font-size: 12.5px; }
.ptr-roll.ptr-head { padding: 7px 14px; font-size: 9.5px; }
.ptr .r { text-align: right; }
.ptr .clip { min-width: 0; }
.ptr .clip > span { display: block; overflow: hidden; text-overflow: ellipsis; }
.perf-sub2 { font-size: 11px; color: var(--text-2); margin-top: 3px; white-space: normal !important; }
.perf-rej { font-size: 11px; color: var(--err-text); margin-top: 3px; white-space: normal !important; }
.perf-flag { font-size: 11px; color: var(--warn-text); margin-top: 3px; white-space: normal !important; }
.brand { color: var(--brand); }
.strong { font-weight: 500; }
.muted { color: var(--text-2); }
.center { text-align: center; }
.pill { display: inline-block; font-family: var(--mono); font-size: 9.5px; font-weight: 500; padding: 1px 7px; border-radius: var(--r-pill);
  white-space: nowrap; background: var(--bg-2); color: var(--text-2); border: 0.5px solid var(--border-2); }
.pill-ok { background: var(--voc-lcsh-bg); color: #0b5442; border-color: var(--voc-lcsh-border); }
.pill-warn { background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-border); }
.pill-err { background: var(--err-bg); color: var(--err-text); border-color: var(--err-border); }
.pill-brand { background: var(--brand-light); color: var(--brand); border-color: var(--brand-border); }
.x-btn { cursor: pointer; font: inherit; font-size: 13px; line-height: 1; width: 22px; height: 22px; border-radius: var(--r);
  border: 0.5px solid var(--border); background: var(--bg); color: var(--text-3); }
.x-btn:hover { color: var(--danger); border-color: var(--err-border); }
form.inline { display: inline; justify-self: end; }

.perf-trend { display: flex; align-items: flex-end; gap: 10px; height: 66px; border-bottom: 0.5px solid var(--border); padding-bottom: 4px; margin-top: 9px; }
.perf-trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 100%; }
.perf-trend-v { font-family: var(--mono); font-size: 9px; color: var(--text-2); }
.perf-trend-bar { width: 100%; background: #3b7e71; }
.perf-trend-bar.on { background: var(--brand); }
.perf-trend-bar.none { background: var(--bg-3); }
.perf-trend-labels { display: flex; gap: 10px; margin-top: 4px; }
.perf-trend-labels span { flex: 1; text-align: center; font-family: var(--mono); font-size: 9px; color: var(--text-3); }

.perf-errform { padding: 11px; display: grid; grid-template-columns: 118px 76px minmax(150px,1fr) 136px minmax(160px,1.4fr) auto; gap: 8px; align-items: end; }
.perf-errform label { display: flex; flex-direction: column; gap: 4px; }
.perf-errform label > span { font-size: 9.5px; font-weight: 500; text-transform: uppercase; letter-spacing: var(--track-label); color: var(--text-3); }
.perf-errform em { font-style: normal; font-weight: 400; letter-spacing: 0; text-transform: none; }
.perf-addrow { padding: 9px 11px; background: #fbfbfa; display: grid; grid-template-columns: 136px minmax(0,1fr) auto; gap: 8px; align-items: center; }
.perf-none { padding: 9px 11px; border-top: 0.5px dashed var(--border-2); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 11.5px; }
.perf-award { padding: 11px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.perf-award .perf-label { display: block; color: var(--text-2); margin-bottom: 5px; }

@media (max-width: 760px) {
  .perf-errform, .perf-addrow { grid-template-columns: 1fr; }
  .ptr-rev, .ptr-roll { grid-template-columns: 1fr; }
}
.ptr-rev { grid-template-columns: 104px minmax(0,1fr) 92px 96px 74px 26px; }
.ptr.click { cursor: pointer; }
.ptr.click:hover { background: #fbfbfa; }
.ptr-rev.rej.click:hover { background: #faeeec; }
.ptr.editing { box-shadow: inset 3px 0 0 var(--brand); }
.ptable + .perf-box { margin-top: 9px; }
.perf-flexform { padding: 11px; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.perf-flexform.flat { padding: 0; flex: 1 1 380px; }
.perf-flexform label { display: flex; flex-direction: column; gap: 4px; }
.perf-flexform label > span { font-size: 9.5px; font-weight: 500; text-transform: uppercase; letter-spacing: var(--track-label); color: var(--text-3); }
.perf-flexform em { font-style: normal; font-weight: 400; letter-spacing: 0; text-transform: none; }
.perf-rejrow { padding-top: 0; }
.perf-check { flex-direction: row !important; align-items: center; gap: 7px; cursor: pointer; font-size: 11.5px; color: var(--text-2); padding-bottom: 6px; }
.perf-check input { width: 13px; height: 13px; accent-color: var(--err-text); cursor: pointer; }
.perf-save { display: flex; align-items: center; gap: 10px; }
.perf-cancel { font-size: 11.5px; color: var(--text-2); text-decoration: underline; }
.perf-cancel:hover { color: var(--brand); }

/* ---------------------------------------------------------------- MARC Code Lookup
   FFUI3 templates/marc-code-lookup/MarcCodeLookup.dc.html. */

.mcl-asof { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 11.5px; }
.mcl-asof .mono { font-size: 10px; }
.mcl-search { display: flex; flex-direction: column; gap: 5px; padding: 11px 12px 10px; }
.mcl-label { font-size: 9.5px; font-weight: 500; text-transform: uppercase; letter-spacing: var(--track-label); color: var(--text-3); }
.mcl-search input { font: inherit; font-size: 16px; padding: 10px 12px; border: 0.5px solid var(--border-2); border-radius: var(--r);
  background: var(--bg-2); color: var(--text); width: 100%; }
.mcl-search input:focus { outline: none; border-color: var(--brand-border); }
.mcl-filters { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 0 12px 11px; }
.mcl-segs { display: flex; gap: 6px; flex-wrap: wrap; }
.mcl-seg { cursor: pointer; font: inherit; font-size: 12px; font-weight: 500; display: flex; align-items: baseline; gap: 6px;
  padding: 6px 11px; border-radius: var(--r); background: var(--bg); color: var(--text); border: 0.5px solid var(--border);
  transition: background var(--speed-fast), border-color var(--speed-fast); }
.mcl-seg span { font-family: var(--mono); font-size: 10px; font-weight: 400; color: var(--text-3); }
.mcl-seg:hover { background: var(--bg-2); border-color: var(--brand-border); }
.mcl-seg.on { background: var(--brand-light); border-color: var(--brand-border); color: var(--brand); }
.mcl-seg.on span { color: var(--brand); }
.mcl-obs { display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 11.5px; color: var(--text-2); margin-left: auto; }
.mcl-obs input { width: 13px; height: 13px; accent-color: var(--brand); cursor: pointer; margin: 0; }

.mcl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 9px; }
.mcl-card { cursor: pointer; font: inherit; text-align: left; display: flex; flex-direction: column; gap: 7px; padding: 13px;
  border-radius: var(--r); background: var(--bg); border: 0.5px solid var(--border); transition: border-color var(--speed-fast), background var(--speed-fast); }
.mcl-card:hover { border-color: var(--brand-border); background: #fbfbfa; }
.mcl-card .rchip { align-self: flex-start; }
.mcl-card-label { font-size: var(--fs-label); font-weight: 500; text-transform: uppercase; letter-spacing: var(--track-section); color: var(--text-2); }
.mcl-card-n { font-family: var(--mono); font-size: 26px; font-weight: 500; letter-spacing: var(--track-tight); line-height: 1; }
.mcl-small { font-size: 10px; }
.mcl-hint { font-size: 12px; color: var(--text-3); line-height: 1.6; max-width: 90ch; }
#mcl-blank .mcl-hint { margin-top: 10px; }
.mcl-empty { border: 0.5px dashed var(--border-2); border-radius: var(--r); background: #fbfbfa; padding: 30px 16px;
  text-align: center; font-size: var(--fs-ui); color: var(--text-2); }
.mcl-empty .mcl-small { font-size: 11.5px; margin-top: 6px; }
#mcl-results { display: flex; flex-direction: column; gap: 10px; }
#mcl-results:empty { display: none; }

.mcl-note { padding: 8px 14px; background: var(--warn-bg); border-bottom: 0.5px solid var(--warn-border); font-size: 11.5px;
  color: var(--warn-text); line-height: 1.55; }
.mcl-row { display: grid; grid-template-columns: 126px minmax(0, 1fr) 104px 98px 86px; gap: 0 10px; padding: 8px 14px;
  border-bottom: 0.5px solid var(--border); align-items: baseline; background: var(--bg); font-size: 12.5px; }
.mcl-row:last-child { border-bottom: 0; }
.mcl-th { padding: 7px 14px; background: var(--bg-2); font-size: 9.5px; font-weight: 500; text-transform: uppercase;
  letter-spacing: var(--track-label); color: var(--text-3); }
.mcl-th .r { text-align: right; }
.mcl-code { font-family: var(--mono); font-weight: 600; }
.mcl-name { min-width: 0; }
.mcl-field { display: inline-block; font-family: var(--mono); font-size: 10px; padding: 1px 7px; border-radius: var(--r-pill);
  white-space: nowrap; background: var(--bg-2); color: var(--text-3); border: 0.5px solid rgba(0,0,0,0.12); }
.mcl-row.obs { background: #fbfbfa; }
.mcl-row.obs .mcl-code, .mcl-row.obs .mcl-name { color: var(--text-2); }
.mcl-row.cur.exact { background: #f1f8f5; box-shadow: inset 2px 0 0 var(--brand); }
.mcl-row.cur.exact .mcl-code { color: #0b5442; }
.mcl-row.obs.exact { background: #fdf7f6; box-shadow: inset 2px 0 0 var(--err-text); }
.mcl-row.obs.exact .mcl-code { color: var(--err-text); }
.mcl-acts { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.mcl-copy { cursor: pointer; font-family: var(--mono); font-size: 10px; font-weight: 500; padding: 3px 8px; border-radius: var(--r);
  background: var(--bg); color: var(--text-2); border: 0.5px solid var(--border-2); white-space: nowrap;
  transition: color var(--speed-fast), border-color var(--speed-fast); }
.mcl-copy:hover { color: var(--brand); border-color: var(--brand-border); }
.mcl-copy.done { background: var(--brand-light); color: var(--brand); border-color: var(--brand-border); }
.mcl-lc { text-decoration: none; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  border-radius: var(--r); border: 0.5px solid var(--border); background: var(--bg); color: var(--text-3); font-size: 11px; }
.mcl-lc:hover { color: var(--brand); border-color: var(--brand-border); text-decoration: none; }
.mcl-trunc { padding: 8px 14px; background: #fbfbfa; font-family: var(--mono); font-size: 10.5px; color: var(--text-3);
  border-top: 0.5px solid var(--border); }

@media (max-width: 640px) {
  .mcl-row { grid-template-columns: 80px minmax(0, 1fr) 64px; }
  .mcl-row > :nth-child(3), .mcl-row > :nth-child(4) { display: none; }
  .mcl-obs { margin-left: 0; }
}

/* ---------------------------------------------------------------- Cutter
   FFUI3 templates/cutter/Cutter.dc.html. Shares .mcl-* with the MARC Code Lookup. */

.cut-inputs { display: flex; flex-wrap: wrap; gap: 9px; align-items: flex-end; padding: 11px 12px; }
.cut-inputs label { display: flex; flex-direction: column; gap: 5px; }
.cut-word { flex: 1 1 300px; }
.cut-init { flex: 0 0 150px; }
.cut-opt { font-weight: 400; letter-spacing: 0; text-transform: none; }
.cut-inputs input { font: inherit; font-size: 16px; padding: 10px 12px; border: 0.5px solid var(--border-2); border-radius: var(--r);
  background: var(--bg-2); color: var(--text); width: 100%; }
.cut-inputs input:focus { outline: none; border-color: var(--brand-border); }
.cut-init input { font-family: var(--mono); text-align: center; text-transform: uppercase; }
.cut-go { display: flex; align-items: center; gap: 10px; padding-bottom: 1px; }
.cut-go .btn { padding: 11px 20px; }
.cut-clear { font-size: 11.5px; color: var(--text-2); text-decoration: underline; }
.cut-clear:hover { color: var(--brand); }
.cut-hint { padding: 0 12px 11px; font-size: 11.5px; color: var(--text-3); line-height: 1.6; max-width: 84ch; }

.cut-big { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 14px 15px; }
.cut-num { font-family: var(--mono); font-size: 52px; font-weight: 500; letter-spacing: var(--track-tight); line-height: 1; color: #0b5442; }
.cut-copy { font-size: 11px; padding: 6px 12px; }
.cut-line { padding: 0 14px 14px; font-size: 12.5px; color: var(--text-2); line-height: 1.65; }
.cut-ink { color: var(--text); }
.cut-filed { padding: 0 14px 14px; font-size: 11.5px; color: var(--warn-text); }
.cut-strip-wrap { padding: 12px 14px; border-top: 0.5px solid var(--border); background: #fbfbfa; }
.cut-strip-wrap .mcl-label { display: block; margin-bottom: 9px; }
.cut-strip { display: flex; align-items: stretch; gap: 7px; flex-wrap: wrap; }
.cut-e, .cut-en { display: flex; flex-direction: column; gap: 2px; font-family: var(--mono); font-size: 13px; }
.cut-e { padding: 9px 12px; border-radius: var(--r); background: var(--bg); border: 0.5px solid var(--border); color: var(--text-2); }
.cut-e.hit { flex-direction: row; align-items: center; gap: 9px; background: var(--brand-light); border-color: var(--brand); color: #0b5442; font-weight: 600; }
.cut-mark { font-family: var(--sans); font-weight: 400; font-size: 12px; color: var(--brand); padding-left: 9px; border-left: 0.5px solid var(--brand-border); }
.cut-cap { margin-top: 9px; font-size: 11.5px; color: var(--text-3); }
.cut-none { border-color: var(--err-border); background: #fdf7f6; color: var(--err-text); }

.cut-rules summary { cursor: pointer; list-style: none; }
.cut-rules summary::-webkit-details-marker { display: none; }
.cut-rules:not([open]) summary { border-bottom: 0; }
.cut-toggle { font-size: 11.5px; color: var(--text-2); }
.cut-toggle::after { content: "Show"; }
.cut-rules[open] .cut-toggle::after { content: "Hide"; }
.cut-rules summary:hover .cut-toggle { color: var(--brand); }
.cut-rule-grid { padding: 12px 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
.cut-rule { border: 0.5px solid var(--border); border-radius: var(--r); padding: 11px; }
.cut-rule-t { font-size: 11.5px; font-weight: 500; }
.cut-rule-b { font-size: 12px; color: var(--text-2); line-height: 1.6; margin-top: 5px; }
.cut-cite { font-size: 10px; color: var(--text-3); margin-top: 7px; font-style: italic; }

.cut-rrow { display: grid; grid-template-columns: minmax(0, 1fr) 128px 96px 86px; gap: 0 10px; padding: 8px 14px;
  border-bottom: 0.5px solid var(--border); align-items: baseline; font-size: 12.5px; }
.cut-rword { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cut-rcut { color: #0b5442; }
.cut-rent { font-size: 10.5px; }
.cut-empty { padding: 22px 14px; text-align: center; font-size: 12px; color: var(--text-3); }
@media (max-width: 640px) { .cut-rrow { grid-template-columns: minmax(0, 1fr) 80px 70px; } .cut-rent { display: none; } }

/* ---------------------------------------------------------------- List of Classes
   FFUI3 templates/list-of-classes/ListOfClasses.dc.html. Shares .mcl-* with the MARC Code Lookup. */

.loc-bar { display: flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; padding: 0 12px 10px; }
.loc-checks { align-items: center; gap: 16px; padding-bottom: 11px; }
.loc-checks .mcl-obs { margin-left: 0; }
.loc-guess { font-size: 11.5px; margin-left: auto; }
.loc-agency { flex: 0 0 240px; display: flex; flex-direction: column; gap: 4px; margin-left: auto; }
.loc-agency select { font: inherit; font-size: 12px; padding: 6px 8px; border: 0.5px solid var(--border-2); border-radius: var(--r);
  background: var(--bg-2); color: var(--text); width: 100%; }
#loc-results { display: flex; flex-direction: column; gap: 10px; }
.mcl-card.static { cursor: default; gap: 6px; }
.mcl-card.static:hover { border-color: var(--border); background: var(--bg); }
.loc-try { margin-top: 11px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; }
.loc-tryb { font-family: var(--mono); font-size: 11px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--bg);
  border: 0.5px solid var(--border-2); color: var(--text-2); text-decoration: none; }
.loc-tryb:hover { color: var(--brand); border-color: var(--brand-border); text-decoration: none; }
.loc-miss { padding: 15px 14px; font-size: 12.5px; color: var(--text-2); line-height: 1.7; max-width: 80ch; }
.loc-near { padding: 0 14px 15px; }
.loc-near .mcl-label { display: block; margin-bottom: 8px; }
.loc-near-row { display: flex; gap: 7px; flex-wrap: wrap; }
.loc-stem { font-family: var(--mono); font-size: 12px; padding: 6px 11px; border-radius: var(--r); background: var(--bg);
  border: 0.5px solid var(--border-2); text-decoration: none; }
.loc-stem:hover { border-color: var(--brand-border); text-decoration: none; }
.loc-count { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; font-weight: 500; }
.loc-count .faint { font-size: 11.5px; font-weight: 400; }
.loc-trunc { border: 0.5px solid var(--border); border-radius: var(--r); }
.loc-sub { padding: 7px 14px; background: #fbfbfa; border-bottom: 0.5px solid var(--border); font-size: 11px; color: var(--text-2); }
.loc-row { display: grid; grid-template-columns: 118px minmax(0, 1fr) 92px 72px 104px 108px; gap: 0 10px; padding: 8px 14px;
  border-bottom: 0.5px solid var(--border); align-items: baseline; background: var(--bg); font-size: 12.5px; }
.loc-row.mcl-th { padding: 7px 14px; background: var(--bg-2); font-size: 9.5px; }
.loc-row.exact { background: #f1f8f5; box-shadow: inset 2px 0 0 var(--brand); }
.loc-row.exact .loc-cls { color: #0b5442; }
.loc-cls { cursor: pointer; text-align: left; font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--text);
  background: none; border: 0; padding: 0; }
.loc-cls:hover { color: var(--brand); }
.loc-row .mcl-name { line-height: 1.45; }
.loc-geo { margin: 4px 4px 0 0; font-size: 9.5px; }
.loc-shared { display: block; margin-top: 4px; font-family: var(--mono); font-size: 10.5px; color: var(--text-3); }
.loc-freq { font-size: 11.5px; color: var(--text-2); }
.loc-item { font-size: 11.5px; color: var(--text-2); }
.loc-cut { font-size: 10.5px; white-space: nowrap; text-decoration: none; }
.loc-fam { border-bottom: 0.5px solid var(--border); background: #fbfbfa; padding: 10px 14px 11px; }
.loc-fam-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.loc-hide { cursor: pointer; font: inherit; font-size: 11px; padding: 0; border: 0; background: none; color: var(--text-2); text-decoration: underline; }
.loc-hide:hover { color: var(--brand); }
.loc-fam-box { border: 0.5px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--bg); max-height: 420px; overflow-y: auto; }
.loc-frow { display: grid; grid-template-columns: 118px minmax(0, 1fr) 92px 72px 104px; gap: 0 10px; padding: 7px 12px;
  border-bottom: 0.5px solid var(--border); align-items: baseline; font-size: 12px; color: var(--text-2); }
.loc-frow:last-child { border-bottom: 0; }
.loc-frow .mcl-code { font-size: 12px; color: var(--text); }
.loc-frow .mono { font-size: 10.5px; }
@media (max-width: 760px) {
  .loc-row, .loc-frow { grid-template-columns: 96px minmax(0, 1fr) 70px; }
  .loc-row > :nth-child(3), .loc-row > :nth-child(4), .loc-row > :nth-child(5),
  .loc-frow > :nth-child(3), .loc-frow > :nth-child(4) { display: none; }
  .loc-agency { flex: 1 1 100%; margin-left: 0; }
}

/* ---------------------------------------------------------------- Inspector
   FFUI3 templates/inspector/Inspector.dc.html. Shares .mcl-* and .psec*. */

.insp-run { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.insp-rerun { font-family: var(--sans); font-size: 11.5px; padding: 6px 12px; }
.insp-needs { border: 0.5px solid var(--err-border); border-radius: var(--r); background: var(--err-bg); color: var(--err-text); }
.insp-needs-h { padding: 8px 13px; border-bottom: 0.5px solid var(--err-border); font-size: var(--fs-label); font-weight: 500;
  text-transform: uppercase; letter-spacing: var(--track-section); }
.insp-needs-b { padding: 11px 13px; font-size: 12.5px; line-height: 1.65; }
.insp-needs-n { padding: 0 13px 11px; font-size: 11.5px; color: #8e5b57; }
.insp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 9px; }
.insp-tile { display: flex; flex-direction: column; gap: 6px; padding: 13px; border-radius: var(--r); background: var(--bg); border: 0.5px solid var(--border); }
.insp-tile.err { background: var(--err-bg); border-color: var(--err-border); }
.insp-tile.err > * { color: var(--err-text); }
.insp-tile.warn { background: var(--warn-bg); border-color: var(--warn-border); }
.insp-tile.warn > * { color: var(--warn-text); }
.insp-owners { font-size: 11.5px; margin-top: -2px; }
.insp-filters { padding: 11px 12px; display: flex; flex-direction: row; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.insp-fgroup { display: flex; flex-direction: column; gap: 5px; }
.insp-fgroup .mcl-seg { text-decoration: none; }
.insp-sev { display: flex; gap: 14px; align-items: center; padding-bottom: 6px; }
.insp-sev .mcl-obs { margin-left: 0; }
.insp-find { flex: 1 1 220px; display: flex; flex-direction: column; gap: 5px; margin-left: auto; }
.insp-find input { font-family: var(--mono); font-size: 12px; padding: 7px 10px; border: 0.5px solid var(--border-2);
  border-radius: var(--r); background: var(--bg-2); color: var(--text); width: 100%; }
.insp-find input:focus { outline: none; border-color: var(--brand-border); }
.insp-fline { flex-basis: 100%; font-size: 11.5px; }
.insp-rec { display: flex; align-items: center; gap: 10px; }
.insp-rec a { font-size: 13px; font-weight: 600; text-decoration: none; }
.insp-und, .insp-warnchip { background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-border); }
.insp-row { display: grid; grid-template-columns: 62px 90px minmax(0, 1fr) 150px; gap: 0 10px; padding: 10px 14px;
  border-bottom: 0.5px solid var(--border); align-items: start; background: var(--bg); }
.insp-row:last-child { border-bottom: 0; }
.insp-tag { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 2px 7px;
  border-radius: var(--r-pill); background: var(--bg-2); border: 0.5px solid var(--border-2); }
.insp-body { min-width: 0; }
.insp-msg { display: block; font-size: 12.5px; line-height: 1.6; }
.insp-cite { display: block; margin-top: 5px; font-size: 10.5px; font-style: italic; color: var(--text-3); line-height: 1.5; }
.insp-q summary { cursor: pointer; list-style: none; display: inline-block; margin-top: 5px; font-size: 10.5px;
  color: var(--text-2); text-decoration: underline; }
.insp-q summary::-webkit-details-marker { display: none; }
.insp-q summary:hover { color: var(--brand); }
.insp-q .hide, .insp-q[open] .show { display: none; }
.insp-q[open] .hide { display: inline; }
.insp-q blockquote { margin: 7px 0 0; padding: 9px 11px; border-left: 2px solid rgba(0,0,0,0.12); background: #fbfbfa;
  border-radius: 0 var(--r) var(--r) 0; font-size: 11.5px; color: var(--text-2); line-height: 1.65; }
.insp-act { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.insp-mark { cursor: pointer; font: inherit; font-size: 11px; font-weight: 500; padding: 6px 11px; border-radius: var(--r);
  border: 0.5px solid var(--brand-border); background: var(--brand-light); color: var(--brand); white-space: nowrap; }
.insp-mark:hover { background: var(--bg); }
.insp-undo { cursor: pointer; font: inherit; font-size: 10.5px; padding: 0; border: 0; background: none; color: var(--text-2); text-decoration: underline; }
.insp-undo:hover { color: var(--brand); }
.insp-row.fixed { background: #fbfbfa; }
.insp-row.fixed .insp-msg, .insp-row.fixed .insp-tag { color: var(--text-3); }
.insp-row.fixed .insp-cite { color: #b8b7b2; }
.insp-row.cleared { background: #fbfbfa; }
.insp-row.cleared .insp-msg { color: #b8b7b2; text-decoration: line-through; text-decoration-color: rgba(0,0,0,0.18); }
.insp-row.cleared .insp-cite, .insp-row.cleared .insp-tag { color: #c9c8c4; }
@media (max-width: 700px) {
  .insp-row { grid-template-columns: 54px minmax(0, 1fr); gap: 6px 10px; }
  .insp-row > :nth-child(2) { display: none; }
  .insp-act { grid-column: 2; align-items: flex-start; }
}

/* ---------------------------------------------------------------- Numbers
   FFUI3 templates/numbers/Numbers.dc.html. Tiles share .insp-tile. */

.nums-actions { display: flex; gap: 7px; align-items: center; }
.nums-actions a { text-decoration: none; }
.nums-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 9px; }
.nums-now { background: var(--brand-light); border-color: var(--brand-border); }
.nums-now > * { color: var(--brand); }
.nums-now .mcl-card-n { color: #0b5442; }
.nums-quiet { background: #fbfbfa; border-style: dashed; border-color: var(--border-2); }
.nums-quiet > * { color: var(--text-3); }
.nums-chart-wrap { padding: 14px; }
.nums-chart { display: flex; align-items: flex-end; gap: 5px; height: 158px; border-bottom: 0.5px solid rgba(0,0,0,0.14); padding-bottom: 2px; }
.nums-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.nums-v { font-family: var(--mono); font-size: 9.5px; color: var(--text-2); }
.nums-bar { width: 100%; background: var(--brand); min-height: 2px; max-height: calc(100% - 16px); }
.nums-bar.open { background: repeating-linear-gradient(45deg, var(--brand) 0 1.5px, var(--brand-light) 1.5px 4px);
  outline: 0.5px solid var(--brand); outline-offset: -0.5px; }
.nums-bar.zero { background: none; border: 0.7px dashed var(--err-border); }
.nums-labels { display: flex; gap: 5px; margin-top: 5px; }
.nums-labels span { flex: 1; min-width: 0; text-align: center; font-family: var(--mono); font-size: 8.5px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nums-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1.6fr); gap: 0 12px; padding: 7px 14px;
  border-top: 0.5px solid var(--border); align-items: center; font-size: 12px; }
.nums-row .r, .nums-th .r { text-align: right; }
.nums-th { background: var(--bg-2); font-size: 9.5px; font-weight: 500; text-transform: uppercase; letter-spacing: var(--track-label); color: var(--text-3); }
.nums-share { display: block; height: 4px; background: transparent; }
.nums-share i { display: block; height: 100%; background: var(--brand-border); }
.nums-edits { border-style: dashed; border-color: var(--border-2); background: #fbfbfa; }
.nums-edits .psec-head { background: transparent; border-bottom-style: dashed; }
.nums-edits .psec-title { color: var(--text-3); }
.nums-edits-b { padding: 13px 14px 6px; font-size: 12px; color: var(--text-3); line-height: 1.7; max-width: 82ch; }
.nums-edits-n { padding: 0 14px 13px; font-size: 11.5px; color: var(--text-3); }
.nums-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 10px; align-items: start; }
.nums-brow { padding: 8px 13px; border-bottom: 0.5px solid var(--border); }
.nums-brow > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12px; line-height: 1.45; }
.nums-brow .nums-share { height: 3px; margin-top: 5px; }
.nums-grid .psec-foot { font-size: 11px; line-height: 1.55; }
.nums-foot { border-top: 0.5px solid var(--border); padding-top: 10px; max-width: 88ch; }

/* Task: the blurb header row (end time, onsite, leave). */
.task-dayform { gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-2); border-top: 0.5px dashed var(--border); }
.task-dayform label { display: flex; align-items: center; gap: 5px; }
textarea.task-desc { resize: none; min-height: 28px; max-height: 220px; font: inherit; line-height: 1.4; }
