/* ============================================================
   The Cutaway — design system
   Cinematic dark editorial theme with a light variant
   ============================================================ */

:root {
  --bg: #0a0a0c;
  --bg-elev: #111114;
  --bg-elev-2: #16161a;
  --surface: #1a1a1f;
  --border: #26262d;
  --border-strong: #34343e;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #f5c518;
  --accent-hover: #ffd84d;
  --accent-ink: #0a0a0c;
  --danger: #ef4444;
  --success: #10b981;
  --info: #3b82f6;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 8px 24px rgba(0,0,0,.45);
  --shadow-3: 0 20px 50px rgba(0,0,0,.55);
  --container: 1240px;
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: 'Playfair Display', 'Iowan Old Style', 'Apple Garamond', Georgia, serif;
}

[data-theme="light"] {
  --bg: #f7f7f8;
  --bg-elev: #ffffff;
  --bg-elev-2: #ffffff;
  --surface: #ffffff;
  --border: #e5e5ea;
  --border-strong: #d4d4d8;
  --text: #0a0a0c;
  --text-muted: #52525b;
  --text-dim: #71717a;
  --accent: #c89800;
  --accent-hover: #a37b00;
  --accent-ink: #ffffff;
  --shadow-1: 0 1px 2px rgba(0,0,0,.06);
  --shadow-2: 0 8px 24px rgba(0,0,0,.08);
  --shadow-3: 0 20px 50px rgba(0,0,0,.12);
}

* { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.6rem); }
h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.4rem); }
h3 { font-size: clamp(1.2rem, 1vw + .8rem, 1.6rem); }

p { margin: 0 0 1em; }

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

button { font-family: inherit; }

/* ----- Layout ----- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 24px; }
main { flex: 1; }
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.section-header h2 { margin: 0; }
.section-header .eyebrow { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.section-link { font-size: .9rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.section-link:hover { color: var(--accent); }

.divider { border: 0; border-top: 1px solid var(--border); margin: 0; }

/* ----- Navbar ----- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--container);
  margin: 0 auto;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -.02em;
}
.brand-dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 16px var(--accent);
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: .95rem;
  color: var(--text-muted);
  font-weight: 500;
  position: relative;
  padding: 8px 0;
}
.nav-links a.active, .nav-links a:hover { color: var(--text); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--border); color: var(--text); padding: 8px 12px; border-radius: 8px; cursor: pointer; }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 12px;
  }
  .nav-toggle { display: inline-flex; }
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: .9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface); color: var(--text); border-color: var(--text-muted); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; color: white; }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; }

/* ----- Hero ----- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.hero-feature {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
  padding: 80px 0 96px;
}
.hero-feature .hero-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; color: var(--text-muted); font-size: .85rem; }
.hero-feature h1 { font-size: clamp(2.2rem, 3.5vw + 1rem, 4rem); margin-bottom: 18px; }
.hero-feature .hero-excerpt { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 28px; max-width: 56ch; }
.hero-feature .hero-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-3);
  background: var(--surface);
}
.hero-feature .hero-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-feature .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-feature .hero-rating { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
@media (max-width: 900px) {
  .hero-feature { grid-template-columns: 1fr; padding: 48px 0 64px; gap: 32px; }
  .hero-feature .hero-image { aspect-ratio: 16/10; }
}

/* ----- Cards ----- */
.card-grid { display: grid; gap: 28px; }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1024px) {
  .card-grid-3, .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .card-grid-3, .card-grid-4, .card-grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease, border-color .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.card-image {
  aspect-ratio: 16/10;
  background: var(--surface);
  overflow: hidden;
  position: relative;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-image img { transform: scale(1.04); }
.card-image.poster { aspect-ratio: 2/3; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .8rem; color: var(--text-muted); }
.card-meta .dot { color: var(--border-strong); }
.card h3.card-title { font-size: 1.25rem; line-height: 1.25; margin: 0; }
.card-excerpt { color: var(--text-muted); font-size: .94rem; line-height: 1.55; margin: 0; flex: 1; }
.card-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.card-category {
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.card-featured-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: 5px 10px;
  border-radius: 999px;
}

/* Compact horizontal card */
.card-horizontal {
  flex-direction: row;
  align-items: stretch;
}
.card-horizontal .card-image { aspect-ratio: 4/3; width: 200px; flex-shrink: 0; }
.card-horizontal .card-body { padding: 16px 20px; }
@media (max-width: 640px) {
  .card-horizontal { flex-direction: column; }
  .card-horizontal .card-image { width: 100%; aspect-ratio: 16/9; }
}

/* ----- Rating badge ----- */
.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .85rem;
}
.rating-badge .star { color: var(--accent); }
.rating-badge-lg { padding: 8px 14px; font-size: 1rem; }
.rating-stars { display: inline-flex; gap: 2px; color: var(--accent); font-size: 1rem; line-height: 1; }
.rating-stars .empty { color: var(--border-strong); }

/* ----- Chips ----- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  font-size: .75rem;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  letter-spacing: .02em;
}
.chip-accent { background: rgba(245,197,24,.1); border-color: rgba(245,197,24,.4); color: var(--accent); }
.chip-link:hover { color: var(--text); border-color: var(--border-strong); }

/* ----- Toolbar (search/filter/sort) ----- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  margin-bottom: 32px;
}
.toolbar .search-input {
  flex: 1;
  min-width: 240px;
  position: relative;
}
.toolbar .search-input input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .95rem;
  outline: none;
  transition: border-color .15s ease;
}
.toolbar .search-input input:focus { border-color: var(--accent); }
.toolbar .search-input::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
}
.toolbar .search-input::after {
  content: '';
  position: absolute;
  left: 26px;
  top: 60%;
  transform: rotate(45deg);
  width: 8px; height: 2px;
  background: var(--text-muted);
}
.toolbar select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 36px 10px 14px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.toolbar select:focus { border-color: var(--accent); }

/* ----- Forms ----- */
.form-group { margin-bottom: 20px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 720px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}
.form-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.form-help { font-size: .8rem; color: var(--text-dim); margin-top: 6px; }
.form-error { font-size: .8rem; color: var(--danger); margin-top: 6px; min-height: 0; }
.form-control {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease;
}
.form-control:focus { border-color: var(--accent); }
.form-control[aria-invalid="true"] { border-color: var(--danger); }
textarea.form-control { resize: vertical; min-height: 110px; line-height: 1.55; }
.form-row { display: flex; gap: 12px; align-items: center; }

.input-counter { font-size: .75rem; color: var(--text-dim); text-align: right; margin-top: 4px; }

.checkbox { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ----- Tables ----- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  min-width: 720px;
}
.table thead { background: var(--surface); }
.table th, .table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); font-weight: 600; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface); }
.table .actions { display: flex; gap: 8px; justify-content: flex-end; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.status-published { background: rgba(16,185,129,.12); color: #34d399; border: 1px solid rgba(16,185,129,.3); }
.status-draft { background: rgba(161,161,170,.12); color: var(--text-muted); border: 1px solid var(--border-strong); }

/* ----- Rich text content ----- */
.prose {
  font-size: 1.075rem;
  line-height: 1.75;
  color: var(--text);
  font-family: var(--font-sans);
}
.prose h2 { font-family: var(--font-serif); margin: 2em 0 .6em; font-size: 1.85rem; }
.prose h3 { font-family: var(--font-serif); margin: 1.6em 0 .5em; font-size: 1.4rem; }
.prose p { margin: 0 0 1.1em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 22px;
  margin: 1.5em 0;
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.15rem;
  font-family: var(--font-serif);
}
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose img { border-radius: var(--radius); margin: 1.5em 0; }
.prose code {
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .9em;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.4em 0; }

/* ----- Article header ----- */
.article-header {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--border);
}
.article-header .eyebrow {
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 16px;
  display: block;
}
.article-header h1 { font-size: clamp(2rem, 3vw + 1rem, 3.4rem); max-width: 22ch; margin-bottom: 18px; }
.article-header .article-lede { font-size: 1.2rem; color: var(--text-muted); max-width: 56ch; margin-bottom: 24px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; color: var(--text-muted); font-size: .9rem; }
.article-meta .author { color: var(--text); font-weight: 600; }
.article-hero-image {
  aspect-ratio: 21/9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin: 32px 0;
  background: var(--surface);
  box-shadow: var(--shadow-3);
}
.article-hero-image img { width: 100%; height: 100%; object-fit: cover; }

/* Review-specific banner */
.review-banner {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}
.review-banner-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: end;
}
.review-banner .poster {
  aspect-ratio: 2/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-3);
}
.review-banner .poster img { width: 100%; height: 100%; object-fit: cover; }
.review-banner h1 { margin: 0 0 12px; }
.review-banner .review-stats { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 16px; align-items: center; }
.review-banner .lede { color: var(--text-muted); font-size: 1.1rem; max-width: 56ch; }
@media (max-width: 720px) {
  .review-banner { padding: 32px 0; }
  .review-banner-grid { grid-template-columns: 1fr; gap: 24px; }
  .review-banner .poster { max-width: 240px; }
}

.verdict-box {
  margin: 40px 0;
  padding: 28px 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  position: relative;
}
.verdict-box .label {
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}
.verdict-box .verdict-text { font-family: var(--font-serif); font-size: 1.4rem; line-height: 1.4; margin: 0; }

/* ----- List card sample ----- */
.list-card .card-image {
  aspect-ratio: 5/3;
  position: relative;
}
.list-count-badge {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(10,10,12,.78);
  color: var(--text);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: 6px 12px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.list-sample {
  list-style: none;
  padding: 0;
  margin: 4px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: .85rem;
  color: var(--text-muted);
}
.list-sample li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}
.list-sample li.more {
  font-size: .75rem;
  color: var(--text-dim);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 600;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.list-sample .rank {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
  min-width: 22px;
}

/* ----- List detail page entries ----- */
.list-hero {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--border);
}
.list-hero .cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  margin-top: 32px;
  box-shadow: var(--shadow-3);
}
.list-hero .cover img { width: 100%; height: 100%; object-fit: cover; }
.list-hero .eyebrow {
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 12px;
  display: block;
}
.list-hero h1 { max-width: 24ch; margin-bottom: 14px; }
.list-hero .lede { font-size: 1.2rem; color: var(--text-muted); max-width: 60ch; margin: 0 0 18px; }
.list-hero .meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--text-muted); font-size: .9rem; }

.list-entries { display: flex; flex-direction: column; gap: 28px; padding: 48px 0; }
.list-entry {
  display: grid;
  grid-template-columns: 80px 280px 1fr;
  gap: 32px;
  align-items: flex-start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.list-entry:last-child { border-bottom: 0; padding-bottom: 0; }
.list-entry .rank-num {
  font-family: var(--font-serif);
  font-size: clamp(3.4rem, 5vw, 5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  text-align: right;
  letter-spacing: -.04em;
}
.list-entry .thumb {
  aspect-ratio: 2/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-2);
}
.list-entry .thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-entry .info h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  margin: 0 0 8px;
  line-height: 1.2;
}
.list-entry .info .credit {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.list-entry .info .blurb {
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.65;
  margin: 0 0 14px;
}
.list-entry .info .read-review {
  font-size: .85rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.list-entry .info .read-review:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 820px) {
  .list-entry {
    grid-template-columns: 56px 1fr;
    gap: 18px;
    row-gap: 16px;
  }
  .list-entry .rank-num {
    font-size: 2.8rem;
    text-align: left;
    line-height: 1;
  }
  .list-entry .thumb {
    grid-column: 2;
    aspect-ratio: 16/10;
    width: 100%;
    max-width: 320px;
  }
  .list-entry .info { grid-column: 1 / -1; }
}

/* ----- Admin list-items repeater ----- */
.list-items-builder { display: flex; flex-direction: column; gap: 12px; }
.list-item-row {
  display: grid;
  grid-template-columns: 36px 100px 1fr 36px;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.list-item-row .rank-label {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 700;
  padding-top: 4px;
  text-align: center;
}
.list-item-row .item-image {
  width: 100px;
  aspect-ratio: 2/3;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-elev-2);
  position: relative;
  cursor: pointer;
  border: 1px dashed var(--border-strong);
  font-size: .75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
}
.list-item-row .item-image img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.list-item-row .item-image input { display: none; }
.list-item-row .item-fields { display: grid; gap: 8px; }
.list-item-row .item-fields .row-2 { display: grid; grid-template-columns: 1fr 100px; gap: 8px; }
.list-item-row .remove-item-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
}
.list-item-row .remove-item-btn:hover { color: var(--danger); border-color: var(--danger); }
@media (max-width: 720px) {
  .list-item-row { grid-template-columns: 36px 1fr 36px; }
  .list-item-row .item-image { grid-column: 1 / -1; width: 100%; aspect-ratio: 16/9; }
}

/* ----- Footer ----- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 48px 0 32px;
  color: var(--text-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-grid h4 { font-family: var(--font-sans); font-size: .85rem; color: var(--text); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { font-size: .95rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; border-top: 1px solid var(--border); font-size: .85rem; }
.social { display: flex; gap: 14px; }
.social a {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 50%;
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 700;
}
.social a:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ----- Newsletter card ----- */
.newsletter {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--bg-elev), var(--surface));
  padding: 56px 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}
.newsletter h2 { margin: 0 0 12px; }
.newsletter p { color: var(--text-muted); margin: 0; }
.newsletter form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter input { flex: 1; min-width: 220px; }
@media (max-width: 820px) {
  .newsletter { grid-template-columns: 1fr; padding: 36px 28px; }
}

/* ----- Pagination ----- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}
.pagination button {
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .9rem;
  font-family: inherit;
  min-width: 40px;
}
.pagination button:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); }
.pagination button.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* ----- Empty / loading / error states ----- */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}
.empty-state .icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border: 2px dashed var(--border-strong);
  border-radius: 14px;
}
.empty-state h3 { color: var(--text); margin-bottom: 8px; }
.skeleton {
  background: linear-gradient(90deg, var(--surface) 0%, var(--bg-elev-2) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: skel 1.6s ease-in-out infinite;
  border-radius: 6px;
}
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-card { height: 280px; border-radius: var(--radius); }

/* ----- Toast / flash ----- */
.toast-host {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-2);
  font-size: .9rem;
  max-width: 340px;
  animation: slideUp .25s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ----- Modal ----- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-3);
}
.modal h3 { margin: 0 0 12px; }
.modal p { color: var(--text-muted); margin-bottom: 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ----- Admin layout ----- */
.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.admin-sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-sidebar .brand { margin-bottom: 36px; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .95rem;
  font-weight: 500;
}
.admin-nav a:hover { background: var(--surface); color: var(--text); }
.admin-nav a.active { background: var(--surface); color: var(--text); }
.admin-nav a.active::before {
  content: '';
  width: 4px; height: 18px;
  background: var(--accent);
  border-radius: 4px;
}
.admin-nav .nav-label {
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 16px 14px 8px;
  font-weight: 600;
}
.admin-userbox { padding: 16px 14px; border-top: 1px solid var(--border); margin-top: 16px; }
.admin-userbox .name { font-weight: 600; }
.admin-userbox .email { font-size: .8rem; color: var(--text-muted); }
.admin-main { padding: 32px 40px 64px; max-width: 100%; overflow-x: hidden; }
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.admin-header h1 { font-family: var(--font-sans); font-size: 1.6rem; letter-spacing: -.01em; margin: 0 0 4px; }
.admin-header .subtitle { color: var(--text-muted); font-size: .95rem; margin: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 40px; }
@media (max-width: 1024px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.stat-card .label { font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; }
.stat-card .value { font-size: 2rem; font-weight: 700; font-family: var(--font-serif); }
.stat-card .delta { font-size: .8rem; color: var(--success); margin-top: 4px; }

.admin-panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.admin-panel + .admin-panel { margin-top: 24px; }
.admin-panel h2 { font-family: var(--font-sans); font-size: 1.15rem; letter-spacing: -.01em; margin: 0 0 16px; }

@media (max-width: 820px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    padding: 16px 20px;
  }
  .admin-sidebar .brand { margin: 0 24px 0 0; }
  .admin-nav { flex-direction: row; }
  .admin-nav .nav-label, .admin-userbox { display: none; }
  .admin-main { padding: 24px 20px 48px; }
}

/* ----- Rich text editor ----- */
.rte-wrap { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev-2);
  border-top-left-radius: var(--radius-sm);
  border-top-right-radius: var(--radius-sm);
}
.rte-toolbar button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: .85rem;
  font-family: inherit;
  min-width: 34px;
  font-weight: 600;
}
.rte-toolbar button:hover { background: var(--surface); color: var(--text); }
.rte-toolbar button.active { background: var(--surface); color: var(--accent); border-color: var(--border); }
.rte-toolbar .sep { width: 1px; background: var(--border); margin: 4px 4px; }
.rte-content {
  min-height: 360px;
  padding: 20px 24px;
  outline: none;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
}
.rte-content:empty::before {
  content: attr(data-placeholder);
  color: var(--text-dim);
  pointer-events: none;
}
.rte-content h2 { font-size: 1.55rem; font-family: var(--font-serif); margin: 1em 0 .4em; }
.rte-content h3 { font-size: 1.25rem; font-family: var(--font-serif); margin: 1em 0 .4em; }
.rte-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin: 1em 0;
  font-style: italic;
  color: var(--text-muted);
}
.rte-content ul, .rte-content ol { padding-left: 24px; }
.rte-content img { max-width: 100%; border-radius: var(--radius-sm); margin: 1em 0; }
.rte-content a { color: var(--accent); text-decoration: underline; }

/* ----- Image uploader ----- */
.image-uploader {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: var(--surface);
  transition: border-color .15s ease, background .15s ease;
  position: relative;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-uploader:hover, .image-uploader.dragging { border-color: var(--accent); background: var(--bg-elev-2); }
.image-uploader input { display: none; }
.image-uploader .placeholder { color: var(--text-muted); font-size: .9rem; }
.image-uploader.has-image { padding: 0; border-style: solid; }
.image-uploader.has-image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius-sm); }
.image-uploader .remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,.7);
  color: white;
  border: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
}

/* ----- Auth page ----- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
  background-image: radial-gradient(circle at 20% 30%, rgba(245,197,24,.08), transparent 50%),
                    radial-gradient(circle at 80% 70%, rgba(59,130,246,.06), transparent 50%);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-3);
}
.auth-card h1 { font-family: var(--font-sans); font-size: 1.6rem; margin: 0 0 8px; letter-spacing: -.01em; }
.auth-card .subtitle { color: var(--text-muted); margin: 0 0 28px; font-size: .95rem; }
.auth-card .brand { margin-bottom: 28px; }

/* ----- 404 ----- */
.notfound {
  text-align: center;
  padding: 100px 24px;
}
.notfound .num {
  font-family: var(--font-serif);
  font-size: clamp(6rem, 18vw, 12rem);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), #c89800);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0;
}

/* ----- Utility ----- */
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

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

/* ----- Print niceties ----- */
@media print {
  .navbar, .site-footer, .newsletter { display: none; }
}
