/* RegWatcher UI. Layout responds to the width of #app (container queries), so it
   also works when a phone requests the desktop site and the page is zoomed. */
:root {
  color-scheme: light dark;
  --bg: #f6f6f3;
  --surface: #ffffff;
  --surface-2: #f0f0ec;
  --surface-3: #e6e6e1;
  --text: #121212;
  --text-2: #52514e;
  --muted: #898781;
  --border: #e1e0d9;
  --border-strong: #c3c2b7;
  --accent: #1f5cab;
  --accent-ink: #ffffff;
  --accent-soft: #dfeafb;
  --focus: #2a78d6;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px -12px rgba(0,0,0,.18);
  --radius: 10px;
  --radius-sm: 6px;
  /* status palette (fixed) */
  --st-ok: #0ca30c; --st-ok-bg: #e4f6e4; --st-ok-ink: #0a6d0a;
  --st-changed: #2a78d6; --st-changed-bg: #dfeafb; --st-changed-ink: #1b4f8f;
  --st-warn: #fab219; --st-warn-bg: #fff1d1; --st-warn-ink: #7a5300;
  --st-expiring: #ec835a; --st-expiring-bg: #fde5dc; --st-expiring-ink: #8a3a1c;
  --st-expired: #d03b3b; --st-expired-bg: #d03b3b; --st-expired-ink: #ffffff;
  --st-error: #d03b3b; --st-error-bg: #fbe0e0; --st-error-ink: #8a1f1f;
  --st-unknown: #898781; --st-unknown-bg: #ececea; --st-unknown-ink: #52514e;
  /* charts */
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4;
  --series-6: #008300; --series-7: #6250d6; --series-8: #e34948;
  --grid: #e1e0d9; --axis: #c3c2b7;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212; --surface: #1c1c1b; --surface-2: #242423; --surface-3: #2e2e2c;
    --text: #f0efec; --text-2: #c3c2b7; --muted: #8f8e88; --border: #2c2c2a; --border-strong: #3d3d3a;
    --accent: #5598e7; --accent-ink: #0b0b0b; --accent-soft: #1b2d45; --focus: #6da7ec;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
    --st-ok-bg: #143d14; --st-ok-ink: #7ad37a;
    --st-changed-bg: #15304f; --st-changed-ink: #86b6ef;
    --st-warn-bg: #3d2e08; --st-warn-ink: #fcd27a;
    --st-expiring-bg: #452316; --st-expiring-ink: #f5b094;
    --st-expired-bg: #d03b3b; --st-expired-ink: #ffffff;
    --st-error-bg: #4a1c1c; --st-error-ink: #f0a0a0;
    --st-unknown-bg: #2a2a28; --st-unknown-ink: #a3a29b;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181;
    --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
    --grid: #2c2c2a; --axis: #383835;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 2.5vw + 1rem, 2.4rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: .92em; }
small, .small { font-size: .85rem; color: var(--text-2); }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.noscript { padding: 2rem; text-align: center; }

.app { container-type: inline-size; container-name: app; min-height: 100vh; display: flex; flex-direction: column; }
.boot { display: grid; place-items: center; min-height: 60vh; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Top bar ---------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { max-width: 1600px; margin: 0 auto; padding: .55rem 1rem; display: flex; align-items: center; gap: .75rem; min-height: 56px; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; color: var(--text); font-size: 1.05rem; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav { display: flex; gap: .25rem; margin-left: auto; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nav a, .nav button.linklike { padding: .45rem .7rem; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; }
.nav a.active { background: var(--surface-2); color: var(--text); }
.nav a:hover { text-decoration: none; background: var(--surface-2); }

.page { width: 100%; max-width: 1600px; margin: 0 auto; padding: 1.25rem 1rem 3rem; flex: 1; }
.page.narrow { max-width: 760px; }
.page.wide { max-width: 100%; }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem .95rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 550; cursor: pointer;
  min-height: 40px; touch-action: manipulation; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--st-error-ink); background: var(--st-error-bg); border-color: transparent; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: .3rem .6rem; min-height: 32px; font-size: .88rem; }
.btn.block { width: 100%; }
.btn.icon { padding: .4rem; min-width: 40px; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
button.linklike { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }

/* Forms ------------------------------------------------------------------ */
label.field { display: block; margin-bottom: .9rem; }
label.field > span, .label { display: block; font-size: .88rem; font-weight: 600; color: var(--text-2); margin-bottom: .3rem; }
.input, input[type=text], input[type=search], input[type=number], input[type=date], input[type=datetime-local], textarea, select {
  width: 100%; font: inherit; font-size: 16px; padding: .55rem .7rem; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); min-height: 42px;
}
textarea { min-height: 120px; resize: vertical; font-family: var(--mono); font-size: .95rem; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; margin-bottom: .9rem; }
.check input { width: 20px; height: 20px; margin-top: .1rem; flex: none; }
.help { font-size: .85rem; color: var(--muted); margin-top: .25rem; }
.switch { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 12px; background: var(--border-strong); position: relative; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked { background: var(--st-ok); }
.switch input:checked::after { transform: translateX(18px); }
.form-error { color: var(--st-error-ink); background: var(--st-error-bg); padding: .6rem .8rem; border-radius: var(--radius-sm); margin-bottom: .9rem; font-size: .92rem; }
.form-ok { color: var(--st-ok-ink); background: var(--st-ok-bg); padding: .6rem .8rem; border-radius: var(--radius-sm); margin-bottom: .9rem; font-size: .92rem; }

/* Cards / panels --------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }
.card.flat { box-shadow: none; }
.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.section-title { display: flex; align-items: baseline; gap: .75rem; margin: 1.5rem 0 .75rem; }
.section-title h2 { margin: 0; }

/* Badges ------------------------------------------------------------------ */
.badge {
  display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600;
  line-height: 1.4; white-space: nowrap; border: 1px solid transparent; vertical-align: middle;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .9; flex: none; }
.badge.ok { background: var(--st-ok-bg); color: var(--st-ok-ink); }
.badge.changed { background: var(--st-changed-bg); color: var(--st-changed-ink); }
.badge.warn { background: var(--st-warn-bg); color: var(--st-warn-ink); }
.badge.expiring { background: var(--st-expiring-bg); color: var(--st-expiring-ink); }
.badge.error { background: var(--st-error-bg); color: var(--st-error-ink); }
.badge.expired { background: var(--st-expired-bg); color: var(--st-expired-ink); font-weight: 750; text-transform: uppercase; letter-spacing: .03em; animation: pulse 2s ease-in-out infinite; }
.badge.expired::before { content: "!"; width: auto; height: auto; background: none; opacity: 1; font-weight: 900; }
.badge.unknown { background: var(--st-unknown-bg); color: var(--st-unknown-ink); }
.badge.safe { background: var(--st-ok-bg); color: var(--st-ok-ink); }
.badge.weak { background: var(--st-warn-bg); color: var(--st-warn-ink); }
.badge.insecure { background: var(--st-error-bg); color: var(--st-error-ink); }
.badge.neutral { background: var(--surface-2); color: var(--text-2); }
.badge.neutral::before, .badge.plain::before { display: none; }
.badge.cat { background: var(--surface-2); color: var(--text-2); }
.badge.cat::before { background: var(--cat-color, var(--muted)); opacity: 1; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(208,59,59,.45); } 50% { box-shadow: 0 0 0 5px rgba(208,59,59,0); } }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); vertical-align: middle; }

/* Status cells ----------------------------------------------------------- */
.cell {
  display: flex; flex-direction: column; gap: .15rem; min-width: 0; padding: .45rem .55rem; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; text-align: left; background: none; color: inherit; font: inherit; width: 100%;
}
.cell:hover { background: var(--surface-2); border-color: var(--border); }
.cell .primary { font-weight: 600; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell .secondary { font-size: .8rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell.changed { border-left: 3px solid var(--st-changed); background: color-mix(in srgb, var(--st-changed-bg) 55%, transparent); }
.cell.warn { border-left: 3px solid var(--st-warn); background: color-mix(in srgb, var(--st-warn-bg) 55%, transparent); }
.cell.expiring { border-left: 3px solid var(--st-expiring); background: color-mix(in srgb, var(--st-expiring-bg) 65%, transparent); }
.cell.error { border-left: 3px solid var(--st-error); background: color-mix(in srgb, var(--st-error-bg) 65%, transparent); }
.cell.expired { border-left: 3px solid var(--st-expired); background: color-mix(in srgb, var(--st-expired-bg) 18%, transparent); }
.cell.expired .primary { color: var(--st-error-ink); font-weight: 750; }
.cell.unknown .primary { color: var(--muted); font-weight: 500; }

/* Domain table ----------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { padding: .5rem .6rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
table.data th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); font-weight: 650; background: var(--surface-2); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover { color: var(--text); }
table.data th .arrow { opacity: .4; margin-left: .2rem; }
table.data th.sorted .arrow { opacity: 1; color: var(--accent); }
table.data tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data.compact td, table.data.compact th { padding: .35rem .5rem; }
table.domains td { padding: .35rem .35rem; }
table.domains td.domain-col { min-width: 180px; max-width: 280px; }
table.domains td.status-col { min-width: 150px; max-width: 230px; }
.domain-name { font-weight: 650; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.domain-name a { color: var(--text); word-break: break-all; }
.domain-meta { font-size: .78rem; color: var(--muted); }
.row-actions { display: inline-flex; gap: .1rem; opacity: .75; }
.row-actions .btn { min-height: 26px; min-width: 26px; padding: .1rem .35rem; font-size: .85rem; }
tr:hover .row-actions { opacity: 1; }

.domain-cards { display: grid; gap: .75rem; }
.domain-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem .9rem; box-shadow: var(--shadow); }
.domain-card .head { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.domain-card .head .domain-name { flex: 1; font-size: 1.02rem; }
.domain-card .cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; }
.domain-card .cell .label-sm { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; }

/* Toolbar ---------------------------------------------------------------- */
.toolbar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar .search { flex: 1 1 220px; max-width: 420px; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; padding: .3rem .75rem; font-size: .85rem; cursor: pointer; color: var(--text-2); font-weight: 550; }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.legend-row { display: flex; gap: .6rem; flex-wrap: wrap; font-size: .8rem; color: var(--text-2); margin: .5rem 0 1rem; align-items: center; }

/* Tabs ------------------------------------------------------------------- */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { padding: .6rem .9rem; border: 0; background: none; font: inherit; font-weight: 550; color: var(--text-2); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tabs a.active, .tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--text); }

/* Key/value -------------------------------------------------------------- */
.kv { display: grid; grid-template-columns: minmax(120px, 180px) 1fr; gap: .35rem 1rem; font-size: .95rem; }
.kv dt { color: var(--text-2); font-weight: 550; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv.tight { gap: .2rem .75rem; font-size: .9rem; }

/* Stat tiles ------------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem .95rem; }
.tile .value { font-size: 1.7rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.tile .name { font-size: .8rem; color: var(--text-2); margin-top: .2rem; }
.tile.bad .value { color: var(--st-error-ink); }
.tile.warn .value { color: var(--st-warn-ink); }

/* Charts ------------------------------------------------------------------ */
.chart { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem .6rem; position: relative; }
.chart h3 { font-size: .95rem; margin-bottom: .4rem; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; }
.chart .axis-line { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { opacity: .08; }
.chart .marker { stroke: var(--surface); stroke-width: 2; }
.chart .crosshair { stroke: var(--border-strong); stroke-dasharray: 3 3; }
.chart .legend { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .78rem; color: var(--text-2); margin-top: .4rem; }
.chart .legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: .35rem; vertical-align: -1px; }
.chart .tooltip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .35rem .55rem; font-size: .78rem; box-shadow: var(--shadow); white-space: nowrap; z-index: 2; }
.chart .tooltip b { display: block; margin-bottom: .15rem; }
.chart .empty { color: var(--muted); font-size: .85rem; padding: 1.5rem 0; text-align: center; }
.bars { display: grid; gap: .35rem; font-size: .85rem; }
.bars .bar-row { display: grid; grid-template-columns: minmax(80px, 180px) 1fr auto; gap: .5rem; align-items: center; }
.bars .bar { height: 10px; background: var(--series-1); border-radius: 4px; min-width: 2px; }
.bars .bar.safe { background: var(--st-ok); } .bars .bar.weak { background: var(--st-warn); } .bars .bar.insecure { background: var(--st-error); }

/* Modal / toasts --------------------------------------------------------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 50; padding: 1rem; }
.modal { background: var(--surface); border-radius: var(--radius); width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 1.2rem 1.3rem; box-shadow: var(--shadow); }
.modal h2 { font-size: 1.2rem; }
.modal .actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; flex-wrap: wrap; }
.toasts { position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: .5rem; z-index: 60; width: min(420px, calc(100% - 2rem)); }
.toast { background: var(--text); color: var(--bg); padding: .7rem 1rem; border-radius: var(--radius-sm); box-shadow: var(--shadow); font-size: .92rem; display: flex; gap: .6rem; align-items: center; animation: rise .2s ease-out; }
.toast.error { background: var(--st-error); color: #fff; }
.toast.success { background: var(--st-ok-ink); color: #fff; }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Welcome ---------------------------------------------------------------- */
.hero { padding: 3rem 0 2rem; max-width: 760px; }
.hero p.lead { font-size: 1.15rem; color: var(--text-2); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.feature h3 { font-size: 1rem; display: flex; gap: .5rem; align-items: center; }
.feature p { margin: 0; font-size: .92rem; color: var(--text-2); }
.notice { background: var(--st-warn-bg); color: var(--st-warn-ink); padding: .7rem 1rem; border-radius: var(--radius-sm); margin: 1rem 0; }
footer.site { border-top: 1px solid var(--border); padding: 1.2rem 1rem calc(1.2rem + env(safe-area-inset-bottom)); color: var(--muted); font-size: .85rem; }
footer.site .inner { max-width: 1600px; margin: 0 auto; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between; }

/* Misc ------------------------------------------------------------------- */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-2); }
.empty-state h3 { color: var(--text); }
.pem { white-space: pre-wrap; word-break: break-all; font-size: .72rem; max-height: 220px; overflow: auto; background: var(--surface-2); padding: .6rem; border-radius: var(--radius-sm); }
.history-list { display: grid; gap: .5rem; }
.history-item { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .8rem; background: var(--surface); }
.history-item.current { border-color: var(--accent); }
.history-item.stale { opacity: .75; }
.timeline { display: flex; gap: 2px; align-items: flex-end; height: 48px; }
.timeline span { flex: 1; min-width: 2px; background: var(--st-ok); border-radius: 2px 2px 0 0; }
.timeline span.down { background: var(--st-error); }
.inline-list { display: flex; flex-wrap: wrap; gap: .3rem; }
.toggle-details summary { cursor: pointer; color: var(--accent); font-weight: 550; }
.pill-select { font-size: .85rem; min-height: 32px; padding: .25rem .4rem; width: auto; }
.warning-text { color: var(--st-error-ink); }
.ok-text { color: var(--st-ok-ink); }
.rel { white-space: nowrap; }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.pagination { display: flex; gap: .5rem; align-items: center; justify-content: space-between; margin-top: .75rem; }
pre.json { font-size: .78rem; background: var(--surface-2); padding: .5rem .7rem; border-radius: var(--radius-sm); overflow: auto; max-height: 300px; margin: 0; }

/* Responsive (container-based) ------------------------------------------- */
@container app (max-width: 900px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-md { display: none !important; }
}
@container app (max-width: 640px) {
  .page { padding: .9rem .75rem 2.5rem; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: .1rem; }
  .kv dt { margin-top: .5rem; font-size: .8rem; }
  .hide-sm { display: none !important; }
  .topbar-inner { padding: .45rem .75rem; }
  .brand span { display: none; }
  .nav a, .nav button.linklike { padding: .45rem .55rem; font-size: .92rem; }
  .card { padding: .9rem .95rem; }
  .hero { padding: 1.5rem 0 1rem; }
  .btn-row .btn { flex: 1 1 auto; }
  .modal { padding: 1rem; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-title { flex-direction: column; align-items: flex-start; gap: .25rem; }
  .toolbar .search { max-width: none; }
  .tabs a, .tabs button { padding: .55rem .7rem; }
}
@container app (max-width: 380px) {
  .domain-card .cells { grid-template-columns: 1fr; }
}
@media (hover: none) { .row-actions { opacity: 1; } }
@media print { .topbar, .toolbar, .row-actions, .toasts { display: none !important; } }

/* Live updates --------------------------------------------------------- */
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); display: inline-block; opacity: .5; }
.live-dot.on { background: var(--st-ok); opacity: 1; box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-ok) 25%, transparent); }
tr.flash > td, .domain-card.flash { animation: flash 2.5s ease-out; }
@keyframes flash { 0% { background-color: color-mix(in srgb, var(--st-changed) 22%, transparent); } 100% { background-color: transparent; } }
.countdown { font-variant-numeric: tabular-nums; }
.wake-toggle { color: var(--muted); }
.wake-toggle.on { color: var(--st-warn-ink); }
.wake-toggle .wake-icon { font-size: 1.05rem; line-height: 1; }
.badge.na { background: var(--st-unknown-bg); color: var(--st-unknown-ink); }
.cell.na .primary, .cell.na .secondary { color: var(--muted); font-weight: 500; }
.cell.na { opacity: .8; }
