/* BotUP web: pure black, green status, Google Sans Flex. Shared by site pages and /app. */
:root {
  --bg: #000000;
  --panel: #141414;
  --panel-2: #1c1c1c;
  --line: #262626;
  --border: #333333;
  --text: #f5f5f5;
  --muted: #8c8c8c;
  --green: #3bd671;
  --green-tint: #13261a;
  --yellow: #f5b83d;
  --yellow-text: #f5c76a;
  --red: #f25f5c;
  --red-text: #f28b88;
  --empty: #262626;
  --radius: 14px;
  --max: 1120px;
  --font: "Google Sans Flex", "Google Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--border); }
a:hover { text-decoration-color: var(--green); }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- header / footer ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 30px; height: 30px; display: block; }
.wordmark { font-size: 22px; font-weight: 300; letter-spacing: -0.01em; }
.wordmark b { font-weight: 500; color: var(--green); }

.nav { display: flex; align-items: center; gap: 22px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; }
.nav a:hover { color: var(--text); }
.nav .nav-cta { color: var(--text); }

.site-footer { border-top: 1px solid var(--line); margin-top: 96px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-top: 36px; padding-bottom: 48px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--muted); text-decoration: none; font-size: 14px; }
.site-footer a:hover { color: var(--text); }
.site-footer small { color: var(--muted); font-size: 13px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 12px;
  font: 500 15px/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: opacity 0.15s ease;
}
.btn:hover { opacity: 0.88; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--green); color: #000; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); font-weight: 400; }
.btn-danger { background: transparent; color: var(--red-text); border-color: var(--red); font-weight: 400; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }

/* ---------- landing ---------- */
.hero { padding: 88px 0 0; }
.hero h1 {
  font-weight: 300; font-size: clamp(44px, 7.4vw, 92px); line-height: 1.02;
  letter-spacing: -0.035em; margin: 0; max-width: 13ch;
}
.hero .lede { color: var(--muted); font-size: clamp(17px, 2vw, 20px); max-width: 46ch; margin: 28px 0 0; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* The signature: one wide uptime strip, newest bar breathing. */
.pulse-strip { margin-top: 72px; }
.pulse-strip .meta { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.pulse-strip .meta strong { color: var(--text); font-weight: 400; }
.strip { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 3px; height: 72px; }
.strip span { border-radius: 3px; background: var(--green); }
.strip span.d { background: var(--red); }
.strip span.w { background: var(--yellow); }
.strip span.now { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.strip-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 10px; }
@media (max-width: 700px) {
  .strip { grid-template-columns: repeat(45, minmax(0, 1fr)); height: 56px; }
  .strip span:nth-child(-n + 45) { display: none; }
}

.section { padding-top: 112px; }
.section h2 { font-weight: 300; font-size: clamp(32px, 4.4vw, 48px); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 16px; max-width: 18ch; }
.section .intro { color: var(--muted); font-size: 18px; max-width: 52ch; margin: 0 0 48px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.steps li { padding: 28px 28px 8px 0; border-right: 1px solid var(--line); }
.steps li + li { padding-left: 28px; }
.steps li:last-child { border-right: 0; }
.steps .n { color: var(--green); font-size: 15px; }
.steps h3 { font-weight: 400; font-size: 22px; margin: 10px 0 8px; }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 24px 0; border-right: 0; border-bottom: 1px solid var(--line); }
}

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; }
.feature { padding: 26px 0; border-top: 1px solid var(--line); }
.feature h3 { font-weight: 400; font-size: 19px; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.feature p { color: var(--muted); margin: 0; max-width: 46ch; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; background: var(--green); }
.dot.w { background: var(--yellow); }
.dot.d { background: var(--red); }
.dot.m { background: var(--muted); }
.soon { font-size: 12px; color: var(--yellow-text); border: 1px solid #4a3b16; border-radius: 999px; padding: 2px 9px; font-weight: 400; }
@media (max-width: 820px) { .features { grid-template-columns: 1fr; } }

/* Alert preview: what lands on the lock screen. */
.alerts { display: grid; gap: 10px; max-width: 520px; }
.alert { background: var(--panel); border-radius: var(--radius); padding: 14px 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; }
.alert .t { font-weight: 500; }
.alert .b { grid-column: 2 / 4; color: var(--muted); font-size: 14px; }
.alert time { color: var(--muted); font-size: 13px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 32px; } }

.plan { border: 1px solid var(--line); border-radius: 20px; padding: 36px; max-width: 560px; }
.plan .price { font-weight: 300; font-size: 64px; letter-spacing: -0.03em; line-height: 1; }
.plan .price small { font-size: 18px; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; gap: 12px; }
.plan li { display: flex; gap: 12px; align-items: baseline; }
.plan li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; transform: translateY(-2px); }

.faq { max-width: 760px; }
.faq details { border-top: 1px solid var(--line); padding: 20px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 300; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--muted); margin: 12px 0 0; max-width: 62ch; }

/* ---------- legal / prose pages ---------- */
.doc { max-width: 720px; padding-top: 72px; }
.doc h1 { font-weight: 300; font-size: clamp(38px, 5vw, 56px); letter-spacing: -0.025em; line-height: 1.05; margin: 0 0 12px; }
.doc .updated { color: var(--muted); margin: 0 0 48px; }
.doc h2 { font-weight: 400; font-size: 22px; margin: 44px 0 10px; }
.doc p, .doc li { color: #cfcfcf; }
.doc ul { padding-left: 20px; }
.doc li { margin: 6px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-weight: 400; color: var(--muted); }
.callout { background: var(--panel); border-radius: var(--radius); padding: 20px 22px; margin: 28px 0; }
.callout p { margin: 0; color: var(--text); }
.callout .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.notfound { padding-top: 120px; }
.notfound h1 { font-weight: 300; font-size: clamp(56px, 10vw, 120px); letter-spacing: -0.04em; margin: 0; line-height: 1; }
.notfound p { color: var(--muted); font-size: 18px; }

@media (max-width: 640px) {
  .nav .hide-sm { display: none; }
  .hero { padding-top: 56px; }
  .section { padding-top: 80px; }
  .plan { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =================== web dashboard (/app) =================== */
.app-header .wrap { height: 64px; }
.app-tabs { display: flex; gap: 4px; }
.app-tabs a {
  text-decoration: none; color: var(--muted); padding: 8px 14px; border-radius: 10px; font-size: 15px;
}
.app-tabs a[aria-current="page"] { color: var(--text); background: var(--panel); }
.app-tabs a:hover { color: var(--text); }
.app-main { padding: 32px 0 80px; }
.app-main .wrap { max-width: 920px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.toolbar h1 { font-weight: 300; font-size: 34px; letter-spacing: -0.02em; margin: 0; }
.toolbar .tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.select, .input {
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  min-height: 40px; padding: 0 12px; font: 400 14px var(--font);
}
.input { min-height: 48px; font-size: 16px; width: 100%; padding: 0 14px; }
.input:focus, .select:focus { border-color: var(--green); outline: none; }
input[type="date"].select { color-scheme: dark; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.pill .dot { width: 8px; height: 8px; }

.list { border-top: 1px solid var(--line); }
.mon { display: block; text-decoration: none; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.mon:hover { background: #0a0a0a; }
.mon-row { display: flex; align-items: center; gap: 14px; }
.mon-name { flex: 1; min-width: 0; }
.mon-name b { display: block; font-weight: 400; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mon-name small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mon-name small.down { color: var(--red-text); }
.mon-name small.degraded { color: var(--yellow-text); }
.mon-pct { color: var(--muted); font-weight: 300; font-size: 16px; }
.halo { box-shadow: 0 0 0 5px rgba(242, 95, 92, 0.18); }
.halo.w { box-shadow: 0 0 0 5px rgba(245, 184, 61, 0.18); }
.bars { display: grid; gap: 2px; margin-top: 10px; height: 18px; }
.bars span { border-radius: 2px; background: var(--empty); }
.bars .u { background: var(--green); }
.bars .w { background: var(--yellow); }
.bars .d { background: var(--red); }
.list-foot { color: var(--muted); font-size: 13px; padding: 14px 4px; }

.empty { padding: 48px 4px; text-align: center; }
.empty h2 { font-weight: 400; font-size: 20px; margin: 0 0 6px; }
.empty p { color: var(--muted); margin: 0 0 20px; }

.panel { background: var(--panel); border-radius: var(--radius); padding: 18px; }
.panel + .panel { margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } }

.detail-head { margin-bottom: 18px; }
.detail-head .back { color: var(--muted); text-decoration: none; font-size: 14px; }
.detail-head h1 { font-weight: 300; font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.02em; margin: 8px 0 4px; word-break: break-all; }
.detail-head p { color: var(--muted); margin: 0; font-size: 14px; }
.status-line { display: flex; align-items: center; gap: 14px; }
.status-line .big { font-size: 22px; }
.status-line small { display: block; color: var(--muted); font-size: 13px; }

.rows .r { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.rows .r:last-child { border-bottom: 0; }
.rows .r .k { display: flex; align-items: center; gap: 10px; }
.rows .r .v { color: var(--muted); text-align: right; }
.rows .r .v.bad { color: var(--red-text); }

.kpi { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; }
.kpi strong { color: var(--text); font-weight: 400; }
.spark { width: 100%; height: 90px; display: block; margin: 12px 0; }

.actions-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.form { display: grid; gap: 22px; max-width: 560px; }
.field label, .field .label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.field .hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
.seg { display: inline-flex; background: var(--panel); border-radius: 12px; padding: 4px; }
.seg button {
  border: 0; background: transparent; color: var(--muted); font: 400 15px var(--font);
  min-height: 40px; min-width: 96px; border-radius: 9px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle:last-child { border-bottom: 0; }
.toggle small { display: block; color: var(--muted); font-size: 12px; }
.switch { position: relative; width: 46px; height: 28px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; background: var(--panel-2); border-radius: 999px; transition: background 0.15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: transform 0.15s, background 0.15s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(18px); background: #000; }
.switch input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 3px; }

.error { color: var(--red-text); font-size: 14px; }
.ok-text { color: var(--green); }
.muted { color: var(--muted); }

.login { max-width: 420px; margin: 72px auto 0; text-align: center; }
.login img { width: 96px; height: 96px; }
.login h1 { font-weight: 300; font-size: 40px; letter-spacing: -0.02em; margin: 18px 0 8px; }
.login p { color: var(--muted); margin: 0 0 28px; }
.login .gbtn { display: flex; justify-content: center; min-height: 44px; }
.login small { display: block; color: var(--muted); font-size: 12px; margin-top: 24px; }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 18px; padding: 24px; max-width: 440px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
dialog h2 { font-weight: 400; font-size: 20px; margin: 0 0 8px; }
dialog p { color: var(--muted); margin: 0 0 20px; }
dialog .actions-bar { justify-content: flex-end; margin-top: 0; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; font-size: 14px;
  z-index: 10;
}

@media (max-width: 640px) {
  .app-header .wrap { height: auto; flex-wrap: wrap; padding-top: 12px; padding-bottom: 8px; }
  .app-tabs { order: 3; width: 100%; overflow-x: auto; }
  .toolbar h1 { font-size: 28px; }
}
#view:focus { outline: none; }
[hidden] { display: none !important; }
/* Google's button iframe is light; matching its color-scheme keeps it transparent on black. */
.gbtn { color-scheme: light; }
.tagline { color: var(--muted); font-size: 14px; padding-left: 12px; margin-left: 2px; border-left: 1px solid var(--line); line-height: 1.2; }
@media (max-width: 760px) { .tagline { display: none; } }
