:root {
  --primary: #AD0908;
  --primary-dark: #7A0706;
  --primary-soft: #fceeec;
  --gold: #FEBC0A;
  --gold-soft: #FBF6EE;
  --cream: #F4F1EB;
  --surface: #FFFFFF;
  --text: #0B0B0B;
  --text-body: #1f1f1f;
  --text-muted: #6B6B6B;
  --border: #E5DFD2;
  --border-soft: #ECE6DA;
  --focus: #0a66d6;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--cream);
  color: var(--text-body);
  font-family: 'Noto Sans', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1, 'liga' 1;
}

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

/* Default abbreviation styling — dotted hint, help cursor. */
abbr[title] {
  text-decoration: underline dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  cursor: help;
}

/* Breadcrumb above the card body. */
.breadcrumb {
  margin: 0 0 18px;
  font-size: 14px;
}
.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; }

/* <address> — browsers italicise by default; we want regular roman. */
.contact-block {
  font-style: normal;
}
.contact-block p { margin-bottom: 8px; }
.contact-block p:last-child { margin-bottom: 0; }

::selection { background: var(--primary); color: #FFFFFF; }

a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--primary-dark); text-decoration-thickness: 1.5px; }

/* Global keyboard focus ring — solid, high-contrast, never removed. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 1px;
}

/* ── Masthead ── */
.masthead {
  background: var(--primary);
  color: #FFFFFF;
  text-align: center;
  padding: 48px 24px 40px;
  border-bottom: 3px solid var(--gold);
  position: relative;
  overflow: hidden;
}
/* Decorative star + blood-drop pattern — same tile structure as
   connect.kaharagia.org/login: two motifs offset across a 120×104 tile,
   white fill at low opacity over the brand red. */
.masthead::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='104' viewBox='0 0 120 104' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff'%3E%3Cpath transform='translate(7,2) scale(0.16)' d='M113,2 L138,86 L224,66 L164,130 L224,194 L138,174 L113,258 L87,174 L2,194 L62,130 L2,66 L87,86 Z'/%3E%3Cpath transform='translate(67,54)' d='M18,2 C18,10 32,20 32,30 A14,14 0 0,1 4,30 C4,20 18,10 18,2 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  opacity: 0.085;
  pointer-events: none;
  z-index: 0;
}
.masthead-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.crest {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.18));
}
.masthead-kicker {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
  margin-bottom: 12px;
}
.wordmark {
  font-family: 'Playfair Display', 'Baskerville', Georgia, serif;
  font-weight: 600;
  font-size: clamp(28px, 4.6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.005em;
  color: #FFFFFF;
  margin-bottom: 0;
}
/* Gold rule below the wordmark — short bar with a faint fade at the ends. */
.rule {
  width: 64px;
  height: 2px;
  margin: 20px auto 14px;
  background: linear-gradient(90deg,
    rgba(254,188,10,0) 0%,
    var(--gold) 30%,
    var(--gold) 70%,
    rgba(254,188,10,0) 100%);
}
.tagline {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
}

/* ── Card ── */
.card {
  background: var(--surface);
  max-width: 720px;
  margin: -24px auto 40px;
  padding: 44px clamp(20px, 6vw, 52px) 52px;
  border: 1px solid var(--border);
  position: relative;
  z-index: 1;
  box-shadow:
    0 1px 0 rgba(0,0,0,0.02),
    0 12px 32px -16px rgba(36, 24, 18, 0.18),
    0 24px 60px -28px rgba(36, 24, 18, 0.12);
}

.card section { margin-bottom: 36px; }
.card section:last-child { margin-bottom: 0; }

.card .lead p {
  font-size: 17px;
  line-height: 1.65;
  color: #1a1a1a;
}
.card .lead p:first-child { font-size: 18px; }

.card .notice {
  display: block;
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--gold-soft);
  border-left: 3px solid var(--gold);
  font-size: 15px;
  line-height: 1.55;
  color: #2A2A2A;
}
.card .notice strong { color: var(--primary-dark); }

.card h2 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--text);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.card p { margin-bottom: 14px; font-size: 16px; }
.card p:last-child { margin-bottom: 0; }

.card .muted {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* ── Checklist (How to participate) ── */
.checklist {
  list-style: none;
  margin: 0 0 18px 0;
  padding: 0;
}
.checklist li {
  padding: 12px 0 12px 24px;
  position: relative;
  font-size: 15px;
  line-height: 1.55;
  border-bottom: 1px solid var(--border-soft);
}
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: calc(12px + (1.55em - 8px) / 2);   /* center with first line of text */
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
}

/* ── CTA button ── */
.cta-wrap { text-align: center; margin: 24px 0 8px; }
.button {
  display: inline-block;
  background: var(--primary);
  color: #FFFFFF !important;
  text-decoration: none !important;
  padding: 14px 30px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--primary);
  transition: background-color 0.15s ease, transform 0.06s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(173,9,8,0.18);
}
.button:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 2px 6px rgba(173,9,8,0.28);
}
.button:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(173,9,8,0.18); }

/* Wrap any wide table so it scrolls horizontally on narrow screens
   instead of forcing the whole page wider. */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0 18px;
}
.table-responsive .medals { margin: 0; }

/* ── Medals table ── */
.medals {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 18px;
  font-size: 15px;
}
.medals .awarded { min-width: 220px; }
.medals th, .medals td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.medals th:first-child, .medals td:first-child { padding-left: 0; }
.medals th:last-child, .medals td:last-child { padding-right: 0; }
.medals thead th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 10px;
  padding-top: 0;
  border-bottom: 1px solid var(--border);
}
.medals tbody th {
  font-weight: 600;
  color: var(--text);
}
.medals .medal-name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.medals .swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28);
  flex: 0 0 auto;
}
.medals .swatch--bronze { background: linear-gradient(135deg, #C58748, #8C5526); }
.medals .swatch--silver { background: linear-gradient(135deg, #D9DDE2, #A6ADB5); }
.medals .swatch--gold   { background: linear-gradient(135deg, #E5BC4D, #B98A20); }
.medals .swatch--grand  { background: linear-gradient(135deg, #C61413, #7A0706); }
.medals .donations {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
}
.medals .awarded {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}
.medals tbody td {
  color: var(--text);
}
.medals .num-col {
  text-align: right;
  white-space: nowrap;
}

/* ── Footer ── */
.dispatch-footer {
  background: #2A2A2A;
  color: #DCDCDC;
  padding: 32px 24px 24px;
  margin-top: 0;
}
.footer-row {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid #3D3D3D;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-brand .footer-logo {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}
.footer-brand .footer-wordmark {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.005em;
  color: #FFFFFF;
}
.footer-brand .footer-kicker {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #B5B5B5;
  margin-top: 4px;
}
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 13px;
}
.footer-meta a {
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  transition: color 0.12s ease;
}
.footer-meta a:hover { color: #FFFFFF; }
.copyright {
  display: block;
  max-width: 720px;
  margin: 16px auto 0;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
  text-align: center;
}
.copyright abbr {
  text-decoration: none;
  border-bottom: 0;
  cursor: help;
}

/* ── FAQ (semantic details/summary, no JS) ──
   No top border on the first item: the h2's own border-bottom above
   acts as the top divider for the section, so we don't stack two lines. */
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.faq summary {
  display: block;            /* override default list-item, safer cross-browser */
  cursor: pointer;
  list-style: none;
  padding: 18px 40px 18px 4px;
  margin: 0 -4px;
  position: relative;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
  border-radius: 2px;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::marker { display: none; content: ''; }

/* SVG chevron — centred in its viewBox so 180° rotation pivots cleanly
   around the visual centre. No Unicode dependency. */
.faq summary::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  width: 14px;
  height: 14px;
  background: center/contain no-repeat url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.5 4.5 L6 8 L9.5 4.5' stroke='%23AD0908' stroke-width='1.75' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transform: translateY(-50%) rotate(0deg);
  transform-origin: center;
  transition: transform 0.22s ease;
}
.faq details[open] summary::after {
  transform: translateY(-50%) rotate(180deg);
}

.faq summary:hover {
  background: var(--gold-soft);
  color: var(--primary);
}
.faq details[open] summary { color: var(--primary); }

.faq details > p {
  margin: 0 40px 26px 4px;
  font-size: 15px;
  line-height: 1.6;
  color: #3a3a3a;
}
.faq details > p:first-of-type { margin-top: 8px; }
.faq details > p:last-of-type { margin-bottom: 28px; }

/* ── Responsive ── */
@media (max-width: 720px) {
  .card { padding-left: clamp(18px, 5vw, 32px); padding-right: clamp(18px, 5vw, 32px); }
}
@media (max-width: 560px) {
  .card { margin-top: -16px; padding-top: 32px; padding-bottom: 36px; }
  .masthead { padding: 36px 18px 30px; }
  .crest { width: 60px; height: 60px; margin-bottom: 12px; }
  .card section { margin-bottom: 28px; }
  .card h2 { font-size: 20px; }
  .card .lead p:first-child { font-size: 17px; }
  .footer-row { gap: 16px; flex-direction: column; align-items: flex-start; }
  .footer-meta { gap: 10px 16px; }
  /* Tighter masthead labels on small screens so they don't wrap awkwardly. */
  .masthead-kicker, .tagline { letter-spacing: 0.12em; }
}
