:root {
  color-scheme: dark;
  --navy-950: #030b17;
  --navy-900: #071426;
  --navy-850: #0a1b31;
  --navy-800: #0d243f;
  --blue-500: #1198f6;
  --blue-400: #35adff;
  --blue-200: #a6d9ff;
  --white: #f7fbff;
  --muted: #a9b9cc;
  --line: rgba(133, 191, 239, 0.18);
  --surface: rgba(11, 31, 55, 0.78);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--navy-950);
  color: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.site-shell { overflow: hidden; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  min-height: 86px;
  padding: 12px clamp(22px, 6vw, 112px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 17, 33, 0.94);
  backdrop-filter: blur(16px);
}
.brand { width: min(310px, 100%); }
.brand img { width: 100%; max-height: 61px; object-fit: contain; object-position: left center; }
.site-nav { display: flex; align-items: center; gap: clamp(22px, 3vw, 48px); }
.site-nav a { color: #dce8f5; font-weight: 650; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--blue-400); }
.header-cta { justify-self: end; }
.menu-toggle { display: none; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-500), #087bd2);
  color: white;
  font-weight: 760;
  box-shadow: 0 12px 32px rgba(17, 152, 246, 0.2);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-outline { border-color: #238fdc; background: rgba(4, 18, 34, 0.3); box-shadow: none; }
.button-quiet { border-color: var(--line); background: rgba(255,255,255,.035); box-shadow: none; }
.hero {
  position: relative;
  min-height: 660px;
  display: grid;
  align-items: center;
  padding: 72px clamp(22px, 6vw, 112px) 58px;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url('/assets/hero-workshop.webp') 54% center / cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(3,11,23,.99) 0%, rgba(4,14,28,.96) 31%, rgba(4,14,28,.42) 58%, rgba(3,11,23,.1) 100%), linear-gradient(0deg, rgba(3,11,23,.62), transparent 45%);
}
.hero-copy { max-width: 680px; }
.eyebrow { margin: 0 0 18px; color: var(--blue-200); font-size: .82rem; font-weight: 800; letter-spacing: .28em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; line-height: 1.04; letter-spacing: -.035em; }
h1 { margin-bottom: 22px; font-size: clamp(3.2rem, 5.4vw, 6.4rem); }
h1 span, h2 span { color: var(--blue-500); }
.hero-lead { max-width: 610px; margin: 0 0 30px; color: #d6e0eb; font-size: clamp(1.1rem, 1.5vw, 1.4rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.trust-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 54px;
  max-width: 760px;
}
.trust-item { padding: 0 22px; border-left: 1px solid var(--line); }
.trust-item:first-child { padding-left: 0; border-left: 0; }
.trust-item strong { display: block; font-size: 1.02rem; }
.trust-item span { color: var(--muted); font-size: .9rem; }
.section { padding: 92px clamp(22px, 6vw, 112px); }
.section-navy { background: linear-gradient(135deg, #07182c, #0a2442); }
.section-deep { background: var(--navy-950); }
.section-light { color-scheme: light; background: #f5f9fd; color: #0b1d32; }
.section-heading { max-width: 900px; margin: 0 auto 50px; text-align: center; }
.section-heading h2 { margin-bottom: 18px; font-size: clamp(2.3rem, 4vw, 4.5rem); }
.section-heading p { max-width: 720px; margin: 0 auto; color: var(--muted); font-size: 1.08rem; }
.section-light .section-heading p { color: #52677c; }
.feature-grid, .product-grid, .step-grid, .wiki-grid { display: grid; gap: 20px; }
.feature-grid { grid-template-columns: repeat(3, 1fr); }
.product-grid { grid-template-columns: repeat(3, 1fr); }
.card {
  position: relative;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(19, 47, 79, .72), rgba(6, 21, 40, .82));
  box-shadow: var(--shadow);
}
.section-light .card { border-color: #d7e3ee; background: white; box-shadow: 0 18px 50px rgba(32, 64, 96, .08); }
.card h3 { margin-bottom: 12px; font-size: 1.42rem; }
.card p { margin: 0; color: var(--muted); }
.section-light .card p { color: #566a7c; }
.card-index { display: inline-flex; margin-bottom: 28px; color: var(--blue-400); font-size: 1.7rem; font-weight: 850; }
.product-card ul, .package-card ul { padding: 0; margin: 22px 0 0; list-style: none; }
.product-card li, .package-card li { margin: 9px 0; color: #c8d5e2; }
.product-card li::before, .package-card li::before { content: "✓"; margin-right: 9px; color: var(--blue-400); font-weight: 900; }
.subscription { border-color: rgba(109, 130, 255, .38); }
.badge { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: rgba(17, 152, 246, .12); color: var(--blue-400); font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.badge-abo { background: rgba(130, 105, 255, .16); color: #b8a9ff; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 54px; align-items: center; }
.split h2 { font-size: clamp(2.3rem, 4vw, 4.3rem); }
.check-list { display: grid; gap: 14px; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 30px; color: #cfdae6; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--blue-400); font-weight: 900; }
.cta-panel { padding: 52px; border: 1px solid rgba(57, 166, 244, .3); border-radius: 24px; background: linear-gradient(135deg, rgba(17, 152, 246, .15), rgba(8, 35, 65, .75)); text-align: center; }
.cta-panel h2 { font-size: clamp(2rem, 3vw, 3.4rem); }
.page-hero { padding: 90px clamp(22px, 6vw, 112px) 64px; background: radial-gradient(circle at 85% 0, rgba(17,152,246,.17), transparent 32%), linear-gradient(135deg, #061426, #0a213c); }
.page-hero-inner { max-width: 980px; }
.page-hero h1 { font-size: clamp(2.8rem, 5vw, 5.4rem); }
.page-hero p { max-width: 760px; color: #c6d4e1; font-size: 1.18rem; }
.edition-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 50px; }
.edition-card { width: 100%; text-align: left; color: inherit; cursor: pointer; }
.edition-card.is-selected { border-color: var(--blue-500); box-shadow: 0 0 0 2px rgba(17,152,246,.15), var(--shadow); }
.edition-card small { color: var(--blue-400); font-weight: 800; }
.module-card { min-height: 240px; text-align: left; color: inherit; cursor: pointer; }
.module-fixed { cursor: default; }
.module-card.is-selected { border-color: var(--blue-500); background: linear-gradient(160deg, rgba(17, 99, 158, .45), rgba(6, 21, 40, .88)); }
.module-action { display: inline-block; margin-top: 24px; color: var(--blue-400); font-weight: 800; }
.subscription-note { margin-top: 24px; padding: 18px 20px; border: 1px solid rgba(184,169,255,.32); border-radius: 14px; background: rgba(130,105,255,.08); color: #d8d0ff; }
.selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 26px; padding: 24px 28px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.035); }
.step-grid { grid-template-columns: repeat(4, 1fr); counter-reset: steps; }
.step-card { counter-increment: steps; }
.step-card::before { content: counter(steps); display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 22px; border-radius: 50%; background: var(--blue-500); font-weight: 900; }
.download-panel { display: grid; grid-template-columns: 1.4fr .6fr; gap: 20px; }
.download-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 26px; }
.pill { padding: 7px 11px; border-radius: 999px; background: rgba(17,152,246,.1); color: var(--blue-200); font-size: .86rem; }
.wiki-grid { grid-template-columns: repeat(3, 1fr); }
.wiki-card a { display: inline-flex; margin-top: 20px; color: var(--blue-500); font-weight: 800; }
.placeholder-link { display: inline-flex; margin-top: 20px; color: #71859a; font-weight: 750; }
.legal-copy { max-width: 820px; margin: 0 auto; }
.legal-copy h2 { margin: 40px 0 12px; font-size: 1.7rem; }
.legal-copy p, .legal-copy li { color: #52677c; }
.legal-notice { padding: 18px 20px; border: 1px solid #efc368; border-radius: 14px; background: #fff6df; color: #6a4a09; }
.portal-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 620px; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: #f5f9fd; color: #0b1d32; box-shadow: var(--shadow); }
.portal-sidebar { padding: 26px 18px; background: #071b31; color: white; }
.portal-sidebar strong { display: block; margin-bottom: 28px; }
.portal-sidebar a, .portal-sidebar > span { display: block; margin: 7px 0; padding: 11px 13px; border-radius: 9px; color: #cdd9e5; }
.portal-sidebar > span { color: #73879a; cursor: not-allowed; }
.portal-sidebar a[aria-current="page"] { background: #0e7bc4; color: white; }
.portal-sidebar .portal-logout { margin-top: 28px; border-top: 1px solid rgba(255,255,255,.1); border-radius: 0; color: #89a0b6; }
.portal-content { padding: 38px; }
.portal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.portal-card { padding: 22px; border: 1px solid #d7e3ee; border-radius: 14px; background: white; }
.portal-card p { color: #607386; }
.portal-notice { margin-top: 22px; padding: 18px 20px; border-radius: 12px; background: #e7f4ff; color: #164d79; }
.portal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.portal-toolbar h2 { margin: 0; font-size: clamp(2rem, 3vw, 3rem); }
.portal-kicker { margin: 0 0 8px; color: #177dc1; font-size: .8rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: #e6f8ef; color: #1e7048; font-size: .84rem; font-weight: 800; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #28a96b; }
.status.pending { background: #fff4d7; color: #795813; }
.status.pending::before { background: #e5a91e; }
.portal-list { display: grid; gap: 14px; margin-top: 18px; }
.portal-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 18px 20px; border: 1px solid #d7e3ee; border-radius: 13px; background: white; }
.portal-row h3 { margin: 0 0 5px; font-size: 1.08rem; }
.portal-row p { margin: 0; color: #607386; font-size: .93rem; }
.portal-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.portal-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px; border: 1px solid #b8d3e8; border-radius: 9px; background: white; color: #126da9; font-weight: 800; }
.portal-button.primary { border-color: #0d88d8; background: #0d88d8; color: white; }
.portal-button[aria-disabled="true"] { opacity: .52; cursor: not-allowed; }
.portal-table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: 12px; background: white; }
.portal-table th, .portal-table td { padding: 15px 17px; border-bottom: 1px solid #dce6ee; text-align: left; vertical-align: top; }
.portal-table th { color: #546a7e; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }
.portal-table td { color: #21384d; }
.portal-table tr:last-child td { border-bottom: 0; }
.portal-settings { display: grid; gap: 14px; max-width: 760px; }
.setting-option { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 20px; border: 1px solid #d7e3ee; border-radius: 13px; background: white; }
.setting-option input { margin-top: 5px; accent-color: #0d88d8; }
.setting-option strong, .setting-option span { display: block; }
.setting-option span { margin-top: 4px; color: #607386; }
.login-section { min-height: calc(100vh - 86px); display: grid; place-items: center; padding: 70px 20px; background: radial-gradient(circle at 75% 20%, rgba(17,152,246,.18), transparent 32%), #050f1e; }
.login-card { width: min(480px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 22px; background: rgba(8,28,50,.94); box-shadow: var(--shadow); }
.login-card h1 { margin-bottom: 12px; font-size: 2.5rem; }
.login-card > p { color: var(--muted); }
.form-field { display: grid; gap: 7px; margin: 18px 0; }
.form-field label { font-weight: 750; }
.form-field input { min-height: 50px; padding: 0 14px; border: 1px solid #315574; border-radius: 9px; background: #061526; color: white; }
.form-field input:focus { outline: 2px solid var(--blue-500); outline-offset: 2px; }
.login-card .button { width: 100%; margin-top: 10px; }
.site-footer { display: grid; grid-template-columns: 1fr auto; gap: 30px 60px; padding: 52px clamp(22px, 6vw, 112px); border-top: 1px solid var(--line); background: #030b17; }
.site-footer img { width: 250px; margin-bottom: 12px; }
.site-footer p { margin: 0; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; align-self: center; }
.footer-legal { grid-column: 1 / -1; display: flex; gap: 22px; padding-top: 24px; border-top: 1px solid var(--line); color: #7f94aa; font-size: .9rem; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1050px) {
  .site-header { grid-template-columns: 1fr auto auto; }
  .menu-toggle { display: grid; gap: 5px; padding: 10px; border: 0; background: transparent; }
  .menu-toggle span:not(.sr-only) { display: block; width: 25px; height: 2px; background: white; }
  .site-nav { position: absolute; left: 18px; right: 18px; top: 78px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #071629; }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 13px; }
  .feature-grid, .product-grid, .wiki-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .download-panel { grid-template-columns: 1fr; }
  .portal-grid { grid-template-columns: 1fr; }
  .portal-table-wrap { overflow-x: auto; }
}

@media (max-width: 720px) {
  .site-header { min-height: 72px; padding: 10px 18px; }
  .brand { width: 210px; }
  .header-cta { display: none; }
  .hero { min-height: auto; padding-top: 72px; }
  .hero::before { background-position: 63% center; opacity: .46; }
  .hero::after { background: linear-gradient(90deg, rgba(3,11,23,.98), rgba(3,11,23,.78)); }
  .trust-row { grid-template-columns: 1fr; gap: 18px; }
  .trust-item { padding: 0 0 0 18px; }
  .trust-item:first-child { padding-left: 18px; border-left: 1px solid var(--line); }
  .section { padding: 68px 20px; }
  .feature-grid, .product-grid, .edition-grid, .step-grid, .wiki-grid { grid-template-columns: 1fr; }
  .selection-bar { align-items: stretch; flex-direction: column; }
  .portal-shell { grid-template-columns: 1fr; }
  .portal-sidebar { display: none; }
  .portal-content { padding: 22px; }
  .portal-toolbar, .portal-row { align-items: stretch; flex-direction: column; }
  .portal-row-actions { justify-content: flex-start; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-legal { grid-column: 1; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
