﻿    :root {
      --bg-0: #060a14;
      --bg-1: #0b1220;
      --bg-2: #131e34;
      --surface: #101a2e;
      --surface-soft: #182641;
      --line: #284065;
      --text: #eef4ff;
      --muted: #9db1d0;
      --primary: #f5a524;
      --primary-strong: #ffbd4d;
      --good: #00c978;
      --bad: #ff6577;
      --warn: #ffd166;
      --chip: #1f3152;
      --panel-a: rgba(16, 26, 46, 0.95);
      --panel-b: rgba(12, 20, 35, 0.95);
      --chart-a: #16243f;
      --chart-b: #13213b;
      --button-bg: #182744;
      --button-hover: #203458;
      --tooltip-bg: rgba(7, 12, 22, 0.95);
      --legend-bg: #152746;
      --legend-off-bg: #0f1d33;
      --grid-line: #33507b;
      --axis-label: #9bb4d8;
      --y-label: #c3d6f3;
      --zero-line: #6eb6ff;
      --shadow: 0 20px 44px rgba(0, 0, 0, 0.38);
      --radius: 16px;
      --font-brand: "Segoe UI Variable Display", "Aptos Display", "Trebuchet MS", "Segoe UI", sans-serif;
      --font-ui: "Segoe UI Variable", "Aptos", "Segoe UI", Tahoma, sans-serif;
    }

    body.theme-light {
      --bg-0: #f2f7ff;
      --bg-1: #e7f0ff;
      --bg-2: #dce9ff;
      --surface: #ffffff;
      --surface-soft: #eef4ff;
      --line: #aec4e4;
      --text: #0f1f3a;
      --muted: #486489;
      --chip: #d6e3f8;
      --panel-a: rgba(255, 255, 255, 0.95);
      --panel-b: rgba(239, 246, 255, 0.94);
      --chart-a: #e9f2ff;
      --chart-b: #dfeaff;
      --button-bg: #e8f0ff;
      --button-hover: #dce8ff;
      --tooltip-bg: rgba(18, 31, 53, 0.94);
      --legend-bg: #e9f2ff;
      --legend-off-bg: #d4e3fb;
      --grid-line: #7f9ec9;
      --axis-label: #3a5883;
      --y-label: #24466f;
      --zero-line: #376bb0;
      --shadow: 0 16px 36px rgba(11, 28, 58, 0.15);
    }

    * { box-sizing: border-box; }

    html, body {
      width: 100%;
      height: 100%;
      margin: 0;
      padding: 0;
    }

    body {
      overflow-x: hidden;
      overflow-y: auto;
      color: var(--text);
      font-family: var(--font-ui);
      background:
        radial-gradient(900px 420px at 6% -12%, rgba(245, 165, 36, 0.18) 0%, transparent 70%),
        radial-gradient(900px 500px at 100% -10%, rgba(88, 133, 255, 0.17) 0%, transparent 68%),
        linear-gradient(140deg, var(--bg-0), var(--bg-1) 48%, var(--bg-2));
    }

.app {
  width: 100%;
  max-width: 100%;
  height: 100svh;
  min-height: 720px;
  padding: 0.9rem;
  display: grid;
  grid-template-rows: auto auto minmax(300px, 1fr) auto;
  gap: 0.7rem;
  overflow-x: hidden;
}

    .panel {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: linear-gradient(180deg, var(--panel-a), var(--panel-b));
      box-shadow: var(--shadow);
      backdrop-filter: blur(4px);
    }

    .hero {
      padding: 0.7rem 0.9rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.8rem;
      flex-wrap: wrap;
      position: relative;
      z-index: 20;
      overflow: visible;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 0.7rem;
      min-width: 280px;
      flex: 1;
    }

    .logo {
      width: 42px;
      height: 42px;
      border-radius: 12px;
      border: 1px solid rgba(255, 189, 77, 0.6);
      display: grid;
      place-items: center;
      background: linear-gradient(145deg, #392300, #1f1f1f);
      font-size: 1.06rem;
      font-weight: 900;
      color: var(--primary-strong);
      letter-spacing: 0.04em;
    }

    h1 {
      margin: 0;
      font-family: var(--font-brand);
      font-size: clamp(0.98rem, 1.7vw, 1.26rem);
      font-weight: 700;
      letter-spacing: 0.012em;
      line-height: 1.2;
      text-wrap: balance;
    }

    .tagline {
      margin: 0.2rem 0 0;
      color: var(--muted);
      font-size: 0.82rem;
      line-height: 1.3;
    }

    .hero-tools {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      flex-wrap: wrap;
    }

    .menu-toggle {
      display: none;
    }

    .icon-btn,
    .cta {
      border: 1px solid var(--line);
      background: var(--button-bg);
      color: var(--text);
      border-radius: 10px;
      padding: 0.42rem 0.62rem;
      font-size: 0.8rem;
      font-weight: 600;
      cursor: pointer;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.32rem;
      transition: 180ms ease;
    }

    .admin-only {
      display: none !important;
    }

    body.is-admin .admin-only {
      display: inline-flex !important;
    }

.icon-btn {
  width: 34px;
  min-width: 34px;
  padding: 0;
  font-size: 1rem;
}

.theme-toggle {
  font-size: 1.02rem;
}

    .cta {
      background: linear-gradient(180deg, #2f4670, #223657);
    }

    body.theme-light .cta {
      background: linear-gradient(180deg, #f4b647, #e89f1e);
      color: #1f2d45;
      border-color: #d48a10;
    }

    .icon-btn:hover,
    .cta:hover {
      border-color: #4a6fa7;
      transform: translateY(-1px);
      background: var(--button-hover);
    }

    .controls {
      display: flex;
      align-items: flex-start;
      justify-content: stretch;
      gap: 0.26rem;
      flex-direction: column;
    }

    .options-toggle {
      align-self: flex-start;
      min-width: auto;
      min-height: auto;
      border: 0;
      background: transparent;
      box-shadow: none;
      padding: 0;
      font-size: 0.83rem;
      font-weight: 800;
      color: var(--muted);
      letter-spacing: 0.01em;
    }

    .options-toggle:hover {
      color: var(--text);
      transform: none;
      background: transparent;
      border-color: transparent;
    }

    .controls-body {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      flex-wrap: wrap;
    }

    .options-panel {
      width: 100%;
      padding: 0.58rem 0.72rem;
      display: none;
    }

    .controls.is-open .options-panel {
      display: block;
    }

    .left-controls,
    .right-controls {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      flex-wrap: wrap;
    }

    select,
    .btn,
    .toggle {
      border: 1px solid var(--line);
      background: var(--surface-soft);
      color: var(--text);
      border-radius: 10px;
      min-height: 32px;
      font-size: 0.8rem;
      padding: 0.32rem 0.52rem;
      font-family: var(--font-ui);
    }

    .btn {
      cursor: pointer;
      font-weight: 600;
    }

    .toggle {
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      cursor: pointer;
      user-select: none;
    }

    .toggle input { accent-color: var(--primary); }

.insights-strip {
  padding: 0;
  margin: 0 0 0.18rem;
}

.chart-panel {
  padding: 0.66rem;
  position: relative;
  min-height: 300px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 0.55rem;
  isolation: isolate;
}

.insights-box {
  position: relative;
  z-index: 8;
  width: min(760px, 100%);
  margin: 0 auto;
  display: block;
  border: 1px solid rgba(245, 165, 36, 0.72);
  background: linear-gradient(180deg, rgba(15, 28, 49, 0.84), rgba(11, 21, 37, 0.8));
  border-radius: 10px;
  padding: 0.3rem 0.62rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  overflow: hidden;
}

body.theme-light .insights-box {
  border-color: rgba(226, 145, 23, 0.78);
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.9), rgba(232, 241, 255, 0.88));
  box-shadow: 0 7px 18px rgba(31, 61, 98, 0.16);
}

.insights-label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.insights-text {
  display: block;
  width: 100%;
  min-width: 0;
  position: relative;
  height: 1.25em;
  font-size: 0.82rem;
  color: var(--text);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  font-weight: 600;
  line-height: 1.2;
}

.ticker-track {
  display: inline-flex;
  width: max-content;
  align-items: center;
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
  transform: translateX(var(--ticker-start, 100%));
}

.insights-text.is-running .ticker-track {
  animation: insightsTicker var(--ticker-duration, 24s) linear infinite;
}

.ticker-segment {
  flex: 0 0 auto;
  padding-right: 0;
}

.chart-wrap {
  position: relative;
  border-radius: 14px;
      border: 1px solid var(--line);
      background: linear-gradient(180deg, var(--chart-a) 0%, var(--chart-b) 100%);
      overflow: hidden;
    }

    canvas {
      width: 100%;
      height: 100%;
      min-height: 280px;
      display: block;
      touch-action: none;
    }

    .overlay {
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      z-index: 2;
      color: #c8d9f3;
      font-size: 0.9rem;
      font-weight: 600;
      background: linear-gradient(95deg, #10192d, #162643, #10192d);
      background-size: 240% 100%;
      animation: pulse 1.2s linear infinite;
    }

.tooltip {
  position: absolute;
  z-index: 9000;
  pointer-events: none;
  min-width: 190px;
  padding: 0.5rem 0.58rem;
  border-radius: 10px;
  border: 1px solid #3a5683;
      background: var(--tooltip-bg);
      color: #edf5ff;
      font-size: 0.76rem;
      line-height: 1.35;
  transform: none;
  display: none;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
}

.status {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  min-height: 1.2rem;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
}

.day-range-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr);
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

body.is-admin .day-range-row {
  grid-template-columns: auto minmax(120px, 1fr) auto minmax(100px, 0.7fr);
}

.day-range-label {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 700;
}

.day-range-input {
  width: 100%;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--primary);
}

.day-range-end-label {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 700;
}

.day-range-end-input {
  width: 100%;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: #66c0ff;
}

.day-range-admin {
  display: none;
}

body.is-admin .day-range-admin {
  display: inline-block;
}

    .last-update {
      margin: 0;
      font-size: 0.73rem;
      color: var(--muted);
      min-height: 1rem;
      text-align: right;
    }

    .status.warn { color: var(--warn); }
    .status.error { color: #ff7d8b; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  min-width: 0;
}

    .legend-order {
      margin-right: 0.28rem;
      min-width: 128px;
      padding: 0.35rem 0.54rem;
      border-radius: 999px;
      border: 1px solid #355380;
      background: var(--legend-bg);
      color: var(--text);
      font-size: 0.78rem;
      font-weight: 700;
    }

    .legend-action {
      border: 1px solid #355380;
      background: var(--legend-bg);
      color: var(--text);
      border-radius: 999px;
      padding: 0.35rem 0.62rem;
      font-size: 0.77rem;
      font-weight: 800;
      cursor: pointer;
      transition: 140ms ease;
    }

    .legend-action:hover {
      transform: translateY(-1px);
      border-color: #5f84ba;
    }

    .legend button {
      border: 1px solid #355380;
      background: var(--legend-bg);
      color: var(--text);
      border-radius: 999px;
      padding: 0.35rem 0.65rem;
      font-size: 0.79rem;
      font-weight: 700;
      cursor: pointer;
      transition: 140ms ease;
    }

    .legend button.off {
      opacity: 0.45;
      background: var(--legend-off-bg);
    }

    .legend button:hover {
      transform: translateY(-1px);
      border-color: #5f84ba;
    }

    .dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      display: inline-block;
      margin-right: 0.35rem;
      vertical-align: middle;
    }

.work-indicator {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: #2a426b;
  color: #ffd091;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  line-height: 1;
  box-shadow: 0 0 0 0 rgba(68, 211, 255, 0.5);
  z-index: 20;
}

.work-indicator.working {
  background: #59371a;
  color: #ffbd68;
  animation: workSpin 0.9s linear infinite;
  box-shadow: 0 0 0 0 rgba(255, 156, 47, 0.52);
}

.work-indicator.ready {
  background: #44d3ff;
  color: #073049;
  animation: none;
  box-shadow: 0 0 10px rgba(68, 211, 255, 0.45);
}

.watermark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-brand);
  font-size: clamp(1.5rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: rgba(200, 220, 248, 0.07);
  pointer-events: none;
  z-index: 0;
  user-select: none;
}

body.theme-light .watermark {
  color: rgba(30, 66, 108, 0.16);
}

    .how {
      position: relative;
      z-index: 30;
      display: inline-flex;
    }

    .how .hintbox {
      display: none;
      position: absolute;
      right: 0;
      top: calc(100% + 8px);
      width: min(360px, 80vw);
      padding: 0.55rem;
      background: rgba(5, 11, 22, 0.97);
      border: 1px solid #3f5d8d;
      border-radius: 10px;
      color: #d8e8ff;
      font-size: 0.75rem;
      line-height: 1.4;
      text-align: left;
      z-index: 9999;
      pointer-events: auto;
    }

    .how.is-open .hintbox {
      display: block;
    }

    .contact-modal {
      position: fixed;
      inset: 0;
      display: none;
      z-index: 12000;
    }

    .contact-modal.is-open {
      display: grid;
      place-items: center;
    }

    .contact-modal-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.65);
      backdrop-filter: blur(2px);
    }

    .contact-modal-card {
      position: relative;
      width: min(420px, calc(100vw - 2rem));
      max-height: calc(100vh - 2rem);
      overflow: auto;
      border-radius: 14px;
      border: 1px solid #4f6e9f;
      background: linear-gradient(180deg, #101a2e, #0b1526);
      box-shadow: 0 24px 48px rgba(0, 0, 0, 0.42);
      padding: 0.95rem;
      color: #eaf3ff;
      display: grid;
      gap: 0.5rem;
    }

    .contact-modal-card h2 {
      margin: 0;
      font-size: 1rem;
      font-family: var(--font-brand);
    }

    .contact-line {
      margin: 0;
      font-size: 0.85rem;
      color: #c8d9f3;
    }

    .contact-close {
      justify-self: end;
      margin-top: 0.15rem;
    }

    .legal {
      padding: 0.62rem 0.75rem;
      font-size: 0.73rem;
      color: #c5d5ed;
      line-height: 1.35;
      display: grid;
      gap: 0.32rem;
    }

    .legal-tail {
      width: calc(100% - 1.8rem);
      margin: 0 auto 0.9rem;
    }

    .legal strong { color: #f7fbff; }

    body.theme-light .legal {
      color: #233d63;
    }

    body.theme-light .legal strong {
      color: #162f52;
    }

    .seo-scroll {
      width: calc(100% - 1.8rem);
      margin: 0 auto 0.9rem;
      padding: 0;
    }

    .seo-grid {
      width: 100%;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.62rem;
      align-items: stretch;
    }

    .seo-copy {
      padding: 0.82rem 0.92rem;
      display: grid;
      gap: 0.34rem;
      align-content: start;
      border-color: rgba(94, 133, 186, 0.55);
      background:
        linear-gradient(180deg, rgba(19, 33, 58, 0.92), rgba(13, 24, 44, 0.9)),
        radial-gradient(120% 90% at 0% 0%, rgba(245, 165, 36, 0.09), transparent 70%);
    }

    .seo-copy h2 {
      margin: 0;
      font-size: 0.89rem;
      line-height: 1.3;
      color: #f5f9ff;
      font-family: var(--font-brand);
      letter-spacing: 0.012em;
      text-wrap: balance;
    }

    .seo-copy h3 {
      margin: 0.2rem 0 0;
      font-size: 0.81rem;
      line-height: 1.34;
      color: #dceaff;
      font-family: var(--font-brand);
      font-weight: 680;
      letter-spacing: 0.006em;
    }

    .seo-copy p {
      margin: 0;
      color: #c5d8f4;
      font-size: 0.78rem;
      line-height: 1.48;
      text-wrap: pretty;
    }

    .seo-faq {
      grid-column: 1 / -1;
      gap: 0.46rem;
    }

    .faq-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.48rem 0.62rem;
      align-items: start;
    }

    .faq-item {
      display: grid;
      gap: 0.2rem;
      padding: 0.4rem 0.44rem;
      border: 1px solid rgba(103, 142, 194, 0.38);
      border-radius: 10px;
      background: linear-gradient(180deg, rgba(23, 39, 66, 0.62), rgba(14, 26, 46, 0.52));
    }

    body.theme-light .seo-copy {
      border-color: rgba(90, 127, 179, 0.45);
      background:
        linear-gradient(180deg, rgba(250, 253, 255, 0.98), rgba(238, 245, 255, 0.96)),
        radial-gradient(120% 90% at 0% 0%, rgba(233, 161, 44, 0.12), transparent 74%);
    }

    body.theme-light .faq-item {
      border-color: rgba(108, 145, 192, 0.45);
      background: linear-gradient(180deg, rgba(244, 249, 255, 0.95), rgba(233, 242, 255, 0.9));
    }

    body.theme-light .seo-copy h2 {
      color: #17375e;
    }

    body.theme-light .seo-copy h3 {
      color: #24476f;
    }

    body.theme-light .seo-copy p {
      color: #365882;
    }

    footer {
      border-top: 1px solid #2a436a;
      margin-top: 0.12rem;
      padding-top: 0.32rem;
      color: #95abd0;
      font-size: 0.72rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.5rem;
      flex-wrap: wrap;
    }

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

    @keyframes pulse {
      from { background-position: 100% 0; }
      to { background-position: -100% 0; }
    }

@keyframes workBlink {
  0%, 100% { opacity: 0.36; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes workSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes insightsTicker {
  from { transform: translateX(var(--ticker-start, 100%)); }
  to { transform: translateX(calc(-1 * var(--ticker-distance, 50%))); }
}

    @media (max-width: 900px) {
      html,
      body {
        height: auto;
      }

      body {
        overflow-y: auto;
        overflow-x: hidden;
      }

      .app {
        height: auto;
        min-height: 100svh;
        overflow: visible;
      }

      .hero,
      .controls,
      .chart-panel,
      .insights-strip,
      .legal {
        border-radius: 12px;
      }

      .legal-tail {
        width: calc(100% - 1.8rem);
      }

      .seo-scroll {
        width: calc(100% - 1.8rem);
      }

      .seo-grid {
        grid-template-columns: 1fr;
        gap: 0.52rem;
      }

      .seo-copy {
        padding: 0.72rem 0.76rem;
        gap: 0.3rem;
      }

      .seo-copy h2 {
        margin-top: 0.26rem;
        font-size: 0.82rem;
      }

      .seo-copy h3 {
        font-size: 0.78rem;
      }

      .seo-copy p {
        font-size: 0.74rem;
      }

      .faq-grid {
        grid-template-columns: 1fr;
        gap: 0.4rem;
      }

      .hero {
        align-items: flex-start;
      }

      .menu-toggle {
        display: inline-flex !important;
      }

      .hero-tools {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.46rem;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        transition: max-height 220ms ease, opacity 180ms ease;
      }

      .hero.menu-open .hero-tools {
        max-height: 240px;
        opacity: 1;
        pointer-events: auto;
      }

      .hero-tools .cta,
      .hero-tools .how,
      .hero-tools .icon-btn {
        width: 100%;
      }

      .hero-tools .how .icon-btn {
        min-width: 0;
      }

      .controls.is-open .controls-body {
        max-height: none;
      }

      .left-controls,
      .right-controls {
        width: 100%;
      }

      .controls-body {
        flex-direction: column;
        align-items: stretch;
      }

      .day-range-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
      }

      body.is-admin .day-range-row {
        grid-template-columns: 1fr;
      }

      .day-range-label,
      .day-range-end-label {
        font-size: 0.72rem;
      }

      .day-range-input,
      .day-range-end-input {
        width: 100%;
      }

      .legend {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
      }

      .legend-order {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
        margin-right: 0;
      }

      .legend-action,
      .legend button {
        width: 100%;
        min-width: 0;
      }

      .legend button {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .chart-panel {
        min-height: 320px;
      }

      .insights-text {
        font-size: 0.8rem;
      }
    }

    @media (min-width: 901px) {
      .menu-toggle {
        display: none !important;
      }

      .controls {
        flex-direction: row;
        align-items: flex-start;
      }

      .options-panel {
        display: none;
      }
    }
  
