/* ==========================================================================
   BackerMeta — slate + indigo palette, taken from the reference design.
   Page #f8fafc · surfaces #fff · hairline #e2e8f0
   brand #1e3a8a · hover #1e40af · soft #eff6ff · light #bfdbfe
   ========================================================================== */

:root {
  --ink: #0f172a;
  --ink-soft: #334155;
  --body: #1e293b;
  --muted: #64748b;
  --faint: #94a3b8;

  --line: #e2e8f0;
  --line-strong: #cbd5e1;

  --page: #f8fafc;
  --surface: #ffffff;
  --paper: #f1f5f9;

  --brand: #1e3a8a;
  --brand-2: #1e40af;
  --brand-soft: #eff6ff;
  --brand-light: #bfdbfe;

  --dark: #1e293b;
  --green: #15803d;
  --amber: #a16207;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --r-pill: 999px;

  --header-h: 68px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Microsoft YaHei", sans-serif;
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

::selection {
  background: var(--brand);
  color: #fff;
}

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

.wrap.narrow {
  width: min(760px, calc(100% - 48px));
}

.muted {
  color: var(--muted);
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #022d71;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.site-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  margin-right: 12px;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--brand);
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font: 600 14px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    transform 0.15s ease;
}

.btn:hover {
  background: var(--brand-2);
  border-color: var(--brand-2);
}

.btn:active {
  transform: translateY(1px);
}

.btn-ghost {
  background: var(--surface);
  color: var(--brand);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: var(--brand-soft);
  border-color: var(--brand-light);
  color: var(--brand);
}

.btn-light {
  background: #fff;
  border-color: #fff;
  color: var(--brand);
}

.btn-light:hover {
  background: var(--brand-soft);
  border-color: var(--brand-soft);
  color: var(--brand);
}

.btn-sm {
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
}

.btn-block {
  display: flex;
  width: 100%;
  margin-top: 20px;
}

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 96px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
}

/* Two hairline rings echo the cover art and fill the empty right side. */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  top: 50%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.hero::before {
  right: -140px;
  width: 560px;
  height: 560px;
  transform: translateY(-50%);
}

.hero::after {
  right: -40px;
  width: 360px;
  height: 360px;
  transform: translateY(-50%);
  border-color: rgba(255, 255, 255, 0.1);
}

.hero > .wrap {
  position: relative;
  z-index: 1;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
}

.kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.55;
  flex: none;
}

.hero .kicker {
  color: var(--brand-light);
}

.display {
  max-width: 18ch;
  margin-bottom: 22px;
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.hero .display {
  color: #fff;
}

.display-sm {
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.05;
  max-width: 24ch;
}

.lede {
  max-width: 56ch;
  margin-bottom: 32px;
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: 1.65;
  color: var(--muted);
}

.hero .lede {
  color: var(--brand-light);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero .btn {
  background: #fff;
  border-color: #fff;
  color: var(--brand);
  height: 48px;
  padding: 0 24px;
}

.hero .btn:hover {
  background: var(--brand-soft);
  border-color: var(--brand-soft);
}

.hero .btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

/* ------------------------------------------------------------------- stats */

.stats {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  padding: 28px 24px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat-value {
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

/* ----------------------------------------------------------------- section */

.section {
  padding: 72px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.eyebrow {
  margin-bottom: 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}

.section-head h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.search {
  display: flex;
  align-items: center;
  min-width: 280px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.search input {
  flex: 1;
  min-width: 0;
  padding: 11px 0;
  border: 0;
  background: transparent;
  font: 400 14px/1.4 var(--font);
  color: var(--ink);
  outline: none;
}

.search input::placeholder {
  color: var(--faint);
}

.search button {
  padding: 8px 2px 8px 10px;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 15px;
  cursor: pointer;
}

/* ------------------------------------------------------------------- cards */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 10px 30px rgba(30, 58, 138, 0.12);
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 18px 18px;
}

.card h3 {
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}

.card .meter {
  margin-top: auto;
}

.meter {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--paper);
}

.meter i {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  border-radius: var(--r-pill);
  background: var(--brand);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.card-meta strong {
  color: var(--ink);
  font-weight: 700;
}

.empty {
  padding: 56px 24px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.empty p {
  margin-bottom: 18px;
}

/* --------------------------------------------------------------- spotlight */

.spotlight-section {
  padding: 56px 0 0;
}

.spotlight {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 44px;
  align-items: center;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.spotlight-media {
  display: block;
  overflow: hidden;
  border-radius: var(--r);
}

.spotlight-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.spotlight-copy {
  padding-right: 18px;
}

.spotlight-copy h2 {
  margin-bottom: 12px;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.spotlight-copy > p {
  margin-bottom: 22px;
  color: var(--muted);
  line-height: 1.65;
}

.spotlight-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 24px;
}

.spotlight-stats strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.spotlight-stats span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* carousel — CSS scroll-snap; JS only drives dots and autoplay */
.carousel {
  position: relative;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-radius: var(--r-lg);
  cursor: grab;
}

.carousel-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.carousel-track img {
  -webkit-user-drag: none;
  user-select: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track > .spotlight {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.carousel-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.carousel-btn:hover {
  background: var(--brand-soft);
  border-color: var(--brand-light);
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--line-strong);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}

.carousel-dot.is-active {
  width: 22px;
  background: var(--brand);
}

/* -------------------------------------------------------------- newsletter */

.newsletter {
  padding: 64px 0;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
}

.newsletter-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.newsletter .eyebrow {
  color: var(--brand-light);
}

.newsletter h2 {
  margin-bottom: 12px;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.newsletter p {
  max-width: 46ch;
  color: var(--brand-light);
  line-height: 1.65;
}

.subscribe {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.subscribe input {
  flex: 1;
  min-width: 200px;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  font: 400 14px/1 var(--font);
  color: #fff;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.subscribe input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.subscribe input:focus {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.notice {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 500;
  color: #dcfce7;
}

.notice.error {
  color: #fee2e2;
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  padding: 56px 0 28px;
  background: var(--dark);
  color: #94a3b8;
}

.site-footer .brand {
  color: #f8fafc;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand p {
  max-width: 32ch;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.65;
  color: #94a3b8;
}

.footer-col h5 {
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.footer-col a {
  display: block;
  padding: 4px 0;
  font-size: 13.5px;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12.5px;
  color: #64748b;
}

/* ------------------------------------------------------------ project page */

.project-head {
  padding: 44px 0 32px;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 12.5px;
  color: var(--faint);
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--brand);
}

.project-title {
  max-width: 22ch;
  margin-bottom: 14px;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.project-tagline {
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.6;
}

.project-cover {
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-layout {
  display: grid;
  grid-template-columns: 1.55fr 0.85fr;
  gap: 32px;
  align-items: start;
  padding: 32px 0 72px;
}

.prose {
  padding: 30px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.prose p {
  margin-bottom: 18px;
  font-size: 15.5px;
  line-height: 1.75;
  color: #334155;
}

.prose p:first-child {
  font-size: 16.5px;
  color: var(--ink);
}

.prose p:last-child {
  margin-bottom: 0;
}

.side-card {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.side-card .meter {
  height: 6px;
  margin: 14px 0 6px;
}

.side-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}

.side-row:first-of-type {
  padding-top: 0;
}

.side-row span {
  color: var(--muted);
}

.side-row strong {
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.creator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 15px;
  font-weight: 700;
}

.creator-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.creator-note {
  font-size: 12.5px;
  color: var(--muted);
}

.related {
  padding-top: 0;
}

.link-arrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}

.link-arrow:hover {
  color: var(--brand-2);
}

/* ---------------------------------------------------------- submit & misc */

.page-head {
  padding: 56px 0 28px;
}

.intake-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.intake-top .kicker {
  margin-bottom: 0;
}

.lang-switch {
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lang-switch:hover {
  background: var(--brand-soft);
  border-color: var(--brand-light);
}

.callout {
  margin-bottom: 22px;
  padding: 14px 16px;
  border: 1px solid #bbf7d0;
  border-radius: var(--r);
  background: #f0fdf4;
  font-size: 14px;
  line-height: 1.6;
  color: #166534;
}

.callout.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.notfound {
  padding: 96px 0 120px;
}

.error-detail {
  margin: 0 0 24px;
  padding: 14px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------ forms */

.form-card {
  padding: 28px;
  margin-bottom: 72px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field input[type="number"],
.field input[type="date"],
.field input[type="password"],
.field input[type="search"],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  font: 400 14px/1.5 var(--font);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  resize: vertical;
  line-height: 1.65;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--faint);
}

.field input[type="file"] {
  font: 400 13px/1.4 var(--font);
  color: var(--muted);
}

.field input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  font: 600 12.5px/1 var(--font);
  color: var(--ink-soft);
  cursor: pointer;
}

.field input[type="file"]::file-selector-button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.hint {
  font-size: 12.5px;
  color: var(--muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 18px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* ------------------------------------------------------------------ admin */

.admin-shell {
  min-height: 100dvh;
  background: var(--page);
}

.admin-top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.admin-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 60px;
}

.admin-nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
  margin-right: 16px;
}

.admin-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.admin-nav a:hover {
  background: var(--paper);
  color: var(--ink);
}

.admin-nav a.is-active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.admin-main {
  padding: 36px 0 72px;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.admin-head h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.admin-head p {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--muted);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.admin-stat {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.admin-stat strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.admin-stat span {
  font-size: 12.5px;
  color: var(--muted);
}

.table-wrap {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.table-wrap.scroll {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.table th {
  padding: 11px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background: #fcfdff;
}

.thumb {
  display: block;
  width: 68px;
  height: 46px;
  object-fit: cover;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

.cell-title {
  display: block;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.cell-title:hover {
  color: var(--brand);
}

.cell-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--faint);
}

.pill {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.pill.live {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.pill.draft {
  border-color: #fde68a;
  background: #fffbeb;
  color: var(--amber);
}

.pill.featured {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.pill.client {
  border-color: var(--brand-light);
  background: var(--brand-soft);
  color: var(--brand);
}

.pill + .pill {
  margin-left: 4px;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  white-space: nowrap;
}

.row-actions form {
  margin: 0;
}

.link-btn {
  padding: 6px;
  border: 0;
  border-radius: 6px;
  background: none;
  font: 500 12.5px/1 var(--font);
  color: #475569;
  text-decoration: none;
  cursor: pointer;
}

.link-btn:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.link-btn.danger:hover {
  background: #fef2f2;
  color: #b42318;
}

.edit-layout {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 22px;
  align-items: start;
}

.card-panel {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.card-panel > .eyebrow {
  margin-bottom: 14px;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.preview {
  margin-top: 12px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.divider {
  height: 1px;
  margin: 22px 0;
  background: var(--line);
}

/* ------------------------------------------------------------------ login */

.login-wrap {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px;
  background: var(--page);
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 34px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.06);
}

.login-card .brand {
  margin-bottom: 24px;
}

.login-card h1 {
  margin-bottom: 4px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.login-card .field {
  margin-top: 22px;
}

.login-card .btn {
  width: 100%;
}

.login-note {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 960px) {
  .site-nav {
    display: none;
  }

  .spotlight,
  .newsletter-inner,
  .project-layout,
  .edit-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .spotlight-copy {
    padding-right: 0;
  }

  .section,
  .newsletter {
    padding: 56px 0;
  }

  .hero {
    padding: 64px 0 68px;
  }

  .hero::before,
  .hero::after {
    display: none;
  }

  .side-card {
    position: static;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat {
    padding: 22px 16px;
    border-bottom: 1px solid var(--line);
  }

  .stat:nth-child(2n) {
    border-right: 0;
  }

  .stat:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .admin-stats {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 620px) {
  .wrap,
  .wrap.narrow {
    width: calc(100% - 36px);
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .form-card,
  .prose {
    padding: 20px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .search {
    min-width: 0;
    width: 100%;
  }

  .project-layout {
    padding-bottom: 56px;
  }

  .header-actions .btn-ghost {
    display: none;
  }

  .spotlight {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
