/* ============================================================
   TedLee.ca Unified Senior-Friendly Theme
   Version 2.0 — April 2026
   
   Design Principles:
   - Light warm backgrounds for readability
   - High-contrast text (WCAG AAA target)
   - 19px base font, 1.75 line-height
   - Generous spacing and padding
   - Gold/parchment brand accents on light canvas
   - Consistent navigation across all subdomains
   - Mobile-responsive, senior-friendly
   ============================================================ */

/* ---------- CSS RESET & BASE ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Georgia', 'Times New Roman', 'Noto Serif', serif;
  background-color: #FAF8F3;
  color: #1A1A1A;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Georgia', 'Times New Roman', serif;
  color: #2C2417;
  line-height: 1.3;
  margin-bottom: 0.6em;
  font-weight: 700;
}

h1 {
  font-size: 2.4rem;
  letter-spacing: -0.02em;
  margin-top: 1rem;
  color: #3B2F1E;
}

h2 {
  font-size: 1.8rem;
  margin-top: 2rem;
  padding-bottom: 0.3em;
  border-bottom: 2px solid #D4C5A0;
}

h3 {
  font-size: 1.4rem;
  margin-top: 1.5rem;
  color: #4A3C28;
}

h4 {
  font-size: 1.15rem;
  margin-top: 1.2rem;
  color: #5A4A34;
}

p {
  margin-bottom: 1.2em;
  max-width: 72ch;
}

em {
  font-style: italic;
  color: #3B2F1E;
}

strong, b {
  font-weight: 700;
  color: #2C2417;
}

blockquote {
  border-left: 4px solid #C4A55A;
  background: #F0EBD8;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #3B2F1E;
  border-radius: 0 6px 6px 0;
  max-width: 72ch;
}

blockquote cite,
blockquote footer {
  display: block;
  margin-top: 0.5em;
  font-style: normal;
  font-size: 0.9rem;
  color: #6B5D45;
}

/* ---------- LINKS ---------- */
a {
  color: #6B4C1E;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

a:hover,
a:focus {
  color: #9B6B2F;
  background-color: #F5EED6;
  border-radius: 2px;
  outline: 2px solid transparent;
}

a:focus-visible {
  outline: 3px solid #C4A55A;
  outline-offset: 2px;
}

a:visited {
  color: #5A3D18;
}

/* ---------- SKIP-TO-CONTENT (ACCESSIBILITY) ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: #C4A55A;
  color: #1A1A1A;
  padding: 0.5rem 1rem;
  border-radius: 0 0 6px 6px;
  font-weight: 700;
  z-index: 10000;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* ---------- UNIFIED NAVIGATION ---------- */
.site-nav {
  background: #FFFDF5;
  border-bottom: 3px solid #D4C5A0;
  padding: 0.8rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-brand {
  font-family: 'Georgia', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #3B2F1E;
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-brand:hover {
  color: #6B4C1E;
  background: transparent;
}

.nav-brand .brand-accent {
  color: #B8922F;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  font-weight: 600;
  color: #4A3C28;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus {
  background: #F0EBD8;
  border-color: #D4C5A0;
  color: #2C2417;
}

.nav-links a.active {
  background: #F0EBD8;
  border-color: #C4A55A;
  color: #3B2F1E;
}

/* Mobile hamburger toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid #4A3C28;
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  font-size: 1.3rem;
  cursor: pointer;
  color: #4A3C28;
}

/* ---------- HERO / PAGE HEADER ---------- */
.page-hero {
  background: linear-gradient(135deg, #F5EED6 0%, #FAF8F3 50%, #EDE4CC 100%);
  border-bottom: 3px solid #D4C5A0;
  padding: 3rem 2rem;
  text-align: center;
}

.page-hero h1 {
  font-size: 2.8rem;
  color: #3B2F1E;
  margin-bottom: 0.4em;
}

.page-hero .hero-subtitle {
  font-size: 1.15rem;
  color: #5A4A34;
  max-width: 56ch;
  margin: 0 auto;
  line-height: 1.6;
}

.page-hero .hero-label {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9B6B2F;
  margin-bottom: 0.8rem;
}

.page-hero .hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

/* ---------- MAIN CONTENT ---------- */
.site-main {
  flex: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 2rem 3rem;
  width: 100%;
}

.site-main.wide {
  max-width: 1100px;
}

/* ---------- SECTIONS ---------- */
.content-section {
  margin-bottom: 3rem;
  padding-top: 1rem;
}

.section-label {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9B6B2F;
  margin-bottom: 0.3rem;
}

.section-number {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  color: #C4A55A;
  margin-right: 0.5rem;
}

/* ---------- CARDS ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.card {
  background: #FFFFFF;
  border: 1.5px solid #E5DCC8;
  border-radius: 8px;
  padding: 1.5rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border-color: #C4A55A;
}

.card h3,
.card h4 {
  margin-top: 0;
  font-size: 1.15rem;
}

.card p {
  font-size: 0.95rem;
  color: #4A3C28;
  margin-bottom: 0.8rem;
}

.card a.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card a.card-link:hover {
  background: transparent;
}

.card .card-arrow {
  color: #9B6B2F;
  font-weight: 700;
}

/* ---------- KNOWLEDGE PATH / NUMBERED STEPS ---------- */
.step-list {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
}

.step-item {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: #C4A55A;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
}

.step-content h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

.step-content p {
  font-size: 0.95rem;
  color: #4A3C28;
}

/* ---------- STAT CARDS ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.2rem;
  margin: 1.5rem 0;
}

.stat-card {
  background: #F5EED6;
  border: 1.5px solid #D4C5A0;
  border-radius: 8px;
  padding: 1.2rem;
  text-align: center;
}

.stat-value {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #6B4C1E;
  display: block;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.85rem;
  color: #5A4A34;
  line-height: 1.4;
}

/* ---------- TABLES ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  background: #FFFFFF;
  border: 1.5px solid #E5DCC8;
  border-radius: 8px;
  overflow: hidden;
}

thead {
  background: #F0EBD8;
}

th {
  padding: 0.9rem 1rem;
  text-align: left;
  font-weight: 700;
  color: #2C2417;
  border-bottom: 2px solid #D4C5A0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #EDE4CC;
  color: #3B2F1E;
  vertical-align: top;
}

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

tr:hover td {
  background: #FAF8F3;
}

/* ---------- LISTS ---------- */
ul, ol {
  margin: 1rem 0;
  padding-left: 1.8rem;
}

li {
  margin-bottom: 0.5em;
  padding-left: 0.3em;
}

ul li::marker {
  color: #C4A55A;
}

ol li::marker {
  color: #6B4C1E;
  font-weight: 700;
}

/* ---------- CALLOUT / ALERT BOXES ---------- */
.callout {
  border-left: 4px solid #C4A55A;
  background: #FFF9E6;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 6px 6px 0;
  max-width: 72ch;
}

.callout.warning {
  border-left-color: #D4763A;
  background: #FFF5ED;
}

.callout.info {
  border-left-color: #4A7C59;
  background: #F0F7F2;
}

.callout strong {
  display: block;
  margin-bottom: 0.3em;
  color: #2C2417;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
  border: 2px solid;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  letter-spacing: 0.03em;
}

.btn-primary {
  background: #C4A55A;
  color: #FFFFFF;
  border-color: #C4A55A;
}

.btn-primary:hover {
  background: #9B6B2F;
  border-color: #9B6B2F;
  color: #FFFFFF;
}

.btn-outline {
  background: transparent;
  color: #6B4C1E;
  border-color: #D4C5A0;
}

.btn-outline:hover {
  background: #F0EBD8;
  border-color: #C4A55A;
  color: #3B2F1E;
}

/* ---------- LINK GRID (Related Pages / Footer Nav) ---------- */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.8rem;
  margin: 1.5rem 0;
}

.link-grid a {
  display: block;
  padding: 0.8rem 1rem;
  background: #FFFFFF;
  border: 1.5px solid #E5DCC8;
  border-radius: 6px;
  text-decoration: none;
  color: #3B2F1E;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.link-grid a:hover {
  background: #F5EED6;
  border-color: #C4A55A;
  color: #2C2417;
}

/* ---------- DISCLAIMER ---------- */
.disclaimer {
  background: #F5F2EA;
  border: 1.5px solid #E5DCC8;
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  margin: 2rem 0;
  font-size: 0.85rem;
  color: #5A4A34;
  line-height: 1.6;
}

.disclaimer strong {
  color: #4A3C28;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: #F0EBD8;
  border-top: 3px solid #D4C5A0;
  padding: 2rem;
  text-align: center;
  margin-top: auto;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.2rem;
  list-style: none;
  margin-bottom: 1rem;
}

.footer-links a {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4A3C28;
  text-decoration: none;
  padding: 0.3rem 0.5rem;
  border-radius: 3px;
}

.footer-links a:hover {
  color: #6B4C1E;
  background: #E5DCC8;
}

.footer-copy {
  font-size: 0.8rem;
  color: #6B5D45;
  line-height: 1.5;
}

.footer-copy a {
  color: #6B4C1E;
}

/* VPN recommendation */
.vpn-rec {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid #D4C5A0;
  font-size: 0.8rem;
  color: #6B5D45;
}

/* ---------- IMAGES ---------- */
img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

figure {
  margin: 1.5rem 0;
}

figcaption {
  font-size: 0.85rem;
  color: #6B5D45;
  margin-top: 0.5rem;
  text-align: center;
}

/* ---------- HORIZONTAL RULE ---------- */
hr {
  border: none;
  border-top: 2px solid #E5DCC8;
  margin: 2.5rem 0;
}

/* ---------- CODE / PRE ---------- */
code {
  background: #F0EBD8;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
  color: #4A3C28;
}

pre {
  background: #F0EBD8;
  padding: 1.2rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.5;
  border: 1px solid #D4C5A0;
}

/* ---------- REFERRAL SECTION ---------- */
.referral-section {
  background: #FFFFFF;
  border: 2px solid #D4C5A0;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.referral-section h3 {
  margin-top: 0;
  color: #3B2F1E;
}

.referral-section ol {
  padding-left: 1.5rem;
}

.referral-section .referral-code {
  display: inline-block;
  background: #F5EED6;
  border: 1px solid #D4C5A0;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.95rem;
  color: #6B4C1E;
  font-weight: 700;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  html {
    font-size: 17px;
  }

  .site-nav {
    padding: 0.6rem 1rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.5rem;
  }

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

  .nav-links a {
    width: 100%;
    text-align: left;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }

  .page-hero {
    padding: 2rem 1.2rem;
  }

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

  .site-main {
    padding: 1.5rem 1.2rem 2rem;
  }

  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }

  .card-grid {
    grid-template-columns: 1fr;
  }

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

  .link-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 16px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: center;
  }
}

/* ---------- PRINT STYLES ---------- */
@media print {
  .site-nav,
  .nav-toggle,
  .skip-link,
  .vpn-rec {
    display: none;
  }

  body {
    font-size: 12pt;
    background: white;
    color: black;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  .card, .stat-card, .callout, .disclaimer {
    border: 1px solid #ccc;
    background: white;
  }
}
