/* ========================================
   LLM123.co — 薅报 Design System
   Editorial newspaper × Data dashboard
   ======================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Noto+Serif+SC:wght@400;500;600;700;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --- CSS Variables --- */
:root {
  /* Light theme — warm cream paper */
  --bg-primary: #FDF6EC;
  --bg-secondary: #F5EBDA;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FFF9F0;
  --bg-accent: #E8590C;
  --bg-accent-soft: #FFF0E6;
  --bg-tag: #FEF3C7;
  --bg-code: #F3ECE0;

  --text-primary: #1C1410;
  --text-secondary: #6B5B4F;
  --text-tertiary: #9C8B7E;
  --text-accent: #E8590C;
  --text-inverse: #FDF6EC;
  --text-link: #C2410C;

  --border-primary: #D4C4A8;
  --border-secondary: #E8DCC8;
  --border-accent: #E8590C;
  --border-heavy: #1C1410;

  --shadow-sm: 0 1px 2px rgba(28,20,16,0.06);
  --shadow-md: 0 4px 12px rgba(28,20,16,0.08);
  --shadow-lg: 0 8px 32px rgba(28,20,16,0.12);
  --shadow-glow: 0 0 20px rgba(232,89,12,0.15);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font-display: 'Outfit', sans-serif;
  --font-body: 'Noto Serif SC', 'Georgia', serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --green: #16A34A;
  --yellow: #CA8A04;
  --red: #DC2626;
  --green-bg: #DCFCE7;
  --yellow-bg: #FEF9C3;
  --red-bg: #FEE2E2;

  --bar-green: #22C55E;
  --bar-yellow: #EAB308;
  --bar-red: #EF4444;
}

[data-theme="dark"] {
  --bg-primary: #0F0D0A;
  --bg-secondary: #1A1714;
  --bg-card: #211E19;
  --bg-card-hover: #2A261F;
  --bg-accent: #F97316;
  --bg-accent-soft: #2A1A0A;
  --bg-tag: #422006;
  --bg-code: #1A1714;

  --text-primary: #F5EBDA;
  --text-secondary: #A89B8C;
  --text-tertiary: #6B5B4F;
  --text-accent: #FB923C;
  --text-inverse: #0F0D0A;
  --text-link: #FB923C;

  --border-primary: #3D3529;
  --border-secondary: #2A261F;
  --border-accent: #F97316;
  --border-heavy: #F5EBDA;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 24px rgba(249,115,22,0.2);

  --green-bg: #052E16;
  --yellow-bg: #422006;
  --red-bg: #450A0A;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  transition: background 0.4s var(--ease-out), color 0.3s var(--ease-out);
}

/* Noise overlay for paper texture */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--text-accent); }
a:focus-visible {
  outline: 2px solid var(--bg-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

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

/* --- Utility Classes --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
.text-accent { color: var(--text-accent); }
.text-secondary { color: var(--text-secondary); }
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }

/* --- Entrance Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes stampIn {
  0% { opacity: 0; transform: scale(2) rotate(-12deg); }
  60% { opacity: 1; transform: scale(0.95) rotate(1deg); }
  100% { opacity: 1; transform: scale(1) rotate(-2deg); }
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.anim-fade-up {
  opacity: 0;
  animation: fadeUp 0.6s var(--ease-out) forwards;
}
.anim-stagger-1 { animation-delay: 0.1s; }
.anim-stagger-2 { animation-delay: 0.2s; }
.anim-stagger-3 { animation-delay: 0.3s; }
.anim-stagger-4 { animation-delay: 0.4s; }
.anim-stagger-5 { animation-delay: 0.5s; }
.anim-stagger-6 { animation-delay: 0.6s; }

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-bottom: 2px solid var(--border-heavy);
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  box-shadow: var(--shadow-md);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}
.nav-logo:hover { color: var(--text-accent); }
.nav-logo .logo-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--bg-accent);
  border-radius: 50%;
  margin-left: 2px;
  animation: pulse 2s infinite;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.theme-toggle {
  background: none;
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-primary);
  transition: all 0.3s var(--ease-out);
  display: flex;
  align-items: center;
}
.theme-toggle:hover {
  border-color: var(--border-accent);
  transform: rotate(20deg);
  box-shadow: var(--shadow-glow);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-primary);
  font-size: 1.3rem;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 2px solid var(--border-heavy);
    flex-direction: column;
    padding: 12px 20px;
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    width: 100%;
    padding: 10px 12px;
  }
}

/* --- Hero Section --- */
.hero {
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at center, var(--bg-accent-soft) 0%, transparent 60%);
  opacity: 0.5;
  pointer-events: none;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  position: relative;
  margin-bottom: 16px;
}
.hero-title .highlight {
  color: var(--text-accent);
  position: relative;
  display: inline-block;
}
.hero-title .highlight::after {
  content: '';
  position: absolute;
  bottom: 4px; left: -4px; right: -4px;
  height: 30%;
  background: var(--bg-accent);
  opacity: 0.15;
  border-radius: 2px;
  transform: skew(-2deg);
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.hero-stamp {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.75rem;
  color: var(--red);
  border: 3px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  transform: rotate(-4deg);
  margin-top: 20px;
  opacity: 0;
  animation: stampIn 0.5s 0.8s var(--ease-out) forwards;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Ticker / 羊毛速报 --- */
.ticker-section {
  padding: 24px 0;
  border-top: 1px solid var(--border-secondary);
  border-bottom: 1px solid var(--border-secondary);
  overflow: hidden;
}
.ticker-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ticker-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-secondary);
}

.ticker-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 8px;
}
.ticker-track::-webkit-scrollbar { display: none; }

.ticker-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all 0.3s var(--ease-out);
  cursor: default;
}
.ticker-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}
.ticker-card-emoji {
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.ticker-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.ticker-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.ticker-card-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--bg-tag);
  color: var(--text-accent);
  padding: 2px 8px;
  border-radius: 99px;
  margin-top: 8px;
}

/* --- Section Headers --- */
.section {
  padding: 48px 0;
}
.section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--border-heavy);
  padding-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.section-subtitle {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-weight: 400;
}
.section-edition {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

/* --- Price Table --- */
.price-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}
.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.price-table thead {
  border-bottom: 2px solid var(--border-heavy);
}
.price-table th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}
.price-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-secondary);
  white-space: nowrap;
}
.price-table tbody tr {
  transition: background 0.2s;
}
.price-table tbody tr:hover {
  background: var(--bg-card-hover);
}
.price-table tbody tr:last-child td {
  border-bottom: none;
}

.model-name {
  font-family: var(--font-display);
  font-weight: 600;
}
.model-provider {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-family: var(--font-display);
}
.price-val {
  font-family: var(--font-mono);
  font-weight: 500;
}
.price-cheap { color: var(--green); }
.price-mid { color: var(--yellow); }
.price-expensive { color: var(--red); }

.free-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--green);
  background: var(--green-bg);
  padding: 2px 10px;
  border-radius: 99px;
  border: 1px solid var(--green);
}

.context-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* --- Provider Cards --- */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}
.provider-card {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.provider-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.provider-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--bg-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.provider-card:hover::before {
  transform: scaleX(1);
}

.provider-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.provider-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}
.provider-name a {
  color: var(--text-primary);
  text-decoration: none;
}
.provider-name a:hover {
  color: var(--text-accent);
}

.provider-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid;
}
.badge-risk-low {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-bg);
}
.badge-risk-medium {
  color: var(--yellow);
  border-color: var(--yellow);
  background: var(--yellow-bg);
}
.badge-risk-high {
  color: var(--red);
  border-color: var(--red);
  background: var(--red-bg);
}
.badge-tested {
  color: var(--text-accent);
  border-color: var(--border-accent);
  background: var(--bg-accent-soft);
}
.badge-openclaw {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-bg);
}
.badge-commission {
  color: var(--yellow);
  border-color: var(--yellow);
  background: var(--yellow-bg);
}

.provider-meta {
  display: flex;
  gap: 16px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.provider-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Rating bars */
.rating-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rating-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  width: 48px;
  flex-shrink: 0;
}
.rating-bar {
  flex: 1;
  display: flex;
  gap: 3px;
  height: 8px;
}
.rating-segment {
  flex: 1;
  border-radius: 2px;
  background: var(--border-secondary);
  transition: background 0.3s, transform 0.2s;
}
.rating-segment.filled {
  transform: scaleY(1);
}
.rating-segment.filled.green { background: var(--bar-green); }
.rating-segment.filled.yellow { background: var(--bar-yellow); }
.rating-segment.filled.red { background: var(--bar-red); }

.provider-card:hover .rating-segment.filled {
  transform: scaleY(1.3);
}

.rating-score {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

.provider-review {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border-accent);
}

.provider-tip {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--text-accent);
  font-weight: 500;
}
.provider-tip::before {
  content: '💡 ';
}

/* --- Recommendation Cards --- */
.reco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.reco-card {
  background: var(--bg-card);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: all 0.3s var(--ease-out);
  cursor: pointer;
}
.reco-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px) rotate(-1deg);
}
.reco-card-emoji {
  font-size: 2.5rem;
  margin-bottom: 8px;
}
.reco-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.reco-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.reco-card-pick {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-accent);
  margin-top: 10px;
}

/* --- Filter Buttons --- */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filter-btn {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  padding: 6px 16px;
  border: 1px solid var(--border-primary);
  border-radius: 99px;
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}
.filter-btn:hover {
  border-color: var(--border-accent);
  color: var(--text-accent);
}
.filter-btn.active {
  background: var(--bg-accent);
  color: var(--text-inverse);
  border-color: var(--bg-accent);
}

/* --- Bar Chart (CSS) --- */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bar-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  width: 120px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-track {
  flex: 1;
  height: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}
.bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  transition: width 0.8s var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  min-width: 40px;
}
.bar-fill-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.bar-value {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  width: 72px;
  text-align: right;
  flex-shrink: 0;
  color: var(--text-secondary);
}

/* Bar colors by provider position */
.bar-fill.c0 { background: #E8590C; }
.bar-fill.c1 { background: #D97706; }
.bar-fill.c2 { background: #CA8A04; }
.bar-fill.c3 { background: #65A30D; }
.bar-fill.c4 { background: #059669; }
.bar-fill.c5 { background: #0891B2; }
.bar-fill.c6 { background: #6366F1; }
.bar-fill.c7 { background: #9333EA; }
.bar-fill.c8 { background: #DB2777; }
.bar-fill.c9 { background: #78716C; }

/* --- Price Toggle --- */
.price-toggle {
  display: inline-flex;
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}
.price-toggle-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 8px 20px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.price-toggle-btn.active {
  background: var(--bg-accent);
  color: var(--text-inverse);
}

/* --- Calculator --- */
.calculator {
  background: var(--bg-card);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.calc-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.calc-field label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 6px;
}
.calc-field select,
.calc-field input {
  width: 100%;
  font-family: var(--font-display);
  font-size: 0.9rem;
  padding: 10px 12px;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.2s;
}
.calc-field select:focus,
.calc-field input:focus {
  outline: none;
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px var(--bg-accent-soft);
}

.calc-result {
  background: var(--bg-accent-soft);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}
.calc-result-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.calc-result-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--text-accent);
}
.calc-result-detail {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* --- Free Section --- */
.free-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.free-card {
  background: var(--bg-card);
  border: 2px dashed var(--green);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all 0.3s var(--ease-out);
}
.free-card:hover {
  background: var(--green-bg);
  transform: scale(1.02);
}
.free-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.free-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* --- Community / QR Section --- */
.community-section {
  text-align: center;
  padding: 48px 0;
}
.qr-placeholder {
  width: 180px;
  height: 180px;
  border: 2px dashed var(--border-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px auto;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-tertiary);
  transition: border-color 0.3s;
}
.qr-placeholder:hover {
  border-color: var(--border-accent);
}

/* --- Compatibility Matrix --- */
.matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}
.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.matrix-table th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px;
  text-align: center;
  border-bottom: 2px solid var(--border-heavy);
  color: var(--text-secondary);
  white-space: nowrap;
}
.matrix-table th:first-child {
  text-align: left;
}
.matrix-table td {
  padding: 10px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border-secondary);
}
.matrix-table td:first-child {
  text-align: left;
  font-family: var(--font-display);
  font-weight: 500;
}
.matrix-table tbody tr:hover {
  background: var(--bg-card-hover);
}

/* --- About Page --- */
.about-section {
  padding: 40px 0;
}
.about-block {
  margin-bottom: 40px;
}
.about-block h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  border-bottom: 2px solid var(--border-heavy);
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.about-block p, .about-block li {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-secondary);
}
.about-block ul {
  padding-left: 20px;
}
.about-block li {
  margin-bottom: 6px;
}

.spending-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.spending-table th {
  font-family: var(--font-display);
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid var(--border-heavy);
  color: var(--text-secondary);
}
.spending-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-secondary);
}

/* --- Footer --- */
.footer {
  border-top: 2px solid var(--border-heavy);
  padding: 24px 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--text-tertiary);
}
.footer a {
  color: var(--text-secondary);
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 8px;
}

/* --- Skeleton Loading --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-line {
  height: 16px;
  margin-bottom: 8px;
}
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-40 { width: 40%; }

/* --- Error State --- */
.error-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.error-state-emoji {
  font-size: 3rem;
  margin-bottom: 12px;
}
.error-state-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.retry-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 24px;
  border: 2px solid var(--border-accent);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-accent);
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
}
.retry-btn:hover {
  background: var(--bg-accent);
  color: var(--text-inverse);
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
  font-family: var(--font-display);
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .section { padding: 32px 0; }
  .hero { padding: 40px 0 24px; }
  .provider-grid { grid-template-columns: 1fr; }
  .reco-grid { grid-template-columns: 1fr; }
  .bar-label { width: 80px; font-size: 0.72rem; }
  .bar-value { width: 60px; font-size: 0.7rem; }
  .calc-grid { grid-template-columns: 1fr; }
  .calculator { padding: 20px; }
  .price-table th, .price-table td { padding: 10px; font-size: 0.8rem; }
}

/* --- Focus visible for keyboard nav --- */
button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--bg-accent);
  outline-offset: 2px;
}

/* --- Scrollbar (webkit) --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* --- Model Group Headers --- */
.model-group {
  margin-bottom: 32px;
}
.model-group-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 4px solid var(--bg-accent);
}

/* --- Price comparison highlight --- */
.cheapest-cell {
  position: relative;
}
.cheapest-cell::after {
  content: '最低';
  position: absolute;
  top: -6px; right: 4px;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--green);
  background: var(--green-bg);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ========================================
   Guides — List & Article Pages
   ======================================== */

/* Guide filter buttons */
.guide-filter {
  padding: 0.4rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--border-secondary);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font-display);
  transition: all 0.2s var(--ease-out);
}
.guide-filter:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
}
.guide-filter.active {
  background: var(--bg-accent);
  color: var(--text-inverse);
  border-color: var(--bg-accent);
}

/* Guide grid */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

/* Guide card */
.guide-card {
  text-decoration: none;
  color: inherit;
  display: block;
}
.guide-card-inner {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.guide-card-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--bg-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.guide-card:hover .guide-card-inner {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.guide-card:hover .guide-card-inner::before {
  transform: scaleX(1);
}

.guide-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.guide-card-summary {
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.guide-cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-display);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-tertiary);
  font-family: var(--font-body);
}

/* Article page */
.article-container {
  max-width: 720px;
  padding-bottom: 4rem;
}

.article-header {
  margin-bottom: 1.5rem;
}
.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
}
.article-subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.article-body {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--text-secondary);
}
.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-secondary);
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.5rem;
}
.article-body p {
  margin-bottom: 1rem;
}
.article-body strong {
  color: var(--text-primary);
  font-weight: 600;
}
.article-body a {
  color: var(--text-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-body a:hover {
  color: var(--text-link, var(--text-accent));
}
.article-body ul, .article-body ol {
  margin: 0.75rem 0 1rem 1.5rem;
}
.article-body li {
  margin-bottom: 0.4rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1rem 0;
}
.article-card h3 {
  margin-top: 0 !important;
}
.article-card p:last-child {
  margin-bottom: 0;
}

/* Related links */
.related-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.related-link-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s var(--ease-out);
}
.related-link-card:hover {
  border-color: var(--border-accent);
  transform: translateX(4px);
}

@media (max-width: 640px) {
  .guide-grid { grid-template-columns: 1fr; }
  .article-body { font-size: 0.9rem; }
}
