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

:root {
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

body {
  background-color: #000000;
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.02em;
}

p, li, td, span {
  font-family: var(--font-sans);
}

code, pre, kbd, samp {
  font-family: var(--font-mono);
  font-weight: 400;
}

nav, button, .cta-button {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  padding: max(15px, env(safe-area-inset-top)) 20px 15px;
  background-color: #0a0a0a;
  border-bottom: 1px solid #222;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #FF9500;
  text-decoration: none;
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
  padding: 0 4px;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb .sep {
  margin: 0 8px;
  color: #555;
}

.breadcrumb .current {
  color: #777;
}

/* ============================================
   HEADER
   ============================================ */
header {
  padding: 60px 20px 40px;
  border-bottom: 1px solid #222;
  max-width: 800px;
  margin: 0 auto;
}

h1 {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #FFFFFF;
}

.patent-chip {
  display: inline-block;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.55rem;
  color: #555;
  border: 1px solid #333;
  padding: 3px 8px;
  letter-spacing: 0.1em;
  vertical-align: middle;
  margin-left: 10px;
  white-space: nowrap;
}

.lead {
  font-size: 1.05rem;
  color: #FFFFFF;
  line-height: 1.7;
}

/* ============================================
   MAIN / LAYOUT
   ============================================ */
main {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

section {
  margin-bottom: 60px;
}

h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.body-text {
  font-size: 1rem;
  line-height: 1.7;
  color: #FFFFFF;
  margin-bottom: 28px;
}

/* ============================================
   SECTION DIVIDER
   ============================================ */
.section-divider {
  height: 1px;
  background: #222;
  margin: 20px 0 60px;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  display: flex;
  flex-direction: column;
}

.tl-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid #1a1a1a;
}

.tl-item:first-child {
  border-top: 1px solid #1a1a1a;
}

.tl-date {
  font-weight: 700;
  font-size: 0.95rem;
  color: #FFFFFF;
  padding-top: 2px;
  white-space: nowrap;
}

.tl-date.imminent {
  color: #FF9500;
}

.tl-title {
  font-size: 1rem;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 5px;
}

.tl-sub {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 6px;
}

.tl-note {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   CATEGORY LOCK WINDOW (PHASES)
   ============================================ */
.phases {
  display: flex;
  flex-direction: column;
}

.phase-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  padding: 20px 0;
  border-bottom: 1px solid #1a1a1a;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
}

.phase-row:first-child {
  border-top: 1px solid #1a1a1a;
}

.phase-date {
  font-weight: 600;
  color: #FFFFFF;
  font-size: 0.85rem;
  padding-top: 2px;
}

.phase-label {
  font-weight: 600;
  color: #FFFFFF;
  margin-right: 8px;
}

/* ============================================
   COMPLIANCE MATRIX
   ============================================ */
.matrix-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.compliance-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.compliance-matrix th {
  background-color: #0a0a0a;
  color: #FFFFFF;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #333;
  font-weight: 600;
}

.compliance-matrix td {
  padding: 12px 14px;
  border-bottom: 1px solid #1a1a1a;
  vertical-align: top;
  color: rgba(255, 255, 255, 0.8);
}

.compliance-matrix td:first-child {
  color: #FFFFFF;
}

.compliance-matrix td.fail {
  color: #FF6666;
}

.compliance-matrix td.pass {
  color: #66CC66;
}

.compliance-matrix td.partial {
  color: #FFCC66;
}

.compliance-matrix .icon {
  font-weight: bold;
  margin-right: 6px;
}

/* ============================================
   CTA
   ============================================ */
.cta-section {
  text-align: center;
  margin: 60px 0;
}

.cta-button.primary {
  display: inline-block;
  background-color: #FF9500;
  color: #000;
  text-decoration: none;
  padding: 14px 36px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 3px;
  min-height: 44px;
  transition: background-color 0.2s;
}

.cta-button.primary:hover {
  background-color: #FFA733;
}

.related-pages {
  margin-top: 20px;
  font-size: 0.9rem;
}

.related-label {
  color: #666;
  margin-bottom: 8px;
  font-style: italic;
}

.related-link {
  color: #FF9500;
  text-decoration: none;
  margin: 0 6px;
}

.related-link:hover {
  color: #FFB04D;
  text-decoration: underline;
}

.related-pages .sep {
  color: #444;
}

/* ============================================
   FOOTER
   ============================================ */
footer a,
.related-pages a,
.footer-links a {
  color: #FF9500;
}

footer a:hover,
.related-pages a:hover,
.footer-links a:hover {
  color: #FFB04D;
}

footer {
  text-align: center;
  padding: 60px 20px;
  padding-bottom: max(60px, env(safe-area-inset-bottom));
  border-top: 1px solid #1a1a1a;
}

.footer-lab-name {
  font-size: 15px;
  margin-bottom: 6px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-links-secondary a {
  color: #888888;
  border: 1px solid #888888;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.footer-links-secondary a:hover {
  color: #FF9500;
  border-color: #FF9500;
}

.footer-copyright {
  font-size: 12px;
  color: #666666;
  opacity: 1;
}

/* ============================================
   iOS / TOUCH
   ============================================ */
a, button {
  -webkit-tap-highlight-color: rgba(255, 149, 0, 0.15);
}

.cta-button {
  min-height: 44px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
  header {
    padding: 40px 16px 30px;
  }

  h1 {
    font-size: 1.7rem;
  }

  main {
    padding: 30px 16px;
  }

  .tl-item {
    grid-template-columns: 84px 1fr;
    gap: 16px;
    padding: 20px 0;
  }

  .tl-date {
    font-size: 0.82rem;
  }

  .phase-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .breadcrumb {
    font-size: 0.8rem;
    padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  }

  .cta-button.primary {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    text-align: center;
  }

  footer {
    padding: 40px 16px;
    padding-bottom: max(40px, env(safe-area-inset-bottom));
  }

  .footer-links {
    gap: 16px;
    font-size: 0.85rem;
  }
}

@media (max-width: 375px) {
  h1 {
    font-size: 1.4rem;
  }

  .tl-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tl-date {
    font-size: 0.8rem;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  header {
    padding: 30px 20px;
  }

  h1 {
    font-size: 1.8rem;
  }
}
