/* Media Factory — shared stylesheet.
   Every colour, radius and font comes from theme.css, which is generated per
   site from config.yaml. The same components therefore render as three
   different brands without forking this file. */

/* ---------------------------------------------------------------- reset */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 16px;
  line-height: 1.75;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-heading, var(--font-body, system-ui, sans-serif));
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  z-index: 100; padding: 10px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 0 0 10px 10px;
  transition: top 160ms ease;
}
.skip-link:focus { top: 0; }

/* ------------------------------------------------------------- layout */

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}
.container--narrow { max-width: 940px; }

.section { padding: 56px 0; }
.section--tight { padding: 32px 0; }
.section + .section { padding-top: 0; }
.section--related { padding-bottom: 72px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-title { font-size: 19px; letter-spacing: 0.01em; }
.section-note { margin-top: 6px; font-size: 13px; color: var(--muted); line-height: 1.6; }

.more-link {
  display: inline-flex; align-items: center; gap: 2px;
  flex: none;
  font-size: 13px; color: var(--muted);
  transition: color 180ms ease;
}
.more-link:hover { color: var(--accent-ink, var(--accent)); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--accent-ink, var(--accent));
}

/* ------------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex; align-items: center; gap: 28px;
  height: 72px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.logo-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-ink, var(--accent));
}
.logo-text {
  font-family: var(--font-heading, inherit);
  font-size: 18px; font-weight: 700; letter-spacing: -0.01em;
}

.nav { margin-left: auto; }
.nav-list { display: flex; gap: 26px; }
.nav-list a {
  font-size: 14px; color: var(--muted);
  transition: color 180ms ease;
}
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-button {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--muted);
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}
.icon-button:hover { background: var(--accent-soft); color: var(--accent-ink, var(--accent)); }
.menu-toggle { display: none; }

.mobile-nav { border-top: 1px solid var(--border); background: var(--surface); padding: 12px 0 20px; }
.mobile-nav[hidden] { display: none; }
.mobile-nav-title {
  margin: 18px 0 6px; font-size: 12px; letter-spacing: 0.06em; color: var(--muted);
}
.mobile-nav-list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 2px; border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.mobile-nav-list--muted a { color: var(--muted); font-size: 14px; }

/* --------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: 56px 0 44px;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px; align-items: center;
}
.hero-title {
  font-size: clamp(32px, 4.4vw, 50px);
  line-height: 1.25;
  letter-spacing: -0.03em;
}
.hero-lead {
  margin-top: 16px;
  max-width: 46ch;
  color: var(--muted);
  font-size: 15px;
}
.hero-visual { position: relative; display: flex; justify-content: flex-end; }
.hero-artwork { width: 100%; max-width: 520px; max-height: 330px; height: auto; display: block; }

.search-form {
  position: relative;
  display: flex; align-items: center;
  margin-top: 28px;
  padding: 6px 6px 6px 44px;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.search-form:focus-within {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.search-form-icon {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  color: var(--muted); display: grid; place-items: center;
}
.search-input {
  flex: 1; min-width: 0;
  height: 44px;
  border: 0; background: transparent;
  font-size: 15px; color: var(--text);
}
.search-input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.search-input:focus { outline: none; }
.search-submit {
  display: grid; place-items: center;
  width: 48px; height: 44px;
  border: 0; border-radius: 10px;
  background: var(--accent); color: var(--accent-contrast, #fff);
  cursor: pointer;
  transition: filter 180ms ease;
}
.search-submit:hover { filter: brightness(1.06); }
.search-form--page { max-width: none; margin-top: 24px; }

.keyword-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 16px;
}
.keyword-label {
  padding: 4px 10px;
  background: var(--accent-soft); color: var(--accent-ink, var(--accent));
  border-radius: 999px; font-size: 12px; font-weight: 600;
}
.keyword-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.keyword-chips a {
  display: inline-block;
  padding: 4px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px; color: var(--muted);
  transition: border-color 180ms ease, color 180ms ease;
}
.keyword-chips a:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ------------------------------------------------------------ buttons */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14.5px; font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease, background 180ms ease, border-color 180ms ease;
}
.button--primary { background: var(--accent); color: var(--accent-contrast, #fff); }
.button--primary:hover { filter: brightness(1.06); }
.button--ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.button--ghost:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.button--block { width: 100%; }
.button .icon { flex: none; }
.button-note { margin-left: 6px; font-weight: 400; font-size: 12.5px; color: var(--muted); }

.pseudo-button {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px;
  padding: 8px 16px;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  transition: border-color 180ms ease;
}

/* ------------------------------------------------------------- tiles */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(var(--tile-columns, 5), minmax(0, 1fr));
  gap: 12px;
}
.tile {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 180ms ease, transform 180ms ease;
}
.tile:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  transform: translateY(-1px);
}
.tile-icon {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-ink, var(--accent));
}
.tile-label { font-size: 14px; font-weight: 600; }
.tile-count { margin-left: auto; font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------ ranking */

.rank-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.rank-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 180ms ease, transform 180ms ease;
}
.rank-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  transform: translateY(-1px);
}
.rank-card-link { display: block; padding: 14px; }
.rank-card-head { display: flex; align-items: center; gap: 8px; }
.rank-card-name { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; }
.rank-card-body { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.rank-card-note {
  font-size: 12px; line-height: 1.55; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.rank-badge {
  display: grid; place-items: center; flex: none;
  width: 22px; height: 22px;
  border-radius: 7px;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: #fff;
  background: var(--rank-plain, #2A2A33);
}
.rank-badge--1 { background: linear-gradient(150deg, #E7C066, #C79A3C); }
.rank-badge--2 { background: linear-gradient(150deg, #C9CBD1, #A3A7B0); }
.rank-badge--3 { background: linear-gradient(150deg, #D9A277, #B57A4C); }

.logo-tile {
  display: grid; place-items: center; flex: none;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: hsl(var(--tile-hue, 250) 62% 95%);
  color: hsl(var(--tile-hue, 250) 45% 38%);
  border: 1px solid hsl(var(--tile-hue, 250) 45% 88%);
  font-family: var(--font-heading, inherit);
  font-size: 15px; font-weight: 700; letter-spacing: -0.02em;
}
.logo-tile--sm { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
.logo-tile--lg { width: 60px; height: 60px; border-radius: 16px; font-size: 21px; }

.rank-list { display: flex; flex-direction: column; gap: 16px; }
.rank-row {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.rank-row-head { display: flex; align-items: center; gap: 12px; }
.rank-row-title { flex: 1; min-width: 0; }
.rank-row-title h3 { font-size: 18px; }
.rank-row-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 4px; font-size: 12.5px; color: var(--muted);
}
.rank-row-summary { margin-top: 14px; font-size: 14.5px; }
.rank-row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.price { font-weight: 600; color: var(--text); }

.score { display: inline-flex; align-items: baseline; gap: 1px; flex: none; }
.score-value {
  font-family: var(--font-heading, inherit);
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--accent-ink, var(--accent));
}
.score-max { font-size: 11px; color: var(--muted); }

.stars { display: inline-flex; align-items: center; gap: 3px; }
.stars .icon { color: #D9A93C; fill: #D9A93C; }

.pros-cons {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
  margin-top: 16px;
}
.pros-cons-title {
  margin-bottom: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted);
}
.pros ul, .cons ul, .check-list { display: flex; flex-direction: column; gap: 6px; }
.pros li, .cons li, .check-list li {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 13.5px; line-height: 1.65;
}
.pros .icon { color: #3F8F5E; margin-top: 4px; flex: none; }
.cons .icon, .check-list--muted .icon { color: var(--muted); margin-top: 4px; flex: none; }
.check-list .icon { color: var(--accent-ink, var(--accent)); margin-top: 4px; flex: none; }
.check-list--lg li { font-size: 15px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip {
  padding: 3px 10px;
  border: 1px solid var(--border); border-radius: 999px;
  font-size: 12px; color: var(--muted);
}

.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11.5px; color: var(--muted);
}
.tag--soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink, var(--accent)); }

/* --------------------------------------------------------- item lists */

.item-list { display: flex; flex-direction: column; }
.item-row + .item-row { border-top: 1px solid var(--border); }
.item-row-link {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 6px;
  transition: background 180ms ease;
}
.item-row-link:hover { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.item-row-link > .icon { color: var(--muted); flex: none; }
.item-row-body { flex: 1; min-width: 0; }
.item-row-name { font-size: 15px; font-weight: 700; display: flex; align-items: baseline; gap: 10px; }
.item-row-price { font-size: 12px; font-weight: 500; color: var(--muted); }
.item-row-note {
  font-size: 13px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

/* ----------------------------------------------------------- editorial */

.featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 18px;
}
.featured-side { display: flex; flex-direction: column; gap: 14px; }

.feature-card, .story-card, .latest-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 180ms ease, transform 180ms ease;
}
.feature-card:hover, .story-card:hover, .latest-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  transform: translateY(-1px);
}
.feature-card > a { display: flex; flex-direction: column; height: 100%; }
.feature-card .thumb { aspect-ratio: 16 / 9; }
.feature-card-body { padding: 20px 22px 22px; }
.feature-card-title { margin-top: 10px; font-size: 24px; letter-spacing: -0.02em; }
.feature-card-lead { margin-top: 10px; font-size: 14px; color: var(--muted); }

.story-card > a { display: flex; align-items: stretch; gap: 14px; height: 100%; }
.story-card-body { flex: 1; padding: 16px 0 16px 18px; }
.story-card-title { margin-top: 8px; font-size: 15px; line-height: 1.5; }
.story-card-date, .latest-card-date, .entry-date {
  margin-top: 8px; font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.story-card .thumb { width: 116px; flex: none; border-radius: 0; }

.latest-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.latest-card > a { display: flex; flex-direction: column; height: 100%; }
.latest-card-body { padding: 14px 16px 18px; }
.latest-card-title { margin-top: 8px; font-size: 15px; line-height: 1.55; }

.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--surface-alt, color-mix(in srgb, var(--muted) 10%, transparent));
  font-size: 11.5px; font-weight: 600; color: var(--muted);
}
.badge--accent { background: var(--accent-soft); color: var(--accent-ink, var(--accent)); }

/* Generated artwork stands in for photography until art direction lands. */
.thumb {
  position: relative; display: block;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(120% 120% at 20% 15%, color-mix(in srgb, var(--accent) 26%, var(--surface)) 0%, transparent 60%),
    radial-gradient(100% 100% at 85% 80%, color-mix(in srgb, var(--accent) 14%, var(--surface)) 0%, transparent 65%),
    var(--accent-soft);
  overflow: hidden;
}
.thumb--tall { aspect-ratio: 16 / 10; }
.thumb-glyph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: color-mix(in srgb, var(--accent) 60%, var(--surface));
}
.thumb--abstract-2 { filter: hue-rotate(28deg); }
.thumb--abstract-3 { filter: hue-rotate(-32deg); }
.thumb--abstract-4 { filter: hue-rotate(58deg) saturate(0.9); }
.thumb--abstract-5 { filter: hue-rotate(-70deg) saturate(0.85); }
.thumb--abstract-6 { filter: grayscale(0.35) hue-rotate(15deg); }

/* --------------------------------------------------------------- guide */

.guide-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.guide-card {
  display: flex; align-items: center; gap: 12px;
  height: 100%;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 180ms ease, transform 180ms ease;
}
.guide-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  transform: translateY(-1px);
}
.guide-icon {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-ink, var(--accent));
}
.guide-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.guide-title { font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.guide-note { font-size: 12px; color: var(--muted); line-height: 1.5; }
.guide-arrow { color: var(--muted); flex: none; }

/* ---------------------------------------------------------- page heads */

.breadcrumbs { padding: 18px 0 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 2px; }
.breadcrumbs a:hover { color: var(--text); }

.page-head { padding: 28px 0 8px; }
.page-title { font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -0.025em; }
.article-title { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.4; }
.page-lead { margin-top: 14px; font-size: 15.5px; color: var(--muted); max-width: 62ch; }
.page-meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: 14px; font-size: 12.5px; color: var(--muted);
}

.detail-head { display: flex; align-items: center; gap: 16px; }
.detail-head > div { flex: 1; min-width: 0; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.pr-note {
  margin-top: 16px;
  padding: 8px 12px;
  border-left: 2px solid var(--border);
  font-size: 12px; color: var(--muted); line-height: 1.6;
}

/* ------------------------------------------------------------ content */

.conclusion-box {
  padding: 20px 22px;
  background: var(--accent-soft);
  border-radius: 16px;
}
.conclusion-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--accent-ink, var(--accent));
}
.conclusion-body { margin-top: 8px; font-size: 15px; }
.conclusion-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.conclusion-list li { display: flex; gap: 10px; font-size: 14px; }
.conclusion-list strong { flex: none; min-width: 7em; }

.prose { font-size: 16px; }
.prose h2 {
  margin: 40px 0 14px;
  padding-bottom: 10px;
  font-size: 22px;
  border-bottom: 1px solid var(--border);
}
.prose h3 { margin: 28px 0 10px; font-size: 17px; }
.prose p + p { margin-top: 16px; }
.prose ul { margin: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.prose li { position: relative; padding-left: 18px; font-size: 15px; }
.prose li::before {
  content: ""; position: absolute; left: 4px; top: 12px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }

.split-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.split-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.split-card--soft { background: var(--surface-alt, var(--surface)); }
.split-title { font-size: 16px; margin-bottom: 12px; }
.split-lead { margin-bottom: 14px; font-size: 14px; color: var(--muted); }
.split-card .pros-cons-title { margin-top: 14px; }
.split-card .button { margin-top: 16px; }

.versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 20px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}
.versus-side { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.versus-name { font-size: 18px; }
.versus-price { font-size: 13px; color: var(--muted); }
.versus-mark {
  font-family: var(--font-heading, inherit);
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--muted);
}

.spec-list { border-top: 1px solid var(--border); }
.spec-row {
  display: grid; grid-template-columns: 200px 1fr; gap: 16px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.spec-row dt { color: var(--muted); }
.spec-row dd { margin: 0; word-break: break-word; }
.yes { display: inline-flex; align-items: center; gap: 4px; color: #3F8F5E; }
.no { display: inline-flex; align-items: center; gap: 4px; color: color-mix(in srgb, var(--muted) 70%, transparent); }

.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.faq summary { cursor: pointer; font-size: 15px; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; float: right; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* -------------------------------------------------------------- table */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  white-space: nowrap;
}
.comparison-table caption { padding: 14px 16px 0; text-align: left; font-size: 13px; color: var(--muted); }
.comparison-table th, .comparison-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.comparison-table thead th {
  background: var(--surface-alt, var(--surface));
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  position: sticky; top: 0; z-index: 2;
}
.comparison-table tbody tr:last-child th,
.comparison-table tbody tr:last-child td { border-bottom: 0; }
.sticky-col {
  position: sticky; left: 0; z-index: 1;
  background: var(--surface);
  text-align: left !important;
  font-weight: 700;
  box-shadow: 1px 0 0 var(--border);
}
.comparison-table thead .sticky-col { z-index: 3; background: var(--surface-alt, var(--surface)); }
.table-rank {
  display: inline-grid; place-items: center;
  width: 18px; height: 18px; margin-right: 8px;
  border-radius: 5px;
  background: var(--accent-soft); color: var(--accent-ink, var(--accent));
  font-size: 11px; font-weight: 700;
}
.group-row th {
  background: var(--surface-alt, var(--surface));
  text-align: left !important;
  font-size: 12px; letter-spacing: 0.04em; color: var(--muted);
}
.table-note { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.cell--number { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ related */

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.block-title { font-size: 14px; margin-bottom: 10px; }
.link-list { display: flex; flex-direction: column; }
.link-list li + li { border-top: 1px solid var(--border); }
.link-list a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 2px;
  font-size: 14px;
  transition: color 180ms ease;
}
.link-list a:hover { color: var(--accent-ink, var(--accent)); }
.link-list-title { flex: 1; min-width: 0; }
.link-list .icon { color: var(--muted); flex: none; }

/* ------------------------------------------------------------- lists */

.entry-list { display: flex; flex-direction: column; }
.entry-list li + li { border-top: 1px solid var(--border); }
.entry {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 6px;
  transition: background 180ms ease;
}
.entry:hover { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.entry-body { flex: 1; min-width: 0; }
.entry-meta { display: flex; align-items: center; gap: 10px; }
.entry-title { margin-top: 6px; font-size: 16px; font-weight: 700; }
.entry-description { margin-top: 4px; font-size: 13px; color: var(--muted); }
.entry > .icon { color: var(--muted); flex: none; }
.search-status { font-size: 13px; color: var(--muted); margin-bottom: 8px; }

.article-hero { margin-top: 20px; border-radius: 18px; overflow: hidden; }
.article-hero .thumb { aspect-ratio: 24 / 9; }

.error-block { padding: 80px 0 120px; text-align: center; }
.error-block .hero-actions { justify-content: center; }

/* ---------------------------------------------------------------- CTA */

.cta-block {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  background: var(--accent-soft);
  border-radius: 18px;
}
.cta-title { font-size: 16px; font-weight: 700; }
.cta-price { margin-top: 4px; font-size: 13.5px; color: var(--accent-ink, var(--accent)); }
.cta-note { font-size: 12px; color: var(--muted); }
.cta-block-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------------------- footer */

.site-footer {
  margin-top: 40px;
  background: var(--surface-alt, var(--surface));
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 40px;
  padding-top: 48px; padding-bottom: 36px;
}
.footer-description { margin-top: 12px; font-size: 13px; color: var(--muted); max-width: 32ch; }
.footer-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer-heading { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 10px; }
.footer-column ul { display: flex; flex-direction: column; gap: 8px; }
.footer-column a { font-size: 13px; color: var(--muted); }
.footer-column a:hover { color: var(--text); }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-top: 18px; padding-bottom: 28px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
}
.footer-base .disclosure { max-width: 62ch; line-height: 1.6; }

/* --------------------------------------------------------- responsive */

@media (max-width: 1199px) {
  .rank-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 420px; }
  .featured-grid { grid-template-columns: 1fr; }
  .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding: 44px 0; }
}

@media (max-width: 767px) {
  .container { padding: 0 20px; }
  .nav { display: none; }
  .menu-toggle { display: grid; }
  .header-inner { height: 64px; gap: 12px; }
  .logo { margin-right: auto; }

  .hero { padding: 32px 0 36px; }
  .hero-visual { display: none; }
  .hero-title { font-size: clamp(28px, 8vw, 34px); }
  .search-form { margin-top: 20px; }

  .section { padding: 40px 0; }
  .section--related { padding-bottom: 48px; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rank-strip { grid-template-columns: 1fr; }
  .rank-card-body { margin-top: 8px; }
  .guide-grid, .latest-grid, .split-grid, .pros-cons { grid-template-columns: 1fr; }
  .rank-row { padding: 18px; }
  .rank-row-actions .button { flex: 1; }
  .feature-card-title { font-size: 20px; }
  .story-card > a { flex-direction: row-reverse; }
  .story-card .thumb { width: 96px; }
  .versus { grid-template-columns: 1fr; gap: 14px; }
  .versus-mark { justify-self: center; }
  .spec-row { grid-template-columns: 1fr; gap: 2px; }
  .cta-block { flex-direction: column; align-items: flex-start; }
  .cta-block-actions { width: 100%; }
  .cta-block-actions .button { flex: 1; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .site-footer, .breadcrumbs, .cta-block { display: none; }
}

/* ============================================================ editorial
   Variants for sites whose subject is a physical product: the picture
   carries the page, the copy supports it. Selected per site in config
   (hero.variant / sections.ranking.variant), not by hardcoded site id. */

.hero--editorial { padding: 0 0 56px; }
.hero-editorial-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: stretch;
  gap: 0;
}
.hero--editorial .hero-copy {
  align-self: center;
  padding: 72px 48px 72px 0;
}
.hero-title-line { display: block; }
.hero--editorial .hero-title { letter-spacing: -0.01em; }
.hero--editorial .hero-lead { margin-top: 20px; font-size: 16px; }

/* Stands in for the large product photograph the design calls for. */
/* The tints are theme variables so each brand sets its own mood: a green
   field, a warm ivory studio. Defaults derive from the accent. */
.hero-figure {
  position: relative;
  min-height: 420px;
  border-radius: 0 0 0 var(--radius, 16px);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 70% 20%,
      var(--figure-highlight, color-mix(in srgb, var(--accent) 22%, var(--surface))) 0%, transparent 62%),
    linear-gradient(160deg,
      var(--figure-base, color-mix(in srgb, var(--accent) 30%, var(--background))) 0%, var(--background) 78%);
}
.hero-figure::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 42%;
  background: linear-gradient(0deg,
    var(--figure-base, color-mix(in srgb, var(--accent) 26%, transparent)), transparent);
  opacity: .7;
}
.hero-figure-glyph {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-52%, -52%) rotate(-8deg);
  color: var(--figure-glyph, color-mix(in srgb, var(--accent) 62%, var(--surface)));
  opacity: var(--figure-glyph-opacity, .92);
}
.hero-figure-ball {
  position: absolute; right: 18%; bottom: 22%;
  color: var(--surface);
  filter: drop-shadow(0 2px 6px rgb(0 0 0 / .12));
}

/* Product silhouette plate — the stand-in for product photography. */
.product-plate {
  position: relative;
  display: grid; place-items: center; flex: none;
  width: 60px; height: 60px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: color-mix(in srgb, var(--accent) 72%, var(--text));
  background:
    radial-gradient(90% 80% at 30% 20%, color-mix(in srgb, var(--accent) 14%, var(--surface)) 0%, var(--surface) 70%);
  overflow: hidden;
}
.product-plate--sm { width: 42px; height: 42px; border-radius: 10px; }
.product-plate--lg { width: 88px; height: 88px; border-radius: 16px; }
/* fills its column — used where the product is the subject, not a marker */
.product-plate--hero { width: 100%; aspect-ratio: 4 / 3; height: auto; border-radius: 14px; }
.product-plate--tone2 { background:
  radial-gradient(90% 80% at 70% 25%, color-mix(in srgb, var(--accent-2, var(--accent)) 16%, var(--surface)) 0%, var(--surface) 72%); }
.product-plate--tone3 { background:
  radial-gradient(85% 85% at 45% 75%, color-mix(in srgb, var(--accent) 18%, var(--surface-alt, var(--surface))) 0%, var(--surface) 68%); }

.edit-list { display: flex; flex-direction: column; }
.edit-row {
  display: grid;
  grid-template-columns: var(--edit-visual-width, 160px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 22px 4px;
  border-top: 1px solid var(--border);
}
.edit-list .edit-row:last-child { border-bottom: 1px solid var(--border); }
.edit-row-visual { position: relative; display: block; }
.edit-row-visual .rank-badge {
  position: absolute; top: 8px; left: 8px;
  width: 26px; height: 26px; border-radius: 8px; font-size: 13px;
}
.edit-row-brand {
  font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.edit-row-name {
  margin-top: 4px;
  font-size: 20px; letter-spacing: -0.01em;
}
.edit-row-note { margin-top: 8px; font-size: 14px; color: var(--muted); }
.edit-row-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  margin-top: 10px; font-size: 13px; color: var(--muted);
}

.score-cell { font-variant-numeric: tabular-nums; font-weight: 600; }
.score-cell-max { font-size: 11px; color: var(--muted); font-weight: 400; }

.spec-group-title {
  margin: 28px 0 6px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: var(--muted);
}

@media (max-width: 1023px) {
  .hero-editorial-inner { grid-template-columns: 1fr; }
  .hero--editorial .hero-copy { padding: 48px 0 32px; order: 2; }
  .hero-figure { min-height: 300px; order: 1; border-radius: 0; }
}

@media (max-width: 767px) {
  .edit-row { grid-template-columns: 110px minmax(0, 1fr); gap: 16px; }
  .edit-row .score { grid-column: 2; justify-self: start; }
  .edit-row-name { font-size: 17px; }
  .hero-figure { min-height: 220px; }
  .hero-figure-glyph svg { width: 130px; height: 130px; }
}

/* Ranking rows as a magazine listing: no card chrome, the product leads. */
.rank-row--editorial {
  background: none;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 30px 4px;
}
.rank-list .rank-row--editorial:last-child { border-bottom: 1px solid var(--border); }
.rank-row--editorial .rank-row-head { align-items: flex-start; gap: 20px; }
.rank-row--editorial .rank-badge { margin-top: 6px; }
.rank-row--editorial .rank-row-title h3 { font-size: 22px; }
.rank-row--editorial .rank-row-summary { margin-top: 16px; max-width: 68ch; }

@media (max-width: 767px) {
  .rank-row--editorial { padding: 22px 0; }
  .rank-row--editorial .rank-row-head { gap: 12px; }
  .rank-row--editorial .logo-tile--lg,
  .rank-row--editorial .product-plate--lg { width: 64px; height: 64px; }
}
