:root {
  color-scheme: light;
}

:root :is(a, button, summary, input, select, textarea):focus-visible {
  outline: 3px solid #2a95d0;
  outline-offset: 3px;
}

.theme-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  min-height: 2.7rem;
  padding: 0.3rem 0.38rem 0.3rem 0.72rem;
  border: 1px solid var(--line, rgba(7, 28, 53, 0.12));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface, #ffffff) 86%, transparent);
  color: var(--muted, #5b6b7c);
  font-size: 0.78rem;
  font-weight: 600;
}

.theme-picker-select {
  min-height: 2.75rem;
  padding: 0.25rem 1.8rem 0.25rem 0.62rem;
  border: 1px solid var(--line, #d8e3ef);
  border-radius: 999px;
  background-color: var(--surface, #ffffff);
  color: var(--ink, #071c35);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.theme-picker-select:focus-visible {
  outline: 3px solid #2a95d0;
  outline-offset: 2px;
}

.theme-picker-select:hover {
  border-color: #2a95d0;
  box-shadow: 0 0 0 2px rgba(42, 149, 208, 0.14);
}

.theme-picker-select:active {
  box-shadow: 0 0 0 3px rgba(42, 149, 208, 0.22);
}

:is(.button, .button-link, .inline-action-link, .insights-button, .facts-cta) {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

:is(.button, .button-link, .inline-action-link, .insights-button, .facts-cta):hover {
  transform: translateY(-1px);
}

:is(.button, .button-link, .inline-action-link, .insights-button, .facts-cta):active {
  transform: translateY(0) scale(0.98);
}

:root[data-resolved-theme="dark"] {
  --bg: #071c35;
  --bg-alt: #0a1835;
  --surface: #0a1835;
  --surface-soft: #071c35;
  --pearl: #0a1835;
  --pearl-strong: #d8e3ef;
  --ink: #ffffff;
  --muted: rgba(248, 250, 252, 0.78);
  --line: rgba(216, 227, 239, 0.22);
  --line-strong: rgba(216, 227, 239, 0.16);
  --blue: #2a95d0;
  --blue-strong: #0050a0;
  --blue-dark: #2a95d0;
  --cyan: #21c7d4;
  --cyan-soft: rgba(33, 199, 212, 0.18);
  --teal: #21c7d4;
  --amber: #f8fafc;
  --card-shadow: 0 24px 60px rgba(7, 28, 53, 0.45);
  --card-shadow-strong: 0 32px 80px rgba(7, 28, 53, 0.58);
  --shadow: 0 22px 50px rgba(7, 28, 53, 0.45);
}

:root[data-resolved-theme="dark"] body {
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 80, 160, 0.2), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(33, 199, 212, 0.12), transparent 24rem),
    linear-gradient(180deg, #0a1835 0%, #071c35 48%, #071c35 100%);
}

:root[data-resolved-theme="dark"] body::before {
  background-image:
    linear-gradient(rgba(42, 149, 208, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 149, 208, 0.055) 1px, transparent 1px);
}

:root[data-resolved-theme="dark"] .topbar,
:root[data-resolved-theme="dark"] .draft-banner {
  border-color: rgba(216, 227, 239, 0.14);
  background: rgba(10, 24, 53, 0.9);
  box-shadow: 0 18px 40px rgba(7, 28, 53, 0.5);
}

:root[data-resolved-theme="dark"] .nav-links,
:root[data-resolved-theme="dark"] .theme-picker {
  border-color: rgba(216, 227, 239, 0.14);
  background: rgba(7, 28, 53, 0.92);
}

:root[data-resolved-theme="dark"] .theme-picker-select {
  border-color: #2a95d0;
  background-color: #0050a0;
  color: #ffffff;
}

:root[data-resolved-theme="dark"] .nav-links a[aria-current="page"],
:root[data-resolved-theme="dark"] .nav-links a[aria-selected="true"] {
  background: #0050a0;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(7, 28, 53, 0.45);
}

:root[data-resolved-theme="dark"] body:not(#top) .hero-card,
:root[data-resolved-theme="dark"] .summary-card,
:root[data-resolved-theme="dark"] .content-card,
:root[data-resolved-theme="dark"] .faq-group,
:root[data-resolved-theme="dark"] .cta-card,
:root[data-resolved-theme="dark"] .signal-card,
:root[data-resolved-theme="dark"] .preview-card,
:root[data-resolved-theme="dark"] .status-card,
:root[data-resolved-theme="dark"] .section-card,
:root[data-resolved-theme="dark"] .surface-card,
:root[data-resolved-theme="dark"] .rollout-card,
:root[data-resolved-theme="dark"] .form-card,
:root[data-resolved-theme="dark"] .standard-card,
:root[data-resolved-theme="dark"] .product-tour-card,
:root[data-resolved-theme="dark"] .trust-architecture-card,
:root[data-resolved-theme="dark"] .trust-boundary-card,
:root[data-resolved-theme="dark"] .trust-visual,
:root[data-resolved-theme="dark"] .comparison-row:not(.comparison-head),
:root[data-resolved-theme="dark"] .record-band,
:root[data-resolved-theme="dark"] .insights-empty,
:root[data-resolved-theme="dark"] .insights-bottom-cta,
:root[data-resolved-theme="dark"] .insights-article-card,
:root[data-resolved-theme="dark"] .insight-article,
:root[data-resolved-theme="dark"] .release-disclosure {
  border-color: var(--line);
  background: rgba(10, 24, 53, 0.94);
  box-shadow: var(--shadow, var(--card-shadow));
}

:root[data-resolved-theme="dark"] body:not(#top) .hero-card {
  background: linear-gradient(145deg, rgba(10, 24, 53, 0.98), rgba(7, 28, 53, 0.98));
}

:root[data-resolved-theme="dark"] :is(
  .summary-list div,
  .faq-group details,
  .release-summary-topics li,
  .release-grid div,
  .release-verification,
  .requirements-notes,
  .selected-attachments,
  .trust-boundary-zone,
  .founder-access-detail,
  .field,
  .use-case-query,
  .trust-foundation-card,
  .insight-definition,
  .insight-faq-item,
  .record-flow span,
  .trust-boundary-label
) {
  border-color: rgba(42, 149, 208, 0.28);
  background: rgba(42, 149, 208, 0.08);
}

:root[data-resolved-theme="dark"] :is(
  input,
  textarea,
  select,
  .download-email-field input[readonly],
  .button-link-secondary,
  .attachment-remove-button,
  .verification-help code
) {
  border-color: rgba(216, 227, 239, 0.28);
  background-color: #071c35;
  color: var(--ink);
}

:root[data-resolved-theme="dark"] .button-link-secondary,
:root[data-resolved-theme="dark"] .button-row .button-secondary,
:root[data-resolved-theme="dark"] .button-light {
  border-color: rgba(216, 227, 239, 0.28);
  background: rgba(248, 250, 252, 0.08);
  color: var(--ink);
}

:root[data-resolved-theme="dark"] :is(
  .button-link-secondary,
  .button-row .button-secondary,
  .button-light
):is(:hover, :focus-visible) {
  border-color: #2a95d0;
  background: rgba(42, 149, 208, 0.16);
  color: #ffffff;
}

:root[data-resolved-theme="dark"] :is(
  .button-link-secondary,
  .button-row .button-secondary,
  .button-light
):active {
  border-color: #2a95d0;
  background: rgba(42, 149, 208, 0.24);
  color: #ffffff;
}

:root[data-resolved-theme="dark"] :is(
  .trust-boundary-step,
  .trust-boundary-note,
  .warning-screenshot,
  .trust-diagram-figure
) {
  border-color: var(--line);
  background: rgba(10, 24, 53, 0.88);
}

:root[data-resolved-theme="dark"] .release-warning,
:root[data-resolved-theme="dark"] .status-pill.placeholder,
:root[data-resolved-theme="dark"] .founder-access-note,
:root[data-resolved-theme="dark"] .founder-access-attributes li {
  border-color: rgba(216, 227, 239, 0.3);
  background: rgba(248, 250, 252, 0.08);
  color: #f8fafc;
}

:root[data-resolved-theme="dark"] .status-pill.live {
  color: #21c7d4;
}

:root[data-resolved-theme="dark"] :is(
  .attachment-invalid,
  .attachment-error,
  .attachment-remove-button,
  .required-marker,
  .release-status.error,
  .support-status.error,
  .waitlist-status.error
) {
  color: #f8fafc;
}

:root[data-resolved-theme="dark"] .waitlist-status.success {
  border-color: rgba(33, 199, 212, 0.32);
  background: rgba(33, 199, 212, 0.1);
  color: #f8fafc;
}

:root[data-resolved-theme="dark"] .asset-placeholder {
  border-color: rgba(216, 227, 239, 0.35) !important;
  background: #0a1835 !important;
  color: #f8fafc !important;
}

:root[data-resolved-theme="dark"] .trust-visual img,
:root[data-resolved-theme="dark"] .warning-screenshot img {
  border-color: var(--line);
  background: #f8fafc;
}

:root[data-resolved-theme="dark"] :is(
  .nav-links .nav-cta,
  .button-link,
  .inline-action-link,
  .facts-cta,
  .insights-button
) {
  background: #0050a0;
  color: #ffffff !important;
}

:root[data-resolved-theme="dark"] :is(
  .nav-links .nav-cta,
  .button-link,
  .inline-action-link,
  .facts-cta,
  .insights-button
):is(:hover, :focus-visible) {
  background: #071c35;
  border-color: #2a95d0;
}

:root[data-resolved-theme="dark"] :is(
  .button-link,
  .inline-action-link,
  .button,
  .support-submit-button
):disabled,
:root[data-resolved-theme="dark"] :is(
  .button-link,
  .inline-action-link,
  .button,
  .support-submit-button
)[aria-disabled="true"] {
  border-color: rgba(216, 227, 239, 0.2);
  background: rgba(248, 250, 252, 0.12);
  box-shadow: none;
  color: rgba(248, 250, 252, 0.58) !important;
  cursor: not-allowed;
  opacity: 1;
  transform: none;
}

:root[data-resolved-theme="dark"] .form-card .button-primary:not(:disabled) {
  border-color: #0050a0;
  background: #0050a0;
  color: #ffffff;
}

:root[data-resolved-theme="dark"] .form-card .button-primary:not(:disabled):is(:hover, :focus-visible) {
  border-color: #2a95d0;
  background: #071c35;
}

:root[data-resolved-theme="dark"] .comparison-head {
  border-color: rgba(42, 149, 208, 0.28);
  background: rgba(42, 149, 208, 0.12);
  color: #2a95d0;
}

:root[data-resolved-theme="dark"] .product-facts-page {
  --facts-body: #ffffff;
  --facts-focus: #2a95d0;
}

:root[data-resolved-theme="dark"] .facts-glance {
  background: #0a1835;
}

@media (max-width: 1180px) {
  .topbar {
    flex-wrap: wrap;
  }

  .theme-picker {
    margin-left: auto;
  }

  .nav-links {
    flex-basis: 100%;
  }
}

@media (max-width: 980px) {
  .topbar .theme-picker {
    align-self: flex-start;
    margin-left: 0;
  }

  .topbar .nav-links {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex-basis: auto;
  }
}

@media (max-width: 600px) {
  .theme-picker-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
