/* Workbook registers share the office shell, typography and colours. */
.reg-head { align-items: flex-end; gap: 16px; }
.reg-actions, .head-actions, .reg-related { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.reg-actions .primary, .reg-actions .secondary { min-height: 40px; }
.reg-nav, .file-subnav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 20px; border-bottom: 1px solid var(--line); }
.reg-tabs, .file-subnav { display: flex; gap: 4px; }
.reg-tabs a, .file-subnav a { display: inline-flex; flex: none; align-items: center; min-height: 44px; padding: 5px 11px; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 600; white-space: nowrap; font-size: 14px; }
.reg-tabs a:hover, .file-subnav a:hover { color: var(--teal); }
.reg-tabs a[aria-current], .file-subnav a[aria-current] { color: var(--teal); border-color: var(--teal); }
.file-subnav { justify-content: flex-start; overflow-x: auto; }
.reg-nav select, .reg-filter select, .reg-filter input[type=date] { min-height: 38px; max-width: 100%; padding: 4px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 13px; }
.reg-nav select { border: 0; background: transparent; color: var(--teal); max-width: 175px; }
.reg-list, .register-scroll, .record-sections { min-width: 0; max-width: 100%; }
.reg-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.reg-filter .search-box { flex: 1 1 230px; max-width: 390px; min-height: 39px; }
.reg-filter>label:not(.search-box) { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.reg-caption { display: flex; align-items: center; justify-content: space-between; min-height: 47px; gap: 10px; font-size: 13px; color: var(--muted); }
.reg-columns { display: inline-flex; align-items: center; gap: 6px; color: var(--teal); min-height: 38px; font-size: 13px; }
.reg-columns .icon, .reg-actions .icon { width: 17px; height: 17px; }
.register-scroll { overflow: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; border-block: 1px solid var(--line); }
.register-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; text-align: right; background: var(--surface); }
.register-table thead { color: var(--muted); background: #edf1ed; }
.register-table th, .register-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; text-align: right; }
.register-table th { font-weight: 600; font-size: 12px; }
.register-table tr:last-child td { border-bottom: 0; }
.register-table td.reg-subject { white-space: normal; min-width: 170px; max-width: 300px; overflow-wrap: anywhere; }
.register-table td:first-child, .register-table th:first-child { position: sticky; inset-inline-start: 0; z-index: 1; }
.register-table td:first-child { background: #fff; color: var(--teal); font-weight: 600; }
.register-table th:first-child { background: #edf1ed; }
.register-table tr[data-row-href] { cursor: pointer; }
.register-table tr[data-row-href]:hover td { background: #f0f5f0; }
.register-table a:hover, .reg-related a:hover { text-decoration: underline; }
.register-table td a { display: inline-flex; min-height: 25px; align-items: center; }
.register-table .text-link { font-size: inherit; }
.register-table.is-wide td { max-width: 350px; white-space: normal; }
.register-table.is-wide td:not(.reg-subject) { min-width: 105px; }
.reg-status { font-size: 12px; white-space: nowrap; padding: 2px 6px; border-radius: 4px; color: #46575a; background: #edf0ef; }
.reg-status.warn { color: #83452d; background: #f6ece2; }
.reg-status.good { color: var(--teal); background: var(--teal-pale); }
.reg-progress, .bar-row { display: inline-flex; align-items: center; gap: 8px; }
.reg-progress meter { width: 48px; }
meter { accent-color: var(--teal); }
.reg-null { color: var(--faint); }
.reg-metrics, .report-metrics { margin: 10px 0 20px; padding: 12px 0; display: grid; gap: 12px; grid-template-columns: repeat(3,minmax(0,1fr)); border-block: 1px solid var(--line); }
.reg-metrics dt, .report-metrics dt { color: var(--muted); font-size: 13px; }
.reg-metrics dd, .report-metrics dd { margin: 3px 0; color: var(--navy); font-weight: 600; font-size: 21px; }
.reg-metrics>div:last-child dd { color: var(--teal); }
.report-metrics { grid-template-columns: repeat(6,minmax(0,1fr)); row-gap: 16px; }
.record-sections { display: grid; gap: 15px 24px; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
.record-section { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.record-section h2 { font-size: 19px; margin-bottom: 10px; }
.record-section dl { margin: 0; }
.record-section dl>div { display: grid; grid-template-columns: minmax(115px,36%) minmax(0,1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.record-section dt { font-size: 13px; color: var(--muted); }
.record-section dd { font-size: 14px; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.reg-note, .reg-empty { padding: 13px 0; color: var(--muted); }
.reg-actions .text-link, .head-actions .text-link { min-height: 40px; }
.reg-conflict { max-width: 460px; margin-bottom: 12px; }
.reg-related { margin-bottom: 16px; }
.report-charts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.report-charts section { padding-inline: 6px; }
.report-charts h3 { margin: 4px 0 8px; }
.bar-row { display: grid; grid-template-columns: minmax(70px,1fr) minmax(40px,1fr) 22px; padding: 2px 0; font-size: 13px; }
.bar-row meter { width: 100%; }
.register-title { margin: 22px 0 9px; font-size: 20px; }
#register-settings { max-width: 940px; }
#register-settings .record-section { margin: 14px 0; }
.settings-lists { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 16px; }
.settings-lists details { padding: 7px 0; border-top: 1px solid var(--line); }
.settings-lists summary { cursor: pointer; }
.settings-lists summary small { color: var(--muted); margin-inline-start: 4px; }
.guide-list { max-width: 760px; }
.guide-list article { padding: 14px 0; border-bottom: 1px solid var(--line); }
.guide-list h2 { font-size: 18px; margin: 0 0 4px; }
.guide-list p { color: var(--muted); }
.register-dialog { width: min(680px,calc(100vw - 24px)); }
.register-dialog .field>span small { color: var(--faint); font-size: 11px; font-weight: 400; }
@media (max-width: 760px) {
  .reg-head { display: block; margin-block: 14px 8px; }
  .reg-head h1 { font-size: 26px; }
  .reg-actions { margin-top: 9px; gap: 5px; }
  .reg-actions button { padding: 5px 9px; font-size: 13px; }
  .reg-nav { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px; margin-bottom: 11px; }
  .reg-tabs, .file-subnav { min-width: 0; overflow-x: auto; scrollbar-width: thin; }
  .reg-tabs a, .file-subnav a { padding: 4px 7px; min-height: 38px; font-size: 13px; }
  .reg-nav select { max-width: 115px; font-size: 11px; padding-inline: 0; }
  .reg-filter { gap: 4px; }
  .reg-filter .search-box { min-width: 90px; flex: 1 1 128px; }
  .reg-filter .search-box input { font-size: 14px; }
  .reg-filter select { padding-inline: 2px; max-width: 110px; }
  .reg-caption { min-height: 36px; }
  .register-table td, .register-table th { padding: 9px 8px; }
  .register-table td.reg-subject { min-width: 140px; }
  .record-sections, .report-charts { grid-template-columns: 1fr; gap: 12px; }
  .record-section { padding: 12px; }
  .reg-metrics, .report-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 6px 0 12px; }
  .reg-metrics dt, .report-metrics dt { font-size: 11px; }
  .reg-metrics dd, .report-metrics dd { font-size: 16px; }
  .settings-lists { grid-template-columns: 1fr; }
  .register-dialog { width: 100%; }
}
.reg-jump { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.reg-jump span { white-space: nowrap; }
@media (max-width: 760px) {
  .reg-nav { display: flex; justify-content: flex-start; margin-block: 4px 9px; }
  .reg-tabs { display: none; }
  .reg-jump { width: 100%; justify-content: space-between; padding-block: 2px; }
  .reg-jump span { font-weight: 600; color: var(--ink); }
  .reg-jump select { max-width: min(80%, 270px); min-width: 130px; font-size: 14px; }
  .file-subnav { flex-wrap: wrap; column-gap: 4px; }
}
