/* GALE design system. */
:root {
  --ink: #121212; --ink-2: #2a2a2a; --coral: #dc5a4b; --coral-deep: #b83c2e;
  --paper: #f6f6f6; --surface: #fff; --line: #e2e2e2; --muted: #666;
  --font: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--paper); color: var(--ink); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, p { margin: 0; }
h1 { font-size: 34px; line-height: 1.15; font-weight: 500; letter-spacing: -.01em; }
h2 { font-size: 22px; line-height: 1.25; font-weight: 500; }
code { font-size: 13px; background: var(--paper); padding: 2px 5px; border-radius: 3px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { color: var(--coral); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.error { color: var(--coral-deep); font-size: 13px; min-height: 20px; }
.error:empty { min-height: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

input { width: 100%; font: inherit; color: inherit; background: #fff; border: 1px solid #c8c8c8; border-radius: 2px; padding: 10px 12px; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--coral); outline-offset: 1px; }
label { display: block; font-size: 13px; font-weight: 500; }
label > input { margin-top: 6px; font-weight: 400; }

.btn { display: inline-flex; align-items: center; justify-content: center; font: 500 14px/1 var(--font); min-height: 40px; padding: 0 16px; border-radius: 2px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s; white-space: nowrap; }
.btn:hover { background: var(--ink); color: #fff; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--coral-deep); border-color: var(--coral-deep); }
.btn.danger { background: var(--coral-deep); border-color: var(--coral-deep); color: #fff; }
.btn.danger:hover { background: #962e23; border-color: #962e23; }
.btn.on-dark { color: #fff; border-color: #666; }
.btn.on-dark:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.link { background: none; border: 0; padding: 6px 8px; font: 500 13px var(--font); color: var(--ink); cursor: pointer; border-radius: 2px; }
.link:hover { background: var(--paper); }
.link.remove { color: var(--coral-deep); }

.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.login-brand { background: var(--ink); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; border-right: 4px solid var(--coral); }
.login-brand h1 { font-size: clamp(36px, 4.4vw, 60px); font-weight: 300; }
.lede { color: #c8c8c8; font-size: 17px; font-weight: 300; max-width: 440px; margin-top: 16px; }
.fine { color: #8e8e8e; font-size: 13px; }
.login-panel { display: grid; place-items: center; padding: 32px 16px; background: var(--surface); }
.login-box { width: min(360px, 100%); display: grid; gap: 16px; }

.topbar { background: var(--ink); color: #fff; min-height: 64px; padding: 12px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 3px solid var(--coral); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { border-radius: 2px; }
.brand strong { display: block; font-weight: 500; line-height: 1.2; }
.brand span { color: #a8a8a8; font-size: 12px; }
.account { display: flex; align-items: center; gap: 16px; color: #c8c8c8; font-size: 13px; }

main { max-width: 1120px; margin: 0 auto; padding: 40px 32px 64px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head .muted { margin-top: 6px; }
#count { color: #8e8e8e; font-weight: 300; font-variant-numeric: tabular-nums; }
main > .error { margin-bottom: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 2px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafafa; }
th { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
td:first-child { font-weight: 500; overflow-wrap: anywhere; }
td.mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: #444; }
td.num { font-variant-numeric: tabular-nums; color: #444; }
td:last-child { text-align: right; white-space: nowrap; width: 1%; }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); }

dialog { border: 0; border-top: 4px solid var(--coral); border-radius: 2px; padding: 0; width: min(440px, calc(100vw - 32px)); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
dialog.wide-dialog { width: min(560px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(18, 18, 18, .6); }
dialog form { padding: 24px; display: grid; gap: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
code.secret { display: block; padding: 12px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; user-select: all; border: 1px solid var(--line); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-left: 3px solid var(--coral); border-radius: 2px; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); z-index: 10; max-width: calc(100vw - 32px); }

.tabs { background: var(--surface); border-bottom: 1px solid var(--line); }
.tabs-inner { max-width: 1120px; margin: 0 auto; padding: 0 32px; display: flex; gap: 4px; }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 14px 12px 11px; font: 500 14px var(--font); color: var(--muted); cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--coral); }
th.num, td.num { text-align: right; }
td.num-text { color: #444; white-space: nowrap; }
td.mono { overflow-wrap: anywhere; }
.tag { display: inline-block; font-size: 11px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 2px; padding: 1px 6px; vertical-align: 1px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 2px; padding: 20px; display: grid; gap: 6px; align-content: start; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.stat-value { font-size: 28px; font-weight: 300; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-note { color: var(--muted); font-size: 13px; }
.meter { height: 6px; background: var(--paper); border-radius: 3px; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .3s; }
.meter span.high { background: var(--coral-deep); }
.section-title { font-size: 18px; margin: 0 0 12px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 32px 0 12px; }
.section-head .section-title { margin: 0; }
.inline-select { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--muted); }
select { font: inherit; color: var(--ink); background: #fff; border: 1px solid #c8c8c8; border-radius: 2px; padding: 8px 10px; }
select:focus-visible { outline: 2px solid var(--coral); outline-offset: 1px; }

@media (max-width: 760px) {
  .tabs-inner { padding: 0 16px; }
  .stats { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-brand { padding: 28px 16px; gap: 28px; border-right: 0; border-bottom: 4px solid var(--coral); }
  .topbar { padding: 10px 16px; }
  #who { display: none; }
  main { padding: 24px 16px 48px; }
  h1 { font-size: 28px; }
  .actions, .actions .btn { width: 100%; }
  th, td { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
