/* QUICS — design system v3 (navy primary, docs-density, subtle gaming/tech glow) */

:root {
  /* Color — anchored to #1b2964 */
  --navy:        #1b2964;
  --navy-2:      #2a3d8c;     /* hover */
  --navy-3:      #0e1838;     /* deep — for dark sections */
  --navy-ink:    #050a1f;     /* darkest, footer ground */
  --navy-soft:   #eef0f7;     /* tinted background */
  --navy-glow:   rgba(42, 61, 140, 0.35);

  --bg:          #f5f6f8;
  --bg-2:        #eef0f4;
  --paper:       #ffffff;

  --fg:          #0a0e1a;
  --fg-2:        #4a4f5e;
  --fg-3:        #717684;
  --muted:       #9aa0ad;
  --line:        #dde0e7;
  --line-2:      #c4c8d3;

  --accent:      var(--navy);
  --accent-2:    var(--navy-2);
  --accent-soft: var(--navy-soft);

  /* Type */
  --f-display: "IBM Plex Sans", "Inter Tight", -apple-system, system-ui, sans-serif;
  --f-body:    "IBM Plex Sans", "Inter Tight", -apple-system, system-ui, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-serif:   "Newsreader", "Iowan Old Style", Georgia, serif;

  /* Sizes — docs-dense but louder display */
  --fs-mega:   clamp(72px, 8.5vw, 132px);
  --fs-giant:  clamp(120px, 22vw, 280px);
  --fs-hero:   clamp(40px, 4.2vw, 64px);
  --fs-h1:     clamp(32px, 3vw, 48px);
  --fs-h2:     clamp(24px, 2.2vw, 34px);
  --fs-h3:     20px;
  --fs-h4:     17px;
  --fs-body:   16px;
  --fs-lead:   19px;
  --fs-small:  14px;
  --fs-micro:  11px;

  /* Spacing */
  --pad-page:    clamp(24px, 4vw, 56px);
  --pad-section: clamp(64px, 7.5vw, 104px);
  --pad-section-sm: 56px;

  /* Effects */
  --shadow-card: 0 1px 0 rgba(10,14,26,.04);
  --shadow-navy: 0 8px 28px -12px var(--navy-glow);
}

[data-density="compact"] {
  --pad-section: 56px;
  --pad-section-sm: 36px;
  --fs-body: 14px;
  --fs-lead: 16px;
}

[data-typo="sans-mono"] {
  --f-display: "IBM Plex Sans", system-ui, sans-serif;
  --f-body:    "IBM Plex Sans", system-ui, sans-serif;
  --f-mono:    "IBM Plex Mono", monospace;
}
[data-typo="inter-mono"] {
  --f-display: "Inter Tight", system-ui, sans-serif;
  --f-body:    "Inter Tight", system-ui, sans-serif;
  --f-mono:    "JetBrains Mono", monospace;
}
[data-typo="hybrid"] {
  --f-display: "Newsreader", Georgia, serif;
  --f-body:    "IBM Plex Sans", system-ui, sans-serif;
  --f-mono:    "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--bg); }

.q {
  font-family: var(--f-body);
  color: var(--fg);
  background: var(--bg);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "ss01", "cv11";
  letter-spacing: -0.005em;
}

.q h1, .q h2, .q h3, .q h4 {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
}
.q h1 { letter-spacing: -0.03em; font-weight: 500; }
[data-typo="hybrid"] .q h1,
[data-typo="hybrid"] .q .q-display {
  font-family: var(--f-serif);
  font-weight: 400;
  letter-spacing: -0.025em;
}

.q p { margin: 0; text-wrap: pretty; }

/* ── Mono utilities ─────────────────────────────────────────────────── */
.q-mono {
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}
.q-mono-lower {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}
.q-num {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
}

/* ── Links ──────────────────────────────────────────────────────────── */
.q-link {
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: color .15s, border-color .15s;
}
.q-link:hover { color: var(--navy-2); }

.q a { color: var(--navy); text-decoration: none; transition: border-color .15s; }
.q p a, .q li a, .q dd a, .q td a { border-bottom: 1px solid rgba(27,41,100,.25); }
.q p a:hover, .q li a:hover, .q dd a:hover, .q td a:hover { border-color: var(--navy); }

/* ── Buttons — fill from left on hover ──────────────────────────────── */
.q-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  text-decoration: none;
  border-radius: 0;
  overflow: hidden;
  white-space: nowrap;
  isolation: isolate;
  transition: color .25s ease, border-color .25s ease;
}
.q-btn > * { position: relative; z-index: 1; }
.q-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--navy);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s cubic-bezier(.65,.05,.35,1);
  z-index: -1;
}
.q-btn:hover { border-color: var(--navy); color: #fff; }
.q-btn:hover::before { transform: scaleX(1); }

.q-btn--ghost { background: transparent; color: var(--fg); }
.q-btn--ghost:hover { color: #fff; border-color: var(--navy); }

.q-btn--accent { background: var(--navy); border-color: var(--navy); color: #fff; }
.q-btn--accent::before { background: var(--navy-2); }
.q-btn--accent:hover { color: #fff; border-color: var(--navy-2); }

.q-btn--light {
  background: var(--paper);
  color: var(--navy);
  border-color: var(--paper);
}
.q-btn--light::before { background: var(--navy); }
.q-btn--light:hover { color: #fff; }

.q-btn--sm { padding: 8px 14px; font-size: 12px; }

/* ── Image placeholders ─────────────────────────────────────────────── */
.q-img {
  background:
    repeating-linear-gradient(135deg, rgba(10,14,26,0.025) 0 1px, transparent 1px 10px),
    var(--bg-2);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-3);
}
.q-img__inner {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 16px;
  color: var(--fg-3);
}
.q-img__path {
  font-size: 10px;
  opacity: .7;
  text-transform: none;
  letter-spacing: 0;
}
.q-img__corner {
  position: absolute;
  top: 8px; left: 8px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  opacity: .6;
}

/* ── Tags ───────────────────────────────────────────────────────────── */
.q-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line-2);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-2);
  background: transparent;
  font-weight: 500;
}
.q-tag--accent { color: var(--navy); border-color: var(--navy); background: var(--navy-soft); }
.q-tag--solid  { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── Eyebrow ────────────────────────────────────────────────────────── */
.q-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 500;
}
.q-eyebrow::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 1px;
  background: var(--navy);
}

/* On dark navy backgrounds */
.is-on-navy .q-eyebrow { color: #aeb8de; }
.is-on-navy .q-eyebrow::before { background: #aeb8de; }

/* ── Sections ───────────────────────────────────────────────────────── */
.q-section { padding: var(--pad-section) var(--pad-page); position: relative; }
.q-section--sm { padding: var(--pad-section-sm) var(--pad-page); }
.q-section--soft  { background: var(--bg-2); }
.q-section--paper { background: var(--paper); }
.q-section--navy  { background: var(--navy); color: #fff; }
.q-section--navy h1, .q-section--navy h2, .q-section--navy h3, .q-section--navy h4 { color: #fff; }
.q-section--navy .q-mono { color: rgba(255,255,255,.6); }
.q-section--navy p { color: rgba(255,255,255,.8); }

/* ── Iridescent / cosmic gradient ───────────────────────── */
:root {
  --iri: linear-gradient(96deg, #4eff9a 0%, #21d6ff 30%, #7e6bff 55%, #ff5ed6 80%, #ffb84e 100%);
  --iri-soft: linear-gradient(96deg, rgba(78,255,154,.5), rgba(33,214,255,.5), rgba(126,107,255,.5), rgba(255,94,214,.5));
}
.q-iri-text {
  background: var(--iri);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-weight: 500;
}
.q-iri-bar {
  display: inline-block;
  height: 6px;
  width: 56px;
  background: var(--iri);
}
.q-iri-border {
  position: relative;
  isolation: isolate;
}
.q-iri-border::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  background: var(--iri);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}
@keyframes qIriShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.q-iri-anim {
  background: linear-gradient(96deg, #4eff9a, #21d6ff, #7e6bff, #ff5ed6, #ffb84e, #4eff9a);
  background-size: 200% 100%;
  animation: qIriShift 8s linear infinite;
}

/* Big background type for hero (QUICS as backdrop) */
.q-bg-wordmark {
  position: absolute;
  left: 50%; bottom: -0.18em;
  transform: translateX(-50%);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: var(--fs-giant);
  line-height: .85;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.07);
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
}
.q-bg-wordmark--filled {
  -webkit-text-stroke: 0;
  color: rgba(255,255,255,.04);
}

/* Cosmic hero (used on homepage) — toned down for calmer transition into content */
.q-hero-cosmic {
  background:
    radial-gradient(60% 70% at 75% 10%, rgba(126,107,255,0.14) 0%, transparent 60%),
    radial-gradient(50% 50% at 10% 90%, rgba(33,214,255,0.10) 0%, transparent 60%),
    linear-gradient(180deg, #050a1f 0%, #02050f 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.q-hero-cosmic::after {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 5px);
  pointer-events: none;
  opacity: .35;
}

.q-hero-navy {
  background:
    radial-gradient(80% 60% at 75% 30%, rgba(94,124,255,0.18) 0%, transparent 60%),
    radial-gradient(60% 50% at 15% 80%, rgba(42,61,140,0.35) 0%, transparent 65%),
    linear-gradient(180deg, var(--navy-3) 0%, var(--navy-ink) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.q-hero-navy::after {
  /* very fine noise / scanline texture for the gaming-tech nod */
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 3px);
  pointer-events: none;
  opacity: .6;
}
.q-hero-navy h1,
.q-hero-navy h2,
.q-hero-navy h3 { color: #fff; }
.q-hero-navy p { color: rgba(255,255,255,.82); }
.q-hero-navy .q-mono { color: rgba(174,184,222,.85); }
.q-hero-navy .q-eyebrow { color: #aeb8de; }
.q-hero-navy .q-eyebrow::before { background: #aeb8de; }

/* Section separators removed — whitespace from --pad-section is the only divider */

/* ── Grid utilities ─────────────────────────────────────────────────── */
.q-grid { display: grid; gap: 24px; }
.q-grid-2 { grid-template-columns: repeat(2, 1fr); }
.q-grid-3 { grid-template-columns: repeat(3, 1fr); }
.q-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Card — navy border on hover + soft glow ────────────────────────── */
.q-card {
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: border-color .2s, box-shadow .25s, transform .25s cubic-bezier(.2,.7,.3,1);
  text-decoration: none;
  color: inherit;
  position: relative;
}
.q-card:hover {
  border-color: var(--navy);
  box-shadow: var(--shadow-navy);
  transform: translateY(-2px);
}
.q-card:hover .q-card__arrow { transform: translateX(4px); color: var(--navy); }
.q-card__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.q-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  margin-top: auto;
  border-top: 1px solid var(--line);
}
.q-card__arrow { transition: transform .25s, color .15s; display: inline-block; }

/* ── Nav links ──────────────────────────────────────────────────────── */
.q-navlink {
  position: relative;
  color: var(--fg);
  text-decoration: none;
  padding: 8px 2px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 0;
  border-bottom: 0;
  white-space: nowrap;
  transition: color .15s;
}
.q-navlink::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--navy);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s cubic-bezier(.2,.7,.3,1);
}
.q-navlink:hover { color: var(--navy); }
.q-navlink:hover::after,
.q-navlink--active::after { transform: scaleX(1); }
.q-navlink--active { color: var(--navy); }

/* ── Tabular row ────────────────────────────────────────────────────── */
.q-row {
  display: grid;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  align-items: start;
  text-decoration: none;
  color: inherit;
  transition: background .15s, padding .15s;
}
.q-row:first-child { border-top-color: var(--fg); }
.q-row:hover { background: var(--bg-2); padding-left: 12px; }

/* ── Code block ─────────────────────────────────────────────────────── */
.q-code {
  background: var(--navy-ink);
  color: #e8ecf5;
  padding: 22px;
  font-family: var(--f-mono);
  font-size: 12px;
  line-height: 1.7;
  border: 1px solid var(--navy-ink);
  overflow-x: auto;
}

/* ── Focus rings ────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

/* ── Scrollbar utilities ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 0; height: 0; }
* { scrollbar-width: none; }
.q-scroll-x { overflow-x: auto; }
.q-scroll-x::-webkit-scrollbar { display: none; }

/* ── Pulse dot ──────────────────────────────────────────────────────── */
@keyframes qpulse { 0%, 100% { opacity: 1; transform: scale(1) } 50% { opacity: .35; transform: scale(.85) } }
.q-pulse {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--navy);
  border-radius: 999px;
  animation: qpulse 2s infinite ease-in-out;
  box-shadow: 0 0 0 3px var(--navy-soft);
}
.q-hero-navy .q-pulse {
  background: #7e9aff;
  box-shadow: 0 0 0 3px rgba(126,154,255,.18), 0 0 10px rgba(126,154,255,.6);
}

/* ── Blinking caret (terminal nod) ──────────────────────────────────── */
@keyframes qblink { 0%, 49% { opacity: 1 } 50%, 100% { opacity: 0 } }
.q-caret {
  display: inline-block;
  width: 0.55ch;
  height: 1em;
  background: currentColor;
  vertical-align: -0.1em;
  margin-left: 0.18em;
  animation: qblink 1.1s steps(1) infinite;
}

/* ── Fade-in for routes ─────────────────────────────────────────────── */
@keyframes qfade { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: translateY(0) } }
.q-route { animation: qfade .35s cubic-bezier(.2,.7,.3,1) both; }

/* ── Section head (new pattern — eyebrow + headline, top-aligned) ──── */
.q-sh {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.q-sh__main { display: flex; flex-direction: column; gap: 10px; max-width: 64ch; }
.q-sh__eyebrow {
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  color: var(--fg-3);
  text-transform: uppercase;
}
.q-sh__num { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--fg-3); text-transform: uppercase; }

/* ── Nav dropdown ───────────────────────────────────────────────────── */
.q-nav-drop { position: relative; display: flex; align-items: center; }
.q-nav-drop__panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.12);
  min-width: 160px;
  padding: 12px 0 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s, transform .15s;
  z-index: 200;
}
.q-nav-drop:hover .q-nav-drop__panel,
.q-nav-drop:focus-within .q-nav-drop__panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.q-nav-drop__item {
  display: block;
  padding: 9px 18px;
  font-size: 13px;
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
  transition: color .12s, background .12s;
}
.q-nav-drop__item:hover { color: var(--navy); background: var(--navy-soft); }

/* Blog article prose */
.q-prose { color: var(--fg-2); line-height: 1.75; font-size: 16px; }
.q-prose h2 { font-size: 22px; margin: 2em 0 .6em; letter-spacing: -.02em; color: var(--fg); }
.q-prose h3 { font-size: 18px; margin: 1.6em 0 .5em; color: var(--fg); }
.q-prose h4 { font-size: 16px; font-weight: 600; margin: 1.4em 0 .4em; color: var(--fg); }
.q-prose p { margin-bottom: 1.1em; }
.q-prose ul, .q-prose ol { margin: 0 0 1.1em 1.4em; }
.q-prose li { margin-bottom: .4em; }
.q-prose strong { color: var(--fg); font-weight: 600; }
.q-prose a { color: var(--navy); text-decoration: underline; }
.q-prose a:hover { color: var(--navy-dark, var(--navy)); }
.q-prose pre { background: var(--bg-2); border: 1px solid var(--line); padding: 18px; overflow-x: auto; font-size: 13px; line-height: 1.55; margin-bottom: 1.2em; }
.q-prose code { font-family: var(--f-mono); font-size: .9em; }
.q-prose blockquote { border-left: 3px solid var(--navy); padding-left: 16px; color: var(--fg-3); margin: 1.2em 0; }
.q-prose img { max-width: 100%; height: auto; margin: 1.2em 0; }

/* ── Skip navigation link ───────────────────────────────────────────── */
.q-skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 9999;
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 2px solid #fff;
}
.q-skip-link:focus { left: 8px; }

/* ── Reduced motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .q-iri-anim  { animation: none; }
  .q-pulse     { animation: none; }
  .q-caret     { animation: none; }
  .q-route     { animation: none; }
  .q-btn::before,
  .q-card      { transition: none; }
}

/* ── Alpine.js cloak ────────────────────────────────────────────────── */
[x-cloak] { display: none !important; }

/* ── Responsive layout helpers ──────────────────────────────────────── */
.q-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 48px;
  height: 80px;
}
.q-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line-2);
  background: transparent;
  cursor: pointer;
  padding: 0;
  color: var(--fg);
  font-size: 20px;
  line-height: 1;
  justify-self: end;
}
.q-mob-nav-panel {
  border-top: 1px solid var(--line);
  padding: 12px var(--pad-page) 20px;
}
.q-mob-nav-link {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: -0.005em;
}
.q-mob-nav-link:hover { color: var(--navy); }
.q-mob-nav-sub { padding: 4px 16px 2px; }
.q-mob-nav-sub a {
  display: block;
  padding: 7px 0;
  color: var(--fg-2);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}
.q-mob-nav-sub a:last-child { border-bottom: 0; }
.q-mob-nav-sub a:hover { color: var(--navy); }
.q-mob-nav-actions { display: flex; gap: 10px; padding-top: 16px; flex-wrap: wrap; }

.q-rg-hero    { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; }
.q-hero-right { display: flex; flex-direction: column; gap: 16px; align-items: flex-end; }
.q-rg-2       { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.q-rg-2-sm    { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.q-rg-3       { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.q-rg-logo    { display: grid; grid-template-columns: 160px 1fr; gap: 48px; }
.q-rg-sidebar { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; }
.q-rg-pub-year{ display: grid; grid-template-columns: 160px 1fr; gap: 48px; }
.q-rg-pub-item{ display: grid; grid-template-columns: 1fr 200px; gap: 32px; align-items: start; }
.q-svc-cols   { display: grid; grid-template-columns: 1.5fr 2fr 110px 30px; gap: 24px; }
.q-rg-footer  { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; }

@media (max-width: 768px) {
  /* Header */
  .q-header-inner { gap: 0; height: 64px; }
  .q-hamburger    { display: flex; }
  .q-desktop-nav  { display: none !important; }
  .q-desktop-act  { display: none !important; }

  /* Hero */
  .q-rg-hero    { grid-template-columns: 1fr; gap: 28px; }
  .q-hero-right { align-items: flex-start; }
  .q-hero-right p { text-align: left !important; }

  /* Content grids */
  .q-rg-2       { grid-template-columns: 1fr; gap: 28px; }
  .q-rg-2-sm    { grid-template-columns: 1fr; gap: 16px; }
  .q-rg-3       { grid-template-columns: 1fr; }
  .q-rg-logo    { grid-template-columns: 1fr; gap: 20px; }
  .q-rg-sidebar { grid-template-columns: 1fr; gap: 32px; }
  .q-rg-pub-year{ grid-template-columns: 1fr; gap: 12px; }
  .q-rg-pub-item{ grid-template-columns: 1fr; gap: 12px; }
  .q-svc-cols   { grid-template-columns: 1fr; gap: 8px; }
  .q-rg-footer  { grid-template-columns: 1fr 1fr; gap: 32px; }

  /* Table-header row hidden on mobile (useless without columns) */
  .q-svc-thead  { display: none; }

  /* Remove sticky from TOC and publication year on mobile */
  .q-toc-nav    { position: static !important; top: auto !important; }
  .q-pub-sticky { position: static !important; top: auto !important; }
}
