:root {
      --bg: #f6f8fb;
      --surface: #ffffff;
      --surface-soft: #eef3f8;
      --text: #172033;
      --muted: #64748b;
      --line: #d8e0ea;
      --primary: #db0f16;
      --primary-dark: #a30b10;
      --accent: #7f1d1d;
      --warning: #b45309;
      --success: #166534;
      --info: #1d4ed8;
      --shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
      --radius: 8px;
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      background: var(--bg);
      color: var(--text);
      font-family: Arial, Helvetica, sans-serif;
      line-height: 1.5;
    }

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

    button,
    input {
      font: inherit;
    }

    .page {
      min-height: 100vh;
    }

    .topbar {
      position: sticky;
      top: 0;
      z-index: 20;
      border-bottom: 1px solid rgba(216, 224, 234, 0.9);
      background: rgba(255, 255, 255, 0.92);
      backdrop-filter: blur(14px);
      transition: transform 0.22s ease, box-shadow 0.22s ease;
      will-change: transform;
    }

    .topbar--hidden {
      transform: translateY(-100%);
      box-shadow: none;
    }

    .topbar:focus-within {
      transform: translateY(0);
    }

    .topbar__inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
      width: min(1180px, calc(100% - 32px));
      margin: 0 auto;
      padding: 14px 0;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .brand__logo {
      width: 42px;
      height: 42px;
      border-radius: var(--radius);
      box-shadow: 0 8px 18px rgba(219, 15, 22, 0.2);
      object-fit: cover;
    }

    .brand__text {
      min-width: 0;
    }

    .brand__name {
      display: block;
      font-size: 15px;
      font-weight: 700;
      white-space: nowrap;
    }

    .brand__label {
      display: block;
      color: var(--muted);
      font-size: 12px;
      white-space: nowrap;
    }

    .nav {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .nav a {
      border-radius: 6px;
      color: var(--muted);
      font-size: 14px;
      font-weight: 600;
      padding: 8px 10px;
    }

    .nav a:hover,
    .nav a:focus-visible {
      background: var(--surface-soft);
      color: var(--text);
      outline: none;
    }

    .hero {
      border-bottom: 1px solid var(--line);
      background:
        linear-gradient(120deg, rgba(163, 11, 16, 0.94), rgba(23, 32, 51, 0.93)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1400' height='720' viewBox='0 0 1400 720'%3E%3Crect width='1400' height='720' fill='%23f6f8fb'/%3E%3Cg stroke='%23c8d4e2' stroke-width='2' opacity='.75'%3E%3Cpath d='M90 118h270v126H90zM408 118h370v126H408zM826 118h480v126H826zM90 302h320v126H90zM458 302h304v126H458zM810 302h496v126H810zM90 486h430v126H90zM568 486h330v126H568zM946 486h360v126H946z'/%3E%3Cpath d='M225 244v58M593 244v58M1064 244v58M250 428v58M610 428v58M1058 428v58'/%3E%3C/g%3E%3Cg fill='%23db0f16' opacity='.14'%3E%3Ccircle cx='220' cy='181' r='38'/%3E%3Ccircle cx='588' cy='365' r='42'/%3E%3Ccircle cx='1075' cy='549' r='46'/%3E%3C/g%3E%3C/svg%3E");
      background-position: center;
      background-size: cover;
      color: #ffffff;
    }

    .hero__inner {
      display: grid;
      grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
      gap: 36px;
      width: min(1180px, calc(100% - 32px));
      margin: 0 auto;
      padding: 56px 0 44px;
    }

    .eyebrow {
      margin: 0 0 12px;
      color: rgba(255, 255, 255, 0.78);
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0;
      text-transform: uppercase;
    }

    h1 {
      max-width: 820px;
      margin: 0;
      font-size: clamp(34px, 5vw, 58px);
      line-height: 1.03;
      letter-spacing: 0;
    }

    .hero__text {
      max-width: 760px;
      margin: 18px 0 0;
      color: rgba(255, 255, 255, 0.84);
      font-size: 18px;
    }

    .hero__actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 28px;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 42px;
      border: 1px solid transparent;
      border-radius: 7px;
      cursor: pointer;
      font-weight: 700;
      padding: 10px 14px;
      transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    }

    .btn:hover {
      transform: translateY(-1px);
    }

    .btn--primary {
      background: #ffffff;
      color: var(--primary-dark);
    }

    .btn--ghost {
      border-color: rgba(255, 255, 255, 0.4);
      color: #ffffff;
    }

    .hero__panel {
      align-self: end;
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: var(--radius);
      background: rgba(255, 255, 255, 0.1);
      padding: 18px;
    }

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

    .metric {
      min-height: 88px;
      border-radius: 7px;
      background: rgba(255, 255, 255, 0.12);
      padding: 14px;
    }

    .metric strong {
      display: block;
      font-size: 28px;
      line-height: 1;
    }

    .metric span {
      display: block;
      margin-top: 8px;
      color: rgba(255, 255, 255, 0.74);
      font-size: 13px;
    }

    .main {
      width: min(1180px, calc(100% - 32px));
      margin: 0 auto;
      padding: 34px 0 56px;
    }

    .section-head {
      display: flex;
      align-items: end;
      justify-content: space-between;
      gap: 20px;
      margin-bottom: 18px;
    }

    h2 {
      margin: 0;
      font-size: 28px;
      line-height: 1.2;
      letter-spacing: 0;
    }

    .section-head p {
      max-width: 660px;
      margin: 8px 0 0;
      color: var(--muted);
    }

    .toolbar {
      display: grid;
      grid-template-columns: minmax(220px, 1fr) auto;
      gap: 12px;
      margin-bottom: 18px;
    }

    .search {
      position: relative;
    }

    .search svg {
      position: absolute;
      left: 13px;
      top: 50%;
      width: 18px;
      height: 18px;
      color: var(--muted);
      transform: translateY(-50%);
    }

    .search input {
      width: 100%;
      min-height: 46px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      color: var(--text);
      padding: 11px 14px 11px 42px;
    }

    .search input:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(219, 15, 22, 0.13);
      outline: none;
    }

    .filters {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: flex-end;
    }

    .filter {
      min-height: 46px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      color: var(--muted);
      cursor: pointer;
      font-weight: 700;
      padding: 10px 13px;
    }

    .filter:hover,
    .filter:focus-visible,
    .filter.is-active {
      border-color: rgba(219, 15, 22, 0.35);
      background: rgba(219, 15, 22, 0.08);
      color: var(--primary-dark);
      outline: none;
    }

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

    .system-card {
      display: flex;
      min-height: 304px;
      flex-direction: column;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .system-card[hidden] {
      display: none;
    }

    .system-card__header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      padding: 18px 18px 12px;
    }

    .client {
      min-width: 0;
    }

    .client__name {
      margin: 0;
      font-size: 19px;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }

    .client__host {
      display: block;
      margin-top: 4px;
      color: var(--muted);
      font-size: 13px;
      overflow-wrap: anywhere;
    }

    .status {
      flex: 0 0 auto;
      border-radius: 999px;
      background: rgba(219, 15, 22, 0.1);
      color: var(--primary-dark);
      font-size: 12px;
      font-weight: 700;
      padding: 5px 9px;
      white-space: nowrap;
    }

    .status--live {
      background: rgba(22, 101, 52, 0.1);
      color: var(--success);
    }

    .status--dev {
      background: rgba(180, 83, 9, 0.12);
      color: var(--warning);
    }

    .status--site {
      background: rgba(29, 78, 216, 0.1);
      color: var(--info);
    }

    .system-card__body {
      display: flex;
      flex: 1;
      flex-direction: column;
      padding: 0 18px 18px;
    }

    .modules {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin: 12px 0 0;
      padding: 0;
      list-style: none;
    }

    .modules li {
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--surface-soft);
      color: #334155;
      font-size: 12px;
      font-weight: 700;
      padding: 6px 9px;
    }

    .summary {
      margin: 14px 0 0;
      color: var(--muted);
      font-size: 14px;
    }

    .system-card__footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-top: auto;
      padding-top: 20px;
    }

    .open-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 40px;
      border-radius: 7px;
      background: var(--text);
      color: #ffffff;
      font-size: 14px;
      font-weight: 700;
      padding: 9px 12px;
    }

    .open-link:hover,
    .open-link:focus-visible {
      background: var(--primary-dark);
      outline: none;
    }

    .open-link--disabled {
      background: var(--surface-soft);
      color: var(--muted);
      cursor: default;
    }

    .open-link--disabled:hover {
      background: var(--surface-soft);
      transform: none;
    }

    .open-link svg {
      width: 16px;
      height: 16px;
    }

    .system-type {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
    }

    .empty-state {
      display: none;
      border: 1px dashed var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      color: var(--muted);
      padding: 22px;
      text-align: center;
    }

    .empty-state.is-visible {
      display: block;
    }

    .modules-section {
      margin-top: 44px;
      border-top: 1px solid var(--line);
      padding-top: 32px;
    }

    .module-map {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      margin-top: 18px;
    }

    .module-item {
      min-height: 104px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      padding: 15px;
    }

    .module-item strong {
      display: block;
      font-size: 15px;
      overflow-wrap: anywhere;
    }

    .module-item span {
      display: block;
      margin-top: 8px;
      color: var(--muted);
      font-size: 13px;
    }

    .footer {
      border-top: 1px solid var(--line);
      background: #ffffff;
    }

    .footer__inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      width: min(1180px, calc(100% - 32px));
      margin: 0 auto;
      padding: 18px 0;
      color: var(--muted);
      font-size: 13px;
    }

    @media (max-width: 980px) {
      .hero__inner {
        grid-template-columns: 1fr;
      }

      .hero__panel {
        align-self: stretch;
      }

      .systems-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .module-map {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 720px) {
      .topbar__inner,
      .section-head,
      .footer__inner {
        align-items: flex-start;
        flex-direction: column;
      }

      .nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
      }

      .hero__inner {
        padding: 42px 0 34px;
      }

      .toolbar {
        grid-template-columns: 1fr;
      }

      .filters {
        justify-content: flex-start;
      }

      .systems-grid,
      .module-map {
        grid-template-columns: 1fr;
      }

      .system-card {
        min-height: 0;
      }
    }

    @media (max-width: 420px) {
      .topbar__inner,
      .main,
      .hero__inner,
      .footer__inner {
        width: min(100% - 24px, 1180px);
      }

      .metric-grid {
        grid-template-columns: 1fr;
      }

      .system-card__header,
      .system-card__footer {
        align-items: flex-start;
        flex-direction: column;
      }

      .open-link {
        width: 100%;
      }
    }
