:root {
  --navy: #041133;
  --primary: #0146C7;
  --primary-light: #e8effa;
  --accent: #FFD602;
  --accent-light: #fff8d6;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --success-border: #bbf7d0;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --warning-border: #fde68a;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --danger-border: #fecaca;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100vh; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

::selection { background: rgba(1, 70, 199, 0.15); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.skip-link { position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { left: 16px; top: 16px; width: auto; height: auto; padding: 10px 16px; border-radius: var(--radius-sm); background: var(--surface); color: var(--navy); font-weight: 600; z-index: 1000; box-shadow: var(--shadow-lg); }

/* ─── Header ─── */
.site-header { background: var(--navy); }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; transition: opacity 200ms; }
.logo:hover { opacity: 0.85; }
.logo img { width: 28px; height: 28px; border-radius: 6px; }
.logo-text { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.logo-suffix { color: var(--accent); font-weight: 600; margin-left: 6px; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-link { padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.6); transition: all 150ms ease; }
.nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ─── Banner ─── */
.banner-wrap { background: var(--success); transition: background 300ms ease; }
.banner-wrap.degraded { background: var(--warning); }
.banner-wrap.outage { background: var(--danger); }
.banner-inner { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 12px; }
.banner-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.9); flex-shrink: 0; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.banner-label { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.banner-updated { margin-left: auto; font-size: 12px; color: rgba(255,255,255,0.7); white-space: nowrap; }

/* ─── Content ─── */
.content-wrap { max-width: 1200px; width: 100%; margin: 0 auto; padding: 24px 24px 40px; flex: 1; animation: fadeIn 400ms ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ─── Toolbar ─── */
.toolbar { margin-bottom: 24px; }
.search-box { position: relative; max-width: 360px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search-box input { width: 100%; padding: 10px 14px 10px 36px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-family: inherit; font-size: 14px; outline: none; transition: border-color 150ms, box-shadow 150ms; }
.search-box input::placeholder { color: var(--text-muted); }
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(1, 70, 199, 0.1); }

/* ─── Groups ─── */
.group-list { display: grid; gap: 20px; }
.group-card { border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow 200ms; }
.group-card:hover { box-shadow: var(--shadow-md); }
.group-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--border-light); border-bottom: 1px solid var(--border); }
.group-name { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); }
.group-count { font-size: 12px; font-weight: 500; color: var(--text-muted); }

/* ─── Component Rows ─── */
.component-list { display: grid; }
.component-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border-light); transition: background 100ms; cursor: pointer; }
.component-row:hover { background: var(--primary-light); }
.component-row:last-child { border-bottom: 0; }
.component-name { font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.component-desc { margin-top: 2px; font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.component-right { display: flex; align-items: center; gap: 14px; }
.uptime-pct { font-size: 13px; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }

/* ─── Badge ─── */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.up { background: var(--success-light); color: var(--success); }
.badge.degraded { background: var(--warning-light); color: var(--warning); }
.badge.down { background: var(--danger-light); color: var(--danger); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ─── Sparkline ─── */
.spark { display: flex; gap: 2px; margin-top: 4px; }
.spark-bar { width: 6px; height: 16px; border-radius: 2px; background: var(--border); }
.spark-bar.up { background: #86efac; }
.spark-bar.degraded { background: #fde68a; }
.spark-bar.down { background: #fca5a5; }

/* ─── Section Headings ─── */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; margin-top: 8px; }
.section-title { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }

/* ─── Incident / Maintenance Items ─── */
.item-list { display: grid; gap: 8px; margin-bottom: 24px; }
.item-card { padding: 14px 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.item-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 600; color: var(--text); }
.item-meta { margin-top: 4px; font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ─── Detail View ─── */
.detail-back { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 150ms; margin-bottom: 20px; }
.detail-back:hover { background: var(--border-light); color: var(--text); }
.detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.detail-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.detail-desc { margin-top: 4px; font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.detail-group-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--primary-light); color: var(--primary); }
.detail-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 28px; }
.stat-card { padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); transition: border-color 200ms, box-shadow 200ms; }
.stat-card:hover { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 4px; }
.stat-value { font-size: 20px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-value.up { color: var(--success); }
.stat-value.down { color: var(--danger); }
.stat-value.degraded { color: var(--warning); }

/* Detail uptime chart */
.detail-chart-wrap { padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); margin-bottom: 24px; }
.detail-chart-title { font-size: 13px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 12px; }
.detail-bars { display: flex; gap: 3px; align-items: flex-end; }
.detail-bar { flex: 1; min-width: 0; height: 32px; border-radius: 3px; background: var(--border); transition: opacity 150ms; cursor: default; position: relative; }
.detail-bar.up { background: #86efac; }
.detail-bar.degraded { background: #fde68a; }
.detail-bar.down { background: #fca5a5; }
.detail-bar:hover { opacity: 0.75; }
.detail-dates { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--text-muted); }
.detail-incidents-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 10px; }

/* Detail extra info grid */
.detail-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 24px; }
.detail-info-card { padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.detail-info-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 6px; }
.detail-info-value { font-size: 14px; font-weight: 600; color: var(--text); }
.detail-info-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ─── Subscribe Section (Redesigned) ─── */
.subscribe-section { margin-top: 40px; margin-bottom: 36px; }
.subscribe-card {
  padding: 28px 32px;
  border-radius: var(--radius);
  border: none;
  background: linear-gradient(135deg, var(--navy) 0%, #0a1d4a 100%);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.subscribe-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.1;
  pointer-events: none;
}
.subscribe-card::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 40%;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.15;
  pointer-events: none;
}
.subscribe-text { display: flex; align-items: center; gap: 14px; flex-shrink: 0; position: relative; z-index: 1; }
.subscribe-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.subscribe-icon { color: var(--navy); flex-shrink: 0; width: 20px; height: 20px; }
.subscribe-title { font-size: 16px; font-weight: 700; color: #fff; line-height: 1.3; }
.subscribe-desc { font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.3; margin-top: 2px; }
.subscribe-form { display: flex; gap: 8px; flex: 1; min-width: 240px; position: relative; z-index: 1; }
.subscribe-form input {
  flex: 1;
  min-width: 0;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 150ms, background 150ms;
}
.subscribe-form input:focus { border-color: var(--accent); background: rgba(255,255,255,0.12); box-shadow: 0 0 0 3px rgba(255,214,2,0.15); }
.subscribe-form input::placeholder { color: rgba(255,255,255,0.4); }
.subscribe-form button {
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: var(--navy);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 150ms;
}
.subscribe-form button:hover { background: #ffe333; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,214,2,0.3); }
.subscribe-form button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.subscribe-msg { width: 100%; padding: 10px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; position: relative; z-index: 1; }
.subscribe-msg.ok { background: rgba(22,163,74,0.15); color: #86efac; }
.subscribe-msg.err { background: rgba(220,38,38,0.15); color: #fca5a5; }

/* ─── Network Updates (Redesigned) ─── */
.updates-wrap { padding-top: 36px; }
.updates-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.updates-title { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.updates-link { font-size: 13px; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; background: var(--primary-light); transition: all 150ms; }
.updates-link:hover { background: var(--primary); color: #fff; }
.updates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.update-card {
  padding: 20px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 200ms;
  display: block;
  position: relative;
  overflow: hidden;
}
.update-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  opacity: 0;
  transition: opacity 200ms;
}
.update-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.update-card:hover::before { opacity: 1; }
.update-severity { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.update-severity.resolved { background: var(--success-light); color: var(--success); }
.update-severity.investigating { background: var(--warning-light); color: var(--warning); }
.update-severity.identified { background: var(--danger-light); color: var(--danger); }
.update-severity.info { background: var(--primary-light); color: var(--primary); }
.update-date { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.update-card-title { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.4; margin-bottom: 6px; }
.update-excerpt { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.update-affected { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.update-affected-tag { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--border-light); color: var(--text-secondary); }

/* ─── States ─── */
.loading-state, .empty { padding: 40px 0; text-align: center; font-size: 14px; color: var(--text-muted); }
.error-box { padding: 14px 20px; border-radius: var(--radius); border: 1px solid var(--danger-border); background: var(--danger-light); color: var(--danger); font-size: 14px; font-weight: 600; margin-bottom: 20px; }

/* ─── Footer ─── */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-muted); }
.footer-brand a { color: var(--primary); font-weight: 600; }
.footer-brand a:hover { text-decoration: underline; }

/* ─── Timezone Toggle ─── */
.tz-toggle { display: inline-flex; gap: 2px; border-radius: 6px; padding: 2px; background: var(--border-light); }
.tz-btn {
  padding: 4px 12px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tz-btn:hover { color: var(--text-secondary); }
.tz-btn.active {
  background: var(--primary);
  color: #fff;
}

/* ─── Incident Timeline ─── */
.incident-timeline { display: grid; gap: 12px; margin-bottom: 28px; }
.incident-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  border-left: 3px solid var(--border);
}
.incident-card.impact-minor { border-left-color: var(--warning); }
.incident-card.impact-major { border-left-color: var(--danger); }
.incident-card.impact-critical { border-left-color: var(--danger); }
.incident-card.impact-none { border-left-color: var(--border); }

.incident-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.incident-status-badge.investigating { background: var(--warning-light); color: var(--warning); }
.incident-status-badge.identified { background: var(--danger-light); color: var(--danger); }
.incident-status-badge.monitoring { background: var(--primary-light); color: var(--primary); }
.incident-status-badge.resolved { background: var(--success-light); color: var(--success); }

.incident-impact-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.incident-impact-badge.minor { background: var(--warning-light); color: var(--warning); }
.incident-impact-badge.major { background: var(--danger-light); color: var(--danger); }
.incident-impact-badge.critical { background: var(--danger-light); color: var(--danger); }
.incident-impact-badge.none { background: var(--border-light); color: var(--text-muted); }

.incident-updates {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 2px solid var(--border-light);
}
.incident-update-item {
  padding: 8px 0;
  position: relative;
}
.incident-update-item::before {
  content: '';
  position: absolute;
  left: -21px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.incident-update-item.investigating::before { background: var(--warning); }
.incident-update-item.identified::before { background: var(--danger); }
.incident-update-item.monitoring::before { background: var(--primary); }
.incident-update-item.resolved::before { background: var(--success); }

.incident-update-type {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
}
.incident-update-type.investigating { background: var(--warning-light); color: var(--warning); }
.incident-update-type.identified { background: var(--danger-light); color: var(--danger); }
.incident-update-type.monitoring { background: var(--primary-light); color: var(--primary); }
.incident-update-type.resolved { background: var(--success-light); color: var(--success); }

.incident-postmortem {
  background: var(--accent-light);
  border: 1px solid var(--accent);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ─── Maintenance Panel ─── */
.maintenance-panel { margin-bottom: 24px; }
.maintenance-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.maintenance-countdown {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.maintenance-timeline-bar {
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  position: relative;
  flex: 1;
  min-width: 120px;
}
.maintenance-timeline-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 300ms ease;
}
.maintenance-history { margin-top: 16px; }
.maintenance-toggle {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
  transition: color 150ms;
}
.maintenance-toggle:hover { color: var(--text); }

/* ─── Response Time Chart ─── */
.rt-chart {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 60px;
  padding: 12px 0;
}
.rt-bar {
  flex: 1;
  min-width: 0;
  background: var(--primary-light);
  border-radius: 2px;
  transition: height 200ms ease;
  cursor: default;
}
.rt-bar:hover { background: rgba(1, 70, 199, 0.6); }
.rt-percentiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}

/* ─── Location Grid ─── */
.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.location-card {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.location-card-name { font-size: 13px; font-weight: 600; color: var(--text); }
.location-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.location-status-dot.up { background: var(--success); }
.location-status-dot.degraded { background: var(--warning); }
.location-status-dot.down { background: var(--danger); }

/* ─── Subscriber Tabs ─── */
.subscribe-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.subscribe-tab {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-family: inherit;
  transition: all 150ms;
}
.subscribe-tab.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.subscribe-tab:hover { color: rgba(255,255,255,0.8); }

.subscribe-tab-panels {
  position: relative;
  z-index: 1;
  width: 100%;
}
.subscribe-tab-content { width: 100%; }

.feed-url-box { display: flex; gap: 8px; }
.feed-url-box input {
  flex: 1;
  min-width: 0;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 150ms, background 150ms;
}
.feed-url-box input:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 3px rgba(255,214,2,0.15);
}
.feed-url-box input::placeholder { color: rgba(255,255,255,0.4); }
.feed-copy-btn {
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: var(--navy);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 150ms;
}
.feed-copy-btn:hover { background: #ffe333; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,214,2,0.3); }
.feed-hint {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
}

.csv-download-btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--navy);
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 150ms;
}
.csv-download-btn:hover { background: #ffe333; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,214,2,0.3); }

/* ─── 5-State Badges (additional) ─── */
.badge.partial-outage { background: var(--warning-light); color: var(--warning); }
.badge.under-maintenance { background: var(--primary-light); color: var(--primary); }
.badge.major-outage { background: var(--danger-light); color: var(--danger); }

/* ─── Trust Section ─── */
.trust-section { padding-top: 36px; margin-bottom: 24px; }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.trust-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.trust-card-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.trust-card-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── Dependency List ─── */
.dep-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.dep-tag {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--border-light);
  color: var(--text-secondary);
}

/* ─── Status Tooltip ─── */
.status-tooltip { position: relative; cursor: help; }
.status-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--navy);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms;
  margin-bottom: 4px;
  z-index: 10;
}
.status-tooltip:hover::after { opacity: 1; }

/* ─── Accessibility: Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .header-inner { padding: 0 16px; height: 52px; }
  .banner-inner { padding: 12px 16px; flex-wrap: wrap; }
  .banner-updated { margin-left: 0; width: 100%; margin-top: 2px; padding-left: 22px; }
  .content-wrap { padding: 16px 16px 32px; }
  .search-box { max-width: 100%; }
  .component-row { grid-template-columns: 1fr; gap: 8px; padding: 12px 16px; }
  .component-right { justify-content: flex-start; }
  .group-header { padding: 12px 16px; }
  .footer-inner { padding: 14px 16px; flex-direction: column; gap: 4px; text-align: center; }
  nav { gap: 2px; }
  .nav-link { padding: 6px 10px; font-size: 12px; }
  .subscribe-card { padding: 20px; flex-direction: column; align-items: stretch; gap: 16px; }
  .subscribe-form { flex-direction: column; min-width: 0; }
  .subscribe-form button { width: 100%; }
  .detail-stats { grid-template-columns: 1fr 1fr; }
  .detail-header { flex-direction: column; }
  .detail-info-grid { grid-template-columns: 1fr; }
  .updates-grid { grid-template-columns: 1fr; }
  .updates-wrap { padding-top: 24px; }
  .tz-toggle { margin-top: 8px; }
  .toolbar { flex-wrap: wrap; }
  .location-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .subscribe-tabs { flex-wrap: wrap; }
  .maintenance-card { flex-direction: column; align-items: stretch; }
  .rt-percentiles { grid-template-columns: 1fr 1fr; }
  .incident-card { padding: 14px 16px; }
}
