/* ════════════════════════════════════════════════════════════
 * escwasd Tool Detail Page Shared Styles — extracted from site.css
 * Auto-loaded on all tool detail pages (:lang/:slug), includes dark theme + responsive + channel pages
 * ════════════════════════════════════════════════════════════ */
/* ================================================================
 * Tool Detail Page Common Block Styles — Game Boy Industrial v2
 * Architecture: site-wide shared (site.css), tool-specific interaction styles → {tool}.css
 * ================================================================ */

.tool-page h1 {
  margin: 0;
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dpad-500, #2b2f36);
}

/* ── Generic section ── */
.tool-section {
  margin-bottom: 32px;
}
.tool-section h2 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dpad-500, #2b2f36);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--fog-200, #e0ddd5);
  display: flex;
  align-items: center;
  gap: 10px;
}
.tool-section h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--screen-green, #94b54f);
  border-radius: 2px;
}

/* ── Intro area (below tool title) ── */
.tool-intro-section {
  padding: 20px 24px;
  background: var(--fog-100, #f0ede8);
  border-radius: 8px;
  border: 1px solid var(--fog-200, #e0ddd5);
}
.tool-intro {
  font-size: 1rem;
  line-height: 1.85;
  color: #555;
  margin: 0;
}

/* ── Features Details ── */
.tool-detail-section {
  padding: 22px 24px;
  background: linear-gradient(135deg, #fafaf6 0%, #f0ede8 100%);
  border-radius: 8px;
  border: 1px solid var(--fog-200, #e0ddd5);
}
.tool-detail-section p {
  font-size: 0.95rem;
  line-height: 1.9;
  color: #4a4a4a;
}

/* ── Usage ol ── */
.tool-section ol {
  list-style: none;
  counter-reset: step;
  padding: 0;
}
.tool-section ol li {
  counter-increment: step;
  position: relative;
  padding: 12px 0 12px 44px;
  color: #444;
  line-height: 1.7;
  border-bottom: 1px solid var(--fog-200, #f0edf0);
}
.tool-section ol li:last-child { border-bottom: none; }
.tool-section ol li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 10px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--screen-green, #94b54f);
  background: #fafaf6;
  border: 1px solid var(--fog-200, #e0ddd5);
  border-radius: 4px;
}

/* ── Features cards ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.feature-card {
  padding: 16px 18px;
  background: #fafaf8;
  border: 1px solid var(--fog-200, #e6e3de);
  border-radius: 6px;
  font-size: 0.95rem;
  color: #444;
  line-height: 1.5;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.feature-card:hover {
  border-color: var(--screen-green, #94b54f);
  box-shadow: 0 0 0 1px var(--screen-green, #94b54f);
}

/* ── Scenarios ul ── */
.tool-section ul {
  list-style: none;
  padding: 0;
}
.tool-section ul li {
  position: relative;
  padding: 10px 0 10px 20px;
  color: #555;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--fog-200, #f0edf0);
}
.tool-section ul li:last-child { border-bottom: none; }
.tool-section ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 16px;
  width: 8px; height: 8px;
  background: var(--screen-green, #94b54f);
  border-radius: 1px;
  transform: rotate(45deg);
}

/* ── FAQ accordion ── */
.tool-faq-section .faq-item {
  margin-bottom: 10px;
  border: 1px solid var(--fog-200, #e8e5dd);
  border-radius: 6px;
  overflow: hidden;
  background: #fafaf8;
  transition: border-color 0.18s;
}
.tool-faq-section .faq-item:hover {
  border-color: var(--screen-green, #94b54f);
}
.tool-faq-section .faq-item h3 {
  margin: 0;
  padding: 14px 18px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--dpad-500, #2b2f36);
  border-bottom: none;
  cursor: pointer;
  user-select: none;
  transition: color 0.18s;
}
.tool-faq-section .faq-item h3:hover {
  color: var(--screen-dark, #708d3d);
}
.tool-faq-section .faq-item p {
  margin: 0;
  padding: 0 18px 16px;
  font-size: 0.93rem;
  line-height: 1.85;
  color: #555;
}

/* ── Interactive area panel enhancement ── */
.tool-interaction {
  margin-bottom: 32px;
}

/* ════════════════════════════════════════════════════════════
 * Dark theme
 * ════════════════════════════════════════════════════════════ */
[data-theme="dark"] .tool-page h1 {
  color: #d8d8d0;
}
[data-theme="dark"] .tool-section h2 {
  color: #d0d0c8;
  border-bottom-color: #3a3e3a;
}
[data-theme="dark"] .tool-intro-section {
  background: #1a1e18;
  border-color: #3a3e3a;
}
[data-theme="dark"] .tool-detail-section {
  background: linear-gradient(135deg, #181c18 0%, #141814 100%);
  border-color: #3a3e3a;
}
[data-theme="dark"] .tool-detail-section p,
[data-theme="dark"] .tool-intro {
  color: #b0b0a0;
}
[data-theme="dark"] .tool-section ol li,
[data-theme="dark"] .tool-section ul li {
  color: #b0b0a0;
  border-bottom-color: #2a2e2a;
}
[data-theme="dark"] .tool-section ol li::before {
  background: #1a1e18;
  border-color: #3a3e3a;
}
[data-theme="dark"] .feature-card {
  background: #1a1e18;
  border-color: #3a3e3a;
  color: #b0b0a0;
}
[data-theme="dark"] .tool-faq-section .faq-item {
  background: #1a1e18;
  border-color: #3a3e3a;
}
[data-theme="dark"] .tool-faq-section .faq-item h3 {
  color: #d0d0c8;
}
[data-theme="dark"] .tool-faq-section .faq-item p {
  color: #b0b0a0;
}

/* ════════════════════════════════════════════════════════════
 * Responsive
 * ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .tool-page h1 { font-size: 1.5rem; }
  .tool-section h2 { font-size: 1.05rem; }
  .features-grid { grid-template-columns: 1fr; }
  .tool-intro-section,
  .tool-detail-section { padding: 16px; }
}

/* ════════════════════════════════════════════════════════════
 * Channel pages (category aggregation — SEO optimized)
 * ════════════════════════════════════════════════════════════ */

.channel-view {
  max-width: var(--layout-content-standard, 1200px);
  margin: 0 auto;
}

.channel-header {
  margin-bottom: 2.5rem;
}

.channel-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dpad-500, #2b2f36);
  margin: 0 0 0.75rem;
}

.channel-description {
  font-size: 1.05rem;
  color: var(--home-text-muted, #6b7280);
  line-height: 1.7;
  margin: 0;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.channel-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: transform 0.18s, box-shadow 0.18s;
}

.channel-card:hover {
  transform: translateY(-3px);
  box-shadow:
    12px 12px 24px rgba(78, 76, 80, 0.2),
    -8px -8px 16px rgba(250, 248, 245, 0.9);
}

html[data-theme="dark"] .channel-card:hover {
  box-shadow: 12px 12px 24px rgba(0, 0, 0, 0.28), -8px -8px 16px rgba(255, 255, 255, 0.03);
}

.channel-card-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dpad-500, #2b2f36);
  margin: 0 0 0.5rem;
}

html[data-theme="dark"] .channel-card-name {
  color: #d0d0c8;
}

.channel-card-intro {
  font-size: 0.95rem;
  color: var(--home-text-muted, #6b7280);
  line-height: 1.6;
  flex: 1;
  margin: 0 0 1rem;
}

html[data-theme="dark"] .channel-card-intro {
  color: #b0b0a0;
}

.channel-card-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: #8ea85c;
  margin-top: auto;
}

/* ── Dark Theme ── */
html[data-theme="dark"] .channel-title {
  color: #d8d8d0;
}

html[data-theme="dark"] .channel-description {
  color: #b0b0a0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .channel-grid {
    grid-template-columns: 1fr;
  }
  .channel-card {
    padding: 1.25rem;
  }
}

/* ════════════════════════════════════════════════════════════
 * Stats data block (rating.* labels + ratingcount.* values)
 * Auto-layout 1~5 stat cards via CSS Grid, no per-card styling
 * ════════════════════════════════════════════════════════════ */
.tool-stats-section {
  padding: 0;
  margin-bottom: 24px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
  text-align: center;
  background: var(--fog-100, #f0ede8);
  border: 1px solid var(--fog-200, #e0ddd5);
  border-radius: 8px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.stat-card:hover {
  border-color: var(--screen-green, #94b54f);
  box-shadow: 0 0 0 1px var(--screen-green, #94b54f);
}
.stat-value {
  font-family: 'Rajdhani', 'IBM Plex Mono', monospace;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--dpad-500, #2b2f36);
}
.stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--home-text-muted, #6b7280);
  margin-top: 4px;
  letter-spacing: 0.02em;
}
/* Dark theme */
[data-theme="dark"] .stat-card {
  background: #1a1e18;
  border-color: #3a3e3a;
}
[data-theme="dark"] .stat-value {
  color: #d8d8d0;
}
[data-theme="dark"] .stat-label {
  color: #8a8a78;
}
/* Responsive */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
  }
  .stat-card {
    padding: 14px 8px;
  }
  .stat-value {
    font-size: 1.3rem;
  }
}

/* ════════════════════════════════════════════════════════════
 * Cookie Consent Banner — Game Boy style
 * ════════════════════════════════════════════════════════════ */


