/* utility-sites shared chrome. Source of truth: utility-sites/_shared/_chrome.css.
 * Each site's build.js copies this verbatim into dist/_chrome.css. Sites import it
 * with <link rel="stylesheet" href="/_chrome.css"> ahead of their own styles.css.
 *
 * What lives here: CSS variables (dark + light), base reset, topbar/tagline,
 * buttons, status pill, footer. Anything site-specific (layout containers,
 * input widgets, custom classes) belongs in the site's own styles.css.
 */

:root {
  --bg: #0b1020;
  --bg-elev: #11183a;
  --bg-pane: #0e1430;
  --fg: #e7ecff;
  --fg-mute: #9aa3c7;
  --border: #1f2a55;
  --accent: #6ea8ff;
  --accent-strong: #4f8cff;
  --ok: #5ee0a4;
  --warn: #f0c674;
  --err: #ff8a8a;
  --err-bg: #3a1820;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7fb;
    --bg-elev: #ffffff;
    --bg-pane: #ffffff;
    --fg: #14182b;
    --fg-mute: #5b6480;
    --border: #d8def0;
    --accent: #2f6bff;
    --accent-strong: #1f4ddb;
    --ok: #0b8a4d;
    --warn: #8a5a00;
    --err: #b3261e;
    --err-bg: #ffe3e3;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  min-height: 100vh;
}

.topbar {
  padding: 20px 24px 4px;
  border-bottom: 1px solid var(--border);
}

.topbar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.tagline {
  margin: 4px 0 12px;
  color: var(--fg-mute);
  font-size: 13px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn {
  font-family: var(--sans);
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-elev);
  color: var(--fg);
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn:not(:disabled):hover {
  border-color: var(--accent);
}

.btn:not(:disabled):active {
  transform: translateY(1px);
}

.btn.primary {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: white;
}

.btn.primary:not(:disabled):hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn.ghost {
  background: transparent;
}

.status {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-mute);
  white-space: pre-wrap;
  word-break: break-word;
}

.status.ok {
  color: var(--ok);
}

.status.err {
  color: var(--err);
  background: var(--err-bg);
}

.footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: var(--fg-mute);
  font-size: 12px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.footer .dot {
  opacity: 0.5;
}

.footer a {
  color: var(--fg-mute);
  text-decoration: underline;
  text-decoration-color: transparent;
}

.footer a:hover {
  text-decoration-color: currentColor;
}
