:root {
  --bg: #000000;
  --bg-2: #00003e;
  --panel: #00003e;
  --panel-2: #00007c;
  --panel-3: #0000ba;
  --edge: rgba(0, 0, 255, 0.42);
  --text: #ffffff;
  --muted: #ffffff;
  --soft-text: rgba(224, 239, 255, 0.9);
  --blue: #0000f8;
  --logo-blue: #0053fe;
  --blue-2: #0000ba;
  --blue-3: #00007c;
  --ice: #ffffff;
  --warning: #ffffff;
  --danger: #ffffff;
  --success: #ffffff;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.72);
  --font-family: Calibri, Carlito, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-family);
  color: var(--text);
  text-transform: uppercase;
  background:
    radial-gradient(ellipse 38rem 30rem at 8% 14%, rgba(0, 83, 254, 0.48), transparent 72%),
    radial-gradient(ellipse 34rem 42rem at 94% 42%, rgba(0, 83, 254, 0.42), transparent 74%),
    radial-gradient(ellipse 50rem 24rem at 50% 100%, rgba(0, 83, 254, 0.34), transparent 72%),
    radial-gradient(ellipse 58rem 34rem at 50% 38%, rgba(0, 83, 254, 0.2), transparent 75%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at center, black 50%, transparent 100%);
}

body::after {
  content: "";
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0%, rgba(0, 83, 254, 0.1) 4%, transparent 13%, transparent 87%, rgba(0, 83, 254, 0.12) 96%, transparent 100%),
    radial-gradient(ellipse 30rem 2px at 0% 33%, rgba(0, 83, 254, 0.65), transparent 100%),
    radial-gradient(ellipse 30rem 2px at 100% 68%, rgba(0, 83, 254, 0.58), transparent 100%);
  mix-blend-mode: screen;
}

button, input { font: inherit; }
button { cursor: pointer; }

.page-shell {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 18px 60px;
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 28px 10px 14px;
  border: 1px solid rgba(0, 83, 254, 0.72);
  background: rgba(0, 0, 0, 0.78);
  box-shadow: 0 0 30px rgba(0, 83, 254, 0.34), var(--shadow);
}

.brand-block {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
}

.brand-home {
  text-decoration: none;
}

.brand-home:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

.brand-wordmark {
  display: block;
  width: clamp(210px, 26vw, 290px);
  height: auto;
  object-fit: contain;
}
.brand-tag {
  margin-top: 4px;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.main-nav {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(0, 83, 254, 0.72);
  background: rgba(0, 0, 0, 0.95);
  box-shadow: 0 0 30px rgba(0, 83, 254, 0.34), var(--shadow);
}
.main-nav[hidden] { display: none; }

.main-nav a {
  padding: 14px 18px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.main-nav a + a { border-top: 1px solid rgba(0, 83, 254, 0.3); }
.main-nav a.nav-signout { color: #ff9f1a; border-top-color: rgba(255, 140, 0, 0.5); }
.main-nav a.nav-signout:hover { color: #1a0f00; background: #ff9f1a; }
.main-nav a:hover { color: var(--text); background: rgba(0, 83, 254, 0.18); }

.menu-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-greeting {
  color: var(--text);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.user-greeting[hidden] { display: none; }

.profile-link {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 255, 0.72);
  background: linear-gradient(180deg, #0000f8, #00007c);
  box-shadow: 0 0 10px rgba(0, 0, 255, 0.5);
}
.profile-link img { width: 100%; height: 100%; object-fit: contain; display: block; }
.profile-link:hover, .profile-link:focus-visible { box-shadow: 0 0 16px rgba(0, 0, 255, 0.9); outline: none; }

.profile-form { display: grid; gap: 6px; max-width: 420px; margin-top: 20px; }
.profile-avatar { width: 180px; height: 180px; border-radius: 50%; border: 1px solid rgba(0, 83, 254, 0.72); background: linear-gradient(180deg, #0000f8, #00007c); box-shadow: 0 0 18px rgba(0, 0, 255, 0.6); }
.profile-form .text-input[readonly] { opacity: 0.6; }
.profile-link img.has-avatar, .profile-avatar.has-avatar { object-fit: cover; }
.profile-avatar { object-fit: contain; display: block; }
.avatar-row { display: flex; align-items: center; gap: 24px; margin-top: 16px; }
.profile-avatar { margin-top: 0; flex: none; }
.avatar-upload-button { min-height: 32px; padding: 0 20px; }
.profile-form .profile-save { justify-self: start; min-height: 32px; padding: 0 20px; margin-top: 8px; }
.profile-form { margin-bottom: 36px; }
.profile-form .form-status { margin: 0; min-height: 0; }

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 0 9px;
  border: 1px solid rgba(0, 83, 254, 0.72);
  background: transparent;
  cursor: pointer;
}
.menu-toggle span { display: block; height: 2px; background: #fff; }
.menu-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.account-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-actions .ghost-button,
.account-actions .account-create-button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.ghost-button,
.primary-button,
.secondary-button,
.account-create-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--edge);
  background: rgba(0, 0, 62, 0.92);
  color: var(--text);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 0;
}

.account-create-button {
  background: linear-gradient(180deg, #0000f8, #00007c);
  border-color: rgba(0, 0, 255, 0.72);
}

.primary-button {
  position: relative;
  background: linear-gradient(180deg, rgba(0, 0, 248, 0.86), rgba(0, 0, 124, 0.94));
  border-color: rgba(0, 0, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 16px rgba(0, 0, 0, 0.5);
}
.report-save-button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--edge);
  border-radius: 0;
  background: rgba(0, 0, 62, 0.92);
  color: var(--text);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.report-save-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.primary-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.secondary-button { background: rgba(0, 0, 0, 0.88); }

.experience-shell {
  margin-top: 14px;
}

.hero-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
  padding-top: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--soft-text);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow-soft { color: var(--soft-text); }

.hero-copy h1 {
  margin: 0;
  font-family: var(--font-family);
  font-size: clamp(2.6rem, 4vw, 4.3rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 0;
}

.orb-panel {
  width: min(100%, 760px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 14px;
  border: 1px solid rgba(0, 83, 254, 0.76);
  background:
    radial-gradient(ellipse at 50% 50%, rgba(0, 83, 254, 0.24), transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 124, 0.4), rgba(0, 0, 0, 0.86));
  box-shadow: 0 0 42px rgba(0, 83, 254, 0.38), var(--shadow);
}

.magic-ball {
  position: relative;
  width: min(68vw, 310px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: visible;
}

.ball-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.answer-die {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  visibility: visible;
}

.magic-ball.is-shaking {
  animation: shake 3.5s cubic-bezier(0.2, 0.72, 0.25, 1) both;
  will-change: transform;
}

.sparkle {
  position: absolute;
  z-index: 2;
  width: 28px;
  height: 28px;
  opacity: 0;
  color: rgba(255, 225, 151, 0.68);
  filter: drop-shadow(0 0 4px rgba(255, 229, 173, 0.65)) drop-shadow(0 0 10px rgba(35, 105, 255, 0.44));
}

.sparkle::before,
.sparkle::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 7px;
  height: 7px;
  opacity: 0;
  background:
    linear-gradient(90deg, transparent 42%, rgba(255,255,255,0.95) 48% 52%, transparent 58%),
    linear-gradient(transparent 42%, rgba(255,255,255,0.95) 48% 52%, transparent 58%);
  filter: drop-shadow(0 0 3px #fff3cb) drop-shadow(0 0 6px #77bfff);
}

.sparkle::before {
  top: -3px;
  right: 0;
}

.sparkle::after {
  bottom: 0;
  left: -3px;
}

.sparkle svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sparkle path {
  fill: currentColor;
}

.sparkle-outline path {
  fill: none;
  stroke: currentColor;
  stroke-width: 7;
  stroke-linejoin: round;
}

.magic-ball.is-done .sparkle {
  animation:
    starburst-explode 0.65s cubic-bezier(0.12, 0.78, 0.24, 1) both,
    starburst-glitter 1.5s ease-in-out infinite alternate;
  animation-delay:
    var(--burst-delay, 0s),
    calc(var(--burst-delay, 0s) + 0.65s);
}

.magic-ball.is-done .sparkle::before,
.magic-ball.is-done .sparkle::after {
  animation: glitter-flicker 1.1s ease-in-out infinite alternate;
}

.magic-ball.is-done .sparkle::after {
  animation-delay: 0.35s;
}

.sparkle-a { top: 0; left: 4%; width: 31px; height: 31px; }
.sparkle-b { top: -3%; right: 12%; width: 23px; height: 23px; --burst-delay: 0.06s; }
.sparkle-c { top: 39%; left: -5%; width: 27px; height: 27px; --burst-delay: 0.12s; }
.sparkle-d { top: 28%; right: -6%; width: 33px; height: 33px; --burst-delay: 0.18s; }
.sparkle-e { bottom: 10%; left: -2%; width: 22px; height: 22px; --burst-delay: 0.24s; }
.sparkle-f { bottom: 0; right: 4%; width: 29px; height: 29px; --burst-delay: 0.3s; }
.sparkle-g { top: 58%; right: 2%; width: 21px; height: 21px; --burst-delay: 0.36s; }
.sparkle-h { top: 12%; left: 43%; width: 19px; height: 19px; --burst-delay: 0.42s; }

.status-box {
  width: min(100%, 420px);
  padding: 16px 16px 12px;
  border: 1px solid var(--edge);
  background: rgba(0, 0, 62, 0.94);
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.status-label {
  color: var(--soft-text);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-value {
  color: var(--text);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  font-weight: 500;
  text-transform: uppercase;
}

.progress-track {
  height: 12px;
  width: 100%;
  background: repeating-linear-gradient(90deg, rgba(40, 120, 255, 0.14) 0 12px, transparent 12px 18px);
  overflow: visible;
}

.progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(90deg, #7fc4ff 0 12px, transparent 12px 18px);
  filter: drop-shadow(0 0 3px #2f8cff) drop-shadow(0 0 9px rgba(0, 110, 255, 0.95));
  border-radius: 2px;
  transition: width 0.45s ease;
}

.results-panel {
  margin-top: 36px;
  padding: 24px 20px 18px;
  border: 1px solid var(--edge);
  background: rgba(0, 0, 62, 0.96);
  box-shadow: var(--shadow);
}
.hidden { display: none; }

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.result-header h2 {
  margin: 0;
  font-family: var(--font-family);
  font-size: clamp(1.8rem, 2.6vw, 2.5rem);
  text-transform: uppercase;
  letter-spacing: -0.04em;
  font-weight: 500;
  color: var(--soft-text);
}
.capture-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 255, 0.48);
  background: rgba(0, 0, 124, 0.62);
  color: #ffffff;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.kpi-card {
  padding: 18px 16px;
  border: 1px solid rgba(0, 0, 255, 0.22);
  background: rgba(0, 0, 62, 0.88);
}
.kpi-card.accent {
  background: linear-gradient(180deg, rgba(0, 0, 186, 0.72), rgba(0, 0, 62, 0.94));
}
.kpi-label {
  display: block;
  color: var(--soft-text);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.kpi-card strong {
  display: block;
  margin-top: 12px;
  font-family: var(--font-family);
  font-size: clamp(2rem, 3vw, 2.8rem);
  letter-spacing: -0.06em;
  font-weight: 500;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.detail-card {
  padding: 18px 18px 12px;
  border: 1px solid rgba(0, 0, 255, 0.22);
  background: rgba(0, 0, 62, 0.88);
}
.detail-title {
  margin-bottom: 12px;
  font-family: var(--font-family);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--soft-text);
}
.detail-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.detail-card li { display: flex; align-items: center; gap: 10px; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 26px;
  padding: 0 12px;
  border: 1px solid var(--edge);
  border-radius: 0;
  background: rgba(0, 0, 62, 0.92);
  color: #ffffff;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 6px 10px rgba(0, 0, 0, 0.45);
}
.pill.high {
  background: rgba(255, 159, 26, 0.16);
  border-color: rgba(255, 159, 26, 0.7);
  color: #ffcf8a;
  box-shadow: none;
}
.pill.medium {
  background: rgba(106, 174, 255, 0.16);
  border-color: rgba(106, 174, 255, 0.7);
  color: #cfe4ff;
  box-shadow: none;
}
.pill.low {
  background: rgba(0, 0, 255, 0.18);
  border-color: rgba(0, 0, 255, 0.72);
  color: #fff;
  box-shadow: none;
}
.pill.info { background: transparent; box-shadow: none; }

.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
.results-panel { min-width: 0; max-width: 100%; overflow-x: hidden; }
.results-layout > * { min-width: 0; }
.results-main, .plain-sidebar { text-transform: none; }
.results-main .detail-title, .results-main .kpi-label, .plain-sidebar .detail-title, .evidence-label, .ap-table th, .verdict-badge, .pill { text-transform: uppercase; }
.results-main { display: grid; gap: 16px; min-width: 0; }
.results-main .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 10px; }
.results-main .kpi-card { padding: 14px 12px; }
.results-main .kpi-card strong { font-size: clamp(1.5rem, 2.2vw, 2.1rem); }
.results-main .detail-card ul { gap: 8px; }
.results-main .detail-card li { display: list-item; list-style: disc; margin-left: 18px; }
.finding {
  padding: 12px 0;
  border-top: 1px solid rgba(0, 0, 255, 0.22);
  display: grid;
  gap: 8px;
}
.finding:first-child { border-top: 0; padding-top: 0; }
.finding-head, .plain-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.finding-summary { margin: 0; color: var(--muted); line-height: 1.5; }
.finding-details { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.85rem; }
.evidence { display: grid; gap: 6px; padding: 10px; background: rgba(0, 0, 0, 0.45); }
.evidence-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.evidence-label { color: var(--soft-text); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; }
.evidence code { font-family: Consolas, monospace; font-size: 0.8rem; color: #cfe0ff; overflow-wrap: anywhere; }
.copy-filter {
  margin-left: auto;
  padding: 3px 8px;
  border: 1px solid var(--edge);
  background: rgba(0, 0, 62, 0.92);
  color: var(--text);
  font-size: 0.7rem;
  cursor: pointer;
}
.empty-note, .plain-note { color: var(--muted); font-size: 0.85rem; line-height: 1.5; margin: 8px 0; }
.table-wrap { overflow-x: auto; }
.ap-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; color: var(--muted); }
.ap-table th, .ap-table td { padding: 6px 10px; text-align: left; white-space: nowrap; border-bottom: 1px solid rgba(0, 0, 255, 0.18); }
.ap-table th { color: var(--soft-text); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; }
.ap-table .suspicious-row td { color: #ffcf8a; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { padding: 5px 10px; border: 1px solid rgba(0, 0, 255, 0.32); background: rgba(0, 0, 124, 0.45); font-size: 0.75rem; letter-spacing: 0.04em; color: #fff; }
.chart-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 8px; }
.chart-card { padding: 14px; background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(0, 0, 255, 0.18); display: grid; gap: 12px; align-content: start; }
.chart-title { font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft-text); }
.chart-note { grid-column: 1 / -1; margin: 0; }
.bar-chart { display: grid; gap: 8px; }
.outlook-line { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: 1rem; }
.outlook-line.hidden { display: none; }
.outlook-tri { width: 14px; height: 13px; fill: #2f6bff; filter: drop-shadow(0 0 4px rgba(47, 107, 255, 0.8)); }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr minmax(80px, 110px); gap: 12px; align-items: center; font-size: 0.82rem; }
.bar-name { overflow-wrap: anywhere; }
.bar { display: block; height: 14px; background: rgba(0, 0, 0, 0.55); }
.bar-fill { display: block; height: 100%; }
.bar-count { text-align: right; color: var(--soft-text); font-size: 0.76rem; white-space: nowrap; }
.finding-count { margin-left: auto; font-size: 0.72rem; color: var(--soft-text); letter-spacing: 0.06em; }
.finding-summary { font-size: 0.88rem; }
.finding-more summary, .plain-card > summary { cursor: pointer; list-style: none; }
.finding-more summary { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft-text); }
.finding-more summary::before { content: '\25B8'; margin-right: 6px; }
.finding-more[open] summary::before { content: '\25BE'; }
.finding-more > * { margin-top: 8px; }
.plain-card > summary::-webkit-details-marker, .finding-more > summary::-webkit-details-marker { display: none; }
.plain-card[open] > summary { margin-bottom: 8px; }
.sec-chip { display: inline-block; padding: 2px 8px; font-size: 0.68rem; letter-spacing: 0.06em; border: 1px solid rgba(0, 0, 255, 0.4); background: rgba(0, 0, 124, 0.45); color: #fff; }
.sec-chip.sec-weak { border-color: rgba(255, 190, 90, 0.85); background: rgba(255, 159, 26, 0.18); color: #ffcf8a; }
.sigbar { display: inline-block; width: 44px; height: 6px; margin-right: 4px; vertical-align: middle; background: rgba(0, 0, 0, 0.55); }
.sigbar i { display: block; height: 100%; background: #2f5bff; }
.plain-sidebar {
  position: sticky;
  top: 16px;
  padding: 18px;
  border: 1px solid rgba(0, 0, 255, 0.22);
  background: rgba(0, 0, 62, 0.88);
  display: grid;
  gap: 12px;
}
.plain-sidebar .detail-title { margin-bottom: 0; }
.verdict-badge { display: inline-flex; align-items: center; min-height: 28px; padding: 0 14px; border: 1px solid var(--edge); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 6px 10px rgba(0, 0, 0, 0.45); }
.verdict-ok { background: linear-gradient(180deg, #2fd08f, #11805a); border-color: rgba(120, 240, 190, 0.8); color: #00170d; }
.verdict-review { background: rgba(0, 0, 255, 0.18); border-color: rgba(0, 0, 255, 0.72); color: #fff; box-shadow: none; }
.verdict-attention { background: rgba(255, 159, 26, 0.16); border-color: rgba(255, 159, 26, 0.7); color: #ffcf8a; box-shadow: none; }
.plain-verdict-text { margin: 8px 0 0; line-height: 1.5; color: var(--text); }
.plain-card { padding: 10px; background: rgba(0, 0, 0, 0.4); display: grid; gap: 6px; }
.plain-line { margin: 0; font-size: 0.85rem; line-height: 1.5; color: var(--muted); }
.plain-label { color: var(--text); font-weight: 600; }
.glossary summary { cursor: pointer; color: var(--soft-text); }
.glossary dt { margin-top: 8px; font-weight: 600; color: var(--text); }
.glossary dd { margin: 2px 0 0; color: var(--muted); font-size: 0.85rem; }
@media (max-width: 960px) {
  .results-layout { grid-template-columns: 1fr; }
  .plain-sidebar { position: static; }
}
@media (max-width: 560px) {
  .bar-row { grid-template-columns: 90px 1fr; }
  .bar-count { grid-column: 2; text-align: left; }
}

.workflow-section, .insight-section, .about-section { margin-top: 52px; }
.section-header { margin-bottom: 18px; }
.section-header h1, .section-header h2 {
  margin: 0;
  font-family: var(--font-family);
  font-size: clamp(1.9rem, 2.8vw, 2.8rem);
  text-transform: uppercase;
  letter-spacing: -0.04em;
  font-weight: 500;
  color: var(--soft-text);
}
.workflow-grid, .insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.workflow-card, .insight-card {
  padding: 18px 18px 16px;
  border: 1px solid var(--edge);
  background: rgba(0, 0, 62, 0.92);
}
.workflow-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border: 1px solid rgba(0, 0, 255, 0.48);
  background: rgba(0, 0, 124, 0.55);
  color: #ffffff;
  font-family: var(--font-family);
  font-size: 0.76rem;
}
.workflow-card h3, .insight-card h3 {
  margin: 0 0 10px;
  font-size: 1.16rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
  color: var(--soft-text);
}
.workflow-card p, .insight-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(0, 83, 254, 0.58);
  background: linear-gradient(180deg, rgba(0, 0, 62, 0.55), rgba(0, 0, 0, 0.9));
  box-shadow: 0 -14px 34px rgba(0, 83, 254, 0.12);
}

.mission-statement {
  margin: 0;
  max-width: 76ch;
  color: var(--soft-text);
  font-size: 1.05rem;
  line-height: 1.55;
  font-weight: 400;
}

.about-page-main {
  display: flex;
  min-height: 58vh;
  align-items: center;
  justify-content: center;
}

.about-page-panel {
  width: min(100%, 820px);
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--edge);
  background: rgba(0, 0, 62, 0.92);
  box-shadow: 0 0 42px rgba(0, 83, 254, 0.24), var(--shadow);
}

.about-page-panel .mission-statement {
  max-width: 76ch;
}

.about-page-panel .mission-statement + .mission-statement,
.creators-section .mission-statement {
  margin-top: 16px;
}

.creators-section .creators-list {
  margin: 18px 0;
}

.creators-section {
  margin-top: 38px;
}

.creators-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.creators-list li {
  padding: 8px 0;
  color: var(--soft-text);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.account-identity {
  max-width: 170px;
  overflow: hidden;
  color: var(--soft-text);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-dialog {
  width: min(92vw, 520px);
  max-height: 90vh;
  padding: 28px;
  border: 1px solid rgba(0, 83, 254, 0.8);
  background: #00003e;
  color: var(--text);
  box-shadow: 0 0 42px rgba(0, 83, 254, 0.35), var(--shadow);
}

.site-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
}

.site-dialog h2 {
  margin: 0 0 12px;
  color: var(--soft-text);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.dialog-close-row {
  display: flex;
  justify-content: flex-end;
}

.dialog-close {
  width: 30px;
  height: 30px;
  border: 1px solid var(--edge);
  background: transparent;
  color: var(--soft-text);
  font-size: 1.2rem;
}

.dialog-copy {
  margin: 0 0 20px;
  color: var(--soft-text);
  line-height: 1.55;
}

#authDialog {
  padding: 16px 24px 18px;
}

#authDialog .dialog-close {
  width: 26px;
  height: 26px;
}

#authDialog h2 {
  margin: 0 0 10px;
  font-size: 1.3rem;
}

#authDialog .auth-form,
#authDialog .auth-name-fields,
#authDialog #authConfirmField {
  gap: 4px;
}

#authDialog .auth-form {
  gap: 8px;
}

#authDialog .text-input {
  min-height: 34px;
  padding: 5px 10px;
}

#authDialog .form-status:empty {
  display: none;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-name-fields,
#authConfirmField {
  display: grid;
  gap: 10px;
}

.auth-name-fields[hidden],
#authConfirmField[hidden] {
  display: none;
}

.auth-form .text-input {
  width: 100%;
  box-sizing: border-box;
}

.form-label {
  color: var(--soft-text);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.text-input {
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--edge);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.72);
  color: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.form-status {
  min-height: 1.2em;
  margin: 8px 0;
  color: var(--soft-text);
  font-size: 0.82rem;
  line-height: 1.45;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.auth-form .account-create-button {
  width: 100%;
}

.text-button {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--soft-text);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button:hover { color: #ffffff; }
.danger-text { color: #ffb7b7; }
button:disabled { cursor: wait; opacity: 0.55; }

.reports-page {
  min-height: 58vh;
}

.reports-heading h1 {
  margin: 0;
  color: var(--soft-text);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 500;
}

.reports-intro {
  margin: 10px 0 0;
  color: var(--soft-text);
  line-height: 1.5;
}

.panel-card {
  border: 1px solid var(--edge);
  background: rgba(0, 0, 62, 0.92);
  box-shadow: var(--shadow);
}

.reports-gate {
  padding: clamp(22px, 4vw, 36px);
}

.reports-gate h2,
.reports-panel-heading h2 {
  margin: 0;
  color: var(--soft-text);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.reports-gate h2 {
  margin-bottom: 28px;
}

.reports-gate p {
  color: var(--soft-text);
  line-height: 1.55;
}

.reports-layout.hidden { display: none; }

.reports-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(0, 2fr);
  gap: 18px;
  align-items: start;
}

.folder-panel,
.report-panel {
  min-width: 0;
  padding: 18px;
}

.reports-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.folder-list,
.report-list {
  display: grid;
  gap: 10px;
}

.folder-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 5px 7px;
  border-bottom: 1px solid rgba(0, 83, 254, 0.2);
}

.folder-item.is-active {
  border-left: 2px solid var(--logo-blue);
  background: rgba(0, 83, 254, 0.12);
}

.folder-select {
  flex: 1;
  min-width: 0;
  padding: 7px 4px;
  border: 0;
  background: transparent;
  color: var(--soft-text);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-align: left;
  overflow-wrap: anywhere;
}

.icon-text-button {
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: var(--soft-text);
  font-size: 0.57rem;
  letter-spacing: 0.05em;
}

.icon-text-button:hover { color: #ffffff; text-decoration: underline; }

.report-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(0, 83, 254, 0.24);
}

.report-info { min-width: 0; }

.report-info h3 {
  margin: 0 0 6px;
  color: var(--soft-text);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  overflow-wrap: anywhere;
}

.report-info p {
  margin: 0;
  color: rgba(224, 239, 255, 0.72);
  font-size: 0.7rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.report-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.report-actions .ghost-button,
.report-actions .report-open {
  min-height: 32px;
  padding: 0 9px;
  font-size: 0.58rem;
  letter-spacing: 0.07em;
  text-decoration: none;
}

.report-folder-select {
  min-height: 32px;
  max-width: 120px;
  padding: 4px;
  font-size: 0.58rem;
}

.report-actions .danger-text {
  font-size: 0.58rem;
}

.reports-empty {
  color: var(--soft-text);
  font-size: 0.82rem;
  line-height: 1.55;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-top: 1px solid rgba(0, 83, 254, 0.3);
  color: rgba(224, 239, 255, 0.76);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.footer-contact {
  color: var(--soft-text);
  text-decoration: none;
}

.footer-contact:hover,
.footer-contact:focus-visible {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@keyframes shake {
  0%, 100% { transform: perspective(700px) translate3d(0, 0, 0) rotate(0) rotateX(0) rotateY(0); }
  8% { transform: perspective(700px) translate3d(-11px, 6px, 0) rotate(-7.5deg) rotateX(3deg) rotateY(-4.5deg); }
  16% { transform: perspective(700px) translate3d(9px, -8px, 0) rotate(8deg) rotateX(-4.5deg) rotateY(6deg); }
  25% { transform: perspective(700px) translate3d(-13px, 5px, 0) rotate(-9deg) rotateX(4.5deg) rotateY(-6deg); }
  34% { transform: perspective(700px) translate3d(9px, -5px, 0) rotate(7deg) rotateX(-3deg) rotateY(4.5deg); }
  43% { transform: perspective(700px) translate3d(-6px, 4px, 0) rotate(-5.5deg) rotateX(3deg) rotateY(-4deg); }
  51% { transform: perspective(700px) translate3d(5px, -3px, 0) rotate(4deg) rotateX(-2.5deg) rotateY(3deg); }
  60% { transform: perspective(700px) translate3d(-3px, 2px, 0) rotate(-2.8deg) rotateX(1.5deg) rotateY(-2deg); }
  70% { transform: perspective(700px) translate3d(3px, -2px, 0) rotate(2deg) rotateX(-1deg) rotateY(1.2deg); }
  82% { transform: perspective(700px) translate3d(-1.5px, 1.5px, 0) rotate(-1deg) rotateX(0.6deg) rotateY(-0.7deg); }
  92% { transform: perspective(700px) translate3d(0.7px, -0.5px, 0) rotate(0.3deg) rotateX(-0.2deg) rotateY(0.2deg); }
}

@keyframes starburst-explode {
  0% { transform: scale(0.08) rotate(-36deg); opacity: 0; }
  42% { transform: scale(1.16) rotate(12deg); opacity: 0.82; }
  100% { transform: scale(1) rotate(0deg); opacity: 0.58; }
}

@keyframes starburst-glitter {
  0% { opacity: 0.3; filter: drop-shadow(0 0 2px rgba(255, 229, 173, 0.45)) drop-shadow(0 0 6px rgba(35, 105, 255, 0.32)); }
  100% { opacity: 0.72; filter: drop-shadow(0 0 5px rgba(255, 239, 200, 0.8)) drop-shadow(0 0 12px rgba(80, 161, 255, 0.65)); }
}

@keyframes glitter-flicker {
  0% { transform: scale(0.45); opacity: 0.1; }
  100% { transform: scale(1.25); opacity: 0.9; }
}

@media (max-width: 980px) {
  .topbar { flex-wrap: wrap; justify-content: center; }
  .hero-section { display: flex; flex-direction: column; }
  .kpi-grid, .detail-grid, .workflow-grid, .insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-actions { justify-content: center; }
}

@media (max-width: 640px) {
  .page-shell { padding-left: 14px; padding-right: 14px; }
  .account-actions { width: 100%; }
  .cta-row { flex-direction: column; }
  .primary-button, .secondary-button, .report-save-button, .ghost-button, .account-create-button { width: 100%; }
  .kpi-grid, .detail-grid, .workflow-grid, .insight-grid { grid-template-columns: 1fr; }
  .status-row, .result-header { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; }
  .creators-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reports-layout { grid-template-columns: 1fr; }
  .report-row { grid-template-columns: 1fr; }
  .report-actions { justify-content: flex-start; }
  .site-dialog { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .magic-ball.is-shaking { animation: none; }
  .magic-ball.is-done .sparkle { animation-duration: 0.15s; }
}
