/* Base, tokens, resets, typography, utilities */

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #d8e0ec;
  --surface: #f1f4f8;
  --surface2: #e3e9f2;
  --surface-raised: #f8fafc;
  --surface-inset: #edf1f7;
  --text: #172033;
  --muted: #48566d;
  --faint: #66738a;
  --border: rgba(50, 70, 101, 0.2);
  --border-strong: rgba(38, 60, 94, 0.32);
  --brand: #6545e8;
  --brand2: #007fa8;
  --ok: #087a49;
  --warn: #9a5b00;
  --bad: #c52f50;
  --shadow: 0 20px 60px rgba(34, 48, 75, 0.16);
  --shadow2: 0 10px 30px rgba(34, 48, 75, 0.13);
  --shadow-card: 0 12px 28px rgba(34, 48, 75, 0.12);
  --shadow-panel:
    0 16px 40px rgba(34, 48, 75, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.82);
  --shadow-hover: 0 18px 42px rgba(34, 48, 75, 0.18);
  --focus: 0 0 0 4px rgba(101, 69, 232, 0.24);
  --color-overlay: rgba(23, 32, 51, 0.55);
  --app-page-background:
    radial-gradient(780px 470px at 76% -12%, rgba(101, 69, 232, 0.18), transparent 62%),
    radial-gradient(700px 430px at 10% 2%, rgba(0, 127, 168, 0.14), transparent 60%),
    linear-gradient(180deg, #e4e9f2 0%, #d5deeb 100%);
  --app-surface-navigation: linear-gradient(90deg, #f8faff, #eef2fb);
  --app-surface-header:
    radial-gradient(circle at 96% 0%, rgba(101, 69, 232, 0.12), transparent 42%),
    linear-gradient(145deg, #f8fafc, #e9eff7);
  --app-surface-main:
    radial-gradient(circle at 96% 0%, rgba(101, 69, 232, 0.12), transparent 38%),
    linear-gradient(145deg, #f8fafc, #e7edf5);
  --app-surface-subcard: linear-gradient(180deg, #f8fafc, #e9eff6);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

::selection {
  background: rgba(124, 92, 255, 0.28);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  background: var(--text);
  color: var(--bg);
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  z-index: 9999;
}

.skip-link:focus {
  left: 10px;
  outline: none;
  box-shadow: var(--focus);
}

.review-decision-chip:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.language-toggle__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
}

.gradient-text {
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

pre {
  margin: 0;
  padding: 0.95rem 1rem;
  overflow: auto;
  font-size: 0.88rem;
  color: color-mix(in srgb, var(--text) 92%, var(--muted));
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

code {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

main,
section,
article,
aside,
header,
footer,
nav,
form,
fieldset,
.container,
.panel,
.card {
  min-width: 0;
}

p,
li,
dd,
td,
th,
label,
.field__hint,
.field__error {
  overflow-wrap: anywhere;
}

.review-decision-chip:hover {
  border-color: color-mix(in srgb, var(--brand) 46%, var(--border));
  background: color-mix(in srgb, var(--brand) 16%, var(--surface));
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity var(--t-slow),
    transform var(--t-slow);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.language-toggle {
  width: var(--control-height);
  height: var(--control-height);
  min-width: var(--control-height);
  padding: 0;
  border-radius: var(--radius-control);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition:
    transform var(--t-fast),
    background var(--t),
    border-color var(--t),
    box-shadow var(--t),
    color var(--t);
}

html {
  scroll-behavior: smooth;
  min-height: 100%;
}

body {
  margin: 0;
  /* padding-top: 15px; */
  font-family: var(--font);
  color: var(--text);
  background: var(--app-page-background);
  background-attachment: fixed;
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

body > main {
  flex: 1 0 auto;
}

[hidden] {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.login {
  position: relative;
  padding: 4.5rem 0 5.5rem;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.wrapper {
  max-width: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

:root {
  color-scheme: dark;
  --brand-q: #9175ff;
  --brand-j: #35ceba;
  /* Semantic color tokens */
  --font:
    "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --bg: #0b1020;
  --surface: rgba(255, 255, 255, 0.065);
  --surface2: rgba(255, 255, 255, 0.09);
  --surface-raised: rgba(255, 255, 255, 0.105);
  --surface-inset: rgba(5, 10, 24, 0.42);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.78);
  --faint: rgba(255, 255, 255, 0.56);
  --border: rgba(255, 255, 255, 0.13);
  --border-strong: rgba(255, 255, 255, 0.2);
  --brand: #7c5cff;
  --brand2: #18c8ff;
  --primary: var(--brand);
  --accent: var(--brand2);
  --ok: #35d07f;
  --warn: #ffd166;
  --bad: #ff5c7a;
  --color-primary: var(--brand);
  --color-accent: var(--brand2);
  --color-success: var(--ok);
  --color-warning: var(--warn);
  --color-danger: var(--bad);
  --color-overlay: rgba(0, 0, 0, 0.58);

  /* Shared platform surface system: landing-inspired navy, cyan, and violet. */
  --app-page-background:
    radial-gradient(820px 500px at 74% -16%, rgba(124, 92, 255, 0.3), transparent 62%),
    radial-gradient(720px 440px at 12% 4%, rgba(24, 200, 255, 0.2), transparent 61%),
    radial-gradient(820px 520px at 50% 108%, rgba(53, 208, 127, 0.08), transparent 68%),
    var(--bg);
  --app-surface-navigation:
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 94%, var(--brand2)), color-mix(in srgb, var(--bg) 92%, var(--brand)));
  --app-surface-header:
    radial-gradient(circle at 96% 0%, color-mix(in srgb, var(--brand) 19%, transparent), transparent 42%),
    linear-gradient(145deg, color-mix(in srgb, var(--surface-raised) 94%, transparent), color-mix(in srgb, var(--bg) 72%, var(--surface)));
  --app-surface-main:
    radial-gradient(circle at 96% 0%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 36%),
    linear-gradient(145deg, color-mix(in srgb, var(--surface-raised) 96%, transparent), color-mix(in srgb, var(--bg) 68%, var(--surface)));
  --app-surface-subcard:
    linear-gradient(180deg, color-mix(in srgb, var(--surface2) 78%, transparent), color-mix(in srgb, var(--surface) 72%, transparent)),
    color-mix(in srgb, var(--bg) 78%, var(--surface));

  /* Elevation and shape tokens */
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --shadow2: 0 14px 34px rgba(0, 0, 0, 0.22);
  --shadow-card: 0 14px 34px rgba(0, 0, 0, 0.18);
  --shadow-panel:
    0 18px 46px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  --shadow-hover: 0 20px 44px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --radius2: 12px;
  --radius-card: 18px;
  --radius-panel: 20px;
  --radius-control: 12px;
  --radius-pill: 999px;
  --content-max-width: 1600px;
  --focus: 0 0 0 4px rgba(124, 92, 255, 0.35);

  /* Spacing tokens */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;

  /* Shared component dimensions */
  --header-height: 80px;
  --brand-logo-size: 42px;
  --brand-logo-gap: var(--space-3);
  --page-header-height: 118px;
  --footer-height: 30px;
  --control-height: 40px;
  --control-height-sm: 34px;
  --control-height-lg: 44px;
  --panel-padding: 1.15rem;
  --card-padding: 1rem;
  --section-padding-y: 1.75rem;
  --cluster-gap: 0.75rem;
  --form-gap: 0.75rem;
  --faq-gap: 0.75rem;
  --faq-item-height: 54px;

  /* Typography tokens */
  --font-size-page-title: clamp(1.7rem, 2.4vw, 2.25rem);
  --font-size-page-description: 1rem;
  --line-height-page-title: 1.18;
  --line-height-page-description: 1.6;
  --font-weight-page-title: 800;
  --letter-spacing-page-title: -0.02em;
  --mono:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  --t-fast: 120ms;
  --t: 220ms;
  --t-slow: 420ms;
  --transition-interactive:
    transform var(--t-fast), background var(--t), border-color var(--t),
    box-shadow var(--t), color var(--t);
  --enterprise-surface-padding: clamp(1rem, 1.45vw, 1.35rem);
  --enterprise-card-padding: clamp(0.85rem, 1.2vw, 1rem);
  --enterprise-section-gap: clamp(0.85rem, 1.2vw, 1.1rem);
  --enterprise-action-gap: 0.55rem;
  --enterprise-radius-surface: 18px;
  --enterprise-radius-card: 12px;
  --enterprise-divider: 1px solid
    color-mix(in srgb, var(--brand2) 14%, var(--border));
}

.review-decision-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.26rem 0.56rem;
  border: 1px solid color-mix(in srgb, var(--brand) 26%, var(--border));
  color: var(--text);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 30px;
  border-radius: var(--radius-pill);
  border-color: color-mix(in srgb, var(--brand2) 20%, var(--border));
  background: color-mix(in srgb, var(--surface-raised) 46%, var(--surface));
  line-height: 1.2;
}

.skip-link:not(:focus),
.honeypot {
  position: absolute;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    transition: none;
    transform: none;
  }
}

@media (max-width: 760px) {
  :root {
    --enterprise-surface-padding: 0.88rem;
    --enterprise-card-padding: 0.78rem;
    --enterprise-section-gap: 0.78rem;
  }
}

@media (max-width: 980px) {
  body {
    padding-top: 150px;
  }
}

@media (max-width: 520px) {
  body {
    padding-top: 210px;
  }
}

/* Persistent read-only context shared by every authenticated page. */
body.view-mode {
  --view-mode-height: 2.5rem;
  padding-block-start: var(--view-mode-height);
}
body.view-mode > .header { top: var(--view-mode-height); }
body.view-mode .app-sidebar { inset-block-start: var(--view-mode-height); }
#viewModeBanner {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 11000;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .75rem;
  box-sizing: border-box;
  height: var(--view-mode-height);
  padding: .25rem .75rem;
  background: var(--app-surface-navigation);
  color: var(--muted);
  border-block-end: 1px solid color-mix(in srgb, var(--brand) 25%, var(--border));
  font-size: .75rem;
}
#viewModeBanner strong {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: inherit;
  font-weight: 600;
}
#viewModeBanner strong::before {
  content: '';
  width: .375rem;
  height: .375rem;
  border-radius: 50%;
  background: var(--brand2);
}
#viewModeBanner button {
  box-sizing: border-box;
  height: 1.75rem;
  min-height: 1.75rem;
  padding: .2rem .6rem;
  border: 1px solid color-mix(in srgb, var(--brand) 32%, var(--border));
  border-radius: .45rem;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--text);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.25;
  box-shadow: none;
  cursor: pointer;
}
#viewModeBanner button::before { display: none; }
#viewModeBanner button:hover {
  background: color-mix(in srgb, var(--brand) 20%, transparent);
}
#viewModeBanner button:focus-visible {
  outline: 2px solid var(--brand2);
  outline-offset: 2px;
}
body.view-mode :disabled { cursor: not-allowed; opacity: .6; }
