:root {
  --ink: #111827;
  --muted: #697386;
  --line: #e7eaf0;
  --line-soft: #f5f6f9;
  --paper: #ffffff;
  --violet: #7c3aed;
  --coral: #f9735b;
  --blue: #2563eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: var(--paper);
}

.shell {
  min-height: 100vh;
  padding: 30px clamp(22px, 5vw, 72px) 56px;
}

.nav {
  position: sticky;
  top: 18px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  margin-bottom: clamp(56px, 9vw, 104px);
  padding: 12px 14px;
  border: 1px solid rgba(216, 221, 230, 0.76);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  line-height: 0.95;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand strong {
  display: block;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.brand span {
  display: block;
  margin-top: 5px;
  color: #5d6678;
  font-size: 11px;
  letter-spacing: 0.22em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.nav-links a,
.nav-signin,
.nav-cta {
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav-links-group {
  display: inline-flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.nav-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.nav-lang {
  min-height: 36px;
  width: 112px;
  padding: 0 10px;
  border: 1px solid rgba(216, 221, 230, 0.9);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  appearance: auto;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(105deg, #6d4aff 0%, #9b5cf6 48%, #ff7557 100%);
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-links a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 650;
}

.nav-signin {
  padding: 11px 14px;
  color: var(--ink);
  white-space: nowrap;
}

.nav-cta {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(105deg, #6d4aff 0%, #9b5cf6 48%, #ff7557 100%) border-box;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  box-shadow: 0 12px 28px rgba(109, 74, 255, 0.1);
}

.menu-dot {
  width: 44px;
  height: 44px;
  min-width: 44px;
  flex: 0 0 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
  display: none;
  place-items: center;
}

.menu-dot::before {
  content: "";
  width: 18px;
  height: 12px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 18px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 5px / 18px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 10px / 18px 2px no-repeat;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, 0.78fr);
  align-items: center;
  gap: clamp(42px, 6vw, 92px);
  max-width: 1240px;
  margin-inline: auto;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: #374151;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* QA qac_20260527T123606: hero kicker leading dot removed per request. */
.kicker::before { content: none; }

h1 {
  max-width: 840px;
  margin: 0;
  font-size: clamp(49px, 7.3vw, 109px);
  font-weight: 560;
  line-height: 0.98;
  letter-spacing: -0.055em;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.gradient,
.accent-word {
  position: relative;
  display: inline-block;
  background: linear-gradient(105deg, #7138e8 5%, #a855f7 45%, #f9735b 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: "Kalam", "Segoe Print", cursive;
  font-size: 1.02em;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin: -0.08em 0 -0.2em;
  padding: 0.08em 0.03em 0.2em;
  transform: rotate(-1.5deg) translateY(0.02em);
  transform-origin: left center;
}

.gradient .scribble-underline {
  position: absolute;
  left: 2%;
  bottom: 0.18em;
  width: 95%;
  height: 0.14em;
  overflow: visible;
  pointer-events: none;
}

.gradient .scribble-underline path {
  fill: url(#scribbleGradient);
  stroke: none;
  transform: scaleX(0);
  transform-origin: left center;
  animation: drawAccentUnderline 860ms cubic-bezier(0.22, 1, 0.36, 1) 650ms forwards;
}

@keyframes drawAccentUnderline {
  to {
    transform: scaleX(1);
  }
}

.accent-word {
  font-size: 1em;
  line-height: 1.2;
  margin: -0.16em 0 -0.08em;
  padding: 0.16em 0.03em 0.08em;
  vertical-align: -0.04em;
}

.inline-script {
  display: inline-block;
  background: linear-gradient(105deg, #7138e8 5%, #a855f7 45%, #f9735b 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: "Kalam", "Segoe Print", cursive;
  font-size: 1em;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  transform: rotate(-1deg);
  transform-origin: left center;
}

.subhead {
  max-width: 760px;
  margin: 28px 0 0;
  color: #4b5563;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.33;
  letter-spacing: -0.025em;
}

.subhead strong {
  color: var(--ink);
  font-weight: 780;
}

.subhead-secondary {
  max-width: 700px;
  margin-top: 18px;
  color: #757e8e;
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.45;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  max-width: 760px;
  margin: 42px 0 0;
}

.metric {
  padding: 6px 0 0;
  color: var(--ink);
}

.metric strong {
  display: block;
  color: #111827;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 0.95;
  font-weight: 680;
  letter-spacing: -0.055em;
}

.metric strong .count {
  display: inline-block;
  min-width: 1.2ch;
  color: #111827;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}

.metric span {
  display: block;
  margin-top: 10px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.25;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 42px;
}

.button {
  min-height: 60px;
  border-radius: 999px;
  padding: 0 30px;
  border: 1px solid #d7dce5;
  background: #fff;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -0.015em;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(105deg, #6d4aff 0%, #9b5cf6 48%, #ff7557 100%);
  color: #fff;
  box-shadow: 0 18px 42px rgba(109, 74, 255, 0.22);
}

.button.quiet {
  min-height: 58px;
  border-color: #d8dde6;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.06);
}

.microcopy {
  margin-top: 22px;
  color: #7b8494;
  font-size: 13px;
  font-weight: 680;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legalcopy {
  display: inline-flex;
  margin: 18px 0 0;
  padding: 8px 12px;
  color: #8b94a5;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.console-wrap {
  position: relative;
  min-height: 880px;
}

.console {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 24px 70px rgba(17, 24, 39, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.console::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 0%, rgba(124, 58, 237, 0.06), transparent 34%),
    radial-gradient(circle at 100% 12%, rgba(249, 115, 91, 0.07), transparent 30%);
}

.console-inner {
  position: relative;
  padding: 24px;
}

.console-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.jurisdiction {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 790;
}

.jurisdiction-rotator {
  position: relative;
  display: inline-grid;
  min-width: 190px;
  min-height: 22px;
}

.jurisdiction-rotator > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(8px);
  animation: rotateJurisdiction 18s infinite;
}

.jurisdiction-rotator > span:nth-child(2) {
  animation-delay: 6s;
}

.jurisdiction-rotator > span:nth-child(3) {
  animation-delay: 12s;
}

.country-mark {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #7138e8, #d65aa8, #f9735b) border-box;
  color: var(--country-color, #7138e8);
  font-size: 9px;
  font-weight: 880;
  letter-spacing: 0.03em;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.08);
}

.country-mark.fr {
  --country-color: #d65aa8;
}

.country-mark.de {
  --country-color: #f9735b;
}

@keyframes rotateJurisdiction {
  0%,
  5% {
    opacity: 0;
    transform: translateY(8px);
  }
  10%,
  30% {
    opacity: 1;
    transform: translateY(0);
  }
  35%,
  100% {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.mode {
  display: inline-flex;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.mode span {
  border-radius: 999px;
  padding: 7px 11px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mode span:first-child {
  background: #111827;
  color: #fff;
}

.screen {
  position: relative;
  min-height: 800px;
  padding-top: 22px;
}

.case {
  position: absolute;
  inset: 22px 0 auto;
  min-height: 758px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(14px);
  animation: rotateCase 18s infinite;
}

.case:nth-child(2) {
  animation-delay: 6s;
}

.case:nth-child(3) {
  animation-delay: 12s;
}

/* JS-driven console (wire-hero.js): CSS keyframes off, class-driven fades. */
.screen[data-js] .case {
  animation: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}

.screen[data-js] .case.is-active {
  opacity: 1;
  transform: translateY(0);
}

.jurisdiction-rotator[data-js] > span {
  animation: none;
  opacity: 1;
  transform: none;
}

.mode[data-js] span {
  cursor: pointer;
}

.mode[data-js] span:first-child {
  background: transparent;
  color: #6b7280;
}

.mode[data-js] span.is-on {
  background: #111827;
  color: #fff;
}

.console-date {
  margin-top: 10px;
  text-align: right;
  color: #8b94a5;
  font-size: 11px;
  letter-spacing: 0.04em;
}

@keyframes rotateCase {
  0%,
  5% {
    opacity: 0;
    transform: translateY(14px);
  }
  10%,
  30% {
    opacity: 1;
    transform: translateY(0);
  }
  35%,
  100% {
    opacity: 0;
    transform: translateY(-12px);
  }
}

.label {
  color: #8b94a5;
  font-size: 11px;
  font-weight: 830;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.question {
  margin-top: 9px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: #1f2937;
  font-size: 17px;
  line-height: 1.36;
  letter-spacing: -0.02em;
}

.answer {
  margin-top: 14px;
  padding: 18px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid #edf0f5;
}

.answer p {
  margin: 8px 0 0;
  color: #303846;
  font-size: 15px;
  line-height: 1.42;
}

.answer strong {
  color: var(--ink);
}

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

.case-footer {
  margin-top: auto;
  padding-top: 18px;
}

.source {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: #334155;
  box-shadow: 0 12px 26px rgba(17, 24, 39, 0.06);
  --source-color: #7138e8;
  --source-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.55' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6.5' y='4' width='11' height='16' rx='3'/%3E%3Cpath d='M9.2 9.5h5.6M9.2 12.8h5.6M9.2 16h3.6'/%3E%3C/svg%3E");
}

.source::before {
  content: "";
  grid-row: 1 / span 3;
  width: 25px;
  height: 25px;
  margin-top: 3px;
  background: var(--source-color);
  -webkit-mask: var(--source-icon) center / contain no-repeat;
  mask: var(--source-icon) center / contain no-repeat;
}

.source::after {
  content: none;
}

.source:nth-child(1) {
  --source-color: #7138e8;
  --source-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.55' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 20h15'/%3E%3Cpath d='M6.5 10h11'/%3E%3Cpath d='M7.5 10V7.3c1.5-1.1 3-1.9 4.5-2.8 1.5.9 3 1.7 4.5 2.8V10'/%3E%3Cpath d='M9 10v6.8M12 10v6.8M15 10v6.8'/%3E%3C/svg%3E");
}

.source:nth-child(2) {
  --source-color: #9b5cf6;
  --source-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.55' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.3'/%3E%3Cpath d='M8.2 12.3a4 4 0 0 1 7.6 0'/%3E%3Cpath d='M8.2 15.4h7.6'/%3E%3Cpath d='M12 7.6v7.8'/%3E%3C/svg%3E");
}

.source:nth-child(3) {
  --source-color: #d65aa8;
  --source-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.55' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6.5' y='4' width='11' height='16' rx='3'/%3E%3Cpath d='M9.2 9.5h5.6M9.2 12.8h5.6M9.2 16h3.6'/%3E%3C/svg%3E");
}

.source:nth-child(4) {
  --source-color: #f9735b;
  --source-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.55' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7' cy='6' r='2.4'/%3E%3Ccircle cx='17' cy='12' r='2.4'/%3E%3Ccircle cx='7' cy='18' r='2.4'/%3E%3Cpath d='M9.2 7.3c2.2 1.1 3.5 2 5.6 3.4M14.8 13.2c-2.1 1.4-3.4 2.3-5.6 3.5'/%3E%3C/svg%3E");
}

.source-title {
  align-self: end;
  color: #1f2937;
  font-size: 14px;
  font-weight: 780;
  letter-spacing: -0.02em;
}

.source-desc {
  color: #5f6b7c;
  font-size: 11px;
  line-height: 1.32;
}

.source-link {
  align-self: end;
  color: #7138e8;
  font-size: 11px;
  font-weight: 760;
}

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

.chips span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.76);
  color: #596274;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.06em;
}

.proof {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: #6b7280;
  font-size: 12px;
  font-weight: 760;
}

.section {
  max-width: 1240px;
  margin: clamp(82px, 12vw, 150px) auto 0;
}

.section.narrow {
  max-width: 980px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  width: 34px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed, #f9735b);
}

.section-title {
  max-width: 860px;
  margin: 20px 0 0;
  color: var(--ink);
  font-size: clamp(38px, 5.5vw, 78px);
  line-height: 0.98;
  font-weight: 590;
  letter-spacing: -0.032em;
}

.section-copy {
  max-width: 720px;
  margin: 22px 0 0;
  color: #5b6473;
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.work-grid,
.corpus-grid,
.pricing-grid {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

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

.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(17, 24, 39, 0.055);
}

.work-card {
  min-height: 250px;
  padding: 26px;
}

.icon-tile {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 26px;
  color: var(--icon-color, #7c3aed);
}

.icon-tile svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.work-card:nth-child(1) {
  --icon-color: #7138e8;
}

.work-card:nth-child(2) {
  --icon-color: #d65aa8;
}

.work-card:nth-child(3) {
  --icon-color: #f9735b;
}

.corpus-item:nth-child(1) { --icon-color: #7138e8; }
.corpus-item:nth-child(2) { --icon-color: #9b5cf6; }
.corpus-item:nth-child(3) { --icon-color: #c65bc1; }
.corpus-item:nth-child(4) { --icon-color: #d65aa8; }
.corpus-item:nth-child(5) { --icon-color: #ea6a82; }
.corpus-item:nth-child(6) { --icon-color: #f9735b; }

.doc-card:nth-child(1) { --icon-color: #7138e8; }
.doc-card:nth-child(2) { --icon-color: #d65aa8; }
.doc-card:nth-child(3) { --icon-color: #9b5cf6; }
.doc-card:nth-child(4) { --icon-color: #f9735b; }

.icon-tile .soft-fill {
  fill: currentColor;
  opacity: 0.1;
  stroke: none;
}

.work-card h3,
.price-card h3,
.doc-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.08;
  letter-spacing: 0.004em;
}

.work-card p,
.doc-card p {
  margin: 13px 0 0;
  color: #626c7c;
  font-size: 15px;
  line-height: 1.5;
}

.comparison {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 24px;
  align-items: stretch;
  margin-top: 34px;
}

.compare-card {
  padding: 28px;
}

.compare-card.highlight {
  border-color: rgba(124, 58, 237, 0.22);
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.08), transparent 32%),
    #fff;
}

.compare-label {
  color: #8b94a5;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.compare-card h3 {
  margin: 14px 0 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.02;
  letter-spacing: -0.018em;
}

.check-list {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  color: #475569;
  font-size: 15px;
  line-height: 1.35;
}

.check-list li::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.09);
  font-size: 13px;
  font-weight: 850;
}

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

.corpus-item {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 82px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: #263244;
  font-size: 15px;
  font-weight: 720;
}

.corpus-item .icon-tile {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin: 0;
}

.corpus-item svg {
  width: 27px;
  height: 27px;
}

.coverage-band {
  overflow: hidden;
  padding: 30px;
}

.coverage-layout {
  position: relative;
}

.coverage-map {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 58% 48%, rgba(124, 58, 237, 0.075), transparent 31%),
    radial-gradient(circle at 30% 30%, rgba(214, 90, 168, 0.055), transparent 26%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.55), rgba(255, 255, 255, 0.94)),
  #fff;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.07);
}

.coverage-map::before {
  content: none;
}

.real-europe-map {
  display: block;
  width: 100%;
  height: 680px;
}

.map-country {
  fill: #edf2f8;
  stroke: #fff;
  stroke-width: 0.9;
  opacity: 0.7;
  transition: fill 240ms ease, opacity 240ms ease, filter 240ms ease;
}

.map-country.is-covered-eu {
  --map-rest: rgba(124, 58, 237, 0.16);
  --map-active: rgba(124, 58, 237, 0.72);
  --map-stroke: rgba(124, 58, 237, 0.22);
  fill: url(#mapCgpGradient);
  fill-opacity: var(--map-rest-opacity, 0.2);
  stroke: var(--map-stroke);
  opacity: 1;
  animation: mapWash var(--map-duration, 18s) ease-in-out infinite;
  animation-delay: var(--map-delay, 0ms);
}

.map-country.is-covered-eea {
  --map-rest: rgba(249, 115, 91, 0.18);
  --map-active: rgba(249, 115, 91, 0.74);
  --map-stroke: rgba(249, 115, 91, 0.25);
  fill: var(--map-rest);
  stroke: var(--map-stroke);
  opacity: 1;
  animation: mapWash var(--map-duration, 18s) ease-in-out infinite;
  animation-delay: var(--map-delay, 0ms);
}

.map-country.is-slovenia {
  --map-rest: rgba(199, 91, 206, 0.2);
  --map-active: rgba(199, 91, 206, 0.76);
  --map-stroke: rgba(199, 91, 206, 0.78);
  fill: var(--map-rest);
  stroke: var(--map-stroke);
  stroke-width: 1.1;
  opacity: 1;
  animation: mapWash var(--map-duration, 18s) ease-in-out infinite;
  animation-delay: var(--map-delay, 0ms);
}

.coverage-map-title {
  position: absolute;
  left: 28px;
  top: 24px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 820;
}

.coverage-map-title::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--violet), var(--coral));
  box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.1);
}

.coverage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #4b5567;
  font-size: 12px;
  font-weight: 760;
  backdrop-filter: blur(10px);
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.legend-swatch.eu {
  background: linear-gradient(90deg, #7138e8, #a855f7, #d65aa8, #f9735b);
}

.legend-swatch.eea {
  background: rgba(249, 115, 91, 0.76);
}

.legend-swatch.slovenia {
  background: rgba(199, 91, 206, 0.76);
}

@keyframes mapWash {
  0%,
  100% {
    fill-opacity: var(--map-rest-opacity, 1);
    filter: drop-shadow(0 0 0 rgba(124, 58, 237, 0));
  }
  18%,
  58% {
    fill-opacity: var(--map-active-opacity, 1);
    filter: drop-shadow(0 8px 15px rgba(124, 58, 237, 0.075));
  }
  82% {
    fill-opacity: var(--map-rest-opacity, 1);
  }
}

.slovenia-note {
  margin: 24px 0 0;
  padding: 18px 20px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 18px;
  background: rgba(124, 58, 237, 0.035);
  color: #566074;
  font-size: 14px;
  line-height: 1.45;
}

.documents {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: start;
}

.doc-note {
  padding: 28px;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 91, 0.07), transparent 36%),
    #fff;
}

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

.doc-card {
  padding: 22px;
}

.doc-card .icon-tile {
  width: 38px;
  height: 38px;
  margin-bottom: 24px;
}

.doc-card .icon-tile svg {
  width: 34px;
  height: 34px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 999px;
  padding: 7px 10px;
  color: #6d4aff;
  background: rgba(124, 58, 237, 0.055);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

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

.price-card {
  padding: 24px;
}

.price-card h3 {
  display: inline-block;
  background: linear-gradient(100deg, #7138e8 0%, #9b5cf6 34%, #d65aa8 64%, #f9735b 100%);
  background-size: 420% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.price-card:nth-child(1) h3 {
  background-position: 0% 50%;
}

.price-card:nth-child(2) h3 {
  background-position: 33% 50%;
}

.price-card:nth-child(3) h3 {
  background-position: 66% 50%;
}

.price-card:nth-child(4) h3 {
  background-position: 100% 50%;
}

.price-card.featured {
  border-color: rgba(124, 58, 237, 0.25);
  box-shadow: 0 20px 60px rgba(124, 58, 237, 0.11);
}

.price {
  margin: 18px 0 0;
  font-size: 30px;
  font-weight: 760;
  letter-spacing: -0.055em;
}

.price span {
  color: #7b8494;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.price-card ul {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: #5b6473;
  font-size: 14px;
  line-height: 1.3;
}

.price-card li::before {
  content: "•";
  margin-right: 8px;
  color: #7c3aed;
}

.final-cta {
  padding: clamp(32px, 6vw, 64px);
  background:
    radial-gradient(circle at 82% 20%, rgba(124, 58, 237, 0.11), transparent 28%),
    radial-gradient(circle at 10% 0%, rgba(249, 115, 91, 0.09), transparent 34%),
    #fff;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  max-width: 1240px;
  margin: 56px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: #7b8494;
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer a {
  color: #596274;
  font-weight: 720;
  text-decoration: none;
}

.footer a:hover {
  color: var(--ink);
}

@media (max-width: 980px) {
  .nav-links,
  .nav-signin,
  .nav-cta,
  .nav-account,
  .nav-admin,
  .nav-signout {
    display: none !important;
  }

  .menu-dot {
    display: grid;
  }

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

  .console-wrap {
    min-height: 880px;
  }

}

@media (max-width: 640px) {
  .shell {
    padding: 24px 20px 44px;
  }

  .nav {
    top: 12px;
    margin-bottom: 54px;
    padding: 4px 12px;
    border-radius: 28px;
  }

  .nav-links,
  .nav-signin,
  .nav-cta,
  .nav-account,
  .nav-admin,
  .nav-signout {
    display: none !important;
  }

  .menu-dot {
    display: grid;
  }

  h1 {
    font-size: clamp(52px, 16vw, 74px);
  }

  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 32px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .metric {
    min-width: 0;
    padding: 0 10px;
    text-align: center;
  }

  .metric + .metric {
    border-left: 1px solid var(--line);
  }

  .metric strong {
    font-size: clamp(31px, 11vw, 42px);
    letter-spacing: -0.06em;
    white-space: nowrap;
  }

  .metric span {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.15;
  }

  .button {
    width: 100%;
  }

  .console-inner {
    padding: 18px;
  }

  .console-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .screen {
    min-height: 800px;
  }

  .question {
    font-size: 15px;
  }

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

  .source {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 8px;
    min-height: 104px;
    padding: 11px;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.05);
  }

  .source::before {
    width: 20px;
    height: 20px;
    margin-top: 2px;
  }

  .source-title {
    font-size: 12px;
    line-height: 1.15;
    letter-spacing: 0;
  }

  .source-desc {
    font-size: 10px;
    line-height: 1.22;
  }

  .source-link {
    font-size: 10px;
  }

  .proof {
    flex-direction: column;
  }

  .section {
    margin-top: 82px;
  }

  .section-title {
    font-size: clamp(36px, 11vw, 52px);
  }

  .work-grid,
  .comparison,
  .corpus-grid,
  .documents,
  .doc-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .coverage-map {
    min-height: 540px;
  }

  .real-europe-map {
    height: 540px;
  }

  .coverage-map-title {
    left: 18px;
    top: 18px;
    font-size: 13px;
  }

  .coverage-legend {
    gap: 8px;
    margin-top: 12px;
  }

  .legend-item {
    padding: 8px 10px;
    font-size: 11px;
  }

  .coverage-band,
  .doc-note,
  .compare-card,
  .final-cta {
    padding: 22px;
  }

  .footer {
    flex-direction: column;
  }
}

/* coverage.html */
.coverage-page .nav {
  margin-bottom: clamp(48px, 8vw, 88px);
}

.coverage-hero {
  max-width: 1240px;
  margin-inline: auto;
}

.coverage-hero .section-title {
  max-width: 960px;
  font-size: clamp(52px, 7.4vw, 104px);
}

.coverage-hero .section-copy {
  max-width: 820px;
}

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

.summary-card {
  min-height: 170px;
  padding: 24px;
}

.summary-card strong {
  display: block;
  color: var(--ink);
  font-size: clamp(34px, 4vw, 54px);
  line-height: 0.96;
  font-weight: 680;
  letter-spacing: -0.055em;
}

.summary-card span {
  display: block;
  margin-top: 13px;
  color: #5f6b7c;
  font-size: 15px;
  line-height: 1.42;
}

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

.jurisdiction-card {
  min-height: 190px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.jurisdiction-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(105deg, #7138e8 0%, #a855f7 42%, #d65aa8 68%, #f9735b 100%);
  opacity: 0.72;
}

.jurisdiction-card h3,
.source-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.authority {
  display: inline-flex;
  margin-top: 12px;
  padding: 6px 9px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.045);
  color: #7138e8;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.jurisdiction-card p,
.source-card p {
  margin: 14px 0 0;
  color: #626c7c;
  font-size: 14px;
  line-height: 1.48;
}

.jurisdiction-card.is-limited {
  border-color: rgba(199, 91, 206, 0.28);
  background:
    radial-gradient(circle at 100% 0%, rgba(199, 91, 206, 0.08), transparent 36%),
    #fff;
}

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

.source-card {
  min-height: 210px;
  padding: 24px;
}

.source-card .icon-tile {
  margin-bottom: 24px;
}

@media (max-width: 980px) {
  .coverage-summary,
  .jurisdiction-grid,
  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .coverage-hero .section-title {
    font-size: clamp(46px, 14vw, 68px);
  }

  .coverage-summary,
  .jurisdiction-grid,
  .source-grid {
    grid-template-columns: 1fr;
  }
}

/* pricing.html */
.pricing-hero {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.pricing-hero h1 {
  max-width: 920px;
  margin-inline: auto;
}

.pricing-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

.pill-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}

.pill-group span,
.pill-group a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.pill-group .active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
}

.save-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.08);
  color: #7138e8;
  font-size: 11px;
  font-weight: 840;
  letter-spacing: 0.05em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.trial-note {
  max-width: 720px;
  margin: 32px auto 0;
  color: #5b6473;
  font-size: 16px;
  line-height: 1.5;
}

.trial-note strong {
  color: var(--ink);
}

.trial-note a {
  color: #7138e8;
  font-weight: 780;
  text-decoration: none;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.price-card.dark {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.price-card.dark h3,
.price-card.dark .price,
.price-card.dark .plan-tagline {
  color: #fff;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.price-card.dark ul {
  color: #d1d5db;
}

.plan-tagline {
  min-height: 40px;
  margin: 9px 0 0;
  color: #626c7c;
  font-size: 14px;
  line-height: 1.35;
}

.recommended-ribbon {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  top: -14px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  white-space: nowrap;
  border: 1px solid rgba(124, 58, 237, 0.18);
  background: #fff;
  box-shadow:
    0 0 0 8px #fff,
    0 10px 24px rgba(124, 58, 237, 0.12);
  line-height: 1;
  text-align: center;
}

.plan-button {
  width: 100%;
  min-height: 50px;
  margin-top: 22px;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 14px;
}

.price-card ul {
  margin-top: 24px;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  max-width: 100%;
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(17, 24, 39, 0.045);
  scrollbar-width: thin;
}
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(17, 24, 39, 0.25);
  border-radius: 4px;
}
.table-wrap::-webkit-scrollbar-track { background: transparent; }

.pricing-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.pricing-table th,
.pricing-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  color: #475569;
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
  vertical-align: top;
}

.pricing-table th {
  color: var(--ink);
  background: #f8fafc;
  font-weight: 820;
}

.pricing-table tr:last-child td {
  border-bottom: 0;
}

.pricing-table td:not(:first-child),
.pricing-table th:not(:first-child) {
  text-align: center;
}

.table-note {
  margin-top: 16px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.45;
}

.table-note strong:not(.inline-script) {
  color: var(--ink);
}

.doc-name {
  display: block;
  color: var(--ink);
  font-weight: 780;
}

.doc-meta {
  display: block;
  margin-top: 4px;
  color: #8b94a5;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.faq-item {
  padding: 24px;
}

.faq-item h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.faq-item p {
  margin: 13px 0 0;
  color: #5b6473;
  font-size: 15px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .pricing-grid,
  .faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .pricing-hero {
    text-align: left;
  }

  .pricing-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
  }

  .pill-group {
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    align-items: center;
    gap: 4px;
    padding: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    box-sizing: border-box;
  }

  .pill-group::-webkit-scrollbar { display: none; }

  .pill-group span {
    flex: 1 1 auto;
    min-height: 36px;
    padding: 0 10px;
    font-size: 12px;
    justify-content: center;
    white-space: nowrap;
  }

  .pill-group span i.save-pill {
    margin-left: 6px;
    padding: 2px 6px;
    font-size: 10px;
  }

  .legalcopy {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.55;
    letter-spacing: 0.02em;
    text-transform: none;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .pricing-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .pricing-table {
    min-width: 650px;
  }
}

/* news.html */
.news-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(360px, 0.66fr);
  gap: clamp(32px, 6vw, 78px);
  align-items: center;
  max-width: 1240px;
  margin-inline: auto;
}

.news-hero::after {
  content: "";
  position: absolute;
  right: 3%;
  top: -12%;
  width: min(440px, 38vw);
  height: min(440px, 38vw);
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 35%, rgba(124, 58, 237, 0.1), transparent 46%),
    radial-gradient(circle at 70% 68%, rgba(249, 115, 91, 0.09), transparent 42%);
  pointer-events: none;
  z-index: -1;
}

.news-hero h1 {
  max-width: 820px;
}

.brand {
  color: inherit;
  text-decoration: none;
}

.news-card {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 38px);
}

.news-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(124, 58, 237, 0.08), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(249, 115, 91, 0.075), transparent 38%);
  pointer-events: none;
}

.news-card > * {
  position: relative;
}

.news-card .badge {
  margin-bottom: 24px;
}

.news-date {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 18px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.13em;
}

.news-date span:last-child {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 999px;
  color: #7138e8;
  background: rgba(124, 58, 237, 0.055);
}

.news-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 3.3vw, 48px);
  line-height: 1.04;
  font-weight: 590;
  letter-spacing: -0.026em;
}

.news-card h2 a {
  color: inherit;
  text-decoration: none;
}

.news-card h2 a:hover {
  color: #7138e8;
}

.news-summary {
  margin: 20px 0 0;
  color: #5b6473;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.015em;
}

.news-read {
  margin-top: 26px;
}

.news-read .button {
  min-height: 54px;
  padding-inline: 24px;
  font-size: 15px;
}

@media (max-width: 980px) {
  .news-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .news-hero::after {
    width: 260px;
    height: 260px;
    right: -80px;
    top: -70px;
  }
}

/* terms.html */
.terms-hero {
  max-width: 980px;
  margin: 0 auto;
}

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

.terms-hero .section-title {
  max-width: 760px;
}

.terms-meta {
  display: inline-flex;
  margin-top: 26px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 760;
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(105deg, rgba(109, 74, 255, 0.4), rgba(255, 117, 87, 0.42)) border-box;
}

.terms-layout {
  max-width: 980px;
  margin: clamp(38px, 7vw, 76px) auto 0;
}

.terms-panel {
  padding: clamp(26px, 5vw, 54px);
  border-radius: 24px;
}

.terms-content {
  color: #283142;
  font-size: clamp(16px, 1.55vw, 18px);
  line-height: 1.72;
}

.terms-content h2,
.terms-content h3 {
  color: var(--ink);
  letter-spacing: -0.02em;
}

.terms-content h2 {
  margin: 46px 0 14px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
  font-weight: 650;
}

.terms-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.terms-content h3 {
  margin: 30px 0 10px;
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.18;
  font-weight: 720;
}

.terms-content p {
  margin: 12px 0 0;
}

.terms-content ul,
.terms-content ol {
  margin: 14px 0 0;
  padding-left: 1.35rem;
}

.terms-content li {
  margin-top: 8px;
}

.terms-content a {
  color: #6d4aff;
  font-weight: 720;
}

.terms-closing {
  margin-top: 42px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: #4b5563;
  font-weight: 720;
}

@media (max-width: 640px) {
  .terms-panel {
    border-radius: 18px;
  }
}

/* privacy.html */
.legal-hero {
  max-width: 980px;
  margin: clamp(32px, 7vw, 72px) auto 0;
}

.legal-hero .section-title {
  max-width: 760px;
}

.legal-contact {
  max-width: 780px;
  margin-top: 28px;
  padding: 24px;
  border-left: 3px solid transparent;
  border-image: linear-gradient(180deg, var(--violet), var(--coral)) 1;
  color: #4b5563;
  font-size: 17px;
  line-height: 1.58;
}

.legal-doc {
  max-width: 980px;
  margin: clamp(42px, 8vw, 76px) auto 0;
  padding: clamp(26px, 5vw, 54px);
}

.legal-block {
  padding-block: clamp(28px, 5vw, 46px);
  border-top: 1px solid var(--line);
}

.legal-block:first-child {
  padding-top: 0;
  border-top: 0;
}

.legal-block h2,
.processing-purpose h3 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.legal-block h2 {
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.05;
  font-weight: 620;
}

.processing-purpose h3 {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.12;
  font-weight: 650;
}

.legal-block p,
.legal-block li {
  color: #4b5563;
  font-size: 16px;
  line-height: 1.65;
}

.legal-block p {
  margin: 18px 0 0;
}

.legal-block ul {
  margin: 18px 0 0;
  padding-left: 24px;
}

.legal-block li + li {
  margin-top: 8px;
}

.legal-block strong {
  color: var(--ink);
}

.processing-list {
  display: grid;
  gap: 30px;
  margin-top: 28px;
}

.processing-purpose {
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(124, 58, 237, 0.055), transparent 28%),
    #fff;
}

.details-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.details-label::before {
  content: "";
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--coral));
}

.legal-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.legal-table th,
.legal-table td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.legal-table tr:last-child th,
.legal-table tr:last-child td {
  border-bottom: 0;
}

.legal-table th {
  width: 190px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0.03em;
}

.legal-table td {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.58;
}

.legal-link {
  color: #7138e8;
  font-weight: 720;
  text-decoration: none;
}

.legal-link:hover {
  text-decoration: underline;
}

.privacy-footer {
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.privacy-footer-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.privacy-footer-note {
  max-width: 520px;
  color: #7b8494;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 680;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .legal-contact,
  .legal-doc {
    border-radius: 20px;
  }

  .legal-table {
    min-width: 560px;
  }

  .privacy-footer {
    align-items: flex-start;
  }
}

:is(
  button,
  .button,
  .plan-button,
  .primary-button,
  .secondary-button,
  .ghost-button,
  .fix-button,
  .icon-button,
  .plain-button,
  .button-lite,
  .button-solid,
  .send-button,
  .turn-action,
  .cancel-edit,
  .send-edit,
  .mode-switch button,
  .status-pill,
  .save-pill,
  .badge,
  .recommended-ribbon,
  .metric-chip,
  .small-pill,
  .ok-badge,
  .notok-badge,
  .queued-badge,
  .risk-pill,
  .tag
) {
  box-sizing: border-box;
  display: inline-grid !important;
  place-items: center !important;
  align-content: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1 !important;
  vertical-align: middle;
}

/* .nav-cta restored as separate rule so @media display:none can override */
.nav-cta {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  align-content: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  vertical-align: middle;
}

:is(
  .status-pill,
  .save-pill,
  .badge,
  .recommended-ribbon,
  .metric-chip,
  .small-pill,
  .risk-pill,
  .tag
) {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

:is(.ok-badge, .notok-badge, .queued-badge) {
  width: 74px;
  min-width: 74px;
  height: 28px;
  min-height: 28px;
  padding: 0 !important;
}

:is(.ok-badge, .notok-badge, .queued-badge)::first-line {
  line-height: 1 !important;
}

:is(.ok-badge, .notok-badge, .queued-badge)::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: -1px;
}


/* Extracted from pages/workbench.html */
:root {
        --app-bg: #f8fafc;
        --panel: #ffffff;
        --panel-soft: #fbfcfe;
        --app-line: #e3e8f0;
        --soft-ink: #344054;
        --app-shadow: 0 18px 54px rgba(17, 24, 39, 0.08);
      }

      body:has(.workbench) {
        overflow: hidden;
        background: #fff;
      }

      .workbench {
        display: grid;
        grid-template-rows: 70px minmax(0, 1fr);
        height: 100vh;
      }

      .appbar {
        display: grid;
        grid-template-columns: 260px minmax(0, 1fr) auto;
        align-items: center;
        gap: 18px;
        padding: 12px 22px;
        border-bottom: 1px solid rgba(219, 225, 234, 0.82);
        background: rgba(255, 255, 255, 0.92);
        box-shadow: none;
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        z-index: 5;
      }

      .brand {
        line-height: 0.95;
        letter-spacing: 0.06em;
        text-transform: uppercase;
      }

      .brand strong {
        display: block;
        color: var(--ink);
        font-size: 23px;
        letter-spacing: -0.035em;
      }

      .brand span {
        display: block;
        margin-top: 5px;
        color: #667085;
        font-size: 10px;
        letter-spacing: 0.2em;
      }

      .matter-title {
        min-width: 0;
      }

      .matter-title strong {
        display: block;
        overflow: hidden;
        color: var(--ink);
        font-size: 17px;
        font-weight: 820;
        letter-spacing: -0.025em;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .matter-title span {
        display: block;
        margin-top: 3px;
        overflow: hidden;
        color: #7b8494;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-overflow: ellipsis;
        text-transform: uppercase;
        white-space: nowrap;
      }

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

      .mode-switch {
        display: flex;
        gap: 6px;
        padding: 5px;
        border: 1px solid #dde3ec;
        border-radius: 999px;
        background: #fff;
      }

      .mode-switch button,
      .plain-button,
      .primary-button,
      .icon-button {
        font: inherit;
      }

      .mode-switch button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        border: 0;
        border-radius: 999px;
        padding: 0 13px;
        color: #667085;
        background: transparent;
        font-size: 12px;
        font-weight: 850;
        letter-spacing: 0.08em;
        line-height: 1;
        text-align: center;
        text-transform: uppercase;
      }

      .mode-switch button.active {
        color: #fff;
        background: var(--ink);
      }

      .plain-button,
      .primary-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        border-radius: 999px;
        padding: 0 16px;
        border: 1px solid #dbe1ea;
        background: #fff;
        color: var(--ink);
        font-size: 13px;
        font-weight: 850;
        line-height: 1;
        text-align: center;
      }

      .primary-button {
        border-color: transparent;
        color: #fff;
        background: linear-gradient(105deg, #6d4aff 0%, #9b5cf6 48%, #ff7557 100%);
        box-shadow: 0 14px 30px rgba(109, 74, 255, 0.16);
      }

      .icon-button {
        display: none;
        width: 42px;
        height: 42px;
        border: 1px solid #dbe1ea;
        border-radius: 999px;
        background: #fff;
        color: var(--ink);
      }

      .workspace {
        display: grid;
        grid-template-columns: 260px minmax(560px, 1fr) 330px;
        min-height: 0;
      }

      .sidebar,
      .source-rail {
        min-height: 0;
        overflow: auto;
        border-color: rgba(219, 225, 234, 0.88);
        background: #fbfcfe;
      }

      .sidebar {
        border-right: 1px solid var(--app-line);
        padding: 18px;
      }

      .source-rail {
        border-left: 1px solid var(--app-line);
        padding: 18px;
      }

      .new-query {
        width: 100%;
        min-height: 48px;
        border: 1px solid transparent;
        border-radius: 999px;
        background: linear-gradient(105deg, #6d4aff 0%, #9b5cf6 48%, #ff7557 100%);
        color: #fff;
        font: inherit;
        font-size: 14px;
        font-weight: 860;
        letter-spacing: -0.01em;
      }

      .side-block {
        margin-top: 24px;
      }

      .side-label,
      .meta-label,
      .answer-kicker {
        color: #8b94a5;
        font-size: 10px;
        font-weight: 860;
        letter-spacing: 0.18em;
        text-transform: uppercase;
      }

      .jurisdiction-card,
      .history-card,
      .source-card {
        border: 0;
        border-radius: 12px;
        background: transparent;
      }

      .jurisdiction-card {
        margin-top: 10px;
        padding: 4px 0 0;
      }

      .jurisdiction-card strong,
      .source-card strong {
        display: block;
        color: var(--ink);
        font-size: 15px;
        line-height: 1.18;
        letter-spacing: -0.018em;
      }

      .jurisdiction-card span,
      .source-card span {
        display: block;
        margin-top: 6px;
        color: #667085;
        font-size: 12px;
        line-height: 1.35;
      }

      .mini-link {
        display: inline-flex;
        margin-top: 12px;
        color: #7c3aed;
        font-size: 12px;
        font-weight: 850;
        text-decoration: none;
      }

      .history-list,
      .source-list,
      .action-list {
        display: grid;
        gap: 2px;
        margin-top: 10px;
      }

      .history-card {
        padding: 9px 10px;
        color: #4b5563;
        font-size: 12px;
        line-height: 1.35;
      }

      .history-card.active {
        color: var(--ink);
        background:
          linear-gradient(105deg, rgba(109, 74, 255, 0.12), rgba(168, 85, 247, 0.09) 52%, rgba(249, 115, 91, 0.12));
      }

      .usage {
        margin-top: auto;
        padding-top: 22px;
      }

      .usage-bar {
        height: 7px;
        margin-top: 10px;
        overflow: hidden;
        border-radius: 999px;
        background: #edf1f6;
      }

      .usage-bar span {
        display: block;
        width: 38%;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, #6d4aff, #f9735b);
      }

      .main-column {
        min-height: 0;
        display: grid;
        grid-template-rows: minmax(0, 1fr) auto;
      }

      .answer-scroll {
        min-height: 0;
        overflow: auto;
        padding: 24px 28px;
      }

      .thread {
        max-width: 800px;
        margin: 0 auto;
        padding-bottom: 80px;
      }

      .user-turn {
        position: relative;
        max-width: 620px;
        margin: 0 0 22px auto;
        padding: 13px 16px;
        border-radius: 18px 18px 5px 18px;
        background:
          linear-gradient(105deg, rgba(109, 74, 255, 0.14), rgba(168, 85, 247, 0.1) 48%, rgba(249, 115, 91, 0.13));
        color: #253044;
        font-size: 15px;
        line-height: 1.48;
        letter-spacing: -0.01em;
      }

      .turn-actions {
        position: absolute;
        top: calc(100% + 6px);
        right: 6px;
        display: flex;
        gap: 4px;
        opacity: 0.7;
        transition: opacity 140ms ease;
      }

      .user-turn:hover .turn-actions,
      .user-turn:focus-within .turn-actions {
        opacity: 1;
      }

      .turn-action {
        display: inline-grid;
        place-items: center;
        width: 28px;
        height: 28px;
        border: 1px solid rgba(124, 58, 237, 0.16);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.78);
        color: #7138e8;
        cursor: pointer;
      }

      .turn-action svg {
        width: 14px;
        height: 14px;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
        fill: none;
      }

      .turn-action.is-done {
        color: #f9735b;
      }

      .turn-edit {
        display: none;
        gap: 8px;
      }

      .user-turn.is-editing {
        padding-right: 16px;
      }

      .user-turn.is-editing .turn-text,
      .user-turn.is-editing .turn-actions {
        display: none;
      }

      .user-turn.is-editing .turn-edit {
        display: grid;
      }

      .turn-edit textarea {
        min-height: 94px;
        resize: vertical;
        border: 1px solid rgba(124, 58, 237, 0.2);
        border-radius: 14px;
        padding: 10px 12px;
        outline: 0;
        background: rgba(255, 255, 255, 0.84);
        color: var(--ink);
        font: inherit;
        line-height: 1.45;
      }

      .turn-edit-actions {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
      }

      .turn-edit-actions button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        border-radius: 999px;
        padding: 0 12px;
        border: 1px solid rgba(124, 58, 237, 0.18);
        background: #fff;
        color: var(--ink);
        font: inherit;
        font-size: 12px;
        font-weight: 820;
        line-height: 1;
        text-align: center;
      }

      .turn-edit-actions .send-edit {
        border-color: transparent;
        background: var(--ink);
        color: #fff;
      }

      .assistant-turn + .user-turn {
        margin-top: 34px;
      }

      .answer-document {
        max-width: 800px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
      }

      .assistant-turn + .assistant-turn,
      .user-turn + .assistant-turn {
        margin-top: 18px;
      }

      .assistant-turn.follow-up {
        padding-top: 24px;
        border-top: 1px solid #edf1f6;
      }

      .doc-header {
        display: block;
        padding-bottom: 4px;
        border-bottom: 0;
      }

      .doc-header h1,
      .assistant-turn.follow-up .doc-header h2 {
        max-width: 700px;
        margin: 6px 0 0;
        color: var(--ink);
        font-size: 18px;
        line-height: 1.35;
        letter-spacing: -0.015em;
        font-weight: 760;
      }

      .confidence {
        display: none;
      }

      .confidence strong {
        display: block;
        color: var(--ink);
        font-size: 22px;
        line-height: 1;
        letter-spacing: -0.045em;
      }

      .confidence span {
        display: block;
        margin-top: 6px;
        color: #7b8494;
        font-size: 10px;
        font-weight: 850;
        letter-spacing: 0.12em;
        text-transform: uppercase;
      }

      .doc-section {
        padding-top: 22px;
      }

      .doc-section h2 {
        margin: 0;
        color: var(--ink);
        font-size: 18px;
        line-height: 1.25;
        letter-spacing: -0.018em;
      }

      .doc-section h3 {
        margin: 18px 0 0;
        color: var(--ink);
        font-size: 15px;
        line-height: 1.2;
        letter-spacing: -0.006em;
      }

      .doc-section p {
        margin: 10px 0 0;
        color: #465264;
        font-size: 15px;
        line-height: 1.64;
        letter-spacing: -0.006em;
      }

      .doc-section strong {
        color: var(--ink);
      }

      .doc-section ul,
      .doc-section ol {
        margin: 10px 0 0;
        padding-left: 22px;
        color: #465264;
        font-size: 15px;
        line-height: 1.58;
      }

      .doc-section li + li {
        margin-top: 7px;
      }

      .summary-box {
        margin-top: 10px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
      }

      .summary-box p {
        margin: 0;
        color: #303947;
        font-size: 15px;
        line-height: 1.64;
      }

      .two-track {
        display: block;
        margin-top: 4px;
      }

      .track-card {
        padding: 0;
        border: 0;
        background: transparent;
      }

      .track-card + .track-card {
        margin-top: 14px;
      }

      .track-card h3 {
        margin-top: 14px;
      }

      .source-marker {
        display: inline-flex;
        align-items: center;
        min-height: 18px;
        margin-left: 4px;
        padding: 0 6px;
        border-radius: 999px;
        color: #7138e8;
        background: rgba(124, 58, 237, 0.08);
        font-size: 10px;
        font-weight: 850;
        vertical-align: middle;
      }

      .composer {
        padding: 14px 24px;
        border-top: 1px solid var(--app-line);
        background: rgba(255, 255, 255, 0.92);
      }

      .composer-box {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: end;
        gap: 12px;
        max-width: 980px;
        margin: 0 auto;
        padding: 10px;
        border: 1px solid #dfe5ee;
        border-radius: 18px;
        background: #fff;
        box-shadow: none;
      }

      .composer textarea {
        min-height: 58px;
        resize: none;
        border: 0;
        outline: 0;
        color: var(--ink);
        font: inherit;
        font-size: 15px;
        line-height: 1.45;
      }

      .send-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        border: 0;
        border-radius: 999px;
        padding: 0 16px;
        background: var(--ink);
        color: #fff;
        font: inherit;
        font-size: 13px;
        font-weight: 850;
        line-height: 1;
        text-align: center;
      }

      .composer.is-generating .send-button {
        background: #fff;
        color: var(--ink);
        border: 1px solid #dbe1ea;
      }

      .composer.is-generating .composer-box {
        border-color: rgba(249, 115, 91, 0.45);
      }

      .composer.is-generating .composer-note::before {
        content: "Generating answer. ";
        color: #7138e8;
      }

      .composer-note {
        max-width: 980px;
        margin: 8px auto 0;
        color: #8b94a5;
        font-size: 10px;
        font-weight: 760;
        letter-spacing: 0.09em;
        text-transform: uppercase;
      }

      .rail-header {
        position: sticky;
        top: 0;
        padding-bottom: 14px;
        background: linear-gradient(rgba(251, 252, 254, 0.98), rgba(251, 252, 254, 0.86));
        z-index: 1;
      }

      .rail-header h2 {
        margin: 0;
        color: var(--ink);
        font-size: 22px;
        line-height: 1;
        letter-spacing: -0.04em;
      }

      .rail-header p {
        margin: 8px 0 0;
        color: #697386;
        font-size: 12px;
        line-height: 1.4;
      }

      .source-card,
      .suggested-question {
        position: relative;
        display: block;
        min-height: 0;
        padding: 12px 0 12px 30px;
        border-bottom: 1px solid #edf1f6;
        border-radius: 0;
      }

      .source-card::before,
      .suggested-question::before {
        content: "";
        position: absolute;
        left: 0;
        top: 14px;
        width: 17px;
        height: 17px;
        background: var(--tone, #7c3aed);
        -webkit-mask: var(--icon) center / contain no-repeat;
        mask: var(--icon) center / contain no-repeat;
      }

      .source-card {
        --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 3.8h7.1l3.9 3.9v12.5h-11z'/%3E%3Cpath d='M13.4 4v4h4'/%3E%3Cpath d='M9.2 12.1h5.6M9.2 15h5.6M9.2 17.9h3.4'/%3E%3C/svg%3E");
      }

      .suggested-question {
        --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M13 6l6 6-6 6'/%3E%3C/svg%3E");
      }

      .source-card:nth-child(2) { --tone: #9b5cf6; }
      .source-card:nth-child(3) { --tone: #d65aa8; }
      .source-card:nth-child(4) { --tone: #f9735b; }
      .source-card:nth-child(5) { --tone: #7138e8; }

      .source-card a {
        display: inline-flex;
        margin-top: 10px;
        color: #7c3aed;
        font-size: 12px;
        font-weight: 850;
        text-decoration: none;
      }

      .suggested-question button {
        border: 0;
        padding: 0;
        background: transparent;
        color: var(--ink);
        font: inherit;
        font-size: 13px;
        font-weight: 780;
        line-height: 1.3;
        text-align: left;
        cursor: pointer;
      }

      .suggested-question span {
        display: block;
        margin-top: 5px;
        color: #697386;
        font-size: 11px;
        line-height: 1.35;
      }

      @media (max-width: 1180px) {
        .workspace {
          grid-template-columns: 230px minmax(0, 1fr);
        }

        .source-rail {
          display: none;
        }
      }

      @media (max-width: 820px) {
        body {
          overflow: auto;
        }

        .workbench {
          height: auto;
          min-height: 100vh;
        }

        .appbar {
          grid-template-columns: 1fr auto;
        }

        .matter-title,
        .top-actions .plain-button,
        .top-actions .mode-switch {
          display: none !important;
        }

        .icon-button {
          display: inline-grid;
          place-items: center;
        }

        .workspace {
          display: block;
        }

        .sidebar {
          display: none;
        }

        .main-column {
          display: block;
        }

        .answer-scroll {
          overflow: visible;
          padding: 16px;
        }

        .thread {
          padding-bottom: 30px;
        }

        .user-turn {
          max-width: 92%;
        }

        .answer-document {
          padding: 24px 18px;
          border-radius: 24px;
        }

        .doc-header {
          display: block;
        }

        .confidence {
          width: max-content;
          margin-top: 16px;
        }

        .two-track {
          grid-template-columns: 1fr;
        }

        .composer {
          position: sticky;
          bottom: 0;
          padding: 12px;
        }

        .composer-box {
          grid-template-columns: 1fr;
        }

        /* Mobile tap-target enlargement (WCAG 2.5.5) */
        .turn-action {
          width: 44px;
          height: 44px;
        }
        .turn-action svg {
          width: 18px;
          height: 18px;
        }
        .icon-button {
          min-width: 44px;
          min-height: 44px;
        }
      }


/* Extracted from pages/settings.html */
:root {
        --settings-bg: #ffffff;
        --settings-panel: #ffffff;
        --settings-soft: #fbfcfe;
        --settings-line: #e4e9f1;
        --settings-muted: #667085;
        --settings-faint: #8a94a6;
        --settings-ink: #111827;
      }

      body {
        background: var(--settings-bg);
      }

      .settings-shell {
        min-height: 100vh;
        padding: 30px clamp(18px, 4vw, 56px) 52px;
      }

      .settings-shell .nav {
        margin-bottom: 30px;
      }

      .settings-layout {
        display: grid;
        grid-template-columns: 276px minmax(0, 1fr);
        gap: 24px;
        width: 100%;
        max-width: 1240px;
        margin-inline: auto;
        align-items: start;
      }

      .settings-sidebar {
        position: sticky;
        top: 112px;
        padding: 4px 18px 4px 0;
        border-right: 1px solid var(--settings-line);
        background: transparent;
      }

      .workspace-label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--settings-line);
      }

      .workspace-label strong {
        display: block;
        color: var(--settings-ink);
        font-size: 14px;
        font-weight: 820;
        letter-spacing: -0.01em;
      }

      .workspace-label span {
        display: block;
        margin-top: 4px;
        color: var(--settings-muted);
        font-size: 12px;
        font-weight: 680;
      }

      .workspace-badge {
        flex: 0 0 auto;
        min-width: 34px;
        height: 34px;
        border-radius: 8px;
        display: grid;
        place-items: center;
        color: #fff;
        font-size: 12px;
        font-weight: 880;
        background: linear-gradient(135deg, #6d4aff, #9b5cf6 52%, #ff7557);
      }

      .settings-nav-list {
        display: grid;
        gap: 6px;
        margin: 16px 0 0;
        padding: 0;
        list-style: none;
      }

      .settings-nav-list a {
        display: grid;
        gap: 3px;
        padding: 11px 12px;
        border-radius: 8px;
        color: var(--settings-muted);
        text-decoration: none;
      }

      .settings-nav-list a:hover,
      .settings-nav-list a.active {
        background: #f4f6fa;
        color: var(--settings-ink);
      }

      .settings-nav-list strong {
        font-size: 13px;
        font-weight: 830;
        letter-spacing: -0.01em;
      }

      .settings-nav-list span {
        color: inherit;
        font-size: 11px;
        font-weight: 660;
        line-height: 1.35;
        opacity: 0.82;
      }

      .settings-content {
        min-width: 0;
      }

      .settings-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 18px;
        align-items: end;
        margin-bottom: 20px;
      }

      .settings-kicker {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 12px;
        color: #374151;
        font-size: 12px;
        font-weight: 820;
        letter-spacing: 0.14em;
        text-transform: uppercase;
      }

      .settings-kicker::before {
        content: "";
        width: 9px;
        height: 9px;
        border-radius: 2px;
        background: linear-gradient(135deg, #6d4aff, #ff7557);
      }

      .settings-header h1 {
        margin: 0;
        color: var(--settings-ink);
        font-size: clamp(34px, 4.4vw, 58px);
        font-weight: 610;
        line-height: 1;
        letter-spacing: -0.045em;
      }

      .settings-header p {
        max-width: 720px;
        margin: 14px 0 0;
        color: var(--settings-muted);
        font-size: 16px;
        line-height: 1.6;
      }

      .save-strip {
        display: flex;
        align-items: center;
        gap: 10px;
        justify-content: flex-end;
      }

      .button-lite,
      .button-solid {
        min-height: 44px;
        padding: 0 15px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--settings-line);
        background: #fff;
        color: var(--settings-ink);
        font: inherit;
        font-size: 13px;
        font-weight: 820;
        line-height: 1;
        text-align: center;
        text-decoration: none;
      }

      .button-solid {
        border-color: transparent;
        color: #fff;
        background: linear-gradient(105deg, #6d4aff 0%, #9b5cf6 48%, #ff7557 100%);
        box-shadow: 0 12px 28px rgba(109, 74, 255, 0.13);
      }

      .settings-grid {
        display: grid;
        gap: 0;
      }

      .settings-section {
        border-top: 1px solid var(--settings-line);
        background: var(--settings-panel);
      }

      .settings-section:last-child {
        border-bottom: 1px solid var(--settings-line);
      }

      .section-heading {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 16px;
        align-items: start;
        padding: 26px 0 18px;
        border-bottom: 1px solid var(--settings-line);
        background: transparent;
      }

      .section-heading h2 {
        margin: 0;
        color: var(--settings-ink);
        font-size: 21px;
        font-weight: 780;
        letter-spacing: -0.025em;
      }

      .section-heading p {
        max-width: 760px;
        margin: 7px 0 0;
        color: var(--settings-muted);
        font-size: 14px;
        line-height: 1.55;
      }

      .status-pill,
      .risk-pill {
        display: inline-flex;
        min-height: 28px;
        align-items: center;
        justify-content: center;
        border: 1px solid #ded7ff;
        border-radius: 999px;
        padding: 0 10px;
        color: #5f3deb;
        background: #f7f4ff;
        font-size: 11px;
        font-weight: 850;
        letter-spacing: 0.06em;
        line-height: 1;
        text-align: center;
        text-transform: uppercase;
        white-space: nowrap;
      }

      .risk-pill {
        border-color: #ffd8cf;
        color: #b9472f;
        background: #fff6f3;
      }

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

      .setting-row {
        display: grid;
        gap: 8px;
        min-height: 92px;
        padding: 18px 24px 18px 0;
        border-bottom: 1px solid var(--settings-line);
      }

      .setting-row:nth-child(odd) {
        border-right: 0;
      }

      .setting-row:nth-child(even) {
        padding-left: 24px;
        padding-right: 0;
      }

      .field-grid .setting-row:nth-last-child(-n + 2) {
        border-bottom: 0;
      }

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

      .setting-label label,
      .setting-label strong {
        color: var(--settings-ink);
        font-size: 13px;
        font-weight: 820;
      }

      .setting-help {
        margin: 0;
        color: var(--settings-muted);
        font-size: 12px;
        line-height: 1.45;
      }

      input,
      select {
        width: 100%;
        min-height: 42px;
        border: 1px solid #dfe5ee;
        border-radius: 8px;
        padding: 0 12px;
        color: var(--settings-ink);
        background: #fff;
        font: inherit;
        font-size: 13px;
        font-weight: 650;
      }

      .readonly-value,
      .usage-meter {
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        border: 0;
        border-radius: 0;
        padding: 0;
        color: var(--settings-ink);
        background: transparent;
        font-size: 13px;
        font-weight: 720;
      }

      .readonly-value span {
        color: var(--settings-muted);
        font-size: 12px;
        font-weight: 760;
      }

      .toggle-row,
      .compact-list {
        display: grid;
        gap: 0;
        padding: 0;
      }

      .toggle-item,
      .list-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 18px;
        align-items: center;
        padding: 14px 0;
        border-bottom: 1px solid var(--settings-line);
      }

      .toggle-item:last-child,
      .list-item:last-child {
        border-bottom: 0;
      }

      .toggle-item strong,
      .list-item strong {
        display: block;
        color: var(--settings-ink);
        font-size: 13px;
        font-weight: 820;
      }

      .toggle-item p,
      .list-item p {
        margin: 4px 0 0;
        color: var(--settings-muted);
        font-size: 12px;
        line-height: 1.45;
      }

      .switch {
        position: relative;
        width: 46px;
        height: 26px;
        border-radius: 999px;
        background: #d9e0ea;
      }

      .switch.on {
        background: linear-gradient(105deg, #6d4aff, #9b5cf6);
      }

      .switch::after {
        content: "";
        position: absolute;
        top: 4px;
        left: 4px;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 3px 8px rgba(17, 24, 39, 0.18);
      }

      .switch.on::after {
        left: 24px;
      }

      .usage-wrap {
        display: grid;
        gap: 8px;
        width: 100%;
      }

      .meter-track {
        height: 8px;
        border-radius: 999px;
        background: #eef1f6;
        overflow: hidden;
      }

      .meter-fill {
        display: block;
        width: 68%;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(105deg, #6d4aff, #9b5cf6 58%, #ff7557);
      }

      .table-mini {
        width: 100%;
        border-collapse: collapse;
        font-size: 13px;
      }

      .table-mini th,
      .table-mini td {
        padding: 14px 0;
        border-bottom: 1px solid var(--settings-line);
        text-align: left;
      }

      .table-mini th {
        color: var(--settings-faint);
        font-size: 11px;
        font-weight: 850;
        letter-spacing: 0.1em;
        text-transform: uppercase;
      }

      .table-mini td {
        color: var(--settings-ink);
        font-weight: 690;
      }

      .table-mini tr:last-child td {
        border-bottom: 0;
      }

      .tag-stack {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
      }

      .tag {
        display: inline-flex;
        min-height: 30px;
        align-items: center;
        border: 1px solid #e4e9f1;
        border-radius: 999px;
        padding: 0 10px;
        background: #fff;
        color: #3f4654;
        font-size: 12px;
        font-weight: 780;
      }

      .tag.selected {
        border-color: #ded7ff;
        color: #5f3deb;
        background: #f7f4ff;
      }

      .danger-zone {
        border-top-color: #ffd8cf;
        background: #fff;
      }

      .danger-zone .section-heading {
        border-bottom-color: #ffd8cf;
        background: transparent;
      }

      @media (max-width: 980px) {
        .settings-layout {
          grid-template-columns: 1fr;
        }

        .settings-sidebar {
          position: static;
          padding: 0 0 18px;
          border-right: 0;
          border-bottom: 1px solid var(--settings-line);
        }

        .settings-nav-list {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
      }

      @media (max-width: 760px) {
        .settings-shell {
          padding-inline: 16px;
        }

        .settings-header,
        .section-heading,
        .toggle-item,
        .list-item {
          grid-template-columns: 1fr;
        }

        .save-strip {
          justify-content: flex-start;
        }

        .field-grid,
        .settings-nav-list {
          grid-template-columns: 1fr;
        }

        .setting-row:nth-child(odd) {
          border-right: 0;
        }

        .setting-row:nth-child(even) {
          padding-left: 0;
        }

        .field-grid .setting-row:nth-last-child(2) {
          border-bottom: 1px solid var(--settings-line);
        }
      }


/* Extracted from pages/admin.html */
:root {
        --admin-bg: #f8fafc;
        --admin-panel: #ffffff;
        --admin-soft: #fbfcfe;
        --admin-line: #e3e8f0;
        --admin-line-strong: #d6deea;
        --admin-ink: #111827;
        --admin-muted: #667085;
        --admin-faint: #8b94a5;
        --admin-violet: #6d4aff;
        --admin-lavender: #9b5cf6;
        --admin-coral: #ff7557;
        --admin-blue: #2563eb;
        --admin-red: #d92d20;
        --admin-shadow: 0 22px 70px rgba(17, 24, 39, 0.08);
      }

      body:has(.admin-console-shell) {
        min-height: 100vh;
        overflow: hidden;
        background: var(--admin-bg);
      }

      button,
      input,
      select {
        font: inherit;
      }

      .admin-shell {
        display: grid;
        grid-template-rows: 72px minmax(0, 1fr);
        height: 100vh;
        color: var(--admin-ink);
      }

      .admin-topbar {
        display: grid;
        grid-template-columns: 270px minmax(0, 1fr) auto;
        align-items: center;
        gap: 20px;
        padding: 12px 22px;
        border-bottom: 1px solid rgba(219, 225, 234, 0.9);
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        z-index: 10;
      }

      .brand {
        line-height: 0.95;
        letter-spacing: 0.06em;
        text-transform: uppercase;
      }

      .brand strong {
        display: block;
        color: var(--admin-ink);
        font-size: 23px;
        letter-spacing: -0.035em;
      }

      .brand span {
        display: block;
        margin-top: 5px;
        color: var(--admin-muted);
        font-size: 10px;
        letter-spacing: 0.2em;
      }

      .topbar-title {
        min-width: 0;
      }

      .topbar-title strong {
        display: block;
        overflow: hidden;
        font-size: 17px;
        font-weight: 820;
        letter-spacing: -0.025em;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .topbar-title span {
        display: block;
        margin-top: 3px;
        overflow: hidden;
        color: var(--admin-faint);
        font-size: 12px;
        font-weight: 760;
        letter-spacing: 0.08em;
        text-overflow: ellipsis;
        text-transform: uppercase;
        white-space: nowrap;
      }

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

      .status-pill,
      .small-pill,
      .metric-chip {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 30px;
        border: 1px solid var(--admin-line);
        border-radius: 999px;
        background: #fff;
        color: #475467;
        font-size: 11px;
        font-weight: 850;
        letter-spacing: 0.07em;
        line-height: 1;
        text-align: center;
        text-transform: uppercase;
        white-space: nowrap;
      }

      .status-pill {
        min-height: 38px;
        padding: 0 14px;
      }

      .status-pill::before,
      .small-pill::before {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: var(--admin-violet);
      }

      .status-pill.alert::before,
      .small-pill.alert::before {
        background: var(--admin-red);
      }

      .primary-button,
      .secondary-button,
      .ghost-button,
      .icon-button {
        border: 1px solid var(--admin-line-strong);
        background: #fff;
        color: var(--admin-ink);
        cursor: default;
        font-weight: 850;
      }

      .primary-button,
      .secondary-button,
      .ghost-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        border-radius: 999px;
        padding: 0 16px;
        font-size: 13px;
        letter-spacing: -0.01em;
        line-height: 1;
        text-align: center;
      }

      .primary-button {
        border-color: transparent;
        color: #fff;
        background: linear-gradient(105deg, #6d4aff 0%, #9b5cf6 48%, #ff7557 100%);
        box-shadow: 0 14px 30px rgba(109, 74, 255, 0.16);
      }

      .ghost-button {
        min-height: 34px;
        padding: 0 12px;
        color: #4b5563;
        font-size: 12px;
      }

      .icon-button {
        display: none;
        width: 42px;
        height: 42px;
        border-radius: 999px;
      }

      .admin-workspace {
        display: grid;
        grid-template-columns: 270px minmax(0, 1fr);
        min-height: 0;
      }

      .admin-sidebar {
        min-height: 0;
        overflow: auto;
        border-right: 1px solid var(--admin-line);
        background: #fbfcfe;
        padding: 18px;
      }

      .nav-section {
        margin-bottom: 24px;
      }

      .nav-label,
      .eyebrow,
      .meta-label {
        color: var(--admin-faint);
        font-size: 10px;
        font-weight: 860;
        letter-spacing: 0.18em;
        text-transform: uppercase;
      }

      .nav-tabs {
        display: grid;
        gap: 7px;
        margin-top: 10px;
      }

      .nav-tab {
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        min-height: 46px;
        border: 1px solid transparent;
        border-radius: 12px;
        padding: 0 11px;
        color: #4b5563;
        text-align: left;
      }

      .nav-tab svg {
        width: 18px;
        height: 18px;
        color: #7b8494;
      }

      .nav-tab strong {
        display: block;
        overflow: hidden;
        font-size: 13px;
        font-weight: 850;
        letter-spacing: -0.01em;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .nav-tab span {
        min-width: 22px;
        color: #98a2b3;
        font-size: 11px;
        font-weight: 850;
        text-align: right;
      }

      .admin-radio {
        position: fixed;
        opacity: 0;
        pointer-events: none;
      }

      #tab-overview:checked ~ .admin-workspace label[for="tab-overview"],
      #tab-operations:checked ~ .admin-workspace label[for="tab-operations"],
      #tab-api:checked ~ .admin-workspace label[for="tab-api"],
      #tab-models:checked ~ .admin-workspace label[for="tab-models"],
      #tab-2fa:checked ~ .admin-workspace label[for="tab-2fa"] {
        border-color: rgba(109, 74, 255, 0.16);
        background: #fff;
        color: var(--admin-ink);
        box-shadow: 0 12px 28px rgba(17, 24, 39, 0.05);
      }

      #tab-overview:checked ~ .admin-workspace label[for="tab-overview"] svg,
      #tab-operations:checked ~ .admin-workspace label[for="tab-operations"] svg,
      #tab-api:checked ~ .admin-workspace label[for="tab-api"] svg,
      #tab-models:checked ~ .admin-workspace label[for="tab-models"] svg,
      #tab-2fa:checked ~ .admin-workspace label[for="tab-2fa"] svg {
        color: var(--admin-violet);
      }

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

      .sidebar-panel strong {
        display: block;
        font-size: 14px;
        letter-spacing: -0.01em;
      }

      .sidebar-panel p {
        margin: 7px 0 0;
        color: var(--admin-muted);
        font-size: 12px;
        line-height: 1.45;
      }

      .admin-main {
        min-width: 0;
        min-height: 0;
        overflow: auto;
        padding: 28px clamp(22px, 3vw, 42px) 46px;
      }

      .view {
        display: none;
        max-width: 1220px;
        margin-inline: auto;
      }

      #tab-overview:checked ~ .admin-workspace .overview-view,
      #tab-operations:checked ~ .admin-workspace .operations-view,
      #tab-api:checked ~ .admin-workspace .api-view,
      #tab-models:checked ~ .admin-workspace .models-view,
      #tab-2fa:checked ~ .admin-workspace .twofa-view {
        display: block;
      }

      .page-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 24px;
        margin-bottom: 22px;
      }

      .page-header h1 {
        margin: 6px 0 0;
        max-width: 780px;
        font-size: clamp(30px, 4vw, 50px);
        font-weight: 620;
        line-height: 1.02;
        letter-spacing: -0.045em;
      }

      .page-header p {
        max-width: 720px;
        margin: 10px 0 0;
        color: var(--admin-muted);
        font-size: 14px;
        line-height: 1.55;
      }

      .header-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 10px;
      }

      .metrics-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
        margin-bottom: 18px;
      }

      .metric-card,
      .panel,
      .table-wrap,
      .journey-row,
      .endpoint-row,
      .model-row,
      .access-row {
        border: 1px solid var(--admin-line);
        background: #fff;
        box-shadow: 0 14px 38px rgba(17, 24, 39, 0.04);
      }

      .metric-card {
        min-height: 146px;
        border-radius: 16px;
        padding: 17px;
      }

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

      .metric-card h2 {
        margin: 16px 0 0;
        font-size: 34px;
        font-weight: 720;
        letter-spacing: -0.045em;
      }

      .metric-card p {
        margin: 4px 0 0;
        color: var(--admin-muted);
        font-size: 13px;
        line-height: 1.4;
      }

      .metric-chip {
        min-height: 28px;
        padding: 0 10px;
        color: var(--admin-violet);
        background: #f6f2ff;
        border-color: #eadfff;
      }

      .metric-chip.warning {
        color: var(--admin-red);
        background: #fff5f4;
        border-color: #ffd9d3;
      }

      .metric-spark {
        display: flex;
        align-items: end;
        gap: 5px;
        height: 34px;
        margin-top: 15px;
      }

      .metric-spark span {
        flex: 1;
        min-width: 7px;
        border-radius: 999px 999px 4px 4px;
        background: linear-gradient(180deg, #9b5cf6, #ff7557);
        opacity: 0.82;
      }

      .dashboard-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
        gap: 16px;
      }

      .panel {
        border-radius: 18px;
        padding: 18px;
      }

      .panel-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 16px;
      }

      .panel-header h2 {
        margin: 0;
        font-size: 18px;
        font-weight: 820;
        letter-spacing: -0.025em;
      }

      .panel-header p {
        margin: 4px 0 0;
        color: var(--admin-muted);
        font-size: 13px;
        line-height: 1.45;
      }

      .chart-area {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 12px;
        min-height: 260px;
      }

      .chart-axis {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 8px 0 26px;
        color: #98a2b3;
        font-size: 11px;
        font-weight: 750;
        text-align: right;
      }

      .chart-bars {
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        align-items: end;
        gap: 10px;
        min-width: 0;
        border-bottom: 1px solid var(--admin-line);
        background:
          linear-gradient(var(--admin-line), var(--admin-line)) 0 25% / 100% 1px no-repeat,
          linear-gradient(var(--admin-line), var(--admin-line)) 0 50% / 100% 1px no-repeat,
          linear-gradient(var(--admin-line), var(--admin-line)) 0 75% / 100% 1px no-repeat;
      }

      .bar-column {
        display: grid;
        grid-template-rows: minmax(0, 1fr) 24px;
        align-items: end;
        gap: 7px;
        min-width: 0;
      }

      .bar-stack {
        display: grid;
        align-items: end;
        gap: 4px;
      }

      .bar {
        width: 100%;
        min-height: 18px;
        border-radius: 9px 9px 4px 4px;
        background: linear-gradient(180deg, #6d4aff, #9b5cf6);
      }

      .bar.cancel {
        background: linear-gradient(180deg, #ff7557, #ffad9d);
      }

      .bar-column span {
        overflow: hidden;
        color: #7b8494;
        font-size: 11px;
        font-weight: 760;
        text-align: center;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .security-list,
      .compact-list {
        display: grid;
        gap: 10px;
      }

      .security-item,
      .compact-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        align-items: center;
        min-height: 58px;
        border-bottom: 1px solid var(--admin-line);
      }

      .security-item:last-child,
      .compact-item:last-child {
        border-bottom: 0;
      }

      .security-item strong,
      .compact-item strong {
        display: block;
        font-size: 13px;
        letter-spacing: -0.01em;
      }

      .security-item span,
      .compact-item span {
        display: block;
        margin-top: 4px;
        color: var(--admin-muted);
        font-size: 12px;
        line-height: 1.35;
      }

      .ok-badge,
      .notok-badge,
      .queued-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 28px;
        min-width: 74px;
        border-radius: 999px;
        padding: 0 10px;
        font-size: 11px;
        font-weight: 900;
        letter-spacing: 0.08em;
        line-height: 1;
        text-align: center;
        text-transform: uppercase;
      }

      .ok-badge {
        border: 1px solid #d6deea;
        background: #f8fafc;
        color: #344054;
      }

      .notok-badge {
        border: 1px solid #ffd9d3;
        background: #fff5f4;
        color: var(--admin-red);
      }

      .queued-badge {
        border: 1px solid #eadfff;
        background: #f6f2ff;
        color: var(--admin-violet);
      }

      .security-item .ok-badge,
      .security-item .notok-badge,
      .security-item .queued-badge,
      .compact-item .ok-badge,
      .compact-item .notok-badge,
      .compact-item .queued-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-top: 0;
        line-height: 1;
        text-align: center;
      }

      .security-item .ok-badge,
      .compact-item .ok-badge {
        color: #344054;
      }

      .security-item .notok-badge,
      .compact-item .notok-badge {
        color: var(--admin-red);
      }

      .security-item .queued-badge,
      .compact-item .queued-badge {
        color: var(--admin-violet);
      }

      .admin-shell .table-wrap,
      body:has(.admin-console-shell) .table-wrap {
        overflow: hidden;
        border-radius: 18px;
      }

      table {
        width: 100%;
        border-collapse: collapse;
      }

      th,
      td {
        padding: 14px 16px;
        border-bottom: 1px solid var(--admin-line);
        text-align: left;
        vertical-align: middle;
      }

      th {
        color: var(--admin-faint);
        font-size: 10px;
        font-weight: 860;
        letter-spacing: 0.16em;
        text-transform: uppercase;
      }

      td {
        color: #344054;
        font-size: 13px;
      }

      tr:last-child td {
        border-bottom: 0;
      }

      .two-col-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 16px;
      }

      .journey-toolbar,
      .model-toolbar,
      .api-toolbar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 16px;
      }

      .search-field,
      .select-field {
        min-height: 42px;
        border: 1px solid var(--admin-line-strong);
        border-radius: 999px;
        background: #fff;
        color: #475467;
        font-size: 13px;
        font-weight: 760;
      }

      .search-field {
        width: min(100%, 360px);
        padding: 0 15px;
      }

      .select-field {
        padding: 0 36px 0 14px;
      }

      .journey-list,
      .endpoint-list,
      .model-list,
      .access-list {
        display: grid;
        gap: 10px;
      }

      .journey-row {
        display: grid;
        grid-template-columns: 150px minmax(0, 1fr) auto;
        align-items: center;
        gap: 16px;
        border-radius: 16px;
        padding: 14px;
      }

      .journey-name strong,
      .endpoint-row strong,
      .model-row strong,
      .access-row strong {
        display: block;
        font-size: 14px;
        letter-spacing: -0.015em;
      }

      .journey-name span,
      .endpoint-row span,
      .model-row span,
      .access-row span {
        display: block;
        margin-top: 5px;
        color: var(--admin-muted);
        font-size: 12px;
        line-height: 1.35;
      }

      .journey-result {
        min-width: 0;
      }

      .journey-result p {
        margin: 8px 0 0;
        color: #475467;
        font-size: 12px;
        line-height: 1.42;
      }

      .journey-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
      }

      .fix-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        border: 1px solid transparent;
        border-radius: 999px;
        padding: 0 12px;
        background: linear-gradient(105deg, #6d4aff 0%, #9b5cf6 48%, #ff7557 100%);
        color: #fff;
        font-size: 12px;
        font-weight: 880;
        line-height: 1;
        text-align: center;
      }

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

      .workflow-step {
        min-height: 108px;
        border: 1px solid var(--admin-line);
        border-radius: 14px;
        padding: 13px;
        background: var(--admin-soft);
      }

      .workflow-step b {
        display: block;
        color: var(--admin-violet);
        font-size: 12px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
      }

      .workflow-step strong {
        display: block;
        margin-top: 8px;
        font-size: 14px;
        letter-spacing: -0.01em;
      }

      .workflow-step span {
        display: block;
        margin-top: 6px;
        color: var(--admin-muted);
        font-size: 12px;
        line-height: 1.35;
      }

      .endpoint-row,
      .model-row,
      .access-row {
        display: grid;
        align-items: center;
        gap: 14px;
        border-radius: 16px;
        padding: 14px;
      }

      .endpoint-row {
        grid-template-columns: minmax(170px, 0.7fr) minmax(0, 1fr) auto;
      }

      .endpoint-path {
        color: var(--admin-blue);
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: 12px;
        font-weight: 760;
      }

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

      .key-tile {
        border: 1px solid var(--admin-line);
        border-radius: 14px;
        padding: 14px;
        background: var(--admin-soft);
      }

      .key-tile code {
        display: block;
        overflow: hidden;
        margin-top: 8px;
        color: #475467;
        font-size: 12px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .model-row {
        grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1fr) 190px auto;
      }

      .model-callpoints {
        display: flex;
        flex-wrap: wrap;
        gap: 7px;
      }

      .small-pill {
        min-height: 26px;
        padding: 0 9px;
        font-size: 10px;
      }

      .provider-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 14px;
        align-items: center;
        border: 1px solid var(--admin-line);
        border-radius: 16px;
        padding: 16px;
        background:
          linear-gradient(120deg, rgba(109, 74, 255, 0.08), rgba(255, 117, 87, 0.08)),
          #fff;
      }

      .provider-card h2 {
        margin: 0;
        font-size: 18px;
        letter-spacing: -0.025em;
      }

      .provider-card p {
        margin: 5px 0 0;
        color: var(--admin-muted);
        font-size: 13px;
        line-height: 1.45;
      }

      .access-row {
        grid-template-columns: minmax(170px, 0.85fr) minmax(0, 1fr) auto;
      }

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

      .code-box {
        min-height: 42px;
        border: 1px dashed #cfd7e5;
        border-radius: 10px;
        padding: 11px 12px;
        background: var(--admin-soft);
        color: #475467;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: 12px;
      }

      .auth-device {
        display: grid;
        grid-template-columns: 138px minmax(0, 1fr);
        gap: 18px;
        align-items: center;
      }

      .qr-mock {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 5px;
        width: 138px;
        height: 138px;
        border: 1px solid var(--admin-line-strong);
        border-radius: 14px;
        padding: 12px;
        background: #fff;
      }

      .qr-mock span {
        border-radius: 3px;
        background: #111827;
      }

      .qr-mock span:nth-child(3n) {
        background: #d7ddea;
      }

      .qr-mock span:nth-child(5n) {
        background: var(--admin-violet);
      }

      .footer-note {
        margin-top: 18px;
        color: var(--admin-faint);
        font-size: 12px;
        line-height: 1.5;
      }

      @media (max-width: 1120px) {
        body {
          overflow: auto;
        }

        .admin-shell {
          height: auto;
          min-height: 100vh;
        }

        .admin-topbar {
          grid-template-columns: minmax(0, 1fr) auto;
        }

        .topbar-title {
          display: none;
        }

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

        .admin-sidebar {
          position: sticky;
          top: 72px;
          z-index: 5;
          border-right: 0;
          border-bottom: 1px solid var(--admin-line);
          padding: 12px 16px;
        }

        .nav-section {
          margin-bottom: 0;
        }

        .nav-label,
        .sidebar-panel {
          display: none;
        }

        .nav-tabs {
          display: flex;
          gap: 8px;
          overflow-x: auto;
          margin-top: 0;
          padding-bottom: 3px;
        }

        .nav-tab {
          grid-template-columns: 22px max-content;
          min-width: max-content;
          min-height: 42px;
        }

        .nav-tab span {
          display: none;
        }

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

        .dashboard-grid,
        .two-col-grid {
          grid-template-columns: 1fr;
        }

        .journey-row,
        .endpoint-row,
        .model-row,
        .access-row {
          grid-template-columns: 1fr;
        }

        .journey-actions {
          justify-content: flex-start;
        }

        .workflow-strip,
        .key-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
      }

      @media (max-width: 680px) {
        .admin-topbar {
          padding: 12px 14px;
        }

        .topbar-actions .status-pill,
        .topbar-actions .secondary-button {
          display: none;
        }

        .icon-button {
          display: inline-grid;
          place-items: center;
        }

        .admin-main {
          padding: 22px 14px 36px;
        }

        .page-header {
          grid-template-columns: 1fr;
          align-items: start;
        }

        .header-actions {
          justify-content: flex-start;
        }

        .metrics-grid,
        .workflow-strip,
        .key-grid,
        .recovery-grid {
          grid-template-columns: 1fr;
        }

        .chart-area {
          grid-template-columns: 1fr;
        }

        .chart-axis {
          display: none;
        }

        .auth-device {
          grid-template-columns: 1fr;
        }

        th,
        td {
          padding: 12px 10px;
        }
      }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(239, 246, 255, 0.92)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='none' stroke='%23cbd5e1' stroke-width='1'%3E%3Cpath d='M0 70h140M70 0v140'/%3E%3C/g%3E%3C/svg%3E");
}

.login-panel {
  width: min(100%, 460px);
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  padding: 30px;
}

.login-copy {
  margin: 34px 0 24px;
}

.login-copy h1 {
  margin: 8px 0 10px;
  color: #111827;
  font-size: 34px;
  line-height: 1.05;
}

.login-copy p {
  color: #475569;
}

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

.login-form label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
}

.login-form input:focus {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  border-color: #2563eb;
}

.form-status {
  min-height: 20px;
  margin: 0;
  color: #475569;
}

/* KLE-96 — Skip link (WCAG 2.4.1 A). Visually hidden until keyboard focus. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  background: #000;
  color: #fff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 4px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* KLE-101 — Pricing tables: horizontal scroll on small viewports (<=480px). */
@media (max-width: 480px) {
  .pricing-table,
  [data-pricing-table] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .pricing-table table {
    min-width: 480px;
  }
}

/* Workbench — empty state (Claude Code-style: centered welcome + composer). */
.thread-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 24px 16px;
  gap: 10px;
  color: #475569;
}
.thread-empty-title {
  margin: 0;
  font-size: clamp(22px, 3.2vw, 32px);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}
.thread-empty-sub {
  margin: 0;
  max-width: 520px;
  font-size: 15px;
  line-height: 1.5;
  color: #64748b;
}
.workbench[data-empty="1"] .answer-scroll {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding-bottom: 0;
}
.workbench[data-empty="1"] .thread {
  flex: 0 0 auto;
  width: 100%;
  max-width: 720px;
}
.workbench[data-empty="1"] .composer {
  margin: 0 auto;
  width: 100%;
  max-width: 720px;
}
.workbench[data-empty="1"] .composer-note {
  text-align: center;
}

/* Register — Sign in with Google (match production pattern). */
.google-signup { margin-top: 0.75rem; }
.google-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.google-button:hover { background: #f9fafb; border-color: #d1d5db; }
.google-button:focus-visible { outline: 2px solid #4285F4; outline-offset: 2px; }
.google-icon { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; }
.google-disclaimer {
  margin: 0.6rem 0 0;
  font-size: 0.7rem;
  text-align: center;
  color: #94a3b8;
}
.google-disclaimer a { color: inherit; text-decoration: underline; }
.google-disclaimer a:hover { color: #475569; }
.legal-notice {
  margin-top: 1rem;
  font-size: 0.72rem;
  line-height: 1.55;
  color: #94a3b8;
}
.legal-notice a { color: #2563eb; text-decoration: none; }
.legal-notice a:hover { text-decoration: underline; }

/* ===== Mobile drawer (KLE-21 hamburger fix, 2026-05-22) ===== */
.menu-dot {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.menu-dot:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}
/* QA qac_20260527T123540: keep the hamburger clickable while the drawer
   is open so a second tap toggles the drawer closed. The drawer (z-index
   9001) is appended to <body> and the nav's stacking context is capped at
   40, so without this lift the drawer intercepts the toggle click. */
body.drawer-open .nav.site-nav { z-index: 9002; }
body.drawer-open .menu-dot { position: relative; z-index: 9002; }
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.mobile-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(86vw, 360px);
  background: #fff;
  z-index: 9001;
  box-shadow: -18px 0 44px rgba(17, 24, 39, 0.18);
  transform: translateX(100%);
  transition: transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 24px 22px 32px;
  gap: 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-drawer.is-open {
  transform: translateX(0);
}
.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mobile-drawer-title {
  font-size: 20px;
  font-weight: 760;
  letter-spacing: -0.02em;
}
.mobile-drawer-close {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  padding: 0;
}
.mobile-drawer-close:hover { background: var(--line-soft); }
.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.mobile-drawer-nav a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 14px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.mobile-drawer-nav a:hover,
.mobile-drawer-nav a:focus-visible {
  background: var(--line-soft);
  outline: none;
}
.mobile-drawer-cta {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.mobile-drawer-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 720;
  text-decoration: none;
  padding: 0 18px;
}
.mobile-drawer-cta a.signin {
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
}
.mobile-drawer-cta a.primary {
  color: #fff;
  background: linear-gradient(105deg, #6d4aff 0%, #9b5cf6 48%, #ff7557 100%);
  border: 1px solid transparent;
  box-shadow: 0 12px 28px rgba(109, 74, 255, 0.22);
}
body.drawer-open {
  overflow: hidden;
}
@media (min-width: 981px) {
  .mobile-drawer,
  .mobile-drawer-backdrop {
    display: none !important;
  }
}

/* Mobile overflow guard — last-line defense (KLE-21) */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* ===== Global partials: animated brand logo + footer (KLE-120, 2026-05-22) ===== */

/* Compact animated logo in nav brand area.
   Plays once per session (sessionStorage flag in wire-nav.js controls
   whether the .brand-animated wrapper gets the .has-played class which
   skips the animation by jumping to the final static state). */
.brand-animated {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  /* Reset uppercase tracking from default .brand — animated logo handles its own glyphs */
  text-transform: none;
  letter-spacing: normal;
  line-height: 1;
}
.brand-animated {
  align-self: stretch;
}
.brand-animated .brand-logo {
  position: relative;
  display: inline-block;
  width: 180px;
  height: 100%;
  min-height: 56px;
  flex: 0 0 180px;
  overflow: hidden;
  isolation: isolate;
  /* Horizontal soft-fade only — particles travel mostly left-right with
     the beam, so we fade the L+R edges into the nav background without
     touching the vertical span (which now reaches card edge-to-edge). */
  -webkit-mask-image: linear-gradient(to right,
    transparent 0%,
    #000 12%,
    #000 88%,
    transparent 100%);
          mask-image: linear-gradient(to right,
    transparent 0%,
    #000 12%,
    #000 88%,
    transparent 100%);
}
.brand-animated .brand-logo-wordmark {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 3;
  opacity: 0;
  animation: brandWmIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.55s forwards;
}
.brand-animated.has-played .brand-logo-wordmark {
  opacity: 1;
  animation: none;
}
@keyframes brandWmIn {
  0%   { opacity: 0; transform: translateY(4px) scale(0.985); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0)   scale(1);     filter: blur(0); }
}
.brand-animated .brand-logo-beam {
  position: absolute;
  top: 50%;
  left: -40%;
  width: 60%;
  height: 220%;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side,
    rgba(168, 85, 247, 0.85),
    rgba(255, 106, 61, 0.55) 45%,
    rgba(255, 106, 61, 0) 75%);
  filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  animation: brandBeamOnce 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes brandBeamOnce {
  0%   { left: -40%; opacity: 0; }
  20%  { opacity: 1; }
  70%  { left: 70%;  opacity: 0.9; }
  100% { left: 110%; opacity: 0; }
}
.brand-animated .brand-logo-halo {
  position: absolute;
  top: 50%; left: 50%;
  width: 65%; height: 130%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(168, 85, 247, 0.22) 0%,
    rgba(255, 106, 61, 0.16) 35%,
    rgba(255, 106, 61, 0) 70%);
  filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  animation: brandHaloOnce 2.2s ease-in-out 0.6s forwards;
}
@keyframes brandHaloOnce {
  0%   { opacity: 0; }
  40%  { opacity: 0.7; }
  100% { opacity: 0; }
}
.brand-animated .brand-logo-cubes {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 2;
}
.brand-animated .brand-logo-cubes .brand-cube {
  position: absolute;
  background: #0f172a;
  border-radius: 1px;
  opacity: 0;
  animation: brandCubeOnce 2.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes brandCubeOnce {
  0%   { transform: translate(var(--sx), var(--sy)) scale(0.3); opacity: 0; }
  20%  { transform: translate(var(--sx), var(--sy)) scale(1);   opacity: 0.85; }
  55%  { transform: translate(0, 0) scale(1); opacity: 0.95; }
  85%  { transform: translate(0, 0) scale(0.7); opacity: 0; }
  100% { transform: translate(0, 0) scale(0); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-animated .brand-logo-wordmark { animation: none; opacity: 1; }
  .brand-animated .brand-logo-beam,
  .brand-animated .brand-logo-halo { animation: none; opacity: 0; }
  .brand-animated .brand-logo-cubes .brand-cube { animation: none; opacity: 0; }
}

.brand-animated .brand-tagline {
  color: #5d6678;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .brand-animated .brand-tagline { display: none; }
  .brand-animated .brand-logo { width: 150px; flex: 0 0 150px; min-height: 48px; }
}

/* User-mode (authenticated) nav controls */
.nav-account {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line, rgba(216, 221, 230, 0.76));
  color: #4b5563;
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.7);
}
.nav-account:hover { color: var(--ink); border-color: rgba(109, 74, 255, 0.36); }
.nav-account-tier {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6d4aff;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(109, 74, 255, 0.1);
}
.nav-admin, .nav-signout {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
}
.nav-admin:hover, .nav-signout:hover { color: var(--ink); }

/* Auth-only visibility (hard hide so tap targets don't measure 0 by mistake) */
[data-auth-only][hidden] { display: none !important; }
/* KLE-127: ensure any nav child with [hidden] honors it, including .nav-admin
 * and .nav-signout which set their own `display: inline-flex` via class. */
.nav-admin[hidden],
.nav-signout[hidden],
.nav-account[hidden],
.nav-signin[hidden],
.nav-cta[hidden] { display: none !important; }

/* Mobile drawer: pick up auth-aware nav groups when rebuilt */
.mobile-drawer-nav .nav-links-group,
.mobile-drawer-cta .nav-actions-group { display: contents; }

/* Account menu inside the drawer (mobile only). */
.mobile-drawer-user {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 16px;
  margin-top: 8px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}
.mobile-drawer-user a {
  display: block;
  padding: 14px 4px;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}
.mobile-drawer-user a:last-child { border-bottom: 0; }
.mobile-drawer-user a.signout {
  margin-top: 8px;
  color: #b91c1c;
}

/* ===== Site footer (new partial structure) ===== */
.site-footer {
  /* override the legacy .footer flex layout when the new grid markup is present */
  display: block;
  align-items: initial;
  justify-content: initial;
  padding: 32px 0 16px;
  max-width: 1240px;
  margin: 56px auto 0;
  border-top: 1px solid var(--line, rgba(216, 221, 230, 0.76));
  color: #7b8494;
  font-size: 13px;
}
.site-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 28px;
}
.site-footer-brand-link {
  display: inline-block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 12px;
}
.site-footer-brand-link strong {
  display: block;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink, #0f172a);
}
.site-footer-brand-link span {
  display: block;
  margin-top: 4px;
  color: #5d6678;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.site-footer-slovenia {
  margin: 8px 0 0;
  font-size: 12px;
  color: #7b8494;
}
.site-footer-slovenia a {
  color: #6d4aff;
  font-weight: 700;
  text-decoration: none;
}
.site-footer-slovenia a:hover { text-decoration: underline; }

.site-footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.site-footer-col-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink, #0f172a);
  margin-bottom: 6px;
}
.site-footer-col a {
  color: #596274;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
}
.site-footer-col a:hover { color: var(--ink, #0f172a); }

.site-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(216, 221, 230, 0.5);
  font-size: 12px;
  color: #7b8494;
}
.site-footer-disclaimer { max-width: 720px; }

@media (max-width: 980px) {
  .site-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .site-footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .site-footer-bottom { flex-direction: column; }
}

/* ─── UX-FIX Round 1 (KLE-130..136) — 2026-05-22 ─────────────────────────
 * Targeted layout fixes on top of the byte-frozen design system. Scoped to
 * the impacted selectors so we never touch the global typographic scale.
 */

/* KLE-130 — News + news-article H1 broke mid-word at narrow viewports.
   The global `h1` rule uses `word-break: break-word` which Chromium treats
   as `break-all` once content overflows. Switch the news headings to the
   safer `overflow-wrap: anywhere` + `hyphens: auto` combo, which only
   breaks at syllable boundaries and only as a last resort. */
.news-hero h1,
.news-article h1,
section.news-hero h1,
section.news-article h1 {
  word-break: normal !important;
  overflow-wrap: anywhere;
  hyphens: auto;
}
@media (max-width: 480px) {
  .news-hero h1,
  .news-article h1,
  section.news-hero h1,
  section.news-article h1 {
    font-size: 38px;
    line-height: 1.05;
  }
}

/* KLE-131 — terms.html legibility at 375 viewport. */
@media (max-width: 480px) {
  .terms-hero { padding: 22px 4vw; }
  .terms-layout { padding: 0 4vw; }
  .terms-panel { padding: 22px 18px; border-radius: 14px; }
  .terms-content { color: #0f172a; font-size: 15px; line-height: 1.55; }
  .terms-content h2 { font-size: 20px; margin-top: 28px; padding-top: 18px; }
  .terms-content h3 { font-size: 16px; margin-top: 18px; }
  .terms-content p,
  .terms-content li { color: #1f2937; }
}

/* KLE-134 — Pricing add-ons table overflow at 768 viewport.
   `.pricing-table` already has min-width:760px which is exactly the 768
   viewport width minus padding. Wrap the table in `.table-wrap` (already
   defined above) and ensure the wrap fills the available width without
   spilling out of the parent card. The HTML hasn't always been wrapped;
   ensure both standalone and wrapped tables behave the same. */
@media (max-width: 820px) {
  .pricing-table { min-width: 640px; }
  .table-wrap { margin-left: 0; margin-right: 0; }
}

/* KLE-135 — Recommended ribbon overlapping the Professional heading at 768.
   The existing `.recommended-ribbon` is absolutely positioned with `top:-14px`.
   Add `padding-top` to the card so the heading clears the ribbon at narrower
   widths where the card title sits closer to the top edge. */
@media (max-width: 980px) {
  .price-card .recommended-ribbon { top: -10px; font-size: 11px; padding: 6px 10px; }
  .price-card.recommended { padding-top: 36px; }
}

/* KLE-126 — Account chip in the workbench appbar (identifies signed-in user). */
.appbar .account-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 12px;
  color: #0f172a;
  margin-left: 12px;
  max-width: 240px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.appbar .account-chip-email {
  font-weight: 600;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.appbar .account-chip-tier {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6d4aff, #ec4899);
  color: #fff;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.06em;
}

/* KLE-128 — Mobile drawer for the workbench sidebar. Default sidebar is
   hidden on narrow viewports per the existing CSS. The hamburger toggles
   the `.is-open` class so it slides in. */
@media (max-width: 980px) {
  .workbench .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 86vw;
    max-width: 360px;
    background: #fff;
    z-index: 1000;
    transform: translateX(-110%);
    transition: transform 220ms ease;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.35);
    overflow-y: auto;
    padding: 18px;
  }
  .workbench .sidebar.is-open {
    transform: translateX(0);
  }
  body.drawer-open { overflow: hidden; }
}

/* KLE-122/123 — Ensure the inert mockup template never renders. */
template#workbench-mockup-fallback { display: none; }

/* Workbench — Claude Code-style mobile + empty-state layout.
 *
 * Empty state ([data-empty="1"]):
 *   - sidebar + source-rail + toolbar hidden (everywhere on mobile, only
 *     toolbar everywhere on desktop because the appbar is gone).
 *   - main-column fills the viewport below the global header.
 *   - composer is dead-centered, with welcome hero stacked directly above.
 *
 * Active state (no [data-empty]):
 *   - sidebar + source-rail re-appear on desktop.
 *   - On mobile, sidebar/source-rail stay hidden (drawer-only), composer
 *     sticks to the bottom and the thread scrolls between header + composer.
 */
.workbench[data-empty="1"] .sidebar,
.workbench[data-empty="1"] .source-rail,
.workbench[data-empty="1"] [data-workbench-toolbar] {
  display: none !important;
}
.workbench[data-empty="1"] .workspace {
  display: flex !important;
  flex-direction: column;
  grid-template-columns: 1fr !important;
  min-height: calc(100vh - 120px);
}
.workbench[data-empty="1"] .main-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1 1 auto;
  min-height: calc(100vh - 120px);
  padding: 0 16px;
}
.workbench[data-empty="1"] .answer-scroll {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 720px;
  flex: 0 0 auto;
  min-height: 0;
  padding-bottom: 0;
}
.workbench[data-empty="1"] .thread {
  flex: 0 0 auto;
  width: 100%;
}
.workbench[data-empty="1"] .composer {
  margin: 12px auto 0;
  width: 100%;
  max-width: 720px;
}
.workbench[data-empty="1"] .composer-note {
  text-align: center;
}

/* Mobile — Claude Code-style sticky-bottom composer during active conversation. */
@media (max-width: 980px) {
  .workbench .sidebar,
  .workbench .source-rail {
    /* Mobile drawer is the only path; the side rails never render inline. */
    display: none !important;
  }
  .workbench:not([data-empty="1"]) .workspace {
    display: flex;
    flex-direction: column;
    grid-template-columns: 1fr !important;
    min-height: calc(100vh - 80px);
  }
  .workbench:not([data-empty="1"]) .main-column {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1 1 auto;
    min-height: calc(100vh - 80px);
    padding: 0;
  }
  .workbench:not([data-empty="1"]) .answer-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    width: 100%;
    padding: 12px 16px 120px;
  }
  .workbench:not([data-empty="1"]) .composer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
    padding: 8px 12px env(safe-area-inset-bottom, 12px);
    background: #fff;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
    z-index: 10;
  }
  /* Reserve space at the bottom of the scrolling answer so the sticky
     composer never covers the tail of the answer text. */
  .workbench:not([data-empty="1"]) .answer-scroll {
    padding-bottom: 180px;
  }
  /* Hide the toolbar's "New answer" pill on mobile active state — it's
     duplicated by the drawer's New answer action. */
  .workbench:not([data-empty="1"]) [data-workbench-toolbar] {
    display: none !important;
  }
  .workbench:not([data-empty="1"]) .composer-note {
    font-size: 11px;
    margin-top: 6px;
  }
}

/* Workbench page — constrain nav so the long email doesn't break the layout. */
.workbench > nav.site-nav .nav-account-email {
  display: inline-block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.workbench > nav.site-nav {
  margin-left: 18px;
  margin-right: 18px;
  margin-top: 18px;
  margin-bottom: 24px;
  width: auto;
  max-width: none;
}
/* Hide the hamburger on desktop — only mobile uses the drawer. */
@media (min-width: 981px) {
  .workbench > nav.site-nav .menu-dot { display: none !important; }
}

/* Workbench toolbar (replaces the old .appbar). */
.workbench-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
}
.workbench-toolbar .matter-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workbench-toolbar .matter-title strong { display: block; }
.workbench-toolbar .matter-title span {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.workbench-toolbar .top-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
@media (max-width: 640px) {
  .workbench-toolbar .matter-title span { display: none; }
  .workbench-toolbar .top-actions { gap: 6px; }
  .workbench-toolbar .top-actions .primary-button { font-size: 12px; padding: 6px 10px; }
}

/* KLE-133 — login/register: forgot-password layout + header/footer spacing. */
.login-form .login-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.login-form .login-form-row .button { flex: 1 1 auto; }
.login-form .login-forgot {
  flex: 0 0 auto;
  font-size: 13px;
  color: #6d4aff;
  text-decoration: none;
}
.login-form .login-forgot:hover { text-decoration: underline; }

/* Mobile drawer — signed-in user chip (KLE-127 follow-up). */
.mobile-drawer-userchip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(109, 74, 255, 0.04);
}
.mobile-drawer-userchip-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}
.mobile-drawer-userchip-email {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-drawer-userchip-tier {
  display: inline-flex;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6d4aff, #ec4899);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.login-shell .site-nav,
.login-shell .site-footer { max-width: none; }
.login-shell { padding-top: 24px; padding-bottom: 24px; }



/* QA-20260522 — adversarial browser pass fixes.
   Root causes:
   - off-canvas skip link used left:-9999px, inflating body.scrollWidth on mobile;
   - privacy processing cards inherited a 560px table/content width through auto min-width;
   - active workbench had a 3-child column in a 2-row grid and answer content could sit above toolbar controls. */
.skip-link {
  left: 1rem;
  top: 0;
  transform: translateY(-140%);
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  transform: none;
}

.news-hero {
  overflow: hidden;
}
.news-hero,
.news-card,
.news-card h2,
.news-card h2 a,
.news-summary,
.news-date,
.legal-hero,
.legal-contact,
.legal-doc,
.legal-block,
.processing-list,
.processing-purpose,
.privacy-footer,
.privacy-footer-main,
.privacy-footer-note {
  min-width: 0;
  max-width: 100%;
}
.news-card h2 a,
.news-summary,
.legal-doc,
.legal-block p,
.legal-block li,
.processing-purpose p,
.legal-link {
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .processing-purpose {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  .legal-table-wrap {
    width: 100%;
    max-width: 100%;
  }
}

.workbench:not([data-empty="1"]) .main-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
}
.workbench:not([data-empty="1"]) .workbench-toolbar {
  position: relative;
  z-index: 20;
  flex-wrap: wrap;
}
.workbench:not([data-empty="1"]) .workbench-toolbar .matter-title {
  min-width: 240px;
}
.workbench:not([data-empty="1"]) .workbench-toolbar .top-actions {
  position: relative;
  z-index: 21;
}
.workbench:not([data-empty="1"]) .answer-scroll {
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow: auto;
  padding-top: 28px;
}
.workbench:not([data-empty="1"]) .thread,
.workbench:not([data-empty="1"]) .answer-document,
.workbench:not([data-empty="1"]) .doc-section {
  position: relative;
  z-index: 1;
  max-width: 100%;
}
.workbench:not([data-empty="1"]) [data-control="export-answer"],
.workbench:not([data-empty="1"]) [data-control="new-answer"],
.workbench:not([data-empty="1"]) [data-control="answer-mode"] {
  position: relative;
  z-index: 22;
  pointer-events: auto;
}
@media (max-width: 980px) {
  .workbench:not([data-empty="1"]) .main-column {
    display: flex;
  }
}

/* Native hidden must win over component button display rules. */
[hidden] {
  display: none !important;
}


/* QA-20260522b — workbench active/export hardening */
.workbench:not([data-empty="1"]) .workspace {
  min-height: 0;
}
.workbench:not([data-empty="1"]) .main-column {
  isolation: isolate;
  row-gap: 16px;
}
.workbench:not([data-empty="1"]) .workbench-toolbar {
  align-self: start;
  margin-bottom: 0;
}
.workbench:not([data-empty="1"]) .answer-scroll {
  grid-row: 2;
  min-height: 0;
  padding-top: 0;
  overscroll-behavior: contain;
}
.workbench:not([data-empty="1"]) .composer {
  grid-row: 3;
  z-index: 30;
}
.workbench:not([data-empty="1"]) .thread {
  display: grid;
  gap: 18px;
  align-content: start;
}
.workbench:not([data-empty="1"]) .answer-document {
  margin-top: 0;
  scroll-margin-top: 24px;
}
.workbench:not([data-empty="1"]) .doc-section {
  pointer-events: auto;
}
.workbench:not([data-empty="1"]) .top-actions {
  flex-shrink: 0;
}

/* QA-20260527 deterministic mobile overflow fixes */
@media (max-width: 480px) {
  html, body { overflow-x: clip; }
  .pricing-table,
  .legal-table {
    min-width: 0 !important;
    width: max-content;
    max-width: none;
  }
  .pricing-table th,
  .pricing-table td,
  .legal-table th,
  .legal-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }
  .save-pill {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .brand-logo,
  .brand-animated,
  .brand-logo-beam {
    max-width: 100%;
    overflow: hidden;
  }
  .brand-animated .brand-logo-beam {
    left: 0;
    right: 0;
    width: auto;
  }
}


/* QA-20260529 — KLE-147 privacy legal tables must not widen 375px mobile viewports. */
.legal-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 480px) {
  .legal-table {
    width: 100% !important;
    table-layout: fixed;
  }
  .legal-table th,
  .legal-table td {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
  }
}
