/* ============================================
   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, .code-block {
  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: var(--font-mono);
  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: orange ONLY (the one accent on technical pages) */
h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #FF9500;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

section p {
  font-size: 1rem;
  line-height: 1.7;
  color: #FFFFFF;
  margin-bottom: 16px;
}

section p:last-child {
  margin-bottom: 0;
}

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

/* ============================================
   CODE BLOCKS
   ============================================ */
code {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.875em;
  color: rgba(255, 255, 255, 0.75);
  background-color: #111;
  padding: 2px 5px;
  border-radius: 2px;
}

.code-block {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  background-color: #0a0a0a;
  padding: 16px 20px;
  border-radius: 3px;
  border-left: 2px solid #333;
  margin: 16px 0;
  white-space: pre;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  line-height: 1.5;
}

/* One field max highlighted orange */
.code-block .hl {
  color: #FF9500;
}

/* ============================================
   SPEC ROWS (cryptographic anchoring)
   ============================================ */
.spec-rows {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.spec-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid #1a1a1a;
}

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

.spec-key {
  font-weight: 600;
  font-size: 0.9rem;
  color: #FFFFFF;
  padding-top: 2px;
}

.spec-val p {
  margin-bottom: 0;
}

/* ============================================
   PRINCIPLES (design principles)
   ============================================ */
.principles {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.principle-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  padding: 18px 0;
  border-bottom: 1px solid #1a1a1a;
  font-size: 0.95rem;
}

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

.principle-key {
  font-weight: 600;
  color: #FFFFFF;
  font-size: 0.875rem;
  padding-top: 2px;
}

.principle-val {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
}

/* ============================================
   CAPABILITIES TABLE
   ============================================ */
.matrix-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
}

.capabilities-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

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

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

.capabilities-table td:first-child {
  color: #FFFFFF;
  font-weight: 500;
}

/* ============================================
   DISCLAIMER
   ============================================ */
.disclaimer {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.35);
  font-style: italic;
  margin-top: 16px;
  line-height: 1.5;
}

/* ============================================
   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);
}

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

  h1 {
    font-size: 1.7rem;
  }

  main {
    padding: 30px 16px;
  }

  .spec-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .spec-key {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
  }

  .principle-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .principle-key {
    color: rgba(255, 255, 255, 0.6);
  }

  .code-block {
    font-size: 0.78rem;
    padding: 12px 14px;
  }

  .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;
  }

  h2 {
    font-size: 1.15rem;
  }
}

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

  h1 {
    font-size: 1.8rem;
  }
}
