/* ==========================================================================
   Cre8tive PLM — Design System
   Brand palette lives here. Adjust these variables to fine-tune the match
   with www.ctnd.com — every page inherits from this single block.
   ========================================================================== */

:root {
  /* Brand — sampled from the Cre8tive gear-8 logo */
  --red: #d81f26;            /* Cre8tive signature red */
  --red-bright: #ff3a42;
  --red-deep: #9c1519;
  --silver: #c7c9cb;         /* gear silver */

  /* Neutrals — dark, minimalist, technical */
  --bg: #0a0d13;
  --bg-raised: #10141d;
  --surface: #141924;
  --surface-2: #1a2130;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  /* Text */
  --text: #eef1f6;
  --text-2: #a7b0bf;
  --text-3: #6b7484;

  /* Effects */
  --glow: rgba(216, 31, 38, 0.38);
  --grad: linear-gradient(135deg, var(--red) 0%, var(--red-bright) 100%);

  /* Type */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  /* Layout */
  --max: 1180px;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--red); color: #fff; }

img, video, iframe { max-width: 100%; }

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Wider gutter for layouts that pair a large visual with a side panel */
.wrap.wide { max-width: 1560px; }

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.25rem; }

.lead {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: var(--text-2);
  max-width: 46em;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red-bright);
  margin-bottom: 18px;
}

.kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--grad);
}

.accent { color: var(--red-bright); }

.grad-text {
  background: linear-gradient(100deg, #fff 30%, var(--red-bright) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 13, 19, 0.78);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand .eight { color: var(--red-bright); }

.brand-mark { width: 32px; height: 32px; flex: none; }

.brand-logo { height: 34px; width: auto; display: block; }

.footer-wordmark { width: 215px; max-width: 70%; display: block; margin-bottom: 16px; }

.footer-logo { width: 175px; max-width: 60%; display: block; margin-bottom: 16px; }

.brand small {
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 11px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 0.91rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.nav-links a.active { color: var(--text); }

.nav-links a.active:not(.btn) {
  box-shadow: inset 0 -2px 0 var(--red);
  border-radius: 8px 8px 0 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 28px -8px var(--glow);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -8px var(--glow); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover { border-color: var(--red); color: #fff; transform: translateY(-2px); }

.btn-sm { padding: 9px 18px; font-size: 0.88rem; }

.nav-links .btn-primary { color: #fff; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 180px 0 110px;
  overflow: hidden;
}

.hero.sub { padding: 160px 0 70px; }

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 45% at 75% 8%, rgba(216, 31, 38, 0.16), transparent 65%),
    radial-gradient(ellipse 45% 40% at 12% 90%, rgba(216, 31, 38, 0.07), transparent 60%);
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 20%, transparent 75%);
}

.hero-net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 20%, transparent 75%);
}

.hero h1 { max-width: 15.5em; margin-bottom: 22px; }

.title-row {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 30px);
  margin-bottom: 22px;
}

.title-row h1 { margin-bottom: 0; }

.title-mark {
  width: clamp(70px, 9vw, 130px);
  flex: none;
  filter: drop-shadow(0 10px 30px rgba(216, 31, 38, 0.35));
}

.hero .lead { margin-bottom: 36px; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 48px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-2);
}

.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ee56d; /* electronic indicator green */
  box-shadow: 0 0 10px rgba(46, 229, 109, 0.85);
  animation: dot-strobe 2.8s ease-in-out infinite;
}

@keyframes dot-strobe {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px rgba(46, 229, 109, 0.85); }
  50% { opacity: 0.3; box-shadow: 0 0 3px rgba(46, 229, 109, 0.3); }
}

@media (prefers-reduced-motion: reduce) {
  .badge .dot { animation: none; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding: 92px 0; }

.section.tint { background: var(--bg-raised); border-block: 1px solid var(--line); }

.section-head { max-width: 700px; margin-bottom: 54px; }

.section-head.center { margin-inline: auto; text-align: center; }

.section-head.center .kicker { justify-content: center; }

.section-head p { color: var(--text-2); margin-top: 16px; }

/* --------------------------------------------------------------------------
   Cards & grids
   -------------------------------------------------------------------------- */

.grid { display: grid; gap: 22px; }

.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(216, 31, 38, 0.45);
  box-shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(216, 31, 38, 0.12);
}

.card h3 { margin: 18px 0 10px; }

.card p { color: var(--text-2); font-size: 0.95rem; }

.card .icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(216, 31, 38, 0.12);
  border: 1px solid rgba(216, 31, 38, 0.28);
  color: var(--red-bright);
}

.card .icon svg { width: 22px; height: 22px; }

a.card { display: block; }

a.card .more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--red-bright);
}

a.card .more::after { content: "→"; transition: transform 0.2s; }

a.card:hover .more::after { transform: translateX(4px); }

/* Feature list (checkmarks) */
.check-list { list-style: none; display: grid; gap: 13px; }

.check-list li {
  position: relative;
  padding-left: 32px;
  color: var(--text-2);
}

.check-list li strong { color: var(--text); }

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>')
    center / 10px no-repeat,
    var(--grad);
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.stat {
  text-align: center;
  padding: 34px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 700;
  background: linear-gradient(100deg, #fff 30%, var(--red-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat span { font-size: 0.88rem; color: var(--text-3); }

/* Split layout */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

/* Callout panel */
.panel {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: clamp(34px, 5vw, 64px);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 90% at 88% 10%, rgba(216, 31, 38, 0.14), transparent 60%);
  pointer-events: none;
}

.panel > * { position: relative; }

/* Timeline (implementation phases) */
.timeline { position: relative; display: grid; gap: 0; }

.tl-item {
  position: relative;
  padding: 0 0 42px 46px;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 30px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--red), rgba(216, 31, 38, 0.12));
}

.tl-item:last-child::before { display: none; }

.tl-item .tl-dot {
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 2px solid var(--red);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--red-bright);
}

.tl-item h3 { margin-bottom: 8px; }

.tl-item p { color: var(--text-2); font-size: 0.97rem; max-width: 42em; }

.tl-item .tl-tag {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(216, 31, 38, 0.14);
  border: 1px solid rgba(216, 31, 38, 0.3);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--red-bright);
  vertical-align: middle;
}

/* Video placeholder frame */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(ellipse 70% 90% at 50% 0%, rgba(216, 31, 38, 0.1), transparent 65%),
    var(--surface);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.video-frame .play {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grad);
  box-shadow: 0 10px 40px -6px var(--glow);
}

.video-frame .play svg { width: 26px; height: 26px; margin-left: 4px; }

.video-frame figcaption {
  position: absolute;
  bottom: 18px;
  font-size: 0.85rem;
  color: var(--text-3);
}

.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* Docs / publications list */
.doc-list { list-style: none; display: grid; gap: 12px; }

.doc-list a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.2s, transform 0.2s;
}

.doc-list a:hover { border-color: rgba(216, 31, 38, 0.5); transform: translateX(4px); }

.doc-list .doc-ico {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(216, 31, 38, 0.12);
  color: var(--red-bright);
}

.doc-list .doc-ico svg { width: 19px; height: 19px; }

.doc-list b { display: block; font-size: 0.97rem; }

.doc-list span { font-size: 0.82rem; color: var(--text-3); }

/* Breadcrumb */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-3);
  margin-bottom: 26px;
}

.crumbs a:hover { color: var(--red-bright); }

.crumbs .sep { opacity: 0.5; }

/* --------------------------------------------------------------------------
   Library catalog — browsable reports & extensions
   -------------------------------------------------------------------------- */

.lib-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.lib-tabs { display: flex; flex-wrap: wrap; gap: 8px; }

.lib-tab,
.lib-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 17px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text-2);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.lib-tab:hover,
.lib-chip:hover { color: var(--text); border-color: rgba(216, 31, 38, 0.45); }

.lib-tab .n,
.lib-chip .n {
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.76rem;
  color: var(--text-3);
}

.lib-tab.is-on,
.lib-chip.is-on {
  background: rgba(216, 31, 38, 0.14);
  border-color: rgba(216, 31, 38, 0.5);
  color: var(--text);
}

.lib-tab.is-on .n,
.lib-chip.is-on .n { background: rgba(216, 31, 38, 0.24); color: var(--red-bright); }

.lib-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.lib-chip { font-size: 0.83rem; padding: 7px 15px; }

.lib-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 260px;
  max-width: 380px;
}

.lib-search svg {
  position: absolute;
  left: 15px;
  width: 17px;
  height: 17px;
  color: var(--text-3);
  pointer-events: none;
}

.lib-search input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
}

.lib-search input::placeholder { color: var(--text-3); }

.lib-search input:focus {
  outline: none;
  border-color: rgba(216, 31, 38, 0.6);
  box-shadow: 0 0 0 3px rgba(216, 31, 38, 0.14);
}

.lib-count { font-size: 0.85rem; color: var(--text-3); margin-bottom: 20px; }

/* Conventions that apply across the whole catalog, called out above the grid */
.lib-note {
  padding: 22px 26px;
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-2);
}

.lib-note strong { color: var(--text); }

.lib-note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.79rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
}

.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  align-items: start;
}

.lib-card {
  display: flex;
  flex-direction: column;
  padding: 24px 24px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s, transform 0.25s;
}

.lib-card:hover { border-color: rgba(216, 31, 38, 0.4); transform: translateY(-3px); }

.lib-card[hidden] { display: none; }

.lib-head { display: flex; gap: 14px; align-items: flex-start; }

.lib-ico {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(216, 31, 38, 0.12);
  border: 1px solid rgba(216, 31, 38, 0.3);
  color: var(--red-bright);
}

.lib-ico svg { width: 20px; height: 20px; }

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

.lib-title h3 { font-size: 1.07rem; line-height: 1.25; }

.lib-slug {
  display: block;
  margin-top: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  color: var(--text-3);
  word-break: break-word;
}

.lib-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; }

.lib-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
}

.lib-badge.is-report { background: rgba(216, 31, 38, 0.14); border-color: rgba(216, 31, 38, 0.34); color: var(--red-bright); }

.lib-badge.is-ext { background: rgba(199, 201, 203, 0.1); border-color: rgba(199, 201, 203, 0.24); color: var(--silver); }

.lib-lede { margin-top: 16px; font-size: 0.97rem; color: var(--text); }

.lib-sum { margin-top: 10px; font-size: 0.9rem; line-height: 1.6; color: var(--text-2); }

.lib-details { margin-top: auto; padding-top: 18px; }

.lib-details summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--red-bright);
  transition: color 0.2s;
}

.lib-details summary::-webkit-details-marker { display: none; }

.lib-details summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.25s;
}

.lib-details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }

.lib-details summary:hover { color: #fff; }

.lib-detail-body {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.65;
}

.lib-detail-body em { color: var(--text); font-style: italic; }

.lib-detail-body strong { color: var(--text); font-weight: 600; }

.lib-rows { margin-top: 14px; display: grid; gap: 16px; }

.lib-row { display: grid; gap: 5px; align-items: start; }

.lib-row dt {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-bright);
  opacity: 0.85;
}

.lib-row dd { font-size: 0.86rem; color: var(--text-2); min-width: 0; }

.lib-row code,
.lib-params code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.79rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  word-break: break-word;
}

.lib-params { list-style: none; display: grid; gap: 9px; }

.lib-params li { line-height: 1.55; }

.lib-params code { display: inline-block; margin-bottom: 3px; }

/* "default 0" sits beside a report parameter without competing with it */
.lib-param-def {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.lib-doc {
  display: inline-block;
  margin: 0 4px 4px 0;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font-size: 0.75rem;
  text-transform: capitalize;
  color: var(--text-3);
}

.lib-empty { margin-top: 30px; text-align: center; color: var(--text-2); }

.lib-empty .lib-reset {
  margin-left: 8px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--red-bright);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Architecture map — interactive hub-and-spoke diagram
   -------------------------------------------------------------------------- */

/* The map and its detail panel sit side by side so a hovered node and its
   explanation stay in the same field of view. */
.arch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 30px;
  align-items: start;
}

.arch-layout .arch-detail {
  margin-top: 0;
  grid-template-columns: 1fr;
  gap: 18px;
  min-height: 520px;
  position: sticky;
  top: 92px;
}

.arch-layout .arch-detail h3 { font-size: 1.3rem; }
.arch-layout .arch-detail .arch-how { font-size: 0.92rem; margin-top: 14px; }
.arch-layout .arch-detail .check-list { gap: 11px; }
.arch-layout .arch-detail .check-list li { font-size: 0.88rem; }

@media (max-width: 1240px) {
  .arch-layout { grid-template-columns: 1fr; }
  .arch-layout .arch-detail {
    position: static;
    grid-template-columns: 1.15fr 1fr;
    gap: 26px 48px;
    min-height: 0;
    margin-top: 4px;
  }
}

.arch-stage { position: relative; }

.arch-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.arch-svg { display: block; width: 100%; height: auto; overflow: visible; }

/* Connectors */
.arch-svg .link,
.arch-svg .n { transition: opacity 0.3s ease; }

.arch-svg .link-line {
  fill: none;
  stroke: rgba(216, 31, 38, 0.34);
  stroke-width: 1.6;
  transition: stroke 0.3s, stroke-width 0.3s;
}

.arch-svg .link.is-ext .link-line {
  stroke: rgba(199, 201, 203, 0.24);
  stroke-dasharray: 7 6;
}

.arch-svg .link.is-supp .link-line { stroke: rgba(216, 31, 38, 0.6); stroke-width: 3; }

.arch-svg .dot { fill: var(--red-bright); transition: r 0.3s, fill 0.3s; }

.arch-svg .link.is-ext .dot { fill: var(--silver); }

/* Nodes */
.arch-svg .n { cursor: pointer; outline: none; }

.arch-svg .n-hit { fill: transparent; pointer-events: all; }

.arch-svg .n-shape {
  fill: var(--surface);
  stroke: var(--line-strong);
  stroke-width: 1.5;
  transition: stroke 0.3s, fill 0.3s;
}

.arch-svg .n-halo { fill: none; stroke: rgba(216, 31, 38, 0.16); stroke-width: 1; }

.arch-svg .n-icon {
  fill: none;
  stroke: var(--red-bright);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s;
}

.arch-svg .n-label {
  fill: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  text-anchor: middle;
}

.arch-svg .n-sub {
  fill: var(--text-3);
  font-family: var(--font-body);
  font-size: 11.5px;
  text-anchor: middle;
}

.arch-svg .n-hub-kicker {
  fill: var(--red-bright);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-anchor: middle;
}

.arch-svg .n-hub-title {
  fill: #fff;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-anchor: middle;
}

/* Hub, ERP and supplement variants */
.arch-svg .n.is-hub .n-shape { fill: url(#hubFill); stroke: rgba(216, 31, 38, 0.6); stroke-width: 2; }

.arch-svg .n.is-erp .n-shape { stroke: rgba(199, 201, 203, 0.34); }
.arch-svg .n.is-erp .n-icon { stroke: var(--silver); }
.arch-svg .n.is-erp .n-halo { stroke: rgba(199, 201, 203, 0.14); }

.arch-svg .n.is-lib .n-shape {
  fill: rgba(216, 31, 38, 0.07);
  stroke: rgba(216, 31, 38, 0.38);
  stroke-dasharray: 6 5;
}

.arch-svg .n.is-lib .n-label { text-anchor: start; font-size: 14px; }
.arch-svg .n.is-lib .n-sub { text-anchor: start; }

/* Focus / hover state */
.arch-svg.is-focused .n:not(.is-on),
.arch-svg.is-focused .link:not(.is-on) { opacity: 0.14; }

/* The compact map is small enough that heavy dimming reads as broken */
.arch-svg.mini.is-focused .n:not(.is-on) { opacity: 0.3; }
.arch-svg.mini.is-focused .link:not(.is-on) { opacity: 0.25; }

.arch-svg .n.is-on .n-shape { stroke: var(--red-bright); }
.arch-svg .n.is-on { filter: drop-shadow(0 0 16px rgba(216, 31, 38, 0.5)); }
.arch-svg .n.is-erp.is-on .n-shape { stroke: var(--silver); }
.arch-svg .n.is-erp.is-on { filter: drop-shadow(0 0 16px rgba(199, 201, 203, 0.35)); }

.arch-svg .link.is-on .link-line { stroke: var(--red-bright); stroke-width: 2.2; }
.arch-svg .link.is-on.is-ext .link-line { stroke: var(--silver); }
.arch-svg .link.is-on .dot { r: 4.6; }

.arch-svg .n:focus-visible .n-shape { stroke: #fff; stroke-width: 2.5; }

/* Detail panel */
.arch-detail {
  position: relative;
  overflow: hidden;
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 26px 48px;
  align-items: start;
  padding: clamp(26px, 3.4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
}

.arch-detail::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 100% at 100% 0%, rgba(216, 31, 38, 0.1), transparent 62%);
  pointer-events: none;
}

.arch-detail > * { position: relative; }

.arch-detail h3 { font-size: 1.45rem; margin: 12px 0 6px; }

.arch-detail .arch-tagline { color: var(--red-bright); font-size: 0.95rem; }

.arch-detail .arch-how { color: var(--text-2); font-size: 0.97rem; margin-top: 16px; }

.arch-detail .check-list li { font-size: 0.93rem; }

.arch-detail .arch-go { margin-top: 22px; }

.arch-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(216, 31, 38, 0.14);
  border: 1px solid rgba(216, 31, 38, 0.32);
  font-family: var(--font-display);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-bright);
}

.arch-badge.neutral {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-strong);
  color: var(--text-3);
}

.arch-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: center;
  margin-top: 18px;
  font-size: 0.83rem;
  color: var(--text-3);
}

.arch-hint .key { display: inline-flex; align-items: center; gap: 8px; }

.arch-hint .swatch { width: 22px; height: 0; border-top: 2px solid var(--red); flex: none; }
.arch-hint .swatch.ext { border-top-style: dashed; border-color: var(--silver); }
.arch-hint .swatch.supp { border-top-width: 3px; }

.arch-hint .only-narrow { display: none; }

/* Compact map — homepage hero */
.hero-split {
  display: grid;
  grid-template-columns: 65% 1fr;
  gap: clamp(32px, 4vw, 56px);
  align-items: center;
}

.mini-map {
  position: relative;
  padding: 20px 18px 16px;
  background: linear-gradient(160deg, rgba(20, 25, 36, 0.9), rgba(10, 13, 19, 0.75));
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.9);
}

.mini-map .arch-svg { max-width: 100%; margin: 0 auto; overflow: hidden; }

.mini-cap {
  margin-top: 10px;
  min-height: 3.2em;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-3);
}

.mini-cap b { display: block; color: var(--text); font-family: var(--font-display); font-size: 0.92rem; }

.mini-foot { margin-top: 6px; text-align: center; }

.mini-foot a { font-family: var(--font-display); font-size: 0.85rem; font-weight: 600; color: var(--red-bright); }

.mini-foot a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .arch-svg .dot { display: none; }
}

/* --------------------------------------------------------------------------
   Subscription paths & pricing
   -------------------------------------------------------------------------- */

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.plan {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 30px 28px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.plan.featured {
  background: var(--surface-2);
  border-color: rgba(216, 31, 38, 0.42);
}

.plan.featured::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 85% 0%, rgba(216, 31, 38, 0.16), transparent 65%);
  pointer-events: none;
}

.plan > * { position: relative; }

.plan-tag {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.plan.featured .plan-tag {
  background: rgba(216, 31, 38, 0.16);
  border-color: rgba(216, 31, 38, 0.36);
  color: var(--red-bright);
}

.plan h3 { margin: 18px 0 8px; min-height: 2.3em; }

.plan .who { color: var(--text-2); font-size: 0.93rem; }

.price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 6px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.price b {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(100deg, #fff 30%, var(--red-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.price span { font-size: 0.9rem; color: var(--text-3); }

.price-note { font-size: 0.84rem; color: var(--text-3); }

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 12px;
  margin: 26px 0 28px;
}

.steps li {
  position: relative;
  counter-increment: step;
  padding-left: 34px;
  font-size: 0.93rem;
  color: var(--text-2);
}

.steps li strong { color: var(--text); font-weight: 600; }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(216, 31, 38, 0.12);
  border: 1px solid rgba(216, 31, 38, 0.34);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--red-bright);
}

.plan .plan-foot { margin-top: auto; }

.plan .plan-foot .btn { width: 100%; justify-content: center; }

/* Add-on / standalone callout */
.addon {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: center;
  padding: 30px 32px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
}

.addon h3 { margin-bottom: 8px; }

.addon p { color: var(--text-2); font-size: 0.95rem; max-width: 54em; }

.addon .addon-price { text-align: right; }

.addon .addon-price b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.addon .addon-price span { font-size: 0.84rem; color: var(--text-3); }

/* Inline pill row (what the bundle covers) */
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  font-size: 0.9rem;
  color: var(--text-2);
  transition: border-color 0.2s, color 0.2s;
}

a.pill:hover { border-color: rgba(216, 31, 38, 0.5); color: var(--text); }

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad);
  flex: none;
}

.fine-print {
  margin-top: 26px;
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--text-3);
  max-width: 62em;
}

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */

.cta-band {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 96px 0;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse 55% 75% at 50% 115%, rgba(216, 31, 38, 0.22), transparent 70%),
    var(--bg-raised);
}

.cta-band h2 { margin-bottom: 14px; }

.cta-band p { color: var(--text-2); max-width: 40em; margin: 0 auto 34px; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form-card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: clamp(28px, 4vw, 48px);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.field { display: grid; gap: 8px; }

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

.field label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-2);
}

.field label .req { color: var(--red-bright); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.97rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field select { appearance: none; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path d="M1 1l5 5 5-5" stroke="%23a7b0bf" stroke-width="2" fill="none" stroke-linecap="round"/></svg>'); background-repeat: no-repeat; background-position: right 16px center; }

.field textarea { resize: vertical; min-height: 130px; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(216, 31, 38, 0.18);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-raised);
  padding: 64px 0 40px;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer h4 {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
}

.footer ul { list-style: none; display: grid; gap: 10px; }

.footer a { color: var(--text-2); transition: color 0.2s; }

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

.footer .brand { margin-bottom: 14px; }

.footer .tagline { color: var(--text-3); max-width: 30em; }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-3);
  font-size: 0.82rem;
}

/* --------------------------------------------------------------------------
   Reveal-on-scroll
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.reveal.in { opacity: 1; transform: none; }

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

/* --------------------------------------------------------------------------
   Solution pages — section nav, demo, definition, use cases, value, deployment
   -------------------------------------------------------------------------- */

.page-nav {
  position: sticky;
  top: 68px;
  z-index: 50;
  background: rgba(10, 13, 19, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.page-nav .wrap {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 10px;
}

.page-nav .wrap::-webkit-scrollbar { display: none; }

.page-nav a {
  flex: none;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.page-nav a:hover,
.page-nav a.active {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.page-nav a.active { border-color: rgba(216, 31, 38, 0.45); }

.section[id] { scroll-margin-top: 124px; }

/* Demo video — the centerpiece of every solution page */
.demo-frame {
  max-width: 1000px;
  margin: 0 auto;
  box-shadow: 0 34px 90px -34px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(216, 31, 38, 0.14);
}

.demo-note {
  max-width: 1000px;
  margin: 18px auto 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-3);
}

.video-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-frame.is-missing { background: url(../img/video-coming-soon.png) center / cover no-repeat, var(--surface); }

.video-frame.is-missing video { display: none; }

/* Library catalog: per-item explainer video */
.lib-details.lib-video + .lib-details { margin-top: 0; padding-top: 12px; }

.lib-video .lib-detail-body { padding-top: 14px; }

.lib-badge.is-video {
  color: var(--red-bright);
  border-color: rgba(216, 31, 38, 0.4);
  background: rgba(216, 31, 38, 0.12);
}

/* Marketing definition */
.definition {
  padding: 26px 28px 26px 30px;
  border-left: 3px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: linear-gradient(90deg, rgba(216, 31, 38, 0.09), transparent 75%);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: var(--text);
}

.definition .def-term {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-bright);
}

.prose p { color: var(--text-2); margin-top: 18px; }

/* "At a glance" summary card */
.glance {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
}

.glance h3 { margin-bottom: 18px; }

.glance dl { display: grid; gap: 16px; }

.glance dt {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.glance dd { margin-top: 3px; font-size: 0.95rem; color: var(--text); }

.split.top { align-items: start; }

/* Use cases */
.uc-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(216, 31, 38, 0.14);
  border: 1px solid rgba(216, 31, 38, 0.3);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--red-bright);
}

.card .uc-outcome {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--text);
}

.card .uc-outcome b { color: var(--red-bright); font-weight: 600; }

/* Value proposition */
.vp-statement {
  max-width: 24em;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 36px;
}

.compare-col {
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.compare-col.with {
  border-color: rgba(216, 31, 38, 0.38);
  background: rgba(216, 31, 38, 0.06);
}

.compare-col h3 { font-size: 1.02rem; margin-bottom: 16px; color: var(--text-2); }

.compare-col.with h3 { color: var(--text); }

.x-list { list-style: none; display: grid; gap: 13px; }

.x-list li {
  position: relative;
  padding-left: 32px;
  color: var(--text-3);
}

.x-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%236b7484" stroke-width="3.4" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>')
    center / 9px no-repeat,
    rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
}

/* Deployment & manageability */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.fact {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--red);
  border-radius: 12px;
}

.fact b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text);
}

.fact span { font-size: 0.86rem; color: var(--text-3); }

.card .steps { margin-bottom: 0; }

.card .check-list { margin-top: 22px; }

.card .check-list li { font-size: 0.93rem; }

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

@media (max-width: 720px) {
  .compare { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 44px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr; }
  .addon { grid-template-columns: 1fr; gap: 20px; }
  .addon .addon-price { text-align: left; }
  .arch-detail { grid-template-columns: 1fr; }
  .hero-split { grid-template-columns: 1fr; }
  .mini-map { max-width: 460px; margin: 0 auto; }
}

@media (max-width: 860px) {
  .arch-svg.full { min-width: 800px; }
  .arch-hint .only-narrow { display: inline-flex; color: var(--red-bright); }
}

/* The nav collapses earlier than the rest of the layout — seven items plus a
   button stop fitting well before the 720px content breakpoint. */
@media (max-width: 1060px) {
  .nav-toggle { display: grid; place-items: center; }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px 22px;
    gap: 4px;
    background: rgba(10, 13, 19, 0.97);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .nav-links.open { display: flex; }

  .nav-links a { padding: 12px 14px; }

  .nav-links a.active:not(.btn) { box-shadow: inset 3px 0 0 var(--red); border-radius: 8px; }

  .nav-links .btn-primary { align-self: flex-start; margin-top: 6px; }
}

@media (max-width: 720px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 140px 0 80px; }
  .section { padding: 68px 0; }
  .lib-grid { grid-template-columns: 1fr; }
  .lib-search { max-width: none; }
  .lib-row { grid-template-columns: 1fr; gap: 4px; }
}
