/* Monte Lattice design system. Corporate/Apple-style: off-white ground, clean grid,
   minimal copy, system sans everywhere. Art Deco kept ONLY as small chrome accents -
   a gold hairline under headings, a subtle sunburst divider, gold corner-ticks on the
   home project cards, and one Deco display face reserved for the wordmark. */

:root {
  --bg: #FAF8F3;      /* off-white page background, everywhere */
  --teal: #0E3A3A;    /* header/footer, headings, body text */
  --gold: #C9A24B;    /* hairlines, dividers, card corner-ticks, active nav */
  --orange: #E8823A;  /* the single action color - buttons, link hover, one chart line */

  --teal-70: #3a5f5f;
  --line: rgba(14, 58, 58, 0.14);
  --card-border: rgba(14, 58, 58, 0.16);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-wordmark: "Poiret One", "Segoe UI", var(--font-sans);

  --wrap: 1180px;
}

* { box-sizing: border-box; }

html { background: var(--bg); -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--teal);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--orange); }

h1, h2, h3, h4 {
  color: var(--teal);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.4em;
  letter-spacing: 0.01em;
}
h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wordmark {
  font-family: var(--font-wordmark);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* --- Top bar: solid teal, wordmark left, icon nav right --- */
.topbar {
  background: var(--teal);
  color: var(--bg);
  border-bottom: 2px solid var(--gold);
}
.topbar__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.topbar__brand {
  color: var(--bg);
  font-family: var(--font-wordmark);
  font-size: 1.15rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
}
.topbar__brand:hover { color: var(--gold); }

/* --- Icon nav (this IS the nav) --- */
.icon-nav {
  display: flex;
  gap: 26px;
  align-items: stretch;
}
.icon-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: rgba(250, 248, 243, 0.72);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 2px 4px 4px;
  border-bottom: 2px solid transparent;
}
.icon-nav a svg { width: 22px; height: 22px; stroke: currentColor; }
.icon-nav a:hover { color: var(--bg); }
.icon-nav a.active { color: var(--gold); border-bottom-color: var(--gold); }

/* --- Layout --- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.section { margin: 44px auto; }
.section--tight { margin: 28px auto; }

.section-heading {
  font-size: 1.15rem;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gold);
  margin-bottom: 20px;
}

/* --- Sunburst / chevron divider (the one decorative motif) --- */
.deco-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 40px auto;
  max-width: var(--wrap);
  padding: 0 28px;
}
.deco-divider::before,
.deco-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.deco-divider svg { width: 26px; height: 14px; display: block; opacity: 0.75; }

/* --- Home hero --- */
.hero {
  position: relative;
  width: 100%;
  height: 528px;
  overflow: hidden;
  background: var(--teal);
}
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 30, 30, 0.62) 0%, rgba(10, 30, 30, 0.28) 42%, rgba(10, 30, 30, 0.10) 100%);
}
.hero__content {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  padding: 56px 28px 0;
  max-width: var(--wrap);
  margin: 0 auto;
}
.hero__wordmark {
  color: #FAF8F3;
  font-size: clamp(2rem, 5vw, 3.1rem);
  margin: 0 0 12px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.hero__line {
  color: #FAF8F3;
  font-size: 1.05rem;
  max-width: 40ch;
  margin: 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

/* Below-image fallback copy for mobile (hidden on desktop) */
.hero-belowfold { display: none; }

/* --- Origin line --- */
.origin-line {
  max-width: 60ch;
  margin: 32px auto;
  font-size: 1.05rem;
  color: var(--teal-70);
  text-align: center;
}

/* --- Project card grid (home): 2x2 on desktop --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  max-width: 760px;
  margin: 0 auto;
}
.card {
  position: relative;
  display: block;
  background: #fff;
  border: 1px solid var(--card-border);
  color: var(--teal);
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover {
  color: var(--teal);
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(14, 58, 58, 0.12);
}

/* Art Deco "place in the city" image band across the top of each card. A teal wash +
   slight desaturation keeps the four reading as one set and stops them competing with
   the card text below. */
.card__img {
  position: relative;
  height: 150px;
  background-size: cover;
  background-position: center 42%;
}
/* Scrim + inset gold hairline frame, drawn as one layered ::after over the image. */
.card__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 58, 58, 0.14) 0%, rgba(14, 58, 58, 0.36) 100%);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 75, 0.6);
}
/* gold Deco corner brackets on the image band */
.card__img::before {
  content: "";
  position: absolute;
  inset: 6px;
  pointer-events: none;
  z-index: 3;
  background:
    linear-gradient(var(--gold), var(--gold)) top left / 14px 1.5px no-repeat,
    linear-gradient(var(--gold), var(--gold)) top left / 1.5px 14px no-repeat,
    linear-gradient(var(--gold), var(--gold)) top right / 14px 1.5px no-repeat,
    linear-gradient(var(--gold), var(--gold)) top right / 1.5px 14px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom left / 14px 1.5px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom left / 1.5px 14px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom right / 14px 1.5px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom right / 1.5px 14px no-repeat;
}
.card__body { padding: 20px 22px 22px; }

/* gold L-shaped corner ticks */
.card::before,
.card::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--gold);
  pointer-events: none;
}
.card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.card::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.card__tag {
  display: inline-block;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(201, 162, 75, 0.22);
  padding: 3px 9px;
  margin-bottom: 12px;
}
/* corner ticks sit on the card edge, above the image band */
.card::before, .card::after { z-index: 2; }
.card__tag.is-private { background: rgba(232, 130, 58, 0.18); }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 0.9rem; color: var(--teal-70); margin: 0; }

/* --- Live data strip (home) - white card, gold hairline --- */
.live-strip {
  background: #fff;
  border: 1px solid var(--card-border);
  border-top: 3px solid var(--gold);
  padding: 24px 24px 20px;
  max-width: 760px;
  margin: 0 auto;
}
.live-strip__label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-70);
  margin: 0 0 16px;
}
.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 18px;
}
.metric {
  text-align: center;
  padding: 8px 10px;
}
.metric .value {
  display: block;
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--teal);
  line-height: 1.1;
}
.metric .value.is-highlight { color: var(--orange); }
.metric .label {
  display: block;
  margin-top: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-70);
}
.live-strip__more {
  margin: 16px 0 0;
  font-size: 0.9rem;
}
.live-strip__more a { color: var(--orange); font-weight: 600; }
.live-strip__more a:hover { text-decoration: underline; }

/* --- Product page: title band --- */
.title-band {
  background: var(--teal);
  color: var(--bg);
}
.title-band__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 20px 28px 18px;
}
.title-band h1 {
  color: var(--bg);
  font-family: var(--font-wordmark);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.title-band__rule {
  width: 64px;
  height: 2px;
  background: var(--gold);
}

.solves-line {
  max-width: 68ch;
  margin: 26px 0 8px;
  font-size: 1.08rem;
  color: var(--teal);
}

/* --- Data cards (product pages) --- */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.data-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--card-border);
  border-top: 3px solid var(--gold);
  padding: 24px 22px 22px;
}
/* gold Deco corner brackets on every product-page card */
.data-card::after,
.explain-card::after {
  content: "";
  position: absolute;
  inset: 7px;
  pointer-events: none;
  background:
    linear-gradient(var(--gold), var(--gold)) top left / 13px 1.5px no-repeat,
    linear-gradient(var(--gold), var(--gold)) top left / 1.5px 13px no-repeat,
    linear-gradient(var(--gold), var(--gold)) top right / 13px 1.5px no-repeat,
    linear-gradient(var(--gold), var(--gold)) top right / 1.5px 13px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom left / 13px 1.5px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom left / 1.5px 13px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom right / 13px 1.5px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom right / 1.5px 13px no-repeat;
}
.data-card h3 {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.data-card .value { color: var(--teal); font-weight: 600; }
.data-card .value.is-highlight { color: var(--orange); }
.data-card--full { grid-column: 1 / -1; }
.data-list { margin: 0; font-size: 0.9rem; color: var(--teal-70); }
.data-list > div { padding: 4px 0; border-bottom: 1px solid var(--line); }
.data-list > div:last-child { border-bottom: 0; }
.data-list strong { color: var(--teal); }

.empty-state {
  background: #fff;
  border: 1px dashed var(--card-border);
  padding: 22px;
  color: var(--teal-70);
  font-size: 0.95rem;
  text-align: center;
}

/* --- Explainer card (product pages): "how it works" step cards --- */
.explain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.explain-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--card-border);
  padding: 24px 22px;
}
.explain-card .step {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  padding-left: 12px;
  border-left: 2px solid var(--gold);
  margin-bottom: 10px;
}
.explain-card h3 { margin-bottom: 8px; }
.explain-card p { font-size: 0.9rem; color: var(--teal-70); margin: 0; }

/* --- Sample-output table (shows the shape of the data even when empty) --- */
.sample-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.sample-table caption {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-70);
  padding-bottom: 10px;
}
.sample-table th {
  text-align: left;
  font-weight: 600;
  color: var(--teal);
  border-bottom: 1px solid var(--gold);
  padding: 8px 12px 8px 0;
}
.sample-table td {
  color: var(--teal-70);
  border-bottom: 1px solid var(--line);
  padding: 9px 12px 9px 10px;
}
.sample-table tbody tr:nth-child(odd) td { background: rgba(201, 162, 75, 0.06); }
.sample-table tr:last-child td { border-bottom: 0; }
.sample-table th { padding-left: 10px; }
.sample-note {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--teal-70);
  font-style: italic;
}
.table-scroll { overflow-x: auto; }

/* --- Forms (docfiler, budget login) --- */
input, button, select, textarea { font-family: inherit; font-size: 1rem; }
.field {
  width: 100%;
  background: #fff;
  border: 1px solid var(--card-border);
  color: var(--teal);
  padding: 10px 13px;
  margin-bottom: 12px;
}
.field:focus { outline: 2px solid var(--gold); outline-offset: 0; }

.btn {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  border: 0;
  padding: 11px 24px;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.btn:hover { background: #d6752f; color: #fff; }
.btn--ghost {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--teal);
}
.btn--ghost:hover { background: rgba(201, 162, 75, 0.14); color: var(--teal); }

.status-msg { font-size: 0.9rem; margin-top: 8px; color: var(--teal-70); }
.status-msg.error { color: var(--orange); }
.status-msg.success { color: var(--teal); }

canvas { max-width: 100%; }

/* --- Footer --- */
.site-footer {
  background: var(--teal);
  color: rgba(250, 248, 243, 0.8);
  text-align: center;
  padding: 26px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  margin-top: 64px;
  border-top: 2px solid var(--gold);
}

/* --- Mobile: 375px, no horizontal scroll --- */
@media (max-width: 720px) {
  .topbar__inner { justify-content: center; gap: 14px; }
  .icon-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 28px;
    width: 100%;
    max-width: 300px;
  }

  .hero { height: 280px; }
  .hero__content { display: none; }
  .hero-belowfold {
    display: block;
    text-align: center;
    padding: 24px 20px 0;
  }
  .hero-belowfold .wordmark {
    display: block;
    font-size: 1.5rem;
    letter-spacing: 0.16em;
    color: var(--teal);
    margin-bottom: 10px;
    overflow-wrap: break-word;
  }
  .hero-belowfold p { color: var(--teal-70); margin: 0 auto; max-width: 32ch; }
  .origin-line { font-size: 1rem; }

  .card-grid, .data-grid, .explain-grid { grid-template-columns: 1fr; }
  .card-grid { max-width: none; }
  .section { margin: 32px auto; }
}

/* =========================================================================
   Console cockpit  (scoped to .console - the public site is untouched)
   ========================================================================= */

.site-footer__link {
  display: inline-block;
  margin-left: 14px;
  color: rgba(250, 248, 243, 0.55);
  border-bottom: 1px solid transparent;
}
.site-footer__link:hover { color: var(--bg); border-bottom-color: var(--gold); }

/* --- /code page: repo cards --- */
.repo-list { display: grid; gap: 20px; }
.repo-card {
  display: block;
  background: #fff;
  border: 1px solid var(--card-border);
  border-top: 3px solid var(--gold);
  padding: 22px 24px;
  color: var(--teal);
  transition: border-color 0.12s ease;
}
.repo-card:hover { border-color: var(--gold); color: var(--teal); }
.repo-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.repo-card__head h3 { margin: 0; font-size: 1.15rem; }
.repo-card__blurb { color: var(--teal-70); font-size: 0.92rem; margin: 0 0 14px; max-width: 68ch; }
.repo-card__meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline;
  font-size: 0.8rem; color: var(--teal-70); margin-bottom: 12px;
}
.repo-card__stack { letter-spacing: 0.02em; }
.repo-card__highlight { color: var(--gold); }
.repo-card__cta { font-size: 0.85rem; color: var(--orange); font-weight: 600; }

/* --- inline "View source" link on a product page --- */
.repo-inline {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.85rem; font-weight: 600; color: var(--orange);
}
.repo-inline:hover { color: var(--orange); text-decoration: underline; }

.code-console-note {
  margin-top: 26px; font-size: 0.9rem; color: var(--teal-70);
}
.code-console-note a { color: var(--orange); font-weight: 600; }

/* Public /budget sample doughnut */
.sample-wheel { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.sample-wheel svg { width: 150px; height: 150px; transform: rotate(-90deg); }
.sample-wheel__key { list-style: none; margin: 0; padding: 0; font-size: 0.85rem; color: var(--teal-70); }
.sample-wheel__key li { display: flex; align-items: center; gap: 9px; margin: 6px 0; }
.sample-wheel__key span { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }

/* --- Console theme: warmer ground, faint green cast, still restrained --- */
.console {
  --bg: #F7F6EF;
  --teal-70: #375b53;
  --line: rgba(14, 58, 58, 0.12);
  --ok: #3d8168;
  --warn: #C9862B;
  --down: #B4472F;
  --cal0: rgba(14, 58, 58, 0.08);
  --cal1: #a9cdbe;
  --cal2: #6fae94;
  --cal3: #3d8168;
  --cal4: #1f5340;
  background: var(--bg);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .console {
    --bg: #10201c;
    --teal: #e7efe9;
    --teal-70: #9fb8ad;
    --gold: #d8b869;
    --card-border: rgba(231, 239, 233, 0.16);
    --line: rgba(231, 239, 233, 0.14);
    --ok: #5cc79f;
    --warn: #e0a548;
    --down: #e8795f;
    --cal0: rgba(231, 239, 233, 0.08);
    --cal1: #2f5f52;
    --cal2: #3d8168;
    --cal3: #5cc79f;
    --cal4: #8fe3c4;
  }
}
:root[data-theme="dark"] .console {
  --bg: #10201c;
  --teal: #e7efe9;
  --teal-70: #9fb8ad;
  --gold: #d8b869;
  --card-border: rgba(231, 239, 233, 0.16);
  --line: rgba(231, 239, 233, 0.14);
  --ok: #5cc79f;
  --warn: #e0a548;
  --down: #e8795f;
  --cal0: rgba(231, 239, 233, 0.08);
  --cal1: #2f5f52;
  --cal2: #3d8168;
  --cal3: #5cc79f;
  --cal4: #8fe3c4;
}
.console { color: var(--teal); }
.console .section-heading { color: var(--teal); }

/* Section header with a freshness stamp on the right */
.console .sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; border-bottom: 1px solid var(--gold);
  padding-bottom: 8px; margin-bottom: 18px;
}
.console .sec-head h2 {
  font-size: 1rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700; margin: 0; color: var(--teal);
}
.console .freshness { font-size: 0.75rem; color: var(--teal-70); white-space: nowrap; }
.console .freshness::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok); margin-right: 6px; vertical-align: middle;
}
.console .freshness.is-stale::before { background: var(--warn); }
.console .freshness.is-down::before { background: var(--down); }

/* Today strip */
.today-strip { display: grid; gap: 10px; }
.today-item {
  background: #fff; border: 1px solid var(--card-border);
  border-left: 3px solid var(--gold);
  padding: 12px 16px; font-size: 0.92rem; color: var(--teal);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .console .today-item,
  :root:not([data-theme="light"]) .console .kpi-tile,
  :root:not([data-theme="light"]) .console .status-item,
  :root:not([data-theme="light"]) .console .console-hero,
  :root:not([data-theme="light"]) .console .data-card { background: #16302a; }
  :root:not([data-theme="light"]) .console .console-hero__value,
  :root:not([data-theme="light"]) .console .kpi-tile .kpi-value { color: var(--teal); }
}
:root[data-theme="dark"] .console .today-item,
:root[data-theme="dark"] .console .kpi-tile,
:root[data-theme="dark"] .console .status-item,
:root[data-theme="dark"] .console .console-hero,
:root[data-theme="dark"] .console .data-card { background: #16302a; }
:root[data-theme="dark"] .console .console-hero__value,
:root[data-theme="dark"] .console .kpi-tile .kpi-value { color: var(--teal); }
.today-item.is-warn { border-left-color: var(--warn); }
.today-item.is-clear { border-left-color: var(--ok); color: var(--teal-70); }

/* Status board */
.status-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.status-item {
  background: #fff; border: 1px solid var(--card-border); border-top: 3px solid var(--gold);
  padding: 14px 16px;
}
.status-item h3 {
  margin: 0 0 6px; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--teal-70); font-weight: 700;
}
.status-item .dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-right: 7px; vertical-align: middle;
}
.status-item .dot.ok { background: var(--ok); }
.status-item .dot.warn { background: var(--warn); }
.status-item .dot.down { background: var(--down); }
.status-item .detail { font-size: 0.85rem; color: var(--teal-70); }

/* Sample-data ribbon (logged-out Console) */
.console-ribbon {
  background: var(--gold); color: var(--teal);
  text-align: center; font-size: 0.82rem; letter-spacing: 0.04em;
  padding: 9px 16px;
}
.console-ribbon a { color: var(--teal); font-weight: 700; border-bottom: 1px solid currentColor; }

/* Hero: one big number + a full-width progress-over-time chart */
.console-hero {
  display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 28px; align-items: center;
  background: #fff; border: 1px solid var(--card-border); border-top: 3px solid var(--gold);
  padding: 26px 28px;
}
.console-hero__stat { display: flex; flex-direction: column; }
.console-hero__value { font-size: clamp(2.6rem, 6vw, 3.6rem); font-weight: 700; color: var(--teal); line-height: 1; }
.console-hero__label {
  margin-top: 8px; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-70);
}
.console-hero__sub { margin-top: 4px; font-size: 0.85rem; color: var(--teal-70); }
.console-hero__chart { min-width: 0; }
.console-hero__chart canvas { max-height: 200px; }

/* Two-up supporting grid (was three-up) - more breathing room */
.console-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.console-2col > .data-card { margin: 0; }

/* KPI row */
.kpi-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px;
}
.kpi-row--3 { grid-template-columns: repeat(3, 1fr); }
.kpi-row--4 { grid-template-columns: repeat(4, 1fr); }
.kpi-tile {
  background: #fff; border: 1px solid var(--card-border); border-top: 3px solid var(--gold);
  padding: 16px; text-align: left;
}
.kpi-tile .kpi-value { font-size: 1.7rem; font-weight: 700; color: var(--teal); line-height: 1.1; }
.kpi-tile .kpi-value.is-highlight { color: var(--orange); }
.kpi-tile .kpi-value.is-neg { color: var(--down); }
.kpi-tile .kpi-label {
  display: block; margin-top: 5px; font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--teal-70);
}
.console section > .kpi-row { margin-bottom: 16px; }

/* Cockpit cards are stacked full-width many-deep - drop the Deco corner brackets
   (they read as clutter here, unlike the 3-up storefront grids) and flatten the
   top rule so the sections don't strobe. */
.console .data-card { border-top: 1px solid var(--card-border); }
.console .data-card::after,
.console .data-card::before { display: none; }
.console .data-card h3 { color: var(--teal-70); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 6px; }
.console .data-list > div { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.console .data-list > div:last-child { border-bottom: 0; }
.console canvas { max-height: 260px; }

/* GitHub-style activity heatmap (inline SVG, scoped to the Console) */
.console .cal-heatmap { width: 100%; overflow-x: auto; padding-bottom: 4px; }
.console .cal-heatmap svg { display: block; height: auto; }
.console .cal-heatmap rect { stroke: var(--bg); stroke-width: 1; }

@media (max-width: 820px) {
  .console-hero { grid-template-columns: 1fr; gap: 16px; text-align: left; }
  .console-2col { grid-template-columns: 1fr; }
  .kpi-row, .kpi-row--3, .kpi-row--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
  .kpi-row, .kpi-row--3, .kpi-row--4 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .console .sec-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .status-board { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .console * { transition: none !important; animation: none !important; }
}

/* =========================================================================
   Console imagery layer  (signed-in only - .console:not(.console--demo)).
   Art Deco / dieselpunk stills behind the page header and four section
   headings. No motion, no parallax. All scoped so the demo view is untouched.
   ========================================================================= */

/* --- Full-width header still at the top of the Console ---
   Full-bleed, whole image, no crop: height:auto lets the image set the
   band height at whatever the viewport width is. Scrim only over the
   lower band where the "Console" title sits. */
.console:not(.console--demo) .console-hero-img {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--teal);
  border-bottom: 1px solid var(--gold);
}
.console:not(.console--demo) .console-hero-img img {
  display: block;
  width: 100%;
  height: auto;
}
.console:not(.console--demo) .console-hero-img__scrim {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  background: linear-gradient(
    180deg,
    rgba(8, 24, 22, 0) 0%,
    rgba(8, 24, 22, 0.45) 55%,
    rgba(8, 24, 22, 0.86) 100%
  );
}
.console:not(.console--demo) .console-hero-img__title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px 30px;
}
.console:not(.console--demo) .console-hero-img__title h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.02em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

/* --- Full still replacing a .sec-head heading ---
   The image is shown COMPLETE - no crop. The band height is whatever the
   image is at the content width (native 2.357:1), so object-fit has nothing
   to trim. Title + freshness float in a bottom scrim over the image. */
.console:not(.console--demo) .sec-head--img {
  position: relative;
  display: block;               /* override the flex row */
  height: auto;
  padding: 0;
  margin-bottom: 18px;
  overflow: hidden;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}
.console:not(.console--demo) .sec-head--img .sec-head__img {
  display: block;
  width: 100%;
  height: auto;                  /* image defines the band height - full frame, no crop */
}
.console:not(.console--demo) .sec-head--img .sec-head__scrim {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;                   /* scrim only over the lower band where the label sits */
  background: linear-gradient(
    180deg,
    rgba(8, 24, 22, 0) 0%,
    rgba(8, 24, 22, 0.45) 55%,
    rgba(8, 24, 22, 0.82) 100%
  );
}
.console:not(.console--demo) .sec-head--img h2 {
  position: absolute;
  left: 0;
  bottom: 14px;
  margin: 0;
  color: #fff;
  /* match the existing .sec-head h2 weight/tracking */
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 2px 14px rgba(0, 0, 0, 0.55);
}
.console:not(.console--demo) .sec-head--img .freshness {
  position: absolute;
  right: 0;
  bottom: 16px;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}
.console:not(.console--demo) .sec-head--img .freshness::before {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

@media (max-width: 720px) {
  /* hero + section bands are all height:auto now - images scale down with the
     viewport, still fully uncropped. Just nudge the labels in. */
  .console:not(.console--demo) .console-hero-img__title { padding-bottom: 18px; }
  .console:not(.console--demo) .console-hero-img__title h1 { font-size: 1.9rem; }
  .console:not(.console--demo) .sec-head--img h2 { bottom: 10px; font-size: 0.9rem; }
  .console:not(.console--demo) .sec-head--img .freshness { bottom: 12px; }
}
