/* Tietorix AI — site stylesheet (2026 redesign)
   One accent colour, hairline rules, serif display type, no gradients. */

:root {
  --bg: #f5f3ee;
  --surface: #fbfaf7;
  --ink: #17160f;
  --muted: #5e5b52;
  --line: #d8d4c8;
  --accent: #1d5c48;
  --accent-hover: #164a3a;
  --accent-soft: #e2ebe5;
  --on-accent: #ffffff;
  --inverse-bg: #17160f;
  --inverse-ink: #efede6;
  --inverse-muted: #a29f95;
  --inverse-line: #34332c;
  --danger: #a3301f;

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121310;
    --surface: #191a16;
    --ink: #ecebe4;
    --muted: #a19f95;
    --line: #2f302a;
    --accent: #86c4a6;
    --accent-hover: #a3d6bd;
    --accent-soft: #1f2d27;
    --on-accent: #0f1a15;
    --inverse-bg: #1b1c18;
    --inverse-ink: #ecebe4;
    --inverse-muted: #a19f95;
    --inverse-line: #34352e;
    --danger: #e0806f;
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
video { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Type ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.4vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
}
.display em { font-style: italic; color: var(--accent); }

.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 3.8vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.lead {
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 34em;
}

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

.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font: 500 0.95rem/1 var(--font-body);
  padding: 0.95em 1.4em;
  border-radius: 2px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex; align-items: center; gap: 32px;
  height: 72px;
}

.wordmark {
  display: inline-flex; align-items: baseline; gap: 0.35em;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark .ai {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--on-accent);
  background: var(--accent);
  padding: 0.2em 0.4em 0.15em;
  border-radius: 2px;
  transform: translateY(-0.15em);
}

.main-nav { margin-inline-start: auto; }
.main-nav ul { display: flex; gap: 28px; }
.main-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--muted);
  padding-block: 6px;
  border-bottom: 1px solid transparent;
}
.main-nav a:hover, .main-nav a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--ink); }

.lang {
  display: flex; gap: 2px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.lang a {
  text-decoration: none; color: var(--muted);
  padding: 4px 6px; border-radius: 2px;
}
.lang a:hover { color: var(--ink); background: var(--accent-soft); }
.lang a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); }

.header-cta { padding: 0.75em 1.1em; }

.menu-toggle {
  display: none;
  margin-inline-start: auto;
  background: none; border: 1px solid var(--line); border-radius: 2px;
  color: var(--ink);
  font: 500 0.85rem/1 var(--font-body);
  padding: 0.65em 0.9em;
  cursor: pointer;
}

@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .main-nav, .lang { display: none; }
  .site-header.menu-open { border-bottom-color: var(--line); }
  .site-header.menu-open .main-nav,
  .site-header.menu-open .lang { display: flex; }
  .site-header.menu-open .header-inner {
    flex-wrap: wrap; height: auto; padding-block: 14px 20px; row-gap: 16px;
  }
  .site-header.menu-open .main-nav { order: 3; flex-basis: 100%; margin: 0; }
  .site-header.menu-open .main-nav ul { flex-direction: column; gap: 0; width: 100%; }
  .site-header.menu-open .main-nav a {
    display: block; padding: 14px 0; font-size: 1.1rem; color: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  .site-header.menu-open .lang { order: 4; flex-basis: 100%; flex-wrap: wrap; }
}

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

.hero { padding-block: clamp(56px, 9vw, 120px) clamp(56px, 8vw, 96px); }
.hero .eyebrow { margin-bottom: 28px; }
.hero .display { max-width: 15ch; }

.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  margin-top: clamp(36px, 5vw, 56px);
  align-items: end;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.facts { border-top: 1px solid var(--ink); }
.facts div {
  display: grid; grid-template-columns: 9rem 1fr; gap: 16px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.facts dt { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 0.2em; }
.facts dd { margin: 0; }
.facts dl { margin: 0; }

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

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

.section { padding-block: var(--section); border-top: 1px solid var(--line); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(24px, 5vw, 80px);
  margin-bottom: clamp(40px, 6vw, 72px);
  align-items: start;
}
.section-head .eyebrow { margin-bottom: 18px; }
.section-head .lead { padding-top: 0.4em; }

@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; }
}

/* ---------- Services list ---------- */

.services { border-top: 1px solid var(--ink); }
.service {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) minmax(0, 1.25fr) 2rem;
  gap: clamp(16px, 3vw, 40px);
  padding-block: 28px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  align-items: baseline;
  transition: background-color .15s ease;
}
.service:hover { background: var(--surface); }
.service .num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.service h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.service p { color: var(--muted); }
.service .tags { margin-top: 12px; font-size: 0.875rem; color: var(--ink); }
.service .tags span + span::before { content: " · "; color: var(--muted); }
.service .go {
  justify-self: end; color: var(--muted);
  transition: transform .15s ease, color .15s ease;
}
.service:hover .go { transform: translateX(4px); color: var(--accent); }
.service:hover h3 { color: var(--accent); }

@media (max-width: 760px) {
  .service { grid-template-columns: 2.5rem minmax(0, 1fr); row-gap: 10px; padding-inline: 0; }
  .service > div { grid-column: 2; }
  .service .go { display: none; }
}

/* ---------- Industries ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
}
.grid-3 > * {
  padding: 28px clamp(20px, 2.5vw, 32px) 32px;
  border-inline-end: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.grid-3 h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.grid-3 p { color: var(--muted); font-size: 0.975rem; }

@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Process ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  counter-reset: step;
}
.steps li {
  border-top: 2px solid var(--ink);
  padding-top: 18px;
}
.steps li:first-child { border-top-color: var(--accent); }
.steps .eyebrow { display: block; margin-bottom: 14px; }
.steps h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; line-height: 1.3; }
.steps p { color: var(--muted); font-size: 0.95rem; }

@media (max-width: 1000px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; } }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; row-gap: 32px; } }

/* ---------- Team ---------- */

.roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 5vw, 80px);
}
.roles li {
  display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 20px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}
.roles h3 { font-weight: 600; font-size: 1.05rem; }
.roles p { color: var(--muted); }

@media (max-width: 860px) { .roles { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .roles li { grid-template-columns: 1fr; gap: 6px; } }

.group-note {
  margin-top: clamp(40px, 5vw, 64px);
  padding: 24px 28px;
  background: var(--accent-soft);
  display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between;
}
.group-note p { max-width: 46em; }
.group-note a { font-weight: 500; color: var(--accent); text-underline-offset: 3px; }

/* ---------- Contact ---------- */

.contact {
  background: var(--inverse-bg);
  color: var(--inverse-ink);
  padding-block: var(--section);
}
.contact .eyebrow, .contact .lead { color: var(--inverse-muted); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(40px, 7vw, 112px);
}
.contact .h2 { margin-block: 18px 24px; }
.contact-emails { margin-top: 40px; border-top: 1px solid var(--inverse-line); }
.contact-emails div {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-block: 14px; border-bottom: 1px solid var(--inverse-line);
}
.contact-emails span { color: var(--inverse-muted); font-size: 0.95rem; }
.contact-emails a { text-decoration: none; font-family: var(--font-mono); font-size: 0.95rem; }
.contact-emails a:hover { text-decoration: underline; text-underline-offset: 3px; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; color: var(--inverse-muted); }
.field label .opt { opacity: .7; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; font-size: 1rem;
  color: var(--inverse-ink);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--inverse-line);
  border-radius: 0;
  padding: 10px 0;
  transition: border-color .15s ease;
}
.field select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 10px) 52%, calc(100% - 5px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field select option { color: #17160f; background: #fff; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--inverse-ink); }
.form .btn { justify-self: start; margin-top: 8px; }
.contact .btn-primary { background: var(--inverse-ink); color: var(--inverse-bg); }
.contact .btn-primary:hover { background: #ffffff; }

@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 540px) { .form { grid-template-columns: 1fr; } }

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

.site-footer { padding-block: 64px 40px; font-size: 0.95rem; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
}
.footer-grid p { color: var(--muted); max-width: 26em; margin-top: 14px; }
.footer-grid h4 { margin-bottom: 14px; }
.footer-grid li + li { margin-top: 8px; }
.footer-grid a { text-decoration: none; color: var(--muted); }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.85rem;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Toast ---------- */

.toast {
  position: fixed; z-index: 200;
  inset-inline-end: 20px; bottom: 20px;
  max-width: min(420px, calc(100vw - 40px));
  display: flex; gap: 16px; align-items: flex-start;
  padding: 16px 18px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-inline-start: 3px solid var(--accent);
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  font-size: 0.95rem;
}
.toast.error { border-inline-start-color: var(--danger); }
.toast button { margin-inline-start: auto; background: none; border: 0; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* =========================================================
   Products (2026-11)
   ========================================================= */

.btn-sm { padding: 0.7em 1em; font-size: 0.875rem; }

/* Home: product blocks */
.products { border-top: 1px solid var(--ink); }
.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  padding-block: clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.product-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-block: 14px 16px;
}
.product-name span { color: var(--accent); }
.product .lead { font-size: 1.1rem; }
.product .hero-actions { margin-top: 24px; }
.product-points { border-top: 1px solid var(--line); }
.product-points li {
  display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 16px;
  padding-block: 14px; border-bottom: 1px solid var(--line);
}
.product-points b { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; line-height: 1.1; }
.product-points span { color: var(--muted); font-size: 0.95rem; padding-top: 0.3em; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; } }

/* Shared principles */
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.cols-3 > div { border-top: 2px solid var(--ink); padding-top: 18px; }
.cols-3 h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 10px; line-height: 1.3; }
.cols-3 p { color: var(--muted); }
@media (max-width: 860px) { .cols-3 { grid-template-columns: 1fr; } }

/* Compact services list */
.mini-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 5vw, 80px); }
.mini-list a {
  display: flex; justify-content: space-between; gap: 16px;
  padding-block: 16px; border-top: 1px solid var(--line);
  text-decoration: none;
}
.mini-list a:hover { color: var(--accent); }
.mini-list a span:last-child { color: var(--muted); }
@media (max-width: 640px) { .mini-list { grid-template-columns: 1fr; } }

/* Product page hero */
.p-hero { padding-block: clamp(40px, 6vw, 88px) clamp(48px, 6vw, 80px); }
.p-hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px); align-items: center;
}
.p-hero .eyebrow { margin-bottom: 22px; }
.p-hero .display { font-size: clamp(2.4rem, 5vw, 4.1rem); }
.p-hero .lead { margin-top: 24px; }
.p-hero .meta { margin-top: 14px; font-size: 0.9rem; color: var(--muted); }
@media (max-width: 960px) { .p-hero-grid { grid-template-columns: 1fr; } }

/* Interface panel, recreated from the product UI. Always dark. */
.ui {
  --ui-bg: #0f1a22; --ui-panel: #16242f; --ui-line: #2a3b48; --ui-ink: #e6eef3; --ui-muted: #93a6b4;
  --ui-accent: #6fd3b2; --ui-warn: #f0b35a;
  background: var(--ui-bg); color: var(--ui-ink);
  border: 1px solid var(--ui-line); border-radius: 6px;
  font-size: 0.875rem; line-height: 1.5;
  overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.45);
}
.ui-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 14px; border-bottom: 1px solid var(--ui-line);
  font-size: 0.8rem; color: var(--ui-muted);
}
.ui-bar b { color: var(--ui-ink); font-weight: 600; }
.ui-bar .on { color: var(--ui-ink); border-bottom: 2px solid var(--ui-accent); padding-bottom: 2px; }
.ui-bar .status { margin-inline-start: auto; color: var(--ui-accent); font-family: var(--font-mono); font-size: 0.75rem; }
.ui-body { padding: 16px; display: grid; gap: 12px; }
.ui-row {
  display: flex; justify-content: space-between; gap: 12px;
  border: 1px solid var(--ui-line); border-radius: 4px; padding: 8px 12px; font-size: 0.8rem;
}
.ui-row span:first-child { color: var(--ui-muted); }
.ui-row .ok { color: var(--ui-accent); }
.ui-q { background: var(--ui-panel); border-radius: 4px; padding: 10px 12px; }
.ui-q.me { justify-self: end; max-width: 85%; background: #1f3a4d; }
.ui-a { border: 1px solid #2f5a4c; border-radius: 4px; padding: 10px 12px; }
.ui-label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ui-accent); margin-bottom: 6px; display: block; }
.ui-ref { display: inline-block; font-family: var(--font-mono); font-size: 0.68rem; background: var(--ui-accent); color: #0f1a22; border-radius: 2px; padding: 0 4px; margin-inline: 2px; }
.ui-event { border: 1px solid var(--ui-warn); border-radius: 4px; padding: 10px 12px; }
.ui-event-head { display: flex; justify-content: space-between; gap: 8px; color: var(--ui-warn); font-weight: 600; }
.ui-event-head small { color: var(--ui-accent); font-weight: 500; font-size: 0.72rem; }
.ui-event p { color: var(--ui-muted); font-size: 0.8rem; margin-top: 2px; }
.ui-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ui-actions span { border: 1px solid var(--ui-line); border-radius: 99px; padding: 3px 12px; font-size: 0.75rem; color: var(--ui-muted); }
.ui-actions span:first-child { background: var(--ui-accent); color: #0f1a22; border-color: var(--ui-accent); }
.ui-caption { margin-top: 10px; font-size: 0.8rem; color: var(--muted); }

/* Big numbers */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--ink); }
.stats > div { padding: 24px clamp(12px, 2vw, 24px) 26px; }
.stats > div:first-child { padding-inline-start: 0; }
.stats > div + div { border-inline-start: 1px solid var(--line); }
.stats b { display: block; font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3.25rem); line-height: 1; margin-bottom: 10px; }
.stats span { color: var(--muted); font-size: 0.95rem; display: block; }
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* 4-column numbered capability grid */
.grid-4 {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line);
}
.grid-4 > div { padding: 24px clamp(16px, 2vw, 24px) 28px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid-4 .num { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); display: block; margin-bottom: 14px; }
.grid-4 h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; line-height: 1.3; }
.grid-4 p { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .grid-4 { grid-template-columns: 1fr; } }

.steps .ai { color: var(--accent); }
.steps li.is-ai { border-top-color: var(--accent); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; align-items: center; }
.chips span { border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: 0.875rem; }
.chips .eyebrow { border: 0; padding: 0; margin-inline-end: 6px; }

/* Data tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 560px; }
.table th {
  text-align: start; font-family: var(--font-mono); font-weight: 500; font-size: 0.72rem;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  padding: 0 16px 12px 0; border-bottom: 1px solid var(--ink);
}
.table td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--muted); }
.table td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
.table td.target { color: var(--accent); font-weight: 600; white-space: nowrap; }
[dir="rtl"] .table th { padding: 0 0 12px 16px; }
[dir="rtl"] .table td { padding: 14px 0 14px 16px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); }
.split .h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; margin-block: 12px 24px; line-height: 1.15; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* Scenario list */
.scenarios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 5vw, 80px); }
.scenarios li { padding-block: 18px; border-top: 1px solid var(--line); }
.scenarios h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 4px; }
.scenarios p { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 760px) { .scenarios { grid-template-columns: 1fr; } }

.measures { border-top: 1px solid var(--ink); }
.measures li { display: flex; justify-content: space-between; gap: 16px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.measures li span:last-child { font-family: var(--font-mono); font-size: 0.875rem; color: var(--accent); white-space: nowrap; }
.note { margin-top: 14px; font-size: 0.9rem; color: var(--muted); }
.bullets li { padding-block: 10px; border-bottom: 1px solid var(--line); color: var(--muted); }
.bullets li b { color: var(--ink); font-weight: 600; }

/* Privacy band */
.privacy { background: var(--inverse-bg); color: var(--inverse-ink); padding-block: var(--section); }
.privacy .eyebrow { color: var(--inverse-muted); }
.privacy .h2 { margin-block: 16px 40px; max-width: 24ch; }
.privacy-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--inverse-line); }
.privacy-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.privacy-grid > div { padding: 20px 20px 24px 0; }
.privacy-grid > div + div { padding-inline-start: 20px; border-inline-start: 1px solid var(--inverse-line); }
.privacy-grid .eyebrow { display: block; margin-bottom: 10px; }
.privacy-grid .never .eyebrow { color: #f0a493; }
.privacy-grid .never p { font-weight: 600; }
@media (max-width: 960px) {
  .privacy-grid, .privacy-grid.four { grid-template-columns: 1fr 1fr; }
  .privacy-grid > div, .privacy-grid > div + div { padding: 18px 16px 20px 0; border-inline-start: 0; border-bottom: 1px solid var(--inverse-line); }
}
@media (max-width: 480px) { .privacy-grid, .privacy-grid.four { grid-template-columns: 1fr; } }

/* "On request" list */
.plus-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; }
.plus-list li { padding-block: 16px; border-top: 1px solid var(--line); }
.plus-list b { display: block; font-weight: 600; margin-bottom: 4px; }
.plus-list b::before { content: "+ "; color: var(--accent); }
.plus-list span { color: var(--muted); font-size: 0.925rem; }
@media (max-width: 1000px) { .plus-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .plus-list { grid-template-columns: 1fr; } }

.audience { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.audience > div { border-top: 1px solid var(--line); padding-top: 16px; }
.audience h3 { font-size: 1.1rem; font-weight: 600; margin-block: 8px; }
.audience p { color: var(--muted); }
@media (max-width: 860px) { .audience { grid-template-columns: 1fr; } }

.checklist { columns: 2; column-gap: 40px; border-top: 1px solid var(--line); }
.checklist li { padding-block: 9px; border-bottom: 1px solid var(--line); break-inside: avoid; }
@media (max-width: 540px) { .checklist { columns: 1; } }

.fine-print { margin-top: 40px; font-size: 0.85rem; color: var(--muted); max-width: 70em; }
.contact .fine-print { color: var(--inverse-muted); }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* =========================================================
   Language specifics
   ========================================================= */

:lang(ar) {
  --font-display: "IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, sans-serif;
}
:lang(ar) body { line-height: 1.8; }
:lang(ar) .eyebrow, :lang(ar) .table th, :lang(ar) .ui-label, :lang(ar) .lang a,
:lang(ar) .display, :lang(ar) .h2, :lang(ar) .product-name { letter-spacing: 0; }
:lang(ar) .eyebrow, :lang(ar) .table th { font-family: var(--font-body); font-size: 0.85rem; text-transform: none; }
:lang(ar) .display { font-weight: 500; line-height: 1.3; }
:lang(ar) .h2, :lang(ar) .product-name { font-weight: 500; line-height: 1.35; }
.wordmark { direction: ltr; }

[dir="rtl"] .btn:hover .arrow { transform: translateX(-3px); }
[dir="rtl"] .service:hover .go { transform: translateX(-4px); }
[dir="rtl"] .field select { background-position: 10px 52%, 15px 52%; }

ol.steps { padding: 0; margin: 0; list-style: none; }
.steps.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(48px, 7vw, 96px); }
@media (max-width: 760px) { .steps.three { grid-template-columns: 1fr; row-gap: 28px; } }

[dir="rtl"] .ltr { text-align: right; }
:lang(ar) .facts dt { font-family: var(--font-body); letter-spacing: 0; text-transform: none; font-size: 0.85rem; }
:lang(ar) .display em { font-style: normal; }

/* =========================================================
   Service pages and careers (content migrated from the old site)
   ========================================================= */

.legacy p { color: var(--muted); }
.legacy p + p { margin-top: 1em; }
.legacy .split > div > p { font-size: 1.05rem; line-height: 1.7; }
.legacy .split .h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; line-height: 1.2; margin-bottom: 20px; }
.legacy .split + .split, .legacy .cards + .split, .legacy .split + .cards, .legacy .cards + .cards { margin-top: clamp(40px, 5vw, 64px); }
.legacy > .wrap > h3, .legacy .wrap > h3:not(.h3) { font-size: 1.15rem; font-weight: 600; margin-block: 40px 16px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  border-top: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
}
.card {
  padding: 24px clamp(18px, 2vw, 26px) 28px;
  border-inline-end: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.card h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
.card h4 {
  font-family: var(--font-mono); font-weight: 500; font-size: 0.72rem;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 8px;
}
.card p { font-size: 0.95rem; color: var(--muted); }
.card ul { display: grid; gap: 6px; }
.card li { font-size: 0.925rem; color: var(--muted); padding-inline-start: 14px; position: relative; }
.card li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.7em; width: 6px; height: 1px; background: var(--muted); }
.card-head { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.card-head p { font-size: 0.9rem; }
.card-body { display: flex; flex-direction: column; gap: 8px; }
.card-meta { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent); }
.card-num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.card .chips, .card.chips { margin-top: 4px; }
.chips span.tech-tag, .chips span.model-tag { font-size: 0.8rem; padding: 3px 10px; }

.timeline { counter-reset: tl; border-top: 1px solid var(--ink); }
.timeline-item { counter-increment: tl; padding-block: 18px; border-bottom: 1px solid var(--line); }
.timeline-item h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.timeline-item h3::before { content: counter(tl, decimal-leading-zero) "  "; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 400; color: var(--accent); }
.timeline-item p { font-size: 0.95rem; }

.bullets li > div { display: inline; }

:lang(ar) .card h4 { font-family: var(--font-body); letter-spacing: 0; text-transform: none; font-size: 0.85rem; }

/* Careers */
.jobs { border-top: 1px solid var(--ink); }
.job { border-bottom: 1px solid var(--line); }
.job summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 24px; align-items: baseline;
  padding-block: 18px;
}
.job summary::-webkit-details-marker { display: none; }
.job summary h3 { font-size: 1.1rem; font-weight: 600; }
.job summary .where { color: var(--muted); font-size: 0.925rem; }
.job summary .type { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent); min-width: 6.5em; text-align: end; }
.job summary:hover h3 { color: var(--accent); }
.job[open] summary h3 { color: var(--accent); }
.job-body { padding: 0 0 24px; display: grid; gap: 14px; max-width: 52em; }
.job-body p { color: var(--muted); }
.job-body .chips { margin-top: 0; }
.job-body .btn { justify-self: start; }
@media (max-width: 640px) {
  .job summary { grid-template-columns: 1fr auto; }
  .job summary .where { grid-column: 1 / -1; grid-row: 2; }
}

.job-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.job-filter button {
  font: inherit; font-size: 0.875rem; cursor: pointer;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 99px; padding: 5px 14px;
}
.job-filter button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

dialog.apply {
  border: 0; padding: 0; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  background: var(--inverse-bg); color: var(--inverse-ink);
}
dialog.apply::backdrop { background: rgba(10, 10, 8, .55); }
dialog.apply .apply-inner { padding: clamp(24px, 4vw, 40px); }
dialog.apply .eyebrow { color: var(--inverse-muted); }
dialog.apply h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; margin-block: 8px 24px; }
dialog.apply .close {
  position: absolute; inset-inline-end: 16px; top: 12px;
  background: none; border: 0; color: var(--inverse-muted); font-size: 1.6rem; cursor: pointer;
}
dialog.apply .btn-primary { background: var(--inverse-ink); color: var(--inverse-bg); }
dialog.apply .check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.875rem; color: var(--inverse-muted); }
dialog.apply .check input { margin-top: 4px; }

/* =========================================================
   Product imagery (2026-11)
   ========================================================= */

.p-hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
}
.p-hero-top .lead { margin-top: 0; }
@media (max-width: 960px) { .p-hero-top { grid-template-columns: 1fr; } }

.shot { margin: 0; }
.shot img {
  display: block; width: 100%; height: auto;
  border-radius: 10px;
  background: #0d1b2a;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 30px 80px -40px rgba(10, 20, 30, .55), 0 8px 24px -12px rgba(10, 20, 30, .25);
}
.shot a { display: block; border-radius: 10px; }
.shot a:hover img { box-shadow: 0 0 0 2px var(--accent), 0 30px 80px -40px rgba(10, 20, 30, .55); }
.shot figcaption { margin-top: 12px; font-size: 0.875rem; color: var(--muted); max-width: 60em; }
.shot figcaption b { color: var(--ink); font-weight: 600; }

.hero-shot { margin-top: clamp(40px, 6vw, 72px); }
.hero-shot img { border-radius: 14px; }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px);
}
.gallery .wide { grid-column: 1 / -1; }
.gallery img { border: 1px solid var(--line); background: #fff; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } }

/* =========================================================
   Localised interface panels in the product galleries
   ========================================================= */

.shot.panel > div { border-radius: 10px; }
.shot.panel .ui { height: 100%; font-size: 0.8125rem; border-radius: 10px; box-shadow: 0 30px 80px -40px rgba(10, 20, 30, .55), 0 8px 24px -12px rgba(10, 20, 30, .25); }
.shot img.plain { border: 1px solid var(--line); }
.shot.panel img { box-shadow: none; border: 0; border-radius: 0; background: #000; }

.ui-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ui-split.narrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.ui-split > .ui-body { border-inline-start: 1px solid var(--ui-line); align-content: start; }
@media (max-width: 560px) { .ui-split, .ui-split.narrow { grid-template-columns: 1fr; } .ui-split > .ui-body { border-inline-start: 0; border-top: 1px solid var(--ui-line); } }

.ui-img { position: relative; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ui-img img { width: 100%; height: 100%; object-fit: contain; }
.ui-img.video img { object-fit: cover; }
.ui-ov {
  position: absolute; inset-inline-start: 10px; top: 10px;
  font-family: var(--font-mono); font-size: 0.68rem; color: #cfe3ee;
  background: rgba(8, 16, 22, .7); padding: 3px 7px; border-radius: 3px;
}
.ui-box { position: absolute; border: 2px solid var(--ui-warn); border-radius: 2px; }
.ui-box em {
  position: absolute; top: -2px; inset-inline-start: -2px; transform: translateY(-100%);
  font: 600 0.62rem/1 var(--font-mono); font-style: normal; letter-spacing: .04em;
  background: var(--ui-warn); color: #1a1205; padding: 3px 5px;
}

.ui-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.ui-table th { text-align: start; font-weight: 500; color: var(--ui-muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: .05em; padding: 6px 0; border-bottom: 1px solid var(--ui-line); }
.ui-table td { padding: 7px 0; border-bottom: 1px solid var(--ui-line); }
.ui-table td:last-child, .ui-table th:last-child { text-align: end; font-family: var(--font-mono); }
.ui-table i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-inline-end: 7px; vertical-align: -1px; }
.sw-g { background: #4caf50; } .sw-y { background: #f2d03b; } .sw-r { background: #c0392b; }

.ui-kv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--ui-line); font-size: 0.78rem; }
.ui-kv span:first-child { color: var(--ui-muted); }
.ui-kv span:last-child { text-align: end; }
.ui-kv.hl span:last-child { color: var(--ui-accent); font-weight: 600; }
.ui-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ui-trio div { border: 1px solid var(--ui-line); border-radius: 4px; padding: 5px 8px; font-weight: 600; }
.ui-trio small { display: block; font-weight: 400; color: var(--ui-muted); font-size: 0.66rem; }

.ui-barrow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 2.6em; gap: 10px; align-items: center; font-size: 0.78rem; }
.ui-barrow i { height: 6px; border-radius: 3px; background: linear-gradient(to right, #3d8fd6 calc(var(--v) * 100%), #23384a 0); }
.ui-barrow.hot i { background: linear-gradient(to right, #d9534f calc(var(--v) * 100%), #23384a 0); }
.ui-barrow b { font-family: var(--font-mono); font-weight: 500; text-align: end; }
.ui-note { font-size: 0.72rem; color: var(--ui-muted); }

.ui .dim { color: var(--ui-muted); }
.ui small.sev { background: #5a1f1a; color: #ffb3a8; padding: 1px 6px; border-radius: 99px; font-size: 0.68rem; }
.ui small.sev.crit { background: #b23a2c; color: #fff; }
.ui-event-head small { font-size: 0.68rem; color: var(--ui-warn); }

.ui-search { display: flex; justify-content: space-between; gap: 10px; border: 1px solid var(--ui-line); border-radius: 4px; padding: 7px 10px; }
.ui-search b { color: var(--ui-accent); font-weight: 600; }
.ui-res { display: grid; grid-template-columns: 38% 1fr; gap: 10px; align-items: start; }
.ui-res img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; }
.ui-res p { font-size: 0.76rem; margin-top: 2px; }

.ui-paper { --ui-bg: #fbfaf7; --ui-panel: #f0eee8; --ui-line: #dcd8cd; --ui-ink: #17160f; --ui-muted: #6a675e; --ui-accent: #1d5c48; }
.ui-paper .ui-bar { background: #fff; }
.ui-h { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; color: var(--ui-ink); }
.ui-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ui-metrics div { border: 1px solid var(--ui-line); border-radius: 4px; padding: 7px 9px; background: #fff; }
.ui-metrics b { display: block; font-size: 1.15rem; }
.ui-metrics small { color: var(--ui-muted); font-size: 0.7rem; }
.ui-list { display: grid; gap: 7px; }
.ui-list li { font-size: 0.78rem; line-height: 1.45; }
.ui-paper small.sev { background: #f6dcd6; color: #8b2a1d; }
.ui-paper small.sev.crit { background: #b23a2c; color: #fff; }
.ui-split > .ui-body { gap: 8px; }
.gallery .wide .ui-split { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
.gallery .wide .ui-img { max-height: 560px; }
.gallery .wide .ui-img.video { max-height: none; }
.gallery .shot.panel:not(.wide) .ui-img { max-height: 420px; }
.ui-table.q th, .ui-table.q td { text-align: end; font-family: var(--font-mono); font-size: 0.74rem; }
.ui-table.q th:first-child, .ui-table.q td:first-child { text-align: start; font-family: var(--font-body); }
.ui-table.q td.bad { color: #ff8a7a; }
.ui-table.q tr.tgt td { color: var(--ui-accent); border-bottom: 0; }

/* Video and brochure links */
.video-shot video {
  display: block; width: 100%; height: auto; aspect-ratio: 1260 / 720;
  border-radius: 12px; background: #0b1622;
  box-shadow: 0 30px 80px -40px rgba(10, 20, 30, .55), 0 8px 24px -12px rgba(10, 20, 30, .25);
}
.product .meta { margin-top: 14px; font-size: 0.9rem; color: var(--muted); }
.product .meta a, .p-hero .meta a { color: var(--accent); text-underline-offset: 3px; }

/* =========================================================
   Tietorix Group theme (tietorix.com)
   Same family as tietorixai.com; cooler paper, navy accent,
   outlined group mark and a colour per company.
   ========================================================= */
:root {
  --bg: #f3f3ef;
  --surface: #fafaf7;
  --line: #d5d6cf;
  --accent: #1f3c6e;
  --accent-hover: #162e56;
  --accent-soft: #e2e8f2;
  --inverse-bg: #131a26;
  --inverse-line: #2b3446;
  --inverse-muted: #9aa5b8;
  --c-ai: #1d5c48;
  --c-cloud: #2b62ad;
  --c-digital: #a36d12;
  --c-enterprise: #6b3a62;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101318;
    --surface: #171b22;
    --line: #2a2f38;
    --accent: #9fb9e8;
    --accent-hover: #bdd0f2;
    --accent-soft: #1b2434;
    --on-accent: #0c1424;
    --inverse-bg: #171c26;
    --c-ai: #7cc4a4;
    --c-cloud: #8fb4ec;
    --c-digital: #e0b25c;
    --c-enterprise: #cf9dc3;
  }
}

.wordmark .grp {
  font-family: var(--font-mono);
  font-size: 0.62rem; font-weight: 500; letter-spacing: 0.16em;
  color: var(--accent);
  border: 1px solid currentColor; border-radius: 2px;
  padding: 0.25em 0.45em 0.2em;
  transform: translateY(-0.2em);
}
.main-nav a .ext { font-size: 0.8em; opacity: .6; }

/* Company index */
.co-dot { display: inline-block; width: 10px; height: 10px; border-radius: 1px; background: var(--c, var(--accent)); margin-inline-end: 8px; vertical-align: 1px; }
.co-ai { --c: var(--c-ai); } .co-cloud { --c: var(--c-cloud); } .co-digital { --c: var(--c-digital); } .co-enterprise { --c: var(--c-enterprise); }

.companies { border-top: 1px solid var(--ink); }
.company {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) minmax(0, 1.35fr) 2rem;
  gap: clamp(16px, 3vw, 40px);
  padding-block: clamp(26px, 3.5vw, 40px);
  border-bottom: 1px solid var(--line);
  text-decoration: none; align-items: baseline;
  position: relative;
  transition: background-color .15s ease;
}
.company::before {
  content: ""; position: absolute; inset-inline-start: 0; top: -1px; height: 2px; width: 0;
  background: var(--c); transition: width .25s ease;
}
.company:hover { background: var(--surface); }
.company:hover::before { width: 100%; }
.company .num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.company h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 2.8vw, 2.25rem); line-height: 1.1; letter-spacing: -0.01em; }
.company .focus { display: block; margin-top: 8px; font-size: 0.9rem; color: var(--muted); }
.company p { color: var(--muted); }
.company .tags { margin-top: 12px; font-size: 0.875rem; color: var(--ink); }
.company .tags span + span::before { content: " · "; color: var(--muted); }
.company .go { justify-self: end; color: var(--muted); font-size: 1.1rem; transition: transform .15s ease, color .15s ease; }
.company:hover .go { color: var(--c); transform: translateX(4px); }
@media (max-width: 760px) {
  .company { grid-template-columns: 2.5rem minmax(0, 1fr); row-gap: 12px; }
  .company > div:not(:first-of-type) { grid-column: 2; }
  .company .go { display: none; }
}

/* Products from the companies */
.featured { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px); }
.featured article .eyebrow { margin-top: 20px; }
.featured h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.75rem; margin-block: 8px 10px; }
.featured p { color: var(--muted); }
.featured .more { display: inline-block; margin-top: 14px; color: var(--accent); font-weight: 500; text-underline-offset: 3px; }
@media (max-width: 860px) { .featured { grid-template-columns: 1fr; } }

/* Company page hero rule */
.co-hero { border-top: 4px solid var(--c); }
.offices > div h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; margin-bottom: 4px; }
.steps.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .steps.four { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; } }
@media (max-width: 640px) { .steps.four { grid-template-columns: 1fr; row-gap: 28px; } }
.tech-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.tech-list b::before { content: ""; }

/* =========================================================
   Balanced grids: the column count follows the number of items,
   so every row is full and cells line up vertically.
   ========================================================= */
@media (min-width: 1001px) {
  :is(.cards, .grid-3, .grid-4, .cols-3, .plus-list, .privacy-grid, .steps):has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(.cards, .grid-3, .grid-4, .cols-3, .plus-list, .privacy-grid, .steps):is(:has(> :nth-child(3):last-child), :has(> :nth-child(6):last-child), :has(> :nth-child(9):last-child)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  :is(.cards, .grid-3, .grid-4, .cols-3, .plus-list, .privacy-grid, .steps):is(:has(> :nth-child(4):last-child), :has(> :nth-child(8):last-child), :has(> :nth-child(12):last-child)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  :is(.cards, .grid-3, .grid-4, .cols-3, .plus-list, .privacy-grid, .steps):is(:has(> :nth-child(5):last-child), :has(> :nth-child(10):last-child)) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 641px) and (max-width: 1000px) {
  :is(.cards, .grid-3, .grid-4, .cols-3, .plus-list, .privacy-grid, .steps):is(:has(> :nth-child(2):last-child), :has(> :nth-child(4):last-child), :has(> :nth-child(6):last-child), :has(> :nth-child(8):last-child), :has(> :nth-child(10):last-child), :has(> :nth-child(12):last-child)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(.cards, .grid-3, .grid-4, .cols-3, .plus-list, .privacy-grid, .steps):is(:has(> :nth-child(3):last-child), :has(> :nth-child(9):last-child)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  :is(.cards, .grid-3, .grid-4, .cols-3, .plus-list, .privacy-grid, .steps):is(:has(> :nth-child(5):last-child), :has(> :nth-child(7):last-child)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(.cards, .grid-3, .grid-4, .cols-3, .plus-list, .privacy-grid, .steps):is(:has(> :nth-child(5):last-child), :has(> :nth-child(7):last-child)) > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  :is(.cards, .grid-3, .grid-4, .cols-3, .plus-list, .privacy-grid, .steps) { grid-template-columns: 1fr; }
  :is(.cards, .grid-3, .grid-4, .cols-3, .plus-list, .privacy-grid, .steps) > :last-child { grid-column: auto; }
}

/* Company list with colour keys: square and label never separate */
.co-list { display: grid; grid-template-columns: repeat(2, max-content); gap: 8px 28px; }
.co-item { display: inline-flex; align-items: center; white-space: nowrap; }
.co-item .co-dot { margin-inline-end: 8px; vertical-align: 0; }

/* Choice pills (replace the native dropdown, whose highlight colour is set by the OS) */
.choice { border: 0; padding: 0; margin: 0; min-width: 0; }
.choice legend { font-size: 0.85rem; color: var(--inverse-muted); padding: 0; margin-bottom: 12px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pill > span {
  display: inline-flex; align-items: center;
  border: 1px solid var(--inverse-line); border-radius: 99px;
  padding: 7px 15px; font-size: 0.9rem; line-height: 1.3;
  color: var(--inverse-ink);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.pill:hover > span { border-color: var(--inverse-muted); }
.pill input:checked + span { background: var(--inverse-ink); color: var(--inverse-bg); border-color: var(--inverse-ink); }
.pill input:focus-visible + span { outline: 2px solid var(--inverse-ink); outline-offset: 2px; }
.pill .co-dot { margin-inline-end: 8px; }
