/*
Theme Name: Quality of Life Scale Clone
Theme URI: https://example.com/
Author: OpenAI
Description: WordPress theme modeled after the uploaded Quality of Life Scale design, with Customizer-managed ad spaces, footer text, logo, and favicon support.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: qol-scale-clone
*/

:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft-line: #f1f5f9;
  --rose: #f43f5e;
  --rose-dark: #e11d48;
  --rose-soft: #fff1f2;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 8px 26px rgba(15, 23, 42, 0.06);
  --radius: 24px;
  --radius-sm: 14px;
  --container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; }
.site-wrap { min-height: 100vh; display: flex; flex-direction: column; }
.container { width: min(var(--container), calc(100% - 32px)); margin: 0 auto; }
.site-main { flex: 1; padding: 32px 0; }

.site-header {
  position: sticky; top: 0; z-index: 80;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: nowrap;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); flex: 0 1 auto; min-width: 0; white-space: nowrap; }
.brand svg { width: 24px; height: 24px; color: var(--rose); fill: currentColor; }
.brand-text { font-size: 1.25rem; line-height: 1; white-space: nowrap; }
.brand-logo img { max-height: 40px; width: auto; display: block; }
.desktop-nav { display: flex; align-items: center; gap: 26px; flex: 0 0 auto; white-space: nowrap; }
.desktop-nav > a, .desktop-nav > button, .drop-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); background: none; border: 0; cursor: pointer; white-space: nowrap; padding: 0; }
.desktop-nav > a:hover, .desktop-nav > button:hover, .drop-toggle:hover, .desktop-nav > a.is-active { color: var(--rose); }
.menu-toggle { display: none; border: 0; background: none; padding: 8px; cursor: pointer; flex: 0 0 auto; }
.menu-toggle svg { width: 24px; height: 24px; }
.dropdown { position: relative; display: inline-flex; align-items: center; }
.dropdown-panel {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; width: 280px;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 8px;
  box-shadow: var(--shadow); max-height: 420px; overflow: auto;
}
.dropdown:hover .dropdown-panel { display: block; }
.dropdown-panel a { display: block; padding: 11px 12px; border-radius: 12px; font-size: 12px; }
.dropdown-panel a:hover { background: #f8fafc; }
.dropdown-panel a.dropdown-view-all { font-weight: 800; color: var(--rose); }

.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 70; background: #fff; padding: 88px 16px 24px;
}
.mobile-menu.is-open { display: block; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 10px; }
.mobile-menu a { font-size: 1rem; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mobile-menu-label { margin: 16px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: #94a3b8; }
.mobile-menu-scales { max-height: 60vh; overflow: auto; display: grid; gap: 4px; }
.mobile-menu-scales a { color: var(--muted); border: 0; padding: 6px 0; }

.section-space { display: grid; gap: 96px; }
.hero { max-width: 896px; margin: 0 auto; text-align: center; padding-top: 48px; display: grid; gap: 32px; }
.hero-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; background: var(--rose-soft); border: 1px solid #ffe4e6;
  color: var(--rose); font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
}
.hero-badge svg { width: 12px; height: 12px; fill: currentColor; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 4.7rem); line-height: 1.08; letter-spacing: -0.04em; font-weight: 900; margin: 0; }
.hero h1 .accent { color: var(--rose); }
.hero p { margin: 0 auto; max-width: 760px; font-size: 1.25rem; line-height: 1.8; color: var(--muted); }
.button-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  border-radius: 18px; min-height: 56px; padding: 0 30px; border: 1px solid transparent;
  font-weight: 700; font-size: 1rem; transition: .25s ease; text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #0f172a; color: #fff; box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16); }
.btn-primary:hover { background: #1e293b; }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--line); }
.btn-secondary:hover { border-color: #cbd5e1; }
.btn-rose { background: var(--rose-dark); color: #fff; box-shadow: 0 16px 40px rgba(244,63,94,.22); }
.btn-ghost { min-height: auto; padding: 0; background: none; border: 0; color: var(--rose); }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.icon-inline { width: 16px; height: 16px; }

.featured-band { position: relative; }
.featured-band::before {
  content: ""; position: absolute; inset: 0; background: rgba(255, 241, 242, .7); transform: skewY(-3deg);
  transform-origin: top left; z-index: 0;
}
.featured-band-inner { position: relative; z-index: 1; padding: 80px 0; }
.section-heading { text-align: center; margin-bottom: 48px; }
.section-heading h2 { margin: 0 0 12px; font-size: clamp(2rem, 3vw, 2.2rem); font-weight: 900; letter-spacing: -0.03em; }
.section-heading p { margin: 0; color: var(--muted); }

.tool-wrap { max-width: 768px; margin: 0 auto; }
.card {
  background: rgba(255,255,255,.86); border-radius: 30px; box-shadow: var(--shadow); border: 0;
  overflow: hidden;
}
.card-body { padding: 32px; }
.card-header { padding: 32px 32px 0; }
.kicker-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 8px; }
.kicker { font-size: 11px; color: var(--rose); letter-spacing: .18em; text-transform: uppercase; font-weight: 800; }
.progress-dots { display: flex; gap: 4px; }
.progress-dots span { height: 4px; width: 16px; border-radius: 999px; background: #e2e8f0; }
.progress-dots span.is-active { background: var(--rose); }
.tool-title { margin: 0 0 8px; font-size: 2rem; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
.tool-desc { margin: 0; color: var(--muted); }
.scale-nums { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.scale-num {
  width: 40px; height: 40px; border-radius: 999px; border: 2px solid #f1f5f9; background: #fff; color: #94a3b8;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: .2s ease;
}
.scale-num:hover { border-color: #fecdd3; color: var(--rose); }
.scale-num.is-active { background: var(--rose); color: #fff; border-color: var(--rose); box-shadow: 0 14px 26px rgba(244,63,94,.24); transform: scale(1.08); }
.range-track { position: relative; height: 6px; border-radius: 999px; background: #e2e8f0; }
.range-progress { position: absolute; height: 100%; left: 0; top: 0; border-radius: 999px; background: var(--rose); width: 0%; }
.range-input { width: 100%; appearance: none; background: none; margin-top: -11px; position: relative; }
.range-input::-webkit-slider-thumb { appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--rose); box-shadow: 0 6px 18px rgba(244,63,94,.25); cursor: pointer; }
.range-input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--rose); box-shadow: 0 6px 18px rgba(244,63,94,.25); cursor: pointer; }
.range-input::-webkit-slider-runnable-track { background: transparent; }
.range-input::-moz-range-track { background: transparent; }
.labels-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 10px; font-weight: 800; color: #94a3b8; letter-spacing: .12em; text-transform: uppercase; }
.labels-row .value { font-size: 1.125rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--rose); letter-spacing: normal; }
.tool-controls { display: flex; gap: 16px; margin-top: 48px; }
.tool-controls .btn { flex: 1; }

.result-topline { height: 8px; background: var(--rose); }
.result-center { display: grid; gap: 16px; justify-items: center; text-align: center; }
.score-ring { width: 160px; height: 160px; position: relative; }
.score-ring svg { width: 160px; height: 160px; transform: rotate(-90deg); }
.score-ring-center { position: absolute; inset: 0; display: grid; place-content: center; }
.score-ring-center .score { font-size: 2.5rem; line-height: 1; font-weight: 900; }
.score-ring-center .label { font-size: 11px; text-transform: uppercase; font-weight: 800; color: #94a3b8; letter-spacing: .14em; }
.result-label { color: var(--rose-dark); font-size: 1.75rem; font-weight: 800; }
.result-description { max-width: 560px; color: #475569; line-height: 1.8; }
.info-box {
  display: flex; gap: 16px; align-items: flex-start; background: #f8fafc; border: 1px solid var(--soft-line); border-radius: 24px; padding: 24px;
}
.info-box svg { width: 20px; height: 20px; color: var(--rose); flex: 0 0 auto; margin-top: 2px; }
.info-box p { margin: 0; }
.info-box .title { font-size: 14px; font-weight: 800; margin-bottom: 6px; }
.info-box .text { font-size: 12px; color: var(--muted); line-height: 1.8; }
.resource-list { display: grid; gap: 12px; }
.resource-item {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px;
  border-radius: 16px; background: #fff; border: 1px solid var(--soft-line); box-shadow: var(--shadow-sm); transition: .2s ease;
}
.resource-item:hover { border-color: #fecdd3; background: rgba(255, 241, 242, .35); }
.resource-item-title { font-size: 14px; font-weight: 800; }
.resource-item-desc { font-size: 12px; color: var(--muted); margin-top: 4px; }
.resource-item svg { width: 16px; height: 16px; color: #cbd5e1; flex: 0 0 auto; }
.resource-item:hover svg { color: var(--rose); }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.feature-card, .scale-card {
  padding: 32px; border-radius: 30px; background: #fff; border: 1px solid var(--soft-line); box-shadow: var(--shadow-sm);
}
.feature-card-icon {
  width: 48px; height: 48px; border-radius: 18px; display: grid; place-content: center; margin-bottom: 16px;
}
.feature-card h3, .scale-card h3 { margin: 0 0 12px; font-size: 1.25rem; font-weight: 800; }
.feature-card p, .scale-card p { margin: 0; font-size: 14px; line-height: 1.8; color: var(--muted); }
.feature-card-icon.blue { background: #eff6ff; color: #2563eb; }
.feature-card-icon.green { background: #f0fdf4; color: #16a34a; }
.feature-card-icon.purple { background: #faf5ff; color: #9333ea; }
.feature-card-icon svg { width: 24px; height: 24px; }

.section-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.scale-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.scale-card { transition: .25s ease; height: 100%; }
.scale-card:hover { box-shadow: 0 20px 45px rgba(15,23,42,.09); }
.scale-card .meta { margin-top: 24px; display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .14em; color: #94a3b8; text-transform: uppercase; }
.scale-card:hover h3 { color: var(--rose); }

.article-prose { max-width: 896px; margin: 0 auto; padding-top: 80px; border-top: 1px solid var(--line); }
.article-prose h2, .article-prose h3 { color: var(--text); font-weight: 900; letter-spacing: -.02em; }
.article-prose h2 { font-size: 2rem; margin: 0 0 24px; }
.article-prose p, .article-prose li { color: #475569; line-height: 1.9; }
.article-prose ul { padding-left: 20px; }
.article-prose p + p { margin-top: 18px; }

.page-header { max-width: 900px; display: grid; gap: 14px; margin-bottom: 48px; }
.page-header h1 { margin: 0; font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 900; letter-spacing: -.035em; }
.page-header p { margin: 0; color: var(--muted); line-height: 1.8; font-size: 1.125rem; }
.page-shell { display: grid; gap: 48px; }
.page-two-col { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, .9fr); gap: 32px; align-items: start; }
.side-card { background: #fff; border: 1px solid var(--soft-line); box-shadow: var(--shadow-sm); border-radius: 24px; padding: 24px; }
.side-card h3 { margin: 0 0 16px; font-size: 1.125rem; font-weight: 800; }
.scoring-guide { display: grid; gap: 12px; }
.scoring-guide-item { padding: 14px; border-radius: 16px; background: #f8fafc; border: 1px solid var(--soft-line); }
.scoring-guide-item strong { display: block; margin-bottom: 4px; }
.scoring-guide-item p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.7; }
.list-links { display: grid; gap: 12px; }
.list-links a { display: block; padding: 16px; border-radius: 16px; background: #fff; border: 1px solid var(--soft-line); }
.list-links a:hover { border-color: #fecdd3; }
.list-links small { display: block; margin-top: 6px; color: var(--muted); }

.ad-slot {
  border: 1px dashed #cbd5e1; background: #fff; border-radius: 22px; padding: 18px; color: var(--muted);
}
.ad-slot + .ad-slot { margin-top: 16px; }
.ad-slot-label { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; font-weight: 800; color: #94a3b8; margin-bottom: 8px; }
.ad-slot-content { font-size: 14px; line-height: 1.7; }

.site-footer { background: #fff; border-top: 1px solid var(--line); margin-top: 80px; padding: 48px 0; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 48px; }
.footer-col h4 { margin: 0 0 16px; font-size: 1rem; font-weight: 800; }
.footer-col p, .footer-col li, .footer-col a { color: var(--muted); font-size: 14px; line-height: 1.8; }
.footer-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.footer-note { font-size: 10px; color: #94a3b8 !important; margin-top: 16px; }
.footer-copy { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 32px; text-align: center; color: #94a3b8; font-size: 12px; }

.hidden { display: none !important; }

@media (max-width: 1023px) {
  .feature-grid, .scale-grid, .footer-grid, .page-two-col { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
.desktop-nav { display: flex; align-items: center; gap: 26px; flex: 0 0 auto; white-space: nowrap; }
.menu-toggle { display: none; border: 0; background: none; padding: 8px; cursor: pointer; flex: 0 0 auto; }
  .site-main { padding: 24px 0; }
  .section-space { gap: 72px; }
  .hero { gap: 24px; }
  .tool-controls, .section-row { flex-direction: column; align-items: stretch; }
  .card-header, .card-body, .feature-card, .scale-card { padding: 24px; }
.brand-text { font-size: 1.25rem; line-height: 1; white-space: nowrap; }
}