:root {
  color-scheme: light;
  --bg: #f5f5f4; --surface: #fff; --text: #202727; --muted: #626c6b;
  --border: #dce1df; --accent: #245c50; --accent-text: #fff;
  --soft: #eaf2ef; --error: #a62c35; --error-bg: #fff0f0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #151919; --surface: #1f2525; --text: #edf0ee; --muted: #adb8b3;
    --border: #38423e; --accent: #a2d4c1; --accent-text: #142d24;
    --soft: #2a3b33; --error: #ffafb5; --error-bg: #3f262b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151919; --surface: #1f2525; --text: #edf0ee; --muted: #adb8b3;
  --border: #38423e; --accent: #a2d4c1; --accent-text: #142d24;
  --soft: #2a3b33; --error: #ffafb5; --error-bg: #3f262b;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 Inter, system-ui, sans-serif; }
a { color: var(--accent); text-underline-offset: .2em; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 20px max(24px, calc((100vw - 1160px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-weight: 700; line-height: 1.4; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 12px; background: var(--soft); color: var(--accent); font-size: 22px; }
.brand-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
nav a { color: var(--muted); text-decoration: none; }
nav a[aria-current] { color: var(--accent); font-weight: 600; }
.container { max-width: 1160px; margin: 0 auto; padding: 32px 24px; }
.page-heading { margin-bottom: 28px; }
h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.2; letter-spacing: -.04em; margin: 8px 0 12px; }
h2 { font-size: 20px; letter-spacing: -.025em; margin: 0 0 20px; }
p { margin: 0 0 18px; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.card { padding: 30px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.login-card { max-width: 440px; margin: 48px auto; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack > label:not(:first-of-type) { margin-top: 10px; }
label { font-weight: 500; }
input:not([type="checkbox"]) { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: var(--bg); }
input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; flex-shrink: 0; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; font-weight: 500; }
.button:hover { filter: brightness(.92); }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.stack > .button { margin-top: 14px; }
.subtle { background: transparent; font-size: 13px; padding: 6px 10px; }
.danger { color: var(--error); }
.muted, .footer, .user-name { color: var(--muted); }
.small, .footer { font-size: 12px; }
.login-card > .small { margin: 24px 0 0; }
.block { display: block; }
.badge { display: inline-block; background: var(--soft); color: var(--accent); padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; }
.empty-state { padding: 48px; max-width: 800px; }
.empty-state h2 { margin-top: 24px; }
.two-column { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th { font-size: 12px; color: var(--muted); font-weight: 500; }
th, td { padding: 14px 8px; border-bottom: 1px solid var(--border); }
td { vertical-align: middle; }
.error, .notice { padding: 14px 16px; border-radius: 8px; margin-bottom: 20px; overflow-wrap: anywhere; }
.error { color: var(--error); background: var(--error-bg); }
.notice { color: var(--accent); background: var(--soft); }
.skip-link { position: absolute; top: -100px; padding: 12px; background: var(--surface); z-index: 2; }
.skip-link:focus { top: 0; }
@media (max-width: 760px) {
  .site-header { padding: 16px; flex-direction: column; align-items: flex-start; gap: 16px; }
  nav { gap: 10px; }
  .user-name { display: none; }
  .container { padding: 24px 16px; }
  .two-column { grid-template-columns: 1fr; }
  .card, .empty-state { padding: 22px; }
  .login-card { margin: 24px auto; }
}
