/* AD-DA Sites. The hub's tokens (web/src/styles/app.css), light and dark by the system setting. */
:root {
  --font: 'Work Sans', system-ui, sans-serif;
  --font-head: 'Outfit', 'Work Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --fs-display: 22px; --fs-title: 20px; --fs-section: 16px; --fs-body: 14px; --fs-small: 13px;
  --radius: 8px; --radius-sm: 6px; --row-h: 44px; --panel-w: 420px;
  --signal: #1ba9d6;
  color-scheme: light;
  --bg: #f3f6f8; --surface: #ffffff; --surface-2: #e8eef1; --surface-3: #dde4e8;
  --border: #d5dde2; --border-strong: #c3cdd2; --text: #0f1113; --text-2: #59636b;
  --accent: #0a6f92; --accent-fill: #0a6f92; --accent-fill-hover: #095f7d; --accent-soft: rgba(10, 111, 146, .09); --accent-contrast: #fff;
  --green: #12a150; --red: #e5383e; --amber: #e69500; --amber-text: #8a5100; --red-text: #c4262c; --red-fill: #c4262c; --red-contrast: #fff;
  --shadow: 0 8px 28px rgba(15, 17, 19, .14); --overlay: rgba(15, 17, 19, .35); --focus-ring: #0a6f92;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f1113; --surface: #171a1d; --surface-2: #1e2226; --surface-3: #262b30;
    --border: #272d32; --border-strong: #363e45; --text: #f2f5f7; --text-2: #a9b4bb;
    --accent: #1ba9d6; --accent-fill: #1ba9d6; --accent-fill-hover: #4bbde2; --accent-soft: rgba(27, 169, 214, .14); --accent-contrast: #0f1113;
    --green: #38cc65; --red: #f0464b; --amber: #f5a524; --amber-text: #f2b14c; --red-text: #ff7a7e; --red-fill: #d42f35; --red-contrast: #fff;
    --shadow: 0 8px 28px rgba(0, 0, 0, .5); --overlay: rgba(0, 0, 0, .6); --focus-ring: #1ba9d6;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font: var(--fs-body)/1.5 var(--font); background: var(--bg); color: var(--text); }
h1 { font: 600 var(--fs-title)/1.3 var(--font-head); margin: 0; }
h2 { font: 600 var(--fs-section)/1.3 var(--font-head); margin: 24px 0 8px; }
h3 { font: 600 var(--fs-body)/1.3 var(--font-head); margin: 16px 0 4px; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--text-2); }
.small, small { font-size: var(--fs-small); }
small { display: block; color: var(--text-2); }
.mono, code { font-family: var(--mono); font-size: var(--fs-small); }
.spacer { flex: 1; }
.empty { color: var(--text-2); padding: 24px 0; }
.error { color: var(--red-text); }

.btn { font: inherit; min-height: 36px; padding: 6px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-contrast); }
.btn.primary:hover { background: var(--accent-fill-hover); }
.btn.danger { background: var(--red-fill); border-color: var(--red-fill); color: var(--red-contrast); }
.btn.quiet { background: transparent; }
.btn.icon { min-width: 36px; padding: 0; font-size: 20px; }
.btn.wide { width: 100%; min-height: 44px; }
.btn:disabled { background: var(--surface-3); color: var(--text-2); border-color: var(--surface-3); cursor: default; }
.danger-text { color: var(--red-text); }
.link { font: inherit; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 8px 0; text-decoration: underline; }
input, select { font: inherit; min-height: 36px; padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); width: 100%; }
label { display: grid; gap: 4px; font-size: var(--fs-small); color: var(--text-2); }
label input, label select { color: var(--text); font-size: var(--fs-body); }
.stack { display: grid; gap: 10px; margin: 12px 0; }

.mark { display: flex; align-items: center; gap: 6px; font-family: var(--font-head); font-size: 16px; white-space: nowrap; }
.mark .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--signal); }
.top { display: flex; align-items: center; gap: 12px; padding: 8px 20px; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.top select { width: auto; }
.top nav { display: flex; gap: 2px; flex-wrap: wrap; }
.tab { font: inherit; background: none; border: 0; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text-2); cursor: pointer; min-height: 36px; }
.tab:hover { background: var(--surface-2); color: var(--text); }
.tab.on { color: var(--accent); background: var(--accent-soft); }
header { display: flex; align-items: center; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
header nav { display: flex; gap: 4px; }
header nav button { font: inherit; background: none; border: 0; color: var(--text-2); min-height: 44px; padding: 0 12px; cursor: pointer; }
header nav button[aria-current] { color: var(--text); box-shadow: inset 0 -2px var(--accent); }
header select { width: auto; }
main { max-width: 1100px; margin: 0 auto; padding: 24px; }
.center { max-width: 460px; margin: 8vh auto; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.bar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.bar input { max-width: 320px; }
.rows { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.row { display: grid; grid-template-columns: 2fr 1fr 1.4fr 1fr; gap: 12px; align-items: center; width: 100%; min-height: var(--row-h); padding: 8px 14px; border: 0; border-bottom: 1px solid var(--border); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.row:last-child { border-bottom: 0; } .row:hover { background: var(--surface-2); } div.row { cursor: default; } div.row:hover { background: none; }
.tag { font-size: var(--fs-small); color: var(--text-2); } .tag.ok { color: var(--green); } .tag.off { color: var(--red-text); } .tag.warn { color: var(--amber-text); }
dialog { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 20px 24px; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog::backdrop { background: var(--overlay); }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.keyline { font: 600 18px/1.6 var(--mono); padding: 12px; background: var(--surface-2); border-radius: var(--radius-sm); overflow-wrap: anywhere; user-select: all; }
textarea { font: 13px/1.5 var(--mono); width: 100%; min-height: 120px; padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); overflow-wrap: anywhere; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-sm); z-index: 9; max-width: calc(100vw - 32px); }
@media (max-width: 700px) { .row { grid-template-columns: 1fr 1fr; } main { padding: 16px; } .two { grid-template-columns: 1fr; } header { padding: 8px 16px; } }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; color: var(--text); font-size: var(--fs-body); } .check input { width: 20px; min-height: 20px; }
