/* ---------- Color palette ---------- */

:root {
    --bg: #ffffff;
    --text: #111111;
    --accent: #0046FF;
    --soft-bg: #f5f5f7;
  }
  
  /* ---------- Reset / base ---------- */
  
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  html,
  body {
    margin: 0;
    padding: 0;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
      "Helvetica Neue", Arial, sans-serif, "Reem Kufi Ink", sans-serif, "EB Garamond", serif, "Cinzel", serif;
      font-weight: 400;
      font-style: normal;    
    /*font-family: ;*/
    background: var(--bg);
    color: var(--text);
  }
  
  body {
    line-height: 1.55;
  }  
  
  a {
    color: var(--accent);
    text-decoration: none;
  }
  
  a:hover,
  a:focus {
    text-decoration: underline;
  }
  
  /* ---------- Layout shell ---------- */
  
  .site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  /* ---------- Header ---------- */
  
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid #e2e2e5;
  }
  
  .header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .site-title {
    font-size: 2.6rem;
    letter-spacing: 0.2em;
    font-weight: 600;
  }
  .section-title {
    color: #FA1616;
    font-family: "EG Garamond, serif";
  }
  /* ---------- Navigation ---------- */
  
  .main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 24px;
  }
  
  .main-nav a {
    color: var(--text);
    font-size: 0.98rem;
  }
  
  .main-nav a:hover,
  .main-nav a:focus {
    color: var(--accent);
  }
  /* 🔴 ACTIVE PAGE */
.nav-link.active {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  font-weight: 200;
}
  
  /* ---------- Social icons ---------- */
  
  .social-row {
    display: flex;
    gap: 14px;
    margin-top: 12px;
  }
  
  .social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.3rem;
    color: #ffffff;
  }
  
  /* Individual platforms */
  
  .social-icon.icon-x {
    background: #000000; 
    color: #ffffff;
  }
  
  /* ---------- Main content ---------- */
  .italic-text {
    font-style: italic;
  }

  main {
    flex: 1;
  }
  
  .page {
    max-width: 800px;
    margin: 40px auto 80px;
    padding: 0 20px;
  }
  .page h1 {
    font-family: "Cinzel", serif;
    font-size: 2.5rem;
    margin-bottom: 0.6px;
  }
  
  .page h2 {
    /*font-family: "EB Garamond", serif;*/
    font-size: 1.5rem;
    margin-top: 0.65em;
    margin-bottom: 0.2px;
  }
  
  .page h3 {
    /*font-family: "EB Garamond", serif;*/
    font-size: 1.35rem;    
    margin-bottom: 0.1px;
  }
  /*
  .red {
    color: #FA1616;
    margin-top: 3.0rem;
  }*/
  h2.red {
    color: #cc0000; /*#FA1616;*/
    margin-top: 4rem;
  }
  span.red {
    color: #cc0000;
  }
  
  .page .article-meta {
    font-size: 0.9rem;
    color: #666666;
    margin-bottom: 1.8em;
  }
  .page h2 + p::first-letter {
    color: #cc0000;
    font-size: 1.6em;
    font-weight: 600;
  }
  .subscript {
    color: #cc0000;
    padding-top: 50px;
  }
  
  
  .page p {
    margin-bottom: 1.1em;
    font-size: 1.25rem/*1.02rem;*/
  }
  .page h1 + p,
  .page h2 + p,
  .page h3 + p {
    margin-top: 0.1em;/*0.3em*/
  }
  

  .last-paragraph {
    margin-top: 10rem;
  }
  .quote-block {
    margin: 2rem 0;
    padding: 1.5rem 1.75rem;
    border-left: 4px solid #FF8040;
    border-radius: 25px;
    background-color: #f7f7f7;
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.45;
  }
  .translated-quote-block {
    margin: 2rem 0;
    padding: 1.5rem 1.75rem;
    border-left: 4px solid var(--accent);
    border-radius: 25px;
    background-color: #f7f7f7;
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.45;
  }
  
  .quote-text {
    margin: 0 0 0.75rem 0;
  }
  .quote-author {
    margin: 0;
    font-family: "Reem Kufi Ink", sans-serif;
    font-size: 0.95em;
    font-style: normal;
    font-weight: 500;
    text-align: right;
  }  
  
  .page ul,
  .page ol {
    padding-left: 1.2rem;
    font-size: 1.25rem; /* match paragraph size */
  }
  
  
  /* ---------- Article / equations ---------- */
  
  .equation {
    font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 1.5rem;/*0.95rem;*/
    padding: 10px 12px;
    border-left: 14px solid var(--accent);
    border-radius: 25px 0 0 25px;
    background: var(--soft-bg);
    margin: 1.5em 0;
    white-space: pre-wrap;
  }
  
  /* Download link styling */
  
  .download-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.5em;
    font-weight: 500;
  }
  
  /* ---------- Footnotes / modal ---------- */
  
  .footnote-link {
    font-size: 0.85rem;
    vertical-align: super;
    cursor: pointer;
    color: var(--accent);
    border: none;
    background: none;
    padding: 0;
  }
  
  .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
  }
  
  .modal-backdrop.open {
    display: flex;
  }
  
  .modal {
    background: #ffffff;
    border-radius: 10px;
    width: min(600px, 90vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
    overflow-y: auto;
  }
  
  .modal-header {
    padding: 14px 18px;
    border-bottom: 1px solid #e2e2e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .modal-title {
    font-weight: 600;
  }
  
  .modal-close {
    border: none;
    background: none;
    font-size: 1.2rem;
    cursor: pointer;
  }
  
  .modal-body {
    padding: 16px 18px 18px;
    overflow-y: auto; /* scrolls when long */
  }
  
  /* ---------- Footer ---------- */
  
  .site-footer {
    border-top: 1px solid #e2e2e5;
    background: var(--bg);
  }
  
  .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 20px 24px;
    font-size: 0.85rem;
    color: #777777;
  }
  
  /* ---------- Responsive ---------- */
  
  @media (max-width: 768px) {
    .header-inner {
      flex-direction: column;
      align-items: flex-start;
      gap: 8px;
    }
  
    .main-nav ul {
      gap: 12px;
      flex-wrap: wrap;
    }
  
    .page {
      margin-top: 26px;
    }
  
    .page h1 {
      font-size: 2rem;
    }
  }
  figure {
    margin: 0;
  }

  .image-row {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: nowrap;
    margin: 40px 0;
  }
  
  .image-block {
    width: 360px;
    text-align: left;
  
    display: flex;
    flex-direction: column;
  }
  
  .image-block img {
    width: 100%;
    height: auto;      /* adjust once globally */
    object-fit: contain;
    border-radius: 6px;
  }
  
  .image-block figcaption {
    margin-top: auto;
  }
  
  /* .image-row {
    display: flex;
    gap: 40px;                
    justify-content: center;  
    flex-wrap: nowrap;        
    margin: 40px 0;
  } 
  .image-block {
    width: 360px;             /* fixed square size — change if needed 
    text-align: left;
  }
   .image-block img {
    width: 100%;
    height: auto;            
    object-fit: cover;        crops cleanly if needed 
    border-radius: 6px;
  } */
  
  .image-row-wide {
    justify-content: left;  /* centers the pair on large screens */
    margin: 0px;
  }

  .page .image-wide {
    width: 100%;
    margin: 0;
  }
  
  .page .image-wide img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
  }
  

  .image-block figcaption {
    margin-top: 12px;
    /*font-family: "Reem Kufi Ink", sans-serif;/*system-ui, sans-serif;*/
  }

  .img-title {
    /* font-family: "Reem Kufi Ink", sans-serif; */
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 4px;
  }

  .img-caption {
    /*font-family: "EB Garamond", serif;*/
    font-size: 0.95rem;
    color: #444;
    margin-bottom: 6px;
  }

  .img-credit {
    /* font-family: "Reem Kufi Ink", sans-serif; */
    font-size: 0.8rem;
    color: #777;
    justify-content: end;
  }

  /* ===== GALILEAN VELOCITY ADDITION CHART Match the screenshot style ===== */
.scenario-table{
  max-width: 800px;              /* adjust to your page width */
  margin: 30px auto;
  border: 2px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;               /* keeps rounded corners */
  background: #fff;
}

.scenario-table table{
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.scenario-table th,
.scenario-table td{
  padding: 22px 26px;
  border-bottom: 2px solid #e5e7eb;
  vertical-align: top;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #111827;
}

.scenario-table thead th{
  background: #eef2f7;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.scenario-table tbody tr:last-child td{
  border-bottom: none;
}

/* Column widths to match the proportions */
.scenario-table th:nth-child(1),
.scenario-table td:nth-child(1){ width: 22%; }

.scenario-table th:nth-child(2),
.scenario-table td:nth-child(2){ width: 22%; }

.scenario-table th:nth-child(3),
.scenario-table td:nth-child(3){ width: 56%; }

/* Make the first two columns slightly bolder like the screenshot */
.scenario-table td:nth-child(1),
.scenario-table td:nth-child(2){
  font-weight: 500;
}

/* Mobile: stack a bit tighter */
@media (max-width: 700px){
  .scenario-table th,
  .scenario-table td{
    font-size: 14px;
    padding: 16px 16px;
  }
}

  /* ===== FOUR FORCES AND THEIR RELATIVE STRENGTHS ===== */
  .four-forces-table{
    max-width: 800px;              /* adjust to your page width */
    margin: 30px auto;
    border: 2px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;               /* keeps rounded corners */
    background: #fff;
  }
  
  .four-forces-table table{
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }
  
  .four-forces-table th,
  .four-forces-table td{
    padding: 22px 26px;
    border-bottom: 2px solid #e5e7eb;
    vertical-align: top;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #111827;
  }
  
  .four-forces-table thead th{
    background: #eef2f7;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
  }
  
  .four-forces-table tbody tr:last-child td{
    border-bottom: none;
  }
  
  /* Column widths to match the proportions */
  .four-forces-table th:nth-child(1),
  .four-forces-table td:nth-child(1){ width: 22%; }
  
  .four-forces-table th:nth-child(2),
  .four-forces-table td:nth-child(2){ width: 20%; }
  
  .four-forces-table th:nth-child(3),
  .four-forces-table td:nth-child(3){ width: 25%; }

  .four-forces-table th:nth-child(4),
  .four-forces-table td:nth-child(4){ width: 33%; }
  
  /* Make the first two columns slightly bolder like the screenshot */
  .four-forces-table td:nth-child(1), 
  .four-forces-table td:nth-child(2) {
    font-weight: 500;
  }
  
  /* Mobile: stack a bit tighter */
  @media (max-width: 700px){
    .four-forces-table th,
    .four-forces-table td{
      font-size: 14px;
      padding: 16px 16px;
    }
  }


/* -------- Responsive behavior -------- */

@media (max-width: 800px) {
    .image-block {
        width: 90%;           /* expand to full width on small screens */
        max-width: 380px;
        margin: 0 auto;
    }

    .image-block img {
        height: auto;        /* maintain aspect ratio */
    }

    .image-wide {
      width: 90%;           /* expand to full width on small screens */
      max-width: 380px;
      margin: 0 auto;
    }
    .image-wide img {
      height: auto;        /* maintain aspect ratio */
    }
}

/*---------SVG Pythagorean Triangles---------------*/
.svg-row {
  display: flex;
  gap: 30px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap; /* stacks on small screens */
  margin: 40px 0;
}

.svg-row svg {
  width: 400px;  /* pick your size */
  height: auto;
  flex: 0 0 auto;
  display: block; /* avoids inline whitespace quirks */
}
.svg-special svg {
  width: 800px;  /* pick your size */
  height: auto;
  flex: 0 0 auto;
  display: block; /* avoids inline whitespace quirks */
}
.svg-special figure {
  width: 100%;
  margin: 0;
}

.svg-special figcaption {
  width: 100%;
  margin-top: 12px;
}

.versus {
  display: flex;
  justify-content: center;
  font-size: 100rem;
  margin-top: 58px;
}

/* --- Zoomable image affordance --- */
.zoomable-img {
  cursor: zoom-in;
}

/* --- Image Zoom Modal --- */
.imgzoom-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300; /* above footnotes if needed */
  padding: 24px;
}

.imgzoom-backdrop.open {
  display: flex;
}

.imgzoom-modal {
  background: #ffffff;
  border-radius: 12px;
  width: min(1400px, 95vw);
  max-height: 90vh;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.imgzoom-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.imgzoom-body {
  padding: 18px;
  overflow: auto; /* allows scroll if image is huge */
  max-height: 90vh;
}

#imgzoom-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.imgzoom-caption {
  margin: 12px 2px 0;
  font-size: 0.95rem;
  color: #444;
}

/* ---------- FAQ ---------- */

.faq {
  margin-top: 60px;
}

/* remove default numbering */
.faq-list {
  list-style: none;
  padding-left: 0;
  counter-reset: faq;
}

/* each item becomes a two-column layout */
.faq-list li {
  counter-increment: faq;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 10px;
  margin-bottom: 1rem;
}

/* custom number aligned to top */
.faq-list li::before {
  content: counter(faq, upper-roman) "."; /*content: counter(faq) ".";*/
  font-weight: 400;
  align-self: start;   /* ← KEY: aligns number with question top */
}

/* question button */
.faq-question {
  background: none;
  border: none;
  font: inherit;
  font-weight: 400;
  cursor: pointer;
  padding: 0;
  margin: 0;
  text-align: left;
}

.faq-question:hover {
  color: var(--accent);
}

/* hidden answer */
.faq-answer {
  display: none;
  margin-top: 0.4rem;
  grid-column: 2; /* keeps answer aligned under question text */
  color: #333;
}

.faq-answer p {
  margin: 0;
  font-size: 1.05rem;
}
/* add space below the last FAQ item */
.faq-list li:last-child {
  margin-bottom: 250px;
}

hr {
  margin-top: 70px;
}

/*=========================
Checklist
=========================*/
.checklist{
  margin: 20px 0;
}

.check-item{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.check-item input{
  width: 18px;
  height: 18px;
  margin-top: 4px;
}

.check-item label{
  font-size: 1.25rem;
  cursor: pointer;
}

/* =========================
   Copy icon button (ChatGPT-style)
   ========================= */

   .copy-wrap{
    position: relative;
  }
  
  /* Place the button top-right of the wrapped content */
  .copy-wrap .copy-icon-btn{
    position: absolute;
    top: -40px;
    right: 20px;
  }
  
  .copy-icon-btn{
    position: relative;              /* anchor for absolute tooltip */
    display: inline-flex;
    align-items: center;
    justify-content: center;
  
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    padding: 0;
    color: #6b7280;
  }
  
  .copy-icon-btn:hover{
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #111827;
  }
  
  .copy-icon-btn:active{
    transform: translateY(1px);
  }
  
  .copy-icon-btn svg{
    width: 18px;
    height: 18px;
    display: block;
  }
  
  /* Tooltip (hidden by default) */
  .copy-icon-btn .copy-tooltip{
    position: absolute;
    top: -36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
  
    background: #111827;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 8px;
    white-space: nowrap;
  
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  
    transition: opacity 140ms ease, visibility 140ms ease;
  }
  
  /* Tooltip arrow */
  .copy-icon-btn .copy-tooltip::after{
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    transform: translateX(-50%);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: #111827 transparent transparent transparent;
  }
  
  /* Show tooltip on hover/focus */
  .copy-icon-btn:hover .copy-tooltip,
  .copy-icon-btn:focus-visible .copy-tooltip{
    opacity: 1;
    visibility: visible;
  }
  
  /* On touch devices, hide tooltip (no hover) */
  @media (hover: none){
    .copy-icon-btn .copy-tooltip{
      display: none;
    }
  }

  