
  :root {
    --gold: #CCA349;
    --ink: #1f2733;
    --text: #3a3f47;
    --muted: #6D6E71;
    --blue: #334151;
    --page: #fbfaf8;
    --band: #f3f1ed;
    --line: #e5e1d8;
    --deep: #1f2733;

    --head: "Avenir Next", "Avenir", "Helvetica Neue", Arial, sans-serif;
    --body: "Athelas", "Iowan Old Style", Georgia, serif;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { margin: 0; background: var(--page); color: var(--text); font-family: var(--head); font-size: 16px; line-height: 1.65; }
  a { color: inherit; }
  .wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px; }


  header { position: sticky; top: 0; z-index: 10; background: rgba(251,250,248,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
  .nav { display: flex; align-items: center; height: 74px; gap: 32px; }
  .nav .logo img { height: 28px; width: auto; display: block; }
  .nav ul { display: flex; gap: 30px; list-style: none; margin: 0 0 0 auto; padding: 0; font-size: 13.5px; color: var(--ink); }
  .nav ul a { text-decoration: none; display: block; padding: 26px 0 24px; border-bottom: 2px solid transparent; }
  .nav ul a:hover, .nav ul a:focus-visible { border-bottom-color: var(--gold); outline: none; }

  .eyebrow { display: flex; align-items: center; gap: 12px; font-size: 11.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 0 0 22px; }
  .eyebrow .n { letter-spacing: .08em; }
  .eyebrow::after { content: ""; width: 44px; height: 1px; background: var(--gold); }

  h1, h2 { font-family: var(--head); font-weight: 300; color: var(--ink); margin: 0; line-height: 1.12; letter-spacing: -.005em; }
  h1 { font-size: clamp(38px, 4.6vw, 58px); }
  h2 { font-size: clamp(30px, 3.3vw, 42px); }
  h1 em, h2 em { font-style: normal; color: var(--gold); }
  h3 { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin: 0; line-height: 1.35; }
  p { margin: 16px 0 0; }
  .lead { font-size: 18px; color: var(--ink); font-weight: 500; }
  .body { font-family: var(--body); font-size: 17.5px; line-height: 1.6; }

  .btn { display: inline-flex; align-items: center; gap: 12px; font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; padding: 13px 22px; background: var(--gold); color: #fff; border: 1px solid var(--gold); }
  .btn:hover, .btn:focus-visible { background: #b8913d; border-color: #b8913d; outline: none; }
  .btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
  .btn.ghost:hover, .btn.ghost:focus-visible { background: var(--ink); color: #fff; }
  .btn .arrow { font-size: 15px; font-weight: 400; letter-spacing: 0; }
  .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

  section { padding: 96px 0; }
  .band { background: var(--band); }

  .ph { position: relative; background: linear-gradient(160deg, #dfe4ea 0%, #e9e4da 55%, #efe7d6 100%); color: var(--muted); font-size: 12.5px; letter-spacing: .04em; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
  .ph span { background: rgba(255,255,255,.7); padding: 6px 10px; }
  .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .ph .cap { position: absolute; right: 10px; bottom: 8px; background: rgba(255,255,255,.75); color: var(--muted); font-size: 10.5px; letter-spacing: .06em; padding: 2px 7px; }
  .scale .ph { aspect-ratio: 4 / 3; margin-bottom: 18px; }
  .fade-left { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28%); mask-image: linear-gradient(to right, transparent 0, #000 28%); }

  .feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: stretch; }
  .feature .text { padding: 88px 40px 88px max(40px, calc((100vw - 1200px) / 2 + 40px)); }
  .feature .ph { min-height: 460px; }
  .hero .text { padding-top: 96px; padding-bottom: 96px; }
  .hero .ph { min-height: 560px; }

  .split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: start; }

  .cols { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 56px; }
  .cols.four { grid-template-columns: repeat(4, 1fr); }
  .col { padding: 6px 32px 34px; border-left: 1px solid var(--line); }
  .col:nth-child(3n+1) { border-left: 0; padding-left: 0; }
  .cols.four .col { border-left: 1px solid var(--line); padding-left: 32px; }
  .cols.four .col:first-child { border-left: 0; padding-left: 0; }
  .col svg { width: 34px; height: 34px; stroke: var(--gold); fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 20px; }
  .col p { font-size: 14.5px; line-height: 1.6; margin-top: 12px; color: var(--text); }
  .cols .col:nth-child(n+4) { padding-top: 34px; }
  .cols.four .col:nth-child(n+4) { padding-top: 6px; }
  .row-rule { grid-column: 1 / -1; height: 1px; background: var(--line); }

  .flow { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 56px; border-top: 1px solid var(--line); }
  .flow div { padding: 24px 24px 0 0; font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); position: relative; }
  .flow div::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
  .flow span { display: block; font-size: 26px; font-weight: 300; color: var(--gold); letter-spacing: 0; margin-bottom: 6px; }

  .thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; margin-top: 56px; }
  .thumb .ph { aspect-ratio: 16 / 10; margin-bottom: 20px; }
  .thumb p { font-size: 14.5px; line-height: 1.6; margin-top: 10px; }

  .scale { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 56px; position: relative; }
  .scale > div { padding: 0 32px 0 0; }
  .scale .dot { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
  .scale .dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--gold); }
  .scale .dot::after { content: ""; flex: 1; height: 1px; background: var(--gold); opacity: .5; }
  .scale p { font-size: 14.5px; margin-top: 10px; }
  .tagline { font-size: 18px; font-weight: 500; color: var(--ink); margin-top: 44px; }

  .list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
  .list li { display: flex; align-items: center; gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
  .list svg { width: 28px; height: 28px; stroke: var(--gold); fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }

  .closing { background: var(--band); padding: 72px 0; }
  .closing .grid { display: grid; grid-template-columns: 1.2fr auto .8fr; gap: 48px; align-items: center; }
  .closing .vr { width: 1px; align-self: stretch; background: var(--gold); opacity: .6; }
  .closing .actions { flex-direction: column; align-items: stretch; margin-top: 0; }
  .closing .actions .btn { justify-content: space-between; }

  footer { background: var(--deep); color: #c9ccd2; font-size: 13px; }
  footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 40px; padding-bottom: 40px; }
  footer img { height: 24px; width: auto; display: block; }
  footer ul { display: flex; flex-wrap: wrap; gap: 24px; list-style: none; margin: 0; padding: 0; }
  footer a { text-decoration: none; }
  footer a:hover, footer a:focus-visible { color: var(--gold); outline: none; }


  @media (max-width: 1000px) {
    .nav ul { gap: 18px; font-size: 12.5px; }
    .feature, .split, .closing .grid { grid-template-columns: 1fr; }
    .feature .text { padding: 64px 40px; }
    .feature .ph, .hero .ph { min-height: 280px; }
    .fade-left { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%); mask-image: linear-gradient(to bottom, transparent 0, #000 22%); }
    .closing .vr { display: none; }
    .thumbs { grid-template-columns: repeat(2, 1fr); }
    .cols.four { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
    .cols.four .col:nth-child(3) { border-left: 0; padding-left: 0; }
  }
  @media (max-width: 760px) {
    .wrap { padding: 0 16px; }
    section { padding: 64px 0; }
    .feature .text { padding: 56px 16px 40px; }
    .nav { height: 62px; }
    .nav .logo img { height: 22px; }
    .nav ul { display: none; position: absolute; top: 62px; left: 0; right: 0; margin: 0; background: var(--page); flex-direction: column; gap: 0; border-bottom: 1px solid var(--line); }
    .nav ul.open { display: flex; }
    .nav ul a { padding: 14px 16px; border-bottom: 1px solid var(--line); }
    .cols, .cols.four, .thumbs, .scale, .flow { grid-template-columns: 1fr; }
    .col, .cols.four .col { border-left: 0; padding: 24px 0; border-top: 1px solid var(--line); }
    .col:first-child, .cols.four .col:first-child { border-top: 0; padding-top: 0; }
    .row-rule { display: none; }
    .thumb .ph { display: none; }
    .scale { row-gap: 28px; }
    .flow { row-gap: 22px; }
    .btn { width: 100%; justify-content: space-between; }
  }

.nav ul a.active { border-bottom-color: var(--gold); }
.dlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.dlist li { display: grid; grid-template-columns: 34px 1fr; gap: 0 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.dlist svg { width: 30px; height: 30px; stroke: var(--gold); fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; grid-row: span 2; }
.dlist p { font-size: 14.5px; line-height: 1.6; margin: 6px 0 0; }
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 56px; }
.product { background: var(--page); padding: 32px 30px 34px; }
.product .mark { height: 40px; display: flex; align-items: center; margin-bottom: 22px; }
.product .mark img { max-height: 34px; width: auto; }
.product .mark .word { font-size: 20px; font-weight: 500; color: var(--ink); letter-spacing: .02em; }
.product p { font-size: 14.5px; line-height: 1.6; margin-top: 12px; }
.feature.reverse .text { order: 2; padding-left: 56px; padding-right: max(40px, calc((100vw - 1200px) / 2 + 40px)); }
.fade-right { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 28%); mask-image: linear-gradient(to left, transparent 0, #000 28%); }
@media (max-width: 1000px) {
  .products { grid-template-columns: 1fr; }
  .feature.reverse .text { order: 0; padding: 64px 40px; }
  .fade-right { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%); mask-image: linear-gradient(to bottom, transparent 0, #000 22%); }
}
@media (max-width: 760px) {
  .feature.reverse .text { padding: 56px 16px 40px; }
}

p { text-wrap: pretty; }
h1, h2 { text-wrap: balance; }
h3 { text-wrap: balance; }
.body, .lead { max-width: 640px; }
.col p, .thumb p, .scale p, .product p, .dlist p { font-family: var(--head); font-size: 14.5px; line-height: 1.6; max-width: 36ch; }
.scale, .thumbs, .cols, .products { align-items: start; }
.scale h3, .thumb h3, .col h3, .product h3 { min-height: 2.7em; display: flex; align-items: flex-end; }
@media (max-width: 760px) {
  .scale h3, .thumb h3, .col h3, .product h3 { min-height: 0; display: block; }
  .col p, .thumb p, .scale p, .product p, .dlist p { max-width: none; }
}

.split:has(> .split-text) { align-items: center; }
.split-text { padding-top: 0; }
.split-text .body:first-child { margin-top: 0; }
@media (max-width: 1000px) { .split-text { padding-top: 0; } }

.feature.hero { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.hero h1 { font-size: clamp(34px, 3.6vw, 52px); }
.hero .body, .hero .lead { max-width: 700px; }
h1.two-line .l1 { display: block; color: var(--blue); }
h1.two-line .l2 { display: block; color: var(--gold); }
@media (min-width: 1001px) { h1.two-line .l1, h1.two-line .l2 { white-space: nowrap; } }
@media (max-width: 1000px) { .feature.hero { grid-template-columns: 1fr; } }

.eyebrow { white-space: nowrap; }
.eyebrow::after { flex: none; }
@media (max-width: 760px) { .eyebrow { white-space: normal; } }

.split:has(> .dlist), .split:has(> .list) { align-items: center; }

.feature { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.feature.reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.feature h2 { font-size: clamp(28px, 2.9vw, 38px); }
.feature .body { max-width: 700px; }
@media (max-width: 1000px) { .feature, .feature.reverse { grid-template-columns: 1fr; } }

.cols { row-gap: 0; }
.cols .col, .cols.four .col { display: grid; grid-template-rows: subgrid; grid-row: span 3; align-content: start;
  padding: 34px 32px; border-left: 1px solid var(--line); border-top: 0; }
.cols .col svg { margin-bottom: 0; align-self: start; }
.cols .col h3 { min-height: 0; display: block; margin-top: 20px; align-self: end; }
.cols .col p { margin-top: 12px; }
.cols:not(.four) .col:nth-child(3n+1) { border-left: 0; padding-left: 0; }
.cols:not(.four) .col:nth-child(n+4) { border-top: 1px solid var(--line); }
.cols.four .col:nth-child(4n+1) { border-left: 0; padding-left: 0; }
@media (max-width: 1000px) {
  .cols.four .col:nth-child(odd) { border-left: 0; padding-left: 0; }
  .cols.four .col:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .cols .col, .cols.four .col { display: block; padding: 24px 0; border-left: 0; border-top: 1px solid var(--line); }
  .cols .col:first-child, .cols.four .col:first-child { border-top: 0; padding-top: 0; }
  .cols .col svg { margin-bottom: 16px; }
}

.thumbs { row-gap: 56px; }
.thumb { display: grid; grid-template-rows: subgrid; grid-row: span 3; align-content: start; }
.thumb .ph { margin-bottom: 0; }
.thumb h3 { min-height: 0; display: block; margin-top: 22px; }
.thumb p { margin-top: 10px; }
@media (max-width: 760px) { .thumb { display: block; } .thumb h3 { margin-top: 0; } }

.col p, .thumb p, .scale p, .product p { max-width: none; }
.scale { column-gap: 40px; }
.scale > div { padding: 0; display: grid; grid-template-rows: subgrid; grid-row: span 4; align-content: start; }
.scale .ph { margin-bottom: 18px; }
.scale .dot { margin-bottom: 0; }
.scale h3 { min-height: 0; display: block; margin-top: 22px; }
.scale p { margin-top: 10px; }
@media (max-width: 760px) { .scale > div { display: block; } .scale .dot { margin-bottom: 18px; } .scale h3 { margin-top: 0; } }

.wrap > h2 + .body { max-width: none; }

.thumb { grid-row: span 4; row-gap: 0; }
.scale > div, .cols .col { row-gap: 0; }
.thumb .dot { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.thumb .dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--gold); flex: none; }
.thumb .dot::after { content: ""; flex: 1; height: 1px; background: var(--gold); opacity: .5; }
.thumb h3 { margin-top: 20px; }
@media (max-width: 760px) { .thumb .dot { display: none; } }

.cols .col h3 { align-self: start; }
.split { grid-template-columns: 1fr 1fr; gap: 64px; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.split h2 { font-size: clamp(28px, 2.7vw, 36px); }

.dlist p { max-width: none; }

.products { align-items: stretch; }

.col p, .thumb p, .scale p, .product p, .dlist p, .split-text .body, .feature .body, .lead { text-wrap: balance; }
.cols .col h3, .thumb h3, .scale h3 { margin-top: 20px; }
.col p, .thumb p, .scale p, .product p, .dlist p, .cols .col p { margin-top: 12px; }
.product .mark { margin-bottom: 20px; }
.feature .text { padding-top: 96px; padding-bottom: 96px; }
.hero .text { padding-top: 96px; padding-bottom: 96px; }
@media (max-width: 1000px) { .feature .text { padding-top: 64px; padding-bottom: 64px; } }
.split .body, .wrap > .body { text-wrap: balance; }

.cols .col:nth-child(n), .cols.four .col:nth-child(n) { padding-top: 34px; padding-bottom: 34px; }
.cols .col h3 { align-self: end; }
@media (max-width: 760px) { .cols .col:nth-child(n), .cols.four .col:nth-child(n) { padding-top: 24px; padding-bottom: 24px; } .cols .col:first-child { padding-top: 0; } }

.body, .lead, .col p, .thumb p, .scale p, .product p, .dlist p,
.split .body, .split-text .body, .feature .body, .wrap > .body { text-wrap: pretty; }
.split-text .body { max-width: none; }

.menu-btn { flex: none; width: 34px; height: 34px; display: inline-flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 7px; background: none; border: 0; padding: 0 2px; cursor: pointer; }
.menu-btn span { display: block; width: 24px; height: 1.5px; background: var(--ink); }
.menu-btn span + span { width: 16px; }
.menu-btn:hover span + span, .menu-btn[aria-expanded="true"] span + span { width: 24px; }
.panel-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(15, 20, 28, .38); }
.nav-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(420px, 100vw); box-sizing: border-box; background: var(--deep); color: #fff; padding: 28px 40px 40px; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .28s ease; overflow-y: auto; }
.nav-panel.open { transform: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 36px; }
.panel-head span { font-family: var(--head); font-size: 11.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.panel-close { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: none; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.nav-panel ul { list-style: none; margin: 0; padding: 0; }
.nav-panel li a { display: block; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.12); font-family: var(--head); font-weight: 300; font-size: 22px; color: #fff; text-decoration: none; }
.nav-panel li a:hover, .nav-panel li a.current { color: var(--gold); }
.panel-contact { margin-top: auto; display: block; text-align: center; background: var(--gold); color: var(--ink); text-decoration: none; font-family: var(--head); font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; padding: 16px; }
@media (max-width: 760px) {
  .nav ul, .nav ul.open { display: none; }
  .menu-btn { margin-left: auto; }
  .nav-panel { padding: 22px 24px 28px; }
}

.theme-switch { flex: none; position: relative; width: 56px; height: 28px; border-radius: 14px; border: 1px solid var(--line); background: var(--band); padding: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: space-between; }
.theme-switch svg { width: 14px; height: 14px; margin: 0 6px; position: relative; z-index: 1; color: var(--muted); }
.theme-switch .knob { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); transition: transform .22s ease; }
.theme-switch[aria-checked="true"] .knob { transform: translateX(28px); }
.theme-switch[aria-checked="false"] .ts-sun, .theme-switch[aria-checked="true"] .ts-moon { color: #fff; }
.theme-switch:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.nav .theme-switch + .logo { margin-left: -8px; }

:root[data-theme="dark"] {
  color-scheme: dark;

  --ink: #ffffff;
  --text: #c8c8c8;
  --muted: #9b9b9b;
  --page: #121212;
  --band: #121212;
  --deep: #121212;
  --line: #2a2a2a;
}
:root[data-theme="dark"] header { background: rgba(18, 18, 18, .94); }
:root[data-theme="dark"] .nav .logo img { content: url("logos/rubidex-logo-white.png"); }
:root[data-theme="dark"] .ph { background: linear-gradient(160deg, #1c1c1c 0%, #202020 55%, #242422 100%); }
:root[data-theme="dark"] .ph span { background: rgba(18, 18, 18, .6); color: var(--text); }
:root[data-theme="dark"] .ph .cap { background: rgba(18, 18, 18, .7); color: var(--muted); }
:root[data-theme="dark"] .btn.ghost:hover, :root[data-theme="dark"] .btn.ghost:focus-visible { color: var(--deep); background: var(--ink); }

:root[data-theme="dark"] img[src*="bmsintel-logo"] { content: url("logos/bmsintel-logo-white.webp"); }
:root[data-theme="dark"] img[src*="gridlock-logo-black"] { content: url("logos/gridlock-logo-white.png"); }

:root[data-theme="dark"] .arch .core text { fill: #1f2733; }
:root[data-theme="dark"] .region-map .land path { fill: #303030; stroke: var(--page); }
:root[data-theme="dark"] .region-map .dot { stroke: var(--page); }
:root[data-theme="dark"] .nw .card { background: rgba(255, 255, 255, .03); border-color: #444; }
:root[data-theme="dark"] h1.two-line .l1, :root[data-theme="dark"] .hero.wide h1 { color: #fff; }
:root[data-theme="dark"] .panel-contact { color: #1f2733; }
:root[data-theme="dark"] footer { border-top: 1px solid var(--line); }

.footer-legal { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; padding-top: 22px !important; padding-bottom: 28px !important; border-top: 1px solid rgba(255,255,255,.12); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.footer-legal ul { gap: 28px; }
.footer-legal p { margin: 0; letter-spacing: .06em; text-transform: none; font-size: 12.5px; }
.footer-legal a, .footer-legal button { color: rgba(255,255,255,.75); }
.footer-legal button { background: none; border: 0; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.footer-legal button:hover, .footer-legal button:focus-visible { color: var(--gold); outline: none; }
footer .wrap:first-child { padding-bottom: 32px; }

.cookie-banner { position: fixed; left: 24px; bottom: 24px; z-index: 40; width: min(440px, calc(100vw - 32px)); box-sizing: border-box; background: var(--deep); color: rgba(255,255,255,.78); padding: 26px 28px 22px; box-shadow: 0 18px 50px rgba(0,0,0,.28); font-size: 13.5px; line-height: 1.55; }
.cookie-banner[hidden] { display: none; }
.cookie-banner h2 { margin: 0 0 10px; font-family: var(--head); font-size: 19px; font-weight: 500; letter-spacing: 0; color: #fff; }
.cookie-banner p { margin: 0 0 12px; }
.cookie-banner a { color: var(--gold); }
.cookie-banner b { color: var(--gold); font-weight: 600; }
.cb-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 16px; }
.cb-actions button, .cpm-actions button { font-family: var(--head); font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; padding: 13px 10px; cursor: pointer; }
.cb-accept, .cpm-save { background: var(--gold); border: 1px solid var(--gold); color: #1f2733; }
.cb-decline, .cpm-accept { background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; }
.cb-actions button:hover, .cpm-actions button:hover { filter: brightness(1.08); }
.cb-note { padding-top: 14px; border-top: 1px solid rgba(255,255,255,.14); font-size: 12px; }
.cb-bottom { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 12.5px; }
.cb-bottom label { display: inline-flex; align-items: center; gap: 6px; }
.cb-save { margin-left: auto; background: none; border: 0; padding: 0; color: #fff; font: inherit; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; cursor: pointer; }

.cpm[hidden] { display: none; }
.cpm { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px 16px; }
.cpm-back { position: absolute; inset: 0; background: rgba(10,12,16,.6); }
.cpm-panel { position: relative; width: min(640px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; box-sizing: border-box; background: var(--page); color: var(--text); padding: 40px 44px 32px; font-size: 14.5px; line-height: 1.6; box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.cpm-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: none; font-size: 22px; line-height: 1; color: var(--ink); cursor: pointer; }
.cpm-kicker { margin: 0; font-family: var(--head); font-size: 11.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.cpm-panel h2 { margin: 8px 0 12px; font-size: 30px; }
.cpm-lede { margin: 0 0 20px; font-family: var(--body); font-size: 16.5px; }
.cpm-all { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; font-weight: 500; color: var(--ink); }
.cpm-cat { border-top: 1px solid var(--line); padding: 18px 0 14px; }
.cpm-cat:last-of-type { border-bottom: 1px solid var(--line); }
.cpm-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.cpm-cat h3 { margin: 0; font-family: var(--head); font-size: 17px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink); }
.cpm-tag { font-family: var(--head); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold); padding: 3px 8px; }
.cpm-desc { margin: 6px 0 8px; }
.cpm-view { background: none; border: 0; padding: 0; font-family: var(--head); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.cpm-view:hover { color: var(--ink); }
.cpm-list { list-style: none; margin: 10px 0 0; padding: 0; }
.cpm-list li { display: grid; grid-template-columns: 120px 1fr; column-gap: 16px; padding: 8px 0; border-top: 1px dashed var(--line); font-size: 13.5px; }
.cpm-list b { grid-row: span 2; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; font-weight: 500; color: var(--ink); }
.cpm-list span { font-size: 12px; color: var(--muted); }
.cpm-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.cpm-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.cpm-switch span { position: absolute; inset: 0; border-radius: 12px; background: #c9c5bc; transition: background .2s; }
.cpm-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.cpm-switch input:checked + span { background: var(--gold); }
.cpm-switch input:checked + span::after { transform: translateX(20px); }
.cpm-switch input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.cpm-note { margin: 14px 0 0; font-size: 13px; }
.cpm-note b { color: var(--ink); font-weight: 600; }
.cpm-actions { display: flex; align-items: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.cpm-actions > span { flex: 1; }
.cpm-reject { background: none; border: 0; padding-left: 0 !important; color: var(--muted); }
.cpm-accept { border-color: var(--ink); color: var(--ink); }
@media (max-width: 640px) {
  .cookie-banner { left: 16px; bottom: 16px; padding: 22px 20px 18px; }
  .cb-actions button { letter-spacing: .1em; padding: 12px 6px; }
  .cpm-panel { padding: 32px 22px 24px; }
  .cpm-list li { grid-template-columns: 1fr; }
  .cpm-list b { grid-row: auto; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
}
:root[data-theme="dark"] .cookie-banner { border: 1px solid var(--line); }
:root[data-theme="dark"] .cpm-panel { border: 1px solid var(--line); }
:root[data-theme="dark"] .cpm-accept { border-color: rgba(255,255,255,.5); color: #fff; }
:root[data-theme="dark"] .cpm-switch span { background: #3a3a3a; }

img.warm { filter: sepia(.28) saturate(1.15) brightness(1.03); }

@media (max-width: 1000px) {

  main .feature, main .feature.hero, main .feature.hero.wide, main .feature.reverse, main .split { grid-template-columns: 1fr !important; }
  main .feature > .text { order: 0 !important; }
  main .feature > .ph { order: 1 !important; }

  .fade-left, .fade-right { -webkit-mask-image: none !important; mask-image: none !important; }
}
@media (max-width: 760px) {

  .wrap { padding-left: 24px; padding-right: 24px; }
  main section { padding-top: 72px; padding-bottom: 72px; }
  main .feature .text, main .feature.reverse .text { padding: 56px 24px 40px !important; }

  main .feature.hero .ph { min-height: 0 !important; aspect-ratio: 4 / 5; }
  main .feature:not(.hero) .ph, main .industry .ph, #global .ph { min-height: 0 !important; aspect-ratio: 3 / 2; }
  main .thumb .ph, main .scale .ph { aspect-ratio: 3 / 2; height: auto; min-height: 0; }

  main .cols, main .cols.four, main #rubidex-core .cols, main .ed3, main .ed4, main .model, main .eras, main .thumbs, main .scale, main .products, main .products.two, main .apps { grid-template-columns: 1fr !important; }
  main .cols .col, main .cols.four .col { border-left: 0 !important; padding-left: 0 !important; }

  main h1, main .hero h1, main .hero.wide h1, .nw h1 { font-size: 34px !important; line-height: 1.12; }
  main h2, main .feature h2, main .split h2 { font-size: 28px; line-height: 1.2; }
  main .body { font-size: 17px; line-height: 1.6; }
  .eyebrow { font-size: 12px; letter-spacing: .12em; gap: 10px; margin-bottom: 16px; white-space: normal; }
  .eyebrow::after { display: none; }
  main .cols .col h3, main .thumb h3, main .scale h3, main .ed3 h3, main .ed h3 { font-size: 14px; letter-spacing: .08em; line-height: 1.4; min-height: 0 !important; }

  main .actions { flex-direction: column; align-items: stretch; gap: 12px; }
  main .btn { min-height: 52px; width: 100%; justify-content: space-between; }
  main .text-link { padding-top: 12px; padding-bottom: 12px; }

  .nav { height: 64px; }
  header { transition: transform .25s ease; }
  header.hide-on-scroll { transform: translateY(-100%); }
}

@media (max-width: 760px) { .phone-hide { display: none !important; } }

/* ===== Phone refinements (max-width: 760px) =====
   Layout, readability and spacing fixes for phones only; desktop is unchanged.
   Regression checks: static-site-tests/phone-layout.test.mjs */
@media (max-width: 760px) {
  main section { padding-top: 56px; padding-bottom: 56px; }
  main > section:first-child:not(.feature):not(.hero) { padding-top: 56px !important; }

  /* Layout bugs */
  /* Photo boxes size from aspect-ratio and their image is absolutely positioned, so they have no
     intrinsic width. Safari does not stretch grid items that have an aspect-ratio, which shrank
     them to ~150px on iPhone; an explicit width makes every engine fill the column. */
  main .ph { width: 100%; }
  main .ed3 > div, main .ed4 > div { padding-left: 0 !important; border-left: 0 !important; }
  main .cols > .col:nth-child(n+2) { border-top: 1px solid var(--line) !important; }
  main .pair { padding-top: 0 !important; }
  main .pair > div { display: block !important; padding: 24px 0 !important; border-top: 1px solid var(--line) !important; }
  main .pair + * { margin-top: 40px !important; }

  /* Readability: fill the column instead of short balanced lines */
  main p { text-wrap: wrap !important; max-width: none !important; }
  .btn { font-size: 12px !important; }
  main :is(.areas-label, .apps-label, .sub-label, .cat, .kicker, .tag, .status, small) { font-size: 12px !important; }

  /* Footer tap targets: taller links, tighter rows (same visual rhythm) */
  footer ul { row-gap: 2px; }
  footer ul a, .footer-legal a, .footer-legal button { display: inline-block; padding-top: 11px; padding-bottom: 11px; font-size: 12px; }
  .footer-legal ul { row-gap: 2px; }

  /* Spacing */
  main :is(.col, .pair > div, .thumb) > svg:has(+ h3) { display: block; margin-bottom: 12px !important; }
  main :is(.col, .pair > div, .thumb) > svg + h3 { margin-top: 0 !important; }
  main .flow { grid-template-columns: 1fr 1fr !important; row-gap: 28px; column-gap: 20px; border-top: 0; }
  main .flow div { padding: 20px 0 0; border-top: 1px solid var(--line); }
}
