    :root {
      --bg: #313c42;
      --panel: #f2f2f2;
      --panel-teal: rgba(70, 215, 210, 0.34);
      --panel-teal-active: rgba(70, 215, 210, 0.52);
      --panel-orange: rgba(240, 165, 47, 0.36);
      --panel-orange-active: rgba(240, 165, 47, 0.54);
      --text: #f3fbfa;
      --orange: #f0a52f;
      --teal: #46d7d2;
      --shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
      --radius: 16px;
      --ease: 220ms ease;
    }

    * { box-sizing: border-box; }

    html, body {
      margin: 0;
      padding: 0;
      background: var(--bg);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      color: white;
    }

    body {
      padding: 28px 16px 16px;
      overflow: hidden;
    }

    .wrap {
      max-width: 1200px;
      margin: 0 auto;
    }

    .matrix {
      display: grid;
      grid-template-columns: 1.05fr 1.05fr 1.05fr 68px;
      gap: 18px;
      align-items: stretch;
    }

    .col {
      display: grid;
      grid-template-rows: 82px repeat(4, 86px);
      gap: 18px;
    }

    .card,
    .rail {
      background: var(--panel-teal);
      color: var(--text);
      border-radius: var(--radius);
      box-shadow: var(--shadow), inset 0 0 0 999px rgba(255, 255, 255, 0.05);
      border: 2px solid var(--teal);
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 14px 16px;
      line-height: 1.15;
      position: relative;
      transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease), background var(--ease), opacity var(--ease);
    }

    .head {
      font-weight: 800;
      font-size: 1rem;
    }

    .flow,
    .head.flow-head {
      border-color: var(--orange);
      background: var(--panel-orange);
    }

    .flow {
      font-weight: 800;
      font-size: 0.98rem;
    }

    .skills,
    .tooling {
      font-size: 0.9rem;
      font-weight: 500;
    }

    .tooling,
    .skills {
      white-space: pre-line;
    }

    button.card {
      width: 100%;
      cursor: pointer;
      appearance: none;
      font: inherit;
      color: inherit;
    }

    button.card:hover,
    button.card:focus-visible {
      transform: translateY(-2px);
      box-shadow: 0 14px 30px rgba(0,0,0,0.2);
      outline: none;
    }

    .card.is-active {
      background: var(--panel-teal-active);
      box-shadow: 0 0 0 5px rgba(70, 215, 210, 0.22), 0 18px 36px rgba(0,0,0,0.22);
    }

    .flow.is-active {
      background: var(--panel-orange-active);
      box-shadow: 0 0 0 5px rgba(240, 165, 47, 0.24), 0 18px 36px rgba(0,0,0,0.22);
    }

    .card.is-row-active:not(.is-active) {
      opacity: 1;
      background: rgba(70, 215, 210, 0.44);
    }

    .flow.is-row-active:not(.is-active) {
      background: rgba(240, 165, 47, 0.46);
    }

    .card.is-dimmed {
      opacity: 0.58;
    }

    .rail {
      min-height: calc((82px + 18px) + (86px * 4) + (18px * 3));
      padding: 8px;
    }

    .rail__text {
      writing-mode: vertical-rl;
      transform: rotate(180deg);
      font-size: 0.84rem;
      line-height: 1.2;
      letter-spacing: 0.01em;
    }

    .detail {
      display: grid;
      grid-template-rows: 0fr;
      opacity: 0;
      margin-top: 0;
      border-radius: 20px;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.1);
      padding: 0 20px;
      overflow: hidden;
      pointer-events: none;
      transition: grid-template-rows 260ms ease, opacity 220ms ease, margin-top 260ms ease, padding 260ms ease;
    }

    .detail.is-visible {
      grid-template-rows: 1fr;
      opacity: 1;
      margin-top: 22px;
      padding: 20px;
      pointer-events: auto;
    }

    .detail__inner {
      min-height: 0;
      overflow: hidden;
    }

    .detail__label {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 0.8rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: rgba(255,255,255,0.78);
      margin-bottom: 10px;
    }

    .detail__label::before {
      content: "";
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--teal);
      box-shadow: 0 0 0 7px rgba(70, 215, 210, 0.12);
    }

    .detail__title {
      margin: 0 0 10px;
      font-size: clamp(1.3rem, 2vw, 1.8rem);
      line-height: 1.1;
    }

    .detail__copy {
      margin: 0;
      color: rgba(255,255,255,0.9);
      font-size: 1rem;
      line-height: 1.65;
      max-width: 900px;
    }

    .detail__tags {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 14px;
    }

    .tag {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 8px 12px;
      border-radius: 999px;
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.12);
      color: white;
      font-size: 0.92rem;
    }

    @media (max-width: 980px) {
      .matrix {
        grid-template-columns: 1fr;
      }

      .col {
        grid-template-rows: auto;
      }

      .rail {
        min-height: 72px;
      }

      .rail__text {
        writing-mode: horizontal-tb;
        transform: none;
      }
    }
