


*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --control-h: 30px;
}

html {
  color-scheme: dark;
}

html,
body {
  height: 100%;
  margin: 0;
}

.shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--app);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

.topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 53px;
  padding: 0 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--hair);
}

.topbar .logo {
  height: 21px;
}

.topbar .rule {
  width: 1px;
  height: 22px;
  background: var(--hair2);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-name {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-sub {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint);
  line-height: 1.2;
}

.version {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 20px;
  padding: 0 8px;
  border: 1px solid var(--hair2);
  border-radius: var(--r4);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.version .commit {
  color: var(--faint);
}

button.version {
  background: transparent;
  cursor: pointer;
}

button.version:hover {
  color: var(--ink);
  border-color: var(--hair);
}

.changelog {
  max-height: 52vh;
  overflow-y: auto;
}

.changelog .release {
  display: flex;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hair);
}

.changelog .release:last-child {
  border-bottom: none;
}

.changelog .rel-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 92px;
  flex-shrink: 0;
}

.changelog .release p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.grow {
  flex: 1 1 0;
  min-width: 0;
}

.search {
  flex: 1 1 auto;
  min-width: 40px;
  max-width: 330px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--control-h);
  padding: 0 10px;
  background: var(--app);
  border: 1px solid var(--hair2);
  border-radius: var(--r5);
  color: var(--faint);
  font-family: var(--font-sans);
  font-size: 12.5px;
  text-align: left;
}

.search span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 5px;
  border: 1px solid var(--hair2);
  border-radius: var(--r4);
  flex-shrink: 0;
}

.bell {
  position: relative;
  width: var(--control-h);
  height: var(--control-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--app);
  border: 1px solid var(--hair2);
  border-radius: var(--r5);
  color: var(--muted);
  flex-shrink: 0;
}

.acct {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 53px;
  margin-right: -16px;
  padding: 0 16px 0 12px;
  background: transparent;
  border: none;
  border-left: 1px solid var(--hair);
  color: var(--ink);
  font-family: var(--font-sans);
  white-space: nowrap;
  flex-shrink: 0;
}

.acct .who {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
}

.acct-name {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
}

.acct-role {
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--faint);
  line-height: 1.2;
}

.avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 600;
}

.health {
  flex-shrink: 0;
  height: var(--accent-bar);
  background: var(--ok);
}

.health.warn {
  background: var(--warn);
}

.health.danger {
  background: var(--danger);
}

.frame {
  flex: 1;
  display: flex;
  min-height: 0;
}

.sidebar {
  flex-shrink: 0;
  width: var(--sidebar);
  background: var(--paper);
  border-right: 1px solid var(--hair);
  overflow-y: auto;
  padding: 12px 0 40px;
}

.nav-group {
  margin-bottom: 4px;
}

.nav-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 6px;
}

.nav-head span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint);
}

.line {
  flex: 1;
  height: 1px;
  background: var(--hair);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  border-left: 2px solid transparent;
}

.nav-item:hover {
  background: var(--hover);
  color: var(--ink);
  text-decoration: none;
}

.nav-item span:first-child {
  flex: 1;
}

.nav-item .badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
}

.nav-item[aria-current] {
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-tint);
  border-left-color: var(--brand);
}

.nav-item[aria-current] .badge {
  color: inherit;
}


span.nav-item,
span.nav-item:hover {
  color: var(--faint);
  background: transparent;
  cursor: not-allowed;
}

.sidebar .sep {
  margin: 14px 18px 0;
  padding-top: 12px;
  border-top: 1px solid var(--hair);
}

.kill {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: var(--control-h);
  padding: 5px 10px;
  background: var(--danger-tint);
  border: 1px solid var(--danger);
  border-radius: var(--r5);
  color: var(--danger-ink);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
}

.kill span:last-child {
  flex: 1;
}

.sq {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  background: currentColor;
}

.clock {
  font-size: 11px;
  line-height: 1.5;
  color: var(--faint);
}

.clock .time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  margin-top: 3px;
}

.main {
  flex: 1;
  overflow: auto;
}

/* Keep narrow-window scrolling on the page, not on each table or tab strip. */
.page {
  width: var(--container);
  margin: 0 auto;
  padding: 24px 28px 120px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.page-head.wide {
  margin-bottom: 20px;
}

.page-spec {
  max-width: 42ch;
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: right;
}

.settings {
  max-width: 840px;
}

.kicker {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 7px;
}

h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sec {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.sec > span:first-child {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}

.sec.spaced {
  margin: 26px 0 10px;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
}

.faint {
  color: var(--faint);
}

.danger {
  color: var(--danger-ink);
}

.mono {
  font-family: var(--font-mono);
}

.num {
  font-variant-numeric: tabular-nums;
}

.dash-sec {
  margin-bottom: 26px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.tile {
  display: block;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--hair);
  background: var(--paper);
  padding: 15px 16px;
}

.tile:hover {
  border-color: var(--brand);
  text-decoration: none;
}

.tile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

/* Two lines are reserved so a label that wraps keeps the row's shared baseline. */
.tile-label {
  font-size: 10.5px;
  line-height: 1.35;
  min-height: 2.7em;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
}

.dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  background: var(--hair2);
}

.dot.brand {
  background: var(--brand);
}

.dot.warn {
  background: var(--warn);
}

.dot.danger {
  background: var(--danger);
}

.tile-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.tile-value strong {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.tile-unit {
  font-size: 12px;
  color: var(--muted);
}

.tile-sub {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--hair);
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.sec-note {
  font-size: 11px;
  color: var(--faint);
  white-space: nowrap;
}

.report-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.report-range {
  margin: -6px 0 14px;
  font-size: 12px;
  color: var(--muted);
}

.tile.report .tile-label {
  min-height: 0;
  margin-bottom: 10px;
}

.tile.report .tile-value strong {
  font-size: 24px;
}

.report-foot {
  font-size: 12px;
}

.health-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--hair);
  border-right: none;
  background: var(--paper);
}

.health-cell {
  padding: 13px 16px;
  border-right: 1px solid var(--hair);
}

a.health-cell.link {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

a.health-cell.link:hover {
  background: var(--paper2, var(--paper));
  outline: 1px solid var(--brand);
  outline-offset: -1px;
}

.health-cell .k {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 8px;
}

.health-cell .v {
  font-size: 13.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.health-cell .s {
  font-size: 11.5px;
  color: var(--faint);
  margin-top: 3px;
}

.chart {
  border: 1px solid var(--hair);
  background: var(--paper);
}

.chart-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--hair);
}

.legend {
  display: flex;
  align-items: center;
  gap: 16px;
}

.legend .item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.legend .item i {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
}

.legend .item b {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.chart-body {
  padding: 18px 16px 8px;
}

.bars {
  display: flex;
  align-items: flex-end;
  height: 168px;
  border-bottom: 1px solid var(--hair2);
}

.bar {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  height: 100%;
  gap: 1px;
}

.bar .open {
  background: var(--hair2);
}

.bar .rej {
  background: var(--danger);
}

.bar .signed {
  background: var(--ok);
}

.bar-labels {
  display: flex;
  margin-top: 7px;
}

.bar-label {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
}

.chart-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  padding: 12px 16px;
  border-top: 1px solid var(--hair);
}

.chart-stats .k {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 4px;
}

.chart-stats .v {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}


.tabs {
  display: flex;
  gap: 3px;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

.tabs a,
.tabs span {
  padding: 13px 7px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}


.tabs span {
  color: var(--faint);
  cursor: not-allowed;
}

.tabs a:hover {
  text-decoration: none;
  color: var(--ink);
}

.tabs a[aria-current] {
  border-bottom-color: var(--brand);
  color: var(--ink);
}

.table {
  border: 1px solid var(--hair);
  background: var(--paper);
  overflow-x: auto;
}

.thead,
.tr {
  display: grid;
  align-items: center;
}

.thead {
  border-bottom: 1px solid var(--ink);
}

.th {
  padding: 9px 12px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tr {
  border-bottom: 1px solid var(--hair);
  color: var(--ink);
  text-decoration: none;
}

.tr:hover {
  background: var(--hover);
  text-decoration: none;
}

.tr.on {
  background: var(--brand-tint);
}

.flat .tr:hover {
  background: transparent;
}

.td {
  padding: 8px 12px;
  min-width: 0;
}

.audit .td {
  padding: 7px 12px;
}

.r {
  text-align: right;
}

.cell {
  font-size: 13px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell.mono {
  font-family: var(--font-mono);
}

.cell.w5 {
  font-weight: 500;
}

.cell.s125 {
  font-size: 12.5px;
}

.cell.s12 {
  font-size: 12px;
}

.cell.s11 {
  font-size: 11px;
}

.cell.muted {
  color: var(--muted);
}

.cell.faint {
  color: var(--faint);
}

.cell.danger {
  color: var(--danger-ink);
}

.sub {
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub.ok {
  color: var(--ok-ink);
}

.sub.brand {
  color: var(--brand);
}

.sub.danger {
  color: var(--danger-ink);
}

.table-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--faint);
}

.empty {
  padding: 70px 24px;
  text-align: center;
}

.empty .t {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--faint);
  margin-bottom: 10px;
}

.empty .b {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 44ch;
  margin: 0 auto;
  line-height: 1.6;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
}

.status i {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border: 1.5px solid var(--faint);
  background: var(--faint);
}

.status span {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status.hollow i {
  background: transparent;
}

.status.strike span {
  text-decoration: line-through;
}

.status.ok i {
  border-color: var(--ok);
  background: var(--ok);
}

.status.ok.hollow i {
  background: transparent;
}

.status.ok span {
  color: var(--ok-ink);
}

.status.warn i {
  border-color: var(--warn);
  background: var(--warn);
}

.status.warn.hollow i {
  background: transparent;
}

.status.warn span {
  color: var(--warn-ink);
}

.status.danger i {
  border-color: var(--danger);
  background: var(--danger);
}

.status.danger.hollow i {
  background: transparent;
}

.status.danger span {
  color: var(--danger-ink);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--hair);
  background: var(--paper);
  margin-bottom: 14px;
}

.filter-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.combo {
  position: relative;
  display: block;
}

.combo > button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--control-h);
  padding: 0 10px;
  background: var(--paper);
  border: 1px solid var(--hair2);
  border-radius: var(--r5);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 12.5px;
  cursor: pointer;
  text-align: left;
}

.combo > button > span:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combo .count {
  flex-shrink: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.combo svg {
  flex-shrink: 0;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 280;
}

.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-5);
  background: rgba(10, 12, 16, .42);
}

.modal {
  width: 100%;
  max-width: 520px;
  background: var(--paper);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow-modal);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: var(--sp-4) 20px;
  border-bottom: 1px solid var(--hair);
  font-size: 15.5px;
  font-weight: 600;
}

.modal-head button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--control-h);
  height: var(--control-h);
  margin-right: -8px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--faint);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.modal-body {
  padding: 18px 20px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--hair);
}

.pop {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 300px;
  z-index: 281;
  background: var(--paper);
  border: 1px solid var(--hair2);
  box-shadow: var(--shadow-pop);
}

.pop input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  background: var(--paper);
  color: var(--ink);
  border: none;
  border-bottom: 1px solid var(--hair);
  font-family: var(--font-sans);
  font-size: 12.5px;
  outline: none;
}

.pop .opts {
  max-height: 230px;
  overflow-y: auto;
}

.pop .opts a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 12.5px;
}

.pop .opts a:hover {
  background: var(--hover);
  text-decoration: none;
}

.pop .box {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  border-radius: var(--r4);
  border: 1.5px solid var(--hair2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pop .box.on {
  border-color: var(--brand);
  background: var(--brand);
}

.pop .tick {
  width: 13px;
  flex-shrink: 0;
  color: var(--brand);
}

.pop .none {
  padding: 12px 10px;
  font-size: 12.5px;
  color: var(--faint);
}

.pop .clear {
  display: block;
  padding: 9px 10px;
  border-top: 1px solid var(--hair);
  font-size: 12px;
  color: var(--brand);
  text-decoration: none;
}

.date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--faint);
}

.date input {
  height: var(--control-h);
  padding: 0 8px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--hair2);
  border-radius: var(--r5);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
}

.amount input {
  width: 82px;
  height: var(--control-h);
  padding: 0 9px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--hair2);
  border-radius: var(--r5);
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  outline: none;
}

.qsearch {
  width: 220px;
  flex-shrink: 0;
  height: var(--control-h);
  padding: 0 10px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--hair2);
  border-radius: var(--r5);
  font-family: var(--font-sans);
  font-size: 12.5px;
  outline: none;
}

.qsearch:focus,
.date input:focus,
.amount input:focus,
.pop input:focus {
  border-color: var(--primary);
}

.count-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.clear-link {
  font-size: 12px;
  color: var(--brand);
  white-space: nowrap;
}

.integrity {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ok-ink);
}

.integrity i {
  width: 8px;
  height: 8px;
  background: var(--ok);
}

.integrity.danger {
  color: var(--danger-ink);
}

.integrity.danger i {
  background: var(--danger);
}

.btn-ghost,
button.primary,
button.danger,
.bootstrap .seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-shrink: 0;
  height: var(--control-h);
  padding: 0 12px;
  border-radius: var(--r5);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.btn-ghost {
  background: var(--paper);
  border: 1px solid var(--hair2);
  color: var(--ink);
}

a.btn-ghost:hover {
  text-decoration: none;
}

.btn-ghost[disabled],
.kill[disabled],
.search[disabled],
.bell[disabled] {
  border-color: var(--hair2);
  background: transparent;
  color: var(--faint);
  cursor: not-allowed;
}

.detail {
  margin-top: 16px;
  border: 1px solid var(--brand);
  background: var(--paper);
}

.detail.inline {
  margin-top: 0;
  border-width: 0 0 1px 2px;
  border-bottom-color: var(--hair);
  background: var(--brand-tint);
}

.detail h3 {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hair);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
}

.detail .rows {
  padding: 6px 16px 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
}

.detail .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
}

.detail .k {
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

.detail .v {
  font-size: 12.5px;
  text-align: right;
  word-break: break-all;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 14px;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--faint);
  margin-bottom: 7px;
}

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--sp-5);
  align-items: start;
  margin-top: var(--sp-5);
}

.card {
  padding: var(--sp-4) 18px;
  margin-bottom: var(--sp-4);
  border: 1px solid var(--hair);
  background: var(--paper);
}


.card h2 {
  margin: calc(-1 * var(--sp-4)) -18px var(--sp-1);
  padding: 13px 18px;
  border-bottom: 1px solid;
  border-bottom-color: inherit;
  font-size: var(--fs-label);
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 600;
}


.card h2 + p,
.card h2 + code,
.card h2 + .digest {
  margin-top: var(--sp-3);
}

.card > code {
  display: block;
  overflow-wrap: anywhere;
}


.card > p:last-child {
  margin-bottom: 0;
}

.warn-card {
  border-color: var(--warn);
  background: var(--warn-tint);
}

.confirm-card {
  border-color: var(--warn);
}

.action-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.danger-card {
  border-color: var(--danger);
  background: var(--danger-tint);
  font-size: var(--fs-cell);
}

.attestation {
  border-color: var(--brand);
  background: var(--brand-tint);
}

.attestation p {
  margin: 0;
  font-size: var(--fs-cell);
  line-height: 1.5;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  column-gap: 24px;
}

.grid.pairs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid > div {
  min-width: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--hair);
}

aside .grid > div {
  border-bottom: 0;
}

.grid > div > button {
  margin-top: 7px;
}

.grid .label,
.digest .label,
.files .label,
.fingerprint .label {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .07em;
  color: var(--faint);
  text-transform: uppercase;
}

.grid .value {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.files {
  margin-top: var(--sp-3);
}

.files .label {
  margin-bottom: 0;
}

.file {
  padding: 11px 0;
  border-bottom: 1px solid var(--hair);
}

.file:last-child {
  border-bottom: 0;
}

.file .head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}


.file .name {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file .meta {
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.file code {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--muted);
  word-break: break-all;
}

.digest {
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  border: 1px solid var(--hair2);
  background: var(--app);
}

.digest code {
  display: block;
  margin-top: var(--sp-2);
  word-break: break-all;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
}

.fingerprint {
  margin-top: var(--sp-3);
}

.fingerprint .label {
  margin-bottom: var(--sp-2);
}


.fingerprint code {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--hair2);
  background: var(--app);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: .02em;
  word-break: break-all;
}

.selectable {
  user-select: all;
}

.tag {
  margin-left: var(--sp-2);
  padding: 1px var(--sp-2);
  border: 1px solid var(--hair2);
  border-radius: var(--r4);
  font-size: var(--fs-label);
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-4);
}

.actions.stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

button.primary {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}

button.primary[disabled] {
  border-color: var(--hair2);
  background: transparent;
  color: var(--faint);
  cursor: not-allowed;
}

button.danger {
  border: 1px solid var(--danger);
  background: var(--danger);
  color: var(--paper);
}

button.danger[disabled] {
  border-color: var(--hair2);
  background: transparent;
  color: var(--faint);
  cursor: not-allowed;
}

.voter {
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--hair);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: baseline;
  font-size: var(--fs-cell);
}

.voter:last-child {
  border-bottom: 0;
}

.voter p {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
}

.ok {
  color: var(--ok-ink);
  font-size: var(--fs-label);
  letter-spacing: .06em;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  background: var(--app);
  overflow-y: auto;
}

.gate-wrap {
  width: 100%;
  max-width: 420px;
}

.gate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: 22px;
}

.gate-top .logo {
  height: 24px;
}

.gate-lang {
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--hair2);
  border-radius: var(--r5);
  background: var(--paper);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
}

.gate-card {
  border: 1px solid var(--hair);
  background: var(--paper);
}

.gate-card .accent {
  height: 3px;
  background: var(--brand);
}

.gate-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6);
}

.gate-card h1 {
  margin: 0;
  font-size: 22px;
}

.gate-card .kicker {
  margin-bottom: 0;
  color: var(--faint);
}

.gate-sub {
  margin: -6px 0 var(--sp-2);
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.gate-card .primary {
  height: 44px;
  margin-top: var(--sp-2);
  font-size: 13.5px;
}

.gate-note {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--faint);
}

.gate-foot {
  margin: 0;
  font-size: 12.5px;
}

.gate-version {
  display: flex;
  justify-content: center;
  margin-top: var(--sp-4);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.field span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
}
.field input {
  height: var(--control-h);
  padding: 0 var(--sp-2);
  border: 1px solid var(--hair);
  background: var(--app);
  color: var(--ink);
  font: inherit;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.field textarea {
  padding: var(--sp-2);
  border: 1px solid var(--hair);
  background: var(--app);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}
.card .field {
  margin-bottom: var(--sp-3);
}

.field .hint {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--faint);
}
.edit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
}
.edit-row input {
  flex: 1;
  min-width: 180px;
}
.edit-row .combo {
  flex: 1;
  min-width: 180px;
}

.confirm {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: var(--sp-3) 0;
  font-size: var(--fs-cell);
  line-height: 1.5;
  cursor: pointer;
}
.confirm input {
  margin: 2px 0 0;
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
}

.idle {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 55%);
}
.idle-card {
  width: 340px;
  padding: var(--sp-5);
  border: 1px solid var(--warn);
  background: var(--paper);
}
.idle-card h2 {
  margin: 0 0 var(--sp-2);
}
.idle-card .actions {
  margin-top: var(--sp-4);
}

.bootstrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  background: var(--warn-tint);
  border-bottom: 1px solid var(--warn);
  color: var(--warn-ink);
}

.bootstrap .sq {
  color: var(--warn);
}

.bootstrap .text {
  flex: 1;
}

.bootstrap .t {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .04em;
}

.bootstrap .b {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
}

.bootstrap .seal {
  border: 1px solid var(--warn);
  background: transparent;
  color: var(--warn-ink);
}

.bootstrap .seal[disabled] {
  border-color: var(--hair2);
  color: var(--faint);
  cursor: not-allowed;
}

.checklist {
  margin: var(--sp-3) 0;
}

.checklist .item {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--hair);
  font-size: var(--fs-cell);
}

.checklist .item:last-child {
  border-bottom: 0;
}

.checklist .item i {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  background: var(--danger);
}

.checklist .item.ok i {
  background: var(--ok);
}

.checklist .item span:nth-child(2) {
  flex: 1;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chip {
  padding: 1px var(--sp-2);
  border: 1px solid var(--hair2);
  border-radius: var(--r4);
  font-size: var(--fs-label);
  color: var(--muted);
  white-space: nowrap;
}

.setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: center;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--hair);
}

.setting:last-of-type {
  border-bottom: 0;
}

.setting .k {
  font-size: 13.5px;
  font-weight: 500;
}

.setting .hint {
  margin: 3px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--faint);
}

.setting .v {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-2);
}

.setting input {
  width: 90px;
  height: var(--control-h);
  padding: 0 var(--sp-2);
  border: 1px solid var(--hair2);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.setting input:focus,
.setting select:focus {
  outline: none;
  border-color: var(--primary);
}

.setting input[type="checkbox"] {
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: 11px;
  background: var(--hair2);
  cursor: pointer;
  transition: background var(--dur-base) var(--ease);
}

.setting input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  transition: left var(--dur-base) var(--ease);
}

.setting input[type="checkbox"]:checked {
  background: var(--brand);
}

.setting input[type="checkbox"]:checked::after {
  left: 18px;
}

.setting input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.setting input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.setting select {
  height: var(--control-h);
  padding: 0 var(--sp-2);
  border: 1px solid var(--hair2);
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
}

.setting .unit {
  font-size: 12px;
  color: var(--faint);
}

.setting .v.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

.settings-foot {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) 18px;
  border: 1px solid var(--hair);
  background: var(--paper);
}

.settings-foot p {
  flex: 1;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--faint);
}

.settings-note {
  display: block;
  padding-top: var(--sp-3);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--faint);
}

/* Each segment represents one required vote. */
.meter {
  display: flex;
  gap: 5px;
  margin-bottom: 14px;
}

.meter i {
  flex: 1;
  height: 6px;
  background: var(--hair2);
}

.meter i.on {
  background: var(--ok);
}

.meter i.void {
  background: var(--danger);
}

.roster {
  padding: 10px 0;
  border-top: 1px solid var(--hair);
}

.roster .who {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}

.roster .name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
}

.roster .state {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--faint);
}

.roster .state.ok {
  color: var(--ok-ink);
}

.roster .state.no {
  color: var(--danger-ink);
}

.roster .when {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
}

.roster p {
  margin: 7px 0 0;
  padding: 8px 10px;
  border-left: 2px solid var(--hair2);
  background: var(--app);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.anchor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-1) 0;
}

.anchor .value {
  display: block;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
}

.anchor .hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.anchor a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}

.pairs-list .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 9px 0;
  border-bottom: 1px solid var(--hair);
}

.pairs-list .row:last-child {
  border-bottom: 0;
}

.pairs-list .k {
  flex-shrink: 0;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--faint);
}

.pairs-list .v {
  overflow-wrap: anywhere;
  text-align: right;
  font-size: 12.5px;
}

.digest .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.digest .head .label {
  margin-bottom: 0;
}

.copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--hair2);
  border-radius: var(--r4);
  background: var(--paper);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  cursor: pointer;
}

.copy:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.vote-note {
  flex: 1;
  min-width: 170px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--faint);
}

.reason-note {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--faint);
}

.lifecycle .item {
  padding: 13px 0;
  border-bottom: 1px solid var(--hair);
}

.lifecycle .item:last-child {
  border-bottom: 0;
}

.lifecycle .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: 5px;
}

.lifecycle .head span:first-child {
  font-size: 13px;
  font-weight: 500;
}

.lifecycle .ctl {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--faint);
}

.lifecycle .desc {
  margin: 0 0 9px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted);
}

.lifecycle button {
  width: 100%;
}

.guard-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}

.stack .item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hair);
}

.stack .item:last-child {
  border-bottom: 0;
}

.stack .item > div {
  flex: 1;
  min-width: 0;
}

.stack .title {
  font-size: 13.5px;
  font-weight: 500;
}

.stack .meta {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--faint);
}

.link-danger {
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--danger-ink);
  font-family: var(--font-sans);
  font-size: 12.5px;
  cursor: pointer;
}

.link-danger[disabled] {
  color: var(--faint);
  cursor: not-allowed;
}

.note-danger,
.note-warn {
  display: flex;
  gap: 9px;
  margin: var(--sp-2) 0;
  padding: 11px 12px;
  font-size: 12.5px;
  line-height: 1.55;
}

.note-danger {
  border-left: 2px solid var(--danger);
  background: var(--danger-tint);
  color: var(--danger-ink);
}

.note-warn {
  border-left: 2px solid var(--warn);
  background: var(--warn-tint);
  color: var(--warn-ink);
}

.note-danger i,
.note-warn i {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  margin-top: 4px;
}

.note-danger i {
  background: var(--danger);
}

.note-warn i {
  background: var(--warn);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
}

.page-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

@keyframes sv-pulse {
  0%   { opacity: 1;   transform: scale(1); }
  50%  { opacity: .35; transform: scale(.88); }
  100% { opacity: 1;   transform: scale(1); }
}

.modal-head .with-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.covered {
  padding: 13px 14px;
  margin-bottom: var(--sp-4);
  border: 1px solid var(--hair2);
  background: var(--app);
}

.covered .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 0;
}

.covered .k {
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
}

.covered .v {
  word-break: break-all;
  text-align: right;
  font-size: 12.5px;
  font-weight: 500;
}

.touch {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--brand);
  background: var(--brand-tint);
}

.touch > div {
  flex: 1;
  min-width: 0;
}

.touch .pulse {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  background: var(--brand);
  animation: sv-pulse 1.1s infinite;
}

.touch .t {
  font-size: 13.5px;
  font-weight: 600;
}

.touch .b {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.touch .h {
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--faint);
}

.touch .left {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
}

.outcome {
  padding: 16px;
}

.outcome.ok {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--ok);
  background: var(--ok-tint);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ok-ink);
}

.outcome.failed {
  border: 1px solid var(--danger);
  background: var(--danger-tint);
}

.outcome.failed .head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--danger-ink);
}

.outcome.failed .head i {
  width: 9px;
  height: 9px;
  background: var(--danger);
}

.outcome.failed p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--danger-ink);
}

.acct-wrap {
  position: relative;
  display: block;
  flex-shrink: 0;
}

.acct {
  cursor: pointer;
}

.acct:hover,
.acct[aria-expanded="true"] {
  background: var(--hover);
}

.acct-menu {
  position: absolute;
  top: calc(100% + 1px);
  /* The button bleeds 16px past the wrapper, so the menu follows it to the edge. */
  right: -16px;
  z-index: 301;
  width: 250px;
  border: 1px solid var(--hair2);
  background: var(--paper);
  box-shadow: var(--shadow-pop);
}

.acct-menu .head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--hair);
}

.acct-menu .name {
  font-size: 13px;
  font-weight: 600;
}

.acct-menu .login {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--faint);
}

.acct-menu .role {
  margin-top: 5px;
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--brand);
}

.acct-menu a,
.acct-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-top: 1px solid var(--hair);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.acct-menu a:hover,
.acct-menu button:hover {
  background: var(--hover);
  text-decoration: none;
}

.acct-menu .out {
  border-top-color: var(--ink);
  color: var(--danger-ink);
}

.diff .entry {
  padding: 12px 0;
  border-bottom: 1px solid var(--hair);
}

.diff .entry:last-child {
  border-bottom: 0;
}

.diff .field {
  margin-bottom: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--faint);
}

.diff .pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.diff .before,
.diff .after {
  padding: 7px 10px;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 13px;
}

.diff .before {
  border-left: 2px solid var(--hair2);
  background: var(--app);
  color: var(--muted);
}

.diff .after {
  border-left: 2px solid var(--brand);
  background: var(--brand-tint);
  color: var(--ink);
}

.diff .arrow {
  text-align: center;
  color: var(--faint);
}

.card .summary {
  margin: var(--sp-3) 0 0;
  font-size: 13.5px;
  line-height: 1.6;
}

.mask-note {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--hair);
  font-size: 11.5px;
  color: var(--faint);
}

/* Kill-switch (design-spec 11.2): the alarm banner while signing is frozen. */
.frozen {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  background: var(--danger);
  border-bottom: 1px solid var(--danger);
  color: #fff;
}

.frozen .text {
  flex: 1;
}

.frozen .t {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
}

.frozen .b {
  margin-top: 2px;
  font-size: 11.5px;
  opacity: .92;
}

.frozen .resume {
  display: inline-flex;
  align-items: center;
  height: var(--control-h);
  padding: 0 12px;
  border-radius: var(--r5);
  border: 1px solid #fff;
  background: #fff;
  color: var(--danger);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.frozen .resume[disabled] {
  background: transparent;
  color: #fff;
  opacity: .7;
  cursor: not-allowed;
}

a.kill {
  text-decoration: none;
}

.kill.resume {
  background: transparent;
}

.modal-head.danger-head span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--danger-ink);
}

.modal-head.danger-head .sq {
  color: var(--danger);
}

/* A request whose signature failed (design-spec 8): what failed and the admin's retry. */
.card.sign-error {
  border-color: var(--danger);
  background: var(--danger-tint);
}

.card.sign-error h2 {
  color: var(--danger-ink);
}

.card.sign-error .row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.card.sign-error .row p {
  flex: 1;
  margin: 0;
}

/* Notification bell and panel (design-spec 14.1): signals only, unread first. */
.bell-wrap {
  position: relative;
  flex-shrink: 0;
}

.bell {
  cursor: pointer;
}

.bell .dot {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.bell-panel {
  position: absolute;
  top: calc(var(--control-h) + 6px);
  right: 0;
  z-index: 301;
  width: 380px;
  max-height: 480px;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--hair2);
  border-radius: var(--r5);
  box-shadow: var(--shadow-pop);
}

.bell-panel .head,
.bell-panel .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  font-size: 12px;
  font-weight: 600;
}

.bell-panel .head {
  border-bottom: 1px solid var(--hair);
}

.bell-panel .foot {
  border-top: 1px solid var(--hair);
  font-weight: 500;
}

.bell-panel .head .link {
  background: none;
  border: 0;
  color: var(--brand);
  font-size: 11.5px;
  cursor: pointer;
}

.bell-panel .note {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--hair);
  color: var(--muted);
  text-decoration: none;
  font-size: 12.5px;
}

.bell-panel .note.unread {
  color: var(--ink);
  border-left: 3px solid var(--brand);
}

.bell-panel .note.unread.action {
  border-left-color: var(--warn);
}

.bell-panel .note .at {
  font-size: 11px;
  color: var(--faint);
}

.bell-panel .empty {
  padding: var(--sp-3);
}

.pref-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 120px 220px;
  gap: var(--sp-2) var(--sp-4);
  align-items: center;
  margin: var(--sp-3) 0;
  font-size: var(--fs-cell);
}

.pref-grid .th {
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--faint);
}

.bell-panel .note .body {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.bell-panel .mark {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  background: var(--brand);
}

.bell-panel .mark.warn {
  background: var(--warn);
}

.bell-panel .mark.danger {
  background: var(--danger);
}

.bell-panel .note:not(.unread) .mark {
  background: var(--hair2);
}

.bell-panel .foot .faint {
  font-size: 11px;
  font-weight: 400;
}

.pref-grid .c {
  text-align: center;
}

.pref-grid .floor {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--brand);
}

.switch {
  position: relative;
  width: 34px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--hair2);
  border-radius: 9px;
  background: var(--app);
  cursor: pointer;
  vertical-align: middle;
}

.switch .knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--faint);
  transition: left .12s;
}

.switch.on {
  background: var(--brand);
  border-color: var(--brand);
}

.switch.on .knob {
  left: 18px;
  background: #fff;
}

.tr.pickable {
  cursor: pointer;
}

.tr.picked {
  background: var(--brand-tint, rgba(0, 170, 255, .08));
  box-shadow: inset 3px 0 0 var(--brand);
}

/* The note that a signal carries no content stays visible under a long list. */
.bell-panel .foot {
  position: sticky;
  bottom: 0;
  background: var(--paper);
}

/* System settings tabs (design-spec 15.1, designs 44–47). */
.settings-card .setting {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--hair);
}

.settings-card .setting .what {
  flex: 1;
}

.settings-card .setting .label {
  font-size: 13px;
  font-weight: 500;
}

.settings-card .setting .hint {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--faint);
}

.settings-card .num {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 170px;
}

.settings-card .num input {
  width: 110px;
  text-align: right;
}

.settings-card .unit {
  font-size: 11.5px;
  color: var(--faint);
}

.settings-card .floor,
.pref-grid .floor {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--brand);
}

.settings-foot .card-actions {
  justify-content: flex-end;
}

.settings-card .policy {
  max-width: 420px;
  font-size: 11.5px;
  color: var(--muted);
  text-align: right;
}

.settings-card input.wide {
  width: 320px;
}

.settings-card > p.faint,
.settings-foot > p.faint {
  font-size: 11.5px;
  line-height: 1.5;
}

.settings-card select.action {
  width: 130px;
  height: var(--control-h);
  background: var(--app);
  border: 1px solid var(--hair2);
  color: var(--ink);
}

.card > p.faint {
  font-size: 12px;
  line-height: 1.5;
}

/* Renewal diff and discrepancy warnings on the decision screen (design-spec 6.2, 6.5; design 10). */
.renewal-diff {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 1fr) 24px minmax(120px, 1fr);
  gap: 6px var(--sp-3);
  margin: var(--sp-2) 0;
  font-size: var(--fs-cell);
}

.renewal-diff .k {
  color: var(--faint);
  font-size: 11.5px;
}

.renewal-diff .arrow {
  color: var(--faint);
  text-align: center;
}

.discrepancies h2 {
  color: var(--warn-ink);
}

.discrepancies .item {
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--hair);
}

.discrepancies .item:last-child {
  border-bottom: 0;
}

.discrepancies .what {
  font-weight: 600;
  font-size: 12.5px;
}

.settings-card select.choice {
  width: 360px;
  height: var(--control-h);
  background: var(--app);
  border: 1px solid var(--hair2);
  color: var(--ink);
}

.discrepancies .mono {
  margin-top: 3px;
  font-size: 12px;
}

.scope-pick {
  display: flex;
  gap: var(--sp-4);
  margin: var(--sp-2) 0 var(--sp-3);
  font-size: 13px;
}

.scope-pick label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.detail .onboard {
  margin: var(--sp-3) 0;
  padding: var(--sp-3);
  border: 1px dashed var(--hair2);
}

.detail .onboard h4 {
  margin: 0 0 6px;
  font-size: 12.5px;
}

/* Risk-based escalation on the decision card (design-spec 11.4, design 13). */
.escalation {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 16px;
  border: 1px solid var(--brand);
  background: var(--paper);
}

.escalation .mark {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  background: var(--brand);
}

.escalation .what {
  flex: 1;
  font-size: 12.5px;
}

.escalation .rule {
  font-weight: 600;
  color: var(--ink);
}

.escalation .shift {
  font-size: 12.5px;
  white-space: nowrap;
}

/* Global search (design-spec 3.1, design 77). */
.search {
  cursor: pointer;
}

.search-pop {
  position: fixed;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 301;
  width: min(560px, calc(100vw - 32px));
  background: var(--paper);
  border: 1px solid var(--hair2);
  border-radius: var(--r5);
  box-shadow: var(--shadow-pop);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hair);
  color: var(--faint);
}

.search-field input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
}

.search-hits {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 60vh;
  overflow-y: auto;
}

.search-hits .hit {
  display: grid;
  grid-template-columns: 160px auto 1fr;
  align-items: baseline;
  gap: 12px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--hair);
  cursor: pointer;
}

.search-hits .hit.active {
  background: var(--brand-wash, rgba(0, 163, 204, .12));
}

.search-hits .grp {
  white-space: nowrap;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint);
}

.search-hits .main {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.search-hits .sub {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-empty,
.search-note {
  margin: 0;
  padding: 10px 14px;
  font-size: 11.5px;
  color: var(--faint);
}

@media (max-width: 640px) {
  .search-hits .hit {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Theme (design-spec D24): one logo per background. */
.logo.on-light {
  display: none;
}

[data-theme="light"] .logo.on-dark {
  display: none;
}

[data-theme="light"] .logo.on-light {
  display: inline-block;
}

/* WCAG 2.2 AA (1.4.3): the design system's faint text and the light theme's brand and danger
   fills fall short of 4.5:1 on the console's backgrounds; these are the smallest shifts that pass
   on paper, app and panel alike. */
[data-scheme="mission"][data-theme="dark"] {
  --faint: #7b878e;
}

[data-scheme="mission"][data-theme="light"] {
  --faint: #62676b;
  --brand: #00748f;
  --danger: #e0281c;
  --warn-ink: #965700;
}

/* Small labels on the amber license card use the stronger grey (4.5:1 on the warn tint). */
.warn-card .grid .label {
  color: var(--muted);
}

/* A table that scrolls sideways is reachable from the keyboard (WCAG 2.1.1). */
.table:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* A visible keyboard focus in both themes (WCAG 2.4.7); fields keep their own border cue. */
a:focus-visible,
button:focus-visible,
[role="switch"]:focus-visible,
[tabindex]:focus-visible,
select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.search-field:focus-within {
  box-shadow: inset 0 -2px 0 var(--brand);
}
