:root {
  --paper: #F6F4F0;
  --ink: #121A24;
  --muted: #5E6A75;
  --line: #E3DDD4;
  --hero: #0C141C;
  --accent: #FF5A36;
  --white: #ffffff;
  --container: 1120px;
  --radius: 8px;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: Consolas, "Cascadia Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 1rem;
}

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

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.narrow { max-width: 720px; margin-inline: auto; }
.center { text-align: center; }
.center-mt { text-align: center; margin-top: 2rem; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--white);
  padding: 0.75rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 220;
  background: rgba(246, 244, 240, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.site-header .logo-word { font-size: 1.15rem; }
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  content: "";
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--ink);
  margin-inline: auto;
}
.nav-toggle-bar::before { transform: translateY(-5px); }
.nav-toggle-bar::after { transform: translateY(3px); position: absolute; }

.site-nav {
  display: none;
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 1rem;
  flex-direction: column;
  gap: 1rem;
}
.site-nav.is-open {
  display: flex;
  max-height: calc(100dvh - 4rem);
  overflow-y: auto;
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.nav-list a, .nav-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
  color: var(--ink);
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.nav-dropdown-btn::after {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  flex: 0 0 auto;
}
.nav-dropdown-btn[aria-expanded="true"]::after {
  transform: rotate(225deg) translateY(-1px);
}
.nav-dropdown-btn.is-section,
.nav-list a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0.25rem 0.75rem;
  display: none;
}
.nav-dropdown-menu.is-open { display: block; }
.mega-grid { display: grid; gap: 0.35rem 1.5rem; }
.mega-col-title {
  margin: 0.65rem 0.75rem 0.1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.mega-links { display: grid; }
.nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
}
.nav-actions .btn-ghost {
  border-color: var(--line);
  background: var(--white);
  border-radius: 999px;
}
.nav-actions .btn-primary { flex: 1 1 12rem; }
.lang-menu { position: relative; }
.lang-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.lang-menu-btn:hover,
.lang-menu.is-open .lang-menu-btn { border-color: var(--ink); }
.lang-menu-globe {
  width: 1rem;
  height: 1rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  position: relative;
}
.lang-menu-globe::before,
.lang-menu-globe::after {
  content: "";
  position: absolute;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.lang-menu-globe::before { inset: 2px 4px; border-top: 0; border-bottom: 0; }
.lang-menu-globe::after { left: 1px; right: 1px; top: 50%; height: 0; border: 0; border-top: 1.5px solid currentColor; }
.lang-menu-caret {
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
.lang-menu.is-open .lang-menu-caret { transform: rotate(225deg) translateY(-1px); }
.lang-menu-list {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 40;
  min-width: 12.5rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(18, 26, 36, 0.12);
}
.lang-menu-list[hidden] { display: none; }
.lang-menu-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.lang-menu-list a:hover { background: var(--paper); }
.lang-menu-list a[aria-selected="true"] { background: #fff1ec; color: var(--accent); }
.lang-menu-code { font-size: 0.75rem; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-primary:hover { filter: brightness(0.95); color: var(--white); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
}
.form .btn-ghost,
.portal-main .btn-ghost {
  border-color: var(--line);
  background: var(--white);
}
.btn-ghost-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}
.btn-ghost-light:hover { color: var(--white); border-color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.25rem 0 0.5rem; }
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}
.link-btn:hover { color: var(--accent); }
.inline-form { display: inline; margin: 0; }

/* Hero */
.hero { padding: 4rem 0 3.5rem; }
.hero-dark {
  background: var(--hero);
  color: var(--white);
}
.hero-dark a { color: var(--white); }
.hero-light { padding-bottom: 2rem; }
.hero h1, .section-title, h1, h2, h3 {
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.hero h1 { font-size: clamp(1.85rem, 4vw, 2.75rem); margin: 0 0 1rem; max-width: 18ch; }
.hero-light h1 { max-width: 22ch; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 42rem; }
.hero-dark .lead { color: rgba(246,244,240,0.78); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
.micro { font-size: 0.875rem; color: var(--muted); }
.qr-wrap { display: inline-block; width: 220px; margin: 0.5rem 0 1rem; background: #fff; padding: 8px; }
.qr-wrap .qr { display: block; width: 100%; height: auto; }
.hero-dark .micro, .section-dark .micro.light { color: rgba(246,244,240,0.65); }
.fine-print { font-size: 0.8rem; color: var(--muted); }

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.call-flow {
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}
.call-flow-node {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  min-width: 10rem;
  text-align: center;
}
.call-flow-node.accent { border-color: var(--accent); color: var(--accent); }
.call-flow-line {
  width: 2px;
  height: 1.25rem;
  background: linear-gradient(var(--accent), rgba(255,90,54,0.2));
}

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: #efebe4; }
.section-dark {
  background: var(--hero);
  color: var(--white);
}
.section-dark .lead { color: rgba(246,244,240,0.78); }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 1.5rem; }
.section-title.center { text-align: center; }

.card-grid {
  display: grid;
  gap: 1.25rem;
}
.card-grid.two { grid-template-columns: 1fr; }
.card-grid.three { grid-template-columns: 1fr; }
.card-grid.four { grid-template-columns: 1fr; }
.feature-card, .price-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
}
.section-alt .feature-card { background: var(--paper); }
.link-card { text-decoration: none; color: inherit; transition: border-color 0.15s ease; }
.link-card:hover { border-color: var(--accent); color: inherit; }
.feature-card h3, .price-card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.feature-card p, .price-card p { margin: 0; color: var(--muted); }

.logo-badges {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}
.logo-badges li {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--muted);
}

.check-list, .plain-list, .steps, .timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}
.check-list li, .plain-list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.65rem;
  color: var(--muted);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.45rem;
  width: 0.55rem; height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
}
.check-list.light li { color: rgba(246,244,240,0.78); }

.steps, .timeline { display: grid; gap: 1.25rem; }
.steps li, .timeline li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
}
.steps h3, .timeline h3 { margin: 0 0 0.35rem; }
.steps p, .timeline p { margin: 0; color: var(--muted); }

/* Code tabs */
.code-tabs { margin: 1.5rem 0; }
.code-tabs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.code-tab {
  border: 1px solid rgba(255,255,255,0.18);
  background: transparent;
  color: rgba(246,244,240,0.75);
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}
.code-tab[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}
.code-panel pre {
  margin: 0;
  padding: 1.1rem;
  overflow: auto;
  background: #071017;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.5;
  color: #e8e2d8;
}

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  min-width: 640px;
}
.compare-table th, .compare-table td {
  border: 1px solid var(--line);
  padding: 0.75rem 0.9rem;
  text-align: left;
  vertical-align: top;
}
.compare-table thead th { background: #efebe4; }
.compare-table tbody th { font-weight: 600; width: 22%; }

.admin-section {
  display: grid;
  gap: 2rem;
  align-items: center;
}
.mock-screen {
  background: var(--hero);
  color: var(--white);
  border-radius: 12px;
  padding: 1rem;
  min-height: 220px;
  box-shadow: 0 20px 40px rgba(12,20,28,0.18);
}
.mock-top {
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mock-rows { display: grid; gap: 0.65rem; }
.mock-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255,255,255,0.05);
  padding: 0.7rem 0.85rem;
  border-radius: 6px;
  font-size: 0.9rem;
}
.tag {
  background: var(--accent);
  color: var(--white);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}
.tag.muted { background: rgba(255,255,255,0.15); }
.tag.ok { background: #2f9e6b; }
.admin-dots { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1rem; }
.admin-dot {
  width: 0.65rem; height: 0.65rem;
  border-radius: 50%;
  border: 0;
  background: var(--line);
  cursor: pointer;
  padding: 0;
}
.admin-dot.is-active { background: var(--accent); }

.price-card { position: relative; display: flex; flex-direction: column; gap: 0.5rem; }
.price-card .btn { margin-top: auto; }
.price-amount { font-size: 1.75rem; font-weight: 700; color: var(--ink) !important; }
.price-per { font-size: 0.9rem; }
.price-badge {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  background: var(--accent);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}
.price-card.is-badge { border-color: var(--accent); }
.pricing-grid { grid-template-columns: 1fr; }

.accordion-item { border-bottom: 1px solid var(--line); }
.accordion-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 1rem 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
}
.accordion-btn::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  flex: 0 0 auto;
}
.accordion-btn[aria-expanded="true"]::after {
  transform: rotate(225deg) translate(-2px, -2px);
}
.accordion-panel { padding: 0 0 1rem; color: var(--muted); }
.accordion-panel p { margin: 0; }

.cta-band {
  background: var(--hero);
  color: var(--white);
  padding: 4rem 0;
}
.cta-band-inner { text-align: center; }
.cta-band h2 { margin: 0 0 0.75rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.cta-band .lead { margin-inline: auto; color: rgba(246,244,240,0.75); }

.split {
  display: grid;
  gap: 2rem;
  align-items: center;
}
.split.reverse { direction: ltr; }
.illus {
  min-height: 220px;
  border-radius: 12px;
  background: linear-gradient(145deg, #0C141C, #1a2733);
  position: relative;
  overflow: hidden;
}
.illus-dot {
  position: absolute;
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  background: var(--accent);
  left: 18%; top: 42%;
}
.illus-wave {
  position: absolute;
  left: 38%; top: 28%;
  width: 45%; height: 45%;
  border-left: 3px solid rgba(246,244,240,0.35);
  border-radius: 40%;
  transform: rotate(12deg);
}

.flow-boxes {
  display: grid;
  gap: 1rem;
}
.flow-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.flow-box h3 { margin: 0.75rem 0 0.35rem; }
.flow-box p { margin: 0; color: var(--muted); }

.dialogue { display: grid; gap: 0.85rem; }
.bubble {
  max-width: 85%;
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--line);
}
.bubble p { margin: 0; }
.bubble.user { justify-self: start; }
.bubble.agent {
  justify-self: end;
  background: #0C141C;
  color: var(--white);
  border-color: #0C141C;
}

.contact-grid {
  display: grid;
  gap: 2.5rem;
}
.form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
}
.field { display: grid; gap: 0.35rem; }
.label { font-weight: 600; }
.input,
select.input,
textarea.input {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font: inherit;
  color: var(--ink);
  box-sizing: border-box;
}
.field.check-row label { font-weight: 400; }
.alert {
  background: #fff6e8;
  border: 1px solid #f0d7a8;
  color: #6a4b12;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  margin: 1rem 0;
}
.alert.error {
  background: #fdecea;
  border-color: #f0c2bc;
  color: #8a2a22;
}
.table { width: 100%; border-collapse: collapse; background: var(--white); }
.table th, .table td {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0.6rem;
  text-align: left;
  vertical-align: top;
}
.form-row { margin-bottom: 1rem; }
.form-row label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font: inherit;
  color: var(--ink);
}
.check-row label { display: flex; gap: 0.65rem; align-items: flex-start; font-weight: 400; }
.check-row input { width: auto; margin-top: 0.25rem; }
.optional { color: var(--muted); font-weight: 400; font-size: 0.9rem; }
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.alert.success {
  background: #e7f6ee;
  border: 1px solid #b7e0c7;
  color: #1d5c3a;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}
.contact-aside {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
}
.mono { font-family: var(--mono); font-size: 0.85rem; word-break: break-all; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0 2rem;
  background: #efebe4;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
.footer-heading {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.85rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.45rem; }
.footer-col a { text-decoration: none; color: var(--muted); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}

/* Cookies */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 30px rgba(18,26,36,0.08);
  padding: 1.25rem 0;
}
.cookie-banner[hidden], .cookie-modal[hidden] { display: none !important; }
.cookie-banner-inner {
  display: grid;
  gap: 1rem;
}
.cookie-banner-title { margin: 0 0 0.35rem; font-size: 1.1rem; }
.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cookie-banner-actions .btn { flex: 1 1 8rem; }
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 240;
  background: rgba(12,20,28,0.55);
  display: grid;
  place-items: center;
  padding: 1rem;
}
.cookie-modal-dialog {
  position: relative;
  background: var(--paper);
  border-radius: 12px;
  padding: 1.5rem;
  width: min(100%, 520px);
  max-height: 90vh;
  overflow: auto;
}
.cookie-category {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}
.cookie-category-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.35rem;
}
.cookie-always { font-size: 0.8rem; color: var(--muted); }
.cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.cookie-modal-actions .btn { flex: 1 1 8rem; }
.cookie-modal-close {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.legal-page h2 { margin-top: 2rem; }
.legal-page p { color: var(--muted); }

.engine-diagram {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.35rem;
  margin: 1.5rem 0 0.5rem;
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.engine-diagram-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.engine-diagram-node {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  min-width: 0;
}
.engine-diagram-node.accent {
  border-color: var(--accent);
  color: var(--accent);
  background: #fff7f4;
}
.engine-diagram-arrow {
  width: 2px;
  height: 1.35rem;
  margin: 0.1rem auto;
  background: var(--ink);
  position: relative;
  flex: 0 0 auto;
}
.engine-diagram-arrow::after {
  content: "";
  position: absolute;
  left: -4px;
  bottom: -6px;
  border: 5px solid transparent;
  border-top-color: var(--ink);
}
.trademarks-line {
  margin: 0 auto 2rem;
  text-align: center;
  max-width: 48rem;
}
.code-block {
  margin: 0 0 1.5rem;
  padding: 1rem 1.15rem;
  background: #121A24;
  color: #F6F4F0;
  border-radius: 10px;
  overflow-x: auto;
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.compare-table-3 tbody th { width: 16%; }

@media (min-width: 720px) {
  .card-grid.two { grid-template-columns: repeat(2, 1fr); }
  .card-grid.three { grid-template-columns: repeat(2, 1fr); }
  .card-grid.four { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-boxes { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1.4fr 0.8fr; }
  .cookie-banner-inner {
    grid-template-columns: 1.4fr auto;
    align-items: center;
  }
}

@media (min-width: 960px) {
  .engine-diagram {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.75rem 1rem;
  }
  .engine-diagram-node { min-width: 7.5rem; }
  .engine-diagram-node.accent { min-width: 9rem; }
  .engine-diagram-arrow {
    width: 1.5rem;
    height: 2px;
    margin: 0;
  }
  .engine-diagram-arrow::after {
    left: auto;
    bottom: auto;
    right: -2px;
    top: -4px;
    border-color: transparent;
    border-left-color: var(--ink);
  }
  .nav-actions { width: auto; }
  .nav-actions .btn-ghost {
    border-color: transparent;
    background: transparent;
    border-radius: var(--radius);
  }
  .nav-actions .btn-primary { flex: 0 0 auto; }
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    border: 0;
    padding: 0;
    background: transparent;
    gap: 1.25rem;
  }
  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
  }
  .nav-list a, .nav-dropdown-btn {
    padding: 0.45rem 0.55rem;
    font-size: 0.92rem;
  }
  .nav-list > li > a,
  .nav-list > li > .nav-dropdown-btn { width: auto; }
  .nav-mega { position: static; }
  .mega-panel.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 0;
    padding: 0.4rem 0 1.35rem;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    background: var(--white);
    box-shadow: 0 18px 40px rgba(18, 26, 36, 0.08);
  }
  .mega-grid {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
  }
  .mega-grid.cols-2 { grid-template-columns: minmax(12rem, 0.7fr) minmax(0, 1.3fr); }
  .mega-links { grid-template-columns: 1fr 1fr; align-content: start; }
  .mega-col a { border-radius: 8px; }
  .mega-col a:hover { background: var(--paper); }
  .nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 14rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.5rem;
    box-shadow: 0 12px 30px rgba(18,26,36,0.08);
  }
  .hero-grid { grid-template-columns: 1.2fr 0.8fr; }
  .card-grid.three { grid-template-columns: repeat(3, 1fr); }
  .card-grid.four { grid-template-columns: repeat(4, 1fr); }
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-section { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr 1fr; }
  .split.reverse .split-copy { order: 2; }
  .split.reverse .split-visual { order: 1; }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

.portal {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0 3rem;
}
.portal-side {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.4rem;
}
.portal-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.portal-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
}
.portal-nav a.is-active {
  background: var(--hero);
  color: var(--white);
}
.portal-nav form { margin: 0.25rem; }
.portal-nav .btn {
  width: 100%;
  justify-content: flex-start;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 0.5rem 0.75rem;
}
.portal-main h1 { margin: 0 0 1rem; }
.portal .card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  margin: 0 0 1rem;
}
.portal .card h2 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.is-portal .site-footer { margin-top: 0; }
.is-portal .footer-base { padding: 1.25rem 0; }
.is-portal .footer-copy { margin: 0; color: var(--muted); }
body.admin main { overflow-x: auto; }

.docs-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding-bottom: 3rem;
}
.docs-side {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.5rem;
}
.docs-side a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
}
.docs-side a.is-active {
  background: var(--hero);
  color: var(--white);
}
.docs-group {
  margin: 0.9rem 0.7rem 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.docs-prose .code-tab {
  border-color: var(--line);
  background: var(--white);
  color: var(--ink);
}
.docs-prose .code-tab[aria-selected="true"] {
  background: var(--hero);
  border-color: var(--hero);
  color: var(--white);
}
.docs-prose h2 { margin: 1.8rem 0 0.55rem; font-size: 1.25rem; }
.docs-prose h3 { margin: 1.25rem 0 0.4rem; font-size: 1.05rem; }
.docs-prose p, .docs-prose li { color: var(--muted); }
.docs-prose strong { color: var(--ink); }
.docs-prose ul, .docs-prose ol { padding-left: 1.2rem; }
.docs-prose li { margin: 0.25rem 0; }
@media (min-width: 860px) {
  .docs-wrap { grid-template-columns: 240px minmax(0, 1fr); align-items: start; }
  .docs-side { position: sticky; top: 5rem; }
}

@media (min-width: 860px) {
  .portal {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
    gap: 1.75rem;
  }
  .portal-nav { flex-direction: column; flex-wrap: nowrap; }
  .portal-side { position: sticky; top: 5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
