/*
    modern.css
    Author: Naeem 
    URL: https://modern-css.com
*/

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter.woff2') format('woff2')
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono.woff2') format('woff2')
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

:root {
  color-scheme: dark;
  --bg: light-dark(#f8f8fa, #0b0b0f);
  --surface: light-dark(#ffffff, #14141a);
  --surface-2: light-dark(#f0f0f4, #1a1a22);
  --border: light-dark(#d8d8e0, #25252f);
  --border-light: light-dark(#e4e4ea, #2f2f3a);
  --text: light-dark(#1a1a2e, #e4e4e7);
  --text-muted: light-dark(#6b6b80, #6b6b76);
  --accent: light-dark(#7c3aed, #a78bfa);
  --accent-dim: light-dark(#6d28d9, #7c3aed);
  --green: light-dark(#059669, #34d399);
  --blue: light-dark(#2563eb, #60a5fa);
  --pink: light-dark(#db2777, #f472b6);
  --orange: light-dark(#ea580c, #fb923c);
  --yellow: light-dark(#ca8a04, #fbbf24);
  --cyan: light-dark(#0891b2, #22d3ee);
  --red-muted: light-dark(#dc2626, #ef4444);
  --old-bg: light-dark(#fef2f2, #11100f);
  --modern-bg: light-dark(#eff6ff, #0f1117);
  --nav-bg: light-dark(rgba(248, 248, 250, .85), rgba(11, 11, 15, .8));
  --radius: 16px;
  --radius-sm: 10px;
}

:root.light {
  color-scheme: light
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border)
}

.nav-inner {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.carbon-css {
  padding: 20px;
  border-bottom: 1px solid var(--border) !important;
  min-height: 179px !important;
}

.carbon-css .section {
  padding: 0 !important;
}

#carbon-responsive {
  margin: 0 auto !important;
}

#carbon-responsive .carbon-poweredby {
  color: var(--text-muted) !important;
}

.carbon-css #carbonads {
  margin-block: 0 !important;
}

#carbon-responsive .carbon-responsive-wrap {
  padding: 7px 14px !important;
  background: var(--surface) !important;
  border-radius: 0 !important;
  color: var(--text-muted) !important;
  font-size: .8rem !;
  border: 0 !important
}

a.carbon-text {
  color: var(--text-muted) !important;
}

.logo {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.03em;
  color: var(--text);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace
}

.logo span {
  color: var(--accent)
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  transition: color .2s
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text)
}

.cmd-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: .8rem;
  cursor: pointer;
  transition: border-color .2s
}

.cmd-bar:hover {
  border-color: var(--accent-dim)
}

.cmd-bar kbd {
  font-family: 'Inter', sans-serif;
  font-size: .68rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
  color: var(--text-muted)
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color .2s, color .2s
}

.theme-toggle:hover {
  border-color: var(--accent-dim);
  color: var(--text)
}

.theme-toggle svg {
  width: 18px;
  height: 18px
}

.theme-toggle .icon-moon {
  display: block
}

.theme-toggle .icon-sun {
  display: none
}

.light .theme-toggle .icon-moon {
  display: none
}

.light .theme-toggle .icon-sun {
  display: block
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .84rem;
  font-weight: 500;
  transition: color .2s
}

.back-link:hover {
  color: var(--text)
}

.nav-count {
  font-size: .78rem;
  color: var(--text-muted)
}

.nav-arrows {
  display: flex;
  gap: 4px
}

.nav-arrows a {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .82rem;
  transition: all .2s
}

.nav-arrows a:hover {
  border-color: var(--accent-dim);
  color: var(--text)
}

.hero {
  text-align: center;
  padding: 48px 0;
  margin: 0 auto
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(167, 139, 250, .08);
  border: 1px solid rgba(167, 139, 250, .18);
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 24px
}

.hero-badge .pulse {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .3
  }
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.1;
  margin-bottom: 20px
}

.hero h1 .gradient {
  background: linear-gradient(135deg, var(--accent), var(--pink), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text
}

.hero p {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.75
}

.hero-compare {
  display: flex;
  gap: 0;
  margin: 48px auto 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: border-color .2s
}

.hero-compare:hover {
  border-color: var(--accent-dim)
}

.hero-compare-side {
  flex: 1;
  padding: 20px 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .76rem;
  line-height: 1.8;
  text-align: left
}

.hero-compare-side.old {
  background: var(--old-bg);
  border-right: 1px solid var(--border)
}

.hero-compare-side.modern {
  background: var(--modern-bg)
}

.compare-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Inter', sans-serif;
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
  padding: 3px 10px;
  border-radius: 6px
}

.hero-compare-side .compare-label {
  display: block;
  text-align: left;
  width: fit-content;
  margin: 0 0 12px
}

.compare-label.old {
  background: rgba(239, 68, 68, .1);
  color: var(--red-muted)
}

.compare-label.modern {
  background: rgba(52, 211, 153, .1);
  color: var(--green)
}

.kw {
  color: var(--pink)
}

.prop {
  color: var(--blue)
}

.val {
  color: var(--green)
}

.sel {
  color: var(--accent)
}

.fn {
  color: var(--orange)
}

.cmt {
  color: var(--text-muted);
  opacity: .6;
  font-style: italic
}


.comparison-list {
  padding-top: 24px;
}


.section {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 24px 72px
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.02em
}

.section-badge {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(52, 211, 153, .1);
  color: var(--green);
  border: 1px solid rgba(52, 211, 153, .2)
}

.view-all {
  font-size: .82rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity .2s
}

.view-all:hover {
  opacity: .7
}

.filter-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  align-items: center
}

.filter-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px
}

.filter-pill {
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s
}

.filter-pill:hover {
  border-color: var(--accent-dim);
  color: var(--text)
}

.filter-pill.active {
  background: var(--accent-dim);
  color: #fff;
  border-color: var(--accent-dim)
}

.tip-card.filter-hidden {
  display: none
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px
}

.tip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: border-color .3s, transform .3s, box-shadow .3s;
  cursor: pointer;
  overflow: hidden
}

.tip-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .4)
}

.tip-card-body {
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px
}

.tip-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.tip-badges {
  display: flex;
  gap: 6px
}

.badge {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em
}

.badge.layout {
  background: rgba(96, 165, 250, .12);
  color: var(--blue)
}

.badge.animation {
  background: rgba(244, 114, 182, .12);
  color: var(--pink)
}

.badge.color {
  background: rgba(251, 146, 60, .12);
  color: var(--orange)
}

.badge.selector {
  background: rgba(167, 139, 250, .12);
  color: var(--accent)
}

.badge.typo {
  background: rgba(52, 211, 153, .12);
  color: var(--green)
}

.badge.workflow {
  background: rgba(34, 211, 238, .12);
  color: var(--cyan)
}

.badge.tutorial {
  background: rgba(96, 165, 250, .12);
  color: var(--blue)
}

.badge.beginner {
  background: rgba(52, 211, 153, .1);
  color: var(--green)
}

.badge.intermediate {
  background: rgba(251, 191, 36, .1);
  color: var(--yellow)
}

.badge.advanced {
  background: rgba(244, 114, 182, .1);
  color: var(--pink)
}

.difficulty {
  font-size: .68rem;
  color: var(--text-muted);
  font-weight: 500
}

.tip-card h3 {
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -.02em;
  line-height: 1.35
}

.card-code {
  border-top: 1px solid var(--border);
  margin-top: auto;
  position: relative;
  min-height: 110px;
  overflow: hidden
}

.card-code-layer {
  padding: 16px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  line-height: 1.75;
  transition: opacity .35s ease, transform .35s ease
}

.card-code .old-layer {
  background: var(--old-bg);
  position: relative;
  z-index: 2
}

.card-code .modern-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--modern-bg);
  padding: 16px 18px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease
}

.tip-card:hover .card-code .old-layer {
  opacity: 0;
  transform: translateY(-6px)
}

.tip-card:hover .card-code .modern-layer {
  opacity: 1;
  transform: translateY(0)
}

.tip-card.toggled .card-code .old-layer {
  opacity: 0;
  transform: translateY(-6px)
}

.tip-card.toggled .card-code .modern-layer {
  opacity: 1;
  transform: translateY(0)
}

.tip-card.toggled .hover-hint {
  opacity: 0
}

.tip-card.toggled .arrow-link {
  background: var(--accent-dim);
  color: #fff;
  border-color: var(--accent-dim)
}

.card-code .mini-label {
  font-family: 'Inter', sans-serif;
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px
}

.modern-layer .mini-label {
  color: var(--green)
}

.modern-layer .mini-label::before {
  content: '✓';
  font-size: .7rem
}

.old-layer .mini-label {
  color: var(--red-muted)
}

.old-layer .mini-label::before {
  content: '✕';
  font-size: .7rem
}

.old-layer .code-text {
  opacity: .7
}

.hover-hint {
  position: absolute;
  bottom: 10px;
  right: 14px;
  z-index: 3;
  font-family: 'Inter', sans-serif;
  font-size: .58rem;
  font-weight: 500;
  color: var(--text-muted);
  opacity: .4;
  transition: opacity .3s;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none
}

.tip-card:hover .hover-hint {
  opacity: 0
}

.tip-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 22px
}

.browser-support {
  font-size: .72rem;
  color: var(--green);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px
}

.browser-support .dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%
}

.arrow-link {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: .8rem;
  transition: all .2s
}

.tip-card:hover .arrow-link {
  background: var(--accent-dim);
  color: #fff;
  border-color: var(--accent-dim)
}

.stats-bar {
  margin: 0 auto;
  padding: 48px 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap
}

.stat-card {
  flex: 1;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px 20px;
  text-align: center
}

.stat-card .stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -.03em
}

.stat-card .stat-num.purple {
  color: var(--accent)
}

.stat-card .stat-num.green {
  color: var(--green)
}

.stat-card .stat-num.blue {
  color: var(--blue)
}

.stat-card .stat-num.pink {
  color: var(--pink)
}

.stat-card .stat-label {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 4px
}

body[data-page="single"] .newsletter,
body[data-page="article"] .newsletter {
  max-width: 900px
}

.newsletter-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
  margin-bottom: 72px;
}

.newsletter-box h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 8px
}

.newsletter-box p {
  color: var(--text-muted);
  font-size: .92rem;
  margin-bottom: 24px
}

.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto
}

.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: .88rem;
  outline: none;
  transition: border-color .2s
}

.newsletter-form input:focus {
  border-color: var(--accent-dim)
}

.newsletter-form input::placeholder {
  color: var(--text-muted)
}

.newsletter-form button {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent-dim);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap
}

.newsletter-form button:hover {
  background: var(--accent)
}

.article {
  /* max-width: 900px; */
  /* margin: 0 auto; */
  padding: 48px 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  flex-wrap: wrap
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s
}

.breadcrumb a:hover {
  color: var(--accent)
}

.breadcrumb .sep {
  opacity: .35
}

.tip-header {
  margin-bottom: 44px
}

.tip-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap
}

.tip-header .badge {
  padding: 5px 12px;
  font-size: .7rem
}

.tip-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.15;
  margin-bottom: 14px
}

.tip-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: .78rem;
  color: var(--text-muted);
  flex-wrap: wrap
}

.byline-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border)
}

.byline-name {
  font-weight: 600;
  color: var(--text)
}

.byline-socials {
  display: flex;
  gap: 4px
}

.byline-sep {
  opacity: .4
}

.tip-header code,
.explanation code,
.why-card code,
.article-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: .82em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  color: var(--accent)
}

/* ── Tailwind equivalent ── */
.tw-section {
  margin-bottom: 48px
}

.tw-panel {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, .2)
}

.tw-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(56, 189, 248, .12);
  background: rgba(56, 189, 248, .04)
}

.tw-panel-left {
  display: flex;
  align-items: center;
  gap: 8px
}

.tw-logo {
  width: 18px;
  height: 11px;
  flex-shrink: 0
}

.tw-panel-title {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #38bdf8
}

.tw-panel-note {
  font-size: .7rem;
  color: var(--text-muted);
  opacity: .65;
  padding-left: 8px;
  border-left: 1px solid var(--border)
}

.tw-code {
  background: var(--modern-bg);
  padding: 8px 0
}

.tw-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 7px 20px;
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  transition: background .15s;
  color: inherit
}

.tw-line:hover {
  background: rgba(56, 189, 248, .05)
}

.tw-cls {
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem;
  color: #38bdf8;
  flex: 1;
  text-align: left
}

.tw-hint {
  font-family: 'Inter', sans-serif;
  font-size: .62rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity .15s;
  flex-shrink: 0
}

.tw-line:hover .tw-hint {
  opacity: .45
}

.tw-copied-txt {
  font-family: 'Inter', sans-serif;
  font-size: .62rem;
  color: var(--green);
  font-weight: 600;
  flex-shrink: 0;
  display: none
}

.tw-line.copied .tw-cls {
  color: var(--green)
}

.tw-line.copied .tw-hint {
  display: none
}

.tw-line.copied .tw-copied-txt {
  display: inline
}

.compare-section {
  margin-bottom: 48px
}

.section-label {
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 14px
}

.compare-container {
  display: flex;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border)
}

.compare-panel {
  flex: 1;
  display: flex;
  flex-direction: column
}

.compare-panel.old-panel {
  background: var(--old-bg);
  border-right: 1px solid var(--border)
}

.compare-panel.modern-panel {
  background: var(--modern-bg)
}

.old-panel .compare-code {
  opacity: .6
}

.compare-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border)
}

.compare-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 12px;
  border-radius: 6px
}

.compare-tag.old {
  background: rgba(239, 68, 68, .1);
  color: var(--red-muted)
}

.compare-tag.modern {
  background: rgba(52, 211, 153, .1);
  color: var(--green)
}

.compare-tag .x {
  font-size: .85rem
}

.line-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  color: var(--text-muted);
  opacity: .5
}

.compare-code {
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem;
  line-height: 1.9;
  flex: 1
}

.compare-code .line-num {
  display: inline-block;
  width: 24px;
  text-align: right;
  margin-right: 18px;
  color: var(--text-muted);
  opacity: .4;
  user-select: none
}

.hl {
  background: rgba(167, 139, 250, .06);
  display: inline-block;
  width: calc(100% + 40px);
  margin-left: -20px;
  padding-left: 20px;
  border-left: 2px solid var(--accent)
}

.hl-red {
  background: rgba(239, 68, 68, .05);
  display: inline-block;
  width: calc(100% + 40px);
  margin-left: -20px;
  padding-left: 20px;
  border-left: 2px solid rgba(239, 68, 68, .3)
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: .7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s
}

.copy-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text)
}

.copy-btn.copied {
  border-color: var(--green);
  color: var(--green)
}

.demo-section {
  margin-bottom: 48px
}

.demo-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden
}

.demo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg)
}

.demo-dots {
  display: flex;
  gap: 7px
}

.demo-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%
}

.demo-dots span:nth-child(1) {
  background: #f87171
}

.demo-dots span:nth-child(2) {
  background: #fbbf24
}

.demo-dots span:nth-child(3) {
  background: #34d399
}

.demo-viewport {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px
}

.why-section {
  margin-bottom: 48px
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px
}

.why-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px 20px
}

.why-card .why-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: .95rem;
  margin-bottom: 12px
}

.why-card h3 {
  font-size: .9rem;
  font-weight: 650;
  margin-bottom: 6px;
  letter-spacing: -.01em
}

.why-card p {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.6
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 48px
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  min-width: 0
}

.info-card .info-label {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: 8px
}

.info-card .info-value {
  font-size: 1.05rem;
  font-weight: 700
}

.info-card .info-value.green {
  color: var(--green)
}

.info-card .info-value.blue {
  color: var(--blue)
}

.info-card .info-value.accent {
  color: var(--accent)
}

.info-card .info-value.red {
  color: var(--red-muted)
}

.info-card .info-value.yellow {
  color: var(--yellow)
}

.info-card .info-sub {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 4px
}

.bs-section {
  margin-bottom: 48px
}

.bs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px
}

.bs-feature-name {
  font-size: .92rem;
  font-weight: 650;
  letter-spacing: -.01em;
  margin-bottom: 14px
}

.bs-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.bs-left {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bs-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bs-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px
}

.browser-icons {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap
}

.browser-icons span {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: .6rem;
  font-weight: 500;
  white-space: nowrap
}

.browser-icons span.yes {
  border-color: rgba(52, 211, 153, .3);
  color: var(--green)
}

.browser-icons span.partial {
  border-color: rgba(251, 191, 36, .3);
  color: var(--yellow)
}

.caniuse-link {
  display: inline-block;
  font-size: .68rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity .2s
}

.caniuse-link:hover {
  opacity: .7;
  text-decoration: underline
}

.mdn-link {
  display: inline-block;
  font-size: .68rem;
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
  transition: opacity .2s
}

.mdn-link:hover {
  opacity: .7;
  text-decoration: underline
}

.polyfill-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .68rem;
  font-weight: 600;
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(251, 191, 36, .1);
  color: var(--yellow);
  border: 1px solid rgba(251, 191, 36, .25);
  transition: opacity .2s
}

.polyfill-link:hover {
  opacity: .7
}

.baseline-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: 10px;
  border: 1px solid
}

.bl-icon {
  width: 36px;
  height: 20px;
  flex-shrink: 0
}

.baseline-badge.widely {
  background: rgba(30, 164, 70, .1);
  color: #1ea446;
  border-color: rgba(30, 164, 70, .3)
}

.baseline-badge.newly {
  background: rgba(65, 133, 255, .1);
  color: #4185ff;
  border-color: rgba(65, 133, 255, .3)
}

.baseline-badge.limited {
  background: rgba(240, 148, 9, .1);
  color: #f09418;
  border-color: rgba(240, 148, 9, .3)
}

.baseline-year {
  font-size: .68rem;
  color: var(--text-muted);
  margin-left: 6px
}

.baseline-usage {
  font-size: .68rem;
  color: var(--text-muted);
  margin-left: 6px
}

.bs-desc {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.bs-you {
  display: inline-block;
  font-size: .68rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
  line-height: 1.4;
}

.bs-you-green {
  background: rgba(52,211,153,.12);
  color: var(--green);
  border: 1px solid rgba(52,211,153,.25);
}

.bs-you-red {
  background: rgba(248,113,113,.1);
  color: var(--red, #f87171);
  border: 1px solid rgba(248,113,113,.2);
}

.bs-you-muted {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.bs-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: center;
  margin-top: auto;
}

.baseline-learn-link,
.webstatus-link {
  font-size: .68rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: opacity .2s
}

.baseline-learn-link:hover,
.webstatus-link:hover {
  opacity: .7;
  text-decoration: underline
}

.bi {
  position: relative;
  display: inline-block;
  text-align: center;
  margin: 0 10px 10px
}

.bi::before {
  content: " ";
  display: block;
  background-size: contain;
  background-position: 50%;
  background-repeat: no-repeat;
  margin: 0 auto
}

.bi.sm::before {
  width: 24px;
  height: 24px
}

.bi.chrome::before {
  background-image: url("../browser-icons/chrome.svg")
}

.bi.edge::before {
  background-image: url("../browser-icons/edge.svg")
}

.bi.firefox::before {
  background-image: url("../browser-icons/firefox.svg")
}

.bi.safari::before {
  background-image: url("../browser-icons/safari.svg")
}

.bl-browsers {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap
}

.bl-browser {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative
}

.bl-browser[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: .62rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s
}

.bl-browser[data-tooltip]:hover::after {
  opacity: 1
}

[data-tooltip] {
  position: relative
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  z-index: 999
}

.bl-browser-ver {
  font-size: .58rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  margin-left: auto
}

.share-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text)
}

.share-btn.shared {
  border-color: var(--green);
  color: var(--green)
}

.cat-link-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: border-color .25s, transform .25s
}

.cat-link-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px)
}

.cat-link-count {
  font-size: .75rem;
  color: var(--text-muted)
}

.explanation {
  margin-bottom: 48px
}

.explanation h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 16px
}

.explanation p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 14px;
  font-size: .95rem
}

.related {
  margin-bottom: 0;
  margin-top: 48px
}

.related h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 18px
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px
}

.related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .25s, transform .25s
}

.related-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px)
}

.related-card .r-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 10px
}

.related-card h3 {
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.01em
}

.related-card .r-preview {
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  color: var(--text-muted);
  opacity: .6
}

.related-card .r-preview .r-old {
  text-decoration: line-through
}

.related-card .r-preview .arr {
  margin: 0 4px;
  opacity: .4
}

.related-card .r-preview .nw {
  color: var(--accent);
  text-decoration: none
}

/* ── What's New — anchor offset for sticky nav ── */
.wn-detail-card[id],
.timeline-content[id] {
  scroll-margin-top: 80px
}

/* ── What's New — detailed feature cards ── */
.wn-detailed-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 48px
}

.wn-detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s
}

.wn-detail-card:hover {
  border-color: var(--border-light)
}

.wn-dc-header {
  padding: 24px 24px 16px
}

.wn-dc-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap
}

.wn-dc-title-row h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0
}

.wn-dc-desc {
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.65;
  margin: 0
}

.wn-dc-code {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border)
}

.wn-dc-code-header {
  padding: 8px 24px;
  background: var(--bg);
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted)
}

.wn-dc-code pre {
  margin: 0;
  padding: 16px 24px;
  background: var(--modern-bg);
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem;
  line-height: 1.8;
  overflow-x: auto
}

.wn-dc-code pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: var(--text)
}

.wn-dc-usecase {
  display: flex;
  gap: 14px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(167, 139, 250, .03)
}

.wn-dc-usecase-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px
}

.wn-dc-usecase-label {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: 4px
}

.wn-dc-usecase p {
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0
}

.wn-dc-info-table {
  padding: 0 24px
}

.wn-dc-info-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: .82rem
}

.wn-dc-info-row:last-child {
  border-bottom: none
}

.wn-dc-info-key {
  width: 80px;
  flex-shrink: 0;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted)
}

.wn-dc-info-val {
  color: var(--text);
  font-weight: 500
}

.wn-dc-info-val .timeline-browsers {
  display: inline-flex
}

.wn-dc-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg)
}

.wn-dc-draft-link {
  font-size: .8rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: opacity .2s
}

.wn-dc-draft-link:hover {
  opacity: .7;
  text-decoration: underline
}

.wn-dc-snippet-link {
  font-size: .8rem;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 14px;
  border: 1px solid rgba(52, 211, 153, .25);
  border-radius: 100px;
  background: rgba(52, 211, 153, .06);
  transition: all .2s
}

.wn-dc-snippet-link:hover {
  background: rgba(52, 211, 153, .12);
  border-color: rgba(52, 211, 153, .4)
}

.wn-rs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px
}

.wn-rs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .25s, transform .25s
}

.wn-rs-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px)
}

.wn-rs-card .badge {
  width: fit-content
}

.wn-rs-title {
  font-size: .9rem;
  font-weight: 650;
  letter-spacing: -.01em;
  line-height: 1.35
}

.wn-rs-from {
  font-size: .72rem;
  color: var(--text-muted)
}

@media(max-width: 700px) {
  .wn-dc-header {
    padding: 18px 18px 12px
  }

  .wn-dc-code pre {
    padding: 14px 18px
  }

  .wn-dc-usecase {
    padding: 14px 18px
  }

  .wn-dc-info-table {
    padding: 0 18px
  }

  .wn-dc-footer {
    padding: 12px 18px
  }

  .wn-dc-info-key {
    width: 70px
  }
}

/* ── Article body (guides/tutorials) ── */
.article-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 40px 0 16px;
  padding-top: 8px;
  border-top: 1px solid var(--border)
}

.article-body h2:first-child {
  margin-top: 0;
  border-top: none;
  padding-top: 0
}

.article-body p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 14px;
  font-size: .95rem
}

.article-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 18px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem;
  line-height: 1.8
}

.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: var(--text)
}

/* ── Article demos ── */
.article-demo {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0 32px;
  background: var(--surface)
}

.article-demo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg)
}

.article-demo-viewport {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  min-height: 120px
}

/* ── Resources page ── */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 48px
}

.resource-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .25s, transform .25s;
  display: block
}

.resource-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px)
}

.resource-card .rc-name {
  font-size: .92rem;
  font-weight: 600;
  margin-bottom: 4px
}

.resource-card .rc-desc {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.5
}

.resource-card .rc-url {
  font-size: .7rem;
  color: var(--accent);
  margin-top: 8px;
  display: block;
  opacity: .6
}

/* ── What's New timeline ── */
.timeline {
  margin-bottom: 48px
}

.timeline-item {
  display: flex;
  gap: 20px;
  position: relative;
  margin-bottom: 24px
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  position: absolute;
  left: -6px;
  top: 20px
}

.timeline-content {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px
}

.timeline-content h3 {
  font-size: .95rem;
  font-weight: 650;
  margin-bottom: 6px
}

.timeline-content p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 8px
}

.timeline-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap
}

.timeline-meta .badge {
  font-size: .6rem
}

.timeline-browsers {
  display: flex;
  gap: 4px;
  flex-wrap: wrap
}

.timeline-browsers span {
  font-size: .58rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border)
}

.timeline-browsers span.yes {
  border-color: rgba(52, 211, 153, .3);
  color: var(--green)
}

.timeline-browsers span.partial {
  border-color: rgba(251, 191, 36, .3);
  color: var(--yellow)
}

.timeline-link {
  font-size: .78rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500
}

.timeline-link:hover {
  text-decoration: underline
}

/* ── Article cards (listing) ── */
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color .3s, transform .3s, box-shadow .3s
}

.article-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .4)
}

.article-card .ac-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap
}

.article-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 8px;
  line-height: 1.3
}

.article-card .ac-desc {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px
}

.article-card .ac-footer {
  display: flex;
  justify-content: space-between;
  align-items: center
}

.article-card .ac-read {
  font-size: .78rem;
  color: var(--accent);
  font-weight: 500
}

.article-card .ac-time {
  font-size: .72rem;
  color: var(--text-muted)
}

footer {
  text-align: center;
  padding: 48px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .82rem
}

footer a {
  color: var(--accent);
  text-decoration: none
}

footer a:hover {
  text-decoration: underline
}

.footer-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px
}

.footer-socials a {
  color: var(--text-muted);
  transition: color .2s
}

.footer-socials a:hover {
  color: var(--accent)
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: min(12vh, 120px) 24px 24px
}

.search-overlay.open {
  display: flex
}

.search-modal {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
  animation: searchIn .15s ease
}

@keyframes searchIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(.98)
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1)
  }
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border)
}

.search-input-wrap svg {
  flex-shrink: 0;
  color: var(--text-muted)
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  caret-color: var(--accent)
}

.search-input::placeholder {
  color: var(--text-muted)
}

.search-esc {
  font-size: .68rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  white-space: nowrap
}

.search-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px
}

.search-results:empty::after {
  content: 'No results found.';
  display: block;
  text-align: center;
  color: var(--text-muted);
  font-size: .88rem;
  padding: 32px 0
}

.search-result {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: background .15s
}

.search-result:hover,
.search-result.active {
  background: var(--bg)
}

.search-result-info {
  flex: 1;
  min-width: 0
}

.search-result-title {
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.search-result-desc {
  font-size: .75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px
}

.search-result .badge {
  flex-shrink: 0
}

.search-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 16px;
  align-items: center
}

.search-footer span {
  font-size: .68rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px
}

.search-footer kbd {
  font-size: .62rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 5px;
  color: var(--text-muted)
}

.not-found {
  text-align: center;
  padding: 120px 24px;
  max-width: 500px;
  margin: 0 auto
}

.not-found h1 {
  font-size: 4rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 16px
}

.not-found p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 24px
}

.not-found a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600
}

.not-found a:hover {
  text-decoration: underline
}

/* ── Offcanvas menu ── */
.menu-toggle {
  display: none
}

.offcanvas-backdrop {
  display: none
}

.offcanvas {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100%;
  z-index: 1001;
  background: var(--bg);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: right .3s ease;
  overflow-y: auto
}

.offcanvas.open {
  right: 0
}

.offcanvas-backdrop.open {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px)
}

.offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border)
}

.offcanvas-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: all .2s
}

.offcanvas-close:hover {
  border-color: var(--accent-dim);
  color: var(--text)
}

.offcanvas-nav {
  display: flex;
  flex-direction: column;
  padding: 12px 0
}

.offcanvas-nav a {
  padding: 14px 24px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  transition: all .2s;
  border-left: 3px solid transparent
}

.offcanvas-nav a:hover {
  color: var(--text);
  background: var(--surface);
  border-left-color: var(--accent-dim)
}

.offcanvas-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 20px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: .85rem;
  cursor: pointer;
  transition: border-color .2s;
  margin-top: 24px;
}

.offcanvas-search:hover {
  border-color: var(--accent-dim)
}

.theme-toggle-mobile {
  display: none
}

@media(max-width: 841px) {
  .nav-inner {
    padding-right: 117px;
  }

  .tips-grid {
    grid-template-columns: 1fr
  }

  .hero-compare {
    flex-direction: column
  }

  .hero-compare-side.old {
    border-right: none;
    border-bottom: 1px solid var(--border)
  }

  .hero {
    padding: 60px 20px 24px
  }

  .newsletter-form {
    flex-direction: column
  }

  .stats-bar {
    flex-direction: column
  }

  .compare-container {
    flex-direction: column
  }

  .compare-panel.old-panel {
    border-right: none;
    border-bottom: 1px solid var(--border)
  }

  .info-grid {
    grid-template-columns: 1fr 1fr
  }

  .related-grid {
    grid-template-columns: 1fr
  }

  .article {
    padding: 32px 18px 60px
  }

  .why-grid {
    grid-template-columns: 1fr
  }

  .nav-count {
    display: none
  }

  .resources-grid {
    grid-template-columns: 1fr
  }

  .nav-links a, .back-link, .cmd-bar {
    display: none;
  }

  .nav-mobile-controls {
    position: fixed;
    right: 16px;
    top: 13px;
    z-index: 101;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 12px;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
  }

  .menu-toggle:hover {
    border-color: var(--accent-dim);
    color: var(--text)
  }


  .theme-toggle-mobile .icon-moon {
    display: block
  }

  .theme-toggle-mobile .icon-sun {
    display: none
  }

  .light .theme-toggle-mobile .icon-moon {
    display: none
  }

  .light .theme-toggle-mobile .icon-sun {
    display: block
  }
}

@media(max-width: 600px) {
  .bs-row {
    flex-direction: column;
    gap: 16px;
  }

  .bs-right {
    align-items: flex-start;
  }
  .bs-left {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 1px solid #25252f;
    padding-bottom: 20px;
}
}

@media(max-width: 480px) {
  .info-grid {
    grid-template-columns: 1fr
  }
}

.compare-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px
}

/* ── Layout modifiers ── */
.tip-header--sm {
  margin-bottom: 32px
}

.page-section {
  margin-top: 48px
}

.res-section {
  margin-bottom: 48px
}

/* ── Badge variants ── */
.section-badge--accent {
  background: rgba(167, 139, 250, .1);
  color: var(--accent);
  border-color: rgba(167, 139, 250, .2)
}

.badge--playground {
  background: rgba(167, 139, 250, .1);
  color: var(--accent)
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted)
}

/* ── Playground card desc & CTA ── */
.tip-card-desc {
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0
}

.tip-card-cta {
  font-size: .72rem;
  color: var(--accent);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px
}

.tip-card-cta-icon {
  font-size: 1rem
}

/* ── Article read time ── */
.article-readtime {
  font-size: .78rem;
  color: var(--text-muted)
}

/* ── Category page ── */
.cat-other-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 18px
}

.cat-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

/* ── Playground CTA (single page) ── */
.playground-cta {
  background: linear-gradient(135deg, rgba(167, 139, 250, .06), rgba(52, 211, 153, .06));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap
}

.playground-cta-title {
  font-size: .95rem;
  font-weight: 650;
  margin-bottom: 4px
}

.playground-cta-desc {
  font-size: .82rem;
  color: var(--text-muted)
}

.playground-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: #fff;
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
  white-space: nowrap
}

.playground-cta-btn:hover {
  background: var(--accent)
}

/* ── What's New one-offs ── */
.wn-year-link {
  font-size: .75rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500
}

.wn-year-link:hover {
  text-decoration: underline
}

.timeline-meta-date {
  font-size: .72rem;
  color: var(--text-muted)
}

.wn-related-snippets {
  margin-top: 48px
}

.wn-related-snippets .wn-rs-desc {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 18px
}

/* ── Stats page (st-*) ── */
.st-section {
  margin-bottom: 48px
}

.st-grid {
  display: grid;
  gap: 16px
}

.st-grid--overview {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr))
}

.st-grid--baseline {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr))
}

.st-grid--maturity {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px
}

.st-grid--browsers {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr))
}

.st-grid--halves {
  grid-template-columns: 1fr 1fr;
  gap: 32px
}

.st-grid--thirds {
  grid-template-columns: repeat(3, 1fr)
}

.st-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px
}

.st-card--center {
  text-align: center
}

.st-card--sm {
  padding: 16px
}

.st-card--lg {
  padding: 24px
}

.st-card-label {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-bottom: 8px
}

.st-card-num {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text)
}

.st-card-num--md {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px
}

.st-card-num--sm {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px
}

.st-card-sub {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: 4px
}

.st-card-hint {
  font-size: .68rem;
  color: var(--text-muted);
  margin-top: 2px
}

.st-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 20px
}

.st-desc {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6
}

.st-desc a {
  color: var(--accent)
}

.st-num--green {
  color: var(--green)
}

.st-num--yellow {
  color: var(--yellow)
}

.st-num--red {
  color: var(--red-muted)
}

.st-num--muted {
  color: var(--text-muted)
}

.st-snippet-list {
  display: grid;
  gap: 0
}

.st-snippet-row {
  font-size: .78rem;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  transition: color .15s
}

.st-snippet-row:last-child {
  border-bottom: none
}

.st-snippet-row:hover {
  color: var(--text)
}

.st-snippet-support {
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
  margin-left: 8px
}

.st-snippet-more {
  font-size: .72rem;
  color: var(--text-muted);
  padding: 6px 0;
  font-style: italic
}

.st-feature-grid {
  display: grid;
  gap: 12px
}

.st-feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: border-color .2s
}

.st-feature-card:hover {
  border-color: var(--accent-dim)
}

.st-feature-info {
  flex: 1;
  min-width: 0
}

.st-feature-title {
  font-size: .88rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px
}

.st-feature-cat {
  font-size: .72rem;
  color: var(--text-muted)
}

.st-feature-support {
  font-size: 1rem;
  font-weight: 700;
  min-width: 60px;
  text-align: right;
  flex-shrink: 0
}

.st-feature-support--high {
  color: var(--green)
}

.st-feature-support--mid {
  color: var(--yellow)
}

.st-browser-name {
  font-size: .82rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px
}

.st-browser-count {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px
}

.st-browser-pct {
  font-size: .72rem;
  color: var(--text-muted);
  margin-bottom: 12px
}

.st-progress {
  background: var(--border);
  height: 4px;
  border-radius: 2px;
  overflow: hidden
}

.st-progress-fill {
  background: var(--accent-dim);
  height: 100%;
  border-radius: 2px
}

.st-table {
  width: 100%;
  border-collapse: collapse
}

.st-table th,
.st-table td {
  padding: 12px 0
}

.st-table thead tr {
  border-bottom: 2px solid var(--border)
}

.st-table tbody tr {
  border-bottom: 1px solid var(--border)
}

.st-table tbody tr:last-child {
  border-bottom: none
}

.st-table th {
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: left
}

.st-table th:not(:first-child),
.st-table td:not(:first-child) {
  text-align: center
}

.st-table td {
  font-size: .88rem;
  color: var(--text)
}

.st-td-muted {
  color: var(--text-muted)
}

.st-cat-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500
}

.st-cat-link:hover {
  text-decoration: underline
}

.st-diff-num {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 4px
}

.st-diff-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px
}

.st-diff-pct {
  font-size: .72rem;
  color: var(--text-muted)
}

@media(max-width: 700px) {
  .st-grid--halves {
    grid-template-columns: 1fr
  }

  .st-grid--thirds {
    grid-template-columns: 1fr 1fr
  }
}

/* ── Changelog page ── */
.cl-timeline {
  display: flex;
  flex-direction: column;
  gap: 40px
}

.cl-day {
  position: relative
}

.cl-date {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-dim)
}

.cl-entries {
  display: flex;
  flex-direction: column;
  gap: 10px
}

.cl-entry {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: .88rem;
  line-height: 1.6
}

.cl-badge {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0
}

.cl-green {
  background: rgba(52, 211, 153, .1);
  color: var(--green);
  border: 1px solid rgba(52, 211, 153, .2)
}

.cl-blue {
  background: rgba(96, 165, 250, .1);
  color: var(--blue);
  border: 1px solid rgba(96, 165, 250, .2)
}

.cl-red {
  background: rgba(248, 113, 113, .1);
  color: var(--red-muted);
  border: 1px solid rgba(248, 113, 113, .2)
}

.cl-purple {
  background: rgba(167, 139, 250, .1);
  color: var(--accent);
  border: 1px solid rgba(167, 139, 250, .2)
}

.cl-text {
  color: var(--text-muted)
}

@media(max-width: 700px) {
  .cl-entry {
    flex-direction: column;
    gap: 4px
  }
}

/* ── What's New Archive page ── */
.wn-year-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap
}

.wn-year-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s
}

.wn-year-tab:hover {
  border-color: var(--accent-dim);
  color: var(--text)
}

.wn-year-tab.active {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
  color: #fff
}

.wn-year-count {
  font-size: .68rem;
  background: rgba(255, 255, 255, .15);
  padding: 2px 7px;
  border-radius: 100px
}

.wn-year-tab:not(.active) .wn-year-count {
  background: var(--bg)
}

.wn-year-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 48px
}

.wn-year-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .3s, transform .3s, box-shadow .3s;
  display: flex;
  flex-direction: column;
  gap: 8px
}

.wn-year-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35)
}

.wn-yc-year {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--accent)
}

.wn-yc-count {
  font-size: .78rem;
  font-weight: 600;
  color: var(--green)
}

.wn-yc-desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1
}

.wn-yc-link {
  font-size: .78rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 4px
}

.wn-year-section {
  margin-bottom: 48px
}

.wn-year-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--accent-dim);
  flex-wrap: wrap
}

.wn-year-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin: 0
}

.wn-feature-count {
  font-size: .7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(52, 211, 153, .1);
  color: var(--green);
  border: 1px solid rgba(52, 211, 153, .2)
}

.wn-timeline-link {
  font-size: .78rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  margin-left: auto
}

.wn-timeline-link:hover {
  text-decoration: underline
}

.wn-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px
}

.wn-feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .3s, transform .3s, box-shadow .3s
}

.wn-feature-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .4)
}

.wn-fc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px
}

.wn-fc-shipped {
  font-size: .68rem;
  color: var(--text-muted);
  font-weight: 500
}

.wn-fc-name {
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -.02em;
  line-height: 1.35;
  margin: 0
}

.wn-fc-desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1
}

.wn-fc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 6px
}

.wn-fr-browsers {
  display: flex;
  gap: 3px;
  flex-wrap: wrap
}

.wn-fr-browsers span {
  font-size: .56rem;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  white-space: nowrap
}

.wn-fr-browsers span.yes {
  border-color: rgba(52, 211, 153, .3);
  color: var(--green)
}

.wn-fr-browsers span.partial {
  border-color: rgba(251, 191, 36, .3);
  color: var(--yellow)
}

.wn-fc-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: .8rem;
  transition: all .2s;
  flex-shrink: 0
}

.wn-feature-card:hover .wn-fc-arrow {
  background: var(--accent-dim);
  color: #fff;
  border-color: var(--accent-dim)
}

.wn-year-section.wn-hidden {
  display: none
}

.wn-year-card.wn-hidden {
  display: none
}

@media(max-width: 800px) {
  .wn-feature-grid {
    grid-template-columns: 1fr
  }

  .wn-year-cards {
    grid-template-columns: 1fr
  }
}

/* ── Under the Hood page ── */
.uth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px
}

.uth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px
}

.uth-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap
}

.uth-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  background: rgba(167, 139, 250, .08);
  border: 1px solid rgba(167, 139, 250, .18);
  color: var(--accent);
  border-radius: 6px;
  padding: 3px 10px
}

.uth-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--green);
  background: rgba(52, 211, 153, .08);
  border: 1px solid rgba(52, 211, 153, .2);
  border-radius: 100px;
  padding: 3px 10px;
  white-space: nowrap;
  flex-shrink: 0
}

.uth-title {
  font-size: .95rem;
  font-weight: 650;
  letter-spacing: -.01em;
  line-height: 1.35
}

.uth-desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1
}

.uth-desc code {
  font-family: 'JetBrains Mono', monospace;
  font-size: .8em;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--accent)
}

.uth-snippet-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  margin-top: auto;
  padding-top: 8px
}

.uth-snippet-link:hover {
  text-decoration: underline
}

.uth-demo {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px
}

.uth-gradient-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--accent), var(--pink), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text
}

.uth-clamp-demo {
  font-size: clamp(1rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--accent)
}

.uth-pulse {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  color: var(--text-muted)
}

.uth-pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite
}


.uth-rows {
  display: flex;
  flex-direction: column;
  gap: 36px;
  margin-bottom: 36px;
}

.uth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden
}

.uth-row-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 1px solid var(--border)
}

.uth-row-code {
  background: var(--modern-bg)
}

.uth-editor-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--border)
}

.uth-editor-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%
}

.uth-editor-dot:nth-child(1) { background: #f87171 }
.uth-editor-dot:nth-child(2) { background: #fbbf24 }
.uth-editor-dot:nth-child(3) { background: #34d399 }

.uth-editor-file {
  font-family: 'JetBrains Mono', monospace;
  font-size: .65rem;
  color: var(--text-muted);
  margin-left: 6px
}

.uth-editor-body {
  padding: 18px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem;
  line-height: 1.9
}

@media(max-width: 700px) {
  .uth-row {
    grid-template-columns: 1fr
  }

  .uth-row-info {
    order: -1;
    border-left: none
  }

  .uth-editor-bar {
    border-bottom: none;
    border-top: 1px solid var(--border)
  }
}

/* ── Leaving page ── */
.leaving-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: 24px
}

.leaving-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px 40px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden
}

.leaving-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--pink), var(--blue))
}

.leaving-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(167, 139, 250, .1);
  display: grid;
  place-items: center;
  margin: 0 auto 20px
}

.leaving-icon svg {
  color: var(--accent)
}

.leaving-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 8px
}

.leaving-desc {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px
}

.leaving-desc strong {
  color: var(--accent)
}

.leaving-url-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 20px;
  margin-bottom: 28px;
  word-break: break-all;
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem;
  color: var(--text-muted);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px
}

.leaving-url-box .url-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: .5
}

.leaving-url-box .url-text {
  overflow: hidden;
  text-overflow: ellipsis
}

.leaving-url-box .url-domain {
  color: var(--accent);
  font-weight: 600
}

.leaving-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px
}

.leaving-back {
  padding: 12px 28px;
  border-radius: 10px;
  background: var(--accent-dim);
  color: #fff;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none
}

.leaving-back:hover {
  background: var(--accent)
}

.leaving-continue {
  padding: 12px 28px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  font-family: 'Inter', sans-serif;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none
}

.leaving-continue:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.leaving-progress {
  margin-top: 4px
}

.leaving-progress-bar {
  height: 3px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px
}

.leaving-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width .1s linear;
  width: 0%
}

.leaving-timer {
  font-size: .78rem;
  color: var(--text-muted)
}

.leaving-timer span {
  color: var(--accent);
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace
}

/* ── stats ── */
.article-container {
  margin-bottom: 48px;
}

.tip-header {
  margin-bottom: 40px;
}

.section-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

h3.section-label {
    font-size: 12px;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--min, 220px), 1fr));
  gap: 16px;
}

.grid-auto-lg {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.card-sm {
  padding: 16px;
}

.card-lg {
  padding: 24px;
}

.card-center {
  text-align: center;
}

.card-hover {
  cursor: help;
  position: relative;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
}

.stat-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.stat-value-sm {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}

.stat-value-lg {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 4px;
}

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-link {
  color: var(--link-color);
  text-decoration: none;
}

.text-success { color: #10b981; }
.text-warning { color: #f59e0b; }
.text-danger { color: #ef4444; }

.list {
  display: grid;
  gap: 12px;
}

.list-sm {
  display: grid;
  gap: 8px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.feature-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
}

.feature-info {
  flex: 1;
}

.feature-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.feature-category {
  font-size: 12px;
  color: var(--text-secondary);
}

.feature-support {
  font-size: 16px;
  font-weight: 600;
  min-width: 60px;
  text-align: right;
}

.progress {
  background: var(--border);
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  background: #7c3aed;
  height: 100%;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  padding: 12px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.table-center {
  text-align: center;
}