:root {
  --bg: #f6f8fb;
  --ink: #1b2733;
  --muted: #5b6c7d;
  --line: #d9e1ea;
  --card: #ffffff;
  --brand: #1098d6;
  --brand-dark: #0a75aa;
  --nav-h: 72px;
  --ok-bg: #ddf8e9;
  --ok-text: #0f5e35;
  --err-bg: #ffe3e5;
  --err-text: #8b1f2f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Sora", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

body.no-bg .bg-light {
  display: none;
}

body.no-top-bg .bg-a {
  display: none;
}

.bg-light {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.14;
  z-index: -2;
}

.bg-a {
  width: 420px;
  height: 420px;
  background: #7fe9ff;
  top: -120px;
  left: -80px;
}

.bg-b {
  width: 390px;
  height: 390px;
  background: #9ad7ff;
  right: -120px;
  bottom: -120px;
}

.content {
  width: min(1150px, 92vw);
  margin: 0 auto;
}

.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e4eaf1;
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.nav-wrap.scrolled {
  background: #ffffffeb;
  box-shadow: 0 4px 14px rgba(16, 30, 45, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-h);
  gap: 20px;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
}

.brand img {
  width: auto;
  height: 56px;
  object-fit: contain;
}

nav {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(11, 58, 88, 0.18);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(12, 66, 98, 0.12);
}

.nav-toggle-lines {
  position: relative;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-wrap.nav-open .nav-toggle-lines {
  background: transparent;
  box-shadow: none;
}

.nav-wrap.nav-open .nav-toggle-lines::before,
.nav-wrap.nav-open .nav-toggle-lines::after {
  opacity: 1;
}

.nav-wrap.nav-open .nav-toggle-lines::before {
  transform: rotate(45deg);
}

.nav-wrap.nav-open .nav-toggle-lines::after {
  transform: rotate(-45deg);
}

.nav-btn {
  background: var(--brand);
  padding: 9px 14px;
  border-radius: 999px;
  color: #fff;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 64px;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
}

.hero-video-wrap {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.92;
  transform: translateY(0);
  transition: opacity 0.2s linear, transform 0.2s linear;
  pointer-events: none;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(243, 249, 255, 0.35) 0%, rgba(243, 249, 255, 0.78) 80%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 38%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  max-width: 760px;
}

.eyebrow {
  margin: 0;
  color: var(--brand-dark);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}

h1 {
  margin: 12px 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.04;
}

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

.lead {
  margin: 0;
  color: var(--muted);
  max-width: 64ch;
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-graphics {
  margin-top: 18px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-graphic-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  border: 1px solid rgba(183, 223, 242, 0.95);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  padding: 10px 8px;
  box-shadow: 0 8px 20px rgba(10, 56, 86, 0.08);
}

.hero-graphic-card svg {
  width: 24px;
  height: 24px;
  fill: #0b5d88;
}

.hero-graphic-card span {
  font-size: 0.8rem;
  font-weight: 700;
  color: #27506a;
}

.hero-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-card,
.section-card,
.tech-card,
.card,
.login-shell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(20, 32, 44, 0.06);
}

.hero-card {
  padding: 22px;
}

.hero-card h2,
.section h2,
.dash-grid h2,
.login-shell h1 {
  margin: 0 0 10px;
}

.hero-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.section {
  padding: 20px 0;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.section-card {
  padding: 24px;
}

.section-card ul {
  margin: 14px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.duo-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}

.compact-card {
  padding: 20px;
}

.quick-grid {
  margin-top: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quick-grid.is-tight {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  box-shadow: none;
  display: grid;
  gap: 6px;
}

.quick-item strong {
  font-size: 0.95rem;
}

.quick-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.feature-grid {
  margin-top: 14px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: #fff;
  box-shadow: none;
}

.process-visual {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.process-step {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(240, 250, 255, 0.92));
  padding: 14px;
  box-shadow: 0 8px 18px rgba(12, 66, 98, 0.08);
}

.process-step h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.process-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.process-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border: 1px solid rgba(0, 125, 183, 0.2);
  background: linear-gradient(145deg, rgba(0, 192, 243, 0.2), rgba(0, 125, 183, 0.12));
  color: #0b587f;
}

.process-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.signal-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.signal-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.signal-title {
  margin: 0;
  font-weight: 800;
  color: #184b69;
}

.signal-meter {
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  background: #e5eef6;
  overflow: hidden;
}

.signal-meter span {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #11a2df, #0b79af);
}

.signal-note {
  margin: 8px 0 0;
  color: #486477;
  font-size: 0.85rem;
}

.logo-wall {
  margin-top: 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.logo-chip {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f4fbff 100%);
  padding: 12px;
  text-align: center;
}

.logo-chip img {
  width: auto;
  height: 34px;
  object-fit: contain;
}

.logo-chip h3 {
  margin: 0;
  font-size: 0.92rem;
}

.logo-chip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.question-cloud {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.question-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #c5dff0;
  border-radius: 999px;
  background: #f7fcff;
  padding: 8px 12px;
  color: #0d3854;
  font-size: 0.9rem;
  line-height: 1.4;
}

.mini-grid,
.tech-grid {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-grid article {
  background: #f8fcff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.why-section {
  padding-top: 8px;
}

.why-band {
  position: relative;
  overflow: hidden;
  border: 1px solid #b7dff2;
  border-radius: 26px;
  background:
    radial-gradient(circle at 10% 10%, rgba(0, 192, 243, 0.18), transparent 46%),
    radial-gradient(circle at 86% 22%, rgba(0, 125, 183, 0.14), transparent 44%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(233, 247, 255, 0.92));
  box-shadow: 0 16px 38px rgba(10, 56, 86, 0.12);
  padding: 26px;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 18px;
  align-items: start;
}

.why-band::after {
  content: "";
  position: absolute;
  inset: -60px;
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.18), transparent 55%),
    repeating-linear-gradient(
      135deg,
      rgba(0, 125, 183, 0.08) 0px,
      rgba(0, 125, 183, 0.08) 1px,
      transparent 1px,
      transparent 16px
    );
  opacity: 0.22;
  pointer-events: none;
  transform: rotate(-6deg);
}

.why-copy {
  position: relative;
  z-index: 1;
}

.why-copy h2 {
  margin: 10px 0 12px;
  max-width: 30ch;
}

.why-copy p {
  line-height: 1.5;
  max-width: 62ch;
}

.why-pills {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(0, 125, 183, 0.24);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 22px rgba(10, 56, 86, 0.08);
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 800;
  color: #0b3a58;
}

.why-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.why-card {
  background: rgba(248, 252, 255, 0.92);
  border: 1px solid rgba(207, 225, 239, 0.95);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 14px 28px rgba(12, 66, 98, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.why-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 125, 183, 0.36);
  box-shadow: 0 18px 36px rgba(12, 66, 98, 0.16);
}

.why-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 192, 243, 0.22), rgba(0, 125, 183, 0.14));
  border: 1px solid rgba(0, 125, 183, 0.2);
  color: #0a4f74;
  margin-bottom: 10px;
}

.why-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.why-card h3 {
  margin: 0 0 8px;
}

.why-card p {
  margin: 0;
  color: var(--muted);
}

.mini-grid h3,
.tech-card h3 {
  margin: 0 0 8px;
}

.mini-grid p,
.tech-card p,
.section p,
.card p,
.login-lead {
  margin: 0;
  color: var(--muted);
}

.tech-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tech-card {
  padding: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tech-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(12, 66, 98, 0.16);
}

.tech-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tech-head img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #dbe8f2;
  border-radius: 10px;
  padding: 6px;
}

.tech-card a {
  display: inline-block;
  margin-top: 10px;
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 700;
}

.form-grid {
  margin-top: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.full {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid #bdd4e6;
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 3px rgba(0, 125, 183, 0.15);
}

.btn {
  border: 0;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  color: #fff;
  font: inherit;
  font-weight: 700;
  background: var(--brand);
}

.btn-ghost {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid #c7d6e2;
}

.footer {
  padding: 30px 0;
  border-top: 1px solid var(--line);
  margin-top: 30px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.footer p {
  margin: 0;
  color: var(--muted);
}

.footer a {
  margin-left: 14px;
  text-decoration: none;
  color: var(--ink);
}

.cta-section {
  padding-top: 8px;
}

.cta-band {
  border: 1px solid #9ed9f3;
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 20%, rgba(0, 192, 243, 0.16), transparent 38%),
    linear-gradient(120deg, #f8fdff 0%, #e9f7ff 100%);
  padding: 30px 28px;
  box-shadow: 0 14px 30px rgba(13, 80, 117, 0.12);
}

.cta-band h2 {
  margin: 10px 0 18px;
  max-width: 24ch;
}

.cta-btn {
  margin-top: 14px;
  min-width: 210px;
  border-radius: 999px;
  font-size: 1.03rem;
  padding: 14px 22px;
  box-shadow: 0 10px 20px rgba(0, 133, 194, 0.24);
}

.flash-stack {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.flash {
  margin: 0;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 0.92rem;
}

.flash-success {
  background: var(--ok-bg);
  border-color: #9ed9b8;
  color: var(--ok-text);
}

.flash-error {
  background: var(--err-bg);
  border-color: #ffc2ca;
  color: var(--err-text);
}

.flash-warning {
  background: #fff6db;
  border-color: #f7d98a;
  color: #6b4b00;
}

.dash-wrap {
  width: min(1240px, 94vw);
  margin: 34px auto;
}

.login-wrap {
  width: min(560px, 92vw);
  margin: 52px auto;
  min-height: auto;
}

.legal-wrap {
  width: min(900px, 92vw);
  margin: 46px auto;
}

.legal-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 35px rgba(16, 56, 83, 0.08);
  padding: 24px;
}

.legal-card ul {
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--ink);
  display: grid;
  gap: 8px;
}

.legal-actions {
  margin: 10px 0 18px;
}

.back-btn {
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
}

.login-shell {
  padding: 28px;
  width: 100%;
  display: grid;
  gap: 10px;
}

.login-shell-clean h1 {
  margin: 0;
  font-size: 1.45rem;
}

.login-brand {
  margin-bottom: 2px;
}

.login-brand img {
  height: 64px;
}

.login-lead {
  margin-bottom: 8px;
}

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

.login-links {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.login-links a {
  text-decoration: none;
  color: var(--brand-dark);
  font-weight: 700;
}

.dash-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dash-top-compact {
  min-height: 54px;
}

.dash-brand img {
  height: 44px;
}

.dash-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.role {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.86rem;
}

.dash-grid {
  margin-top: 16px;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}

.card {
  padding: 20px;
}

.dash-menu {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  flex-wrap: wrap;
}

.dash-menu-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 700;
  color: #35556f;
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.dash-menu-link:hover {
  background: #f2f7fb;
  border-color: #d5e3ee;
}

.dash-menu-link.is-active {
  color: var(--brand-dark);
  background: #eaf5fb;
  border-color: #bfd9ea;
  box-shadow: none;
}

.dash-welcome {
  margin-top: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  border: 1px solid #cfe2ef;
  background:
    radial-gradient(circle at 10% 10%, rgba(0, 192, 243, 0.1), transparent 36%),
    linear-gradient(130deg, #ffffff 0%, #f4fbff 100%);
}

.dash-welcome h2 {
  margin: 6px 0 8px;
  font-size: 1.28rem;
}

.dash-welcome-main {
  display: grid;
  gap: 10px;
  align-content: start;
}

.dash-kpi-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dash-kpi-card {
  border: 1px solid #d8e7f1;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
}

.dash-kpi-label {
  margin: 0;
  color: #46657a;
  font-size: 0.84rem;
}

.dash-kpi-value {
  margin: 4px 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0a628f;
}

.dash-entry-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dash-entry-card {
  display: grid;
  gap: 6px;
  border: 1px solid #d6e7f2;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
  text-decoration: none;
  color: #22465d;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dash-entry-card strong {
  font-size: 0.94rem;
}

.dash-entry-card span {
  color: #4f697a;
  font-size: 0.85rem;
  line-height: 1.35;
}

.dash-entry-card:hover {
  transform: translateY(-2px);
  border-color: #b9d8ea;
  box-shadow: 0 10px 22px rgba(12, 66, 98, 0.12);
}

.dash-analytics-grid {
  margin-top: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.dash-analytics-card {
  border: 1px solid #d4e5f1;
  background: #fff;
}

.dash-analytics-head h3 {
  margin: 0;
}

.dash-analytics-head p {
  margin-top: 6px;
}

.dash-risk-heatmap {
  margin-top: 10px;
}

.dash-bars + .dash-bars {
  margin-top: 14px;
}

.dash-bars h4 {
  margin: 0 0 10px;
  font-size: 0.92rem;
}

.dash-bar-row + .dash-bar-row {
  margin-top: 8px;
}

.dash-bar-label {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 0.84rem;
  color: #35566d;
}

.dash-bar-track {
  height: 10px;
  border-radius: 999px;
  background: #e6eef5;
  overflow: hidden;
}

.dash-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.dash-bar-track span.is-green {
  background: linear-gradient(90deg, #6bc08d, #3aa86a);
}

.dash-bar-track span.is-yellow {
  background: linear-gradient(90deg, #f0cf73, #d3a73a);
}

.dash-bar-track span.is-orange {
  background: linear-gradient(90deg, #f2b37a, #e0872d);
}

.dash-bar-track span.is-red {
  background: linear-gradient(90deg, #ef9a9a, #cf5a5a);
}

.dash-bar-track span.is-gray {
  background: linear-gradient(90deg, #c7d0db, #98a5b3);
}

.soa-card,
.cert-card {
  margin-top: 16px;
}

.soa-split {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr);
  gap: 14px;
  align-items: start;
}

.soa-split .soa-card,
.soa-split .soa-chat-card {
  margin-top: 0;
}

.soa-form {
  display: grid;
  gap: 14px;
}

.soa-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.soa-table-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
  background: #fff;
}

.soa-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

.soa-table td textarea.soa-justification {
  width: min(64ch, 100%);
  min-height: 72px;
  border: 1px solid #bdd4e6;
  border-radius: 12px;
  padding: 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  resize: vertical;
}

.soa-table td textarea.soa-justification:focus {
  outline: none;
  border-color: #7fbfe3;
  box-shadow: 0 0 0 4px rgba(0, 192, 243, 0.14);
}

.soa-table th,
.soa-table td {
  border-bottom: 1px solid #e3edf5;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.soa-table th {
  background: #f3f9ff;
  font-size: 0.9rem;
}

.message-pre {
  white-space: pre-wrap;
}

select {
  width: 100%;
  border: 1px solid #bdd4e6;
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

.status-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.soa-chat-card {
  position: sticky;
  top: calc(var(--nav-h) + 14px);
  padding: 16px;
  display: grid;
  gap: 12px;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 192, 243, 0.08) 0%, transparent 40%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(235, 248, 255, 0.9));
  border: 1px solid rgba(207, 225, 239, 0.95);
}

.soa-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.soa-chat-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.soa-chat-toggle {
  padding: 8px 12px;
  border-radius: 999px;
}

.soa-chat-title {
  margin: 0;
  font-size: 1.05rem;
}

.soa-chat-sub {
  margin: 6px 0 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

.soa-chat-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.soa-chat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(12, 66, 98, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: #12344d;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.soa-chat-badge.is-soft {
  border-color: rgba(0, 125, 183, 0.22);
  background: rgba(232, 245, 255, 0.85);
  color: var(--brand-dark);
}

.soa-chat-log {
  height: min(52vh, 520px);
  overflow: auto;
  border: 1px solid rgba(189, 212, 230, 0.8);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  gap: 10px;
  min-height: 0;
}

.soa-chat-msg {
  width: fit-content;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(12, 66, 98, 0.12);
  line-height: 1.4;
  font-size: 0.92rem;
  box-shadow: 0 10px 20px rgba(12, 66, 98, 0.08);
}

.soa-chat-msg :where(.md-p) {
  margin: 0.4em 0;
}

.soa-chat-msg :where(.md-p:first-child) {
  margin-top: 0;
}

.soa-chat-msg :where(.md-p:last-child) {
  margin-bottom: 0;
}

.soa-chat-msg :where(.md-h) {
  margin: 0.55em 0 0.35em;
  line-height: 1.2;
}

.soa-chat-msg :where(.md-h:first-child) {
  margin-top: 0;
}

.soa-chat-msg :where(.md-h1) {
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.soa-chat-msg :where(.md-h2) {
  font-size: 0.98rem;
}

.soa-chat-msg :where(.md-h3) {
  font-size: 0.94rem;
}

.soa-chat-msg :where(.md-h4) {
  font-size: 0.92rem;
  opacity: 0.92;
}

.soa-chat-msg :where(.md-ul, .md-ol) {
  margin: 0.35em 0 0.35em 1.15em;
  padding: 0;
}

.soa-chat-msg :where(.md-ul li, .md-ol li) {
  margin: 0.15em 0;
}

.soa-chat-msg :where(.md-pre) {
  margin: 0.45em 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(12, 66, 98, 0.14);
  background: rgba(7, 52, 82, 0.04);
  overflow: auto;
  white-space: pre;
  font-size: 0.86em;
}

.soa-chat-msg :where(.md-pre code) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.soa-chat-msg.is-typing {
  font-style: italic;
  opacity: 0.86;
}

.soa-chat-msg.is-typing .typing-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.soa-chat-msg.is-typing .typing-dots .dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.22;
  animation: typingDot 1s infinite ease-in-out;
}

.soa-chat-msg.is-typing .typing-dots .dot:nth-child(2) {
  animation-delay: 0.15s;
}

.soa-chat-msg.is-typing .typing-dots .dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typingDot {
  0%,
  70%,
  100% {
    opacity: 0.22;
    transform: translate3d(0, 0, 0);
  }
  35% {
    opacity: 0.85;
    transform: translate3d(0, -2px, 0);
  }
}

.soa-chat-msg.is-user {
  justify-self: end;
  background: linear-gradient(140deg, rgba(0, 192, 243, 0.12), rgba(0, 125, 183, 0.06));
  border-color: rgba(0, 125, 183, 0.22);
}

.soa-chat-msg.is-assistant {
  justify-self: start;
  background: #ffffff;
}

.soa-chat-msg.is-error {
  justify-self: start;
  background: rgba(255, 227, 229, 0.7);
  border-color: rgba(139, 31, 47, 0.22);
  color: var(--err-text);
}

.soa-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.soa-chat-input {
  width: 100%;
  border: 1px solid #bdd4e6;
  border-radius: 14px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  /* Autogrow handles sizing; keep the panel layout stable on small screens. */
  resize: none;
  min-height: 54px;
  max-height: 160px;
  overflow: auto;
}

.soa-chat-input:focus {
  outline: none;
  border-color: #7fbfe3;
  box-shadow: 0 0 0 4px rgba(0, 192, 243, 0.14);
}

.soa-chat-send {
  padding: 10px 12px;
  min-height: 46px;
  font-size: 0.92rem;
  white-space: nowrap;
}

.soa-chat-foot {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.35;
}

.fly-chat-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 45;
  border-radius: 999px;
  padding: 12px 14px;
  box-shadow: 0 16px 32px rgba(7, 52, 82, 0.22);
}

.public-chat-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 41;
  border-radius: 999px;
  padding: 12px 14px;
  box-shadow: 0 16px 32px rgba(7, 52, 82, 0.22);
}

.public-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  width: min(460px, calc(100vw - 28px));
  max-height: calc(100vh - 140px);
  z-index: 40;
  padding: 14px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 192, 243, 0.1) 0%, transparent 46%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(235, 248, 255, 0.9));
  border: 1px solid rgba(207, 225, 239, 0.95);
  box-shadow: 0 24px 46px rgba(7, 52, 82, 0.22);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translate3d(0, 12px, 0) scale(0.98);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  overflow: hidden;
}

.public-chat-panel.is-open {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

.public-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.public-chat-title {
  margin: 0;
  font-size: 1rem;
}

.public-chat-sub {
  margin: 6px 0 0;
  font-size: 0.88rem;
}

.public-chat-log {
  height: auto;
  min-height: 0;
}

.fly-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100vh - 140px);
  z-index: 44;
  padding: 14px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 192, 243, 0.1) 0%, transparent 46%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(235, 248, 255, 0.9));
  border: 1px solid rgba(207, 225, 239, 0.95);
  box-shadow: 0 24px 46px rgba(7, 52, 82, 0.22);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translate3d(0, 12px, 0) scale(0.98);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  overflow: hidden;
}

.fly-chat-panel.is-open {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

.fly-chat-panel.is-fullscreen {
  right: 12px;
  left: 12px;
  top: 12px;
  bottom: 12px;
  width: auto;
  max-height: none;
  border-radius: 16px;
}

.fly-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.fly-chat-title {
  margin: 0;
  font-size: 1.05rem;
}

.fly-chat-sub {
  margin: 6px 0 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

.fly-chat-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.fly-chat-log {
  height: auto;
  min-height: 0;
}

.fly-chat-form .fly-chat-send {
  min-height: 46px;
}

@media (max-width: 640px) {
  .fly-chat-panel.is-fullscreen {
    right: 8px;
    left: 8px;
    top: 8px;
    bottom: 8px;
    border-radius: 12px;
  }
}

.soa-chat-card.is-collapsed .soa-chat-log,
.soa-chat-card.is-collapsed .soa-chat-form,
.soa-chat-card.is-collapsed .soa-chat-foot,
.soa-chat-card.is-collapsed .soa-chat-sub,
.soa-chat-card.is-collapsed .soa-chat-badges {
  display: none;
}

.soa-chat-card.is-collapsed {
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 192, 243, 0.08) 0%, transparent 40%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(243, 249, 255, 0.92));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.status-light {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #d4e1ec;
  background: #e9f0f6;
  flex: 0 0 auto;
}

.status-light-red {
  background: #d74646;
  border-color: #b92f2f;
  box-shadow: 0 0 0 3px rgba(215, 70, 70, 0.18);
}

.status-light-yellow {
  background: #e3ad22;
  border-color: #c59214;
  box-shadow: 0 0 0 3px rgba(227, 173, 34, 0.2);
}

.status-light-green {
  background: #1f9e52;
  border-color: #198444;
  box-shadow: 0 0 0 3px rgba(31, 158, 82, 0.2);
}

.status-light-gray {
  background: #6b7280;
  border-color: #4b5563;
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.18);
}

.status-select-red {
  border-color: #d87373;
  background: #fff7f7;
}

.status-select-yellow {
  border-color: #e2bf67;
  background: #fffbf0;
}

.status-select-green {
  border-color: #6bbc8b;
  background: #f4fff8;
}

.status-select-gray {
  border-color: #aab0bb;
  background: #f7f8fa;
}

.cert-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.cert-list {
  margin: 14px 0 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.cert-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #e3edf5;
}

.cert-row:last-child {
  border-bottom: 0;
}

.cert-date {
  white-space: nowrap;
}

.cert-status {
  white-space: nowrap;
}

.cert-row form {
  margin-left: auto;
}

.cert-list a {
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 760px) {
  .cert-row {
    flex-wrap: wrap;
  }

  .cert-row form {
    margin-left: 0;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-info-grid {
    grid-template-columns: 1fr;
  }
}

.cert-hint {
  margin-top: 8px;
}

.risk-card {
  margin-top: 16px;
  display: grid;
  gap: 14px;
  background: #fff;
}

.risk-subhead {
  margin-top: 6px;
}

.risk-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.risk-import-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.risk-import-input {
  max-width: 230px;
  padding: 10px;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.95);
}

.risk-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.risk-form {
  display: grid;
  gap: 14px;
}

.risk-kpi-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.risk-kpi-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  box-shadow: none;
}

.risk-kpi-label {
  margin: 0;
  font-size: 0.86rem;
  color: #3a5e78;
}

.risk-kpi-value {
  margin: 4px 0 0;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 800;
  color: #0a5f89;
}

.risk-heatmaps {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.risk-heatmap-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  box-shadow: none;
}

.risk-heat-head {
  margin-bottom: 10px;
}

.risk-heat-head h3 {
  margin: 0;
}

.risk-heat-head p {
  margin-top: 6px;
}

.risk-heatmap-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.risk-heat-cell {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  display: grid;
  place-items: center;
  color: #18364c;
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.risk-heat-cell.is-low {
  background: linear-gradient(140deg, #dff8e8, #bbf0cc);
}

.risk-heat-cell.is-medium {
  background: linear-gradient(140deg, #fff7d9, #ffe8a6);
}

.risk-heat-cell.is-high {
  background: linear-gradient(140deg, #ffd8b2, #ffb870);
}

.risk-heat-cell.is-severe {
  background: linear-gradient(140deg, #ffc1bf, #ff8f8f);
}

.risk-heat-cell span {
  opacity: 0.38;
}

.risk-heat-cell.is-populated {
  border-color: rgba(12, 66, 98, 0.38);
}

.risk-heat-cell.is-populated span {
  opacity: 1;
}

.risk-axis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.risk-axis span {
  text-align: center;
  font-size: 0.78rem;
  color: #40657e;
  font-weight: 700;
}

.risk-axis-label {
  margin-top: 8px;
  font-size: 0.82rem;
}

.risk-scale-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.risk-scale-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.risk-scale-card h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.risk-scale-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
}

.risk-scale-card li {
  color: #2f5067;
  font-size: 0.86rem;
}

.risk-table {
  min-width: 1320px;
}

.risk-filter-bar {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.2fr) auto;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.risk-filter-field label {
  margin-bottom: 4px;
}

.risk-filter-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.risk-filter-count {
  margin: 0;
  font-size: 0.85rem;
}

.risk-row td {
  vertical-align: top;
}

.risk-row.is-filtered-out {
  display: none;
}

.risk-row input[type="text"] {
  margin-bottom: 8px;
}

.risk-owner-input {
  margin-bottom: 0;
}

.risk-row textarea {
  min-height: 70px;
  resize: vertical;
}

.risk-score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.risk-score-badge {
  margin: 0;
  min-width: 50px;
  text-align: center;
  border-radius: 999px;
  padding: 8px 10px;
  border: 1px solid transparent;
  font-weight: 800;
  line-height: 1;
}

.risk-score-badge.is-low {
  background: #dff8e8;
  border-color: #93d9ad;
  color: #0d5d37;
}

.risk-score-badge.is-medium {
  background: #fff6d5;
  border-color: #e4c468;
  color: #7a5300;
}

.risk-score-badge.is-high {
  background: #ffe1c4;
  border-color: #f2a45d;
  color: #844405;
}

.risk-score-badge.is-severe {
  background: #ffd0d0;
  border-color: #f08f8f;
  color: #8f1f2f;
}

.risk-trend {
  margin: 6px 0 0;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 10px;
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 800;
}

.risk-trend.is-improved {
  background: #dff8e8;
  border-color: #93d9ad;
  color: #0d5d37;
}

.risk-trend.is-worse {
  background: #ffd0d0;
  border-color: #f08f8f;
  color: #8f1f2f;
}

.risk-trend.is-stable {
  background: #ebf3f9;
  border-color: #c1d7e8;
  color: #33566f;
}

.risk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-choice {
  margin-top: 16px;
}

.admin-card {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.admin-stat h3 {
  margin: 0 0 6px;
  font-size: 0.9rem;
}

.admin-stat-value {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand-dark);
}

.admin-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-info-card {
  padding: 14px;
}

.admin-info-card h3 {
  margin: 0 0 6px;
}

.admin-info-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.admin-table-wrap {
  max-height: 420px;
}

.admin-table {
  min-width: 1100px;
}

.admin-log-card {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.admin-log-card h4 {
  margin: 8px 0 2px;
}

.admin-history-list {
  display: grid;
  gap: 8px;
}

.admin-history-item {
  border: 1px solid #e3edf5;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}

@media (max-width: 760px) {
  .admin-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-info-grid {
    grid-template-columns: 1fr;
  }

  .dash-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dash-entry-grid {
    grid-template-columns: 1fr;
  }

  .dash-analytics-grid {
    grid-template-columns: 1fr;
  }

  .risk-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .risk-heatmaps {
    grid-template-columns: 1fr;
  }

  .risk-scale-guide {
    grid-template-columns: 1fr;
  }

  .risk-meta {
    justify-items: start;
  }

  .risk-filter-bar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .risk-filter-actions {
    justify-items: start;
  }
}

.dashboard-welcome {
  margin: 16px 4px 0;
  font-size: 0.88rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition:
    opacity 0.55s ease var(--reveal-delay, 0s),
    transform 0.55s ease var(--reveal-delay, 0s);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 920px) {
  .hero-grid,
  .tech-grid,
  .dash-grid,
  .soa-meta,
  .mini-grid,
  .form-grid,
  .duo-grid,
  .feature-grid,
  .quick-grid,
  .quick-grid.is-tight {
    grid-template-columns: 1fr;
  }

  .process-visual {
    grid-template-columns: 1fr 1fr;
  }

  .signal-grid {
    grid-template-columns: 1fr;
  }

  .hero-graphics {
    grid-template-columns: 1fr;
  }

  .logo-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .soa-split {
    grid-template-columns: 1fr;
  }

  .login-wrap {
    width: min(560px, 92vw);
    margin: 28px auto;
  }

  .soa-chat-card {
    position: static;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(207, 225, 239, 0.95);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 38px rgba(12, 66, 98, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }

  .nav-wrap.nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .site-nav a {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(248, 252, 255, 0.9);
    border: 1px solid rgba(207, 225, 239, 0.9);
    font-weight: 800;
  }

  .site-nav a:active {
    transform: scale(0.99);
  }

  .site-nav .nav-btn {
    text-align: center;
    border: 0;
  }

  .why-band {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 72px 0 44px;
  }

  /* On mobile, shift the crop a bit upward so the most interesting video area remains visible. */
  .hero-video {
    object-position: 50% 30%;
  }

  /* Increase contrast for text on small screens. */
  .hero-video-wrap {
    opacity: 0.82;
  }

  .hero-video-overlay {
    background:
      linear-gradient(180deg, rgba(243, 249, 255, 0.55) 0%, rgba(243, 249, 255, 0.9) 80%),
      radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.16) 0%, transparent 42%);
  }

  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-video-wrap {
    opacity: 0.35;
    transform: none;
  }
}


.control-title {
  display: inline-block;
  margin-top: 4px;
}

.control-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-xs {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
}

.control-desc {
  margin: 8px 0 0;
  color: #31516a;
  font-size: 0.86rem;
  line-height: 1.35;
  max-width: 62ch;
}

.control-chat-row td {
  background: rgba(248, 252, 255, 0.8);
}

.control-chat-card {
  margin: 10px 0;
  padding: 14px;
  background:
    radial-gradient(circle at 18% 24%, rgba(0, 192, 243, 0.08) 0%, transparent 44%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(235, 248, 255, 0.86));
  border: 1px solid rgba(207, 225, 239, 0.95);
}

.control-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.control-chat-title {
  margin: 0;
  font-size: 0.98rem;
}

.control-chat-sub {
  margin: 6px 0 0;
  font-size: 0.88rem;
  line-height: 1.35;
}

.control-chat-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.control-chat-log {
  height: min(34vh, 320px);
}


.soa-version-bar {
  margin: 10px 0 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.version-switch {
  display: grid;
  gap: 6px;
  min-width: 260px;
}

.soa-meta-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.soa-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.soa-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.soa-row-na td:first-child strong,
.soa-row-na td:first-child .control-title,
.soa-row-na td:first-child .control-desc {
  text-decoration: line-through;
  opacity: 0.65;
}

.cookie-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: min(460px, calc(100vw - 28px));
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #b9d6ea;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(235, 248, 255, 0.96));
  box-shadow: 0 20px 38px rgba(7, 52, 82, 0.2);
  backdrop-filter: blur(12px);
  z-index: 40;
}

.cookie-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
}

.cookie-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #e9f6ff;
  color: #0f5d87;
  flex: 0 0 auto;
}

.cookie-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.cookie-copy {
  margin: 0;
  color: #35556f;
  font-size: 0.92rem;
  line-height: 1.45;
}

.cookie-copy a {
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
}

.cookie-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-actions .btn {
  padding: 10px 14px;
}

.cookie-manage {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #9cc4df;
  border-radius: 999px;
  padding: 8px;
  background: #ffffffde;
  color: #12344d;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(12, 66, 98, 0.16);
  backdrop-filter: blur(8px);
  z-index: 35;
}

.cookie-manage .cookie-icon {
  width: 18px;
  height: 18px;
}

.cookie-manage .cookie-icon svg {
  width: 12px;
  height: 12px;
}

.cookie-manage:hover {
  background: #ffffff;
}

@media (max-width: 920px) {
  .cookie-banner,
  .cookie-manage {
    right: 14px;
    bottom: 14px;
  }
}
