/* ==========================================================================
   AI Detection Study — Design System
   Research-grade developer tool meets editorial science magazine.
   ========================================================================== */

/* ---------- Fonts ---------- */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT,WONK@9..144,300..900,0..100,0..1&family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap");

/* ---------- Tokens ---------- */
:root {
  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Space scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;

  /* Motion */
  --ease-spring: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  /* Accents (mode-independent) */
  --accent: #5aaf88;
  --accent-ink: #ffffff;
  --real: #f5a524;
  --fake: #e26bff;
  --danger: #e8333a;

  /* Layout */
  --max-w: 1200px;
  --nav-h: 64px;
}

/* Dark (default) */
:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0b;
  --bg-rgb: 10, 10, 11;
  --surface: #111114;
  --surface-elevated: #17171c;
  --surface-hover: #1c1c22;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.16);
  --text: #ededf0;
  --text-muted: #8a8a94;
  --text-faint: #5a5a64;
  --grid-dot: rgba(255, 255, 255, 0.045);
  --accent: #5aaf88;
  --accent-glow: rgba(90, 175, 136, 0.22);
  --real: #f5a524;
  --fake: #e26bff;
  --shadow-low: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-mid: 0 4px 24px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 0 1px rgba(62, 232, 180, 0.3), 0 12px 40px rgba(62, 232, 180, 0.12);
}

/* Light */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #faf9f5;
  --bg-rgb: 250, 249, 245;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-hover: #f4f3ee;
  --hairline: rgba(10, 10, 20, 0.1);
  --hairline-strong: rgba(10, 10, 20, 0.2);
  --text: #0f0f12;
  --text-muted: #5a5a64;
  --text-faint: #8a8a94;
  --grid-dot: rgba(10, 10, 20, 0.06);
  --accent: #3d8f6e;
  --accent-glow: rgba(90, 175, 136, 0.18);
  --real: #c77400;
  --fake: #a838c8;
  --shadow-low: 0 1px 2px rgba(20, 20, 30, 0.06);
  --shadow-mid: 0 4px 24px rgba(20, 20, 30, 0.08), 0 1px 2px rgba(20, 20, 30, 0.04);
  --shadow-glow: 0 0 0 1px rgba(21, 168, 120, 0.35), 0 12px 40px rgba(21, 168, 120, 0.12);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}
img,
svg,
video {
  max-width: 100%;
  display: block;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

/* ---------- Background grid ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(
    circle at 1px 1px,
    var(--grid-dot) 1px,
    transparent 0
  );
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
}

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.02;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
}
.display-wonk {
  font-variation-settings: "opsz" 144, "SOFT" 20, "WONK" 1;
}
.mono {
  font-family: var(--font-mono);
  font-feature-settings: "ss01", "ss02", "cv11";
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
h1.hero {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(48px, 8vw, 112px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
}
h2.section {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1;
  letter-spacing: -0.03em;
}
h3.card {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 62ch;
}
.body-copy {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  max-width: 62ch;
}
.body-copy + .body-copy {
  margin-top: var(--s-4);
}
em.accent-text {
  font-style: italic;
  color: var(--accent);
}

/* ---------- Layout ---------- */
.shell {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s-5);
  position: relative;
  z-index: 1;
}
@media (min-width: 768px) {
  .shell {
    padding: 0 var(--s-6);
  }
}
main {
  padding-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
}
section {
  padding: var(--s-9) 0;
}
section.tight {
  padding: var(--s-7) 0;
}

/* ---------- Nav ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--hairline);
}
.site-nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}
.site-nav__brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}
.site-nav__brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  position: relative;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 40%, var(--bg)));
  box-shadow: 0 0 0 1px var(--hairline), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}
.site-nav__brand-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 3px;
  background: var(--bg);
  clip-path: polygon(0 0, 60% 0, 100% 40%, 100% 100%, 40% 100%, 0 60%);
}
.site-nav__brand-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2.2s var(--ease-smooth) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}
.site-nav__links {
  display: none;
  gap: var(--s-2);
  align-items: center;
}
@media (min-width: 860px) {
  .site-nav__links {
    display: flex;
  }
}
.site-nav__link {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  transition: color 180ms var(--ease-smooth), background 180ms var(--ease-smooth);
  position: relative;
}
.site-nav__link:hover {
  color: var(--text);
  background: var(--surface-hover);
}
.site-nav__link[aria-current="page"] {
  color: var(--text);
}
.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 1.5px;
  background: var(--accent);
  border-radius: 2px;
}
.site-nav__actions {
  display: flex;
  gap: var(--s-2);
  align-items: center;
}
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 180ms var(--ease-smooth), background 180ms var(--ease-smooth), border-color 180ms var(--ease-smooth);
}
.theme-toggle:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--hairline-strong);
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
}
html[data-theme="dark"] .theme-toggle__sun { display: block; }
html[data-theme="dark"] .theme-toggle__moon { display: none; }
html[data-theme="light"] .theme-toggle__sun { display: none; }
html[data-theme="light"] .theme-toggle__moon { display: block; }

.site-nav__mobile {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--hairline);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 860px) {
  .site-nav__mobile {
    display: none;
  }
}
.site-nav__mobile svg {
  width: 16px;
  height: 16px;
}

.site-nav__drawer {
  display: none;
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
  padding: var(--s-4) var(--s-5);
  flex-direction: column;
  gap: var(--s-1);
}
.site-nav__drawer.open {
  display: flex;
}
.site-nav__drawer a {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
  padding: 10px 12px;
  border-radius: var(--r-sm);
}
.site-nav__drawer a:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.site-nav__drawer a[aria-current="page"] {
  color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  padding: 14px 20px;
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  transition: transform 220ms var(--ease-spring),
    box-shadow 220ms var(--ease-smooth),
    background 220ms var(--ease-smooth),
    color 220ms var(--ease-smooth);
  will-change: transform;
  border: 1px solid transparent;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow), 0 0 0 1px var(--accent);
}
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 8px 24px var(--accent-glow);
}
.btn--primary:hover {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 12px 32px var(--accent-glow);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--hairline-strong);
}
.btn--ghost:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
}
.btn--inline {
  padding: 10px 14px;
  font-size: 12px;
}
.btn .arrow {
  width: 14px;
  height: 14px;
  transition: transform 220ms var(--ease-spring);
}
.btn:hover .arrow {
  transform: translateX(3px);
}

/* ---------- Surfaces / Cards ---------- */
.surface {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
}
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  transition: border-color 200ms var(--ease-smooth),
    background 200ms var(--ease-smooth),
    transform 280ms var(--ease-spring),
    box-shadow 280ms var(--ease-smooth);
  position: relative;
  overflow: hidden;
}
.card--link:hover {
  border-color: var(--hairline-strong);
  background: var(--surface-elevated);
  transform: translateY(-2px);
  box-shadow: var(--shadow-mid);
}
.card--link:hover .card__arrow {
  transform: translate(3px, -3px);
  color: var(--accent);
}
.card__eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-4);
}
.card__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.card__arrow {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 280ms var(--ease-spring), color 200ms var(--ease-smooth);
}
.card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-3);
}
.card__desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* ---------- Pill / Tag ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}
.pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.pill--real { color: var(--real); }
.pill--real .pill__dot { background: var(--real); box-shadow: 0 0 8px var(--real); }
.pill--fake { color: var(--fake); }
.pill--fake .pill__dot { background: var(--fake); box-shadow: 0 0 8px var(--fake); }

/* ---------- Stat ---------- */
.stat {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.stat__num {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(40px, 5vw, 72px);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  font-variation-settings: "opsz" 144;
}
.stat__num--accent { color: var(--accent); }
.stat__unit {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
  margin-left: 4px;
}
.stat__label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: var(--s-7) 0 var(--s-6);
  margin-top: 0;
  position: relative;
  z-index: 1;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 760px) {
  .site-footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}
.site-footer__brand {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}
.site-footer__sub {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: var(--s-2);
  max-width: 42ch;
  line-height: 1.55;
}
.site-footer__col-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--s-3);
}
.site-footer__link {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0;
  transition: color 180ms var(--ease-smooth);
}
.site-footer__link:hover {
  color: var(--accent);
}
.site-footer__meta {
  margin-top: var(--s-7);
  padding-top: var(--s-4);
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
}

/* ---------- Reveal (load stagger) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 700ms var(--ease-smooth), transform 700ms var(--ease-spring);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- Utility ---------- */
.hr {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: var(--s-7) 0;
}
.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.text-accent { color: var(--accent); }
.text-real { color: var(--real); }
.text-fake { color: var(--fake); }

/* Scrollbar (dark) */
html[data-theme="dark"] ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
html[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--bg);
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--surface-elevated);
  border-radius: 10px;
  border: 2px solid var(--bg);
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: var(--surface-hover);
}

/* Selection */
::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==========================================================================
   Header Variant C — Split-type wordmark + live stat ticker
   ========================================================================== */

html[data-header="c"] .site-nav {
  height: auto;
  min-height: 96px;
  padding: 14px 0 0;
  transition: min-height 280ms var(--ease-spring), padding 280ms var(--ease-smooth);
}
html[data-header="c"] .site-nav__inner {
  align-items: flex-start;
  gap: var(--s-5);
}
html[data-header="c"] .hnav-brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 3.2vw, 40px);
  letter-spacing: -0.03em;
  line-height: 0.9;
  font-variation-settings: "opsz" 144;
  transition: font-size 280ms var(--ease-spring);
  white-space: nowrap;
}
html[data-header="c"] .hnav-brand__word--real { color: var(--real); }
html[data-header="c"] .hnav-brand__word--fake { color: var(--fake); }
html[data-header="c"] .hnav-brand__plus {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.6em;
  transform: translateY(-0.12em);
}
html[data-header="c"] .hnav-c__right {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding-top: 10px;
  margin-left: auto;
}

/* Ticker row */
html[data-header="c"] .hnav-ticker {
  position: relative;
  height: 22px;
  margin-top: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
  transition: height 280ms var(--ease-spring), margin 280ms var(--ease-smooth),
              padding 280ms var(--ease-smooth), border-color 280ms var(--ease-smooth);
}
html[data-header="c"] .hnav-ticker__track {
  position: relative;
  height: 100%;
}
html[data-header="c"] .hnav-ticker__item {
  position: absolute;
  inset: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 380ms var(--ease-smooth), transform 380ms var(--ease-spring);
}
html[data-header="c"] .hnav-ticker__item.is-active {
  opacity: 1;
  transform: none;
}

/* Collapsed state */
html[data-header="c"] .site-nav[data-collapsed="true"] {
  min-height: 56px;
  padding-top: 6px;
}
html[data-header="c"] .site-nav[data-collapsed="true"] .hnav-brand {
  font-size: 18px;
}
html[data-header="c"] .site-nav[data-collapsed="true"] .hnav-brand__plus { font-size: 0.7em; }
html[data-header="c"] .site-nav[data-collapsed="true"] .hnav-ticker {
  height: 0;
  margin-top: 0;
  padding-bottom: 0;
  border-bottom-color: transparent;
}
html[data-header="c"] .site-nav[data-collapsed="true"] .hnav-c__right { padding-top: 0; }

@media (max-width: 720px) {
  html[data-header="c"] .hnav-brand { font-size: 26px; }
  html[data-header="c"] .hnav-ticker { display: none; }
}

/* ==========================================================================
   Header Variant D — Floating glass pill
   ========================================================================== */

html[data-header="d"] {
  --pill-offset: 18px;
  --pill-h: 52px;
}

html[data-header="d"] .site-nav--d {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: auto;
  min-height: calc(var(--pill-h) + var(--pill-offset) * 2);
  background: transparent;
  backdrop-filter: none;
  border: none;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: var(--pill-offset) var(--s-5);
  z-index: 50;
}

html[data-header="d"] .hnav-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  height: var(--pill-h);
  padding: 0 10px 0 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid var(--hairline);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, #fff 4%, transparent),
    0 10px 40px rgba(0, 0, 0, 0.35),
    0 2px 6px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transform: translateY(0);
  transition: transform 320ms var(--ease-spring), box-shadow 320ms var(--ease-smooth);
  max-width: calc(100% - var(--s-5) * 2);
}

html[data-header="d"][data-theme="light"] .hnav-pill {
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, #000 4%, transparent),
    0 8px 30px rgba(15, 15, 18, 0.08),
    0 2px 6px rgba(15, 15, 18, 0.05);
}

html[data-header="d"] .hnav-pill[data-floated="true"] {
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, #fff 5%, transparent),
    0 18px 60px rgba(0, 0, 0, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.25);
}

html[data-header="d"] .hnav-pill__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1;
  padding-right: 14px;
  margin-right: 4px;
  border-right: 1px solid var(--hairline);
  font-variation-settings: "opsz" 144;
}
html[data-header="d"] .hnav-pill__brand-word--real { color: var(--real); }
html[data-header="d"] .hnav-pill__brand-word--fake { color: var(--fake); }
html[data-header="d"] .hnav-pill__brand-slash {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.7em;
  transform: translateY(-1px);
}

html[data-header="d"] .hnav-pill__links {
  display: flex !important;
  gap: 2px;
}
html[data-header="d"] .hnav-pill__links .site-nav__link {
  padding: 7px 11px;
  font-size: 12.5px;
}
html[data-header="d"] .hnav-pill__actions {
  margin-left: 4px;
}

html[data-header="d"] main {
  padding-top: calc(var(--pill-h) + var(--pill-offset) * 2 + 8px);
}

@media (max-width: 860px) {
  html[data-header="d"] .hnav-pill {
    width: 100%;
    border-radius: var(--r-lg);
    padding: 0 12px;
  }
  html[data-header="d"] .hnav-pill__links { display: none !important; }
  html[data-header="d"] .hnav-pill__brand {
    border-right: none;
    padding-right: 0;
    margin-right: auto;
  }
}
