    :root {
      --bg: #e7edf1;
      --ink: #17202b;
      --muted: #647386;
      --panel: rgba(255, 255, 255, 0.88);
      --line: rgba(22, 32, 42, 0.12);
      --brand: #00b8d4;
      --brand-dark: #06465e;
      --hot: #f59e0b;
      --green: #22c55e;
      --red: #ef4444;
      --deep: #07111b;
      --soft-shadow: 0 24px 70px rgba(8, 19, 31, 0.16);
      --tight-shadow: 0 14px 34px rgba(8, 19, 31, 0.12);
      --radius-xl: 28px;
      --radius-lg: 20px;
    }

    * {
      box-sizing: border-box;
    }

    [hidden] {
      display: none !important;
    }

    html {
      scroll-behavior: auto;
    }

    body {
      font-family: "Bahnschrift", "Trebuchet MS", "Segoe UI", sans-serif;
      color: var(--ink);
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.65), transparent 28rem),
        radial-gradient(circle at 10% 0%, rgba(0, 183, 216, 0.18), transparent 28rem),
        radial-gradient(circle at 90% 12%, rgba(245, 158, 11, 0.16), transparent 24rem),
        linear-gradient(135deg, #f7f8fb 0%, var(--bg) 58%, #dde5ec 100%);
      margin: 0;
      min-height: 100vh;
    }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      pointer-events: none;
      background-image:
        linear-gradient(rgba(11, 23, 32, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(11, 23, 32, 0.045) 1px, transparent 1px);
      background-size: 34px 34px;
      mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 75%);
    }

    p,
    h3,
    h4 {
      margin: 0;
      padding: 0;
    }

    a {
      color: inherit;
    }

    img {
      display: block;
    }

    .site-header {
      position: relative;
      overflow: hidden;
      padding: 28px 18px 34px;
      color: #f7fbff;
      background:
        linear-gradient(120deg, rgba(7, 82, 107, 0.96), rgba(11, 23, 32, 0.98) 48%, rgba(28, 37, 49, 0.96)),
        radial-gradient(circle at 80% 20%, rgba(0, 183, 216, 0.5), transparent 22rem);
      box-shadow: var(--soft-shadow);
      isolation: isolate;
    }

    .site-header::before,
    .site-header::after {
      content: "";
      position: absolute;
      z-index: -1;
      border-radius: 999px;
    }

    .site-header::before {
      width: 320px;
      height: 320px;
      right: -90px;
      top: -150px;
      border: 1px solid rgba(0, 183, 216, 0.35);
      box-shadow: inset 0 0 45px rgba(0, 183, 216, 0.18);
    }

    .site-header::after {
      width: 180px;
      height: 180px;
      left: 9%;
      bottom: -120px;
      background: rgba(245, 158, 11, 0.18);
      filter: blur(2px);
    }

    .header-shell,
    .footer-shell {
      width: min(1200px, calc(100% - 28px));
      margin: 0 auto;
    }

    .header-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 26px;
    }

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

    .brand-mark {
      min-width: 48px;
      min-height: 48px;
      display: grid;
      place-items: center;
      color: #06111a;
      font-weight: 900;
      letter-spacing: 0;
      background: linear-gradient(135deg, var(--brand), #effcff 54%, #facc15);
      border-radius: 15px;
      box-shadow: 0 12px 30px rgba(0, 183, 216, 0.28);
      transition: transform 180ms ease;
    }

    .brand:hover .brand-mark {
      transform: scale(1.04);
    }

    .brand-title {
      margin: 0;
      padding: 0;
      font-size: clamp(1.35rem, 2.5vw, 2rem);
      line-height: 1;
      letter-spacing: -0.04em;
    }

    .brand-subtitle {
      margin: 4px 0 0;
      padding: 0;
      color: rgba(247, 251, 255, 0.72);
      font-size: 0.9rem;
    }

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

    .header-nav a,
    .header-nav button,
    .status-pill {
      text-decoration: none;
      border: 1px solid rgba(255, 255, 255, 0.18);
      background: rgba(255, 255, 255, 0.08);
      color: rgba(247, 251, 255, 0.86);
      padding: 8px 12px;
      border-radius: 999px;
      backdrop-filter: blur(12px);
      transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
      font: inherit;
      cursor: pointer;
    }

    .header-nav a:hover,
    .header-nav a.is-active,
    .header-nav button:hover,
    .header-nav button.is-active {
      border-color: rgba(0, 183, 216, 0.7);
      color: #ffffff;
      transform: translateY(-1px);
      background: rgba(255, 255, 255, 0.13);
    }

    .hero {
      display: grid;
      grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.65fr);
      gap: 24px;
      align-items: end;
    }

    .hero-kicker {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin: 0 0 12px;
      padding: 7px 11px;
      color: #06111a;
      background: linear-gradient(135deg, #ecfeff, #fef3c7);
      border-radius: 999px;
      font-weight: 800;
      font-size: 0.82rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }

    .hero h1,
    .hero h2 {
      margin: 0;
      max-width: 760px;
      font-size: clamp(2.2rem, 5vw, 4.9rem);
      line-height: 0.92;
      letter-spacing: -0.08em;
    }

    .hero-copy {
      max-width: 650px;
      margin: 18px 0 0;
      padding: 0;
      color: rgba(247, 251, 255, 0.76);
      font-size: clamp(1rem, 1.8vw, 1.16rem);
      line-height: 1.55;
    }

    .hero-card {
      padding: 18px;
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 24px;
      background: rgba(255, 255, 255, 0.08);
      backdrop-filter: blur(14px);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    }

    .hero-card strong {
      display: block;
      font-size: 1.85rem;
      line-height: 1;
    }

    .hero-card span {
      display: block;
      margin-top: 8px;
      color: rgba(247, 251, 255, 0.72);
      line-height: 1.45;
    }

    main {
      position: relative;
      z-index: 1;
      padding: 34px 14px 54px;
    }

    .container {
      display: grid;
      grid-template-columns: minmax(330px, 0.9fr) minmax(420px, 1.1fr);
      align-items: start;
      gap: 22px;
      max-width: 1200px;
      margin: auto;
    }

    .panel {
      background: var(--panel);
      padding: 18px;
      border: 1px solid rgba(255, 255, 255, 0.82);
      border-radius: var(--radius-xl);
      box-shadow: var(--tight-shadow);
      position: relative;
      overflow: hidden;
    }

    .about-section {
      max-width: 1200px;
      margin: 28px auto 0;
      padding: 22px;
      border: 1px solid rgba(255, 255, 255, 0.82);
      border-radius: var(--radius-xl);
      background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(236, 253, 245, 0.74)),
        var(--panel);
      box-shadow: var(--tight-shadow);
    }

    .about-section h2 {
      margin: 0 0 12px;
      padding: 0;
      font-size: 1.65rem;
      letter-spacing: -0.04em;
    }

    .about-section p {
      max-width: 900px;
      margin: 0 0 12px;
      padding: 0;
      color: var(--muted);
      font-size: 1rem;
      line-height: 1.65;
    }

    .about-section p:last-child {
      margin-bottom: 0;
    }

    .seo-section {
      max-width: 1200px;
      margin: 28px auto 0;
      padding: 22px;
      border: 1px solid rgba(255, 255, 255, 0.82);
      border-radius: var(--radius-xl);
      background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(236, 254, 255, 0.72)),
        var(--panel);
      box-shadow: var(--tight-shadow);
    }

    .seo-section h2 {
      margin: 0 0 12px;
      padding: 0;
      font-size: 1.65rem;
      letter-spacing: -0.04em;
    }

    .seo-section p {
      max-width: 960px;
      margin: 0 0 12px;
      padding: 0;
      color: var(--muted);
      font-size: 1rem;
      line-height: 1.65;
    }

    .seo-section p:last-child {
      margin-bottom: 0;
    }

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

    .about-point {
      min-height: 120px;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.72);
    }

    .about-point strong {
      display: block;
      margin-bottom: 7px;
      color: var(--ink);
    }

    .about-point span {
      color: var(--muted);
      line-height: 1.5;
    }

    .project-status {
      max-width: 1200px;
      margin: 28px auto 0;
      padding: 22px;
      border: 1px solid rgba(255, 255, 255, 0.82);
      border-radius: var(--radius-xl);
      background:
        radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.18), transparent 18rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(236, 253, 245, 0.68));
      box-shadow: var(--tight-shadow);
    }

    .project-status-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 18px;
      margin-bottom: 16px;
    }

    .project-status h2 {
      margin: 0 0 8px;
      padding: 0;
      font-size: 1.65rem;
      letter-spacing: -0.04em;
    }

    .project-status p {
      margin: 0;
      color: var(--muted);
      line-height: 1.65;
    }

    .status-date {
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      padding: 8px 12px;
      border: 1px solid rgba(0, 184, 212, 0.28);
      border-radius: 999px;
      color: var(--brand-dark);
      background: rgba(236, 254, 255, 0.86);
      font-weight: 800;
      white-space: nowrap;
    }

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

    .status-item {
      min-height: 118px;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.74);
    }

    .status-item strong {
      display: block;
      margin-bottom: 7px;
      color: var(--ink);
    }

    .status-item span {
      color: var(--muted);
      line-height: 1.5;
    }

    .resources-section {
      max-width: 1200px;
      margin: 28px auto 0;
      padding: 24px;
      border: 1px solid rgba(255, 255, 255, 0.82);
      border-radius: var(--radius-xl);
      background:
        radial-gradient(circle at 100% 0%, rgba(0, 184, 212, 0.16), transparent 16rem),
        rgba(255, 255, 255, 0.9);
      box-shadow: var(--tight-shadow);
    }

    .resources-head {
      display: flex;
      justify-content: space-between;
      gap: 20px;
      margin-bottom: 18px;
    }

    .resources-head h2 {
      margin: 0;
      padding: 0;
      font-size: 1.65rem;
      letter-spacing: -0.04em;
    }

    .resources-head p {
      max-width: 560px;
      margin: 0;
      padding: 0;
      color: var(--muted);
      line-height: 1.55;
    }

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

    .resource-card {
      display: grid;
      grid-template-rows: 240px auto;
      min-height: 360px;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: #f8fafc;
      text-decoration: none;
      transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
    }

    .resource-card:hover {
      transform: translateY(-2px);
      border-color: rgba(0, 184, 212, 0.45);
      box-shadow: 0 14px 30px rgba(8, 19, 31, 0.1);
    }

    .resource-visual {
      position: relative;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      align-items: center;
      padding: 36px 20px 20px;
      background:
        linear-gradient(135deg, rgba(7, 17, 27, 0.96), rgba(8, 48, 62, 0.94)),
        #07111b;
    }

    .resource-visual img {
      width: 100%;
      height: 92px;
      object-fit: contain;
      filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.28));
    }

    .resource-badge {
      position: absolute;
      left: 14px;
      top: 14px;
      padding: 6px 9px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.9);
      color: #07111b;
      font-size: 0.78rem;
      font-weight: 900;
    }

    .resource-body {
      padding: 18px;
    }

    .resource-body h3 {
      margin: 0 0 10px;
      padding: 0;
      font-size: 1.18rem;
      letter-spacing: -0.035em;
    }

    .resource-body p {
      margin: 0 0 14px;
      padding: 0;
      color: var(--muted);
      line-height: 1.55;
    }

    .resource-specs {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      margin: 0;
      padding: 0;
      list-style: none;
    }

    .resource-specs li {
      padding: 6px 8px;
      border: 1px solid rgba(0, 184, 212, 0.2);
      border-radius: 999px;
      background: rgba(236, 253, 245, 0.72);
      color: #0f4f4b;
      font-size: 0.82rem;
      font-weight: 800;
    }

    .panel::before {
      content: "";
      position: absolute;
      width: 120px;
      height: 120px;
      right: -58px;
      top: -58px;
      border-radius: 999px;
      background: radial-gradient(circle, rgba(0, 184, 212, 0.22), transparent 68%);
      pointer-events: none;
    }

    .panel h4 {
      display: flex;
      align-items: center;
      gap: 9px;
      margin: 0 0 16px;
      padding: 0;
      font-size: 1.14rem;
      letter-spacing: -0.035em;
    }

    .panel h4::before {
      content: "";
      width: 12px;
      height: 12px;
      border-radius: 4px;
      background: linear-gradient(135deg, var(--brand), var(--hot));
      box-shadow: 0 0 0 5px rgba(0, 184, 212, 0.12);
    }

    #controlsPanel {
      overflow: visible;
      scrollbar-width: thin;
      scrollbar-color: rgba(0, 184, 212, 0.5) transparent;
    }

    #controlsPanel::before {
      display: none;
    }

    #controlsPanel label,
    details label {
      display: block;
      margin: 10px 0 5px;
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    details {
      margin: 0 0 14px;
      padding: 12px;
      border: 1px solid rgba(0, 184, 212, 0.18);
      border-radius: 18px;
      background:
        linear-gradient(135deg, rgba(0, 184, 212, 0.08), rgba(245, 158, 11, 0.06)),
        rgba(255, 255, 255, 0.7);
    }

    details summary {
      margin: -2px 0 8px;
      cursor: pointer;
      font-weight: 900;
      letter-spacing: -0.02em;
    }

    details summary::marker {
      color: var(--brand-dark);
    }

    .preview {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      grid-template-rows: repeat(5, 1fr);
      gap: 4px;
      width: 100%;
      min-height: 520px;
      height: 52%;
      background:
        linear-gradient(rgba(255, 255, 255, 0.32) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.32) 1px, transparent 1px),
        radial-gradient(circle at center, rgba(255, 255, 255, 0.9), rgba(229, 231, 235, 0.78)),
        linear-gradient(135deg, rgba(0, 183, 216, 0.12), rgba(245, 158, 11, 0.1));
      background-size: 28px 28px, 28px 28px, auto, auto;
      border: 1px solid var(--line);
      border-radius: 24px;
      margin: auto;
      position: relative;
      overflow: hidden;
      box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.55),
        inset 0 -30px 80px rgba(7, 17, 27, 0.08);
    }

    .preview::before {
      content: "";
      position: absolute;
      z-index: 0;
      top: 21%;
      left: 19%;
      width: 62%;
      height: 58%;
      pointer-events: none;
      background:
        linear-gradient(34deg, transparent 47%, rgba(7, 17, 27, 0.34) 48%, rgba(7, 17, 27, 0.34) 52%, transparent 53%),
        linear-gradient(146deg, transparent 47%, rgba(7, 17, 27, 0.34) 48%, rgba(7, 17, 27, 0.34) 52%, transparent 53%),
        radial-gradient(circle at 50% 50%, rgba(7, 17, 27, 0.16) 0 20%, transparent 21%);
      /* border: 8px solid rgba(7, 17, 27, 0.28); */
      /* border-radius: 28px; */
      /* transform: rotate(45deg); */
      /* box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22), 0 18px 36px rgba(8, 19, 31, 0.08); */
    }

    .preview.has-animated-drone::before {
      display: none;
    }

    .preview[data-motor-count="6"]::before {
      inset: 0;
      width: 100%;
      height: 100%;
      background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg stroke='%2307111b' stroke-width='4.2' stroke-linecap='round' opacity='.32'%3E%3Cline x1='50' y1='50' x2='15' y2='16.7'/%3E%3Cline x1='50' y1='50' x2='85' y2='16.7'/%3E%3Cline x1='50' y1='50' x2='15' y2='50'/%3E%3Cline x1='50' y1='50' x2='85' y2='50'/%3E%3Cline x1='50' y1='50' x2='15' y2='83.3'/%3E%3Cline x1='50' y1='50' x2='85' y2='83.3'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='7' fill='%2307111b' opacity='.14'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    }

    .preview[data-motor-count="8"]::before {
      inset: 0;
      width: 100%;
      height: 100%;
      background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg stroke='%2307111b' stroke-width='3.8' stroke-linecap='round' opacity='.30'%3E%3Cline x1='50' y1='50' x2='18' y2='.5'/%3E%3Cline x1='50' y1='50' x2='82' y2='.5'/%3E%3Cline x1='50' y1='50' x2='18' y2='37.5'/%3E%3Cline x1='50' y1='50' x2='82' y2='37.5'/%3E%3Cline x1='50' y1='50' x2='18' y2='62.5'/%3E%3Cline x1='50' y1='50' x2='82' y2='62.5'/%3E%3Cline x1='50' y1='50' x2='18' y2='101.5'/%3E%3Cline x1='50' y1='50' x2='82' y2='101.5'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='7' fill='%2307111b' opacity='.14'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    }

    .corner-block {
      position: relative;
      z-index: 2;
      border: 1px solid rgba(0, 184, 212, 0.85);
      border-radius: 18px;
      box-sizing: border-box;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;

      gap: 5px;
      width: 100%;
      height: 100%;
      background: rgba(255, 255, 255, 0.82);
      box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.75),
        0 10px 24px rgba(8, 19, 31, 0.08);
      transition: transform 160ms ease, box-shadow 160ms ease;
      contain: layout paint;
    }

    .corner-block:hover {
      transform: translateY(-2px);
      box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.85),
        0 16px 32px rgba(8, 19, 31, 0.14);
    }

    .corner-block img {
      width: 80%;
      max-height: 42%;
      object-fit: contain;
    }

    .preview::after {
      content: "";
      position: absolute;
      z-index: 1;
      border: 2px dashed #f59e0b;
      pointer-events: none;
      top: calc(20%);
      left: calc(18%);
      width: calc(100% / 5 * 3.2);
      height: calc(100% / 5 * 3);
      box-sizing: border-box;
      border-radius: 18px;
      background: rgba(245, 158, 11, 0.04);
    }

    .preview[data-motor-count="6"]::after {
      top: calc(13%);
      height: calc(100% / 6 * 4);
    }

    .preview[data-motor-count="8"]::after {
      top: calc(9%);
      height: calc(100% / 8 * 6);
    }

    .preview img {
      position: relative;
      z-index: 2;
      width: 100%;
      height: 100%;
      object-fit: contain;
      transition: transform 160ms ease, filter 160ms ease;
      contain: layout paint;
    }

    .animated-drone-frame {
      position: absolute;
      inset: 0;
      z-index: 1;
      width: 100%;
      height: 100%;
      pointer-events: none;
      overflow: visible;
    }

    .animated-drone-arm {
      stroke: rgba(7, 17, 27, 0.3);
      stroke-width: 4.2;
      stroke-linecap: round;
    }

    .animated-drone-body {
      fill: rgba(7, 17, 27, 0.14);
      stroke: rgba(7, 17, 27, 0.22);
      stroke-width: 1;
    }

    .animated-drone-hub {
      fill: rgba(0, 184, 212, 0.26);
      stroke: rgba(0, 118, 141, 0.3);
      stroke-width: 0.8;
    }

    .animated-drone-rotor {
      transform-box: fill-box;
      transform-origin: center;
      animation: droneRotorSpin 0.42s linear infinite;
    }

    .animated-drone-rotor:nth-of-type(even) {
      animation-duration: 0.34s;
      animation-direction: reverse;
    }

    .animated-drone-rotor.is-reverse {
      animation-duration: 0.34s;
      animation-direction: reverse;
    }

    .animated-drone-blade {
      fill: rgba(7, 17, 27, 0.18);
      stroke: rgba(7, 17, 27, 0.2);
      stroke-width: 0.35;
    }

    .animated-drone-motor-dot {
      fill: rgba(0, 184, 212, 0.32);
      stroke: rgba(0, 118, 141, 0.32);
      stroke-width: 0.45;
    }

    @keyframes droneRotorSpin {
      to {
        transform: rotate(360deg);
      }
    }

    .preview > img:hover {
      transform: translateY(-2px) scale(1.03);
    }

    .wiring-open-row {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      justify-content: center;
      margin: 14px 0 0;
    }

    .safety-note {
      width: 100%;
      padding: 10px 12px;
      border: 1px solid rgba(245, 158, 11, 0.34);
      border-radius: 14px;
      color: #78350f;
      background: #fffbeb;
      font-size: 0.9rem;
      line-height: 1.35;
    }

    .wiring-open-button,
    .wiring-tool,
    .wiring-close {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 42px;
      border: 0;
      border-radius: 999px;
      padding: 10px 14px;
      font: inherit;
      font-weight: 900;
      cursor: pointer;
    }

    .wiring-open-button {
      color: #ffffff;
      background: #07111b;
      box-shadow: 0 12px 28px rgba(8, 19, 31, 0.16);
    }

    .wiring-modal {
      position: fixed;
      inset: 0;
      z-index: 50;
      display: grid;
      place-items: center;
      padding: 18px;
      background: rgba(7, 17, 27, 0.72);
      backdrop-filter: blur(10px);
    }

    .wiring-modal[hidden] {
      display: none;
    }

    .wiring-dialog {
      display: grid;
      grid-template-rows: auto minmax(420px, 1fr);
      width: min(1060px, calc(100vw - 36px));
      height: min(720px, calc(100vh - 36px));
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 24px;
      background: #f8fafc;
      box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
    }

    .wiring-header {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 14px;
      align-items: center;
      padding: 16px;
      border-bottom: 1px solid var(--line);
      background: #ffffff;
    }

    .wiring-header h3 {
      margin: 0;
      padding: 0;
      font-size: 1.28rem;
      letter-spacing: -0.035em;
    }

    .wiring-header p {
      margin: 4px 0 0;
      padding: 0;
      color: var(--muted);
      line-height: 1.45;
    }

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

    .wiring-tool {
      border: 1px solid var(--line);
      background: #f1f5f9;
      color: var(--ink);
    }

    .wiring-tool.is-active {
      border-color: rgba(0, 184, 212, 0.58);
      background: #cffafe;
      color: #06465e;
    }

    .wiring-close {
      background: #07111b;
      color: #ffffff;
    }

    .wiring-canvas {
      position: relative;
      overflow: hidden;
      background:
        linear-gradient(rgba(7, 17, 27, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(7, 17, 27, 0.06) 1px, transparent 1px),
        radial-gradient(circle at 50% 44%, rgba(0, 184, 212, 0.12), transparent 20rem),
        #eef4f7;
      background-size: 28px 28px, 28px 28px, auto, auto;
      touch-action: none;
    }

    .wiring-svg {
      position: absolute;
      inset: 0;
      z-index: 1;
      width: 100%;
      height: 100%;
      pointer-events: auto;
    }

    .wiring-svg line {
      pointer-events: stroke;
      cursor: pointer;
      stroke-linecap: round;
      filter: drop-shadow(0 2px 3px rgba(8, 19, 31, 0.18));
    }

    .wiring-svg line.is-selected {
      stroke: #ef4444;
      stroke-width: 5;
    }

    .wiring-node {
      position: absolute;
      z-index: 2;
      width: 150px;
      min-height: 82px;
      padding: 12px;
      border: 1px solid rgba(8, 19, 31, 0.12);
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.94);
      box-shadow: 0 12px 28px rgba(8, 19, 31, 0.12);
      cursor: grab;
      user-select: none;
      transform: translate(-50%, -50%);
    }

    .wiring-node:active {
      cursor: grabbing;
    }

    .wiring-node.is-source {
      outline: 3px solid rgba(0, 184, 212, 0.45);
    }

    .wiring-node strong,
    .wiring-node span {
      display: block;
    }

    .wiring-node strong {
      margin-bottom: 5px;
      color: var(--ink);
      font-size: 0.94rem;
    }

    .wiring-node span {
      color: var(--muted);
      font-size: 0.78rem;
      line-height: 1.3;
    }

    .wiring-board {
      position: absolute;
      z-index: 2;
      width: 221px;
      min-height: 200px;
      border: 1px solid rgba(8, 19, 31, 0.12);
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.96);
      box-shadow: 0 16px 34px rgba(8, 19, 31, 0.14);
      user-select: none;
      transform: translate(-50%, -50%);
      overflow: hidden;
      opacity: 0.7;
      backdrop-filter: blur(2px);
    }

    .wiring-board.is-source {
      outline: 3px solid rgba(0, 184, 212, 0.42);
      opacity: 0.94;
    }

    .wiring-board-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 8px 10px;
      border-bottom: 1px solid rgba(8, 19, 31, 0.08);
      background: rgba(248, 250, 252, 0.96);
      cursor: grab;
    }

    .wiring-board-head:active {
      cursor: grabbing;
    }

    .wiring-board-title {
      min-width: 0;
    }

    .wiring-board-title strong,
    .wiring-board-title span {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .wiring-board-title strong {
      color: var(--ink);
      font-size: 0.9rem;
    }

    .wiring-board-title span {
      color: var(--muted);
      font-size: 0.72rem;
    }

    .wiring-board-kind {
      flex: 0 0 auto;
      padding: 4px 6px;
      border-radius: 999px;
      color: #06465e;
      background: #cffafe;
      font-size: 0.68rem;
      font-weight: 900;
      text-transform: uppercase;
    }

    .wiring-board-body {
      position: relative;
      height: 157px;
      background:
        radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.72), transparent 18px),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 64, 75, 0.9));
    }

    .wiring-board-image {
      width: 100%;
      height: 100%;
      object-fit: contain;
      padding: 6px;
      background: #ffffff;
    }

    .wiring-board-fallback {
      position: absolute;
      inset: 14px 18px;
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-radius: 14px;
      background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        rgba(8, 47, 73, 0.6);
      background-size: 18px 18px;
    }

    .wiring-pad {
      position: absolute;
      z-index: 3;
      min-width: 28px;
      min-height: 22px;
      border: 2px solid rgba(255, 255, 255, 0.88);
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 1px 3px;
      color: #06111a;
      background: #facc15;
      box-shadow:
        0 0 0 2px rgba(8, 19, 31, 0.16),
        0 4px 12px rgba(8, 19, 31, 0.22);
      font-size: 0.58rem;
      font-weight: 900;
      line-height: 1;
      cursor: crosshair;
      transform: translate(-50%, -50%);
    }

    .wiring-pad::after {
      content: "";
      position: absolute;
      inset: 4px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.36);
      pointer-events: none;
    }

    .wiring-pad[data-signal="gnd"] {
      background: #111827;
      color: #ffffff;
    }

    .wiring-pad[data-signal="power"] {
      background: #ef4444;
      color: #ffffff;
    }

    .wiring-pad[data-signal="video"] {
      background: #facc15;
    }

    .wiring-pad[data-signal="uart"] {
      background: #38bdf8;
    }

    .wiring-pad[data-signal="motor"] {
      background: #a78bfa;
      color: #ffffff;
    }

    .wiring-pad.is-source {
      outline: 3px solid rgba(34, 197, 94, 0.72);
    }

    .wiring-pad.is-warning {
      outline: 3px solid rgba(245, 158, 11, 0.86);
    }

    .wiring-board[data-kind="M"] {
      width: 151px;
      min-height: 157px;
    }

    .wiring-board[data-kind="M"] .wiring-board-body {
      height: 113px;
    }

    .wiring-board[data-kind="LiPo"] {
      width: 166px;
      min-height: 151px;
    }

    .wiring-board[data-kind="LiPo"] .wiring-board-body {
      height: 108px;
    }

    .wiring-board[data-kind="RX"] {
      width: 191px;
      min-height: 166px;
    }

    .wiring-board[data-kind="RX"] .wiring-board-body {
      height: 122px;
    }

    .wiring-svg path {
      pointer-events: stroke;
      cursor: pointer;
      fill: none;
      stroke-linecap: round;
      stroke-linejoin: round;
      filter: drop-shadow(0 2px 3px rgba(8, 19, 31, 0.18));
    }

    .wiring-svg path.is-warning {
      stroke-dasharray: 8 6;
    }

    .wiring-svg path.is-selected {
      stroke: #ef4444;
      stroke-width: 6;
    }

    .wiring-legend {
      position: absolute;
      z-index: 3;
      right: 16px;
      bottom: 16px;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      max-width: 480px;
      justify-content: flex-end;
      pointer-events: none;
    }

    .wiring-legend span {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 7px 9px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.9);
      color: var(--ink);
      font-size: 0.74rem;
      font-weight: 800;
    }

    .wiring-legend span::before {
      content: "";
      width: 14px;
      height: 4px;
      border-radius: 999px;
      background: var(--wire-color);
    }

    .wiring-hint {
      position: absolute;
      z-index: 3;
      left: 16px;
      bottom: 16px;
      max-width: 540px;
      padding: 10px 12px;
      border-radius: 14px;
      background: rgba(7, 17, 27, 0.84);
      color: #f8fafc;
      line-height: 1.45;
      pointer-events: none;
    }

    body.wiring-locked {
      overflow: hidden;
    }

    select {
      width: 100%;
      padding: 10px 38px 10px 12px;
      margin: 4px 0 12px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background:
        linear-gradient(135deg, #ffffff, #f4f8fb);
      color: var(--ink);
      font: inherit;
      box-shadow: 0 7px 18px rgba(8, 19, 31, 0.06);
      transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
    }

    select:focus {
      outline: 2px solid rgba(0, 183, 216, 0.35);
      border-color: var(--brand);
      box-shadow: 0 10px 24px rgba(0, 184, 212, 0.16);
      transform: translateY(-1px);
    }

    select.highlighted {
      outline: 2px solid orange;
      background-color: #fff5e6;
    }

    .select-note {
      display: block;
      margin: -6px 0 12px;
      color: var(--muted);
      font-size: 0.78rem;
      line-height: 1.4;
    }

    .motor-count-control {
      margin: 12px 0 18px;
      padding: 12px;
      border: 1px solid rgba(0, 184, 212, 0.18);
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.68);
    }

    .motor-count-buttons {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      margin-top: 8px;
    }

    .motor-count-buttons button {
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 9px 8px;
      background: #fff;
      color: var(--ink);
      font-weight: 800;
      cursor: pointer;
    }

    .motor-count-buttons button.is-active {
      border-color: var(--brand);
      background: rgba(0, 184, 212, 0.12);
      color: #08798b;
    }

    details.highlighted summary {
      background-color: #fff5e6;
      outline: 2px solid orange;
      cursor: pointer;
    }

    #fcImg {
      z-index: 2;
      filter: drop-shadow(0 0 3px rgba(0,0,0,0.3));
      opacity: 0.95;
    }

    #summary {
      margin-top: 14px;
      padding: 16px;
      border-radius: 20px;
      background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(240, 249, 255, 0.72));
      border: 1px solid var(--line);
    }

    #summary > strong {
      display: block;
      margin-bottom: 8px;
      font-size: 1.02rem;
    }

    #summaryList p {
      margin: 4px 0;
      padding: 6px 8px;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.48);
    }

    #summary hr {
      border: 0;
      height: 1px;
      margin: 12px 0;
      background: linear-gradient(90deg, transparent, var(--line), transparent);
    }

    #summary > p {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      margin-top: 8px;
      padding: 10px 12px;
      border-radius: 12px;
      background: #07111b;
      color: #f8fafc;
    }

    #summary > p span {
      color: #a7f3d0;
      font-weight: 900;
    }

    .simulator-launch {
      display: grid;
      gap: 8px;
      margin-top: 12px;
    }

    .simulator-launch a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 46px;
      border-radius: 14px;
      padding: 11px 14px;
      color: #06111a;
      background: linear-gradient(135deg, #7dd3fc, #facc15);
      box-shadow: 0 14px 30px rgba(8, 19, 31, 0.16);
      text-decoration: none;
      font-weight: 900;
    }

    .simulator-launch small {
      color: var(--muted);
      line-height: 1.35;
    }

    .compatibility {
      margin-top: 12px;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 22px;
      background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(248, 250, 252, 0.7));
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }

    .compatibility-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 10px;
      font-weight: 900;
      letter-spacing: -0.02em;
    }

    .compatibility-score {
      padding: 5px 9px;
      border-radius: 999px;
      font-size: 0.82rem;
      background: #07111b;
      color: #e0f2fe;
    }

    .compatibility-list {
      display: grid;
      gap: 9px;
    }

    .compatibility-levels {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      margin-bottom: 10px;
    }

    .compatibility-level {
      display: grid;
      gap: 4px;
      padding: 10px;
      border-radius: 14px;
      border: 1px solid rgba(15, 23, 42, 0.08);
      background: rgba(255, 255, 255, 0.72);
    }

    .compatibility-level strong {
      font-size: 0.84rem;
    }

    .compatibility-level span {
      color: var(--muted);
      font-size: 0.78rem;
      line-height: 1.3;
    }

    .compatibility-level.ok {
      border-color: rgba(34, 197, 94, 0.3);
      background: #f0fdf4;
    }

    .compatibility-level.warning {
      border-color: rgba(245, 158, 11, 0.34);
      background: #fffbeb;
    }

    .compatibility-level.error {
      border-color: rgba(239, 68, 68, 0.34);
      background: #fef2f2;
    }

    .catalog-freshness {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
      margin-top: 14px;
    }

    .catalog-freshness div {
      padding: 12px;
      border: 1px solid rgba(15, 23, 42, 0.08);
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.72);
    }

    .catalog-freshness strong {
      display: block;
      font-size: 1.05rem;
    }

    .catalog-freshness span {
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 800;
    }

    .compatibility-item {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 8px;
      align-items: start;
      padding: 11px 12px;
      border-radius: 14px;
      border: 1px solid transparent;
      line-height: 1.35;
      box-shadow: 0 7px 18px rgba(8, 19, 31, 0.05);
    }

    .compatibility-item[role="button"] {
      cursor: pointer;
      transition: transform 0.18s ease, box-shadow 0.18s ease;
    }

    .compatibility-item[role="button"]:hover {
      transform: translateY(-1px);
      box-shadow: 0 11px 24px rgba(8, 19, 31, 0.1);
    }

    .compatibility-item strong {
      display: block;
      margin-bottom: 2px;
    }

    .compatibility-item small {
      display: inline-block;
      margin-top: 5px;
      font-weight: 800;
      opacity: 0.78;
    }

    .compatibility-item.ok {
      color: #14532d;
      background: #dcfce7;
      border-color: #bbf7d0;
    }

    .compatibility-item.warning {
      color: #713f12;
      background: #fef3c7;
      border-color: #fde68a;
    }

    .compatibility-item.error {
      color: #7f1d1d;
      background: #fee2e2;
      border-color: #fecaca;
    }

    .compatibility-item.stop {
      border-width: 2px;
      box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.13), 0 12px 26px rgba(127, 29, 29, 0.18);
    }

    .compatibility-detail {
      display: none;
      gap: 12px;
      margin-top: 12px;
      padding: 16px;
      border-radius: 18px;
      border: 1px solid rgba(15, 23, 42, 0.12);
      background: #fff;
      box-shadow: 0 14px 32px rgba(8, 19, 31, 0.09);
    }

    .compatibility-detail.open {
      display: grid;
    }

    .compatibility-detail-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: start;
    }

    .compatibility-detail h3 {
      margin: 0;
      font-size: 1.05rem;
    }

    .compatibility-detail p {
      color: var(--muted);
      line-height: 1.45;
    }

    .compatibility-close {
      width: 34px;
      height: 34px;
      border: 0;
      border-radius: 999px;
      background: #eef2f7;
      color: var(--ink);
      font-weight: 900;
      cursor: pointer;
    }

    .replacement-list {
      display: grid;
      gap: 9px;
    }

    .replacement-item {
      display: grid;
      grid-template-columns: 54px 1fr auto;
      gap: 10px;
      align-items: center;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #f8fafc;
    }

    .replacement-item img {
      width: 54px;
      height: 54px;
      object-fit: contain;
      border-radius: 10px;
      background: #fff;
    }

    @supports (content-visibility: auto) {
      #summary,
      .compatibility,
      .rating-card,
      .cabinet-save,
      .site-footer {
        content-visibility: auto;
        contain-intrinsic-size: auto 260px;
      }
    }

    .replacement-item strong {
      display: block;
      margin-bottom: 3px;
    }

    .replacement-item span {
      color: var(--muted);
      font-size: 0.86rem;
      font-weight: 800;
    }

    .replacement-item button {
      border: 0;
      border-radius: 12px;
      padding: 9px 11px;
      background: #07111b;
      color: #fff;
      font-weight: 900;
      cursor: pointer;
    }

    .rating-card {
      margin-top: 12px;
      padding: 16px;
      border: 1px solid rgba(8, 19, 31, 0.1);
      border-radius: 24px;
      background:
        radial-gradient(circle at 12% 0%, rgba(20, 184, 166, 0.18), transparent 12rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(236, 253, 245, 0.72));
      box-shadow: 0 14px 34px rgba(8, 19, 31, 0.08);
    }

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

    .rating-metric {
      display: grid;
      gap: 8px;
      padding: 12px;
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.68);
      border: 1px solid rgba(15, 23, 42, 0.08);
    }

    .rating-metric[role="button"] {
      cursor: pointer;
      transition: transform 0.18s ease, box-shadow 0.18s ease;
    }

    .rating-metric[role="button"]:hover {
      transform: translateY(-1px);
      box-shadow: 0 11px 24px rgba(8, 19, 31, 0.1);
    }

    .rating-metric span {
      color: var(--muted);
      font-size: 0.88rem;
      font-weight: 800;
    }

    .rating-metric strong {
      color: var(--ink);
      font-size: 1.08rem;
      letter-spacing: -0.02em;
    }

    .rating-bar {
      height: 9px;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(15, 23, 42, 0.1);
    }

    .rating-bar i {
      display: block;
      width: 0%;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, #0f766e, #22c55e);
      transition: width 0.25s ease;
    }

    .rating-complexity {
      grid-column: 1 / -1;
      grid-template-columns: 1fr auto;
      align-items: center;
    }

    .rating-complexity small {
      grid-column: 1 / -1;
      color: var(--muted);
      line-height: 1.4;
    }

    .flight-card {
      margin-top: 12px;
      padding: 16px;
      border: 1px solid rgba(8, 19, 31, 0.1);
      border-radius: 24px;
      background:
        radial-gradient(circle at 90% 0%, rgba(14, 165, 233, 0.16), transparent 12rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(240, 249, 255, 0.74));
      box-shadow: 0 14px 34px rgba(8, 19, 31, 0.08);
    }

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

    .flight-metric {
      display: grid;
      gap: 5px;
      padding: 12px;
      border: 1px solid rgba(15, 23, 42, 0.08);
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.7);
    }

    .flight-metric span {
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 900;
    }

    .flight-metric strong {
      font-size: 1.08rem;
      color: var(--ink);
    }

    .flight-notes {
      display: grid;
      gap: 8px;
      margin-top: 10px;
    }

    .flight-note {
      padding: 10px 12px;
      border-radius: 14px;
      color: #334155;
      background: rgba(255, 255, 255, 0.72);
      border: 1px solid rgba(15, 23, 42, 0.08);
      font-size: 0.9rem;
      line-height: 1.35;
    }

    .flight-note.warning {
      color: #92400e;
      background: #fffbeb;
      border-color: rgba(245, 158, 11, 0.36);
    }

    .flight-note.error {
      color: #991b1b;
      background: #fef2f2;
      border-color: rgba(239, 68, 68, 0.32);
    }

    .rating-detail {
      grid-column: 1 / -1;
      display: grid;
      gap: 12px;
      padding: 16px;
      border-radius: 18px;
      border: 1px solid rgba(15, 23, 42, 0.12);
      background: #fff;
      box-shadow: 0 14px 32px rgba(8, 19, 31, 0.09);
    }

    .rating-detail-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: start;
    }

    .rating-detail h3 {
      margin: 0;
      font-size: 1.05rem;
    }

    .rating-detail p {
      color: var(--muted);
      line-height: 1.45;
    }

    .cabinet-save {
      display: grid;
      gap: 10px;
      margin-top: 12px;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 22px;
      background:
        linear-gradient(135deg, rgba(7, 17, 27, 0.95), rgba(6, 70, 94, 0.92)),
        radial-gradient(circle at 85% 0%, rgba(0, 184, 212, 0.28), transparent 14rem);
      color: #f8fafc;
    }

    .cabinet-save strong {
      font-size: 1.02rem;
    }

    .cabinet-save p {
      color: rgba(248, 250, 252, 0.72);
      line-height: 1.45;
    }

    .cabinet-save-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto auto;
      gap: 10px;
    }

    @media (max-width: 720px) {
      .cabinet-save-row {
        grid-template-columns: 1fr;
      }
    }

    .cabinet-save input {
      width: 100%;
      padding: 11px 12px;
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 14px;
      color: #f8fafc;
      background: rgba(255, 255, 255, 0.08);
      font: inherit;
    }

    .cabinet-save input::placeholder {
      color: rgba(248, 250, 252, 0.45);
    }

    .cabinet-save button,
    .cabinet-save a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 44px;
      padding: 10px 14px;
      border: 0;
      border-radius: 999px;
      color: #06111a;
      background: linear-gradient(135deg, var(--brand), #ecfeff 58%, var(--hot));
      font: inherit;
      font-weight: 900;
      text-decoration: none;
      cursor: pointer;
    }

    #publishBuildButton {
      background: linear-gradient(135deg, #f59e0b, #fff7ed 58%, #00b8d4);
    }

    .cabinet-save-message {
      min-height: 20px;
      color: #a7f3d0;
      font-weight: 800;
    }

    .cabinet-save-message.error {
      color: #fecaca;
    }

    .cli-export {
      display: grid;
      gap: 12px;
      margin-top: 12px;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 22px;
      background: rgba(255, 255, 255, 0.82);
      box-shadow: 0 12px 28px rgba(8, 19, 31, 0.08);
    }

    .cli-export strong {
      font-size: 1.02rem;
    }

    .cli-export p {
      margin: 0;
      color: var(--muted);
      line-height: 1.45;
    }

    .cli-export-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .cli-export button {
      min-height: 42px;
      padding: 10px 14px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: linear-gradient(135deg, var(--brand), #ecfeff 58%, var(--hot));
      color: #06111a;
      font: inherit;
      font-weight: 900;
      cursor: pointer;
    }

    .cli-export textarea {
      width: 100%;
      min-height: 240px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 16px;
      resize: vertical;
      background: #07111b;
      color: #e5f7fb;
      font: 0.88rem/1.5 "Cascadia Mono", "Consolas", monospace;
    }

    .cli-export textarea[hidden] {
      display: none;
    }

    .cli-export-message {
      min-height: 18px;
      color: var(--muted);
      font-weight: 800;
    }

    .ai-assistant {
      display: grid;
      gap: 10px;
      margin-top: 12px;
      padding: 14px;
      border: 1px solid rgba(0, 184, 212, 0.18);
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.08);
    }

    .ai-assistant-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .ai-assistant-head strong {
      font-size: 1.02rem;
    }

    .ai-assistant-limit {
      color: rgba(248, 250, 252, 0.68);
      font-size: 0.86rem;
      font-weight: 800;
    }

    .ai-assistant textarea {
      width: 100%;
      min-height: 86px;
      resize: vertical;
      padding: 11px 12px;
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 14px;
      color: #07111b;
      background: rgba(255, 255, 255, 0.92);
      font: inherit;
    }

    .ai-assistant textarea::placeholder {
      color: rgba(71, 85, 105, 0.72);
    }

    .ai-suggestions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .ai-live-suggestions {
      display: grid;
      gap: 6px;
    }

    .ai-live-suggestions[hidden] {
      display: none;
    }

    .ai-suggestions button,
    .ai-live-suggestions button {
      min-height: 34px;
      padding: 8px 10px;
      border: 1px solid rgba(0, 184, 212, 0.28);
      color: #07111b;
      background: rgba(255, 255, 255, 0.86);
      font-size: 0.88rem;
      box-shadow: none;
    }

    .ai-live-suggestions button {
      justify-self: stretch;
      justify-content: flex-start;
      text-align: left;
    }

    .ai-assistant button {
      justify-self: start;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 42px;
      border: 0;
      border-radius: 999px;
      padding: 10px 14px;
      color: #07111b;
      background: #7dd3fc;
      font: inherit;
      font-weight: 900;
      cursor: pointer;
    }

    .ai-assistant button:disabled,
    .ai-assistant textarea:disabled {
      cursor: not-allowed;
      opacity: 0.58;
    }

    .ai-assistant-answer {
      min-height: 22px;
      color: black;
      line-height: 1.5;
      white-space: pre-line;
    }

    .ai-assistant-answer.error {
      color: #fecaca;
      font-weight: 800;
    }

    .site-footer {
      position: relative;
      z-index: 1;
      padding: 34px 18px;
      color: rgba(247, 251, 255, 0.82);
      background:
        linear-gradient(135deg, #071019, #102332 55%, #071019),
        radial-gradient(circle at 15% 0%, rgba(0, 183, 216, 0.22), transparent 18rem);
    }

    .footer-shell {
      display: grid;
      grid-template-columns: 1.2fr 0.8fr 0.8fr;
      gap: 18px;
      align-items: start;
    }

    .footer-logo {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 10px;
      color: #ffffff;
      font-weight: 900;
      letter-spacing: -0.03em;
    }

    .footer-logo span:first-child {
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      color: #06111a;
      background: linear-gradient(135deg, var(--brand), var(--hot));
      border-radius: 10px;
    }

    .site-footer p {
      margin: 0;
      padding: 0;
      line-height: 1.55;
    }

    .footer-column h5 {
      margin: 0 0 10px;
      color: #ffffff;
      font-size: 0.9rem;
      text-transform: uppercase;
      letter-spacing: 0.1em;
    }

    .footer-column ul {
      list-style: none;
      margin: 0;
      padding: 0;
    }

    .footer-column li {
      margin: 7px 0;
    }

    .footer-chip {
      display: inline-flex;
      margin-top: 12px;
      padding: 7px 10px;
      color: #06111a;
      background: #fef3c7;
      border-radius: 999px;
      font-weight: 800;
      font-size: 0.84rem;
    }

    @media (max-width: 860px) {
      .header-top,
      .hero,
      .footer-shell {
        grid-template-columns: 1fr;
      }

      .header-top {
        align-items: flex-start;
        flex-direction: column;
      }

      .header-nav {
        justify-content: flex-start;
      }

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

      #controlsPanel {
        overflow: visible;
      }

      .about-points {
        grid-template-columns: 1fr;
      }

      .project-status-head {
        flex-direction: column;
      }

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

      .resources-head {
        flex-direction: column;
      }

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

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

      .preview {
        min-height: 390px;
      }

      .wiring-dialog {
        grid-template-rows: auto minmax(360px, 1fr);
        height: calc(100vh - 24px);
      }

      .wiring-header {
        grid-template-columns: 1fr;
      }

      .wiring-toolbar {
        justify-content: flex-start;
      }

      .wiring-node {
        width: 128px;
        min-height: 74px;
      }

      .wiring-board {
        width: 168px;
        min-height: 154px;
        border-radius: 14px;
      }

      .wiring-board-body {
        height: 112px;
      }

      .wiring-board[data-kind="M"] {
        width: 116px;
        min-height: 126px;
      }

      .wiring-board[data-kind="M"] .wiring-board-body {
        height: 84px;
      }

      .wiring-board[data-kind="LiPo"] {
        width: 136px;
        min-height: 126px;
      }

      .wiring-board[data-kind="LiPo"] .wiring-board-body {
        height: 84px;
      }

      .wiring-board[data-kind="RX"] {
        width: 146px;
        min-height: 132px;
      }

      .wiring-board[data-kind="RX"] .wiring-board-body {
        height: 90px;
      }

      .wiring-board-head {
        padding: 6px 7px;
        gap: 5px;
      }

      .wiring-board-title strong {
        font-size: 0.72rem;
      }

      .wiring-board-title span,
      .wiring-board-kind {
        font-size: 0.58rem;
      }

      .wiring-pad {
        min-width: 21px;
        min-height: 18px;
        border-width: 1px;
        font-size: 0.48rem;
      }

      .wiring-hint {
        right: 12px;
        bottom: 12px;
        left: 12px;
      }
    }

    @media (max-width: 520px) {
      .site-header {
        padding: 22px 14px 28px;
      }

      .brand-mark {
        width: 42px;
        height: 42px;
      }

      .hero h2 {
        font-size: 2.25rem;
      }

      .panel {
        border-radius: 18px;
        padding: 12px;
      }

      #summary > p {
        display: block;
      }

      .compatibility-levels,
      .catalog-freshness {
        grid-template-columns: 1fr;
      }

      .compatibility-title {
        align-items: flex-start;
        flex-direction: column;
      }

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

/* Engineering catalog tools */
.catalog-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  margin: 10px 0 14px;
}
.catalog-search {
  display: grid;
  gap: 5px;
  color: #445063;
  font-size: 0.78rem;
  font-weight: 700;
}
.catalog-search input,
.compare-controls select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd5df;
  border-radius: 7px;
  background: #fff;
  color: #172033;
  padding: 8px 10px;
}
.catalog-tools button,
.engineering-actions button,
.log-import-button,
.compare-actions button {
  min-height: 38px;
  border: 1px solid #25364b;
  border-radius: 7px;
  background: #25364b;
  color: #fff;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 750;
}
.catalog-tools output {
  min-width: 62px;
  color: #667386;
  font-size: 0.78rem;
}
.engineering-tools {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 0;
  border-top: 1px solid #dce3ea;
  border-bottom: 1px solid #dce3ea;
}
.engineering-tools-head,
.engineering-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.engineering-confidence {
  border: 1px solid #cbd5df;
  border-radius: 999px;
  padding: 4px 8px;
  color: #8a4c12;
  background: #fff7e7;
  font-size: 0.75rem;
  font-weight: 800;
}
.engineering-confidence[data-level="high"] {
  color: #166534;
  background: #edf9f0;
}
.engineering-confidence[data-level="medium"] {
  color: #395671;
  background: #edf5fb;
}
.engineering-actions {
  justify-content: flex-start;
}
.engineering-actions button:nth-child(2) {
  background: #fff;
  color: #25364b;
}
.log-import-button {
  display: inline-grid;
  place-items: center;
  background: #0f766e;
}
.engineering-status {
  color: #5b6778;
  font-size: 0.82rem;
  line-height: 1.45;
}
.engineering-log-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.engineering-log-metrics span {
  min-width: 0;
  border-left: 3px solid #6e899f;
  padding: 5px 8px;
  color: #647185;
  font-size: 0.72rem;
}
.engineering-log-metrics strong {
  display: block;
  overflow-wrap: anywhere;
  color: #1c2938;
  font-size: 0.9rem;
}
.compare-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(10, 18, 28, 0.7);
}
.compare-modal[hidden] {
  display: none;
}
.compare-dialog {
  width: min(980px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
  padding: 18px;
}
.compare-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}
.compare-head h3,
.compare-head p {
  margin: 0;
}
.compare-head p {
  margin-top: 5px;
  color: #657184;
  font-size: 0.85rem;
}
.compare-head button {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: #172033;
  font-size: 1.4rem;
  cursor: pointer;
}
.compare-controls {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}
.compare-controls label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 800;
}
.compare-table-wrap {
  overflow: auto;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.compare-table th,
.compare-table td {
  border-bottom: 1px solid #dce3ea;
  padding: 8px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
}
.compare-table th:first-child {
  width: 24%;
  color: #516074;
}
.compare-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}
body.has-modal {
  overflow: hidden;
}
@media (max-width: 680px) {
  .catalog-tools,
  .compare-controls {
    grid-template-columns: 1fr;
  }
  .engineering-log-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .compare-modal {
    padding: 0;
  }
  .compare-dialog {
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
    border-radius: 0;
    padding: 12px;
  }
}