/* ==========================================================================
   QuietMySpace — Global Stylesheet
   Palette: Navy #1a2540 | Background #f8f9fb | Teal #2dd4bf | Amber #f59e0b
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #f8f9fb;
  color: #1a2540;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

a {
  color: #2dd4bf;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #14b8a6;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 700;
  color: #1a2540;
}

h1 { font-size: 2.25rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1rem;
}

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section--alt {
  background: #fff;
}

.text-center {
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.site-header {
  background: #1a2540;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  max-width: 1120px;
  margin: 0 auto;
  height: 64px;
}

.nav__logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav__logo:hover {
  color: #2dd4bf;
}

.nav__logo span {
  color: #2dd4bf;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__links a,
.nav__links .nav__dropdown-toggle {
  color: #cbd5e1;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav__links a:hover,
.nav__links .nav__dropdown-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav__links a.active {
  color: #2dd4bf;
  background: rgba(45, 212, 191, 0.1);
}

/* Dropdown */
.nav__dropdown {
  position: relative;
}

.nav__dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav__dropdown-toggle::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.2s;
}

.nav__dropdown:hover .nav__dropdown-toggle::after,
.nav__dropdown:focus-within .nav__dropdown-toggle::after {
  transform: rotate(180deg);
}

.nav__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  min-width: 260px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 100;
}

.nav__dropdown:hover .nav__dropdown-menu,
.nav__dropdown:focus-within .nav__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__dropdown-menu a {
  display: block;
  padding: 0.6rem 1.2rem;
  color: #1a2540;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 0;
}

.nav__dropdown-menu a:hover {
  background: #f0fdfa;
  color: #0d9488;
}

.nav__dropdown-menu a.dropdown-heading {
  font-weight: 700;
  color: #1a2540;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 0.25rem;
}

/* Coffee icon link */
.nav__coffee {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #f59e0b !important;
  font-weight: 600;
  font-size: 0.9rem;
}

.nav__coffee:hover {
  color: #d97706 !important;
}

.nav__coffee svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav__hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav */
@media (max-width: 768px) {
  .nav__hamburger {
    display: flex;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #1a2540;
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }

  .nav__links.open {
    display: flex;
  }

  .nav__links a,
  .nav__links .nav__dropdown-toggle {
    padding: 0.75rem 1rem;
    width: 100%;
    border-radius: 6px;
  }

  .nav__dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    min-width: 100%;
    padding: 0.25rem 0;
    display: none;
  }

  .nav__dropdown.open .nav__dropdown-menu {
    display: block;
  }

  .nav__dropdown-menu a {
    color: #cbd5e1;
    padding: 0.6rem 1.5rem;
  }

  .nav__dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }

  .nav__dropdown-menu a.dropdown-heading {
    color: #94a3b8;
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  background: linear-gradient(135deg, #1a2540 0%, #0f1829 100%);
  color: #fff;
  padding: 5rem 0 4rem;
  text-align: center;
}

.hero h1 {
  color: #fff;
  font-size: 2.75rem;
  max-width: 720px;
  margin: 0 auto 1rem;
}

.hero p {
  color: #94a3b8;
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.hero .btn {
  font-size: 1.1rem;
  padding: 0.9rem 2.2rem;
}

@media (max-width: 640px) {
  .hero {
    padding: 3.5rem 0 3rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: #2dd4bf;
  color: #1a2540;
}

.btn--primary:hover {
  background: #14b8a6;
  color: #1a2540;
  box-shadow: 0 4px 14px rgba(45, 212, 191, 0.35);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: #2dd4bf;
  border: 2px solid #2dd4bf;
}

.btn--outline:hover {
  background: #2dd4bf;
  color: #1a2540;
}

.btn--coffee {
  background: #f59e0b;
  color: #1a2540;
}

.btn--coffee:hover {
  background: #d97706;
  color: #1a2540;
}

.btn--sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  border-radius: 6px;
}

.btn--lg {
  padding: 0.9rem 2.2rem;
  font-size: 1.1rem;
}

.btn--block {
  width: 100%;
}

/* ==========================================================================
   Cards (general)
   ========================================================================== */

.card {
  background: #fff;
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.card--clickable {
  cursor: pointer;
}

.card--clickable:hover {
  transform: translateY(-2px);
}

/* Card grid */
.card-grid {
  display: grid;
  gap: 1.5rem;
}

.card-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
  .card-grid--2,
  .card-grid--3 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Problem Section
   ========================================================================== */

.problem-section {
  background: #fff;
  text-align: center;
}

.problem-section p {
  max-width: 640px;
  margin: 0 auto 1rem;
  color: #475569;
  font-size: 1.05rem;
}

/* ==========================================================================
   How It Works
   ========================================================================== */

.how-it-works {
  text-align: center;
}

.how-it-works__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}

.how-it-works__step {
  text-align: center;
}

.how-it-works__icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(45, 212, 191, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.75rem;
}

.how-it-works__step h3 {
  margin-bottom: 0.5rem;
}

.how-it-works__step p {
  color: #64748b;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .how-it-works__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ==========================================================================
   Featured Guides
   ========================================================================== */

.featured-guides {
  background: #fff;
}

.guide-card {
  border-left: 3px solid #2dd4bf;
  padding-left: 1.25rem;
}

.guide-card h3 a {
  color: #1a2540;
}

.guide-card h3 a:hover {
  color: #2dd4bf;
}

.guide-card p {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.guide-card .read-more {
  font-size: 0.9rem;
  font-weight: 600;
}

/* ==========================================================================
   Solver / Quiz
   ========================================================================== */

.solver {
  background: linear-gradient(135deg, #0f1829 0%, #1a2540 100%);
  color: #fff;
}

.solver h2 {
  color: #fff;
  text-align: center;
}

.solver__subtitle {
  text-align: center;
  color: #94a3b8;
  margin-bottom: 2rem;
}

/* Progress indicator */
.solver__progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.solver__progress-step {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.3s;
}

.solver__progress-step.active {
  background: #2dd4bf;
}

.solver__progress-step.completed {
  background: #2dd4bf;
}

.solver__progress-label {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-left: 0.75rem;
}

/* Quiz step */
.solver__step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.solver__step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.solver__question {
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
  color: #fff;
}

/* Option cards */
.solver__options {
  display: grid;
  gap: 0.75rem;
  max-width: 600px;
  margin: 0 auto;
}

.solver__option {
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: #e2e8f0;
  text-align: left;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.solver__option:hover {
  background: rgba(45, 212, 191, 0.1);
  border-color: #2dd4bf;
  color: #fff;
  transform: translateX(4px);
}

.solver__option-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 2.2rem;
  text-align: center;
}

.solver__option.selected {
  background: rgba(45, 212, 191, 0.15);
  border-color: #2dd4bf;
  color: #fff;
}

/* Back button */
.solver__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 1rem;
  padding: 0.35rem 0;
  transition: color 0.2s;
}

.solver__back:hover {
  color: #fff;
}

/* Results */
.solver__results {
  max-width: 780px;
  margin: 0 auto;
  animation: fadeIn 0.4s ease;
}

.solver__results-header {
  text-align: center;
  margin-bottom: 2rem;
}

.solver__results-header h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.solver__results-header p {
  color: #94a3b8;
}

.solver__results-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.solver__results-tag {
  background: rgba(45, 212, 191, 0.12);
  color: #2dd4bf;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Recommendation cards */
.recommendation {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.recommendation__priority {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #2dd4bf;
  color: #1a2540;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.recommendation h4 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.recommendation__why {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* Product comparison table */
.product-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.product-table thead {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.product-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product-table td {
  padding: 0.7rem 0.75rem;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.product-table tr:last-child td {
  border-bottom: none;
}

.product-table .product-name {
  color: #fff;
  font-weight: 600;
}

.product-table .amazon-link {
  color: #2dd4bf;
  font-weight: 600;
  white-space: nowrap;
}

.product-table .amazon-link:hover {
  color: #14b8a6;
}

/* Responsive table */
@media (max-width: 640px) {
  .product-table,
  .product-table thead,
  .product-table tbody,
  .product-table th,
  .product-table td,
  .product-table tr {
    display: block;
  }

  .product-table thead {
    display: none;
  }

  .product-table tr {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .product-table td {
    padding: 0.25rem 0;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .product-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #94a3b8;
    font-size: 0.8rem;
    text-transform: uppercase;
  }
}

/* Start over */
.solver__restart {
  text-align: center;
  margin-top: 2rem;
}

/* ==========================================================================
   Guide Layout (Article + Sidebar)
   ========================================================================== */

.guide-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.guide-layout article {
  min-width: 0;
}

.guide-layout article h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.guide-layout article .meta {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.guide-layout article h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid rgba(45, 212, 191, 0.2);
}

.guide-layout article p {
  color: #334155;
}

.guide-layout article ul,
.guide-layout article ol {
  margin: 0 0 1.25rem 1.5rem;
  color: #334155;
}

.guide-layout article ul {
  list-style: disc;
}

.guide-layout article ol {
  list-style: decimal;
}

.guide-layout article li {
  margin-bottom: 0.4rem;
}

/* Product callout box */
.product-callout {
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  border-left: 4px solid #2dd4bf;
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.product-callout h4 {
  color: #1a2540;
  margin-bottom: 0.4rem;
}

.product-callout p {
  color: #475569;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.product-callout .amazon-link {
  font-weight: 600;
  font-size: 0.9rem;
}

/* FAQ details/summary */
.guide-layout details {
  margin: 1rem 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.guide-layout details summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-layout details summary::before {
  content: '+';
  font-size: 1.2rem;
  font-weight: 700;
  color: #2dd4bf;
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
}

.guide-layout details[open] summary::before {
  content: '\2212';
}

.guide-layout details summary::-webkit-details-marker {
  display: none;
}

.guide-layout details > div,
.guide-layout details > p {
  padding: 0 1.25rem 1rem;
  color: #475569;
}

/* Sidebar */
.guide-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
}

.guide-sidebar .solver-cta {
  background: linear-gradient(135deg, #1a2540, #0f1829);
  color: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.guide-sidebar .solver-cta p {
  color: #94a3b8;
  margin-bottom: 0.75rem;
}

.guide-sidebar .solver-cta a {
  display: inline-block;
  background: #2dd4bf;
  color: #1a2540;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.guide-sidebar .solver-cta a:hover {
  background: #14b8a6;
}

.guide-sidebar .related-guides {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.guide-sidebar .related-guides h4 {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.guide-sidebar .related-guides a {
  display: block;
  padding: 0.5rem 0;
  color: #1a2540;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid #f1f5f9;
}

.guide-sidebar .related-guides a:last-child {
  border-bottom: none;
}

.guide-sidebar .related-guides a:hover {
  color: #2dd4bf;
}

@media (max-width: 900px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-sidebar {
    position: static;
  }
}

/* ==========================================================================
   Review Cards
   ========================================================================== */

.review-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  margin-bottom: 1rem;
}

.review-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.review-card__name {
  font-weight: 700;
  font-size: 1rem;
}

.review-card__date {
  color: #94a3b8;
  font-size: 0.85rem;
}

.review-card__scenario {
  display: inline-block;
  background: rgba(45, 212, 191, 0.1);
  color: #0d9488;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.review-card__body {
  color: #475569;
  line-height: 1.6;
}

/* ==========================================================================
   Star Ratings
   ========================================================================== */

.stars {
  display: inline-flex;
  gap: 2px;
  color: #f59e0b;
  font-size: 1.1rem;
}

.stars--lg {
  font-size: 1.75rem;
}

.star-empty {
  color: #d1d5db;
}

/* Interactive star input */
.star-input {
  display: flex;
  gap: 4px;
  font-size: 1.75rem;
  cursor: pointer;
}

.star-input span {
  color: #d1d5db;
  transition: color 0.15s;
  user-select: none;
}

.star-input span.filled {
  color: #f59e0b;
}

.star-input span:hover,
.star-input span:hover ~ span {
  color: #f59e0b;
}

/* Aggregate rating display */
.aggregate-rating {
  text-align: center;
  padding: 2rem;
}

.aggregate-rating__number {
  font-size: 3.5rem;
  font-weight: 800;
  color: #1a2540;
  line-height: 1;
}

.aggregate-rating__label {
  color: #64748b;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

/* ==========================================================================
   Stats — CSS Bar Charts
   ========================================================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.stat-card__value {
  font-size: 2.25rem;
  font-weight: 800;
  color: #1a2540;
}

.stat-card__label {
  color: #64748b;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Bar chart */
.bar-chart {
  margin: 1.5rem 0;
}

.bar-chart__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #1a2540;
}

.bar-chart__row {
  display: flex;
  align-items: center;
  margin-bottom: 0.65rem;
  gap: 0.75rem;
}

.bar-chart__label {
  min-width: 120px;
  font-size: 0.85rem;
  color: #475569;
  text-align: right;
  flex-shrink: 0;
}

.bar-chart__track {
  flex: 1;
  height: 28px;
  background: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.bar-chart__fill {
  height: 100%;
  background: linear-gradient(90deg, #2dd4bf, #14b8a6);
  border-radius: 6px;
  transition: width 0.6s ease;
  min-width: 2px;
}

.bar-chart__value {
  min-width: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a2540;
}

/* Daily chart (vertical-ish) uses same horizontal bars */
.bar-chart--daily .bar-chart__label {
  min-width: 90px;
  font-size: 0.8rem;
}

/* ==========================================================================
   Loading Skeleton
   ========================================================================== */

@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(90deg, #e5e7eb 25%, #f1f5f9 50%, #e5e7eb 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 8px;
}

.skeleton--text {
  height: 1rem;
  margin-bottom: 0.75rem;
  width: 100%;
}

.skeleton--text-sm {
  height: 0.75rem;
  margin-bottom: 0.5rem;
  width: 80%;
}

.skeleton--heading {
  height: 1.75rem;
  margin-bottom: 1rem;
  width: 60%;
}

.skeleton--card {
  height: 120px;
  margin-bottom: 1rem;
}

.skeleton--bar {
  height: 28px;
  margin-bottom: 0.65rem;
}

.skeleton--circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
}

.skeleton--stat {
  height: 3rem;
  width: 5rem;
  margin: 0 auto 0.5rem;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: #1a2540;
}

.form-group .hint {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #94a3b8;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.char-counter {
  text-align: right;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.char-counter.warn {
  color: #f59e0b;
}

.char-counter.over {
  color: #ef4444;
}

.form-error {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Thank-you card */
.thank-you {
  text-align: center;
  padding: 3rem 2rem;
  background: #f0fdfa;
  border-radius: 12px;
}

.thank-you h3 {
  color: #0d9488;
  margin-bottom: 0.5rem;
}

.thank-you p {
  color: #475569;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: #1a2540;
  color: #94a3b8;
  padding: 2.5rem 0;
  margin-top: auto;
  font-size: 0.9rem;
}

.site-footer .container {
  text-align: center;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer__links a {
  color: #cbd5e1;
  font-weight: 500;
}

.footer__links a:hover {
  color: #2dd4bf;
}

.footer__copy {
  margin-bottom: 0.75rem;
}

.footer__disclosure {
  font-size: 0.8rem;
  color: #64748b;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ==========================================================================
   Miscellaneous / Page-specific
   ========================================================================== */

/* About page */
.about-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.about-section h2 {
  margin-top: 2.5rem;
}

.about-section p {
  color: #334155;
}

/* Review page aggregation */
.review-aggregate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
  flex-wrap: wrap;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.pagination button {
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
}

.pagination button:hover {
  border-color: #2dd4bf;
  background: #f0fdfa;
}

.pagination button.active {
  background: #2dd4bf;
  color: #1a2540;
  border-color: #2dd4bf;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================================
   Section Subtitle (shared)
   ========================================================================== */

.section-subtitle {
  color: #64748b;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  text-align: center;
}

/* ==========================================================================
   Reviews Page — Hero & Aggregate Rating
   ========================================================================== */

.reviews-hero {
  background: linear-gradient(135deg, #1a2540 0%, #0f1829 100%);
  color: #fff;
  text-align: center;
  padding: 4rem 0 3rem;
}

.reviews-hero h1 {
  color: #fff;
}

.reviews-hero .section-subtitle {
  color: #94a3b8;
}

/* Aggregate stars container */
.aggregate-stars {
  display: inline-flex;
  gap: 4px;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Generic star spans (used in aggregate + review cards) */
.star {
  display: inline-block;
  line-height: 1;
  transition: color 0.15s;
}

.star.filled {
  color: #f59e0b;
}

.star.empty {
  color: #4b5563;
}

/* Aggregate text row */
.aggregate-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 1rem;
  color: #cbd5e1;
  flex-wrap: wrap;
}

.aggregate-score {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.aggregate-separator {
  color: #64748b;
  font-weight: 300;
}

.aggregate-dot {
  color: #64748b;
  margin: 0 0.15rem;
}

/* ==========================================================================
   Reviews Page — List Section
   ========================================================================== */

.reviews-list-section {
  background: #fff;
}

.reviews-list {
  max-width: 800px;
  margin: 0 auto;
}

.reviews-empty {
  text-align: center;
  color: #64748b;
  font-size: 1.05rem;
  padding: 3rem 1rem;
}

/* Review card internal structure (generated by reviews.js) */
.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.review-stars {
  display: inline-flex;
  gap: 2px;
  font-size: 1.15rem;
}

.review-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Scenario badge colour variants */
.badge-blue {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.badge-purple {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.badge-orange {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.badge-red {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.badge-teal {
  background: rgba(45, 212, 191, 0.1);
  color: #0d9488;
}

.badge-green {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.badge-gray {
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
}

.review-body {
  color: #475569;
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.review-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #94a3b8;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.review-author {
  font-weight: 700;
  color: #1a2540;
}

.review-date {
  color: #94a3b8;
}

/* Error message (on fetch failure) */
.error-msg {
  text-align: center;
  color: #ef4444;
  padding: 2rem 1rem;
  font-size: 0.95rem;
}

/* ==========================================================================
   Reviews Page — Pagination
   ========================================================================== */

.reviews-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin: 2rem 0 0;
  flex-wrap: wrap;
}

.pagination-btn {
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  color: #1a2540;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.pagination-btn:hover {
  border-color: #2dd4bf;
  background: #f0fdfa;
  color: #0d9488;
}

.pagination-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2dd4bf;
  color: #1a2540;
  border: 1px solid #2dd4bf;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 2.5rem;
}

/* ==========================================================================
   Reviews Page — Skeleton Loading
   ========================================================================== */

.review-skeleton {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.skeleton-line {
  height: 0.9rem;
  margin-bottom: 0.75rem;
  border-radius: 6px;
  background: linear-gradient(90deg, #e5e7eb 25%, #f1f5f9 50%, #e5e7eb 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite linear;
}

.skeleton-short {
  width: 35%;
}

.skeleton-long {
  width: 100%;
}

.skeleton-medium {
  width: 65%;
}

/* ==========================================================================
   Reviews Page — Form Section
   ========================================================================== */

.review-form-section {
  background: #f8f9fb;
}

.review-form {
  max-width: 640px;
  margin: 0 auto;
}

.review-form input[type="text"],
.review-form input[type="email"],
.review-form select,
.review-form textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.review-form input[type="text"]:focus,
.review-form input[type="email"]:focus,
.review-form select:focus,
.review-form textarea:focus {
  outline: none;
  border-color: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15);
}

.review-form input::placeholder,
.review-form textarea::placeholder {
  color: #94a3b8;
}

.review-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.review-form textarea {
  resize: vertical;
  min-height: 120px;
}

.required {
  color: #ef4444;
  font-weight: 400;
}

.optional {
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 400;
}

/* Interactive star rating input */
.star-rating-input {
  display: flex;
  gap: 4px;
}

.star-btn {
  background: none;
  border: none;
  font-size: 1.75rem;
  color: #d1d5db;
  cursor: pointer;
  padding: 0.15rem;
  line-height: 1;
  transition: color 0.15s, transform 0.15s;
}

.star-btn:hover {
  transform: scale(1.15);
}

.star-btn.active {
  color: #f59e0b;
}

/* Thank-you card (review form success) */
.thank-you-card {
  text-align: center;
  padding: 3rem 2rem;
  background: #f0fdfa;
  border: 2px solid #ccfbf1;
  border-radius: 12px;
  max-width: 640px;
  margin: 0 auto;
}

.thank-you-card h3 {
  color: #0d9488;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.thank-you-card p {
  color: #475569;
  max-width: 480px;
  margin: 0 auto;
}

.thank-you-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #2dd4bf;
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

/* ==========================================================================
   Stats Page — Hero
   ========================================================================== */

.stats-hero {
  background: linear-gradient(135deg, #1a2540 0%, #0f1829 100%);
  color: #fff;
  text-align: center;
  padding: 4rem 0 3rem;
}

.stats-hero h1 {
  color: #fff;
}

.stats-hero .section-subtitle {
  color: #94a3b8;
}

/* ==========================================================================
   Stats Page — Content
   ========================================================================== */

.stats-content {
  background: #fff;
  padding-bottom: 3rem;
}

/* Metric cards (3 across) */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stats-card {
  background: #f8f9fb;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
}

.stats-card-label {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stats-card-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: #1a2540;
  line-height: 1.2;
}

/* Skeleton text shimmer for loading state on metric card values */
.skeleton-text {
  color: transparent !important;
  background: linear-gradient(90deg, #e5e7eb 25%, #f1f5f9 50%, #e5e7eb 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 6px;
  display: inline-block;
  min-width: 4rem;
}

/* Stats sections (Top Pages, Countries, Daily) */
.stats-section {
  margin-bottom: 2.5rem;
}

.stats-section h2 {
  margin-bottom: 1rem;
}

.stats-chart {
  position: relative;
  min-height: 120px;
}

.stats-chart-daily {
  min-height: 200px;
}

/* Chart skeleton loading */
.chart-skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.skeleton-bar {
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(90deg, #e5e7eb 25%, #f1f5f9 50%, #e5e7eb 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite linear;
}

/* ==========================================================================
   Stats Page — Horizontal Bar Chart (generated by stats.js)
   ========================================================================== */

.bar-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.65rem;
  gap: 0.75rem;
}

.bar-label {
  min-width: 140px;
  font-size: 0.85rem;
  color: #475569;
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  flex: 1;
  height: 28px;
  background: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2dd4bf, #14b8a6);
  border-radius: 6px;
  transition: width 0.6s ease;
  min-width: 2px;
}

.bar-count {
  min-width: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a2540;
  text-align: right;
}

/* ==========================================================================
   Stats Page — Daily Vertical Bar Chart (generated by stats.js)
   ========================================================================== */

.daily-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 220px;
  padding: 0.5rem 0;
  overflow-x: auto;
}

.daily-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 36px;
  height: 100%;
}

.daily-bar-count {
  font-size: 0.7rem;
  font-weight: 600;
  color: #1a2540;
  margin-bottom: 4px;
  white-space: nowrap;
}

.daily-bar-track {
  flex: 1;
  width: 100%;
  max-width: 40px;
  background: #f1f5f9;
  border-radius: 4px 4px 0 0;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.daily-bar-fill {
  width: 100%;
  background: linear-gradient(0deg, #2dd4bf, #14b8a6);
  border-radius: 4px 4px 0 0;
  transition: height 0.6s ease;
  min-height: 2px;
}

.daily-bar-label {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 6px;
  white-space: nowrap;
}

/* No data message */
.stats-no-data {
  text-align: center;
  color: #94a3b8;
  font-size: 0.95rem;
  padding: 2rem 1rem;
  font-style: italic;
}

/* Privacy note */
.stats-privacy-note {
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
  margin-top: 2rem;
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
}

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

@media (max-width: 640px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.15rem; }

  .section {
    padding: 2.5rem 0;
  }

  .container {
    padding: 0 1rem;
  }

  /* Stats cards: single column on mobile */
  .stats-cards {
    grid-template-columns: 1fr;
  }

  /* Bar chart labels: narrower on mobile */
  .bar-label {
    min-width: 80px;
    font-size: 0.78rem;
  }

  /* Daily chart: allow scroll, set min width per column */
  .daily-chart {
    height: 180px;
    gap: 4px;
  }

  .daily-bar-col {
    min-width: 30px;
  }

  .daily-bar-label {
    font-size: 0.6rem;
  }

  /* Review pagination wrapping */
  .reviews-pagination {
    gap: 0.3rem;
  }

  .pagination-btn,
  .pagination-current {
    padding: 0.4rem 0.7rem;
    font-size: 0.82rem;
  }

  /* Aggregate score smaller on mobile */
  .aggregate-stars {
    font-size: 1.6rem;
  }

  .aggregate-score {
    font-size: 1.6rem;
  }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
  .site-header,
  .site-footer,
  .solver,
  .nav {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
