/* BlockUrb — Urban Tech Ecosystem
   Design system: cartographic precision, editorial type, restrained accents.
*/

:root {
  /* Light mode (default) — bone + ink */
  --bg: #F4F1EA;
  --bg-elev: #ECE7DC;
  --bg-dark: #0E1410;
  --bg-dark-elev: #18211C;
  --ink: #0E1410;
  --ink-soft: #3C443E;
  --ink-muted: #6B7268;
  --ink-faint: #A8AB9F;
  --line: #D8D3C5;
  --line-strong: #B5AE9C;
  --line-dark: #28322C;
  --paper: #FBF9F4;

  /* Accents — moss is the brand thread, signal is for live data */
  --accent: oklch(0.48 0.07 145);     /* moss */
  --accent-soft: oklch(0.93 0.04 145);
  --accent-ink: oklch(0.32 0.05 145);
  --signal: oklch(0.65 0.16 55);      /* warm amber for data ticks */
  --signal-soft: oklch(0.94 0.05 75);

  /* Type */
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-sans: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Density */
  --density: 1;
  --gutter: calc(24px * var(--density));
  --rail: 56px;
  --maxw: 1320px;
}

[data-mode="dark"] {
  --bg: #0E1410;
  --bg-elev: #18211C;
  --bg-dark: #050807;
  --bg-dark-elev: #0E1410;
  --ink: #F4F1EA;
  --ink-soft: #C9CCBE;
  --ink-muted: #8E928A;
  --ink-faint: #5A5F58;
  --line: #28322C;
  --line-strong: #3C463F;
  --line-dark: #1A211D;
  --paper: #131913;
  --accent-soft: oklch(0.22 0.04 145);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.005em;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
img { max-width: 100%; display: block; }

/* Optional cartographic grid overlay */
body[data-grid="on"]::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px);
  background-size: 80px 80px;
  mix-blend-mode: multiply;
}
[data-mode="dark"] body[data-grid="on"]::before {
  mix-blend-mode: screen;
}

/* Typographic primitives */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
  font-feature-settings: "ss01";
}
.display em {
  font-style: italic;
  color: var(--accent-ink);
}
[data-mode="dark"] .display em {
  color: oklch(0.78 0.08 145);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.mono-data {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--ink-muted);
}

/* Layout */
.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: calc(96px * var(--density)) 0;
  border-top: 1px solid var(--line);
}
.section:first-of-type { border-top: 0; }

.section--dark {
  background: var(--bg-dark);
  color: #F4F1EA;
  border-color: var(--line-dark);
}
.section--dark .mono,
.section--dark .eyebrow { color: color-mix(in srgb, #F4F1EA 60%, transparent); }
.section--dark .eyebrow::before { background: color-mix(in srgb, #F4F1EA 50%, transparent); }

/* Top nav */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topnav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  font-weight: 500;
}
.brand__mark {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border: 1px solid var(--ink);
  position: relative;
}
.brand__mark::before, .brand__mark::after {
  content: "";
  position: absolute;
  background: var(--ink);
}
.brand__mark::before { width: 12px; height: 1px; }
.brand__mark::after { width: 1px; height: 12px; }
.brand__name { font-weight: 600; }
.brand__sep { color: var(--ink-faint); }
.brand__sub { color: var(--ink-muted); font-weight: 400; }

.navlist {
  display: flex;
  gap: 26px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.navlist a {
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.18s;
}
.navlist a:hover { color: var(--ink); }
.navlist a.active { color: var(--ink); }
.navlist a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
}
.navactions {
  display: flex; gap: 10px; align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--ink {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn--ink:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink); }
.btn--accent {
  background: var(--accent);
  color: #F4F1EA;
  border-color: var(--accent);
}

.btn .arrow {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
}

/* Tag / chip */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  background: var(--paper);
}
.tag .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.tag .dot--live {
  background: var(--signal);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Coordinate label */
.coord {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

/* Card / module */
.module {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 28px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}
.module:hover { border-color: var(--ink); }
.module__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.module__id {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.module__icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
}
.module h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.module p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* Hairline divider */
.hr {
  height: 1px;
  background: var(--line);
  margin: 0;
  border: 0;
}
.hr--strong { background: var(--line-strong); }
.hr--dark { background: var(--line-dark); }

/* Image slot — for real photography drops */
.placeholder {
  position: relative;
  background: var(--bg-elev);
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent 0,
      transparent 12px,
      color-mix(in srgb, var(--ink) 6%, transparent) 12px,
      color-mix(in srgb, var(--ink) 6%, transparent) 13px
    );
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 24px;
}
.placeholder__corner {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.placeholder__corner--tl { top: 10px; left: 12px; }
.placeholder__corner--tr { top: 10px; right: 12px; }
.placeholder__corner--bl { bottom: 10px; left: 12px; }
.placeholder__corner--br { bottom: 10px; right: 12px; }

/* Ticker */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.ticker__track {
  display: flex;
  gap: 56px;
  padding: 14px 0;
  white-space: nowrap;
  animation: tick 60s linear infinite;
  width: max-content;
}
.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.ticker__item .signal {
  color: var(--accent-ink);
  font-weight: 600;
}
.ticker__item .label {
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
@keyframes tick {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Footer */
.foot {
  background: var(--bg-dark);
  color: #F4F1EA;
  padding: 80px 0 40px;
}
.foot a:hover { color: oklch(0.78 0.08 145); }
.foot .mono { color: color-mix(in srgb, #F4F1EA 50%, transparent); }

/* Utility */
.hide-on-mobile {}
@media (max-width: 800px) {
  .hide-on-mobile { display: none !important; }
  .navlist { display: none; }
  .display { font-size: 56px !important; }
}

/* ---- Animated coordinate plane backdrop ---- */
.coord-plane {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  opacity: 0.7;
}
.coord-plane svg { width: 100%; height: 100%; }
[data-mode="dark"] .coord-plane { opacity: 0.6; }

@keyframes scanH { from { transform: translateY(-10vh); } to { transform: translateY(110vh); } }
@keyframes scanV { from { transform: translateX(-10vw); } to { transform: translateX(110vw); } }
@keyframes dashFlow { to { stroke-dashoffset: -200; } }
@keyframes blink { 0%,80%,100% { opacity: 0.2; } 90% { opacity: 1; } }
@keyframes typeIn {
  0% { width: 0; }
  100% { width: 100%; }
}
@keyframes coordFloat {
  0%, 100% { transform: translate(0,0); }
  25% { transform: translate(2px,-1px); }
  50% { transform: translate(-1px,2px); }
  75% { transform: translate(1px,1px); }
}

.coord-tick {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--ink-muted);
  opacity: 0.6;
  letter-spacing: 0.05em;
}
.coord-line {
  stroke: var(--ink);
  opacity: 0.07;
  stroke-width: 1;
}
[data-mode="dark"] .coord-line { opacity: 0.09; }
.coord-axis {
  stroke: var(--accent);
  stroke-width: 1;
  opacity: 0.45;
}
.coord-sweep {
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 4 8;
  opacity: 0.35;
  animation: dashFlow 2s linear infinite;
}
.coord-blink { animation: blink 2.4s ease-in-out infinite; }

/* Place all real content above the plane */
header, main, footer, [id="tweaks-root"] { position: relative; z-index: 2; }
.topnav { position: sticky; z-index: 50; }

/* Drawing line that traces in on reveal */
@keyframes drawLine {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.draw-line {
  display: block;
  height: 1px;
  background: var(--ink);
  opacity: 0.4;
  transform-origin: left;
  animation: drawLine 1.4s cubic-bezier(.7,0,.3,1) both;
}
[dir="rtl"] .draw-line { transform-origin: right; }

/* Section number stamp animation */
@keyframes stamp {
  0% { transform: scale(1.2); opacity: 0; }
  60% { transform: scale(0.96); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.stamp-in { animation: stamp 0.7s cubic-bezier(.2,.7,.2,1) both; }

/* Hover tilt on diagram */
@keyframes diagramOrbit {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(0.4deg); }
}

/* Card / module readability fix in dark mode */
[data-mode="dark"] .module,
[data-mode="dark"] .module-card {
  background: var(--bg-elev) !important;
  border-color: var(--line-strong) !important;
  color: var(--ink) !important;
}
[data-mode="dark"] .module *, [data-mode="dark"] .module-card * { color: inherit; }
[data-mode="dark"] .module h3, [data-mode="dark"] .module-card h3 { color: var(--ink) !important; }
[data-mode="dark"] .accent-soft-bg { background: color-mix(in srgb, var(--accent) 20%, var(--bg-elev)) !important; }

/* Section-dark cards readable */
.section--dark .module,
.section--dark .module-card,
.section--dark article {
  background: color-mix(in srgb, #F4F1EA 6%, transparent);
  border-color: #3C463F !important;
  color: #F4F1EA !important;
}
.section--dark .module *, .section--dark .module-card *, .section--dark article * { color: inherit; }
.section--dark a { color: #F4F1EA; }

/* Layer cards on platform stack */
[data-mode="dark"] .platform-layer {
  background: var(--bg-elev) !important;
  color: var(--ink) !important;
  border-color: var(--line-strong) !important;
}
[data-mode="dark"] .platform-layer.platform-base {
  background: var(--ink) !important;
  color: var(--bg) !important;
}
[data-mode="dark"] .platform-layer.platform-accent {
  background: color-mix(in srgb, var(--accent) 22%, var(--bg-elev)) !important;
  border-color: var(--accent) !important;
}

/* Cases / list rows readable */
[data-mode="dark"] .case-row { border-color: var(--line-strong); }
[data-mode="dark"] table { color: var(--ink); }
[data-mode="dark"] th { color: var(--ink-soft) !important; }

.pilar-card:hover .pilar-kicker { color: color-mix(in srgb, #F4F1EA 65%, transparent) !important; }
.pilar-card:hover .pilar-desc { color: color-mix(in srgb, #F4F1EA 80%, transparent) !important; }

/* Coord plane visual weight — push it back so text stays readable */
.coord-plane { opacity: 0.5; }
[data-mode="dark"] .coord-plane { opacity: 0.32; }

/* Make any section content sit above the coord-plane and on a clean surface */
.section, .topnav, .foot, main > section { position: relative; }
.section { background: var(--bg); }
.section--dark { background: var(--bg-dark); color: #F4F1EA; }
.topnav { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.foot { background: var(--bg-dark); color: #F4F1EA; }

/* Cards always have explicit surface so the grid doesn't bleed through */
.module, .module-card, article, .placeholder { position: relative; }
.module-card { background: var(--paper); }

::selection { background: var(--accent); color: #F4F1EA; }

/* ---- Language switcher ---- */
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.lang-btn:hover { border-color: var(--ink); }
.lang-spinner {
  width: 10px; height: 10px;
  border: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent);
  border-top-color: var(--accent-ink);
  border-radius: 50%;
  display: inline-block;
  animation: langSpin 0.8s linear infinite;
}
@keyframes langSpin { to { transform: rotate(360deg); } }
[dir="rtl"] body { font-feature-settings: "ss01"; }
[dir="rtl"] .display, [dir="rtl"] em { font-family: "Instrument Serif", Georgia, serif; }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 180px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  z-index: 200;
  box-shadow: 0 12px 32px -12px color-mix(in srgb, var(--ink) 30%, transparent);
  animation: menuPop 0.22s cubic-bezier(.2,.7,.2,1);
}
@keyframes menuPop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.lang-opt {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  text-align: start;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: background 0.15s, color 0.15s;
}
.lang-opt > * { color: inherit !important; }
.lang-opt:last-child { border-bottom: 0; }
.lang-opt:hover { background: var(--bg-elev); color: var(--ink); }
.lang-opt.active { color: var(--ink); background: color-mix(in srgb, var(--accent) 18%, var(--paper)); }
[data-mode="dark"] .lang-menu { background: var(--bg-elev); border-color: var(--line-strong); }
[data-mode="dark"] .lang-opt { color: var(--ink); border-bottom-color: var(--line-strong); }
[data-mode="dark"] .lang-opt:hover { background: color-mix(in srgb, var(--ink) 8%, var(--bg-elev)); }
[data-mode="dark"] .lang-opt.active { background: color-mix(in srgb, var(--accent) 28%, var(--bg-elev)); color: var(--ink); }

/* ---- Logo motion ---- */
@keyframes logoSpin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes logoPulse { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }
.logo-spin { animation: logoSpin 24s linear infinite; transform-origin: center; }

/* ---- Marquee ---- */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-33.333%); }
}

/* ---- Float / drift / shimmer ---- */
@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(0, -8px); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer-text {
  background: linear-gradient(90deg,
    var(--ink) 0%,
    var(--ink) 40%,
    var(--accent) 50%,
    var(--ink) 60%,
    var(--ink) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}

/* ---- Hover lift on modules ---- */
.module-card { transition: transform 0.4s cubic-bezier(.2,.7,.2,1), border-color 0.3s, background 0.3s; }
.module-card:hover { transform: translateY(-4px); }
.module-card:hover .arrow-link { transform: translateX(4px); }
.arrow-link { transition: transform 0.3s; display: inline-block; }

/* ---- Live dot ring ---- */
@keyframes ringPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(2.2); opacity: 0; }
}
.live-ring {
  position: relative;
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--signal);
  border-radius: 50%;
}
.live-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--signal);
  animation: ringPulse 1.8s ease-out infinite;
}

/* ---- RTL niceties ---- */
[dir="rtl"] .arrow { transform: scaleX(-1); }
[dir="rtl"] .ticker__track { animation-direction: reverse; }
[dir="rtl"] body { letter-spacing: 0; }

/* ---- Cursor follower ---- */
.cursor-dot {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: multiply;
  transition: transform 0.08s linear, width 0.3s, height 0.3s;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  position: fixed;
  width: 32px; height: 32px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transition: transform 0.25s cubic-bezier(.2,.7,.2,1), width 0.3s, height 0.3s, border-color 0.3s;
  transform: translate(-50%, -50%);
}
@media (max-width: 800px) { .cursor-dot, .cursor-ring { display: none; } }

/* ---- Page enter ---- */
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
main { animation: pageEnter 0.7s cubic-bezier(.2,.7,.2,1); }

/* ============================================================
   MOBILE — phone-first overrides for the inline-styled grids
   The pages use lots of `style={{gridTemplateColumns:"..."}}` inline,
   so we collapse them all to a single column under 820px.
   ============================================================ */
@media (max-width: 820px) {
  :root {
    --gutter: 18px;
    --rail: 0px;
  }

  body { font-size: 15px; }

  /* Collapse every inline grid to 1 col */
  [style*="grid-template-columns"],
  [style*="gridTemplateColumns"] {
    grid-template-columns: 1fr !important;
  }

  /* Tighten gaps on inline grids/flex */
  [style*="gap: 64px"],
  [style*="gap: 80px"],
  [style*="gap: 56px"],
  [style*="gap: 48px"],
  [style*="gap:64px"],
  [style*="gap:80px"],
  [style*="gap:56px"],
  [style*="gap:48px"] {
    gap: 28px !important;
  }
  [style*="gap: 32px"],
  [style*="gap:32px"] { gap: 20px !important; }

  /* Section padding */
  .section { padding: 56px 0; }
  [style*="padding:\"120px"],
  [style*="padding: 120px"],
  [style*="padding:\"80px"],
  [style*="padding: 80px"] { padding: 56px var(--gutter) !important; }

  /* Display headings */
  .display { font-size: clamp(40px, 11vw, 56px) !important; }
  h1.display, h2.display { font-size: clamp(40px, 11vw, 60px) !important; }

  /* Inline-styled block padding/margins on big numbers */
  [style*="minHeight: 320"],
  [style*="minHeight: 280"],
  [style*="minHeight: 220"],
  [style*="minHeight: 200"] { min-height: 0 !important; }
  [style*="minHeight:320"],
  [style*="minHeight:280"],
  [style*="minHeight:220"],
  [style*="minHeight:200"] { min-height: 0 !important; }

  /* Top nav: hide nav links, show only brand + lang/menu */
  .topnav__inner { grid-template-columns: 1fr auto; gap: 12px; padding: 12px var(--gutter); }
  .navlist { display: none !important; }
  .brand__sub, .brand__sep { display: none; }
  .brand { font-size: 12px; }

  /* Buttons stack and stretch */
  .btn { padding: 13px 16px; font-size: 11px; }
  [style*="display:\"flex\""][style*="flexWrap"],
  [style*="display: flex"][style*="flexWrap"] { gap: 10px !important; }

  /* Footer */
  .foot { padding: 56px 0 32px; }

  /* Coord plane: dim further */
  .coord-plane { opacity: 0.25; }

  /* Module cards: less vertical inflation */
  .module, .module-card { padding: 20px !important; }

  /* Pilar cards */
  .pilar-card { min-height: 0 !important; padding: 22px !important; }

  /* SectionHead: stack the index/kicker */
  [style*="180px 1fr"],
  [style*="100px 1fr"],
  [style*="260px 1fr"],
  [style*="180px 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Hero ecosystem diagram: keep readable */
  svg[aria-label="Ecossistema BlockUrb"] { max-height: 60vh; }

  /* Big Instrument Serif blocks */
  [style*="fontSize:\"clamp"] { /* let clamp do its work */ }

  /* Ticker: smaller */
  .ticker__track { gap: 32px !important; padding: 10px 0; font-size: 11px; }

  /* Lang menu adjustments */
  .lang-menu { inset-inline-end: 0; min-width: 160px; }

  /* Cursor follower already disabled <800px */

  /* Tweaks panel — keep small */
  [class*="tweaks"] { font-size: 12px; }

  /* Make sure giant min-heights on grids don't push content off */
  [style*="minHeight: 160"],
  [style*="minHeight:160"] { min-height: 0 !important; }

  /* Inline 56px+ paddings shrink */
  [style*="padding:\"56px 48px\""],
  [style*="padding: 56px 48px"] { padding: 28px 18px !important; }
  [style*="padding:\"36px 28px\""],
  [style*="padding: 36px 28px"] { padding: 22px 16px !important; }

  /* Reduce the 80-100px+ marginTop tops between sections */
  [style*="marginTop: 80"],
  [style*="marginTop:80"],
  [style*="marginTop: 100"],
  [style*="marginTop:100"] { margin-top: 40px !important; }

  /* Ordered list rows in the verticals list keep tight */
  ol li { font-size: 12px; }
}

@media (max-width: 520px) {
  :root { --gutter: 14px; }
  .display { font-size: clamp(36px, 12vw, 48px) !important; }
  body { font-size: 14px; }
  .btn { padding: 11px 14px; }
  .section { padding: 44px 0; }
  /* Allow huge inline fontSize numbers to ease up */
  [style*="fontSize: 22"],
  [style*="fontSize:22"] { font-size: 18px !important; }
  [style*="fontSize: 19"],
  [style*="fontSize:19"],
  [style*="fontSize: 18"],
  [style*="fontSize:18"] { font-size: 16px !important; }
  [style*="fontSize: 16"],
  [style*="fontSize:16"] { font-size: 15px !important; }
}

/* Prevent horizontal scroll from any oversized fixed-width inline element */
html, body { overflow-x: hidden; max-width: 100%; }
img, svg { max-width: 100%; height: auto; }
