/* Scoped supporting screen styles; the shared shell stays independent. */
@scope (.legacy-content) {
  * {
    box-sizing: border-box;
  }
  html {
    scroll-behavior: smooth;
  }
  body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background:
      radial-gradient(
        1200px 700px at 20% 5%,
        rgba(96, 165, 250, 0.18),
        transparent 60%
      ),
      radial-gradient(
        900px 700px at 85% 25%,
        rgba(167, 139, 250, 0.14),
        transparent 55%
      ),
      radial-gradient(circle at top, #0b1220 0, #020617 55%, #000 100%);
    line-height: 1.7;
    overflow-x: hidden;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  img {
    max-width: 100%;
    display: block;
  }

  /* Header */
  header {
    position: sticky;
    top: 0;
    z-index: 60;
    height: var(--header-h);
    backdrop-filter: blur(16px);
    background: linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.75),
      rgba(29, 78, 216, 0.35),
      rgba(0, 0, 0, 0.75)
    );
    border-bottom: 1px solid rgba(96, 165, 250, 0.35);
  }
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
  }
  .nav {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }
  .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 170px;
  }
  .logo img {
    height: 58px;
    width: auto;
  }
  .logo .tag {
    display: none;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: rgba(203, 213, 245, 0.9);
    opacity: 0.9;
  }
  @media (min-width: 980px) {
    .logo .tag {
      display: block;
    }
  }

  .nav-menu {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.35);
  }
  .nav-menu a {
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    transition:
      background 0.15s ease,
      color 0.15s ease,
      transform 0.15s ease;
    white-space: nowrap;
  }
  .nav-menu a:hover {
    background: rgba(96, 165, 250, 0.14);
    color: #e2e8f0;
    transform: translateY(-1px);
  }
  .nav-menu a.active {
    background: rgba(96, 165, 250, 0.18);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.35);
  }

  .auth-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .auth-links a {
    opacity: 0.86;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    transition:
      opacity 0.15s ease,
      border-color 0.15s ease;
  }
  .auth-links a:hover {
    opacity: 1;
  }
  .auth-links a.active {
    opacity: 1;
    border-bottom-color: var(--accent);
  }

  /* Mobile nav */
  .menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.65);
    color: var(--text);
    font-size: 1.1rem;
  }
  @media (max-width: 980px) {
    .menu-toggle {
      display: inline-grid;
      place-items: center;
    }
    .nav-menu {
      position: fixed;
      top: var(--header-h);
      left: 0;
      right: 0;
      bottom: 0;
      display: none;
      flex-direction: column;
      align-items: stretch;
      gap: 0;
      padding: 16px 18px;
      border-radius: 0;
      background: rgba(2, 6, 23, 0.96);
      border: none;
      border-top: 1px solid rgba(148, 163, 184, 0.22);
    }
    .nav-menu.open {
      display: flex;
    }
    .nav-menu a {
      border-radius: 14px;
      padding: 14px 14px;
      letter-spacing: 0.14em;
      border: 1px solid rgba(148, 163, 184, 0.16);
      background: rgba(15, 23, 42, 0.35);
      margin-bottom: 10px;
    }
  }

  main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 22px 20px 56px;
  }

  /* Hero */
  .hero {
    position: relative;
    border-radius: 34px;
    overflow: hidden;
    min-height: 560px;
    box-shadow: var(--shadow);
    isolation: isolate;
    margin-top: 18px;
  }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(
        1000px 600px at 18% 15%,
        rgba(96, 165, 250, 0.3),
        transparent 60%
      ),
      radial-gradient(
        900px 500px at 85% 30%,
        rgba(167, 139, 250, 0.22),
        transparent 55%
      ),
      linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.92)),
      url("../../images/007.jpg") center/cover no-repeat;
    filter: saturate(1.05) brightness(0.86);
    transform: scale(1.03);
  }
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(
        circle at 20% 0%,
        rgba(255, 255, 255, 0.14),
        transparent 55%
      ),
      radial-gradient(
        circle at 80% 25%,
        rgba(255, 255, 255, 0.08),
        transparent 60%
      );
    mix-blend-mode: soft-light;
    pointer-events: none;
  }
  .hero-inner {
    position: relative;
    z-index: 1;
    padding: clamp(22px, 4vw, 48px);
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(16px, 3vw, 34px);
    align-items: center;
  }
  @media (max-width: 980px) {
    .hero-inner {
      grid-template-columns: 1fr;
    }
  }

  .pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.28rem 0.78rem;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.35);
    width: fit-content;
  }
  .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--good);
    box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.18);
  }

  h1 {
    margin: 0.9rem 0 0.8rem;
    font-size: clamp(2.4rem, 4.8vw, 3.8rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
    font-weight: 900;
    background: linear-gradient(
      120deg,
      #fff,
      #e5e7eb 35%,
      #93c5fd 60%,
      #a78bfa 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .lede {
    margin: 0 0 1.2rem;
    font-size: clamp(1rem, 1.2vw + 0.65rem, 1.18rem);
    color: rgba(229, 231, 235, 0.92);
    max-width: 60ch;
  }
  .subtle {
    color: var(--muted);
    font-size: 0.95rem;
  }

  .cta-row {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1.25rem;
  }
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.35rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.78rem;
    cursor: pointer;
    transition:
      transform 0.15s ease,
      background 0.15s ease,
      border-color 0.15s ease,
      box-shadow 0.15s ease;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.55);
  }
  .btn:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.75);
    background: rgba(2, 6, 23, 0.72);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.75);
  }
  .btn.outline {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.42);
  }
  .btn.small {
    padding: 0.72rem 1.05rem;
    font-size: 0.75rem;
  }

  /* Right hero panel */
  .glass {
    border-radius: 26px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-soft);
    padding: 18px 18px 16px;
  }
  .glass h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #cbd5f5;
  }
  .list {
    margin: 0;
    padding-left: 1.2rem;
    color: rgba(203, 213, 245, 0.95);
    font-size: 0.95rem;
  }
  .mini {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
  }
  .chip {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(2, 6, 23, 0.45);
    color: rgba(229, 231, 235, 0.92);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }
  .chip strong {
    color: #fff;
  }

  /* Sections */
  section {
    scroll-margin-top: calc(var(--header-h) + 16px);
  }
  .section {
    margin-top: 34px;
    padding-top: 30px;
    position: relative;
  }
  .section::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(148, 163, 184, 0.35),
      transparent
    );
    opacity: 0.9;
  }
  .section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }
  .section-title h2 {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #cbd5f5;
  }
  .section-title p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 70ch;
  }

  /* Grid cards */
  .grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
    margin-top: 16px;
  }
  .card {
    border-radius: var(--radius);
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: var(--panel);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-soft);
    padding: 16px 16px 14px;
    overflow: hidden;
    position: relative;
  }
  .card::after {
    content: "";
    position: absolute;
    inset: -120px -120px auto auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(
      circle at center,
      rgba(96, 165, 250, 0.22),
      transparent 60%
    );
    transform: rotate(18deg);
    pointer-events: none;
    opacity: 0.8;
  }
  .card h3 {
    margin: 0 0 0.5rem;
    font-size: 0.98rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #e5e7eb;
  }
  .card p {
    margin: 0;
    color: rgba(229, 231, 235, 0.9);
    font-size: 0.95rem;
  }
  .span-6 {
    grid-column: span 6;
  }
  .span-4 {
    grid-column: span 4;
  }
  .span-8 {
    grid-column: span 8;
  }
  .span-12 {
    grid-column: span 12;
  }
  @media (max-width: 900px) {
    .span-6,
    .span-4,
    .span-8 {
      grid-column: span 12;
    }
  }

  /* Preview / App panels */
  .panel {
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  .panel-head {
    padding: 18px 18px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(
      180deg,
      rgba(2, 6, 23, 0.25),
      rgba(2, 6, 23, 0)
    );
  }
  .panel-head .kicker {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #cbd5f5;
    margin-bottom: 8px;
  }
  .panel-head .kicker .dot2 {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 5px rgba(96, 165, 250, 0.16);
  }
  .panel-head h2 {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #fff;
  }
  .panel-body {
    padding: 16px 18px 18px;
  }

  .two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  @media (max-width: 900px) {
    .two-col {
      grid-template-columns: 1fr;
    }
  }

  label {
    display: block;
    margin: 0.3rem 0 0.35rem;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
    font-weight: 800;
  }
  textarea {
    width: 100%;
    min-height: 140px;
    resize: vertical;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(2, 6, 23, 0.55);
    color: #fff;
    font: inherit;
    padding: 12px 12px;
    outline: none;
    transition:
      border-color 0.15s ease,
      box-shadow 0.15s ease,
      transform 0.15s ease;
  }
  textarea:focus {
    border-color: rgba(96, 165, 250, 0.85);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.18);
  }

  .row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 12px;
  }

  .note {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.95rem;
  }

  .status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(2, 6, 23, 0.45);
    color: rgba(229, 231, 235, 0.92);
    font-size: 0.92rem;
  }
  .status .badge {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--warn);
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.15);
  }
  .status.good .badge {
    background: var(--good);
    box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.15);
  }

  /* Results */
  pre {
    margin: 0;
    padding: 12px 12px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(2, 6, 23, 0.6);
    overflow: auto;
    font-size: 0.86rem;
    color: rgba(229, 231, 235, 0.92);
  }

  /* Reveal */
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition:
      opacity 0.6s ease,
      transform 0.6s ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
  @media (prefers-reduced-motion: reduce) {
    .reveal {
      transition: none;
    }
  }

  footer {
    margin: 26px 0 20px;
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
  }

  /* Unified Header (Chat Style) */
  header {
    background: linear-gradient(
      180deg,
      rgba(17, 24, 39, 0.95),
      rgba(17, 24, 39, 0.83),
      rgba(17, 24, 39, 0.35)
    );
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(157, 176, 197, 0.24);
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 900;
    padding: 6px 0;
    height: auto;
  }
  header .container.nav {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 76px;
  }
  header .logo img {
    height: 68px;
    width: auto;
    display: block;
  }
  header .nav-menu {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.88rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  header .nav-menu a {
    color: #9db0c5;
    padding: 0.48rem 0.86rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition:
      background 0.18s ease,
      color 0.18s ease,
      box-shadow 0.18s ease;
    text-decoration: none;
    border: none;
  }
  header .nav-menu a:hover {
    background: rgba(125, 158, 194, 0.16);
    color: #f4f8ff;
  }
  header .nav-menu a.active {
    color: #f4f8ff;
    background: rgba(109, 178, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(109, 178, 255, 0.42);
  }
  header .auth-links {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.84rem;
  }
  header .auth-links a {
    color: #9db0c5;
    font-weight: 600;
    text-decoration: none;
    border: none;
    padding: 0;
  }
  header .auth-links a:hover {
    color: #f4f8ff;
    text-decoration: none;
  }
  header .menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(157, 176, 197, 0.36);
    background: transparent;
    color: #e8eff8;
    font-size: 1.18rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
  }
  @media (max-width: 940px) {
    header {
      background: #111827;
      backdrop-filter: none;
    }
    header .container.nav {
      padding: 0 14px;
      min-height: 72px;
    }
    header .logo img {
      height: 56px;
    }
    header .menu-toggle {
      display: inline-grid;
      place-items: center;
    }
    header .nav-menu {
      position: fixed;
      left: 0;
      right: 0;
      top: 72px;
      display: none;
      flex-direction: column;
      padding: 16px 20px 24px;
      gap: 0.1rem;
      background: #111827;
      border-top: 1px solid rgba(157, 176, 197, 0.36);
      z-index: 90;
    }
    header .nav-menu.open,
    header .nav-menu.active {
      display: flex;
    }
    header .nav-menu a {
      width: 100%;
      text-align: left;
      padding: 0.8rem 0;
      border-radius: 0;
      border-bottom: 1px solid rgba(27, 39, 54, 0.92);
    }
    header .nav-menu a:last-child {
      border-bottom: none;
    }
    header .auth-links {
      display: none;
    }
  }
}
