/*
Theme Name: Hearit
Theme URI: https://hearit-hk.com
Author: 阿餅 + Vee
Author URI: https://hearit-hk.com
Description: 專為耳機評測而設嘅輕量 WordPress theme — 冷灰背景 + 暖橙 accent + deep navy 結構，現代 editorial 風格。
Version: 2.4
Requires at least: 6.7
Requires PHP: 7.4
License: GPL v3
Text Domain: hearit
*/

/* =============================================
   CSS Custom Properties (Design Tokens)
   ============================================= */
:root {
  /* Colors — Canvas & Surface */
  --hr-canvas: #EAEFEF;
  --hr-surface: #FFFFFF;
  --hr-surface-dim: #DDE3E3;
  --hr-surface-warm: #FFF8F5;

  /* Colors — Primary (Orange) */
  --hr-primary: #FF9B51;
  --hr-primary-dark: #954900;
  --hr-primary-container: #FFF0E6;
  --hr-on-primary: #FFFFFF;

  /* Colors — Structural (Deep Navy) */
  --hr-structural: #25343F;
  --hr-structural-light: #34495E;
  --hr-footer-bg: #1A202C;
  --hr-footer-text: #E2E8F0;

  /* Colors — Text */
  --hr-text-primary: #2D3748;
  --hr-text-secondary: #4A5568;
  --hr-text-muted: #718096;
  --hr-text-on-dark: #E2E8F0;

  /* Colors — Borders & Lines */
  --hr-border: #BFC9D1;
  --hr-border-light: rgba(191, 201, 209, 0.3);
  --hr-border-card: rgba(191, 201, 209, 0.5);

  /* Colors — Semantic */
  --hr-success: #2E7D32;
  --hr-success-bg: #E8F5E9;
  --hr-error: #BA1A1A;
  --hr-error-bg: #FFEBEE;
  --hr-warning: #E67E22;

  /* Typography */
  --hr-font: 'Noto Sans', 'Noto Sans TC', 'Noto Sans HK', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --hr-font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Font Sizes */
  --hr-text-xs: 0.75rem;    /* 12px */
  --hr-text-sm: 0.875rem;   /* 14px */
  --hr-text-base: 1rem;     /* 16px */
  --hr-text-lg: 1.125rem;   /* 18px */
  --hr-text-xl: 1.25rem;    /* 20px */
  --hr-text-2xl: 1.5rem;    /* 24px */
  --hr-text-3xl: 2rem;      /* 32px */
  --hr-text-4xl: 2.5rem;    /* 40px */
  --hr-text-5xl: 3rem;      /* 48px */

  /* Spacing (8px base) */
  --hr-space-1: 0.25rem;    /* 4px */
  --hr-space-2: 0.5rem;     /* 8px */
  --hr-space-3: 0.75rem;    /* 12px */
  --hr-space-4: 1rem;       /* 16px */
  --hr-space-5: 1.5rem;     /* 24px */
  --hr-space-6: 2rem;       /* 32px */
  --hr-space-8: 3rem;       /* 48px */
  --hr-space-10: 5rem;      /* 80px */

  /* Layout */
  --hr-content-width: 1200px;
  --hr-article-width: 680px;
  --hr-sidebar-width: 300px;
  --hr-gutter: 1.5rem;

  /* Radius */
  --hr-radius-sm: 4px;
  --hr-radius: 8px;
  --hr-radius-md: 12px;
  --hr-radius-lg: 16px;
  --hr-radius-full: 9999px;

  /* Shadows */
  --hr-shadow-card: 0 1px 3px rgba(37, 52, 63, 0.08);
  --hr-shadow-hover: 0 4px 12px rgba(37, 52, 63, 0.12);
  --hr-shadow-modal: 0 8px 24px rgba(37, 52, 63, 0.15);
  --hr-shadow-tech: 0 0 4px rgba(37, 52, 63, 0.1);

  /* Transitions */
  --hr-transition: 0.2s ease;
}

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

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

body {
  font-family: var(--hr-font);
  font-size: var(--hr-text-base);
  line-height: 1.75;
  color: var(--hr-text-primary);
  background: var(--hr-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--hr-primary-dark); text-decoration: none; transition: color var(--hr-transition); }
a:hover { color: var(--hr-primary); }
ul, ol { list-style: none; }

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--hr-text-primary);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--hr-space-4);
}
h1 { font-size: var(--hr-text-3xl); letter-spacing: -0.01em; }
h2 { font-size: var(--hr-text-2xl); }
h3 { font-size: var(--hr-text-xl); font-weight: 600; }
h4 { font-size: var(--hr-text-lg); font-weight: 600; }

p { margin-bottom: var(--hr-space-4); }
p:last-child { margin-bottom: 0; }

/* Container */
.hr-container {
  max-width: var(--hr-content-width);
  margin: 0 auto;
  padding: 0 var(--hr-gutter);
}

/* =============================================
   Header
   ============================================= */
.hr-header {
  background: var(--hr-structural);
  color: var(--hr-text-on-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.hr-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--hr-content-width);
  margin: 0 auto;
  padding: 0 var(--hr-gutter);
}
/* Custom Logo */
.hr-header .custom-logo-link {
  display: flex; align-items: center;
  flex-shrink: 0;
  line-height: 1;
}
.hr-header .custom-logo-link img,
.hr-header .custom-logo {
  max-height: 40px;
  width: auto;
  display: block;
}
.hr-logo {
  font-size: var(--hr-text-xl);
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.hr-logo:hover { color: var(--hr-primary); }
.hr-logo span { color: var(--hr-primary); }

/* Nav */
.hr-nav {
  display: flex; align-items: center; gap: 2px;
  flex-wrap: wrap;
}
.hr-nav li,
.hr-nav > li {
  list-style: none;
  display: flex;
}
.hr-nav a {
  color: rgba(255,255,255,0.75);
  font-size: var(--hr-text-sm);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--hr-radius);
  transition: color var(--hr-transition), background var(--hr-transition);
  white-space: nowrap;
}
.hr-nav a:hover, .hr-nav a.active {
  color: var(--hr-primary);
  background: rgba(255,255,255,0.06);
}

/* Header Actions */
.hr-header-actions { display: flex; align-items: center; gap: var(--hr-space-4); }
.hr-header-actions button {
  background: none; border: none; color: rgba(255,255,255,0.75); cursor: pointer;
  font-size: var(--hr-text-lg); padding: var(--hr-space-2); transition: color var(--hr-transition);
}
.hr-header-actions button:hover { color: var(--hr-primary); }

/* Mobile Menu Toggle */
.hr-menu-toggle { display: none; }

/* =============================================
   Footer
   ============================================= */
.hr-footer {
  background: var(--hr-footer-bg);
  color: var(--hr-footer-text);
  padding: var(--hr-space-10) 0 var(--hr-space-6);
  margin-top: var(--hr-space-10);
}
.hr-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--hr-space-8);
  max-width: var(--hr-content-width);
  margin: 0 auto;
  padding: 0 var(--hr-gutter);
}
.hr-footer h3 {
  color: #FFFFFF;
  font-size: var(--hr-text-lg);
  margin-bottom: var(--hr-space-4);
}
.hr-footer p, .hr-footer a {
  color: var(--hr-footer-text);
  font-size: var(--hr-text-sm);
  line-height: 1.8;
}
.hr-footer a:hover { color: var(--hr-primary); }
.hr-footer-links { display: flex; flex-direction: column; gap: var(--hr-space-2); }
.hr-footer-social { display: flex; gap: var(--hr-space-3); margin-top: var(--hr-space-3); }
.hr-footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--hr-radius);
  background: rgba(255,255,255,0.08); transition: background var(--hr-transition);
}
.hr-footer-social a:hover { background: var(--hr-primary); }
.hr-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: var(--hr-space-8);
  padding-top: var(--hr-space-5);
  text-align: center;
  font-size: var(--hr-text-xs);
  color: var(--hr-text-muted);
  max-width: var(--hr-content-width);
  margin-left: auto; margin-right: auto;
  padding-left: var(--hr-gutter); padding-right: var(--hr-gutter);
}

/* =============================================
   Buttons
   ============================================= */
.hr-btn {
  display: inline-flex; align-items: center; gap: var(--hr-space-2);
  padding: 10px 24px; border-radius: var(--hr-radius-lg);
  font-size: var(--hr-text-sm); font-weight: 600; font-family: var(--hr-font);
  cursor: pointer; transition: all var(--hr-transition); border: 2px solid transparent;
}
.hr-btn-primary {
  background: var(--hr-primary); color: #FFFFFF;
}
.hr-btn-primary:hover { background: var(--hr-primary-dark); color: #FFFFFF; }
.hr-btn-outline {
  border-color: var(--hr-structural); color: var(--hr-structural); background: transparent;
}
.hr-btn-outline:hover { background: var(--hr-structural); color: #FFFFFF; }
.hr-btn-sm { padding: 6px 16px; font-size: var(--hr-text-xs); }

/* =============================================
   Cards
   ============================================= */
.hr-card {
  background: var(--hr-surface);
  border: 1px solid var(--hr-border-card);
  border-radius: var(--hr-radius);
  overflow: hidden;
  transition: box-shadow var(--hr-transition);
}
.hr-card:hover { box-shadow: var(--hr-shadow-hover); }
.hr-card-body { padding: var(--hr-space-5); }
.hr-card-image {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  background: var(--hr-surface-dim);
}
.hr-card-header-dark {
  background: var(--hr-structural);
  color: #FFFFFF;
  padding: var(--hr-space-4) var(--hr-space-5);
  font-weight: 600;
  font-size: var(--hr-text-sm);
}

/* =============================================
   Tags / Pills
   ============================================= */
.hr-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--hr-radius-full);
  font-size: var(--hr-text-xs);
  font-weight: 600;
  background: rgba(191, 201, 209, 0.2);
  color: var(--hr-text-secondary);
  transition: all var(--hr-transition);
}
.hr-tag:hover { background: var(--hr-primary); color: #FFFFFF; }
.hr-tag-active { background: var(--hr-primary); color: #FFFFFF; }
.hr-tag-category { background: var(--hr-primary); color: #FFFFFF; font-size: var(--hr-text-xs); letter-spacing: 0.03em; }

/* =============================================
   Homepage: Hero
   ============================================= */
.hr-hero {
  position: relative;
  margin: 0 0 var(--hr-space-8) 0;
  overflow: hidden;
  background: var(--hr-structural);
}
.hr-hero-image { width: 100%; display: block; }
.hr-hero-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(26,32,44,0.85));
  color: #FFFFFF;
}
.hr-hero-content-inner {
  max-width: var(--hr-content-width);
  margin: 0 auto;
  padding: var(--hr-space-8) var(--hr-gutter) var(--hr-space-6);
}
.hr-hero-content .hr-tag-category { margin-bottom: var(--hr-space-3); }
.hr-hero-content h2 {
  color: #FFFFFF; font-size: var(--hr-text-3xl); margin-bottom: var(--hr-space-3); max-width: 700px;
}
.hr-hero-meta {
  display: flex; align-items: center; gap: var(--hr-space-4);
  font-size: var(--hr-text-sm); color: rgba(255,255,255,0.7);
}
.hr-hero-meta a { color: var(--hr-primary); }

/* =============================================
   Section Headers
   ============================================= */
.hr-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--hr-space-5); padding-bottom: var(--hr-space-3);
  border-bottom: 2px solid var(--hr-border-light);
}
.hr-section-header h2 {
  font-size: var(--hr-text-2xl); margin: 0;
  position: relative;
}
.hr-section-header h2::after {
  content: ''; position: absolute; bottom: -10px; left: 0;
  width: 40px; height: 3px; background: var(--hr-primary); border-radius: 2px;
}
.hr-section-link { font-size: var(--hr-text-sm); color: var(--hr-primary-dark); font-weight: 600; }
.hr-section-link:hover { color: var(--hr-primary); }

/* =============================================
   Homepage: Featured Grid
   ============================================= */
.hr-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--hr-gutter);
  margin-bottom: var(--hr-space-8);
}
.hr-featured-grid .hr-card { border: none; }
.hr-featured-grid .hr-card-body h3 {
  font-size: var(--hr-text-lg); margin-bottom: var(--hr-space-2);
}
.hr-card-meta {
  display: flex; align-items: center; gap: var(--hr-space-3);
  font-size: var(--hr-text-xs); color: var(--hr-text-muted);
}

/* =============================================
   Homepage: Latest + Sidebar
   ============================================= */
.hr-main-layout {
  display: grid;
  grid-template-columns: 1fr var(--hr-sidebar-width);
  gap: var(--hr-gutter);
  margin-bottom: var(--hr-space-8);
}
.hr-articles-list { display: flex; flex-direction: column; gap: var(--hr-space-4); }
.hr-article-card {
  display: flex; gap: var(--hr-space-5); background: var(--hr-surface);
  border: 1px solid var(--hr-border-card); border-radius: var(--hr-radius);
  padding: var(--hr-space-5); transition: box-shadow var(--hr-transition);
}
.hr-article-card:hover { box-shadow: var(--hr-shadow-hover); }
.hr-article-card-thumb {
  width: 200px; min-width: 200px; aspect-ratio: 16/10; object-fit: cover;
  border-radius: var(--hr-radius-sm); background: var(--hr-surface-dim);
}
.hr-article-card-content { flex: 1; display: flex; flex-direction: column; }
.hr-article-card-content h3 {
  font-size: var(--hr-text-lg); margin: var(--hr-space-2) 0;
  line-height: 1.4;
}
.hr-article-excerpt {
  color: var(--hr-text-secondary); font-size: var(--hr-text-sm);
  line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hr-article-card-content .hr-card-meta { margin-top: auto; padding-top: var(--hr-space-3); }

/* =============================================
   Homepage: Category Sections
   ============================================= */
.hr-category-section { margin-bottom: var(--hr-space-8); }
.hr-category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--hr-gutter);
}
.hr-category-grid .hr-card-body { padding: var(--hr-space-4); }
.hr-category-grid .hr-card-body h3 {
  font-size: var(--hr-text-base); margin-bottom: var(--hr-space-1);
}

/* =============================================
   Sidebar
   ============================================= */
.hr-sidebar { display: flex; flex-direction: column; gap: var(--hr-space-5); }
.hr-sidebar .hr-card { padding: var(--hr-space-5); }
.hr-sidebar .hr-card h3 {
  font-size: var(--hr-text-base); margin-bottom: var(--hr-space-3);
  padding-bottom: var(--hr-space-2); border-bottom: 2px solid var(--hr-border-light);
}
.hr-tag-cloud { display: flex; flex-wrap: wrap; gap: var(--hr-space-2); }
.hr-newsletter-form { display: flex; gap: var(--hr-space-2); }
.hr-newsletter-form input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--hr-border); border-radius: var(--hr-radius);
  font-family: var(--hr-font); font-size: var(--hr-text-sm);
}
.hr-newsletter-form input:focus { outline: none; border-color: var(--hr-primary); }

/* =============================================
   Single Post
   ============================================= */
.hr-article { max-width: var(--hr-content-width); margin: 0 auto; padding: 0 var(--hr-gutter); }

/* Article Hero */
.hr-article-hero { margin-bottom: var(--hr-space-6); }
.hr-article-hero-image {
  width: 100%; max-height: 420px; object-fit: cover;
  border-radius: var(--hr-radius-lg); margin-bottom: var(--hr-space-5);
}
.hr-article-hero .hr-tag-category { margin-bottom: var(--hr-space-3); }
.hr-article-title {
  font-size: var(--hr-text-3xl); line-height: 1.25; margin-bottom: var(--hr-space-3);
}
.hr-article-byline {
  display: flex; align-items: center; gap: var(--hr-space-4);
  font-size: var(--hr-text-sm); color: var(--hr-text-muted); margin-bottom: var(--hr-space-5);
}
.hr-article-byline img { width: 32px; height: 32px; border-radius: var(--hr-radius-full); }
.hr-article-actions { display: flex; gap: var(--hr-space-3); }

/* Article Layout — 3 columns */
.hr-article-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 300px;
  gap: var(--hr-space-6);
  margin-bottom: var(--hr-space-8);
}
/* When TOC is hidden (old articles with < 2 h2) */
.hr-article-layout.hr-no-toc {
  grid-template-columns: 0px minmax(0, 1fr) 300px;
}

/* Article TOC (Left) */
.hr-article-toc {
  grid-column: 1;
  position: sticky; top: 80px; align-self: start;
}
.hr-article-toc h3 {
  font-size: var(--hr-text-sm); text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--hr-text-muted); margin-bottom: var(--hr-space-3);
}
.hr-article-toc ol { list-style: none; counter-reset: toc-counter; }
.hr-article-toc li {
  counter-increment: toc-counter; padding: var(--hr-space-2) 0;
  border-bottom: 1px solid var(--hr-border-light); font-size: var(--hr-text-sm);
}
.hr-article-toc li::before {
  content: counter(toc-counter, decimal-leading-zero);
  color: var(--hr-primary); font-weight: 700; margin-right: var(--hr-space-2);
  font-size: var(--hr-text-xs);
}
.hr-article-toc a { color: var(--hr-text-secondary); }
.hr-article-toc a:hover { color: var(--hr-primary); }

/* Article Content (Center) */
.hr-article-content {
  grid-column: 2;
  max-width: var(--hr-article-width);
}
.hr-article-content h2 {
  font-size: var(--hr-text-2xl); margin-top: var(--hr-space-8); margin-bottom: var(--hr-space-4);
  padding-bottom: var(--hr-space-2); border-bottom: 2px solid var(--hr-border-light);
}
.hr-article-content h3 {
  font-size: var(--hr-text-xl); margin-top: var(--hr-space-6); margin-bottom: var(--hr-space-3);
  color: var(--hr-structural);
}
.hr-article-content p {
  font-size: var(--hr-text-lg); line-height: 1.85; margin-bottom: var(--hr-space-5);
}
.hr-article-content img {
  border-radius: var(--hr-radius); margin: var(--hr-space-6) 0;
  width: 100%;
}
.hr-article-content blockquote {
  border-left: 4px solid var(--hr-primary); padding: var(--hr-space-4) var(--hr-space-5);
  margin: var(--hr-space-6) 0; background: var(--hr-surface);
  border-radius: 0 var(--hr-radius) var(--hr-radius) 0;
  font-style: italic; color: var(--hr-text-secondary);
}

/* Article Sidebar (Right) */
.hr-article-sidebar {
  grid-column: 3;
  display: flex; flex-direction: column; gap: var(--hr-space-5);
  position: sticky; top: 80px; align-self: start;
}

/* =============================================
   Components: TL;DR Box
   ============================================= */
.hr-tldr {
  background: var(--hr-surface-warm);
  border-left: 4px solid var(--hr-primary);
  border-radius: 0 var(--hr-radius) var(--hr-radius) 0;
  padding: var(--hr-space-5) var(--hr-space-5);
  margin: var(--hr-space-6) 0;
}
.hr-tldr h3 {
  font-size: var(--hr-text-base); font-weight: 700; color: var(--hr-primary-dark);
  margin-bottom: var(--hr-space-3); display: flex; align-items: center; gap: var(--hr-space-2);
}
.hr-tldr ul { list-style: none; }
.hr-tldr li {
  padding: var(--hr-space-2) 0; font-size: var(--hr-text-base); line-height: 1.6;
  color: var(--hr-text-primary);
}
.hr-tldr li::before { content: '•'; color: var(--hr-primary); font-weight: 700; margin-right: var(--hr-space-2); }

/* =============================================
   Components: Pros / Cons
   ============================================= */
.hr-proscons {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--hr-space-5);
  margin: var(--hr-space-6) 0;
}
.hr-pros, .hr-cons {
  background: var(--hr-surface); border: 1px solid var(--hr-border-card);
  border-radius: var(--hr-radius); padding: var(--hr-space-5);
}
.hr-pros h3 { color: var(--hr-success); }
.hr-cons h3 { color: var(--hr-error); }
.hr-pros li, .hr-cons li {
  padding: var(--hr-space-2) 0; font-size: var(--hr-text-sm); line-height: 1.6;
}
.hr-pros li::before { content: '✓'; color: var(--hr-success); font-weight: 700; margin-right: var(--hr-space-2); }
.hr-cons li::before { content: '✗'; color: var(--hr-error); font-weight: 700; margin-right: var(--hr-space-2); }

/* =============================================
   Components: Score Bars
   ============================================= */
.hr-scorecard {
  background: var(--hr-surface); border: 1px solid var(--hr-border-card);
  border-radius: var(--hr-radius); padding: var(--hr-space-5);
  margin: var(--hr-space-6) 0;
}
.hr-scorecard h3 {
  font-size: var(--hr-text-lg); margin-bottom: var(--hr-space-4);
  padding-bottom: var(--hr-space-3); border-bottom: 2px solid var(--hr-border-light);
}
.hr-score-row {
  display: flex; align-items: center; gap: var(--hr-space-4);
  padding: var(--hr-space-3) 0;
}
.hr-score-label { width: 100px; font-size: var(--hr-text-sm); font-weight: 600; color: var(--hr-text-secondary); }
.hr-score-bar-wrap { flex: 1; height: 8px; background: var(--hr-border-light); border-radius: var(--hr-radius-full); overflow: hidden; }
.hr-score-bar { height: 100%; background: var(--hr-primary); border-radius: var(--hr-radius-full); transition: width 0.6s ease; }
.hr-score-value { width: 48px; text-align: right; font-size: var(--hr-text-sm); font-weight: 700; color: var(--hr-primary-dark); }

/* =============================================
   Components: Spec Table
   ============================================= */
.hr-spec-table {
  width: 100%; border-collapse: collapse; margin: var(--hr-space-6) 0;
  font-size: var(--hr-text-sm);
}
.hr-spec-table thead th {
  background: var(--hr-structural); color: #FFFFFF; padding: 12px 16px;
  text-align: left; font-weight: 600; font-size: var(--hr-text-sm);
}
.hr-spec-table thead th:first-child { border-radius: var(--hr-radius) 0 0 0; }
.hr-spec-table thead th:last-child { border-radius: 0 var(--hr-radius) 0 0; }
.hr-spec-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--hr-border-light);
}
.hr-spec-table tbody tr:nth-child(even) { background: rgba(234, 239, 239, 0.5); }
.hr-spec-table tbody tr:hover { background: var(--hr-primary-container); }

/* =============================================
   Components: FAQ Accordion
   ============================================= */
.hr-faq { margin: var(--hr-space-8) 0; }
.hr-faq h2 { margin-bottom: var(--hr-space-5); }
.hr-faq-item { border-bottom: 1px solid var(--hr-border-light); }
.hr-faq-question {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: var(--hr-space-4) 0; background: none; border: none;
  cursor: pointer; font-family: var(--hr-font); font-size: var(--hr-text-base);
  font-weight: 600; color: var(--hr-text-primary); text-align: left;
  transition: color var(--hr-transition);
}
.hr-faq-question:hover { color: var(--hr-primary); }
.hr-faq-question::after {
  content: '▾'; font-size: var(--hr-text-lg); transition: transform 0.3s ease;
}
.hr-faq-question.open::after { transform: rotate(180deg); color: var(--hr-primary); }
.hr-faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease;
}
.hr-faq-answer.open { max-height: 500px; padding-bottom: var(--hr-space-4); }
.hr-faq-answer p { font-size: var(--hr-text-base); color: var(--hr-text-secondary); }

/* =============================================
   Components: Author Bio
   ============================================= */
.hr-author-bio {
  display: flex; gap: var(--hr-space-4); align-items: flex-start;
  background: var(--hr-surface); border: 1px solid var(--hr-border-card);
  border-radius: var(--hr-radius); padding: var(--hr-space-5);
  margin: var(--hr-space-6) 0;
}
.hr-author-bio img { width: 64px; height: 64px; border-radius: var(--hr-radius-full); }
.hr-author-bio h3 { font-size: var(--hr-text-base); margin-bottom: var(--hr-space-1); }
.hr-author-bio p { font-size: var(--hr-text-sm); color: var(--hr-text-secondary); }

/* =============================================
   Related Posts
   ============================================= */
.hr-related { margin: var(--hr-space-8) 0; }
.hr-related-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--hr-gutter);
}
.hr-related-grid .hr-card-body h3 { font-size: var(--hr-text-base); }
.hr-related-grid .hr-card-image { aspect-ratio: 16/10; }

/* =============================================
   Audio Player Bar
   ============================================= */
.hr-audio-bar {
  background: var(--hr-footer-bg); color: var(--hr-footer-text);
  padding: var(--hr-space-3) var(--hr-space-5); display: flex; align-items: center;
  gap: var(--hr-space-4); border-radius: var(--hr-radius) var(--hr-radius) 0 0;
  position: sticky; bottom: 0; z-index: 999;
}
.hr-audio-bar .hr-tag-category { flex-shrink: 0; }
.hr-audio-bar-track { flex: 1; font-size: var(--hr-text-sm); }
.hr-audio-bar-time { font-size: var(--hr-text-xs); color: var(--hr-text-muted); }

/* =============================================
   Archive & Search
   ============================================= */
.hr-archive-header {
  background: var(--hr-surface); border: 1px solid var(--hr-border-card);
  border-radius: var(--hr-radius); padding: var(--hr-space-6); margin-bottom: var(--hr-space-6);
}
.hr-archive-header h1 { font-size: var(--hr-text-2xl); margin-bottom: var(--hr-space-2); }
.hr-archive-header p { color: var(--hr-text-secondary); font-size: var(--hr-text-base); }
.hr-posts-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--hr-gutter);
  margin-bottom: var(--hr-space-8);
}
.hr-posts-grid .hr-card-image { aspect-ratio: 16/10; }

/* Pagination */
.hr-pagination {
  display: flex; justify-content: center; gap: var(--hr-space-2);
  margin: var(--hr-space-8) 0;
}
.hr-pagination a, .hr-pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--hr-radius);
  border: 1px solid var(--hr-border-card); background: var(--hr-surface);
  font-size: var(--hr-text-sm); font-weight: 600; color: var(--hr-text-secondary);
  transition: all var(--hr-transition);
}
.hr-pagination a:hover { border-color: var(--hr-primary); color: var(--hr-primary); }
.hr-pagination .current { background: var(--hr-primary); color: #FFFFFF; border-color: var(--hr-primary); }

/* =============================================
   404 Page
   ============================================= */
.hr-404 {
  text-align: center; padding: var(--hr-space-10) var(--hr-gutter);
}
.hr-404 h1 { font-size: var(--hr-text-5xl); color: var(--hr-primary); }
.hr-404 p { font-size: var(--hr-text-lg); color: var(--hr-text-secondary); margin-bottom: var(--hr-space-6); }

/* =============================================
   WordPress Core Overrides
   ============================================= */
.wp-caption { max-width: 100%; margin: var(--hr-space-5) 0; }
.wp-caption-text { font-size: var(--hr-text-sm); color: var(--hr-text-muted); text-align: center; margin-top: var(--hr-space-2); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin-right: var(--hr-space-5); }
.alignright { float: right; margin-left: var(--hr-space-5); }

/* Screen Reader */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* =============================================
   RESPONSIVE — Tablet (≤ 1024px)
   ============================================= */
@media (max-width: 1024px) {
  .hr-featured-grid { grid-template-columns: repeat(2, 1fr); }
  .hr-category-grid { grid-template-columns: repeat(2, 1fr); }
  .hr-main-layout { grid-template-columns: 1fr; }
  .hr-sidebar { display: grid; grid-template-columns: repeat(2, 1fr); }
  .hr-article-layout { grid-template-columns: 1fr; gap: var(--hr-space-5); }
  .hr-article-layout.hr-no-toc { grid-template-columns: 1fr; }
  .hr-article-toc { display: block; position: static; grid-column: auto; order: -1; margin-bottom: var(--hr-space-4); }
  .hr-article-toc h3 { font-size: var(--hr-text-base); }
  .hr-article-content { grid-column: auto; }
  .hr-article-sidebar { grid-column: auto; position: static; display: grid; grid-template-columns: 1fr 1fr; gap: var(--hr-space-4); }
  .hr-footer-grid { grid-template-columns: 1fr 1fr; }
  .hr-posts-grid { grid-template-columns: repeat(2, 1fr); }
  .hr-related-grid { grid-template-columns: repeat(2, 1fr); }
  .hr-proscons { grid-template-columns: 1fr; }
}

/* =============================================
   RESPONSIVE — Mobile (≤ 768px)
   ============================================= */
@media (max-width: 768px) {
  :root { --hr-gutter: 1rem; }

  .hr-header-inner { height: 56px; }
  .hr-nav { display: none; }
  .hr-nav.open {
    display: flex; flex-direction: column;
    position: fixed; z-index: 9999;
    top: 56px; left: 0; right: 0; bottom: 0;
    background: var(--hr-structural);
    padding: var(--hr-space-4); gap: 0;
    overflow-y: auto;
  }
  .hr-nav.open a {
    display: block;
    padding: 14px var(--hr-space-4);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: var(--hr-text-lg);
    color: #fff;
  }
  .hr-menu-toggle {
    display: block;
    background: none; border: none;
    color: #fff; font-size: 24px;
    cursor: pointer; padding: 8px;
    position: relative; z-index: 10000;
  }

  .hr-hero { margin-bottom: var(--hr-space-5); }
  .hr-hero-content-inner { padding: var(--hr-space-5) var(--hr-gutter) var(--hr-space-4); }
  .hr-hero-content h2 { font-size: var(--hr-text-xl); line-height: 1.35; }
  .hr-hero-content .hr-hero-meta { font-size: var(--hr-text-xs); flex-wrap: wrap; gap: var(--hr-space-2); }

  .hr-featured-grid { grid-template-columns: 1fr; gap: var(--hr-space-4); }
  .hr-category-grid { grid-template-columns: 1fr; gap: var(--hr-space-4); }
  .hr-article-card { flex-direction: column; padding: var(--hr-space-4); }
  .hr-article-card-thumb { width: 100%; min-width: unset; aspect-ratio: 16/9; }
  .hr-article-card-content h3 { font-size: var(--hr-text-base); }
  .hr-sidebar { grid-template-columns: 1fr; gap: var(--hr-space-4); }
  /* ── Article Hero: full-bleed ── */
  .hr-article { padding: 0; }
  .hr-article-hero { margin-bottom: 0; }
  .hr-article-hero-image { 
    border-radius: 0; max-height: none; width: 100%;
    margin-bottom: var(--hr-space-5);
  }
  .hr-article-hero .hr-tag-category { margin: 0 var(--hr-gutter); }
  .hr-article-title { 
    font-size: var(--hr-text-3xl); line-height: 1.2; 
    padding: 0 var(--hr-gutter); margin-bottom: var(--hr-space-4);
  }
  .hr-article-byline { 
    font-size: var(--hr-text-base); gap: var(--hr-space-3); 
    padding: 0 var(--hr-gutter); margin-bottom: var(--hr-space-4);
  }
  .hr-article-actions { padding: 0 var(--hr-gutter); margin-bottom: var(--hr-space-6); }

  .hr-article-layout { grid-template-columns: 1fr; gap: 0; padding: 0 var(--hr-gutter); }
  .hr-article-layout.hr-no-toc { grid-template-columns: 1fr; }

  /* ── TOC: clean numbered list, no box ── */
  .hr-article-toc { 
    display: block; position: static; grid-column: auto; order: -1;
    background: transparent; border-radius: 0;
    padding: 0 0 var(--hr-space-5) 0; margin-bottom: var(--hr-space-6);
    border: none; border-bottom: 1px solid var(--hr-border-light);
  }
  .hr-article-toc h3 { 
    font-size: var(--hr-text-lg); cursor: pointer; margin-bottom: var(--hr-space-3);
    display: flex; align-items: center; gap: var(--hr-space-2);
    color: var(--hr-text-primary); font-weight: 700;
  }
  .hr-article-toc h3::after { content: '▼'; font-size: 10px; transition: transform 0.2s; }
  .hr-article-toc.collapsed h3::after { transform: rotate(-90deg); }
  .hr-article-toc.collapsed ol { display: none; }
  .hr-article-toc ol { margin-left: 0; }
  .hr-article-toc li { font-size: var(--hr-text-base); padding: var(--hr-space-2) 0; }

  /* ── Content: bigger headings, breathing room ── */
  .hr-article-content { grid-column: auto; max-width: 100%; }
  .hr-article-content p { font-size: var(--hr-text-lg); line-height: 1.85; margin-bottom: var(--hr-space-5); }
  .hr-article-content h2 { 
    font-size: var(--hr-text-2xl); font-weight: 700; 
    margin-top: var(--hr-space-8); margin-bottom: var(--hr-space-4);
    padding-bottom: var(--hr-space-2); letter-spacing: -0.01em;
  }
  .hr-article-content h3 { 
    font-size: var(--hr-text-xl); font-weight: 700; 
    margin-top: var(--hr-space-6); margin-bottom: var(--hr-space-3);
    color: var(--hr-structural);
  }
  .hr-article-content img { 
    margin: var(--hr-space-6) 0; border-radius: 0; 
    width: calc(100% + 2 * var(--hr-gutter)); 
    margin-left: calc(-1 * var(--hr-gutter)); 
  }
  .hr-article-content blockquote { margin: var(--hr-space-6) 0; }

  /* ── Sidebar: full-width stacked ── */
  .hr-article-sidebar { grid-column: auto; position: static; grid-template-columns: 1fr; gap: var(--hr-space-6); margin-top: var(--hr-space-8); }
  .hr-footer-grid { grid-template-columns: 1fr; gap: var(--hr-space-5); }
  .hr-footer { padding: var(--hr-space-8) 0 var(--hr-space-5); }
  .hr-posts-grid, .hr-related-grid { grid-template-columns: 1fr; gap: var(--hr-space-4); }
  /* ── Components: lighter treatment (去盒化) ── */
  .hr-tldr {
    background: transparent; border-left-width: 3px; 
    padding: 0 0 0 var(--hr-space-4); margin: var(--hr-space-8) 0;
  }
  .hr-tldr h3 { font-size: var(--hr-text-lg); }
  .hr-tldr li { font-size: var(--hr-text-base); }

  .hr-proscons { grid-template-columns: 1fr; gap: var(--hr-space-8); margin: var(--hr-space-8) 0; }
  .hr-pros, .hr-cons { 
    background: transparent; border: none; padding: 0; 
  }
  .hr-pros h3, .hr-cons h3 { font-size: var(--hr-text-lg); margin-bottom: var(--hr-space-3); }
  .hr-pros li, .hr-cons li { 
    font-size: var(--hr-text-base); padding: var(--hr-space-2) 0; line-height: 1.6;
  }
  .hr-pros li::before, .hr-cons li::before { font-size: 1.2em; }

  .hr-scorecard {
    background: transparent; border: none; padding: 0; margin: var(--hr-space-8) 0;
  }
  .hr-scorecard h3 { border-bottom: none; margin-bottom: var(--hr-space-4); font-size: var(--hr-text-lg); }
  .hr-score-row { padding: var(--hr-space-2) 0; }
  .hr-score-label { width: 90px; font-size: var(--hr-text-base); }
  .hr-score-bar-wrap { height: 10px; border-radius: var(--hr-radius-full); }
  .hr-score-value { font-size: var(--hr-text-base); }

  .hr-author-bio {
    background: transparent; border: none; 
    padding: var(--hr-space-6) 0; margin: var(--hr-space-8) 0;
    border-top: 1px solid var(--hr-border-light);
    border-bottom: 1px solid var(--hr-border-light);
    flex-direction: row; align-items: flex-start; text-align: left;
    gap: var(--hr-space-4);
  }
  .hr-author-bio img { width: 48px; height: 48px; }

  .hr-spec-table { font-size: var(--hr-text-xs); }
  .hr-spec-table thead th, .hr-spec-table td { padding: 8px 10px; }
  .hr-section-header h2 { font-size: var(--hr-text-xl); }
  .hr-section-header { margin-bottom: var(--hr-space-5); }
  .hr-archive-header { padding: var(--hr-space-4); }
  .hr-archive-header h1 { font-size: var(--hr-text-xl); }
  .hr-related { margin: var(--hr-space-10) 0 var(--hr-space-8); }
  .hr-related .hr-section-header { margin-bottom: var(--hr-space-5); }
  .hr-related-grid .hr-card { border: 1px solid var(--hr-border-card); border-radius: var(--hr-radius); }
  .hr-faq { margin: var(--hr-space-8) 0; }
}

/* =============================================
   RESPONSIVE — Small Mobile (≤ 480px)
   ============================================= */
@media (max-width: 480px) {
  .hr-hero-content h2 { font-size: var(--hr-text-xl); }
  .hr-section-header { flex-direction: column; align-items: flex-start; gap: var(--hr-space-2); }
  .hr-footer-bottom { text-align: left; }
}

/* =============================================
   Print Styles
   ============================================= */
@media print {
  .hr-header, .hr-footer, .hr-sidebar, .hr-article-toc, .hr-article-sidebar,
  .hr-audio-bar, .hr-related, .hr-tag-cloud, .hr-newsletter-form { display: none !important; }
  body { background: #fff; color: #000; }
  .hr-article-content { max-width: 100%; }
}
