:root {
  color-scheme: light;
  --ink: #182c26;
  --muted: #536961;
  --pine: #104e3c;
  --pine-dark: #102e26;
  --line: #d7e1da;
  --paper: #f4f7f3;
  --white: #fff;
  --accent: #c2ee8d;
  font: 15px/1.5 "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--pine); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
summary:focus-visible, textarea:focus-visible { outline: 3px solid #b56a14; outline-offset: 3px; }
.skip { position: fixed; top: -6rem; left: 1rem; z-index: 2; background: white; padding: .75rem 1rem; border-radius: 5px; }
.skip:focus { top: .5rem; }
.sr-only, .svg-symbols { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.shell { min-height: 100vh; display: grid; grid-template-columns: 222px minmax(0, 1fr); }
.sidebar { background: var(--pine-dark); color: #d6e6db; padding: 30px 16px 20px; display: flex; flex-direction: column; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 21px; font-weight: 700; letter-spacing: -.7px; text-decoration: none; white-space: nowrap; }
.sidebar .brand { color: #f1f8ef; padding: 0 8px; }
.brand svg { width: 30px; height: 30px; color: var(--accent); }
.brand b { color: var(--accent); font-weight: 500; }
.sidebar nav { display: grid; gap: 25px; }
.mobile-menu { display: none; }
.nav-group { display: grid; gap: 3px; }
.nav-group h2 { margin: 0 0 6px; padding: 0 12px; color: #a8c2b4; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.nav-group a { display: flex; align-items: center; gap: 11px; color: #e0ebe3; text-decoration: none; font-weight: 500; font-size: 14px; padding: 8px 12px; border-radius: 5px; }
.nav-group a:hover { background: #1d4235; }
.nav-group a[aria-current="page"] { background: #2c5744; color: #f2ffe4; }
.nav-group svg, .metric svg, .org-switch svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sidebar-foot { margin: auto 8px 0; border-top: 1px solid #375446; padding-top: 16px; display: grid; gap: 2px; }
.sidebar-foot .role { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #badfa6; }
.sidebar-foot .user-email { overflow-wrap: anywhere; font-size: 13px; }
.sidebar-foot button { background: none; color: #c8dbcf; border: 0; padding: 3px 0; font-size: 12px; text-decoration: underline; }
.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 14px clamp(20px, 3.6vw, 58px); border-bottom: 1px solid var(--line); min-height: 62px; background: #fbfcf9; }
.org-caption, .revision, .muted, .helptext { color: var(--muted); }
.org-caption, .revision { font-size: 12px; }
.org-switch { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 650; font-size: 14px; }
.org-switch svg { width: 14px; height: 14px; }
.revision { margin-left: auto; white-space: nowrap; }
.revision b { margin-left: 4px; color: var(--ink); font-variant-numeric: tabular-nums; }
main { max-width: 1580px; padding: clamp(22px,3vw,45px) clamp(20px,3.6vw,58px) 55px; margin: 0 auto; }
main:focus { outline: none; }
.public-shell { min-height: 100vh; }
.public-header { padding: 22px clamp(20px,6vw,88px); background: var(--pine-dark); }
.public-header .brand { color: white; }
.public-shell main { max-width: 625px; padding-top: clamp(30px,8vw,95px); }
.public-shell main h1 { margin-bottom: 22px; }
.public-shell .panel > form > p { margin-bottom: 17px; }
.public-shell .panel > form > p > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.public-shell .panel > form + p { margin-top: 15px; }
.access-note { margin-top: 1rem; color: var(--muted); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(30px,3vw,43px); line-height: 1.12; letter-spacing: -.045em; font-weight: 650; overflow-wrap: anywhere; }
h2 { font-size: 20px; letter-spacing: -.025em; font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; }
.page-header, .panel-head, .action-row, .form-actions, .pagination, .pagination nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.page-header { margin-bottom: 23px; flex-wrap: wrap; }
.intro, .section-intro { color: var(--muted); max-width: 76ch; }
.intro { margin-top: 6px; }
.back { display: inline-block; margin-bottom: 14px; text-decoration: none; font-size: 13px; font-weight: 600; }
.button, button[type=submit]:not([class]) { display: inline-flex; justify-content: center; align-items: center; min-height: 38px; padding: 8px 14px; border: 1px solid var(--pine); border-radius: 5px; text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1.3; }
.button, .button.primary, button[type=submit]:not([class]) { color: #fff; background: var(--pine); }
.button.primary:hover, button[type=submit]:not([class]):hover { background: #083a2c; }
.button.quiet { background: var(--white); color: var(--pine); border-color: #adbbb1; }
.button.quiet:hover { background: #eef4ed; }
.sidebar-foot button[type=submit] { min-height: 0; padding: 5px 0; border: 0; background: none; font-size: 12px; font-weight: 400; color: #d6e6db; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 23px; }
.metric { min-width: 0; position: relative; display: grid; align-content: space-between; min-height: 116px; padding: 17px 19px; text-decoration: none; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.metric:first-child { background: #e4eedb; border-color: #ccddc1; }
.metric span { font-size: 13px; font-weight: 550; color: #496153; }
.metric strong { color: var(--ink); font-size: 32px; line-height: 1.2; font-weight: 600; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.metric svg { position: absolute; right: 16px; bottom: 21px; color: #65836d; width: 21px; height: 21px; }
.metric:hover { border-color: #839f8d; }
.panel { margin: 0 0 18px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--white); min-width: 0; }
.panel-head { padding: 17px 21px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-body, .form-panel { padding: 21px; }
.form-panel { max-width: 650px; }
.section-intro { margin-bottom: 16px; }
.text-link, .record, .back { font-weight: 600; }
.text-link { font-size: 13px; text-decoration: none; }
.text-link:hover, .back:hover { text-decoration: underline; }
.filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; padding: 16px 21px; border-bottom: 1px solid var(--line); }
.filters label { min-width: min(160px,100%); }
.filters label, .field { display: grid; gap: 5px; }
.filters label, .field > label { font-weight: 600; font-size: 13px; }
.field { margin: 0 0 16px; }
.field input:not([type=checkbox]), .field select, .field textarea, .filters input, .filters select,
.public-shell input:not([type=hidden]):not([type=checkbox]), .public-shell select {
  min-width: 0; max-width: 100%; width: 100%; min-height: 38px; border: 1px solid #acbcb0; border-radius: 4px;
  background: #fff; color: var(--ink); padding: 7px 9px; font-weight: 400;
}
input[type=search] { min-width: min(220px,100%); }
.filters .text-link { align-self: center; padding-top: 17px; }
input[type=checkbox] { accent-color: var(--pine); width: 17px; height: 17px; }
.check-field > label { display: flex; gap: 6px; align-items: center; }
input[type=file] { min-height: 55px; border-style: dashed !important; }
input[type=file]::file-selector-button { color: var(--pine); background: #edf4eb; border: 0; border-radius: 3px; padding: .45rem .65rem; margin-right: .65rem; cursor: pointer; }
.required { color: #56745e; font-size: 12px; }
.helptext { font-size: 12px; }
.fields-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px,100%),1fr)); gap: 0 16px; }
.fields-grid > .notice { grid-column: 1 / -1; }
.form-actions, .action-row { justify-content: flex-start; flex-wrap: wrap; }
.form-actions { padding-top: 13px; margin-top: 7px; border-top: 1px solid var(--line); }
.table-wrap { position: relative; width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 15px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
th:first-child, td:first-child { padding-left: 21px; }
th:last-child, td:last-child { padding-right: 21px; }
thead th { white-space: nowrap; color: #4f6257; background: #f5f8f3; font-size: 12px; font-weight: 650; }
tbody tr + tr { border-top: 1px solid #e4eae4; }
td .record { text-decoration: none; }
td .record:hover { text-decoration: underline; }
td code, dd code { font-family: Consolas, "Liberation Mono", monospace; font-size: .9em; }
td .number, td.number { white-space: nowrap; font-variant-numeric: tabular-nums; }
td details { margin: 3px 0; }
td details > summary { min-height: 32px; padding-block: 5px; }
.role-editor { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.role-editor select { min-height: 38px; font: inherit; }
summary { cursor: pointer; color: var(--pine); font-size: 13px; }
.detail-list { margin: 7px 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 10px; font-size: 13px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.issues { margin: 0 0 6px; padding-left: 17px; font-size: 13px; color: #704313; }
.diff-wrap { max-width: min(640px,80vw); overflow-x: auto; margin: 6px 0; }
.diff td, .diff th { padding: 5px 8px; font-size: 12px; }
.diff tbody th { font-weight: 500; }
.empty { padding: 32px 21px 35px; }
.empty h2, .empty h3 { font-size: 17px; letter-spacing: -.02em; }
.empty p { color: var(--muted); margin-top: 4px; max-width: 65ch; }
.empty .button { margin-top: 12px; }
.status { display: inline-block; white-space: nowrap; border-radius: 20px; background: #edf0ee; color: #394b3f; padding: 3px 9px; font-size: 12px; font-weight: 600; }
.status-fresh, .status-committed, .status-new, .status-no_changes { background: #e3f2df; color: #28562e; }
.status-ready, .status-review_required, .status-changed, .status-stale { background: #fff0cf; color: #77500a; }
.status-failed, .status-invalid, .status-missing { background: #fce8e1; color: #862d20; }
.facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(108px,1fr)); margin: 0; padding: 18px 21px; gap: 14px; }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { margin: 4px 0 0; font-weight: 600; line-height: 1.35; }
.metadata, .decision { border-top: 1px solid var(--line); padding: 13px 21px; }
.metadata { font-size: 13px; color: var(--muted); }
.metadata span { margin: 0 6px; }
.decision { background: #f5f8f1; border-radius: 0 0 8px 8px; }
.decision p + .action-row, .decision p + form { margin-top: 10px; }
.pagination { padding: 12px 21px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); flex-wrap: wrap; }
.pagination nav { gap: 12px; }
#staged-rows { scroll-margin-top: 1rem; }
.mapping-settings > summary { padding: 1rem 1.25rem; font-weight: 600; }
.export-forecast { margin-block: .65rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 6px; overflow-wrap: anywhere; }
.export-forecast dl { margin: .35rem 0 0; }
.export-forecast dt { font-weight: 600; }
.export-forecast dd { margin: 0 0 .35rem; }
.review-links, .queue-reasons, .price-examples ul { margin: 0; list-style: none; }
.review-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px clamp(14px, 2vw, 21px); }
.review-links a { display: inline-flex; gap: .65rem; align-items: center; min-height: 38px; padding: 6px 12px; border: 1px solid #a6baad; border-radius: 5px; text-decoration: none; font-weight: 600; }
.review-links a:hover { background: #edf4ed; text-decoration: underline; }
.review-links b { font-variant-numeric: tabular-nums; }
.queue-reasons { display: grid; gap: .3rem; padding: 0; }
.price-examples { border-top: 1px solid var(--line); padding: 16px clamp(14px, 2vw, 21px) 6px; }
.price-examples h3 { margin: 0; font-size: 16px; }
.price-examples > p, .focus-hint { color: var(--muted); }
.focus-hint { padding: 12px clamp(14px, 2vw, 21px) 0; }
.price-examples ul { padding: 0; }
.price-examples li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 12px 0; border-top: 1px solid var(--line); }
.price-examples li:first-child { border: 0; }
.price-product { flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; }
.price-product strong { display: block; }
.price-product code, .price-product span { color: var(--muted); }
.price-product span { margin-left: .6rem; font-size: 12px; }
.price-examples > a { display: inline-block; padding: 4px 0 12px; }
.price-comparison { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr)); gap: 6px 12px; margin: 0; }
.price-examples .price-comparison { flex: 2 1 24rem; min-width: 0; }
.price-comparison dt { color: var(--muted); font-size: 12px; }
.price-comparison dd { margin: 2px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.row-wide .price-comparison { margin: 2px 0 12px; }
.terms-list { margin: 0 0 8px; padding: 0; list-style: none; }
.notice { margin: 0 0 14px; padding: 10px 12px; border: 1px solid #b8d4ba; border-radius: 5px; background: #eef6e9; }
.notice.warning { border-color: #e2c794; background: #fff5df; }
.notice.error, .errorlist { color: #842e26; }
.notice.error { border-color: #e1b6af; background: #fff1ec; }
.errorlist { margin: 0; padding-left: 18px; font-size: 13px; }
.invalid input, .invalid select { border-color: #a73d30 !important; }
.public-shell main .panel:not(.form-panel) { padding: 22px; }
@media (max-width: 970px) {
  .shell { grid-template-columns: 185px minmax(0,1fr); }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sidebar { padding-inline: 11px; }
}
@media (max-width: 700px) {
  .shell { display: block; }
  .sidebar { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; padding: 10px 14px; gap: 12px; }
  .sidebar .brand { padding: 0; }
  .sidebar > .desktop-nav { display: none; }
  .mobile-menu { display: block; }
  .mobile-menu > summary { cursor: pointer; padding: 6px 9px; border: 1px solid #638274; border-radius: 4px; color: #edf8ed; font-size: 13px; font-weight: 600; }
  .mobile-menu > nav { position: absolute; z-index: 2; top: 100%; left: 0; right: 0; padding: 18px 14px; background: var(--pine-dark); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; box-shadow: 0 8px 12px #102e2625; }
  .mobile-menu .nav-group { align-content: start; }
  .sidebar-foot { display: block; border: 0; margin: 0; padding: 0; }
  .sidebar-foot .role, .sidebar-foot .user-email { display: none; }
  .dashboard-table, .dashboard-table tbody { display: block; }
  .dashboard-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .dashboard-table tbody tr { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 3px 12px; padding: 12px 14px; }
  .dashboard-table tbody td { padding: 0; }
  .dashboard-table td:first-child { grid-area: 1 / 1; }
  .dashboard-table td:nth-child(3) { grid-area: 1 / 2; justify-self: end; }
  .dashboard-table td:nth-child(2) { grid-area: 2 / 1 / 3 / -1; }
  .dashboard-table td:nth-child(4) { grid-area: 3 / 1 / 4 / -1; }
  .dashboard-table td[data-label] { font-size: 13px; }
  .dashboard-table td[data-label]::before { content: attr(data-label) " "; color: var(--muted); margin-right: 3px; }
  .topbar { padding: 9px 15px; min-height: 42px; flex-wrap: wrap; gap: 5px; }
  .org-caption { display: none; }
  main { padding: 23px 14px 40px; }
  .page-header { gap: 11px; margin-bottom: 16px; }
  .metric { min-height: 88px; padding: 12px; }
  .metric svg { right: 10px; bottom: 14px; width: 17px; }
  .metrics { gap: 8px; margin-bottom: 14px; }
  .panel-head, .filters, .panel-body, .form-panel, .empty { padding: 14px; }
  .facts { padding: 14px; }
  th, td { padding: 9px 10px; }
  th:first-child, td:first-child { padding-left: 14px; }
}

/* Keep native column headers available when records are stacked beside the compact sidebar. */
@media (max-width: 970px) {
  .record-table, .record-table > tbody { display: block; }
  .record-table > thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .record-table > tbody > tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 9px 16px;
    padding: 14px;
  }
  .record-table > tbody > tr > :is(td, th[scope=row]) {
    display: block;
    min-width: 0;
    padding: 0;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .record-table td[data-label]::before {
    display: block;
    content: attr(data-label);
    content: attr(data-label) / "";
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
  }
  .record-table .row-heading, .record-table .row-wide, .record-table .row-actions { grid-column: 1 / -1; }
  .record-table .row-heading { order: -1; font-size: 16px; font-weight: 650; }
  .record-table > tbody > tr > .row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
  .record-table > tbody > tr > .row-actions:empty { display: none; }
  .record-table .row-actions a { display: inline-block; padding: 4px 0; }
  .record-table .detail-list { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .record-table .diff-wrap { max-width: 100%; }
}
