/* ==========================================================================
   Hashtag.net — stylesheet
   1.  Tokens & themes
   2.  Reset & base
   3.  Layout primitives
   4.  Atmosphere (blobs, grid, glass)
   5.  Header & navigation
   6.  Buttons & form controls
   7.  Hero
   8.  Generator tool
   9.  Cards, rails & sections
   10. Prose & articles
   11. Accordion, tables, callouts
   12. Footer
   13. Utilities, motion, print
   ========================================================================== */

/* ==========================================================================
   1. Tokens & themes
   ========================================================================== */
:root {
  /* Brand ramp */
  --ink: #0f172a;
  --carbon: #111827;
  --violet: #7c3aed;
  --orchid: #a855f7;
  --pink: #ec4899;
  --paper: #ffffff;

  /* Type */
  --font-display: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Scale — fluid, clamped so nothing breaks between breakpoints */
  --step--1: clamp(0.79rem, 0.77rem + 0.1vw, 0.84rem);
  --step-0: clamp(0.95rem, 0.92rem + 0.15vw, 1.03rem);
  --step-1: clamp(1.13rem, 1.06rem + 0.32vw, 1.32rem);
  --step-2: clamp(1.36rem, 1.24rem + 0.6vw, 1.72rem);
  --step-3: clamp(1.63rem, 1.42rem + 1.02vw, 2.24rem);
  --step-4: clamp(1.96rem, 1.6rem + 1.7vw, 2.92rem);
  --step-5: clamp(2.35rem, 1.76rem + 2.8vw, 3.9rem);

  /* Space */
  --sp-1: 0.35rem;
  --sp-2: 0.6rem;
  --sp-3: 0.9rem;
  --sp-4: 1.35rem;
  --sp-5: 2rem;
  --sp-6: 3rem;
  --sp-7: 4.5rem;
  --sp-8: 6.5rem;

  /* Shape */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  --wrap: 1180px;
  --wrap-narrow: 760px;

  --ease: cubic-bezier(0.22, 0.68, 0.32, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --speed: 0.32s;
}

/* Dark is the default identity of the product. */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-deep: #090e1c;
  --surface: rgba(17, 24, 39, 0.62);
  --surface-solid: #131b2e;
  --surface-raised: rgba(30, 38, 60, 0.72);
  --line: rgba(168, 85, 247, 0.18);
  --line-strong: rgba(168, 85, 247, 0.36);
  --text: #e8eaf6;
  --text-strong: #ffffff;
  --muted: #98a2c0;
  --accent: var(--orchid);
  --accent-ink: #ffffff;
  --glow: rgba(124, 58, 237, 0.42);
  --shadow-sm: 0 2px 10px rgba(3, 6, 18, 0.45);
  --shadow-md: 0 18px 42px -18px rgba(3, 6, 18, 0.9);
  --shadow-lg: 0 42px 90px -34px rgba(3, 6, 18, 0.95);
  --chip: rgba(168, 85, 247, 0.1);
  --blob-a: rgba(124, 58, 237, 0.55);
  --blob-b: rgba(236, 72, 153, 0.4);
  --blob-c: rgba(56, 189, 248, 0.22);
  --grid-line: rgba(148, 163, 214, 0.07);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f4ff;
  --bg-deep: #efeaff;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-solid: #ffffff;
  --surface-raised: rgba(255, 255, 255, 0.92);
  --line: rgba(124, 58, 237, 0.16);
  --line-strong: rgba(124, 58, 237, 0.32);
  --text: #1b1c33;
  --text-strong: #0d0e1f;
  --muted: #575d80;
  --accent: var(--violet);
  --accent-ink: #ffffff;
  --glow: rgba(124, 58, 237, 0.22);
  --shadow-sm: 0 2px 10px rgba(43, 27, 92, 0.08);
  --shadow-md: 0 18px 40px -20px rgba(43, 27, 92, 0.26);
  --shadow-lg: 0 40px 84px -36px rgba(43, 27, 92, 0.34);
  --chip: rgba(124, 58, 237, 0.08);
  --blob-a: rgba(168, 85, 247, 0.32);
  --blob-b: rgba(236, 72, 153, 0.24);
  --blob-c: rgba(56, 189, 248, 0.2);
  --grid-line: rgba(43, 27, 92, 0.05);
}

/* ==========================================================================
   2. Reset & base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

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

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.68;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  color: var(--text-strong);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { text-wrap: pretty; }

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 3px;
  transition: color 0.18s var(--ease);
}

a:hover { color: var(--pink); }

ul, ol { padding-left: 1.15rem; }

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--orchid);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--violet);
  color: #fff;
}

/* Scrollbar — subtle, matches the palette */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: var(--r-pill);
  border: 3px solid var(--bg);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 0.75rem 1.15rem;
  background: var(--violet);
  color: #fff;
  border-radius: 0 0 var(--r-md) 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

/* ==========================================================================
   3. Layout primitives
   ========================================================================== */
.wrap {
  width: min(100% - 2.4rem, var(--wrap));
  margin-inline: auto;
}

.wrap-narrow {
  width: min(100% - 2.4rem, var(--wrap-narrow));
  margin-inline: auto;
}

.section {
  padding-block: var(--sp-7);
  position: relative;
}

.section--tight { padding-block: var(--sp-6); }
.section--flush-top { padding-top: var(--sp-5); }

.section-head {
  max-width: 62ch;
  margin-bottom: var(--sp-5);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-3);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

.section-head--center .eyebrow::before { display: none; }

.lede {
  color: var(--muted);
  font-size: var(--step-1);
  margin-top: var(--sp-3);
}

.grid {
  display: grid;
  gap: var(--sp-4);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

/* ==========================================================================
   4. Atmosphere
   ========================================================================== */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 78% -8%, color-mix(in srgb, var(--violet) 16%, transparent), transparent 62%),
    radial-gradient(900px 520px at 4% 12%, color-mix(in srgb, var(--pink) 10%, transparent), transparent 58%),
    var(--bg);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000 30%, transparent 78%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(78px);
  opacity: 0.7;
  will-change: transform;
}

.blob--a {
  width: 46vw;
  height: 46vw;
  max-width: 620px;
  max-height: 620px;
  top: -14vw;
  right: -8vw;
  background: var(--blob-a);
  animation: drift-a 26s var(--ease) infinite alternate;
}

.blob--b {
  width: 38vw;
  height: 38vw;
  max-width: 500px;
  max-height: 500px;
  top: 34vh;
  left: -12vw;
  background: var(--blob-b);
  animation: drift-b 32s var(--ease) infinite alternate;
}

.blob--c {
  width: 30vw;
  height: 30vw;
  max-width: 420px;
  max-height: 420px;
  bottom: -10vh;
  right: 18vw;
  background: var(--blob-c);
  animation: drift-c 38s var(--ease) infinite alternate;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-6vw, 7vh, 0) scale(1.14); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.06); }
  to   { transform: translate3d(7vw, -6vh, 0) scale(0.92); }
}
@keyframes drift-c {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-8vw, -5vh, 0); }
}

/* Glass surface used across cards, header and panels */
.glass {
  background: var(--surface);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}

/* Gradient hairline border, used on the hero panel and feature cards */
.gradient-edge {
  position: relative;
  isolation: isolate;
}

.gradient-edge::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--violet), var(--pink) 45%, transparent 72%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.75;
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   5. Header & navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  padding-block: 0.7rem;
  transition: background var(--speed) var(--ease), box-shadow var(--speed) var(--ease), padding var(--speed) var(--ease);
}

.site-header.is-stuck {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 1px 0 var(--line), var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.04em;
  color: var(--text-strong);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover { color: var(--text-strong); }

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--violet), var(--pink));
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 6px 18px -6px var(--glow);
  transition: transform var(--speed) var(--ease-out);
}

.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }

.brand-dot { color: var(--orchid); }

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav a {
  position: relative;
  padding: 0.5rem 0.72rem;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 0.905rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text-strong);
  background: var(--chip);
}

.nav a.is-active { color: var(--text-strong); }

.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0.72rem;
  right: 0.72rem;
  bottom: 0.24rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--violet), var(--pink));
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.icon-btn:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--chip);
}

.icon-btn svg { width: 18px; height: 18px; }

.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-toggle { display: none; }

/* Mobile drawer */
@media (max-width: 1040px) {
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(84vw, 340px);
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 5.5rem 1.35rem 2rem;
    background: var(--surface-solid);
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transform: translateX(102%);
    transition: transform 0.36s var(--ease-out);
    overflow-y: auto;
    z-index: 70;
  }
  .nav.is-open { transform: translateX(0); }
  .nav a {
    padding: 0.78rem 0.9rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .nav a.is-active::after { display: none; }
  .nav a.is-active { color: var(--accent); }
  .nav-toggle { display: grid; }
  .nav-scrim {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 18, 0.6);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0.3s;
    z-index: 65;
  }
  .nav-scrim.is-open { opacity: 1; visibility: visible; }
}

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: start center;
  padding-top: 14vh;
  background: rgba(4, 7, 18, 0.66);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s var(--ease), visibility 0.24s;
}

.search-overlay.is-open { opacity: 1; visibility: visible; }

.search-panel {
  width: min(92vw, 620px);
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(-14px) scale(0.98);
  transition: transform 0.28s var(--ease-out);
}

.search-overlay.is-open .search-panel { transform: none; }

.search-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}

.search-field input {
  flex: 1;
  border: 0;
  background: none;
  font-size: 1.05rem;
  outline: none;
}

.search-hint {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.15rem 0.4rem;
}

.search-results {
  max-height: 52vh;
  overflow-y: auto;
  padding: 0.5rem;
}

.search-results a {
  display: block;
  padding: 0.62rem 0.8rem;
  border-radius: var(--r-sm);
  color: var(--text);
  text-decoration: none;
}

.search-results a:hover,
.search-results a.is-cursor {
  background: var(--chip);
  color: var(--text-strong);
}

.search-results .res-kind {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  display: block;
}

.search-empty {
  padding: 1.4rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   6. Buttons & form controls
   ========================================================================== */
.btn {
  --btn-bg: linear-gradient(135deg, var(--violet), var(--pink));
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.82rem 1.5rem;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 12px 28px -12px var(--glow);
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease), filter 0.22s var(--ease);
}

.btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -14px var(--glow);
  filter: saturate(1.14);
}

.btn:active { transform: translateY(0) scale(0.985); }

.btn svg { width: 17px; height: 17px; }

.btn--ghost {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text-strong);
  box-shadow: none;
}

.btn--ghost:hover {
  color: var(--text-strong);
  background: var(--chip);
  box-shadow: var(--shadow-sm);
}

.btn--sm {
  padding: 0.52rem 0.95rem;
  font-size: 0.84rem;
}

.btn--block { width: 100%; }

.btn[disabled] {
  opacity: 0.55;
  pointer-events: none;
}

/* Ripple layer injected by JS */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255, 255, 255, 0.42);
  pointer-events: none;
  animation: ripple 0.62s var(--ease-out) forwards;
  z-index: -1;
}

@keyframes ripple {
  to { transform: scale(2.6); opacity: 0; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.field label,
.field-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.input,
.select,
textarea.input {
  width: 100%;
  padding: 0.82rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--text-strong);
  font-size: 0.98rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.input::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }

.input:focus,
.select:focus,
textarea.input:focus {
  outline: none;
  border-color: var(--orchid);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--orchid) 18%, transparent);
}

.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a855f7' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  background-size: 15px;
  cursor: pointer;
}

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--violet), var(--pink));
  cursor: pointer;
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--violet);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.16s var(--ease-out);
}

.range::-webkit-slider-thumb:hover { transform: scale(1.16); }

.range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--violet);
}

/* ==========================================================================
   7. Hero
   ========================================================================== */
.hero {
  padding-block: clamp(2.6rem, 6vw, 5rem) var(--sp-6);
  position: relative;
}

.hero-grid {
  display: grid;
  gap: var(--sp-5);
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem 0.4rem 0.45rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--chip);
  font-size: 0.8rem;
  color: var(--text);
  margin-bottom: var(--sp-4);
}

.badge b {
  padding: 0.16rem 0.55rem;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--violet), var(--pink));
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 { margin-bottom: var(--sp-4); }

.grad-text {
  background: linear-gradient(105deg, var(--orchid) 8%, var(--pink) 55%, var(--violet) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: var(--step-1);
  color: var(--muted);
  max-width: 56ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: var(--sp-5);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}

.stat-num {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-strong);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* ==========================================================================
   8. Generator tool
   ========================================================================== */
.tool {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2.1rem);
  border-radius: var(--r-xl);
  scroll-margin-top: 100px;
}

.tool-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.tool-title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 700;
}

.tool-status {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.tool-form {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  align-items: end;
}

.tool-form .field--wide { grid-column: 1 / -1; }

@media (min-width: 900px) {
  .tool-form .field--wide { grid-column: span 2; }
}

.count-value {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 700;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}

.tool-actions .spacer { margin-left: auto; }

/* Quick-fill suggestion chips */
.seed-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: var(--sp-3);
}

.seed-chip {
  padding: 0.32rem 0.72rem;
  border-radius: var(--r-pill);
  border: 1px dashed var(--line-strong);
  background: none;
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.seed-chip:hover {
  color: var(--text-strong);
  border-style: solid;
  background: var(--chip);
  transform: translateY(-1px);
}

/* Results */
.results {
  margin-top: var(--sp-5);
  display: grid;
  gap: var(--sp-4);
}

.results[hidden] { display: none; }

.result-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3) var(--sp-5);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--chip);
}

.summary-item .k {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.summary-item .v {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-strong);
}

.group {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  animation: rise 0.5s var(--ease-out) backwards;
}

.group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--line);
}

.group-head h3 {
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.group-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.12rem 0.5rem;
  border-radius: var(--r-pill);
  background: var(--chip);
  color: var(--accent);
  border: 1px solid var(--line);
}

.group-blurb {
  flex-basis: 100%;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.group-copy {
  margin-left: auto;
  border: 1px solid var(--line);
  background: none;
  color: var(--muted);
  font-size: 0.76rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.group-copy:hover {
  color: var(--text-strong);
  border-color: var(--line-strong);
  background: var(--chip);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.05rem 1.15rem;
  list-style: none;
  margin: 0;
}

.tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.55rem 0.42rem 0.75rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--text-strong);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  cursor: pointer;
  transition: transform 0.18s var(--ease-out), border-color 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.tag:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 10px 22px -14px var(--glow);
}

.tag.is-copied {
  border-color: #34d399;
  background: color-mix(in srgb, #34d399 14%, transparent);
}

.tag-score {
  font-size: 0.66rem;
  padding: 0.1rem 0.42rem;
  border-radius: var(--r-pill);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tag[data-tier="easy"] .tag-score        { background: rgba(52, 211, 153, 0.18); color: #34d399; }
.tag[data-tier="moderate"] .tag-score    { background: rgba(96, 165, 250, 0.18); color: #7dd3fc; }
.tag[data-tier="competitive"] .tag-score { background: rgba(251, 191, 36, 0.2);  color: #fbbf24; }
.tag[data-tier="saturated"] .tag-score   { background: rgba(244, 114, 182, 0.2); color: #f472b6; }

[data-theme="light"] .tag[data-tier="moderate"] .tag-score    { color: #0284c7; }
[data-theme="light"] .tag[data-tier="easy"] .tag-score        { color: #047857; }
[data-theme="light"] .tag[data-tier="competitive"] .tag-score { color: #b45309; }
[data-theme="light"] .tag[data-tier="saturated"] .tag-score   { color: #be185d; }

/* Best mix panel */
.mix {
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  border: 1px solid var(--line-strong);
  background: linear-gradient(150deg, color-mix(in srgb, var(--violet) 14%, transparent), color-mix(in srgb, var(--pink) 8%, transparent));
}

.mix-tags {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.9;
  word-break: break-word;
  color: var(--text-strong);
  margin: var(--sp-3) 0;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  display: inline-block;
}

.legend .l-easy        { background: #34d399; }
.legend .l-moderate    { background: #7dd3fc; }
.legend .l-competitive { background: #fbbf24; }
.legend .l-saturated   { background: #f472b6; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 130%);
  z-index: 120;
  padding: 0.7rem 1.2rem;
  border-radius: var(--r-pill);
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.4s var(--ease-out);
}

.toast.is-visible { transform: translate(-50%, 0); }
.toast svg { width: 16px; height: 16px; color: #34d399; }

.tool-note {
  margin-top: var(--sp-3);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Skeleton shown while generating */
.skeleton {
  display: grid;
  gap: 0.55rem;
  padding: var(--sp-4);
}

.skeleton i {
  height: 30px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--chip) 25%, var(--surface-raised) 50%, var(--chip) 75%);
  background-size: 240% 100%;
  animation: shimmer 1.15s linear infinite;
}

.skeleton i:nth-child(2) { width: 82%; }
.skeleton i:nth-child(3) { width: 64%; }

@keyframes shimmer {
  to { background-position: -240% 0; }
}

/* ==========================================================================
   9. Cards, rails & sections
   ========================================================================== */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

a.card:hover,
.card--hover:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--orchid) 12%, transparent), transparent 62%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}

a.card:hover::after,
.card--hover:hover::after { opacity: 1; }

.card h3 { font-size: var(--step-1); }

.card p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

.card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--chip);
  border: 1px solid var(--line);
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.card-icon svg { width: 21px; height: 21px; }

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: auto;
  padding-top: 0.4rem;
}

.card-meta .dot { opacity: 0.5; }

/* Step cards use a numeral because the process genuinely is ordered */
.step-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  background: linear-gradient(160deg, var(--orchid), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.9;
}

/* Platform tiles */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
}

.platform-tile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.05rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s var(--ease-out), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.platform-tile:hover {
  transform: translateY(-3px);
  color: var(--text-strong);
  border-color: var(--line-strong);
  background: var(--chip);
}

.platform-tile svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--accent); }

.platform-tile b { display: block; font-family: var(--font-display); font-size: 0.94rem; }
.platform-tile small { color: var(--muted); font-size: 0.75rem; }

/* Trending / chip rails */
.chip-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  text-decoration: none;
  transition: all 0.2s var(--ease);
}

.chip:hover {
  color: var(--text-strong);
  border-color: var(--line-strong);
  background: var(--chip);
  transform: translateY(-2px);
}

.chip .rank {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
}

.chip .delta { font-size: 0.72rem; color: #34d399; }
.chip .delta.down { color: #f472b6; }

/* Two-column feature split */
.split {
  display: grid;
  gap: var(--sp-5);
  align-items: center;
}

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-left { grid-template-columns: 1.15fr 0.85fr; }
}

.tick-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.tick-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 0.75rem;
  align-items: start;
}

.tick-list svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  margin-top: 3px;
}

.tick-list b { color: var(--text-strong); display: block; font-family: var(--font-display); }
.tick-list span { color: var(--muted); font-size: 0.92rem; }

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: var(--sp-6);
}

.pagination a,
.pagination span {
  min-width: 42px;
  padding: 0.5rem 0.8rem;
  text-align: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s var(--ease);
}

.pagination a:hover { color: var(--text-strong); border-color: var(--line-strong); background: var(--chip); }
.pagination .is-current { background: linear-gradient(135deg, var(--violet), var(--pink)); color: #fff; border-color: transparent; }

/* CTA band */
.cta-band {
  position: relative;
  padding: clamp(2.2rem, 5vw, 3.6rem);
  border-radius: var(--r-xl);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(620px 320px at 88% 12%, color-mix(in srgb, var(--pink) 22%, transparent), transparent 66%),
    linear-gradient(140deg, color-mix(in srgb, var(--violet) 22%, transparent), color-mix(in srgb, var(--carbon) 60%, transparent));
  text-align: center;
  overflow: hidden;
}

.cta-band h2 { margin-bottom: var(--sp-3); }
.cta-band p { color: var(--muted); max-width: 54ch; margin-inline: auto; }
.cta-band .hero-cta { justify-content: center; }

/* Breadcrumbs */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: var(--sp-4);
}

.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { opacity: 0.45; }

/* ==========================================================================
   10. Prose & articles
   ========================================================================== */
.prose {
  font-size: 1.045rem;
  line-height: 1.78;
  color: var(--text);
}

.prose > * + * { margin-top: 1.15rem; }

.prose h2 {
  font-size: var(--step-2);
  margin-top: 2.4rem;
  scroll-margin-top: 100px;
}

.prose h3 {
  font-size: var(--step-1);
  margin-top: 1.9rem;
}

.prose ul,
.prose ol { padding-left: 1.35rem; }
.prose li + li { margin-top: 0.45rem; }
.prose li::marker { color: var(--accent); }

.prose strong { color: var(--text-strong); }

.prose blockquote {
  margin-inline: 0;
  padding: 1rem 1.35rem;
  border-left: 3px solid var(--orchid);
  background: var(--chip);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--text-strong);
  font-size: 1.02rem;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.14em 0.4em;
  border-radius: 6px;
  background: var(--chip);
  border: 1px solid var(--line);
  color: var(--accent);
}

.article-head { padding-block: var(--sp-5) var(--sp-4); }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: var(--sp-3);
}

.tag-pill {
  padding: 0.2rem 0.65rem;
  border-radius: var(--r-pill);
  background: var(--chip);
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 0.72rem;
  text-decoration: none;
}

/* Article thumbnail — a generated gradient plate, not a stock photo */
.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-md);
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--c1, #7c3aed), var(--c2, #ec4899));
}

.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.6;
}

.thumb span {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.94);
  letter-spacing: -0.03em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}

.thumb--wide { aspect-ratio: 21 / 8; }

.toc {
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--chip);
}

.toc h2 {
  font-size: 0.8rem !important;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 0.7rem !important;
}

.toc ol { margin: 0; padding-left: 1.1rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ==========================================================================
   11. Accordion, tables, callouts
   ========================================================================== */
.faq-list { display: grid; gap: 0.65rem; }

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.faq-item[open] { border-color: var(--line-strong); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-strong);
  font-size: 1rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.3s var(--ease-out);
}

.faq-item[open] summary::after { transform: rotate(-135deg) translateY(-2px); }

.faq-item .answer {
  padding: 0 1.2rem 1.15rem;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.7;
}

.faq-item .answer p + p { margin-top: 0.8rem; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

thead th {
  font-family: var(--font-display);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--chip);
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--chip); }

.callout {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 0.85rem;
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--chip);
  font-size: 0.94rem;
}

.callout svg { width: 22px; height: 22px; color: var(--accent); }
.callout b { color: var(--text-strong); }

/* Contact form status */
.form-status {
  padding: 0.85rem 1.1rem;
  border-radius: var(--r-md);
  font-size: 0.92rem;
  margin-bottom: var(--sp-4);
}

.form-status--ok {
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
}

.form-status--err {
  border: 1px solid rgba(244, 114, 182, 0.42);
  background: rgba(244, 114, 182, 0.12);
  color: #f472b6;
}

[data-theme="light"] .form-status--ok { color: #047857; }
[data-theme="light"] .form-status--err { color: #be185d; }

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0;
  height: 0;
}

/* ==========================================================================
   12. Footer
   ========================================================================== */
.site-footer {
  margin-top: var(--sp-7);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--carbon) 35%, transparent));
}

.footer-grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.footer-brand { grid-column: span 2; max-width: 34ch; }

@media (max-width: 620px) {
  .footer-brand { grid-column: span 1; }
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: var(--sp-3);
}

.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-strong);
  margin-bottom: var(--sp-3);
}

.footer-col ul { list-style: none; padding: 0; display: grid; gap: 0.55rem; }

.footer-col a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.18s var(--ease), padding-left 0.18s var(--ease);
}

.footer-col a:hover {
  color: var(--accent);
  padding-left: 3px;
}

.socials { display: flex; gap: 0.5rem; margin-top: var(--sp-4); }

.socials a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: all 0.22s var(--ease);
}

.socials a:hover {
  color: var(--accent);
  border-color: var(--line-strong);
  background: var(--chip);
  transform: translateY(-2px);
}

.socials svg { width: 17px; height: 17px; }

.footer-bottom {
  margin-top: var(--sp-5);
  padding-block: var(--sp-4);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--muted);
}

.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--accent); }

/* Back to top */
.to-top {
  position: fixed;
  right: 1.35rem;
  bottom: 1.35rem;
  z-index: 55;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface-solid);
  color: var(--accent);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s var(--ease-out);
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-3px); }
.to-top svg { width: 19px; height: 19px; }

/* ==========================================================================
   13. Utilities, motion, print
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-in { opacity: 1; transform: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--muted); }
.no-scroll { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .blob { animation: none; }
}

@media (forced-colors: active) {
  .btn, .tag, .card { border: 1px solid currentColor; }
  .grad-text { color: CanvasText; -webkit-text-fill-color: CanvasText; }
}

@media print {
  .site-header, .site-footer, .atmosphere, .to-top, .tool-actions, .search-overlay { display: none !important; }
  body { background: #fff; color: #000; }
  .glass, .card, .group { border: 1px solid #ddd; box-shadow: none; background: #fff; }
}

/* =========================================================================
   14. Article body, reading progress and inline code
   ========================================================================= */

.article-body { padding-bottom: var(--sp-5); }
.article-body > :first-child { margin-top: 0; }

#read-progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  z-index: 90;
  block-size: 3px;
  inline-size: 0;
  background: linear-gradient(90deg, var(--violet), var(--orchid), var(--pink));
  box-shadow: 0 0 12px rgba(168, 85, 247, .55);
  transition: inline-size .08s linear;
  pointer-events: none;
}

kbd {
  display: inline-block;
  padding: .12em .45em;
  border: 1px solid var(--line-strong);
  border-block-end-width: 2px;
  border-radius: 6px;
  background: var(--chip);
  font-family: var(--font-mono);
  font-size: .82em;
  color: var(--text-strong);
}

code {
  padding: .12em .38em;
  border-radius: 6px;
  background: var(--chip);
  font-family: var(--font-mono);
  font-size: .88em;
  color: var(--text-strong);
}

.prose pre code { padding: 0; background: none; }

@media (prefers-reduced-motion: reduce) {
  #read-progress { transition: none; }
}
