/* =========================================================================
   PRナビAIラボ — Site Styles (Design System 2026-04-21)
   Based on: Claude Design "PR_AI_ Design System20260421".
   Layer 1: design tokens (colors_and_type.css) + legacy aliases
   Layer 2: kit.css (Header / Hero / Cards / Footer / etc.)
   Layer 3: extension classes (pagination, skills ranks, infographic, ...)
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ---- color primitives ---- */
  --color-primary-700: #1E3A8A;
  --color-primary-600: #1E40AF;
  --color-primary-500: #2563EB;
  --color-primary-400: #3B82F6;
  --color-primary-50:  #EFF6FF;

  --color-accent-600: #D97706;
  --color-accent-500: #F59E0B;
  --color-accent-400: #FBBF24;
  --color-accent-50:  #FEF3C7;

  --color-success-600: #059669;
  --color-success-500: #10B981;
  --color-success-50:  #D1FAE5;

  --color-warning-600: #D97706;
  --color-warning-500: #F59E0B;
  --color-warning-50:  #FEF3C7;

  --color-danger-600: #DC2626;
  --color-danger-500: #EF4444;
  --color-danger-50:  #FECACA;

  --color-info-600: #0284C7;
  --color-info-500: #0EA5E9;

  --color-violet-600: #7C3AED;
  --color-violet-500: #8B5CF6;

  --color-neutral-900: #0F172A;
  --color-neutral-800: #111827;
  --color-neutral-700: #1F2937;
  --color-neutral-600: #4B5563;
  --color-neutral-500: #6B7280;
  --color-neutral-400: #9CA3AF;
  --color-neutral-300: #D1D5DB;
  --color-neutral-200: #E5E7EB;
  --color-neutral-100: #F3F4F6;
  --color-neutral-50:  #F8FAFC;
  --color-white:       #FFFFFF;

  --glow-primary: rgba(37, 99, 235, 0.08);
  --glow-accent:  rgba(217, 119, 6, 0.08);
  --glow-success: rgba(5, 150, 105, 0.08);
  --glow-violet:  rgba(124, 58, 237, 0.06);

  /* ---- semantic surfaces / text ---- */
  --bg:            var(--color-neutral-50);
  --bg-surface:    var(--color-white);
  --bg-elevated:   var(--color-neutral-100);
  --bg-inverse:    var(--color-neutral-900);

  --border:        var(--color-neutral-200);
  --border-strong: var(--color-neutral-300);
  --border-focus:  var(--color-primary-500);

  --fg:            var(--color-neutral-800);
  --fg-secondary:  var(--color-neutral-600);
  --fg-muted:      var(--color-neutral-400);
  --fg-inverse:    var(--color-white);
  --fg-link:       var(--color-primary-500);
  --fg-link-hover: var(--color-primary-700);

  --action-primary:       var(--color-primary-600);
  --action-primary-hover: var(--color-primary-700);
  --action-accent:        var(--color-accent-500);

  /* ---- typography ---- */
  --font-jp:         'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', sans-serif;
  --font-en:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-en-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans:       'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', sans-serif;
  --font-mono:       'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --fw-regular:   400;
  --fw-medium:    500;
  --fw-semibold:  600;
  --fw-bold:      700;
  --fw-extrabold: 800;
  --fw-black:     900;

  /* ---- layout ---- */
  --container-max: 1200px;
  --reading-max:   860px;

  --radius-xs:   6px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-pill: 100px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  --shadow-focus: 0 0 0 3px var(--glow-primary);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* ---- legacy aliases (keep old class bodies working) ---- */
  --bg-white:         var(--bg-surface);
  --bg-card:          var(--bg-surface);
  --bg-card-hover:    var(--bg-elevated);
  --text:             var(--fg);
  --text-secondary:   var(--fg-secondary);
  --text-muted:       var(--fg-muted);
  --border-light:     var(--border-strong);
  --accent:           var(--action-primary);
  --accent-light:     var(--color-primary-400);
  --accent-dark:      var(--color-primary-700);
  --accent-glow:      var(--glow-primary);
  --green:            var(--color-success-600);
  --green-light:      var(--color-success-500);
  --green-glow:       var(--glow-success);
  --amber:            var(--color-accent-600);
  --amber-glow:       var(--glow-accent);
  --rose:             var(--color-danger-600);
  --sky:              var(--color-info-600);
  --violet:           var(--color-violet-600);
  --violet-glow:      var(--glow-violet);
  --radius:           var(--radius-md);
  --shadow:           var(--shadow-md);
  --transition:       200ms ease;
}

/* ========================================================
   DARK MODE (optional, activated by data-theme="dark" on html)
   ======================================================== */
[data-theme="dark"] {
  --bg:            #0D1117;
  --bg-surface:    #161B22;
  --bg-elevated:   #1C2128;
  --bg-inverse:    #F0F6FC;
  --border:        #30363D;
  --border-strong: #484F58;
  --border-focus:  #3B82F6;
  --fg:            #E6EDF3;
  --fg-secondary:  #9BA3AE;
  --fg-muted:      #6E7681;
  --fg-inverse:    #0D1117;
  --fg-link:       #58A6FF;
  --fg-link-hover: #79B8FF;
  --action-primary:       #3B82F6;
  --action-primary-hover: #60A5FA;
  --glow-primary: rgba(59, 130, 246, 0.14);
  --glow-accent:  rgba(245, 158, 11, 0.14);
  --glow-success: rgba(16, 185, 129, 0.14);
  --glow-violet:  rgba(139, 92, 246, 0.14);
  --shadow-sm: 0 1px 0 rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
  --shadow-focus: 0 0 0 3px rgba(59, 130, 246, 0.35);
}

/* =========================================================================
   Layer 2: kit.css — core components
   ========================================================================= */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); color: var(--fg); font-family: var(--font-sans); }
body {
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.8;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: color 200ms ease, background 200ms ease;
}
a { color: var(--fg-link); text-decoration: none; transition: color 200ms ease; cursor: pointer; }
a:hover { color: var(--fg-link-hover); }
button { font-family: inherit; }

/* ===== Header ===== */
.header {
  background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}
.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 8px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-img { height: 44px; width: auto; max-width: 220px; object-fit: contain; }
[data-theme="dark"] .logo-img { filter: brightness(0) invert(1); }
.logo .brand-name { color: var(--fg); }
.logo .brand-sub { color: var(--color-violet-600); font-weight: 700; }

/* ===== Site Navigation ===== */
.site-nav {
  display: flex;
  gap: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
}
.site-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg-secondary);
  text-decoration: none;
  transition: all 200ms;
  white-space: nowrap;
}
.site-nav-item:hover { color: var(--fg); background: var(--bg-surface); }
.site-nav-item.active {
  background: var(--color-neutral-900);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .site-nav-item.active { background: var(--action-primary); color: #fff; }

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--fg-muted);
  text-align: right;
  white-space: nowrap;
  line-height: 1.5;
}
.last-update { font-family: var(--font-mono); font-size: 0.72rem; margin-top: 2px; }
.update-badge,
.header-meta .update-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--glow-success);
  color: var(--color-success-500);
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
}
.update-badge::before,
.header-meta .update-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--color-success-500);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* ===== Search ===== */
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0 16px;
  transition: all 200ms;
}
.search-box:focus-within {
  border-color: var(--action-primary);
  box-shadow: var(--shadow-focus);
  background: var(--bg-surface);
}
.search-box input {
  background: none;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.88rem;
  width: 100%;
  padding: 10px 0;
  color: var(--fg);
}
.search-box input::placeholder { color: var(--fg-muted); }
.search-box button {
  background: none;
  border: none;
  color: var(--fg-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  transition: color 200ms ease;
}
.search-box button:hover { color: var(--action-primary); }

/* ===== Shared atoms ===== */
.new-marker {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-accent-600);
  background: var(--glow-accent);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--glow-primary);
  color: var(--action-primary);
}
.tag-default { background: var(--glow-primary); color: var(--action-primary); }
.tag-lang    { background: var(--glow-violet);  color: var(--color-violet-500); }
.tag-cat     {
  background: var(--color-neutral-900);
  color: #fff;
  font-weight: 700;
  font-size: 0.66rem;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-theme="dark"] .tag-cat {
  background: var(--bg-elevated);
  color: var(--fg);
  border: 1px solid var(--border-strong);
}

/* ===== Section title ===== */
.section-title {
  font-size: 1.1rem;
  font-weight: var(--fw-bold);
  margin: 40px 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.section-title .icon { font-size: 1.1rem; }
.section-title-icon { color: var(--action-primary); }
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 16px;
}

/* ===== Hero / layout ===== */
.hero {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 48px 32px 0;
}
.hero-landing { text-align: center; padding-top: 80px; }
.hero-headline {
  font-size: 1.8rem;
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--fg);
  line-height: 1.35;
}
.hero-landing .hero-headline {
  font-size: 2.2rem;
  max-width: 780px;
  margin: 0 auto 14px;
  text-wrap: balance;
}
.hero-sub {
  font-size: 1rem;
  color: var(--fg-secondary);
  margin-bottom: 28px;
}
.hero-meta {
  font-size: 0.78rem;
  color: var(--fg-muted);
  font-family: var(--font-mono);
}
.section {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
}

/* ===== Stats row ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.stats-row-4 {
  grid-template-columns: repeat(4, 1fr);
  max-width: 640px;
  margin: 0 auto;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  text-align: center;
  transition: all 200ms;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.stat-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  border-color: var(--border-strong);
}
.stat-card.stat-active {
  border-color: var(--action-primary);
  box-shadow: 0 0 0 2px var(--glow-primary);
}
.stat-card.stat-total {
  background: var(--color-neutral-900);
  border-color: transparent;
}
[data-theme="dark"] .stat-card.stat-total {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}
.stat-number {
  font-family: var(--font-en-display);
  font-size: 1.8rem;
  font-weight: 900;
  font-feature-settings: 'tnum' 1;
  letter-spacing: -0.03em;
  color: var(--fg);
}
.stat-card.stat-total .stat-number { color: #fff; }
.stat-label {
  font-size: 0.7rem;
  color: var(--fg-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.stat-card.stat-total .stat-label { color: rgba(255,255,255,0.65); }

/* ===== Top picks (GitHub top 5) ===== */
.top-picks {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 8px;
}
.pick-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all 200ms;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.pick-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--action-primary);
  opacity: 0;
  transition: opacity 200ms;
}
.pick-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.pick-card:hover::before { opacity: 1; }
.pick-rank {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--color-neutral-900);
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-en-display);
}
[data-theme="dark"] .pick-rank { background: var(--action-primary); }
.pick-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
  padding-right: 36px;
  line-height: 1.4;
  color: var(--fg);
  transition: color 200ms;
}
.pick-card:hover h3 { color: var(--action-primary); }
.pick-desc {
  font-size: 0.82rem;
  color: var(--fg-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
  min-height: 2.6em;
  line-height: 1.6;
}
.pick-meta {
  display: flex;
  gap: 14px;
  font-size: 0.75rem;
  color: var(--fg-muted);
  font-weight: 600;
  align-items: center;
}
.pick-meta .stars {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--color-accent-500);
  font-family: var(--font-mono);
}
.pick-meta .score {
  color: var(--color-success-500);
  font-family: var(--font-mono);
}

/* ===== Controls (tabs + sort) ===== */
.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 32px 0 20px;
}
.tab-group {
  display: flex;
  gap: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px;
}
.tab {
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  color: var(--fg-secondary);
  cursor: pointer;
  transition: all 200ms;
  border: none;
  background: none;
  font-weight: 600;
  text-decoration: none;
}
.tab:hover { color: var(--fg); background: var(--bg-surface); }
.tab.active {
  background: var(--color-neutral-900);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .tab.active { background: var(--action-primary); color: #fff; }
.tab .count {
  font-size: 0.68rem;
  opacity: 0.5;
  margin-left: 4px;
  font-family: var(--font-mono);
}
.sort-select {
  margin-left: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--fg-secondary);
  padding: 8px 14px;
  font-size: 0.84rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: border-color 200ms;
}
.sort-select:hover { border-color: var(--border-strong); }

/* ===== Repo / list cards ===== */
.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.repo-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 200ms;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.repo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.repo-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 12px;
}
.repo-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.repo-name a { color: var(--fg); }
.repo-name a:hover { color: var(--action-primary); }
.repo-owner {
  font-size: 0.78rem;
  color: var(--fg-muted);
  margin-bottom: 2px;
  font-weight: 500;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  flex-shrink: 0;
  font-family: var(--font-en-display);
}
.score-high { background: var(--glow-success); color: var(--color-success-500); }
.score-mid  { background: var(--glow-accent);  color: var(--color-accent-500); }
.score-low  { background: var(--bg-elevated); color: var(--fg-muted); border: 1px solid var(--border); }

.repo-desc {
  font-size: 0.88rem;
  color: var(--fg-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
  flex: 1;
  line-height: 1.7;
}
.repo-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}
.repo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
}
.repo-stats {
  display: flex;
  gap: 18px;
}
.repo-stats span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fg-secondary);
}
.repo-stats .star-icon { color: var(--color-accent-500); }
.repo-stats .fork-icon { color: var(--fg-muted); }

.repo-links { display: flex; gap: 8px; }
.repo-links a,
.repo-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  color: var(--fg-secondary);
  font-weight: 600;
  transition: all 200ms;
}
.repo-links a:hover,
.repo-link:hover {
  border-color: var(--action-primary);
  color: var(--action-primary);
  background: var(--glow-primary);
}

/* ===== Landing cards ===== */
.landing-sections {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 40px 0;
}
.landing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  text-decoration: none;
  color: inherit;
  transition: all 200ms;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}
.landing-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--action-primary);
  opacity: 0;
  transition: opacity 200ms;
}
.landing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.landing-card:hover::before { opacity: 1; }
.landing-card-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--action-primary);
  font-size: 1.6rem;
}
.landing-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.landing-card p {
  font-size: 0.87rem;
  color: var(--fg-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  flex: 1;
}
.landing-card-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--action-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ===== Detail hero / buttons ===== */
.detail-hero {
  max-width: var(--reading-max);
  margin: 0 auto;
  padding: 32px 32px 0;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--fg-muted);
  font-weight: 600;
  margin-bottom: 24px;
}
.back-link:hover { color: var(--fg); }
.detail-hero .owner {
  color: var(--fg-muted);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.detail-hero h1 {
  font-size: 2.2rem;
  font-weight: var(--fw-bold);
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  line-height: 1.25;
}
.detail-desc {
  font-size: 1rem;
  color: var(--fg-secondary);
  margin-bottom: 22px;
  line-height: 1.85;
}
.detail-tags {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.detail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}
.detail-stat {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 14px;
  text-align: center;
  transition: all 200ms;
}
.detail-stat:hover { box-shadow: var(--shadow-sm); }
.detail-stat .val {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--fg);
  font-family: var(--font-en-display);
  letter-spacing: -0.02em;
}
.detail-stat .lbl {
  font-size: 0.7rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-top: 4px;
}

.detail-links {
  display: flex;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.88rem;
  transition: all 200ms;
  cursor: pointer;
}
.btn-primary {
  background: var(--color-neutral-900);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: #fff;
}
[data-theme="dark"] .btn-primary { background: var(--action-primary); }
[data-theme="dark"] .btn-primary:hover { background: var(--action-primary-hover); }
.btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--fg-secondary);
}
.btn-secondary:hover { border-color: var(--fg); color: var(--fg); }

.detail-section {
  max-width: var(--reading-max);
  margin: 0 auto;
  padding: 0 32px 56px;
}

/* ===== Callouts ===== */
.callout {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 20px 0;
  font-size: 0.9rem;
  line-height: 1.75;
}
.callout strong { font-weight: 700; }
.callout-warn {
  background: color-mix(in srgb, var(--color-warning-500) 10%, transparent);
  border-left: 3px solid var(--color-warning-500);
  color: var(--fg);
}
.callout-info {
  background: var(--glow-primary);
  border-left: 3px solid var(--action-primary);
  color: var(--fg);
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 32px 40px;
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.82rem;
  line-height: 1.9;
  background: var(--bg-surface);
  margin-top: 60px;
}
.footer strong, .footer-brand { color: var(--fg-secondary); }
.footer a { color: var(--fg-secondary); font-weight: 600; }
.footer a:hover { color: var(--action-primary); }
.footer small { font-size: 0.75rem; }
.footer small a { color: var(--fg-secondary); }

/* =========================================================================
   Layer 3: extension classes (retained from previous style.css)
   ========================================================================= */

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0 60px;
}
.page-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--fg-secondary);
  padding: 10px 22px;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 200ms ease;
  font-family: inherit;
  font-weight: 600;
}
.page-btn:hover { border-color: var(--action-primary); color: var(--action-primary); }
.page-btn.active {
  background: var(--fg);
  color: var(--bg);
  border-color: transparent;
}

/* ===== Detail tables ===== */
.info-table {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 24px;
  margin-top: 14px;
}
.info-table table { width: 100%; font-size: 0.92rem; border-collapse: collapse; }
.info-table td { padding: 14px 0; }
.info-table td:first-child { color: var(--fg-muted); width: 180px; font-weight: 600; font-size: 0.85rem; }
.info-table tr + tr td { border-top: 1px solid var(--border); }

.history-table {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 0;
  margin-top: 14px;
  overflow-x: auto;
}
.history-table table { width: 100%; font-size: 0.88rem; border-collapse: collapse; }
.history-table th {
  text-align: left;
  padding: 12px 24px;
  color: var(--fg-muted);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--border);
}
.history-table th:not(:first-child) { text-align: right; }
.history-table td {
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
}
.history-table td:not(:first-child) { text-align: right; }
.history-table tr + tr td { border-top: 1px solid var(--border); }
.history-table .star-val { color: var(--color-accent-600); font-weight: 700; }

.star-history-chart {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 14px;
  text-align: center;
}
.star-history-chart a { display: block; }
.star-history-chart img {
  width: 100%;
  max-width: 720px;
  height: auto;
  margin: 0 auto;
  display: block;
  border-radius: var(--radius-sm);
}
.star-history-credit {
  margin-top: 12px;
  font-size: 0.72rem;
  color: var(--fg-muted);
}
.star-history-credit a {
  color: var(--fg-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.star-history-credit a:hover { color: var(--action-primary); }

.history-details { margin-top: 16px; }
.history-details summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--fg-secondary);
  padding: 10px 0;
  user-select: none;
}
.history-details summary:hover { color: var(--action-primary); }
.history-details[open] summary { margin-bottom: 4px; }

/* ===== Empty state ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--fg-muted);
}
.empty-state .icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty-state h3 { color: var(--fg-secondary); margin-bottom: 8px; }

/* ===== Infographic ===== */
.infographic-wrap { margin-top: 16px; margin-bottom: 32px; }
.infographic-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

/* ===== Explanation (detail article) ===== */
.explanation {
  max-width: var(--reading-max);
  margin: 0 auto;
  padding: 0 32px 60px;
}
.explanation .section-title {
  font-size: 1.15rem;
  font-weight: var(--fw-bold);
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 52px 0 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--fg);
}
.explanation .section-title .icon { font-size: 1.3rem; }
.explanation .section-title::after { content: none; }

/* Summary Box */
.summary-box {
  background: var(--glow-primary);
  border: none;
  border-left: 4px solid var(--action-primary);
  border-radius: var(--radius-sm);
  padding: 28px 32px;
  font-size: 1.1rem;
  line-height: 2;
  color: var(--fg);
  font-weight: 500;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: all 200ms ease;
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.feature-card .feat-icon,
.feat-icon {
  font-size: 1.6rem;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg-elevated);
  color: var(--action-primary);
  border-radius: var(--radius-md);
}
.feature-card .feat-title,
.feat-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 6px;
}
.feature-card .feat-desc,
.feat-desc {
  font-size: 0.85rem;
  color: var(--fg-secondary);
  line-height: 1.7;
}

/* Flow Chart (horizontal steps) */
.flow-chart {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  padding: 24px 0;
}
.flow-step {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  min-width: 170px;
  max-width: 240px;
  flex: 1;
  transition: all 200ms ease;
}
.flow-step:hover { box-shadow: var(--shadow-sm); }
.flow-step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--action-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  font-family: var(--font-en-display);
}
.flow-step .step-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
}
.flow-step .step-desc {
  font-size: 0.88rem;
  color: var(--fg-secondary);
  line-height: 1.7;
}
.flow-arrow {
  color: var(--fg-muted);
  font-size: 1.4rem;
  margin: 0 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* Flow Steps (vertical list) */
.flow-steps {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.flow-steps li {
  display: flex;
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.flow-n {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--action-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-en-display);
  flex-shrink: 0;
}
.flow-steps strong {
  display: block;
  color: var(--fg);
  font-weight: 700;
  margin-bottom: 2px;
}

/* Creator Card */
.creator-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
  transition: all 200ms ease;
}
.creator-card:hover { box-shadow: var(--shadow-sm); }
.creator-icon {
  font-size: 2rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--bg-elevated);
  color: var(--action-primary);
  border-radius: var(--radius-lg);
}
.creator-info { flex: 1; min-width: 0; }
.creator-name {
  font-size: 1.15rem;
  font-weight: var(--fw-bold);
  color: var(--fg);
  margin-bottom: 6px;
}
.creator-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.creator-type {
  display: inline-flex;
  align-items: center;
  padding: 3px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--glow-primary);
  color: var(--action-primary);
  border: 1px solid rgba(37,99,235,0.12);
}
.creator-country {
  font-size: 0.84rem;
  color: var(--fg-muted);
  font-weight: 500;
}
.creator-desc {
  font-size: 0.92rem;
  color: var(--fg-secondary);
  line-height: 1.8;
  margin-bottom: 10px;
}
.creator-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  color: var(--fg-secondary);
  font-weight: 600;
  transition: all 200ms ease;
}
.creator-link:hover {
  border-color: var(--action-primary);
  color: var(--action-primary);
  background: var(--glow-primary);
}

/* Persona Cards */
.persona-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.persona-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  transition: all 200ms ease;
}
.persona-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.persona-card .persona-icon,
.persona-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-elevated);
  color: var(--action-primary);
  border-radius: var(--radius-md);
}
.persona-card .persona-title,
.persona-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 2px;
}
.persona-card .persona-desc,
.persona-desc {
  font-size: 0.84rem;
  color: var(--fg-secondary);
  line-height: 1.6;
}

/* Difficulty */
.difficulty-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
}
.difficulty-stars {
  font-size: 2rem;
  letter-spacing: 6px;
  margin-bottom: 12px;
}
.difficulty-stars .star-filled { color: var(--color-accent-500); }
.difficulty-stars .star-empty { color: var(--border); }
.difficulty-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 10px;
  display: inline-block;
  padding: 4px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.difficulty-bar {
  width: 100%;
  height: 10px;
  background: var(--bg-elevated);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 16px;
}
.difficulty-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.6s ease;
}
.difficulty-bar-fill.level-1 { width: 20%; background: #059669; }
.difficulty-bar-fill.level-2 { width: 40%; background: #65a30d; }
.difficulty-bar-fill.level-3 { width: 60%; background: #d97706; }
.difficulty-bar-fill.level-4 { width: 80%; background: #ea580c; }
.difficulty-bar-fill.level-5 { width: 100%; background: #dc2626; }
.difficulty-note {
  font-size: 0.92rem;
  color: var(--fg-secondary);
  line-height: 1.8;
}

/* Maint grid */
.maint-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.maint-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}
.maint-card .lbl {
  font-size: 0.72rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 8px;
}
.maint-card .val {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--fg);
  font-family: var(--font-en-display);
}
.maint-card .val-good { color: var(--color-success-500); }

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.comparison-table th {
  background: var(--bg-elevated);
  color: var(--fg-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 16px 24px;
  text-align: left;
  border-bottom: 2px solid var(--border);
}
.comparison-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 0.94rem;
  color: var(--fg-secondary);
  line-height: 1.7;
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table .tool-name {
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
}

/* Verdict Box */
.verdict-box {
  background: var(--glow-success);
  border: none;
  border-left: 4px solid var(--color-success-600);
  border-radius: var(--radius-sm);
  padding: 28px 32px;
  font-size: 1.05rem;
  line-height: 2;
  color: var(--fg);
  font-weight: 500;
}

/* Related grid */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

/* =========================================================================
   Skills ranking UI
   ========================================================================= */

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: var(--fw-extrabold);
  font-family: var(--font-en-display);
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.rank-badge.rank-s {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}
.rank-badge.rank-a {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.rank-badge.rank-b {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  box-shadow: 0 2px 6px rgba(124,58,237,0.2);
}
.rank-badge.rank-c {
  background: var(--bg-elevated);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}
.rank-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.rank-label.rank-s { color: var(--color-accent-600); }
.rank-label.rank-a { color: var(--color-primary-600); }
.rank-label.rank-b { color: var(--color-violet-600); }
.rank-label.rank-c { color: var(--fg-muted); }

/* Skill top picks */
.skill-top-picks {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.skill-pick-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  transition: all 200ms ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.skill-pick-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity 200ms ease;
}
.skill-pick-card.rank-s::before { background: linear-gradient(90deg, #fbbf24, #f59e0b); opacity: 1; }
.skill-pick-card.rank-a::before { background: linear-gradient(90deg, #3b82f6, #2563eb); opacity: 1; }
.skill-pick-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.skill-pick-rank {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: var(--fw-extrabold);
  font-family: var(--font-en-display);
}
.skill-pick-rank.rank-s { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.skill-pick-rank.rank-a { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; }
.skill-pick-rank.rank-b { background: var(--fg); color: #fff; }

.skill-pick-card .pick-rank-badge { margin-bottom: 12px; }
.skill-pick-card h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 6px;
  padding-right: 36px;
  line-height: 1.4;
  color: var(--fg);
}
.skill-pick-card .pick-source {
  font-size: 0.72rem;
  color: var(--fg-muted);
  margin-bottom: 4px;
  font-weight: 500;
}
.skill-pick-card .pick-desc {
  font-size: 0.82rem;
  color: var(--fg-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
  flex: 1;
  line-height: 1.6;
}
.skill-pick-card .pick-meta {
  display: flex;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--fg-muted);
  font-weight: 600;
  align-items: center;
  flex-wrap: wrap;
}
.skill-pick-card .pick-dl {
  color: var(--color-success-600);
  font-family: var(--font-mono);
}
.skill-pick-card .pick-score {
  font-family: var(--font-mono);
}

/* Sort & view controls */
.skill-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 20px;
  flex-wrap: wrap;
}
.sort-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
}
.sort-tab {
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  color: var(--fg-secondary);
  cursor: pointer;
  transition: all 200ms ease;
  border: none;
  background: none;
  font-family: inherit;
  font-weight: 600;
  white-space: nowrap;
}
.sort-tab:hover { color: var(--fg); background: var(--bg-surface); }
.sort-tab.active {
  background: var(--color-neutral-900);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .sort-tab.active { background: var(--action-primary); color: #fff; }

/* Enhanced skill card with rank accent */
.skill-card-ranked {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 200ms ease;
  display: flex;
  flex-direction: column;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.skill-card-ranked:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.skill-card-ranked.card-rank-s { border-left: 3px solid #f59e0b; }
.skill-card-ranked.card-rank-a { border-left: 3px solid #2563eb; }
.skill-card-header-ranked {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 12px;
}
.skill-card-header-ranked .skill-rank-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.skill-card-header-ranked .skill-rank-num {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--fg-muted);
  font-weight: 700;
}

/* Download bar */
.dl-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.dl-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: var(--radius-pill);
  overflow: hidden;
  max-width: 80px;
}
.dl-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--color-success-600);
  transition: width 0.4s ease;
}
.dl-count {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--color-success-600);
}

/* Score meter */
.score-meter {
  display: flex;
  align-items: center;
  gap: 6px;
}
.score-meter-bar {
  width: 48px;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.score-meter-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}
.score-meter-fill.fill-s { background: #f59e0b; }
.score-meter-fill.fill-a { background: #2563eb; }
.score-meter-fill.fill-b { background: #7c3aed; }
.score-meter-fill.fill-c { background: var(--fg-muted); }

/* Rank filter stats row */
.rank-stats-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.rank-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 200ms ease;
  color: var(--fg-secondary);
}
.rank-stat-chip:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  border-color: var(--border-strong);
}
.rank-stat-chip .chip-rank {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: var(--fw-extrabold);
  font-family: var(--font-en-display);
  color: #fff;
}
.rank-stat-chip .chip-rank.rank-s { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.rank-stat-chip .chip-rank.rank-a { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.rank-stat-chip .chip-rank.rank-b { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.rank-stat-chip .chip-rank.rank-c { background: var(--fg-muted); }

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 1100px) {
  .top-picks        { grid-template-columns: repeat(3, 1fr); }
  .stats-row        { grid-template-columns: repeat(3, 1fr); }
  .landing-sections { grid-template-columns: repeat(2, 1fr); }
  .skill-top-picks  { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .header-inner      { flex-direction: column; gap: 10px; padding: 10px 16px; }
  .site-nav          { gap: 1px; padding: 2px; }
  .site-nav-item     { padding: 6px 12px; font-size: 0.75rem; }
  .search-box        { max-width: 100%; }
  .hero              { padding: 28px 16px 0; }
  .section           { padding: 0 16px; }
  .landing-sections  { grid-template-columns: 1fr; gap: 12px; margin: 24px 0; }
  .landing-card      { padding: 24px 20px; }
  .landing-card-icon { font-size: 2rem; width: 56px; height: 56px; }
  .stats-row         { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card         { padding: 14px 12px; }
  .stat-number       { font-size: 1.4rem; }
  .top-picks         { grid-template-columns: 1fr; }
  .repo-grid         { grid-template-columns: 1fr; }
  .controls          { flex-direction: column; align-items: stretch; }
  .tab-group         { overflow-x: auto; }
  .sort-select       { margin-left: 0; }
  .hero-headline     { font-size: 1.4rem; }
  .detail-hero       { padding: 24px 16px 0; }
  .detail-hero h1    { font-size: 1.6rem; }
  .detail-section    { padding: 0 16px 40px; }
  .explanation       { padding: 0 16px 40px; }
  .feature-grid      { grid-template-columns: 1fr !important; }
  .flow-chart        { flex-direction: column; align-items: center; }
  .flow-arrow        { transform: rotate(90deg); margin: 8px 0; }
  .persona-cards     { grid-template-columns: 1fr !important; }
  .comparison-table th, .comparison-table td { padding: 12px 14px; font-size: 0.88rem; }
  .skill-top-picks   { grid-template-columns: 1fr; }
  .skill-controls    { flex-direction: column; align-items: stretch; }
  .rank-stats-row    { gap: 6px; }
  .rank-stat-chip    { font-size: 0.72rem; padding: 5px 10px; }
}

/* =========================================================================
   SNS Share Bar — サイト配色に統一したシンプル版
   ========================================================================= */
.share-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  max-width: var(--container-max);
  margin: 18px auto;
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}
.share-bar-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fg-secondary);
  letter-spacing: 0.02em;
}
.share-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--fg-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 180ms ease;
  cursor: pointer;
}
.share-btn:hover {
  border-color: var(--action-primary);
  color: var(--action-primary);
  background: var(--bg-surface);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.share-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
.share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--fg);
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-en);
  line-height: 1;
}
.share-btn:hover .share-icon {
  background: var(--action-primary);
  color: var(--fg-inverse);
}
.share-label {
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .share-bar {
    margin: 12px 16px;
    padding: 10px 14px;
    gap: 8px;
  }
  .share-bar-label { font-size: 0.72rem; }
  .share-btn       { padding: 5px 10px; font-size: 0.72rem; }
  .share-label     { display: none; }
}

