:root {
  color-scheme: light;
  --bg: #f2f5ee;
  --bg-deep: #e4ead8;
  --panel: rgba(250, 252, 247, 0.9);
  --panel-strong: #ffffff;
  --panel-tint: #edf4e4;
  --ink: #121812;
  --muted: #4f5d46;
  --border: rgba(18, 24, 18, 0.12);
  --border-strong: rgba(18, 24, 18, 0.22);
  --accent: #76b900;
  --accent-2: #1e2a17;
  --accent-soft: rgba(118, 185, 0, 0.14);
  --warn: #8d6b1f;
  --warn-soft: rgba(141, 107, 31, 0.12);
  --danger: #9c2f24;
  --shadow: 0 24px 80px rgba(19, 27, 18, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(118, 185, 0, 0.18), transparent 26rem),
    radial-gradient(circle at bottom right, rgba(30, 42, 23, 0.12), transparent 28rem),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
  color: var(--ink);
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI Variable", sans-serif;
}

body {
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.ambient {
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.45;
  pointer-events: none;
}

.ambient-a {
  top: -12rem;
  right: -10rem;
  background: rgba(118, 185, 0, 0.3);
}

.ambient-b {
  left: -8rem;
  bottom: -12rem;
  background: rgba(30, 42, 23, 0.22);
}

.shell {
  position: relative;
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero,
.panel,
.tabs,
.filters,
.cards,
.view,
.status {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: stretch;
  padding: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 253, 0.96), rgba(242, 247, 235, 0.92)),
    var(--panel);
}

.hero-copy {
  max-width: 44rem;
}

.hero-rail {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 250px;
}

.eyebrow,
.kicker {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3,
p,
dl {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(2.4rem, 4vw, 4.3rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  max-width: 12ch;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  letter-spacing: -0.03em;
}

h3 {
  margin-bottom: 14px;
  font-size: 1.12rem;
}

.lede {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 62ch;
}

.lede.compact {
  max-width: none;
}

.hero-chip {
  padding: 13px 16px;
  border-radius: 18px;
  border: 1px solid rgba(118, 185, 0, 0.22);
  background: rgba(118, 185, 0, 0.1);
  color: var(--accent);
  font-weight: 700;
}

.hero-chip.subtle {
  color: var(--accent-2);
  border-color: rgba(30, 42, 23, 0.14);
  background: rgba(30, 42, 23, 0.06);
}

.hero-chip.neutral {
  color: var(--ink);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.5);
}

.ghost-button {
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  padding: 12px 15px;
  font-weight: 700;
  cursor: pointer;
}

.ghost-button:hover:not(:disabled),
button:hover:not(:disabled),
.tab:hover:not(:disabled),
.inspect-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.status,
.panel,
.tabs,
.filters,
.cards,
.view {
  margin-top: 18px;
}

.status {
  padding: 18px 22px;
}

.status.hidden {
  display: none;
}

.status.info {
  border-color: rgba(118, 185, 0, 0.22);
  background: rgba(118, 185, 0, 0.1);
}

.status.loading {
  border-color: rgba(30, 42, 23, 0.18);
  background: rgba(30, 42, 23, 0.06);
}

.status.error {
  border-color: rgba(156, 47, 36, 0.24);
  background: rgba(156, 47, 36, 0.08);
}

.status-title {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.status-copy {
  margin-top: 6px;
  color: var(--muted);
}

.panel {
  padding: 24px;
}

.login-panel {
  max-width: 820px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 12px;
}

.login-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.94rem;
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  color: var(--ink);
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(118, 185, 0, 0.45);
  box-shadow: 0 0 0 4px rgba(118, 185, 0, 0.12);
}

button,
.inspect-button {
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), #92d31b);
  color: white;
  padding: 12px 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 10px 28px rgba(118, 185, 0, 0.2);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
}

.tab {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 11px 15px;
  font-weight: 700;
  box-shadow: none;
}

.tab.active {
  border-color: rgba(118, 185, 0, 0.22);
  background: rgba(118, 185, 0, 0.12);
  color: var(--ink);
}

.filters {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 245, 235, 0.86));
}

.card.warn {
  border-color: rgba(141, 107, 31, 0.22);
  background: linear-gradient(180deg, rgba(255, 250, 236, 0.96), rgba(247, 239, 214, 0.9));
}

.card .label {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card .value {
  margin-top: 10px;
  font-size: clamp(1.55rem, 2vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.card .hint {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.view {
  padding: 18px;
}

.section {
  display: grid;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.table-section,
.detail-panel {
  padding: 0;
  border-radius: 24px;
  background: transparent;
  box-shadow: none;
}

.table-section h2 {
  margin-bottom: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 252, 247, 0.86);
  border: 1px solid var(--border);
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(24, 34, 45, 0.06);
}

th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

tr:last-child td {
  border-bottom: 0;
}

.install-meta {
  margin-top: 8px;
}

.install-id {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.inspect-button {
  min-width: 88px;
  padding: 10px 13px;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.fact {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 252, 247, 0.84);
}

.fact dt {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fact dd {
  margin: 8px 0 0;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255, 252, 247, 0.86);
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 6px;
}

.timeline-subhead,
.timeline-body {
  line-height: 1.5;
}

.timeline-body {
  margin-top: 12px;
}

.badge-row,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(24, 34, 45, 0.06);
  color: var(--ink);
  font-size: 0.9rem;
}

.pill {
  background: rgba(118, 185, 0, 0.1);
}

.pill-key {
  color: var(--accent);
  font-weight: 700;
}

.muted-pill {
  color: var(--muted);
  background: rgba(24, 34, 45, 0.04);
}

.empty-state {
  padding: 22px;
  border: 1px dashed var(--border-strong);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.35);
}

.callout {
  padding: 20px 22px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.56);
}

.callout.warn {
  border-color: rgba(141, 107, 31, 0.22);
  background: rgba(141, 107, 31, 0.08);
}

.callout p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.muted {
  color: var(--muted);
}

.error {
  color: var(--danger);
}

.section-total {
  margin-top: 10px;
}

.hidden {
  display: none !important;
}

.is-loading .hero-chip#auth-chip {
  background: rgba(30, 42, 23, 0.08);
  border-color: rgba(30, 42, 23, 0.18);
  color: var(--accent-2);
}

@media (max-width: 1180px) {
  .filters,
  .cards,
  .grid-3,
  .fact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .shell {
    width: min(100vw - 18px, 1240px);
    padding-top: 18px;
  }

  .hero,
  .section-heading,
  .timeline-head {
    flex-direction: column;
    align-items: start;
  }

  .hero-rail,
  .login-form,
  .filters,
  .cards,
  .grid-3,
  .fact-grid {
    grid-template-columns: 1fr;
  }

  .hero-rail {
    min-width: 0;
    width: 100%;
  }

  .ghost-button,
  button,
  .inspect-button {
    width: 100%;
  }

  th,
  td {
    padding: 12px;
  }
}
