
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk-latin-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk-latin-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk-latin-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Commit Mono";
  src: url("/assets/fonts/commit-mono-latin-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --paper: #141716;
  --surface: #1c201e;
  --faint: #222624;
  --ink: #e8ebe9;
  --muted: #8a928e;
  --border: #2a2f2c;
  --oxide: #c96a61;
  --ochre: #cba14e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.mono { font-family: "Commit Mono", ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; }
.chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--faint);
  color: var(--ink);
  font-family: "Commit Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  white-space: nowrap;
}
.app { min-height: 100vh; display: grid; grid-template-rows: 48px 1fr; }
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 0 20px;
}
.brand, .header-group, .account { display: flex; align-items: center; gap: 10px; }
.mark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--paper);
}
.lockup { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.org { color: var(--muted); }
.account summary { cursor: pointer; list-style: none; }
.account summary::-webkit-details-marker { display: none; }
.account-menu {
  position: absolute;
  right: 20px;
  top: 42px;
  min-width: 220px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  padding: 10px;
}
.account-email { margin-bottom: 8px; color: var(--muted); }
.frame { display: grid; grid-template-columns: 220px 1fr; min-height: 0; }
.nav {
  border-right: 1px solid var(--border);
  padding: 18px 12px;
  background: var(--paper);
}
.nav-section {
  margin: 0 8px 8px;
  color: var(--muted);
  font-family: "Commit Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.nav a {
  display: block;
  height: 32px;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--ink);
}
.nav a[aria-current="page"], .nav a:hover { background: var(--faint); }
.main { min-width: 0; padding: 28px 32px; overflow-x: auto; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
h1 { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: 0; }
.subtle { color: var(--muted); margin: 4px 0 0; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td {
  height: 36px;
  border-bottom: 1px solid var(--border);
  padding: 0 10px;
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--paper);
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}
.chips { display: flex; gap: 4px; min-width: 0; overflow: hidden; }
.query-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}
.query-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.query-clear {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 8px;
}
.filter-chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--muted);
  font-family: "Commit Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  white-space: nowrap;
}
.filter-chip:hover, .filter-chip.active {
  background: var(--faint);
  color: var(--ink);
}
.empty {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px;
  background: var(--surface);
}
.effective-head .quiet { align-self: center; }
.effective-stack { display: grid; gap: 18px; }
.effective-section {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.effective-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0;
}
.effective-table th:nth-child(1), .effective-table td:nth-child(1) { width: 110px; }
.effective-table th:nth-child(2), .effective-table td:nth-child(2) { width: 210px; }
.effective-table th:nth-child(3), .effective-table td:nth-child(3) { width: 110px; }
.chain { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.45; }
.decision.deny, .deny-row .chain {
  color: var(--oxide);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.effective-footer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login {
  width: min(100%, 380px);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 22px;
}
.field { display: grid; gap: 6px; margin-top: 14px; }
label { color: var(--muted); }
.org-choice {
  display: grid;
  grid-template-columns: 18px 1fr;
  column-gap: 8px;
  align-items: center;
  padding: 6px 0;
  color: var(--ink);
}
.org-choice input { grid-row: 1 / 3; width: 16px; height: 16px; margin: 0; }
.org-choice .subtle { font-size: 11px; }
input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 10px;
}
select {
  width: 100%;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 6px;
}
.grants-table { min-width: 1120px; table-layout: auto; }
.groups-table th:not(:first-child), .groups-table td:not(:first-child) { width: 130px; }
.groups-table .right { text-align: right; }
.group-grants-table { min-width: 760px; table-layout: auto; }
.budgets-table { min-width: 900px; table-layout: auto; }
.create-row td { height: auto; padding-top: 8px; padding-bottom: 8px; overflow: visible; }
.create-row input { height: 30px; min-width: 90px; padding: 0 6px; }
.principal-field, .grants-table .resource-field { display: grid; grid-template-columns: 88px minmax(110px, 1fr); gap: 5px; }
.budgets-table .tier-field { display: grid; grid-template-columns: minmax(90px, 1fr) auto; gap: 5px; }
.budgets-table .tier-field button { height: 30px; padding: 0 10px; }
.grants-table .effect-field { display: grid; gap: 5px; }
.grants-table .reason-input { min-width: 150px; }
.grants-table .row-action { display: inline; }
.grants-table .row-action button { height: 28px; padding: 0 8px; }
.expires-soon { color: var(--ochre); }
.form-error td { height: auto; padding: 8px 10px; color: var(--oxide); white-space: normal; }
.audit-table { min-width: 1050px; table-layout: auto; }
.audit-table th:first-child, .audit-table td:first-child { width: 220px; }
.audit-table details { font-family: "Schibsted Grotesk", sans-serif; }
.audit-table summary { cursor: pointer; color: var(--muted); }
.audit-table details[open] { padding: 8px 0; }
.audit-table pre { max-width: 620px; margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.audit-table .deny-row td:not(:last-child) { color: var(--oxide); text-decoration: line-through; text-decoration-thickness: 1px; }
.registry-table .disabled-row { color: var(--muted); }
.audit-error { margin: 0 0 16px; }
.audit-pagination { display: flex; justify-content: flex-end; margin-top: 16px; }
.audit-pagination a { padding: 7px 10px; }
button {
  height: 34px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 600;
  padding: 0 14px;
  cursor: pointer;
}
.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.error {
  margin-top: 12px;
  color: var(--oxide);
  font-family: "Commit Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
}
.forbidden {
  max-width: 560px;
  margin: 20vh auto 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}
.missing-path { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .frame { grid-template-columns: 1fr; }
  .nav { border-right: 0; border-bottom: 1px solid var(--border); }
  .main { padding: 20px 16px; }
  .header { padding: 0 12px; }
  .query-bar { grid-template-columns: 1fr auto; }
  .query-clear { grid-column: 2; }
}
