:root {
  --bg: #F5F0E8;
  --bg-deep: #0F1B2D;
  --bg-green: #1A3C34;
  --card-orange: #FFB347;
  --card-blue: #3AA6DD;
  --card-rose: #D0407E;
  --accent: #FFE600;
  --success: #27AE60;
  --warning: #F39C12;
  --danger: #E74C3C;
  --ink: #2C3E50;
  --ink-soft: #5A6B7A;
  --line: #D5D8DC;
  --tag-1: #FF6B6B;
  --tag-2: #4ECDC4;
  --tag-3: #FF9F43;
  --tag-4: #A29BFE;
  --white: #FFFFFF;
  --header-h: 84px;
  --radius: 18px;
  --radius-md: 12px;
  --shadow: 0 16px 40px rgba(15, 27, 45, .16);
  --shadow-soft: 0 8px 24px rgba(15, 27, 45, .10);
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.7;
  padding-top: var(--header-h);
}

body.has-hero {
  padding-top: 0;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4, p, dl, dd {
  margin-top: 0;
  margin-bottom: .8em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -.04em;
  font-weight: 900;
}

h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  font-weight: 900;
}

h3 {
  font-size: 1.3rem;
  font-weight: 900;
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

#main-content {
  scroll-margin-top: calc(var(--header-h) + 12px);
  outline: none;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 2000;
  background: var(--accent);
  color: var(--bg-deep);
  padding: .6rem 1.2rem;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.section {
  padding-block: clamp(3rem, 7vw, 6rem);
}

.section--dense {
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
}

.section--loose {
  padding-block: clamp(4rem, 9vw, 7rem);
}

.section--deep {
  background: var(--bg-deep);
  color: var(--white);
}

.section--green {
  background: var(--bg-green);
  color: var(--white);
}

.section--sun {
  background: var(--accent);
  color: var(--bg-deep);
}

.section--paper {
  background: var(--bg);
}

.page-title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.05em;
  margin-bottom: .6rem;
}

.page-lead {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 68ch;
  margin-bottom: 1.5rem;
}

.on-dark .page-lead {
  color: rgba(255, 255, 255, .76);
}

.text-outline {
  color: transparent;
  -webkit-text-stroke: 2px currentColor;
}

.keyword-outline {
  color: transparent;
  -webkit-text-stroke: 2px currentColor;
  font-weight: 900;
}

.highlight-yellow {
  background: linear-gradient(transparent 55%, var(--accent) 55%);
  padding-inline: .1em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.chapter {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: .8rem;
  border-bottom: 2px solid currentColor;
}

.chapter__no {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1;
  color: var(--card-rose);
}

.chapter__title {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.chapter__hint {
  margin-left: auto;
  font-size: .88rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.section--deep .chapter,
.section--green .chapter {
  border-color: rgba(255, 255, 255, .2);
}

.section--deep .chapter__no,
.section--green .chapter__no {
  color: var(--accent);
}

.section--deep .chapter__hint,
.section--green .chapter__hint {
  color: rgba(255, 255, 255, .64);
}

.section--sun .chapter {
  border-color: var(--bg-deep);
}

.section--sun .chapter__no {
  color: var(--card-rose);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  min-height: var(--header-h);
  background: transparent;
  color: var(--white);
  transition: background-color .3s ease, box-shadow .3s ease;
}

body:not(.has-hero) .site-header,
.site-header.is-solid {
  background: rgba(15, 27, 45, .95);
  box-shadow: 0 4px 24px rgba(0, 0, 0, .2);
}

.header-inner {
  width: min(1440px, 100%);
  margin-inline: auto;
  height: var(--header-h);
  padding-inline: clamp(1rem, 3vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  color: inherit;
  text-decoration: none;
  flex-shrink: 0;
}

.brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent);
  position: relative;
  transform: rotate(-6deg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .22);
}

.brand__mark::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 9px;
  background: var(--bg-deep);
}

.brand__mark::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  right: 7px;
  bottom: 7px;
  border: 3px solid var(--card-rose);
  border-radius: 50%;
  background: var(--card-blue);
}

.brand__text {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: .05em;
  line-height: 1;
}

.brand__tagline {
  display: block;
  font-size: .64rem;
  letter-spacing: .24em;
  opacity: .72;
  font-weight: 700;
  margin-top: 4px;
  text-transform: uppercase;
}

.brand--footer .brand__mark {
  width: 56px;
  height: 56px;
  transform: rotate(6deg);
}

.brand--footer .brand__text {
  font-size: 2rem;
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: .2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: block;
  padding: .58rem .95rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, .86);
  font-weight: 700;
  font-size: .94rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .18s ease, color .18s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, .14);
  color: var(--white);
}

.nav-link[aria-current="page"] {
  background: var(--accent);
  color: var(--bg-deep);
  box-shadow: 0 2px 0 rgba(255, 255, 255, .25);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex: 0 0 auto;
}

.search-entry {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .34);
  color: var(--white);
  border-radius: 999px;
  padding: .5rem 1.05rem;
  font-weight: 700;
  font-size: .88rem;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.search-entry:hover {
  background: var(--accent);
  color: var(--bg-deep);
  border-color: var(--accent);
}

.search-entry__icon {
  position: relative;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.search-entry__icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  background: currentColor;
  right: -5px;
  bottom: -2px;
  transform: rotate(45deg);
}

.search-entry__label {
  display: inline-block;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .32);
  background: rgba(255, 255, 255, .08);
  color: var(--white);
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: background .18s ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, .18);
}

.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
  z-index: 3;
}

.back-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 950;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--bg-deep);
  background: var(--accent);
  color: var(--bg-deep);
  font-size: 1.4rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
  transition: transform .2s ease, background .2s ease;
}

.back-top:hover {
  background: var(--white);
  transform: translateY(-4px);
}

.back-top[hidden] {
  display: none;
}

.site-footer {
  position: relative;
  margin-top: auto;
  background: var(--bg-green);
  color: var(--white);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .5) 1px, transparent 0);
  background-size: 22px 22px;
  pointer-events: none;
}

.site-footer::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 260px;
  height: 260px;
  border: 3px dashed rgba(255, 255, 255, .16);
  border-radius: 50%;
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin-inline: auto;
  padding: 4.5rem clamp(1rem, 4vw, 2.5rem) 3rem;
  display: grid;
  grid-template-columns: 1.1fr 1.7fr;
  gap: 3.5rem;
}

.footer-brand {
  min-width: 0;
}

.footer-desc {
  color: rgba(255, 255, 255, .7);
  max-width: 34ch;
  margin-top: 1.2rem;
}

.footer-contact {
  margin-top: 1.6rem;
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, .16);
  border: 1px dashed rgba(255, 255, 255, .28);
  border-radius: 14px;
}

.contact-line {
  margin: .35rem 0;
  font-size: .9rem;
  color: rgba(255, 255, 255, .84);
  font-weight: 600;
}

.contact-line:first-child {
  margin-top: 0;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-col {
  min-width: 0;
}

.footer-col__title {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--accent);
  margin-bottom: 1.2rem;
  font-weight: 900;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  line-height: 2;
}

.footer-col a {
  color: rgba(255, 255, 255, .82);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.footer-col a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.footer-bottom {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin-inline: auto;
  padding: 1.3rem clamp(1rem, 4vw, 2.5rem);
  border-top: 1px solid rgba(255, 255, 255, .16);
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 2rem;
  align-items: center;
  justify-content: space-between;
  font-size: .86rem;
  color: rgba(255, 255, 255, .72);
}

.footer-bottom a {
  color: rgba(255, 255, 255, .85);
  text-decoration: none;
  font-weight: 700;
  margin-inline: .1rem;
}

.footer-bottom a:hover {
  color: var(--accent);
}

.footer-icp {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem .6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.35rem;
  border-radius: 999px;
  border: 2px solid var(--bg-deep);
  background: var(--accent);
  color: var(--bg-deep);
  font-weight: 900;
  font-size: .95rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(15, 27, 45, .12);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  font-family: inherit;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 rgba(15, 27, 45, .18);
  background: var(--white);
}

.button--ghost {
  background: transparent;
  color: var(--bg-deep);
  box-shadow: none;
}

.button--ghost:hover {
  background: var(--bg-deep);
  color: var(--white);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  margin: 0 0 1.6rem;
  padding: 0;
  list-style: none;
  font-size: .9rem;
  font-weight: 600;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: .45rem;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--line);
  font-weight: 400;
}

.breadcrumb a {
  color: var(--ink-soft);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--bg-deep);
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: var(--card-rose);
  font-weight: 900;
}

.breadcrumb--dark a {
  color: rgba(255, 255, 255, .7);
}

.breadcrumb--dark a:hover {
  color: var(--accent);
}

.breadcrumb--dark li + li::before {
  color: rgba(255, 255, 255, .35);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 1.25rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--card-blue);
  color: var(--bg-deep);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  border: 2px solid transparent;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}

.card::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -32px;
  width: 110px;
  height: 110px;
  border: 3px dashed rgba(255, 255, 255, .4);
  border-radius: 50%;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.card--orange {
  background: var(--card-orange);
  color: var(--bg-deep);
}

.card--blue {
  background: var(--card-blue);
  color: var(--bg-deep);
}

.card--rose {
  background: var(--card-rose);
  color: var(--white);
}

.card--sun {
  background: var(--accent);
  color: var(--bg-deep);
}

.card--deep {
  background: var(--bg-deep);
  color: var(--white);
}

.card__count {
  align-self: flex-start;
  background: rgba(255, 255, 255, .3);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  padding: .15rem .65rem;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .04em;
}

.card--orange .card__count,
.card--blue .card__count,
.card--sun .card__count {
  background: rgba(255, 255, 255, .4);
  color: var(--bg-deep);
}

.card--rose .card__count,
.card--deep .card__count {
  background: rgba(255, 255, 255, .2);
  color: var(--white);
}

.card__title {
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.15;
  margin-top: 1.2rem;
}

.card__meta {
  font-size: .86rem;
  opacity: .86;
  margin-top: .35rem;
  font-weight: 600;
}

.card__footer {
  margin-top: auto;
  padding-top: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  font-size: .82rem;
  font-weight: 800;
  opacity: .9;
}

.cover-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(120px, auto);
  gap: 1rem;
}

.cover-tile {
  position: relative;
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.4rem;
  border-radius: 20px;
  overflow: hidden;
  background: var(--card-blue);
  color: var(--bg-deep);
  text-decoration: none;
  min-height: 180px;
  box-shadow: var(--shadow-soft);
  transition: transform .22s ease, box-shadow .22s ease;
}

.cover-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.cover-tile--wide {
  grid-column: span 6;
}

.cover-tile--tall {
  grid-row: span 2;
}

.cover-tile--orange {
  background: var(--card-orange);
  color: var(--bg-deep);
}

.cover-tile--rose {
  background: var(--card-rose);
  color: var(--white);
}

.cover-tile--green {
  background: var(--bg-green);
  color: var(--white);
}

.cover-tile--sun {
  background: var(--accent);
  color: var(--bg-deep);
}

.cover-tile .media {
  position: absolute;
  inset: 0;
  border-radius: 0;
  z-index: 0;
}

.cover-tile > *:not(.media) {
  position: relative;
  z-index: 1;
}

.cover-tile__title {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.2;
  margin-top: auto;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.cover-tile__meta {
  font-size: .82rem;
  font-weight: 700;
  opacity: .86;
  margin-top: .4rem;
}

.magnet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
  gap: 1rem;
}

.magnet-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  padding: 1.1rem 1.2rem;
  background: var(--card-rose);
  color: var(--white);
  border-radius: 16px;
  text-decoration: none;
  overflow: hidden;
  border: 2px solid transparent;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.magnet-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.magnet-tile--blue {
  background: var(--card-blue);
  color: var(--bg-deep);
}

.magnet-tile--orange {
  background: var(--card-orange);
  color: var(--bg-deep);
}

.magnet-tile--green {
  background: var(--bg-green);
  color: var(--white);
}

.magnet-tile__no {
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
  opacity: .95;
}

.magnet-tile__title {
  font-weight: 900;
  font-size: 1.05rem;
  line-height: 1.25;
}

.magnet-tile__count {
  font-size: .75rem;
  font-weight: 800;
  opacity: .85;
}

.entry-list {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.entry-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-decoration: none;
  color: var(--ink);
  transition: background .16s ease, color .16s ease;
}

.entry-row:last-child {
  border-bottom: none;
}

.entry-row:hover {
  background: var(--accent);
  color: var(--bg-deep);
}

.entry-row__rank {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  background: var(--bg-deep);
  color: var(--accent);
  border-radius: 10px;
  font-weight: 900;
  font-size: 1rem;
  flex-shrink: 0;
}

.entry-row__body {
  min-width: 0;
}

.entry-row__title {
  font-weight: 900;
  font-size: 1.02rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: .2rem;
}

.entry-row:hover .entry-row__meta {
  color: var(--bg-deep);
}

.entry-row__status {
  justify-self: end;
}

.entry-row--compact {
  padding: .55rem .9rem;
}

.entry-row--compact .entry-row__title {
  font-size: .94rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .18rem .7rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1.6;
}

.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .25);
}

.status-badge--new {
  background: var(--success);
  color: var(--white);
}

.status-badge--updating {
  background: var(--warning);
  color: var(--bg-deep);
}

.status-badge--old {
  background: var(--danger);
  color: var(--white);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.tag-block {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem 1rem;
  border-radius: 10px;
  background: var(--tag-1);
  color: var(--bg-deep);
  font-weight: 900;
  font-size: .86rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.tag-block:hover {
  transform: translateY(-2px);
  border-color: var(--bg-deep);
}

.tag-block--t2 {
  background: var(--tag-2);
}

.tag-block--t3 {
  background: var(--tag-3);
}

.tag-block--t4 {
  background: var(--tag-4);
}

.tag-block--outline {
  background: transparent;
  border-color: rgba(255, 255, 255, .4);
  color: inherit;
}

.metric-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 27, 45, .14);
  overflow: hidden;
}

.metric-bar__fill {
  display: block;
  height: 100%;
  width: 50%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--card-orange), var(--card-rose));
  transition: width .4s ease;
}

.metric-bar--dark {
  background: rgba(255, 255, 255, .2);
}

.metric-bar--dark .metric-bar__fill {
  background: linear-gradient(90deg, var(--accent), var(--card-orange));
}

.index-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

.index-pill {
  display: grid;
  place-items: center;
  min-width: 2.6rem;
  height: 2.6rem;
  padding: 0 .7rem;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  font-size: .9rem;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.index-pill:hover,
.index-pill[aria-current="true"] {
  background: var(--accent);
  border-color: var(--bg-deep);
  transform: translateY(-2px);
}

.index-strip--dark .index-pill {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .28);
  color: var(--white);
}

.index-strip--dark .index-pill:hover {
  background: var(--accent);
  color: var(--bg-deep);
}

.rail {
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: .75rem;
  margin-bottom: -.75rem;
}

.rail__track {
  display: flex;
  gap: 1rem;
  min-width: max-content;
}

.rail__item {
  width: min(78vw, 300px);
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.rail::-webkit-scrollbar {
  height: 8px;
}

.rail::-webkit-scrollbar-track {
  background: rgba(15, 27, 45, .08);
  border-radius: 999px;
}

.rail::-webkit-scrollbar-thumb {
  background: var(--card-orange);
  border-radius: 999px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.compare-table th,
.compare-table td {
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compare-table th {
  background: var(--bg-deep);
  color: var(--white);
  font-weight: 900;
  letter-spacing: .03em;
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-table tbody tr:hover td {
  background: rgba(255, 230, 0, .18);
}

.compare-table .num {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.media {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--card-blue), var(--bg-deep));
  min-height: 60px;
}

.media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--16x9 {
  aspect-ratio: 16 / 9;
}

.media--4x5 {
  aspect-ratio: 4 / 5;
}

.media--square {
  aspect-ratio: 1 / 1;
}

.media__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: .3rem .8rem;
  background: rgba(15, 27, 45, .72);
  color: var(--white);
  font-size: .8rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.img-placeholder {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 2px dashed var(--card-blue);
  background: var(--bg);
  color: var(--ink-soft);
  font-weight: 800;
  border-radius: 16px;
  text-align: center;
  padding: 1rem;
}

.toc-list {
  display: grid;
  gap: .6rem;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: toc;
}

.toc-link {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .9rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
  counter-increment: toc;
}

.toc-link::before {
  content: counter(toc, decimal-leading-zero);
  font-weight: 900;
  color: var(--card-rose);
  font-size: 1.15rem;
}

.toc-link:hover {
  background: var(--accent);
  border-color: var(--bg-deep);
  transform: translateX(4px);
}

.faq-list {
  display: grid;
  gap: .75rem;
}

.faq-list details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: .2rem 1.1rem;
  box-shadow: var(--shadow-soft);
}

.faq-list summary {
  cursor: pointer;
  padding: .85rem 0;
  font-weight: 900;
  font-size: 1.02rem;
  list-style: none;
}

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

.faq-list summary::before {
  content: "＋";
  display: inline-block;
  width: 1.6rem;
  color: var(--card-rose);
  font-weight: 900;
  transition: transform .2s ease;
}

.faq-list details[open] summary::before {
  transform: rotate(45deg);
}

.faq-list details div {
  padding: 0 .6rem 1.2rem 1.6rem;
  color: var(--ink-soft);
}

.dot-grid {
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .5) 1px, transparent 0);
  background-size: 22px 22px;
}

.sketch-border {
  position: relative;
}

.sketch-border::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px dashed rgba(15, 27, 45, .55);
  border-radius: inherit;
  pointer-events: none;
}

.sketch-border--light::before {
  border-color: rgba(255, 255, 255, .55);
}

.doodle-pipe {
  position: relative;
  height: 100px;
}

.doodle-pipe::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--card-blue);
  border-top-color: transparent;
  transform: rotate(25deg);
}

.doodle-pipe::after {
  content: "";
  position: absolute;
  left: 52px;
  top: 52px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--card-rose);
  box-shadow: 0 0 0 6px var(--accent);
}

@media (max-width: 960px) {
  .site-nav {
    position: absolute;
    top: calc(100% + .8rem);
    right: clamp(1rem, 4vw, 2.5rem);
    left: clamp(1rem, 4vw, 2.5rem);
    margin-left: 0;
    background: var(--bg-deep);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: .8rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
    z-index: 1200;
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-link {
    padding: .85rem 1.1rem;
    border-radius: 12px;
  }

  .header-tools {
    margin-left: auto;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-columns {
    grid-template-columns: repeat(3, 1fr);
  }

  .cover-tile,
  .cover-tile--wide {
    grid-column: span 6;
  }

  .entry-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .entry-row__status {
    grid-column: 2;
    justify-self: start;
    margin-top: -.4rem;
  }
}

@media (max-width: 640px) {
  .footer-columns {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    justify-content: flex-start;
  }

  .cover-tile,
  .cover-tile--wide,
  .cover-tile--tall {
    grid-column: span 12;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .magnet-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .entry-row {
    grid-template-columns: auto 1fr;
    gap: .6rem;
    padding: .7rem .8rem;
  }

  .entry-row__meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .brand__tagline {
    display: none;
  }

  .search-entry__label {
    display: none;
  }

  .search-entry {
    width: 46px;
    padding: 0;
    justify-content: center;
  }

  .brand__text {
    font-size: 1.2rem;
  }

  .header-inner {
    gap: .45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }

  .card,
  .magnet-tile,
  .cover-tile,
  .entry-row,
  .tag-block,
  .button,
  .nav-toggle__bar,
  .back-top {
    transform: none !important;
  }
}
