:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --border: #e3e5e9;
  --text: #1a1d21;
  --muted: #6b7280;

  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --orange: #ff5c35;

  --radius: 12px;

  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 1.5rem 1.5rem 4rem;

  overflow-x: hidden;

  font-family: Fraunces, serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--accent);
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
}

.page-header,
.hero {
  text-align: center;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.page-header h2 {
  max-width: 700px;
  margin: 0.5rem auto 0.75rem;
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
}

.page-header p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.hero {
  padding-bottom: 1.5rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-tagline {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero-actions .button {
  width: 100%;
  max-width: 280px;
  text-align: center;
}

.button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--accent);
  color: white;
}

.button.secondary {
  background: white;
  color: var(--accent);
  border-color: var(--border);
}

.summary {
  margin: 1rem 0 2rem;
  text-align: center;
}

.summary .count {
  display: block;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.summary .label {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.card.full,
.card[data-qnum="Q5"],
.card[data-qnum="Q9,Q11"] {
  grid-column: 1 / -1;
}

.card {
  min-width: 0;
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  line-height: 1.35;
}

.card .sub {
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.card p {
  margin: 0 0 0.75rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.55;
}

.card ul {
  margin: 0;
  padding-left: 1.25rem;

  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.6;
}

.card li {
  margin-bottom: 0.6rem;
}

.card li:last-child {
  margin-bottom: 0;
}

.card li ul {
  margin: 0.5rem 0 0;

  font-size: 0.88rem;
  color: var(--muted);
}

.card li ul li {
  margin-bottom: 0.4rem;
}

.card[data-qnum="Q1"] {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

.card[data-qnum="Q2"] {
  border-top: 3px solid var(--accent);
}

.card[data-qnum="Q2"] h2 {
  font-size: 1.1rem;
}

.card[data-qnum="Q2"] .chart-box.tall {
  height: 400px;
}

.chart-box {
  position: relative;
  height: 300px;
}

.chart-box.tall {
  height: 360px;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 360px;
  padding-right: 0.25rem;
  overflow-y: auto;
}

/*
 * Full-page comments view (comments.php).
 * Combined selector so this always wins over the plain .comment-list
 * rules above/below regardless of source order, and gets its own
 * viewport-relative height with a visible scrollbar instead of
 * silently overflowing.
 */
.comment-list.full-page-comments {
  max-height: calc(100vh - 140px);
  max-height: calc(100dvh - 140px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;

  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg);
}

.comment-list.full-page-comments::-webkit-scrollbar {
  width: 8px;
}

.comment-list.full-page-comments::-webkit-scrollbar-track {
  background: var(--bg);
}

.comment-list.full-page-comments::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 999px;
}

.comment-card {
  padding: 0.8rem 0.9rem;
  background: #fafafa;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.empty-msg {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
}

.reason-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.reason-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.3rem 0.75rem;
}

.reason-label {
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.4;
}

.reason-bar-wrap {
  grid-column: 1;
  height: 8px;
  overflow: hidden;
  background: #e5e7eb;
  border-radius: 999px;
}

.reason-bar {
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.reason-count {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.contact-pill {
  padding: 0.45rem 0.9rem;
  background: var(--accent-soft);
  border-radius: 999px;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
}

.methodology {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.85rem;
  line-height: 1.6;
}

.methodology h3 {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-size: 0.95rem;
}

.methodology p {
  margin: 0;
}

footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);

  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  text-align: center;
}

footer h2 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--text);
}

footer p {
  margin: 0 0 0.35rem;
}

footer p:last-child {
  margin-bottom: 0;
}

.back-home {
  margin: 0.5rem 0 1.5rem;
  font-family: var(--sans);
  font-size: 0.9rem;
}

.back-home a {
  font-weight: 700;
  text-decoration: none;
}

.back-home a:hover {
  text-decoration: underline;
}

.about-card,
.convenience-card-cta {
  max-width: 760px;
  margin: 1.5rem auto;
  padding: 1.75rem 2rem;
  text-align: center;
  background: white;
  border-radius: var(--radius);
}

.about-card:first-child,
.convenience-card-cta:first-child {
  margin-top: 0;
}

.about-card {
  border: 2px solid var(--accent);
}

.convenience-card-cta {
  border: 2px solid var(--orange);
}

.about-card-eyebrow,
.convenience-card-eyebrow {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-card-eyebrow {
  color: var(--accent);
}

.convenience-card-eyebrow {
  color: var(--orange);
}

.about-card h2,
.convenience-card-cta h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.about-card > p,
.convenience-card-cta p {
  max-width: 580px;
  margin: 0.75rem auto 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.convenience-card-cta p {
  margin-bottom: 1.25rem;
}

.convenience-card-cta img {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 1.25rem auto 0;

  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(26, 29, 33, 0.12);
}

.about-card .button,
.convenience-card-cta .button {
  margin-top: 1.25rem;
}

.convenience-card-button {
  background: var(--orange);
  color: white;
}

.about-card-body {
  max-width: 560px;
  margin: 1.5rem auto 0;
  text-align: left;
}

.about-card-body p {
  margin: 0 0 0.75rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
}

.about-card-body ul {
  margin: 0;
  padding-left: 1.25rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.6;
}

.about-card-body li {
  margin-bottom: 0.6rem;
}

.about-card-body li:last-child {
  margin-bottom: 0;
}

.about-card-body li ul {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.about-card-body li ul li {
  margin-bottom: 0.4rem;
}

.convenience-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.7rem;
  max-width: 850px;
  margin: 0 auto 1.5rem;
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.4;
}

.convenience-notice-label {
  color: var(--text);
  font-weight: 700;
}

.convenience-notice a {
  font-weight: 700;
  text-decoration: none;
}

.convenience-notice a:hover {
  text-decoration: underline;
}

.id {
  font-family: Baskerville, serif;
}

@media (max-width: 700px) {
  body {
    padding: 1rem 0.85rem 3rem;
  }

  .page-header {
    margin-bottom: 1rem;
  }

  .page-header h1 {
    font-size: 1.45rem;
  }

  .page-header h2 {
    font-size: 1rem;
  }

  .hero {
    padding-bottom: 1rem;
  }

  .hero-tagline {
    font-size: 1.05rem;
  }

  .summary {
    margin-bottom: 1.5rem;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .card {
    padding: 1rem;
  }

  .card h2 {
    font-size: 0.95rem;
  }

  .chart-box {
    height: 260px;
  }

  .chart-box.tall {
    height: 330px;
  }

  .card[data-qnum="Q2"] {
    padding: 1rem;
  }

  .card[data-qnum="Q2"] h2 {
    font-size: 1rem;
  }

  .card[data-qnum="Q2"] .chart-box.tall {
    height: 270px;
  }

  .comment-list {
    max-height: 280px;
  }

  .comment-list.full-page-comments {
    max-height: calc(100vh - 120px);
    max-height: calc(100dvh - 120px);
  }

  .comment-card {
    padding: 0.75rem 0.85rem;
    font-size: 0.86rem;
  }

  .reason-label {
    font-size: 0.84rem;
  }

  .reason-row {
    gap: 0.25rem 0.5rem;
  }

  .convenience-card-cta {
    padding: 1.5rem 1.25rem;
  }

  .convenience-notice {
    justify-content: flex-start;
    padding: 0.7rem 0.85rem;
    font-size: 0.8rem;
  }

  .desktop-only {
    display: none;
  }

  .mobile-comments-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 700;
  }
}

@media (min-width: 701px) {
  .mobile-comments-link {
    display: none;
  }
}

header.flex {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  padding-top: 1.5rem;
  text-align: center;
}

.goodidea {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  font-family: cursive;
  line-height: 0.8;
}

.idea {
  display: flex;
  align-items: baseline;
}
.github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.id {
  font-family: Baskerville, serif;
}