/* ==========================================================================
   Avangard — styles
   0. Fonts    1. Tokens   2. Base   3. Layout & utilities   4. Components
   5. Landing  6. CRM: request form   7. CRM: thank you   8. Responsive
   9. CRM: additions (errors, prices, engagement, legal and error pages)
   10. Admin   11. Client sign-in and client area   12. Orders   13. Billing
   ========================================================================== */

/* 0. Fonts (self-hosted, SIL Open Font License; see static/fonts) --------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --surface-3: #f0f2f7;

  --ink: #0b1020;
  --ink-2: #1e2534;
  --muted: #5b6474;
  --subtle: #8a93a5;

  --line: #e6e9f0;
  --line-strong: #d5dae4;
  --grid-line: rgba(15, 23, 42, 0.045);

  --primary: #2e5bff;
  --primary-hover: #2149e6;
  --primary-soft: #eef2ff;
  --primary-ring: rgba(46, 91, 255, 0.18);

  --violet: #7c5cff;
  --violet-soft: #f1edff;
  --green: #16a34a;
  --green-soft: #e7f7ee;
  --teal: #0ea5a4;
  --teal-soft: #e6f7f6;
  --orange: #ea7a0c;
  --orange-soft: #fff3e6;

  --dark: #0b1122;
  --dark-2: #121a30;
  --dark-line: #1f2840;
  --dark-text: #e7eaf3;
  --dark-muted: #8b94ab;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 12px -6px rgba(16, 24, 40, 0.08);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 32px -16px rgba(16, 24, 40, 0.16);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, 0.04), 0 28px 56px -28px rgba(16, 24, 40, 0.3);
  --shadow-primary: 0 8px 20px -8px rgba(46, 91, 255, 0.55);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1200px;
  --gutter: 20px;
  --header-h: 72px;
}

/* 2. Base ------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--primary-ring); }

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

/* 3. Layout & utilities ---------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { --container: 1160px; }

.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;
}

.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.text-primary { color: var(--primary); }

.bg-grid {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { width: 14px; height: 14px; }
.icon--lg { width: 20px; height: 20px; }

/* Typography */
.display {
  font-size: clamp(40px, 5.4vw, 66px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.048em;
}

.h-section {
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  color: var(--primary);
}

.lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}

/* 4. Components ------------------------------------------------------------ */

/* Buttons */
.btn {
  --btn-h: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .15s, border-color .15s, box-shadow .15s, transform .15s, color .15s;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn--primary:hover { background: var(--primary-hover); }

.btn--ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}
.btn--ghost:hover { border-color: #c3c9d6; background: var(--surface-2); }

.btn--sm { --btn-h: 34px; padding: 0 12px; font-size: 13px; font-weight: 500; }
.btn--lg { --btn-h: 48px; padding: 0 22px; font-size: 15px; border-radius: 10px; }
.btn--xl { --btn-h: 52px; padding: 0 26px; font-size: 16px; border-radius: 10px; }

.btn .icon { transition: transform .15s; }
.btn:hover .icon--arrow { transform: translateX(2px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}
.link-arrow::after { content: "→"; transition: transform .15s; }
.link-arrow:hover::after { transform: translateX(3px); }

/* Tags / chips */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--surface);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
}

/* Status dot */
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
}
.dot--blue { background: var(--primary); }
.dot--violet { background: var(--violet); }
.dot--teal { background: var(--teal); }
.dot--pulse { box-shadow: 0 0 0 0 rgba(22, 163, 74, .45); animation: pulse 2s infinite; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .45); }
  70% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.brand img { width: 32px; height: 32px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.site-nav { display: flex; gap: 32px; }
.site-nav a {
  font-size: 14px;
  color: var(--muted);
  transition: color .15s;
}
.site-nav a:hover { color: var(--ink); }
/* The section on screen (site.js). */
.site-nav a { position: relative; }
.site-nav a.is-active { color: var(--primary); }
.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.site-header__actions { display: flex; align-items: center; gap: 20px; }
.site-header__link {
  font-size: 14px;
  white-space: nowrap;
  color: var(--muted);
  transition: color .15s;
}
.site-header__link:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

/* Form controls */
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 15px; font-weight: 500; color: var(--ink); }
.field__label .req { color: var(--primary); }
.field__label .opt { color: var(--muted); font-weight: 400; }
.field__hint { font-size: 13px; color: var(--muted); }
.field--fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.field--fieldset > legend { padding: 0; margin-bottom: 8px; }

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  font-size: 16px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.input,
.select { height: 48px; padding: 0 14px; }
.textarea { min-height: 142px; padding: 14px; line-height: 1.5; resize: vertical; }

.input::placeholder,
.textarea::placeholder { color: var(--subtle); }

.input:hover,
.select:hover,
.textarea:hover { border-color: #c3c9d6; }

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-ring);
}

.select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1020' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

.was-validated .input:invalid,
.was-validated .select:invalid,
.was-validated .textarea:invalid {
  border-color: #e5484d;
  box-shadow: 0 0 0 4px rgba(229, 72, 77, .12);
}
.was-validated .choices:has(input:invalid) .choice { border-color: #f1a7a9; }

/* 5. Landing --------------------------------------------------------------- */

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 96px;
  background:
    radial-gradient(520px 380px at 12% 38%, rgba(46, 91, 255, .10), transparent 70%),
    radial-gradient(560px 420px at 88% 30%, rgba(124, 92, 255, .08), transparent 70%),
    var(--bg);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 40%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 40%, #000 30%, transparent 85%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  font-size: 13px;
  color: var(--ink-2);
}
.availability .mono { font-size: 12px; color: var(--subtle); }

.hero__title { margin-top: 24px; }
.hero__title em { font-style: normal; color: var(--primary); }

.hero__lead { margin-top: 24px; max-width: 540px; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--subtle);
}

.hero__visual { display: grid; gap: 16px; }

/* Terminal */
.terminal {
  overflow: hidden;
  border: 1px solid var(--dark-line);
  border-radius: var(--radius-lg);
  background: var(--dark);
  color: var(--dark-text);
  box-shadow: var(--shadow-lg), 0 30px 60px -30px rgba(46, 91, 255, .35);
}
.terminal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--dark-line);
}
.terminal__tabs { display: flex; gap: 4px; }
.terminal__tab {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dark-muted);
  transition: background-color .15s, color .15s;
}
.terminal__tab:hover { color: var(--dark-text); }
.terminal__tab[aria-selected="true"] { background: var(--primary); color: #fff; }
.terminal__path { font-family: var(--font-mono); font-size: 12px; color: var(--dark-muted); }

.terminal__body {
  min-height: 236px;
  padding: 20px 20px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2.05;
}
.terminal__line { display: flex; gap: 12px; white-space: pre-wrap; }
.terminal__line > span:first-child { width: 12px; flex: none; }
.t-prompt { color: #7c9bff; }
.t-muted { color: var(--dark-muted); }
.t-ok { color: #34d399; }

.cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  vertical-align: -3px;
  background: var(--primary);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Mini status cards */
.status-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }
.status-card { padding: 14px 16px 16px; }
.status-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--subtle);
}
.status-card__state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--primary);
}
.status-card__state--ok { color: var(--green); }

.pipeline-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.pipeline-steps li { display: inline-flex; align-items: center; gap: 5px; }
.pipeline-steps .is-current { color: var(--primary); }
.pipeline-steps .is-current::before {
  content: "";
  width: 10px;
  height: 1px;
  margin-right: 2px;
  background: var(--primary);
}

.progress {
  height: 4px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-3);
}
.progress__bar {
  height: 100%;
  width: 76%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--teal));
  animation: progress 3.2s ease-in-out infinite alternate;
}
@keyframes progress { from { width: 62%; } to { width: 88%; } }

.sparkline { width: 100%; height: 40px; margin-top: 8px; }

/* Stack strip */
.stack {
  border-block: 1px solid var(--line);
  background: var(--surface);
}
.stack__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}
.stack__label {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--subtle);
}
.marquee {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__list { display: flex; gap: 46px; padding-right: 46px; }
.marquee__list li {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-2);
  white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(-50%); } }
/* With site.js the ribbon is moved by script and can be dragged. */
.marquee.is-scripted { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.marquee.is-scripted .marquee__track { animation: none; will-change: transform; }
.marquee.is-dragging { cursor: grabbing; }

/* Sections */
.section { padding: 112px 0 0; }
.section:last-of-type { padding-bottom: 112px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 44px;
}
.section-head__title { margin-top: 14px; }
.section-head__sub { margin-top: 14px; font-size: 16px; color: var(--muted); }
.section-head__aside { max-width: 380px; font-size: 16px; color: var(--muted); }

/* Services */
.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.svc-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.svc-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.svc-card__visual {
  position: relative;
  display: grid;
  place-items: center;
  height: 230px;
  border-bottom: 1px solid var(--line);
  background-size: 28px 28px;
}
.svc-card__visual--sysops { background-color: #f6f8fc; }
.svc-card__visual--devops { background-color: #f8f6fe; }
.svc-card__visual--integrations { background-color: #f4fbfa; }

.svc-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px 26px 26px;
}
.svc-card__title { font-size: 24px; font-weight: 700; letter-spacing: -0.04em; }
.svc-card__desc { margin-top: 6px; color: var(--muted); }
.svc-card .tags { margin-top: 18px; }
.svc-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}

/* SysOps visual */
.hosts { display: grid; gap: 10px; width: 216px; }
.host {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
}
.host__name { flex: 1; }
.host__meter {
  position: relative;
  width: 54px;
  height: 4px;
  border-radius: 99px;
  background: var(--surface-3);
}
.host__meter::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--load, 50%);
  border-radius: inherit;
  background: var(--primary);
}
.host__ok { color: var(--green); }

/* DevOps visual */
.flow {
  display: flex;
  align-items: flex-start;
}
.flow__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.flow__box {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  color: var(--green);
}
.flow__node--deploy { color: var(--violet); }
.flow__node--deploy .flow__box {
  border-color: transparent;
  background: var(--violet);
  color: #fff;
  box-shadow: 0 0 0 6px rgba(124, 92, 255, .14), 0 10px 20px -8px rgba(124, 92, 255, .6);
}
.flow__link {
  width: 34px;
  height: 0;
  margin-top: 22px;
  border-top: 2px solid var(--green);
}
.flow__link--pending { border-top: 2px dashed var(--primary); }

/* Integrations visual */
.hub {
  display: grid;
  grid-template-columns: auto 34px auto 34px auto;
  align-items: center;
}
.hub__col { display: grid; gap: 12px; }
.hub__chip {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
.hub__link { border-top: 2px dashed var(--primary); opacity: .7; }
.hub__core {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: var(--dark);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: #5eead4;
  box-shadow: 0 0 0 6px rgba(14, 165, 164, .12), 0 12px 24px -10px rgba(11, 17, 34, .6);
}

/* Offers (start small) */
.offers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.offer {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 30px 28px;
  transition: box-shadow .2s, border-color .2s;
}
.offer:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.offer--featured {
  border: 1.5px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(46, 91, 255, .06), var(--shadow);
}
.offer--featured:hover { border-color: var(--primary); }
.offer__badge {
  position: absolute;
  top: -11px;
  left: 24px;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--primary);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}
.offer__price {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.045em;
}
.offer--featured .offer__price { color: var(--primary); }
.offer__title { margin-top: 10px; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.offer__desc { margin-top: 10px; color: var(--muted); }
.offer .link-arrow { margin-top: auto; padding-top: 24px; }

/* Process */
.stages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.stage { padding: 22px 24px 26px; }
.stage__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--subtle);
}
.stage__title { margin-top: 16px; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.stage__desc { margin-top: 8px; font-size: 14px; color: var(--muted); }

.stage--dark {
  border-color: var(--dark);
  background: var(--dark);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.stage--dark .stage__head { color: var(--dark-muted); }
.stage--dark .stage__desc { color: #c4cad8; }

.engagement {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
}
.engagement__label {
  margin-right: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--subtle);
}

/* CTA */
.cta {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 72px 72px;
  border-radius: var(--radius-2xl);
  background:
    radial-gradient(520px 320px at 82% 55%, rgba(46, 91, 255, .45), transparent 70%),
    var(--dark);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.cta > * { position: relative; }
.cta__cmd { font-family: var(--font-mono); font-size: 13px; color: #7c9bff; }
.cta__title {
  margin-top: 12px;
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.05em;
}
.cta__text { margin-top: 18px; font-size: 17px; color: #c4cad8; }
.cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.cta__phone { font-size: 15px; color: #c4cad8; }
.cta__phone a { color: #fff; }
.cta__phone a:hover { text-decoration: underline; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.site-footer__top {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 64px 0 48px;
}
.site-footer__brand { font-size: 18px; font-weight: 700; letter-spacing: -0.04em; }
.site-footer__about { margin-top: 14px; max-width: 320px; font-size: 14px; color: var(--muted); }
.site-footer__mail { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--primary); }
.site-footer__mail:hover { text-decoration: underline; }
.site-footer__heading {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--subtle);
}
.site-footer__links { display: grid; gap: 8px; margin-top: 14px; font-size: 14px; }
.site-footer__links a { color: var(--ink-2); }
.site-footer__links a:hover { color: var(--primary); }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.site-footer__bottom .mono { font-size: 11px; color: var(--subtle); }

/* 6. CRM: request form ----------------------------------------------------- */
.crm-page {
  position: relative;
  padding-bottom: 96px;
}
.crm-page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 720px;
  background:
    radial-gradient(420px 320px at 92% 8%, rgba(46, 91, 255, .12), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px;
  mask-image: linear-gradient(#000 40%, transparent);
  -webkit-mask-image: linear-gradient(#000 40%, transparent);
  pointer-events: none;
}
.crm-page > * { position: relative; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 0 36px;
}
.page-head__title {
  margin-top: 10px;
  font-size: clamp(36px, 4.4vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.05em;
}
.page-head__sub { margin-top: 12px; font-size: 18px; color: var(--muted); }

/* Stepper */
.stepper { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stepper__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--muted);
}
.stepper__mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  transition: all .2s;
}
.stepper__mark .icon { display: none; width: 14px; height: 14px; stroke-width: 3; }
.stepper__line {
  width: 28px;
  height: 1.5px;
  background: var(--line-strong);
  transition: background-color .2s;
}

.stepper__item.is-current { color: var(--ink); }
.stepper__item.is-current .stepper__mark { border-color: var(--primary); color: var(--primary); }

.stepper__item.is-done { color: var(--ink); }
.stepper__item.is-done .stepper__mark {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.stepper__item.is-done .stepper__mark .icon { display: block; }
.stepper__item.is-done .stepper__mark span { display: none; }
.stepper__item.is-done + .stepper__line { background: var(--primary); }

/* Layout */
.request-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.form-card {
  padding: 36px;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow);
}

.form-section + .form-section { margin-top: 40px; }
.form-section__title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.form-section__num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--primary);
}

/* Service choice cards */
.choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}
.choice {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.choice--wide { grid-column: 1 / -1; }
.choice:hover { border-color: var(--line-strong); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }

.choice__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-radius: 9px;
}
.choice__icon--teal { background: var(--teal-soft); color: var(--teal); }
.choice__icon--violet { background: var(--violet-soft); color: var(--violet); }
.choice__icon--orange { background: var(--orange-soft); color: var(--orange); }
.choice__icon--blue { background: var(--primary-soft); color: var(--primary); }
.choice__icon .icon { width: 18px; height: 18px; }

.choice__title { font-size: 18px; font-weight: 700; letter-spacing: -0.03em; }
.choice__desc { margin-top: 6px; font-size: 14px; line-height: 1.45; color: var(--muted); }

.choice__radio {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: #fff;
  transition: all .15s;
}
.choice__radio .icon { width: 12px; height: 12px; stroke-width: 3; opacity: 0; }

.choice:has(input:checked) {
  border: 1.5px solid var(--primary);
  padding: 15.5px;
  background: linear-gradient(180deg, #f7f9ff, var(--surface));
  box-shadow: 0 0 0 4px rgba(46, 91, 255, .08);
}
.choice:has(input:checked) .choice__radio {
  top: 15.5px;
  right: 15.5px;
  border-color: var(--primary);
  background: var(--primary);
}
.choice:has(input:checked) .choice__radio .icon { opacity: 1; }
.choice:has(input:checked) .choice__desc { color: var(--ink-2); }
.choice:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Areas */
.areas {
  margin-top: 16px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}
.areas[hidden] { display: none; }
.areas__label { display: block; margin-bottom: 14px; padding: 0; font-size: 15px; font-weight: 500; }
.areas__label .opt { color: var(--muted); font-weight: 400; }
.areas fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.areas fieldset[hidden] { display: none; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 15px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  transition: background-color .15s, border-color .15s, color .15s;
}
.chip-check:hover { border-color: #b9c0ce; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check .icon { display: none; width: 14px; height: 14px; stroke-width: 2.5; }
.chip-check:has(input:checked) {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  font-weight: 500;
}
.chip-check:has(input:checked) .icon { display: block; }
.chip-check:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Segmented control */
.segmented {
  display: inline-flex;
  align-self: flex-start;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-3);
}
.segmented label {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color .15s, box-shadow .15s;
}
.segmented label:hover { color: var(--ink); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) {
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  box-shadow: var(--shadow-xs), 0 0 0 1px var(--line);
}
.segmented label:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 1px; }

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

/* Optional extras */
.extra { margin-top: 22px; }
.extra summary {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  transition: border-color .15s, background-color .15s;
}
.extra summary::-webkit-details-marker { display: none; }
.extra summary:hover { border-color: var(--primary); background: #fafbff; }
.extra summary strong { font-weight: 500; color: var(--primary); }
.extra summary .icon { color: var(--primary); transition: transform .2s; }
.extra[open] summary { margin-bottom: 22px; border-style: solid; }
.extra[open] summary .icon { transform: rotate(45deg); }

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.form-foot__note { font-size: 14px; color: var(--muted); }
.form-foot__note a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

/* Sidebar */
.sidebar .stepper { flex-wrap: nowrap; gap: 8px; padding: 2px 2px 4px; }
.sidebar .stepper__item { font-size: 14px; white-space: nowrap; }
.sidebar .stepper__line { flex: 1; width: auto; min-width: 12px; }
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px); /* below the sticky header, not under it */
  display: grid;
  gap: 16px;
}

.code-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--dark);
  color: var(--dark-text);
  box-shadow: var(--shadow-lg);
}
.code-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--dark-line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dark-muted);
}
.code-card__live { display: inline-flex; align-items: center; gap: 6px; color: #7c9bff; }
.code-card__live .dot { width: 5px; height: 5px; background: #7c9bff; }
.code-card__body {
  margin: 0;
  padding: 16px 18px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
}
.j-key { color: #e7eaf3; }
.j-str { color: #c9d6ff; }
.j-punc { color: #8b94ab; }
.code-card__body .cursor { width: 7px; height: 15px; }

.side-card { padding: 22px 24px; }
.side-card__title { font-size: 18px; font-weight: 700; letter-spacing: -0.03em; }
.next-steps { display: grid; gap: 14px; margin-top: 16px; counter-reset: step; }
.next-steps li {
  display: grid;
  grid-template-columns: 26px 1fr;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
  counter-increment: step;
}
.next-steps li::before {
  content: "0" counter(step);
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary);
}

.urgent {
  padding: 20px 22px;
  border: 1px solid #dde4ff;
  border-radius: var(--radius-lg);
  background: var(--primary-soft);
}
.urgent__label { font-size: 15px; color: var(--muted); }
.urgent__phone {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.urgent__phone:hover { color: var(--primary); }
.urgent__hours { margin-top: 4px; font-size: 13px; color: var(--muted); }

.privacy-note {
  display: flex;
  gap: 10px;
  padding: 0 8px;
  font-size: 13px;
  color: var(--muted);
}
.privacy-note .icon { margin-top: 2px; color: var(--subtle); }

/* 7. CRM: thank you -------------------------------------------------------- */
.thanks {
  position: relative;
  padding: 64px 0 96px;
}
.thanks::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 820px;
  background:
    radial-gradient(420px 300px at 50% 12%, rgba(46, 91, 255, .12), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px;
  mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, #000 40%, transparent);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, #000 40%, transparent);
  pointer-events: none;
}
.thanks__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 10px rgba(46, 91, 255, .08), 0 18px 36px -12px rgba(46, 91, 255, .7);
  animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
.success-mark .icon { width: 26px; height: 26px; stroke-width: 2.5; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

.thanks__title {
  margin-top: 24px;
  font-size: clamp(36px, 4.4vw, 50px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.055em;
}
.thanks__text { margin-top: 14px; max-width: 460px; font-size: 18px; color: var(--muted); }

.receipt {
  width: 100%;
  margin-top: 32px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  text-align: left;
}
.receipt__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.receipt__label { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.receipt__number {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: .06em;
}
.copy-btn.is-copied { border-color: var(--green); color: var(--green); }

.timeline { padding: 22px 24px; }
.timeline__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 50px;
  padding-left: 36px;
  font-size: 15px;
  color: var(--ink-2);
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  box-sizing: border-box;
}
.timeline__item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 10.25px;
  top: calc(50% + 11px);
  height: calc(100% - 22px);
  width: 1.5px;
  background: var(--line-strong);
}
.timeline__meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-align: right; }

.timeline__item.is-done { font-weight: 500; color: var(--ink); }
.timeline__item.is-done::before {
  border-color: var(--green);
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.timeline__item.is-done::after { background: var(--primary); }
.timeline__item.is-done .timeline__meta { color: var(--green); }

.timeline__item.is-current { font-weight: 600; color: var(--primary); }
.timeline__item.is-current::before {
  border: 2px solid var(--primary);
  background: radial-gradient(circle, var(--primary) 0 4px, var(--surface) 4.5px);
}
.timeline__item.is-current .timeline__meta { font-weight: 400; }

.receipt__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.receipt__urgent { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); }
.receipt__urgent .icon { color: var(--primary); }
.receipt__phone { font-size: 18px; font-weight: 700; letter-spacing: -0.03em; }
.receipt__phone:hover { color: var(--primary); }

.thanks__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.thanks__note { margin-top: 18px; font-size: 13px; color: var(--muted); }

/* 8. Responsive ------------------------------------------------------------ */
@media (max-width: 1100px) {
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__visual { max-width: 620px; }
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta { flex-direction: column; align-items: flex-start; padding: 56px 48px; }
}

@media (max-width: 960px) {
  .site-nav,
  .site-header__link--hide-md { display: none; }
  .nav-toggle { display: inline-flex; }

  .site-header.is-open .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .site-header.is-open .site-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
    color: var(--ink);
  }

  .services,
  .offers { grid-template-columns: 1fr; max-width: 560px; }
  .offers { gap: 28px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .site-footer__top { grid-template-columns: 1fr 1fr; }
  .site-footer__top > :first-child { grid-column: 1 / -1; }

  .page-head { flex-direction: column; align-items: flex-start; }
  .request-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar > .code-card { grid-column: 1 / -1; }
  .sidebar .stepper { display: none; } /* below the form on small screens: no use there */
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --header-h: 64px; }
  body { font-size: 15px; }

  .hero { padding: 48px 0 64px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .status-row { grid-template-columns: 1fr; }
  .terminal__path { display: none; }
  .terminal__body { font-size: 12px; padding: 16px; }

  .section { padding-top: 80px; }
  .section:last-of-type { padding-bottom: 80px; }
  .stages { grid-template-columns: 1fr; }
  .cta { padding: 44px 24px; border-radius: var(--radius-xl); }
  .cta__actions .btn { width: 100%; }

  .site-header__actions { gap: 10px; }
  .site-header__actions .btn--primary,
  .site-header__link:not(:only-child) { display: none; }

  .form-card { padding: 22px 18px; border-radius: var(--radius-xl); }
  .choices { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .segmented { display: flex; }
  .segmented label { flex: 1; justify-content: center; padding: 0 10px; font-size: 14px; }
  .form-foot { flex-direction: column-reverse; align-items: stretch; text-align: center; }
  .form-foot .btn { width: 100%; }
  .sidebar { grid-template-columns: 1fr; }

  .stepper__line { width: 16px; }
  .stepper__item { font-size: 14px; }

  .receipt__head { padding: 18px; }
  .receipt__number { font-size: 22px; }
  .timeline { padding: 16px 18px; }
  .timeline__item { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; min-height: 56px; }
  .timeline__meta { text-align: left; }
  .receipt__foot { padding: 14px 18px; flex-wrap: wrap; }
  .thanks__actions .btn { flex: 1 1 100%; }
}

/* 9. CRM: additions -------------------------------------------------------- */

/* Server-side validation errors */
.form-alert {
  margin-bottom: 28px;
  padding: 14px 16px;
  border: 1px solid #f1a7a9;
  border-radius: 12px;
  background: #fff5f5;
  font-size: 15px;
  color: #a1262b;
}
.field__error { font-size: 13px; font-weight: 500; color: #c62a2f; }
.field.is-invalid .input,
.field.is-invalid .select,
.field.is-invalid .textarea {
  border-color: #e5484d;
  box-shadow: 0 0 0 4px rgba(229, 72, 77, .12);
}
.is-invalid .choices .choice { border-color: #f1a7a9; }

/* Services of the chosen direction: shown without JavaScript via :has() */
.areas__group { display: none; }
.form-card:not(:has(input[name="service"]:checked)) .areas { display: none; }
.form-card:has(input[name="service"][value="integrations"]:checked) .areas__group--integrations,
.form-card:has(input[name="service"][value="devops"]:checked) .areas__group--devops,
.form-card:has(input[name="service"][value="sysops"]:checked) .areas__group--sysops { display: block; }
.areas__group.is-active { display: block; }

.chip-check__price {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.chip-check:has(input:checked) .chip-check__price { color: #c9cfdc; }

/* Engagement model */
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
.choice--compact { padding: 14px 16px; }
.choice--compact:has(input:checked) { padding: 13.5px 15.5px; }
.choice--compact .choice__title { padding-right: 32px; font-size: 16px; }
.choice--compact .choice__radio { top: 13px; right: 14px; }
.choice--compact:has(input:checked) .choice__radio { top: 12.5px; right: 13.5px; }
.choice__price {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--primary);
}

/* Honeypot: hidden from people, visible to naive bots */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Footer (CRM) */
.crm-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.crm-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 24px 0 32px;
  font-size: 13px;
  color: var(--muted);
}
.crm-footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.crm-footer__links a { color: var(--ink-2); }
.crm-footer__links a:hover { color: var(--primary); }

/* Legal pages (Privacy Policy, Terms) */
.prose {
  max-width: 760px;
  padding: 40px 0 96px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
}
.prose h1 { font-size: clamp(32px, 4vw, 44px); font-weight: 700; line-height: 1.1; letter-spacing: -0.04em; color: var(--ink); }
.prose h2 { margin-top: 40px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.prose h3 { margin-top: 28px; font-size: 17px; font-weight: 600; color: var(--ink); }
.prose p, .prose ul, .prose ol, .prose table, .prose blockquote { margin-top: 14px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.prose hr { margin: 36px 0; border: 0; border-top: 1px solid var(--line); }
.prose code { font-family: var(--font-mono); font-size: .9em; }
.prose blockquote { margin-left: 0; padding: 12px 16px; border-left: 3px solid var(--primary); background: var(--primary-soft); border-radius: 0 8px 8px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--surface-3); font-weight: 600; }

/* Error pages */
.error-page { padding: 96px 0 128px; text-align: center; }
.error-page__code { font-family: var(--font-mono); font-size: 14px; color: var(--primary); }
.error-page__title { margin-top: 12px; font-size: clamp(32px, 4vw, 44px); font-weight: 700; letter-spacing: -0.04em; }
.error-page__text { max-width: 480px; margin: 14px auto 0; font-size: 17px; color: var(--muted); }
.error-page .btn { margin-top: 28px; }

@media (max-width: 640px) {
  .plans { grid-template-columns: 1fr; }
}

/* 10. Admin ---------------------------------------------------------------- */
.admin-page { padding: 32px 0 96px; }
.admin-page .container { max-width: 1240px; }
.admin-nav { display: flex; gap: 4px; }
.admin-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
}
.admin-nav__link:hover { background: var(--surface-3); }
.admin-nav__link.is-active { background: var(--primary-soft); color: var(--primary); }
.admin-user { font-size: 14px; color: var(--muted); }
.inline-form { display: inline; margin: 0; }

.notice {
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid #b7e4c7;
  border-radius: 12px;
  background: var(--green-soft);
  font-size: 15px;
  color: #166534;
}
.notice--error { border-color: #f1a7a9; background: #fff5f5; color: #a1262b; }

.login-card { max-width: 420px; margin: 48px auto; padding: 32px; }
.login-card__title { margin: 8px 0 20px; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }

.admin-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 20px; }
.admin-head__title { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.admin-head__meta { font-size: 14px; color: var(--muted); }
.back-link { display: inline-block; margin-bottom: 12px; font-size: 14px; color: var(--muted); }
.back-link:hover { color: var(--primary); }

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(160px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 20px;
}
.filters .input, .filters .select { height: 42px; }
.filters__actions .btn { height: 42px; }
.filters .icon-toggle { width: 42px; height: 42px; }
.filters__actions { display: flex; gap: 8px; }

.table-card { overflow-x: auto; padding: 0; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.is-new td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.table__link { font-weight: 600; color: var(--primary); }
.table__link:hover { text-decoration: underline; }
.table__primary { font-weight: 500; }
.table__secondary { font-size: 13px; color: var(--muted); }
.nowrap { white-space: nowrap; }

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge--new { background: var(--primary); color: #fff; }
.badge--in_progress { background: var(--orange-soft); color: #b45309; }
.badge--closed { background: var(--surface-3); color: var(--muted); }
.badge--won { background: var(--green-soft); color: #166534; }
.badge--lost { background: #fff1f1; color: #a1262b; }
.admin-nav .badge { height: 20px; padding: 0 7px; font-size: 11px; }

.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 20px; }
.pager__info { font-size: 14px; color: var(--muted); }
.empty-state { padding: 40px 24px; text-align: center; color: var(--muted); }

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
  gap: 20px;
  align-items: start;
}
.detail-main, .detail-side { display: grid; gap: 20px; }
.panel { padding: 22px; }
.panel__title { margin-bottom: 14px; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.panel__subtitle { margin: 18px 0 8px; font-size: 14px; font-weight: 600; }
.facts { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts a { color: var(--primary); }
.facts--stacked { grid-template-columns: 90px 1fr; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.description {
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 15px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.hint { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.diff { margin-top: 14px; padding: 12px 14px; border: 1px dashed #f0c27b; border-radius: 10px; background: #fffaf0; }
.diff .panel__subtitle { margin-top: 0; }
.diff__value { font-weight: 500; }

.history { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.history__item { padding-left: 14px; border-left: 2px solid var(--line); }
.history__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 14px; }
.history__meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.history__note { margin-top: 6px; font-size: 14px; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }

.textarea--sm { min-height: 90px; }

@media (max-width: 960px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .field:first-child { grid-column: 1 / -1; }
  .detail-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .filters { grid-template-columns: 1fr; }
  .admin-user { display: none; }
  .facts, .facts--stacked { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
}

/* 11. Client sign-in and client area --------------------------------------- */
.login-card__text { margin-bottom: 20px; font-size: 15px; color: var(--muted); }
.login-card__foot { margin-top: 20px; font-size: 14px; color: var(--muted); }
.form-foot__note p { margin: 0; }
.form-foot__note .form-foot__alt { margin-top: 10px; }
.login-card__foot a, .login-card__text a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.login-card--center { text-align: center; }
.login-card--center form { display: flex; justify-content: center; }
.success-mark--sm { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; }
.success-mark--sm .icon { width: 26px; height: 26px; }
.side-card__text { font-size: 14px; color: var(--muted); }
.input--code { font-family: var(--font-mono); font-size: 26px; letter-spacing: 10px; text-align: center; }
.side-card__text a { color: var(--primary); font-weight: 600; }
.form-card--narrow { max-width: 760px; }
.field-grid--spaced { margin-top: 22px; }
.field__static { display: flex; align-items: center; height: 48px; font-size: 16px; color: var(--ink-2); }

.cabinet-tabs { display: flex; align-items: center; gap: 4px; padding: 28px 0 20px; }
.cabinet-tabs__link {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
}
.cabinet-tabs__link:hover { background: var(--surface-3); }
.cabinet-tabs__link.is-active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); }
.cabinet-tabs__new { margin-left: auto; }

.status-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.status-tabs__link {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  line-height: 30px;
  color: var(--ink-2);
}
.status-tabs__link.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }

.request-cards { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.request-card { display: block; padding: 18px 20px; transition: border-color .15s, box-shadow .15s; }
.request-card:hover { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.request-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.request-card__code { font-weight: 600; color: var(--primary); }
.request-card__title { margin-top: 8px; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.request-card__text { margin-top: 4px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.request-card__meta { margin-top: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--subtle); }
.request-card__reply { color: var(--green); font-weight: 600; }

.reply { margin-bottom: 20px; border-left: 4px solid var(--green); }
.reply__text { font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Header links for signed-in clients stay visible on phones. */
@media (max-width: 640px) {
  .site-header__actions .site-header__link:not(.site-header__link--hide-md) { display: inline; font-size: 14px; }
  .cabinet-tabs { flex-wrap: wrap; }
}

/* 12. Orders ---------------------------------------------------------------- */
.admin-head__action { margin-left: auto; }
.stat-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr); gap: 12px; margin-bottom: 20px; }
.stat-tile { padding: 16px 18px; }
.stat-tile__label { font-family: var(--font-mono); font-size: 11px; color: var(--subtle); text-transform: uppercase; }
.stat-tile__value { margin-top: 6px; font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.stat-tile__unit { font-size: 14px; font-weight: 500; color: var(--muted); }
.stat-tile__statuses { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.badge--order-in_work { background: var(--primary-soft); color: var(--primary); }
.badge--order-on_hold { background: var(--orange-soft); color: #b45309; }
.badge--order-done { background: var(--green-soft); color: #166534; }
.badge--order-cancelled { background: var(--surface-3); color: var(--muted); }

.filters--orders { grid-template-columns: minmax(200px, 2fr) repeat(3, minmax(130px, 1fr)) repeat(2, minmax(130px, 1fr)) auto; }
.table .num { text-align: right; }
.facts__big { font-size: 18px; font-weight: 700; }
.hint--inline { display: inline; margin-left: 8px; }
.panel--muted { background: var(--surface-2); }
.segmented--wrap { flex-wrap: wrap; }

.events { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.events__item { position: relative; padding: 0 0 18px 22px; border-left: 2px solid var(--line); margin-left: 6px; }
.events__item:last-child { padding-bottom: 0; border-left-color: transparent; }
.events__item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 3px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  background: var(--surface);
}
.events__item--muted::before { border-color: var(--line-strong); }
.events__item--created::before { background: var(--primary); }
.events__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 14px; }
.events__changes { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.events__changes s { color: var(--subtle); }

.inline-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.input--sm { height: 38px; max-width: 280px; }
.checkbox { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.performers-new { margin-top: 20px; }

.badge--client-new { background: var(--primary); color: #fff; }
.badge--client-in_progress, .badge--client-in_work { background: var(--primary-soft); color: var(--primary); }
.badge--client-on_hold { background: var(--orange-soft); color: #b45309; }
.badge--client-done { background: var(--green-soft); color: #166534; }
.badge--client-closed, .badge--client-cancelled { background: var(--surface-3); color: var(--muted); }
.panel .hint + .btn { margin-top: 14px; }

@media (max-width: 960px) {
  .stat-tiles { grid-template-columns: 1fr 1fr; }
  .filters--orders { grid-template-columns: 1fr 1fr; }
}

/* 13. Billing --------------------------------------------------------------- */
.seller-card { margin-bottom: 20px; }
.seller-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.seller-card .table { margin: 6px 0 14px; }
.table--compact td, .table--compact th { padding: 8px 10px; }
.table--compact .badge { margin-left: 6px; }
.checkbox--block { display: flex; align-items: flex-start; gap: 8px; }
.checkbox--block input { margin-top: 4px; }

/* Invoices: list badges, order panel, editor */
.badge--invoice-draft { background: var(--surface-3); color: var(--ink-2); }
.badge--invoice-issued { background: var(--primary-soft); color: var(--primary); }
.badge--invoice-accepted { background: var(--violet-soft); color: var(--violet); }
.badge--invoice-partially_paid { background: var(--orange-soft); color: #b45309; }
.badge--invoice-paid { background: var(--green-soft); color: #166534; }
.badge--invoice-cancelled { background: #fff1f1; color: #a1262b; }

.order-invoices { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; font-size: 14px; }
.order-invoices li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order-invoices a { color: var(--primary); font-weight: 600; }
.order-invoices__new { margin-top: 6px; }

.inv-editor__head { margin-bottom: 8px; }
.inv-lines { display: grid; gap: 14px; margin: 10px 0 22px; padding: 0; list-style: none; counter-reset: line; }
.inv-line { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.inv-line.is-invalid { border-color: #f1a7a9; background: #fffafa; }
.inv-line__top { display: grid; grid-template-columns: minmax(0, 1fr) 80px 150px 120px; gap: 8px; }
.inv-line__top .select, .inv-line__top .input { height: 42px; }
.inv-line__works { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.inv-line__works:empty { display: none; }
.inv-line__desc { height: 40px; font-size: 14px; }
.chip-check--sm { height: auto; min-height: 30px; padding: 4px 10px; font-size: 13px; }
.chip-check--sm .mono { font-size: 11px; color: var(--muted); }
.chip-check--sm:has(input:checked) .mono { color: #c9cfdc; }
.inv-editor__foot { align-items: center; }
.inv-editor__total { font-size: 16px; }
.inv-editor__actions { display: flex; gap: 10px; }
.inv-editor__delete { margin-top: 14px; text-align: right; }

/* The invoice document (admin preview, client page, PDF) */
.inv-page { background: #e9ecf2; padding: 24px 12px; }
.inv-page__bar { display: flex; justify-content: space-between; align-items: center; max-width: 800px; margin: 0 auto 14px; font-size: 14px; color: var(--muted); }
.inv-doc {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 52px;
  background: #fff;
  color: #111;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 2px 12px rgba(16, 24, 40, .08);
}
.inv-doc-wrap { padding: 0; overflow: hidden; }
.inv-doc-wrap .inv-doc { box-shadow: none; padding: 32px; }
.inv-doc__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.inv-doc__title { font-size: 24px; font-weight: 700; letter-spacing: .5px; }
.inv-doc__dates { text-align: right; }
.inv-doc__parties { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 28px; }
.inv-doc__label { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .5px; color: #444; }
.inv-doc__strong { font-weight: 700; }
.inv-doc__muted { color: #888; font-weight: 400; }
.inv-doc__table { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.inv-doc__table th { padding: 8px; border-bottom: 2px solid #111; font-size: 12px; text-align: left; }
.inv-doc__table td { padding: 8px; border-bottom: 1px solid #ddd; vertical-align: top; }
.inv-doc__table .num { text-align: right; }
.inv-doc__code { font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
.inv-doc__project { color: #555; white-space: nowrap; }
.inv-doc__totals { display: grid; justify-items: end; gap: 4px; margin-bottom: 18px; }
.inv-doc__total { margin-top: 4px; font-size: 16px; font-weight: 700; }
.inv-doc__note { padding: 10px 12px; background: #f6f7f9; white-space: pre-wrap; }
.inv-doc__payment { margin-top: 22px; padding-top: 14px; border-top: 1px solid #ddd; }
.inv-doc__details { margin: 6px 0; font-family: var(--font-mono); font-size: 12px; white-space: pre-wrap; }
.inv-doc__stamp {
  position: absolute;
  top: 40px;
  right: 50%;
  transform: translateX(50%) rotate(-12deg);
  padding: 4px 18px;
  border: 3px solid #16a34a;
  border-radius: 8px;
  color: #16a34a;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 4px;
  opacity: .8;
}
.inv-doc__stamp--cancelled { border-color: #c62a2f; color: #c62a2f; }
.inv-doc__stamp--draft { border-color: #8a93a5; color: #8a93a5; }

@media (max-width: 640px) {
  .inv-line__top { grid-template-columns: 1fr 1fr; }
  .inv-line__top .select:first-child { grid-column: 1 / -1; }
  .inv-doc { padding: 24px 18px; }
  .inv-doc__parties { grid-template-columns: 1fr; }
}
@media print {
  .inv-page { padding: 0; background: #fff; }
  .inv-page__bar { display: none; }
  .inv-doc { box-shadow: none; max-width: none; padding: 0; }
}
.accept-panel { margin-bottom: 20px; border-left: 4px solid var(--primary); }
.checkbox--block.is-invalid { color: #c62a2f; }
.checkbox--block a { color: var(--primary); text-decoration: underline; }
.is-removed { opacity: .55; text-decoration: line-through; }
.is-removed .hint { text-decoration: none; }
.remove-allocation summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.remove-allocation form { margin-top: 6px; }

/* 13. Order history ---------------------------------------------------------- */
.history-actions { display: flex; gap: 8px; }
.report-mode-notice { margin: -8px 0 16px; }
.icon-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.icon-toggle:hover { border-color: #b9c0ce; color: var(--ink); }
.icon-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.icon-toggle .icon { width: 22px; height: 22px; }
.icon-toggle:has(input:checked) { border-color: var(--primary); background: var(--primary); color: #fff; }
.icon-toggle:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.filters--history { grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(120px, 1fr)) repeat(2, minmax(130px, 1fr)) auto auto; }
.stat-tiles--history { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-tile__money { margin-top: 6px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
.stat-tile__sub { margin-top: 6px; font-size: 12px; color: var(--muted); }
.stat-tile--attention .stat-tile__money { color: #b45309; }
.client-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.client-card__name { font-size: 18px; font-weight: 700; }
.client-card__facts { display: grid; grid-template-columns: repeat(3, auto); gap: 2px 24px; margin: 0; }
.client-card__facts dt { grid-row: 1; font-size: 11px; color: var(--subtle); text-transform: uppercase; font-family: var(--font-mono); }
.client-card__facts dd { grid-row: 2; margin: 0; font-weight: 600; }
.chart-card { margin-bottom: 20px; }
.chart-card__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; }
.chart-card__head .panel__title { margin: 0; }
.chart-card__table { margin-top: 8px; font-size: 14px; }
.chart-card__table summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.bar-chart { display: block; width: 100%; height: auto; }
.bar-chart__grid { stroke: var(--line); stroke-width: 1; }
.bar-chart__axis { stroke: var(--line-strong); stroke-width: 1; }
.bar-chart__bar { fill: var(--primary); transition: fill 0.12s; }
.bar-chart__hit { fill: transparent; }
.bar-chart__item { outline: none; cursor: default; }
.bar-chart__item:hover .bar-chart__hit, .bar-chart__item:focus-visible .bar-chart__hit { fill: var(--primary-soft); }
.bar-chart__item:hover .bar-chart__bar, .bar-chart__item:focus-visible .bar-chart__bar { fill: var(--primary-hover); }
.bar-chart__tick, .bar-chart__label { fill: var(--subtle); font-size: 11px; font-family: var(--font-sans); }
.bar-chart__label--year { fill: var(--muted); font-weight: 600; }
.bar-chart__value { fill: var(--ink); font-size: 11px; font-weight: 700; font-family: var(--font-sans); }
.history-invoices { font-size: 13px; line-height: 1.6; white-space: nowrap; }
.history-invoices summary { cursor: pointer; color: var(--muted); }
.badge--sm { padding: 1px 6px; font-size: 11px; }
@media (max-width: 1100px) {
  .filters--history { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-tiles--history { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 14. Limits ------------------------------------------------------------------ */
.limits-seller { margin-bottom: 28px; }
.limits-seller__name { margin: 0 0 12px; font-size: 18px; }
.limits-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 12px; }
.limit-card__title { margin: 0; font-size: 15px; }
.limit-card__period { margin: 2px 0 12px; }
.limit-card__value { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.limit-card__of { margin: 2px 0 12px; color: var(--muted); font-size: 14px; }
.limit-card__table { margin-top: 12px; }
.meter { position: relative; height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter__fill { height: 100%; border-radius: 999px; background: var(--primary); }
.meter__tick { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--surface); }
.meter__scale { position: relative; height: 16px; margin-top: 4px; font-size: 11px; color: var(--subtle); }
.meter__scale span { position: absolute; transform: translateX(-50%); }
.meter__scale span:first-child { left: 0; transform: none; }
.meter__scale .meter__end { right: 0; transform: none; }
.limit-status { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 14px; font-weight: 600; }
.limit-status .icon { width: 16px; height: 16px; flex: none; }
.limit-status--ok { color: #166534; }
.limit-status--warning { color: #b45309; }
.limit-status--critical { color: #b91c1c; }
.limits-months summary { cursor: pointer; font-weight: 600; }
.limits-months .table { margin-top: 10px; }
.limits-note { max-width: 760px; }
.select--sm { height: 34px; padding: 0 30px 0 10px; font-size: 14px; }
@media (max-width: 900px) { .limits-grid { grid-template-columns: 1fr; } }