/* Shared styles for content and guide pages. Light, high contrast and easy to
   read, which suits the senior audience and keeps every article consistent. */

:root {
  --ink: #1f2420;
  --soft-ink: #4a514b;
  --paper: #f6f6f3;
  --card: #ffffff;
  --line: #e2e2da;
  --green: #0b5a33;
  --green-deep: #0a3f27;
  --gold: #8a5d12;
  --link: #1f5a8c;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 18px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px clamp(16px, 4vw, 40px);
  background: #fffdf8;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--green-deep);
  text-decoration: none;
}

.brand b {
  color: var(--gold);
}

.play-button {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--green-deep);
}

.play-button:hover {
  background: var(--green-deep);
}

main {
  max-width: 740px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 36px) clamp(18px, 5vw, 28px) 64px;
}

main.wide-page {
  max-width: 1060px;
}

.breadcrumb {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  color: var(--soft-ink);
  margin: 4px 0 18px;
}

.breadcrumb a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.breadcrumb span {
  margin: 0 8px;
  color: #b3ab97;
}

h1 {
  font-size: clamp(31px, 5.6vw, 42px);
  line-height: 1.16;
  margin: 6px 0 18px;
  color: var(--green-deep);
}

h2 {
  font-size: clamp(23px, 4.2vw, 29px);
  line-height: 1.25;
  margin: 40px 0 12px;
  color: var(--green-deep);
}

h3 {
  font-size: clamp(20px, 3.2vw, 23px);
  margin: 26px 0 6px;
  color: var(--ink);
}

p {
  margin: 0 0 18px;
}

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

main p a,
main li a,
.lede a,
.byline a,
.answers a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lede {
  font-size: clamp(20px, 3.2vw, 22px);
  color: var(--soft-ink);
}

.cta-row {
  margin: 26px 0 8px;
}

.cta-row .play-button {
  font-size: 20px;
  padding: 15px 32px;
}

figure {
  margin: 28px 0;
}

.shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  cursor: zoom-in;
  overflow: hidden;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

figcaption {
  margin-top: 10px;
  font-size: 16px;
  color: var(--soft-ink);
  font-style: italic;
}

ul,
ol {
  margin: 0 0 18px;
  padding-left: 26px;
}

li {
  margin-bottom: 8px;
}

.hub-list {
  list-style: none;
  padding-left: 0;
}

.hub-list li {
  margin-bottom: 12px;
  font-size: 20px;
}

.catalog-list {
  columns: 2;
  column-gap: 34px;
  padding-left: 22px;
}

.catalog-list li {
  break-inside: avoid;
  font-size: 19px;
}

.answers h3 {
  margin: 22px 0 4px;
}

.answers p {
  margin: 0 0 14px;
}

.byline {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  color: var(--soft-ink);
}

.byline a {
  color: var(--link);
}

.site-foot {
  padding: 28px clamp(16px, 4vw, 40px) 40px;
  border-top: 1px solid var(--line);
  background: #fffdf8;
  font-size: 16px;
  color: var(--soft-ink);
  text-align: center;
}

.site-foot a {
  margin: 0 10px;
  white-space: nowrap;
}

.img-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: clamp(12px, 4vw, 48px);
  background: rgba(8, 10, 6, 0.88);
  cursor: zoom-out;
}

.img-overlay img {
  max-width: 96vw;
  max-height: 88vh;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.img-overlay-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(20, 20, 16, 0.9);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.legal-meta {
  margin: -6px 0 22px;
  font-size: 16px;
  color: var(--soft-ink);
  font-style: italic;
}

.contact-form {
  display: grid;
  gap: 6px;
  max-width: 560px;
  margin: 8px 0 8px;
}

.contact-form label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 12px;
}

.contact-form input,
.contact-form textarea {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  padding: 12px 14px;
  border: 1px solid #c9c0aa;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form .play-button {
  justify-self: start;
  margin-top: 18px;
  border: 0;
  cursor: pointer;
}

.contact-note {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #cfe0cc;
  border-radius: 10px;
  background: #eef6ec;
  color: #234a22;
  font-size: 16px;
}

.leaderboard-control-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 28px;
  align-items: end;
  margin: 34px 0 30px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.leaderboard-control-panel h2 {
  margin-top: 0;
}

.leaderboard-controls {
  display: grid;
  gap: 14px;
}

.leaderboard-controls label {
  font-weight: 700;
}

.leaderboard-controls select {
  width: 100%;
  min-height: 54px;
  padding: 10px 14px;
  border: 1px solid #bdb8ab;
  border-radius: 10px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
}

.leaderboard-period-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.leaderboard-period-tabs button {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #c6b27c;
  border-radius: 999px;
  background: #fffdf8;
  color: var(--green-deep);
  font: 700 16px var(--ui);
  cursor: pointer;
}

.leaderboard-period-tabs button.is-active {
  background: var(--green);
  color: #fff;
}

.rank-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.rank-heading h2 {
  margin-top: 0;
}

.rank-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.rank-row {
  display: grid;
  grid-template-columns: 72px minmax(140px, 1.4fr) repeat(3, minmax(84px, 0.8fr));
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.rank-row:first-child {
  border-top: 0;
}

.rank-row strong {
  color: var(--green-deep);
  font-size: 22px;
}

.rank-head {
  background: #fffdf8;
  color: var(--soft-ink);
  font-weight: 700;
}

.rank-empty {
  padding: 24px;
}

.rank-empty strong {
  display: block;
  margin-bottom: 6px;
  font-size: 22px;
}

.legal-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  padding: 22px clamp(16px, 4vw, 40px) 30px;
  border-top: 1px solid var(--line);
  background: #f3eede;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

.legal-foot a {
  color: var(--soft-ink);
  text-decoration: none;
}

.legal-foot a:hover {
  text-decoration: underline;
}

@media (max-width: 520px) {
  body {
    font-size: 18px;
  }

  .catalog-list {
    columns: 1;
  }

  .leaderboard-control-panel {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .rank-row {
    grid-template-columns: 56px minmax(120px, 1fr) 84px;
  }

  .rank-row span:nth-child(4),
  .rank-row span:nth-child(5) {
    display: none;
  }
}
