:root {
  --bone: #F8F6F1;
  --red: #B52D3A;
  --blue: #183B5B;
  --ice: #CBE1E8;
  --charcoal: #1B252E;
  --silver: #C5CDD1;
  --white: #FFFFFF;
  --cartoon-shadow: 4px 4px 0px #1B252E;
  --cartoon-shadow-hover: 6px 6px 0px #1B252E;
  --cartoon-shadow-active: 2px 2px 0px #1B252E;
}

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

body {
  background-color: var(--bone);
  color: var(--charcoal);
  font-family: 'Impact', 'Arial Black', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  padding: 0;
  margin: 0;
  border-left: 8px solid var(--charcoal);
  border-right: 8px solid var(--charcoal);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

p, label, li, table, td, th {
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  font-weight: bold;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--red);
}

/* CARTOON COMPONENT STYLES */
.cartoon-card {
  background: var(--white);
  border: 3px solid var(--charcoal);
  border-radius: 12px;
  box-shadow: var(--cartoon-shadow);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.cartoon-btn {
  display: inline-block;
  background: var(--red);
  color: var(--white) !important;
  border: 3px solid var(--charcoal);
  padding: 12px 24px;
  font-size: 1.1rem;
  font-weight: 900;
  text-transform: uppercase;
  border-radius: 8px;
  box-shadow: var(--cartoon-shadow);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  text-align: center;
}

.cartoon-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--cartoon-shadow-hover);
  background: var(--blue);
}

.cartoon-btn:active {
  transform: translate(2px, 2px);
  box-shadow: var(--cartoon-shadow-active);
}

.cartoon-badge {
  background: var(--ice);
  border: 2px solid var(--charcoal);
  color: var(--charcoal);
  padding: 6px 12px;
  font-size: 0.9rem;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.cartoon-badge.red-badge {
  background: var(--red);
  color: var(--white);
}

.cartoon-badge.blue-badge {
  background: var(--blue);
  color: var(--white);
}

/* HEADER & NAVIGATION */
header {
  background-color: var(--red);
  border-bottom: 4px solid var(--charcoal);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 10px 20px;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-text {
  font-size: 1.8rem;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 3px 3px 0px var(--charcoal);
  display: flex;
  align-items: center;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border: 2px solid var(--charcoal);
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-item {
  background: var(--white);
  border: 2px solid var(--charcoal);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 1rem;
  color: var(--charcoal);
  box-shadow: 2px 2px 0px var(--charcoal);
  text-transform: uppercase;
}

.nav-item:hover, .nav-item.active {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 3px 3px 0px var(--charcoal);
}

.nav-item.active {
  background: var(--charcoal);
  color: var(--white);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: var(--white);
  border: 3px solid var(--charcoal);
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 4px;
  background-color: var(--charcoal);
  border-radius: 2px;
}

/* TIMELINE & JOURNAL SYSTEM */
.timeline-container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
  position: relative;
}

.timeline-spine {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  background-color: var(--red);
  border: 2px solid var(--charcoal);
  top: 0;
  bottom: 0;
  z-index: 1;
}

.journal-cover {
  text-align: center;
  margin-bottom: 50px;
  padding: 40px;
  background: var(--ice);
  border: 4px solid var(--charcoal);
  box-shadow: var(--cartoon-shadow-hover);
  border-radius: 16px;
  position: relative;
  z-index: 2;
}

.journal-cover h1 {
  font-size: 3.5rem;
  color: var(--blue);
  text-transform: uppercase;
  text-shadow: 4px 4px 0px var(--white), 8px 8px 0px var(--charcoal);
  line-height: 1.1;
  margin-bottom: 15px;
}

.journal-subtitle {
  font-size: 1.4rem;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.snapshot-stamp {
  background: var(--white);
  border: 3px dashed var(--charcoal);
  padding: 10px 20px;
  display: inline-block;
  transform: rotate(-2deg);
  box-shadow: var(--cartoon-shadow);
  margin-top: 10px;
}

.snapshot-stamp strong {
  color: var(--red);
}

/* DECISIVE SCORE PANEL */
.score-panel {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: var(--white);
  border: 4px solid var(--charcoal);
  box-shadow: var(--cartoon-shadow-hover);
  border-radius: 16px;
  margin-bottom: 40px;
  overflow: hidden;
  z-index: 2;
  position: relative;
}

.score-team {
  padding: 30px;
  text-align: center;
}

.score-team.south-africa {
  background: var(--silver);
  border-right: 3px solid var(--charcoal);
}

.score-team.canada {
  background: var(--ice);
  border-left: 3px solid var(--charcoal);
}

.score-team-flag {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--charcoal);
  margin: 0 auto 15px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--white);
}

.score-team-name {
  font-size: 1.8rem;
  text-transform: uppercase;
  color: var(--charcoal);
}

.score-number {
  font-size: 4.5rem;
  color: var(--charcoal);
  padding: 20px;
  text-align: center;
  text-shadow: 4px 4px 0px var(--silver);
  background: var(--white);
  min-width: 100px;
}

.score-vs {
  font-size: 1.5rem;
  color: var(--red);
  text-transform: uppercase;
  font-weight: bold;
}

/* ROUTE LEDGER Component */
.route-ledger {
  background: var(--white);
  border: 4px solid var(--charcoal);
  border-radius: 16px;
  padding: 30px;
  margin: 40px 0;
  box-shadow: var(--cartoon-shadow-hover);
  position: relative;
  z-index: 2;
}

.route-ledger-title {
  font-size: 2.2rem;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 25px;
  text-align: center;
  text-shadow: 2px 2px 0px var(--ice);
}

.ledger-steps {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.ledger-step {
  display: grid;
  grid-template-columns: 160px 1fr;
  border: 3px solid var(--charcoal);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--cartoon-shadow);
  transition: transform 0.1s;
}

.ledger-step:hover {
  transform: scale(1.01);
}

.ledger-label {
  background: var(--blue);
  color: var(--white);
  padding: 15px;
  text-transform: uppercase;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-right: 3px solid var(--charcoal);
}

.ledger-label.completed {
  background: var(--red);
}

.ledger-label.pending {
  background: var(--silver);
  color: var(--charcoal);
}

.ledger-content {
  background: var(--white);
  padding: 15px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ledger-status-badge {
  align-self: flex-start;
  margin-bottom: 5px;
}

.ledger-desc {
  font-size: 1.2rem;
  color: var(--charcoal);
  text-transform: uppercase;
}

.ledger-subdesc {
  font-size: 0.95rem;
  color: #555;
  margin-top: 4px;
}

/* GENERAL LAYOUT */
main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
}

.split-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

/* CARTOON FORM STYLES */
.cartoon-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 1.1rem;
  text-transform: uppercase;
  color: var(--charcoal);
}

.form-control {
  border: 3px solid var(--charcoal);
  border-radius: 8px;
  padding: 12px;
  font-size: 1rem;
  font-family: inherit;
  box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1);
  background: var(--white);
}

.form-control:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--ice);
}

/* BANNER CONFIRMED VS UNKNOWN */
.info-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

.matrix-panel {
  border: 3px solid var(--charcoal);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--cartoon-shadow);
}

.matrix-panel.confirmed {
  background: #E8F5E9; /* Pastel green */
}

.matrix-panel.unknown {
  background: #FFF3E0; /* Pastel orange */
}

.matrix-title {
  font-size: 1.5rem;
  color: var(--charcoal);
  text-transform: uppercase;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--charcoal);
  padding-bottom: 8px;
}

.matrix-list {
  list-style: none;
}

.matrix-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-size: 1rem;
}

.matrix-list li::before {
  content: "★";
  position: absolute;
  left: 0;
  color: var(--red);
  font-size: 1.2rem;
}

/* FOOTER */
footer {
  background: var(--charcoal);
  color: var(--white);
  border-top: 4px solid var(--charcoal);
  padding: 40px 20px;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-brand .logo-text {
  font-size: 2.2rem;
  color: var(--white);
}

.footer-disclaimer {
  font-size: 0.85rem;
  color: var(--silver);
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--ice);
  text-transform: uppercase;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--red);
}

.footer-address {
  font-size: 0.9rem;
  color: var(--white);
  line-height: 1.5;
  margin-top: 15px;
  border-top: 2px solid #3A4E5E;
  padding-top: 15px;
}

.address-block {
  margin-bottom: 15px;
}

.address-block strong {
  color: var(--red);
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.copyright-bar {
  max-width: 1200px;
  margin: 30px auto 0 auto;
  border-top: 2px solid #3A4E5E;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 0.9rem;
  color: var(--silver);
}

.footer-pref-btn {
  background: var(--white);
  color: var(--charcoal);
  border: 2px solid var(--white);
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
}

.footer-pref-btn:hover {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

/* COOKIE BANNER STYLES */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  background: var(--white);
  border: 4px solid var(--charcoal);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  padding: 24px;
  z-index: 1000;
  display: none;
  max-width: 800px;
  margin: 0 auto;
}

.cookie-banner-title {
  font-size: 1.6rem;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.cookie-banner-text {
  font-size: 0.95rem;
  margin-bottom: 20px;
  color: var(--charcoal);
}

.cookie-choices {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
  background: var(--bone);
  padding: 15px;
  border: 2px solid var(--charcoal);
  border-radius: 8px;
}

.cookie-choice {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cookie-choice input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--red);
}

.cookie-choice label {
  font-size: 1rem;
  cursor: pointer;
}

.cookie-banner-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* RESPONSIVE DESIGN BREAKPOINTS */
@media (max-width: 1200px) {
  body {
    border: none;
  }
}

@media (max-width: 768px) {
  .header-container {
    position: relative;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: -20px;
    right: -20px;
    background: var(--red);
    border-bottom: 4px solid var(--charcoal);
    padding: 20px;
    gap: 10px;
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .split-layout {
    grid-template-columns: 1fr;
  }

  .score-panel {
    grid-template-columns: 1fr;
  }

  .score-team.south-africa {
    border-right: none;
    border-bottom: 3px solid var(--charcoal);
  }

  .score-team.canada {
    border-left: none;
    border-top: 3px solid var(--charcoal);
  }

  .score-number {
    border-bottom: 3px solid var(--charcoal);
  }

  .info-matrix {
    grid-template-columns: 1fr;
  }

  .ledger-step {
    grid-template-columns: 1fr;
  }

  .ledger-label {
    border-right: none;
    border-bottom: 3px solid var(--charcoal);
    padding: 10px;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .journal-cover h1 {
    font-size: 2.2rem;
  }

  .score-team-flag {
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
  }

  .score-team-name {
    font-size: 1.4rem;
  }

  .score-number {
    font-size: 3rem;
  }

  .route-ledger-title {
    font-size: 1.6rem;
  }

  .cartoon-card {
    padding: 16px;
  }
}