/* HASS Data Points — docs site */

:root {
  /* tonal scale — tinted with the brand blue so the whole page reads as a blue site */
  --bg: oklch(0.24 0.07 252);
  --bg-elev: oklch(0.29 0.08 252);
  --bg-card: oklch(0.32 0.085 252);
  --bg-card-hi: oklch(0.38 0.09 252);
  --line: oklch(0.45 0.1 252);
  --line-hi: oklch(0.55 0.11 252);

  --fg: oklch(0.99 0.012 250);
  --fg-mute: oklch(0.85 0.025 250);
  --fg-dim: oklch(0.7 0.035 250);

  /* accents — HA-blue family, tuned to match the vibrant logo */
  --accent: oklch(0.78 0.2 245);
  --accent-hi: oklch(0.9 0.16 230);
  --accent-dim: oklch(0.6 0.2 250);
  --accent-soft: oklch(0.78 0.2 245 / 0.22);
  --accent-glow: oklch(0.78 0.2 245 / 0.5);
  --sky: oklch(0.92 0.15 215);

  /* semantic */
  --anomaly: oklch(0.7 0.2 25);
  --anomaly-soft: oklch(0.7 0.2 25 / 0.16);
  --warn: oklch(0.82 0.16 80);
  --warn-soft: oklch(0.82 0.16 80 / 0.14);
  --healthy: oklch(0.78 0.16 150);
  --healthy-soft: oklch(0.78 0.16 150 / 0.14);
  --purple: oklch(0.7 0.16 305);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --font-display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --font-body: "Geist", system-ui, -apple-system, sans-serif;
  --font-mono:
    "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  font-size: 16px;
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(
      1800px 1100px at 75% -5%,
      oklch(0.6 0.24 250 / 0.55),
      transparent 55%
    ),
    radial-gradient(
      1400px 800px at 5% 15%,
      oklch(0.5 0.22 240 / 0.4),
      transparent 60%
    ),
    radial-gradient(
      1200px 700px at 95% 60%,
      oklch(0.55 0.2 220 / 0.25),
      transparent 65%
    ),
    radial-gradient(
      900px 600px at 30% 90%,
      oklch(0.45 0.2 270 / 0.22),
      transparent 60%
    ),
    var(--bg);
  background-attachment: fixed;
}

/* Persistent grid layer — fixed so it stays under the content as you scroll */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, oklch(0.42 0.08 252 / 0.6) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(0.42 0.08 252 / 0.6) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(
    ellipse 70% 50% at 60% 15%,
    black 0%,
    transparent 75%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 70% 50% at 60% 15%,
    black 0%,
    transparent 75%
  );
  opacity: 0.55;
}

/* Make sure all page content sits above the fixed bg layer */
#root,
.nav,
main,
.footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

::selection {
  background: var(--accent-soft);
  color: var(--accent-hi);
}

/* ----- layout primitives ----- */

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 120px 0;
  position: relative;
}

.section--tight {
  padding: 80px 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 64px;
}

.docs-note {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent-hi);
  font-size: 12.5px;
  font-family: var(--font-mono);
  border: 1px solid oklch(0.78 0.2 245 / 0.35);
}
.docs-note svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 12px;
  border: 1px solid var(--accent-soft);
  border-radius: 100px;
  background: var(--accent-soft);
  margin-bottom: 20px;
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(48px, 7.2vw, 96px);
  font-weight: 500;
}
h2 {
  font-size: clamp(36px, 4.8vw, 64px);
}
h3 {
  font-size: clamp(22px, 2.2vw, 30px);
}
h4 {
  font-size: 18px;
}

.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--fg-mute);
  max-width: 60ch;
  text-wrap: pretty;
}

p {
  margin: 0 0 1em;
}

.mono {
  font-family: var(--font-mono);
}

/* ----- nav ----- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  background: oklch(0.13 0.012 245 / 0.75);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #1e88e5;
  background-image: url("images/logo.png");
  background-size: cover;
  background-position: center;
  box-shadow:
    0 0 0 1px oklch(0.66 0.21 250 / 0.6),
    0 0 16px -4px var(--accent-glow);
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 14px;
  color: var(--fg-mute);
}

.nav-links a:hover {
  color: var(--fg);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-hi);
  background: var(--bg-card);
  font-size: 13px;
  font-weight: 500;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.nav-cta:hover {
  border-color: var(--accent);
  background: var(--bg-card-hi);
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }
}

/* ----- buttons ----- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 14px;
  transition:
    transform 0.1s,
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.2s;
}
.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: oklch(0.18 0.04 245);
  box-shadow: 0 0 0 0 var(--accent-soft);
}
.btn--primary:hover {
  background: var(--accent-hi);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.btn--ghost {
  border: 1px solid var(--line-hi);
  background: transparent;
}
.btn--ghost:hover {
  background: var(--bg-card);
  border-color: var(--fg-dim);
}

/* ----- hero ----- */

.hero {
  position: relative;
  padding: 88px 0 60px;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(
    ellipse 80% 60% at 50% 30%,
    black 30%,
    transparent 80%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 80% 60% at 50% 30%,
    black 30%,
    transparent 80%
  );
  opacity: 0.6;
}

.hero-inner {
  position: relative;
  display: grid;
  gap: 56px;
}

.hero-copy {
  max-width: 980px;
}

.hero h1 {
  font-weight: 500;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent), oklch(0.85 0.16 300));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: 24px;
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--fg-mute);
  max-width: 64ch;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  color: var(--fg-dim);
  font-size: 13px;
  font-family: var(--font-mono);
}
.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-meta .pill {
  padding: 2px 8px;
  border: 1px solid var(--line-hi);
  border-radius: 100px;
  background: var(--bg-card);
  color: var(--fg-mute);
}

.hero-viz {
  position: relative;
  border: 1px solid var(--line-hi);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-elev) 100%);
  padding: 24px 24px 16px;
  overflow: hidden;
  min-height: 520px;
}

.hero-viz-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-viz-head .legend {
  display: flex;
  gap: 18px;
}
.hero-viz-head .legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-viz-head .legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ----- canvas/chart ----- */

.chart-wrap {
  position: relative;
  width: 100%;
}
.chart-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
}

.chart-overlay-tooltip {
  position: absolute;
  background: oklch(0.1 0.01 245 / 0.92);
  border: 1px solid var(--line-hi);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg);
  pointer-events: none;
  backdrop-filter: blur(6px);
  white-space: nowrap;
  transform: translate(-50%, -100%);
  z-index: 2;
}
.chart-overlay-tooltip .head {
  font-size: 10px;
  color: var(--anomaly);
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 6px;
}
.chart-overlay-tooltip .head.healthy {
  color: var(--healthy);
}

/* ----- stat strip ----- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 36px 0;
}
.stat .v {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat .l {
  font-size: 13px;
  color: var(--fg-mute);
  margin-top: 8px;
}
@media (max-width: 760px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .stat .v {
    font-size: 32px;
  }
}

/* ----- cards grid (six lovelace cards) ----- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 920px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 24px;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.2s;
}
.card:hover {
  border-color: var(--line-hi);
  background: var(--bg-card-hi);
}

/* card-with-mini variant — uses a top illustration */
.card--with-mini {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card--with-mini:hover .mini {
  transform: translateY(-2px);
}
.card-mini-wrap {
  background: linear-gradient(180deg, #f4f6f8 0%, #e6eaf0 100%);
  border-bottom: 1px solid var(--line);
  padding: 22px;
  height: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-body {
  padding: 20px 22px 22px;
}
.card-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 8px;
}

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--accent);
}
.card-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  margin-bottom: 4px;
}
.card h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 8px;
}
.card p {
  font-size: 14px;
  color: var(--fg-mute);
  margin: 0;
  line-height: 1.5;
}

/* ----- method explorer ----- */

.explorer {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: 24px;
}
@media (max-width: 900px) {
  .explorer {
    grid-template-columns: 1fr;
  }
}

.method-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.method-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: left;
  transition:
    background 0.15s,
    border-color 0.15s;
  color: var(--fg);
}
.method-item:hover {
  background: var(--bg-card-hi);
}
.method-item.is-active {
  background: var(--bg-card-hi);
  border-color: var(--accent);
}

.method-item .badge {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: oklch(0.25 0.02 245);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-mute);
}
.method-item.is-active .badge {
  background: var(--accent);
  color: oklch(0.16 0.04 245);
}

.method-item .title {
  font-weight: 500;
  font-size: 14.5px;
  line-height: 1.3;
}
.method-item .desc {
  font-size: 12px;
  color: var(--fg-dim);
  margin-top: 2px;
  line-height: 1.4;
}

.method-item .chev {
  color: var(--fg-dim);
  font-family: var(--font-mono);
}
.method-item.is-active .chev {
  color: var(--accent);
}

.method-detail {
  display: flex;
  flex-direction: column;
}

.method-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.method-detail h3 {
  font-size: 28px;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-family: var(--font-mono);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid oklch(0.66 0.21 250 / 0.4);
}

.method-detail .demo-chart {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.method-detail .demo-chart canvas,
.demo-chart canvas {
  display: block;
  width: 100%;
}

.method-detail .demo-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  margin-bottom: 8px;
}

.method-detail .copy {
  font-size: 14px;
  color: var(--fg-mute);
  line-height: 1.6;
}
.method-detail .copy p {
  margin-bottom: 12px;
}
.method-detail .copy b {
  color: var(--fg);
  font-weight: 500;
}

.method-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 700px) {
  .method-grid-2 {
    grid-template-columns: 1fr;
  }
}

.note {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 14px;
  font-size: 13.5px;
  color: var(--fg-mute);
}
.note b {
  color: var(--fg);
  font-weight: 500;
}

/* ----- playbook ----- */

.playbook {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 820px) {
  .playbook {
    grid-template-columns: 1fr;
  }
}

.play-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.play-step .num {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.play-step h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.play-step p {
  font-size: 14px;
  color: var(--fg-mute);
  margin: 0;
  line-height: 1.55;
}
.play-step .key {
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 100px;
  margin-top: 12px;
}

/* ----- recipe / code ----- */

.recipe {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .recipe {
    grid-template-columns: 1fr;
  }
}

.recipe-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 24px;
}
.recipe-card h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 6px;
}
.recipe-card .when {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.recipe-card p {
  font-size: 14px;
  color: var(--fg-mute);
}

.recipe-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}
.recipe-tab {
  padding: 6px 12px;
  font-size: 12px;
  font-family: var(--font-mono);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg-mute);
  background: transparent;
  transition: all 0.15s;
}
.recipe-tab.is-active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.recipe-tab:hover:not(.is-active) {
  color: var(--fg);
  border-color: var(--line-hi);
}

.code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  background: oklch(0.1 0.01 245);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  color: var(--fg);
  white-space: pre;
  position: relative;
}
.code .k {
  color: oklch(0.78 0.13 305);
} /* keyword/key */
.code .s {
  color: oklch(0.8 0.12 145);
} /* string */
.code .c {
  color: var(--fg-dim);
  font-style: italic;
}
.code .n {
  color: oklch(0.82 0.14 80);
} /* number */
.code .v {
  color: var(--sky);
} /* mdi identifier */
.code .e {
  color: oklch(0.85 0.1 230);
} /* entity id */
.code .t {
  color: oklch(0.85 0.16 65);
  font-weight: 500;
} /* template */

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  border: 1px solid var(--line-hi);
  background: var(--bg-card);
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.15s;
}
.copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ----- monitor card mock ----- */

.monitor-mock {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 20px;
  align-items: center;
}
.monitor-mock + .monitor-mock {
  margin-top: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 100px;
  text-transform: capitalize;
}
.status-pill .d {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.status-pill.triggered {
  background: oklch(0.7 0.2 25 / 0.16);
  color: var(--anomaly);
}
.status-pill.triggered .d {
  background: var(--anomaly);
  box-shadow: 0 0 6px var(--anomaly);
}
.status-pill.healthy {
  background: var(--healthy-soft);
  color: var(--healthy);
}
.status-pill.healthy .d {
  background: var(--healthy);
}
.status-pill.warning {
  background: var(--warn-soft);
  color: var(--warn);
}
.status-pill.warning .d {
  background: var(--warn);
  box-shadow: 0 0 6px var(--warn);
}
.status-pill.paused {
  background: oklch(0.5 0.01 245 / 0.2);
  color: var(--fg-dim);
}
.status-pill.paused .d {
  background: var(--fg-dim);
}

.monitor-title {
  display: flex;
  flex-direction: column;
}
.monitor-title .t {
  font-weight: 500;
  font-size: 15px;
}
.monitor-title .m {
  font-size: 12px;
  color: var(--fg-dim);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.monitor-bars {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 28px;
}
.monitor-bars i {
  width: 4px;
  border-radius: 1px;
  background: var(--healthy);
  opacity: 0.5;
}
.monitor-bars.triggered i {
  background: var(--anomaly);
}
.monitor-bars.warning i {
  background: var(--warn);
}
.monitor-bars.paused i {
  background: var(--fg-dim);
  opacity: 0.35;
}
.monitor-bars i.active {
  opacity: 1;
}

.monitor-stat {
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: right;
}
.monitor-stat .v {
  font-size: 18px;
  font-weight: 500;
  color: var(--fg);
}
.monitor-stat .l {
  font-size: 10px;
  color: var(--fg-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 2px;
}

@media (max-width: 720px) {
  .monitor-mock {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .monitor-stat {
    text-align: left;
  }
}

/* ----- install ----- */

.install-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 760px) {
  .install-grid {
    grid-template-columns: 1fr;
  }
}

.install-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 28px;
}
.install-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 6px;
}
.install-card ol {
  font-size: 14px;
  color: var(--fg-mute);
  padding-left: 0;
  margin: 16px 0 0;
  counter-reset: step;
  list-style: none;
}
.install-card ol li {
  counter-increment: step;
  padding-left: 32px;
  position: relative;
  margin-bottom: 12px;
}
.install-card ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ----- footer ----- */

.footer {
  border-top: 1px solid var(--line);
  padding: 60px 0 80px;
  color: var(--fg-dim);
  font-size: 13px;
}
.footer .row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer .links {
  display: flex;
  gap: 20px;
}
.footer .links a:hover {
  color: var(--fg);
}

/* ----- detail bullets ----- */
.bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.bullets li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 14px;
  color: var(--fg-mute);
  width: 100%;
  text-wrap: wrap;
}
.bullets li::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.bullets li > * {
  min-width: 0;
}
.bullets li .mono {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.bullets li b {
  color: var(--fg);
  font-weight: 500;
}

/* utility */
.divider {
  height: 1px;
  background: var(--line);
  margin: 0;
}
.row-flex {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.muted {
  color: var(--fg-mute);
}
.fg {
  color: var(--fg);
}
.right {
  text-align: right;
}

/* loading hides FOUC */
#root:empty::after {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--bg);
}

/* ============================================================
   ANATOMY (annotated screenshots)
   ============================================================ */

.anatomy-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 1000px) {
  .anatomy-main {
    grid-template-columns: 1fr;
  }
}

.anatomy-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-hi);
  background: var(--bg-card);
  box-shadow:
    0 30px 60px -20px oklch(0.06 0 0 / 0.6),
    0 0 0 1px var(--line);
}

.anatomy-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
}
.anatomy-chrome.small {
  padding: 8px 12px;
  font-size: 10.5px;
}

.dot-rgb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-rgb.r {
  background: oklch(0.7 0.18 25);
}
.dot-rgb.g {
  background: oklch(0.78 0.16 100);
}
.dot-rgb.b {
  background: oklch(0.78 0.13 150);
}
.anatomy-url {
  margin-left: 10px;
}

.anatomy-frame img,
.anatomy-tile img {
  display: block;
  width: 100%;
  height: auto;
  background: white;
}

.pin {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
}
.pin-dot {
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: oklch(0.16 0.04 245);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 4px var(--accent-glow),
    0 6px 20px -4px oklch(0.06 0 0 / 0.5);
}
.pin-label {
  background: oklch(0.13 0.012 245 / 0.92);
  color: var(--fg);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--line-hi);
  white-space: nowrap;
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
}
.pin--right {
  flex-direction: row;
}
.pin--right .pin-label {
  order: -1;
}

.anatomy-legend {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.anatomy-legend li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  font-size: 14px;
  color: var(--fg-mute);
  line-height: 1.55;
}
.anatomy-legend .num {
  width: 28px;
  height: 28px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.anatomy-legend b {
  color: var(--fg);
  font-weight: 500;
}
kbd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border: 1px solid var(--line-hi);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--bg-elev);
  color: var(--fg);
  vertical-align: 1px;
}

.anatomy-secondary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}
@media (max-width: 900px) {
  .anatomy-secondary {
    grid-template-columns: 1fr;
  }
}

.anatomy-tile {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
}
.anatomy-tile img {
  border-bottom: 1px solid var(--line);
}
.anatomy-cap {
  padding: 16px 18px;
  font-size: 13px;
  color: var(--fg-mute);
  line-height: 1.55;
}
.anatomy-cap b {
  color: var(--fg);
  font-weight: 500;
}

/* ============================================================
   TIMELINE DRAGGER (interactive)
   ============================================================ */

.tl-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: 28px;
  overflow: hidden;
}

.tl-readout {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 32px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.tl-readout .card-title {
  display: block;
  margin-bottom: 4px;
}
.tl-readout-v {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
@media (max-width: 760px) {
  .tl-readout {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .tl-readout > div:nth-child(3) {
    grid-column: 1 / -1;
  }
  .tl-readout-v {
    font-size: 22px;
  }
}

.tl-track {
  position: relative;
  height: 200px;
  user-select: none;
  -webkit-user-select: none;
}

.tl-months {
  position: relative;
  height: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
}
.tl-months span {
  position: absolute;
  top: 0;
  transform: translateX(0);
  white-space: nowrap;
}

.tl-ticks {
  position: absolute;
  left: 0;
  right: 0;
  top: 28px;
  height: 60px;
  border-top: 1px solid var(--line-hi);
}
.tl-tick {
  position: absolute;
  top: 0;
  width: 1px;
  height: 8px;
  background: var(--line-hi);
}
.tl-tick--major {
  height: 14px;
  background: var(--fg-dim);
}

.tl-range {
  position: absolute;
  top: 28px;
  height: 60px;
  background: var(--accent-soft);
  border-top: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  cursor: grab;
  z-index: 2;
}
.tl-range:active {
  cursor: grabbing;
}

.tl-handle {
  position: absolute;
  top: 28px;
  width: 4px;
  height: 60px;
  background: var(--accent);
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 3;
}
.tl-handle::before {
  content: "";
  position: absolute;
  inset: -8px -10px;
}
.tl-handle-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-card);
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px var(--accent);
  transition:
    box-shadow 0.15s,
    transform 0.15s;
}
.tl-handle.is-dragging .tl-handle-dot,
.tl-handle:hover .tl-handle-dot {
  transform: translateX(-50%) scale(1.15);
  box-shadow:
    0 0 0 1px var(--accent),
    0 0 0 8px var(--accent-soft);
}

.tl-points {
  position: absolute;
  left: 0;
  right: 0;
  top: 100px;
  height: 90px;
}
.tl-point {
  position: absolute;
  top: 12px;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--c, var(--accent));
  color: var(--c, var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    opacity 0.15s;
  opacity: 0.45;
  z-index: 4;
}
.tl-point.is-in {
  opacity: 1;
  box-shadow: 0 0 0 4px oklch(from var(--c, var(--accent)) l c h / 0.18);
}
.tl-point.is-hover,
.tl-point:hover {
  transform: translateX(-50%) scale(1.18);
  z-index: 5;
}
.tl-point::after {
  content: "";
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 16px;
  background: var(--c, var(--accent));
  opacity: 0.3;
}
.tl-point.is-in::after {
  opacity: 0.55;
}

.tl-tip {
  position: absolute;
  top: 56px;
  transform: translateX(-50%);
  background: oklch(0.1 0.01 245 / 0.95);
  border: 1px solid var(--line-hi);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  white-space: nowrap;
  z-index: 6;
  pointer-events: none;
  backdrop-filter: blur(6px);
}
.tl-tip-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
}
.tl-tip-label {
  font-size: 13px;
  color: var(--fg);
  font-weight: 500;
  margin-top: 2px;
}

.tl-hints {
  margin-top: 16px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--fg-dim);
  font-family: var(--font-mono);
}
.tl-hints span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tl-list {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 18px 22px;
}
.tl-list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.tl-list-empty {
  font-size: 14px;
  color: var(--fg-dim);
  padding: 24px 0;
  text-align: center;
  font-style: italic;
}
.tl-list-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tl-list-row {
  display: grid;
  grid-template-columns: 28px 130px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.tl-list-row:last-child {
  border-bottom: none;
}
.tl-list-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tl-list-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
}
.tl-list-label {
  color: var(--fg);
}

/* ============================================================
   BEYOND ANOMALIES
   ============================================================ */

.beyond-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 48px;
}
@media (max-width: 1000px) {
  .beyond-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .beyond-grid {
    grid-template-columns: 1fr;
  }
}

.beyond-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 22px;
}
.beyond-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.beyond-card h4 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  margin: 0 0 6px;
}
.beyond-card p {
  font-size: 13.5px;
  color: var(--fg-mute);
  margin: 0 0 12px;
  line-height: 1.5;
}
.beyond-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.beyond-examples span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  padding: 3px 8px;
  border-radius: 100px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
}

.beyond-capture {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 32px;
  align-items: start;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-elev) 100%);
  margin-bottom: 48px;
}
@media (max-width: 900px) {
  .beyond-capture {
    grid-template-columns: 1fr;
    padding: 24px;
  }
}

.beyond-capture h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  margin: 0 0 8px;
}
.beyond-tabs {
  display: flex;
  gap: 6px;
  margin-top: 18px;
}
.beyond-tab {
  padding: 8px 14px;
  font-size: 13px;
  border: 1px solid var(--line-hi);
  border-radius: 8px;
  color: var(--fg-mute);
  background: transparent;
  transition: all 0.15s;
}
.beyond-tab.is-active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.beyond-tab:hover:not(.is-active) {
  color: var(--fg);
}

/* HA-style card mocks */
.ha-card {
  background: white;
  color: oklch(0.2 0.005 245);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: "Roboto", "Geist", sans-serif;
  box-shadow: 0 16px 40px -10px oklch(0.06 0 0 / 0.6);
}
.ha-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ha-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ha-card-title {
  font-size: 15px;
  font-weight: 500;
  color: oklch(0.15 0 0);
}
.ha-card-sub {
  font-size: 12px;
  color: oklch(0.5 0.005 245);
}
.ha-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ha-field label {
  font-size: 11px;
  font-weight: 500;
  color: oklch(0.4 0.01 245);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ha-input {
  border: 1px solid oklch(0.85 0.01 245);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: oklch(0.2 0 0);
  background: oklch(0.99 0 0);
}
.ha-input--ta {
  min-height: 48px;
  line-height: 1.4;
}
.ha-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ha-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ha-chip {
  background: oklch(0.94 0.02 230);
  color: oklch(0.4 0.08 230);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-family: var(--font-mono);
}
.ha-chip--add {
  background: transparent;
  color: oklch(0.45 0.005 245);
  border: 1px dashed oklch(0.8 0.005 245);
}
.ha-button {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.15s;
}
.ha-button--primary {
  background: #41bdf5;
  color: white;
}
.ha-button--primary:hover {
  opacity: 0.9;
}
.ha-card--code {
  font-family: var(--font-body);
}
.ha-yaml {
  margin: 0;
  background: oklch(0.97 0.005 245);
  border: 1px solid oklch(0.9 0.005 245);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: oklch(0.2 0 0);
  white-space: pre;
  overflow-x: auto;
}

/* The list card mock (datapoints list) */
.list-card-mock {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: 0;
  overflow: hidden;
}
.lcm-head {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 12px;
}
.lcm-head h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 4px 0 0;
}
.lcm-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-hi);
  border-radius: 100px;
  color: var(--fg-dim);
  font-size: 13px;
  min-width: 260px;
}
.lcm-rows {
  padding: 8px 0;
}
.lcm-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}
.lcm-row:last-child {
  border-bottom: none;
}
.lcm-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lcm-icon svg {
  width: 16px;
  height: 16px;
}
.lcm-time {
  font-size: 11.5px;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
}
.lcm-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lcm-auto {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent);
}
.lcm-note {
  font-size: 13.5px;
  color: var(--fg-mute);
  margin-top: 4px;
  line-height: 1.5;
}
.lcm-ent {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.lcm-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--fg-mute);
}
.lcm-foot {
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

/* h2 em accent gradient (also used in Beyond) */
h2 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent), oklch(0.85 0.16 300));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================
   CHART-DRIVEN DATAPOINT CREATION DEMO
   ============================================================ */

.chart-create {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 32px;
  align-items: center;
  margin: 48px 0;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}
@media (max-width: 900px) {
  .chart-create {
    grid-template-columns: 1fr;
    padding: 24px;
  }
}

.chart-create h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.kbd-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  vertical-align: -6px;
}

.cc-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-hi);
  background: var(--bg-elev);
}
.cc-chart {
  position: relative;
  background: oklch(0.18 0.014 245);
  padding: 16px;
  cursor: crosshair;
  min-height: 220px;
  user-select: none;
}
.cc-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: oklch(0.13 0.012 245 / 0.92);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid var(--line-hi);
  pointer-events: none;
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cc-dialog {
  position: absolute;
  inset: 12px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow:
    0 0 0 3px var(--accent-glow),
    0 24px 60px -12px oklch(0.06 0 0 / 0.6);
  animation: cc-pop 0.18s ease-out;
}
@keyframes cc-pop {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.cc-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cc-dialog-head strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
}
.cc-close {
  font-size: 20px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--fg-mute);
}
.cc-close:hover {
  background: var(--bg-card-hi);
  color: var(--fg);
}
.cc-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cc-dialog-body label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-dim);
  margin-top: 4px;
}
.cc-input {
  padding: 8px 12px;
  border: 1px solid var(--line-hi);
  border-radius: 7px;
  font-size: 14px;
  background: var(--bg-elev);
}
.cc-pre {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 100px;
  background: var(--accent-soft);
  text-transform: none;
  letter-spacing: 0.02em;
  margin-left: 6px;
}
.cc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.cc-chips span {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-hi);
}
.cc-time {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
}
.cc-save {
  margin-top: 10px;
  align-self: flex-end;
  background: var(--accent);
  color: oklch(0.16 0.04 245);
  padding: 8px 18px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 13px;
}
.cc-save:hover {
  background: var(--accent-hi);
}

/* ============================================================
   LIST-CARD / ACTIVITY SCREENSHOT WRAPPER
   ============================================================ */

.list-shot-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: start;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}
@media (max-width: 900px) {
  .list-shot-wrap {
    grid-template-columns: 1fr;
    padding: 24px;
  }
}
.list-shot-copy h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.list-shot-img {
  border: 1px solid var(--line-hi);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
}
.list-shot-img img {
  display: block;
  width: 100%;
  height: auto;
}

.auto-tag-inline {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 7px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent);
  vertical-align: 1px;
}

/* ============================================================
   PANEL POWER TOOLS GRID
   ============================================================ */

.power-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 980px) {
  .power-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .power-grid {
    grid-template-columns: 1fr;
  }
}

.power-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.power-card:hover {
  border-color: var(--line-hi);
  background: var(--bg-card-hi);
}

.power-viz {
  height: 130px;
  background: radial-gradient(
    circle at 50% 100%,
    oklch(0.22 0.014 245),
    oklch(0.16 0.013 245)
  );
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.power-viz svg {
  display: block;
}

.power-body {
  padding: 18px 20px 20px;
}
.power-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 100px;
  margin-bottom: 8px;
}
.power-body h4 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.power-body p {
  font-size: 13.5px;
  color: var(--fg-mute);
  margin: 0;
  line-height: 1.55;
}

/* ============================================================
   AUTHOR SECTION
   ============================================================ */

.author-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(
      900px 600px at 90% -10%,
      var(--accent-glow),
      transparent 60%
    ),
    linear-gradient(180deg, var(--bg-card) 0%, var(--bg-elev) 100%);
  padding: 48px;
  position: relative;
  overflow: hidden;
}
@media (max-width: 720px) {
  .author-card {
    padding: 32px 24px;
  }
}

.author-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 12% 50%,
    var(--accent-soft),
    transparent 35%
  );
  pointer-events: none;
}

.author-grid {
  position: relative;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 760px) {
  .author-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.author-avatar {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
}
.author-avatar-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    oklch(0.85 0.18 230),
    oklch(0.5 0.22 250) 60%,
    oklch(0.35 0.18 260)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow:
    inset 0 0 0 2px oklch(0.95 0.04 230 / 0.6),
    0 0 0 1px var(--accent);
}
.author-initials {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 600;
  color: white;
  letter-spacing: -0.04em;
  line-height: 1;
}
.author-avatar-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: var(--accent-glow);
  filter: blur(28px);
  z-index: 1;
}

.author-meta {
  min-width: 0;
}
.author-meta h2 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent-hi), oklch(0.92 0.13 220));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.author-id {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: oklch(0.13 0.04 250 / 0.4);
  border: 1px solid var(--line);
  width: fit-content;
}
.author-id-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.author-id-title {
  font-size: 13px;
  color: var(--fg-mute);
  font-family: var(--font-mono);
}
.author-id-loc {
  margin-top: 4px;
  font-size: 12px;
  color: var(--fg-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
}

.author-facts {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
@media (max-width: 720px) {
  .author-facts {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 12px;
  }
}
.author-fact-v {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.author-fact-l {
  font-size: 11.5px;
  color: var(--fg-dim);
  margin-top: 6px;
  letter-spacing: 0.03em;
}

.author-stack {
  margin-top: 24px;
}
.author-stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.author-stack-pills span {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent-hi);
  border: 1px solid oklch(0.7 0.22 248 / 0.3);
}

.author-roles {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid var(--line);
  padding-left: 22px;
}
.author-role {
  position: relative;
  padding: 12px 0;
}
.author-role::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 0 4px var(--bg-card),
    0 0 0 5px var(--line);
}
.author-role-when {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}
.author-role-org {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
}
.author-role-role {
  font-size: 13px;
  color: var(--fg-mute);
  margin-top: 2px;
  line-height: 1.5;
}

.author-links {
  margin-top: 28px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================
   MONITOR ENTITY SCREENSHOT ROW
   ============================================================ */

.monitor-entity-row {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: start;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}
@media (max-width: 900px) {
  .monitor-entity-row {
    grid-template-columns: 1fr;
    padding: 24px;
  }
}
.monitor-entity-copy h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.monitor-entity-img {
  border: 1px solid var(--line-hi);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
}
.monitor-entity-img img {
  display: block;
  width: 100%;
  height: auto;
}

/* ============================================================
   RECIPE CARD FIXES (Ollie: text not full-stretched)
   ============================================================ */

.recipe-card .bullets {
  width: 100%;
}
.recipe-card .bullets li {
  width: 100%;
}

/* ============================================================
   MINI CARD ILLUSTRATIONS
   ============================================================ */

.mini {
  width: 100%;
  max-width: 220px;
  background: white;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow:
    0 2px 6px -1px oklch(0.4 0.05 245 / 0.12),
    0 14px 36px -8px oklch(0.4 0.05 245 / 0.18);
  font-family: "Roboto", "Geist", sans-serif;
  color: oklch(0.25 0.005 245);
  transition: transform 0.2s;
}

.mini-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mini-row--chips {
  gap: 4px;
}

.mini-bar {
  height: 6px;
  border-radius: 100px;
  background: oklch(0.92 0.005 245);
}
.mini-bar.w-20 {
  width: 20%;
}
.mini-bar.w-30 {
  width: 30%;
}
.mini-bar.w-32 {
  width: 32%;
}
.mini-bar.w-40 {
  width: 40%;
}
.mini-bar.w-46 {
  width: 46%;
}
.mini-bar.w-50 {
  width: 50%;
}
.mini-bar.w-56 {
  width: 56%;
}
.mini-bar--xs {
  height: 4px;
  opacity: 0.6;
}
.mini-bar--green {
  background: oklch(0.85 0.12 145);
}

.mini-input {
  height: 22px;
  border: 1px solid oklch(0.88 0.005 245);
  border-radius: 5px;
  background: oklch(0.98 0 0);
}
.mini-input--ta {
  height: 32px;
}

.mini-chip {
  height: 14px;
  width: 38px;
  border-radius: 100px;
  background: oklch(0.93 0.04 230);
}
.mini-chip--add {
  width: 26px;
  background: transparent;
  border: 1px dashed oklch(0.8 0.005 245);
}

.mini-btn {
  align-self: flex-end;
  background: #41bdf5;
  color: white;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.mini-btn--big {
  align-self: stretch;
  justify-content: center;
  padding: 10px;
  font-size: 13px;
}

/* Quick card */
.mini--quick {
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.mini-quick-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: oklch(0.95 0.08 80);
  color: oklch(0.6 0.16 80);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

/* List card */
.mini--list {
  padding: 12px 14px;
  gap: 6px;
}
.mini-list-search {
  background: oklch(0.96 0.005 245);
  height: 18px;
  border-radius: 100px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  color: oklch(0.55 0.005 245);
  margin-bottom: 2px;
}
.mini-list-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid oklch(0.95 0.005 245);
}
.mini-list-row:last-child {
  border-bottom: none;
}
.mini-list-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mini-list-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Chart card (history & sensor) */
.mini--history,
.mini--sensor {
  background: white;
  padding: 10px 12px 8px;
  gap: 0;
}
.mini-targets {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}
.mini-targets span {
  width: 36px;
  height: 4px;
  border-radius: 100px;
}
.mini-svg {
  width: 100%;
  height: auto;
  display: block;
}
.mini-timeline {
  display: flex;
  gap: 2px;
  margin-top: 4px;
  height: 4px;
}
.mini-timeline span {
  flex: 1;
  background: oklch(0.92 0.005 245);
  border-radius: 100px;
}
.mini-timeline span:nth-child(2),
.mini-timeline span:nth-child(3) {
  background: oklch(0.66 0.21 250);
}

/* Dev tool card */
.mini--dev {
  background: oklch(0.16 0.013 245);
  color: oklch(0.85 0.005 245);
  font-family: var(--font-mono);
}
.mini-dev-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}
.mini-dev-prefix {
  color: var(--accent);
  font-weight: 600;
  width: 12px;
}
.mini-dev-prefix.mini-dev-ok {
  color: var(--healthy);
}
.mini--dev .mini-bar {
  background: oklch(0.3 0.01 245);
}
.mini-dev-actions {
  margin-top: 4px;
  display: flex;
  gap: 6px;
}
.mini-btn-sm {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--accent);
  color: white;
}
.mini-btn-sm--ghost {
  background: transparent;
  border: 1px solid oklch(0.4 0.01 245);
  color: oklch(0.75 0.005 245);
}

.cards-foot {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-mute);
  font-family: var(--font-mono);
}
.cards-foot svg {
  color: var(--accent);
  flex-shrink: 0;
}
