:root {
      color-scheme: dark;
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
      background: radial-gradient(circle at 20% -10%, #2a2e33 0%, #1c1f22 48%, #181a1d 100%);
      color: #e6e7ea;
      line-height: 1.45;
    }

    .page {
      max-width: 1020px;
      margin: 0 auto;
      padding: 2rem 1rem 2.5rem;
    }

    .site-back {
      display: inline-flex;
      margin-bottom: 0.9rem;
      color: #9fa6b2;
      text-decoration: none;
      font-size: 0.92rem;
      transition: color 160ms ease;
    }

    .site-back:hover,
    .site-back:focus-visible {
      color: #e6e7ea;
    }

    .intro {
      background: rgba(36, 39, 43, 0.78);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 16px;
      padding: 1rem 1rem 1.05rem;
      margin-bottom: 1rem;
      box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
    }

    .intro h1 {
      margin: 0 0 0.4rem;
      font-size: clamp(1.25rem, 2vw, 1.55rem);
      letter-spacing: -0.01em;
      color: #f4f5f6;
    }

    .intro p {
      margin: 0.45rem 0;
      color: #cfd4dc;
      font-size: 0.99rem;
    }

    .formula {
      margin: 0.7rem 0;
      padding: 0.55rem 0.7rem;
      background: rgba(0, 0, 0, 0.17);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 10px;
      color: #f2f4f6;
      font-family: Consolas, "Courier New", monospace;
      font-size: 0.95rem;
      overflow-x: auto;
    }

    .zins-widget {
      --z-surface: #24272b;
      --z-border: rgba(255, 255, 255, 0.08);
      --z-text: #e6e7ea;
      --z-muted: #adb3bc;
      --z-accent: #25a47d;
      --z-track: #4a4d52;
      --z-thumb: #30343a;
      padding: 1.25rem;
      border-radius: 16px;
      background: linear-gradient(180deg, #242628 0%, #1f2123 100%);
      border: 1px solid var(--z-border);
      color: var(--z-text);
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    }

    .section {
      margin-bottom: 1.2rem;
      padding-bottom: 0.1rem;
    }

    .section-title {
      margin: 0 0 0.65rem;
      font-size: 0.82rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: #a4acb8;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      padding-bottom: 0.35rem;
    }

    .zins-controls {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1rem 1.25rem;
    }

    .zins-ctrl {
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
    }

    .zins-ctrl label {
      font-size: 0.95rem;
      font-weight: 500;
      color: var(--z-muted);
    }

    .zins-ctrl-row {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .phase-toggle {
      justify-content: flex-start;
      min-height: 1.5rem;
    }

    .toggle-label {
      font-size: 0.9rem;
      color: var(--z-muted);
      margin-left: 0.2rem;
    }

    .zins-slider {
      flex: 1;
      accent-color: var(--z-accent);
      height: 1.5rem;
    }

    .zins-slider::-webkit-slider-runnable-track {
      height: 4px;
      border-radius: 999px;
      background: var(--z-track);
    }

    .zins-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 18px;
      height: 18px;
      margin-top: -7px;
      border-radius: 50%;
      border: 1px solid rgba(255, 255, 255, 0.25);
      background: var(--z-thumb);
    }

    .zins-slider::-moz-range-track {
      height: 4px;
      border-radius: 999px;
      background: var(--z-track);
    }

    .zins-slider::-moz-range-thumb {
      width: 18px;
      height: 18px;
      border: 1px solid rgba(255, 255, 255, 0.25);
      border-radius: 50%;
      background: var(--z-thumb);
    }

    .zins-ctrl-val {
      min-width: 6.1rem;
      text-align: right;
      font-size: 1.3rem;
      font-weight: 600;
      letter-spacing: -0.01em;
      color: #f2f3f5;
    }

    .zins-metrics {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 0.75rem;
      margin-bottom: 1rem;
    }

    .zins-metric {
      background: var(--z-surface);
      border: 1px solid var(--z-border);
      border-radius: 12px;
      padding: 0.78rem 0.85rem;
    }

    .zins-metric-label {
      font-size: 0.85rem;
      color: var(--z-muted);
      margin-bottom: 0.3rem;
    }

    .zins-metric-val {
      font-size: 1.45rem;
      font-weight: 600;
      letter-spacing: -0.02em;
      color: var(--z-text);
    }

    .zins-metric-val.green {
      color: #25a47d;
    }

    .zins-metric-val.red {
      color: #d86c6b;
    }

    .zins-metric-val.amber {
      color: #d2a35d;
    }

    .tabs {
      display: flex;
      gap: 0.5rem;
      margin-bottom: 0.75rem;
      flex-wrap: wrap;
    }

    .tab {
      border: 1px solid rgba(255, 255, 255, 0.14);
      background: transparent;
      color: #c6cbd3;
      border-radius: 999px;
      padding: 0.35rem 0.8rem;
      font-size: 0.87rem;
      cursor: pointer;
    }

    .tab.active {
      background: #dfe5ec;
      color: #181b1f;
      border-color: transparent;
    }

    .legend {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 0.8rem;
      margin-bottom: 0.6rem;
      color: #b5bcc8;
      font-size: 0.85rem;
    }

    .legend-item {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
    }

    .legend-dot {
      width: 10px;
      height: 10px;
      border-radius: 2px;
      display: inline-block;
    }

    .zins-chart-wrap {
      position: relative;
      width: 100%;
      height: 300px;
      background: linear-gradient(180deg, #212428 0%, #1d2024 100%);
      border: 1px solid var(--z-border);
      border-radius: 12px;
      padding: 0.5rem;
    }

    .hint {
      margin-top: 0.75rem;
      font-size: 0.9rem;
      color: #abb1ba;
    }

    @media (max-width: 980px) {
      .zins-metrics {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    @media (max-width: 900px) {
      .zins-controls {
        grid-template-columns: 1fr;
      }

      .zins-ctrl-val {
        font-size: 1.15rem;
        min-width: 5.4rem;
      }

      .zins-metric-val {
        font-size: 1.3rem;
      }
    }

    @media (max-width: 620px) {
      .zins-metrics {
        grid-template-columns: 1fr;
      }
    }