:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #17222e;
  --muted: #657383;
  --canvas: #f3f5f7;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --line: #dfe5e9;
  --line-strong: #cbd5dc;
  --brand: #135f9d;
  --brand-deep: #0e2c46;
  --accent: #3b82b8;
  --healthy: #157a54;
  --restricted: #a76614;
  --offline: #a94442;
  --shadow: 0 18px 50px rgba(18, 40, 58, .08);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); transition: background 180ms ease, color 180ms ease; }
button, a { font: inherit; }
button { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.75; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 14px; color: #fff; background: var(--brand-deep); border-radius: 10px; }
.skip-link:focus { top: 16px; }

.preview-bar {
  min-height: 52px; padding: 8px max(18px, calc((100vw - 1240px) / 2));
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  color: #dce9f2; background: #102b43; border-bottom: 1px solid rgba(255,255,255,.1);
}
.preview-bar > div:first-child { display: flex; align-items: baseline; gap: 10px; }
.preview-bar strong { color: #fff; font-size: 13px; }
.preview-bar span { font-size: 11px; }
.theme-switcher { display: flex; gap: 4px; padding: 3px; background: rgba(255,255,255,.08); border-radius: 10px; }
.theme-switcher button { min-height: 32px; padding: 6px 11px; border: 0; border-radius: 7px; color: #c6d7e4; background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
.theme-switcher button[aria-pressed="true"] { color: #153047; background: #fff; }

.shell { width: min(1240px, calc(100% - 36px)); margin: 0 auto; }
.topbar { min-height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; color: #fff; background: var(--brand); border-radius: 11px; font-size: 10px; font-weight: 850; letter-spacing: .13em; box-shadow: 0 8px 22px rgba(19,95,157,.22); }
.brand-name { font-size: 15px; font-weight: 720; letter-spacing: -.01em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.icon-button svg { width: 19px; }
.profile { min-height: 46px; padding: 5px 8px 5px 5px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--brand-deep); font-size: 11px; font-weight: 800; }
.profile-copy { display: grid; min-width: 110px; text-align: left; line-height: 1.2; }
.profile-copy strong { font-size: 12px; }
.profile-copy small { color: var(--muted); font-size: 10px; }
.profile > svg { width: 17px; }
.session-action { min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--brand); background: var(--surface); cursor: pointer; font-size: 12px; font-weight: 750; }
[hidden] { display: none !important; }

main { padding: 50px 0 26px; }
.welcome { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 44px; margin-bottom: 42px; }
.eyebrow { margin: 0 0 9px; color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(38px, 5vw, 64px); line-height: .98; letter-spacing: -.055em; font-weight: 690; }
.welcome > div > p:last-child { max-width: 650px; margin: 17px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.access-summary { min-width: 220px; padding: 19px 21px; display: grid; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.access-summary strong { color: var(--brand); font-size: 29px; line-height: 1; }
.access-summary span { margin-top: 6px; font-size: 12px; font-weight: 750; }
.access-summary small { margin-top: 5px; color: var(--muted); font-size: 10px; }

.product-section, .coming-section { margin-bottom: 34px; }
.section-heading { margin-bottom: 15px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.section-heading.compact { align-items: center; }
h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.section-heading > p { max-width: 410px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.legend, .availability { display: flex; gap: 14px; margin: 0; color: var(--muted); font-size: 12px; }
.legend span, .status { display: inline-flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.dot.healthy { background: var(--healthy); }
.dot.restricted { background: var(--restricted); }
.dot.offline { background: var(--offline); }

.product-grid { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; list-style: none; }
.product-card { min-width: 0; }
.card-shell { min-height: 332px; padding: 22px; display: flex; flex-direction: column; color: inherit; text-decoration: none; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 4px 18px rgba(18,40,58,.04); transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease; }
a.card-shell:hover { transform: translateY(-3px); border-color: #b8cad7; box-shadow: var(--shadow); }
a.card-shell:focus-visible, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, white); outline-offset: 3px; }
.card-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.product-icon { width: 48px; height: 48px; display: grid; place-items: center; color: var(--brand); background: #eaf2f7; border-radius: 14px; }
.product-icon svg { width: 25px; height: 25px; }
.status { padding: 7px 9px; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.card-copy { margin-top: 38px; }
.card-eyebrow { color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.card-copy h3 { margin: 8px 0 9px; font-size: 24px; letter-spacing: -.035em; }
.card-copy p { margin: 0; min-height: 44px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.card-foot { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.card-meta { color: var(--muted); font-size: 11px; line-height: 1.45; }
.card-action { display: flex; align-items: center; justify-content: space-between; color: var(--brand); font-size: 12px; font-weight: 750; }
.card-action svg { width: 20px; }
.card-foot strong svg { width: 20px; }
.offline .product-icon { color: #7d5554; background: #f5eceb; }
.offline .card-action { color: var(--offline); }
.restricted .product-icon { color: #88601c; background: #f8f0df; }

.coming-grid { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--line); gap: 1px; }
.coming-card { min-width: 0; padding: 17px; display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 11px; background: var(--surface); }
.mini-icon { width: 33px; height: 33px; display: grid; place-items: center; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; }
.mini-icon svg { width: 18px; }
.coming-card h3 { margin: 1px 0 5px; font-size: 12px; }
.coming-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.planned { grid-column: 1 / -1; margin-top: 8px; color: #866322; font-size: 11px; font-weight: 750; }

footer { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }

/* Editorial: more expressive composition, same semantic structure. */
.theme-editorial {
  --canvas: #f4f0e9; --surface: #fffdfa; --surface-soft: #f8f4ed; --line: #ded6ca;
  --line-strong: #c9bbab; --brand: #9c4f2d; --brand-deep: #472b22; --accent: #b7663f;
  --shadow: 0 20px 55px rgba(68,40,27,.09);
}
.theme-editorial .welcome { padding: 34px; align-items: center; border: 1px solid var(--line); border-radius: 26px; background: var(--surface); }
.theme-editorial h1 { max-width: 760px; font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.045em; }
.theme-editorial .access-summary { box-shadow: none; background: var(--surface-soft); }
.theme-editorial .product-grid { grid-template-columns: 1.15fr .925fr .925fr; }
.theme-editorial .card-shell { border-radius: 8px 22px 8px 22px; }
.theme-editorial .product-card:first-child .card-shell { min-height: 360px; }
.theme-editorial .product-icon { border-radius: 50%; }

/* Midnight: dark executive alternative. */
.theme-midnight {
  color-scheme: dark;
  --ink: #edf5fa; --muted: #9fb0bd; --canvas: #0d1822; --surface: #132330;
  --surface-soft: #172a38; --line: #294050; --line-strong: #3a586b; --brand: #72b9e8;
  --brand-deep: #09131b; --accent: #68b5e6; --healthy: #6ed6a8; --restricted: #efbc6f;
  --offline: #f08d89; --shadow: 0 22px 65px rgba(0,0,0,.28);
}
.theme-midnight .topbar { border-color: #243a49; }
.theme-midnight .brand-mark { color: #0b1c29; background: #8ac8ef; }
.theme-midnight .card-shell { background: linear-gradient(160deg, #152836, #11202c); }
.theme-midnight .product-icon { color: #9ad5f8; background: #19384b; }
.theme-midnight .restricted .product-icon { color: #f4ca83; background: #3e321f; }
.theme-midnight .offline .product-icon { color: #f4a7a3; background: #3d2729; }
.theme-midnight .preview-bar { background: #08121a; }

@media (max-width: 980px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
  .product-card:last-child { grid-column: 1 / -1; }
  .coming-grid { grid-template-columns: repeat(2, 1fr); }
  .theme-editorial .product-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .preview-bar { align-items: flex-start; flex-direction: column; }
  .preview-bar > div:first-child { display: grid; gap: 2px; }
  .shell { width: min(100% - 24px, 1240px); }
  .profile-copy { display: none; }
  main { padding-top: 32px; }
  .welcome { grid-template-columns: 1fr; gap: 22px; }
  .theme-editorial .welcome { padding: 24px; }
  .access-summary { min-width: 0; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .legend { flex-wrap: wrap; }
  .product-grid, .theme-editorial .product-grid { grid-template-columns: 1fr; }
  .product-card:last-child { grid-column: auto; }
  .card-shell, .theme-editorial .product-card:first-child .card-shell { min-height: 300px; }
  .coming-grid { grid-template-columns: 1fr; }
  footer { align-items: flex-start; flex-direction: column; padding: 20px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
