/* =========================================================
   Mobile Phone Tutorial Styles
   Clean technical layout for Quarto HTML page
   No opacity, no hidden sections, no dark-mode override
   ========================================================= */


/* =========================================================
   Page base
   ========================================================= */

html,
body {
  background: #ffffff;
  color: #111827;
  line-height: 1.65;
  opacity: 1;
  visibility: visible;
}

body {
  font-size: 1rem;
}

/* Make Quarto page containers visible */
#quarto-content,
main,
article,
section,
.content,
.page-columns,
.column-body,
.column-page {
  opacity: 1 !important;
  visibility: visible !important;
}

/* General readable text */
p,
li,
blockquote,
table,
figure,
figcaption,
div,
span {
  opacity: 1;
  visibility: visible;
}

p {
  line-height: 1.65;
  margin-bottom: 1rem;
}

li {
  line-height: 1.6;
  margin-bottom: 0.25rem;
}


/* =========================================================
   Headings
   ========================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #111827;
  opacity: 1;
  visibility: visible;
  line-height: 1.3;
}

h2 {
  margin-top: 2.25rem;
  margin-bottom: 1rem;
}

h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}


/* =========================================================
   Images and figures
   ========================================================= */

img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1rem auto;
  border-radius: 8px;
  opacity: 1 !important;
  visibility: visible !important;
}

figure {
  margin: 2rem 0;
  opacity: 1;
  visibility: visible;
}

figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #6b7280;
  text-align: center;
  opacity: 1;
  visibility: visible;
}


/* =========================================================
   Code blocks
   ========================================================= */

pre,
code {
  font-size: 0.92rem;
  opacity: 1 !important;
  visibility: visible !important;
}

pre {
  padding: 1rem;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #f6f8fa;
  color: #111827;
  overflow-x: auto;
  white-space: pre;
}

code {
  color: #111827;
}

.sourceCode,
.cell,
.cell-output,
.cell-output-display {
  opacity: 1 !important;
  visibility: visible !important;
}


/* =========================================================
   Comparison tables
   Use for structured technical comparisons:
   - Voice vs SMS
   - Layer vs Function
   - Component vs Role
   ========================================================= */

.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0 2rem 0;
  font-size: 0.95rem;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  overflow: visible;
  opacity: 1 !important;
  visibility: visible !important;
}

.comparison-table thead,
.comparison-table tbody,
.comparison-table tr,
.comparison-table th,
.comparison-table td {
  opacity: 1 !important;
  visibility: visible !important;
}

.comparison-table thead th {
  padding: 0.85rem 1rem;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid #d0d7de;
  vertical-align: top;
}

.comparison-table tbody td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
  line-height: 1.5;
}

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

.comparison-table th.aspect,
.comparison-table td.aspect {
  background-color: #fafaf7;
  color: #2c2c2a;
  font-weight: 600;
}

.comparison-table th.voice,
.comparison-table td.voice {
  background-color: #fff8f4;
  color: #4a1b0c;
}

.comparison-table th.sms,
.comparison-table td.sms {
  background-color: #f4f8fc;
  color: #042c53;
}

.comparison-table th.data,
.comparison-table td.data {
  background-color: #f5f7f0;
  color: #263814;
}


/* =========================================================
   Protocol stack flow
   Use for vertical step-by-step flow diagrams
   ========================================================= */

.stack-flow {
  margin: 2rem 0;
  padding: 1.25rem;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #fafafa;
  color: #111827;
  overflow: visible;
  opacity: 1 !important;
  visibility: visible !important;
}

.stack-flow h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: #1f2937;
}

.flow-step {
  max-width: 780px;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  border: 1px solid #d0d7de;
  border-left: 4px solid #374151;
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
  overflow: visible;
  opacity: 1 !important;
  visibility: visible !important;
}

.flow-step strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.98rem;
  color: #111827;
}

.flow-step span {
  display: block;
  font-size: 0.93rem;
  line-height: 1.45;
  color: #4b5563;
}

.flow-arrow {
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.5;
  color: #6b7280;
  opacity: 1;
  visibility: visible;
}


/* =========================================================
   Three-card comparison layout
   Use for Voice / SMS / Internet data comparison
   ========================================================= */

.three-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0 2rem 0;
  overflow: visible;
  opacity: 1 !important;
  visibility: visible !important;
}

.tech-card {
  padding: 1rem;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  overflow: visible;
  opacity: 1 !important;
  visibility: visible !important;
}

.tech-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  color: #111827;
}

.tech-card p {
  margin: 0.45rem 0;
  line-height: 1.5;
  color: #374151;
}

.tech-card strong {
  color: #111827;
}


/* =========================================================
   Learning stack
   Use for "What We Need to Understand"
   ========================================================= */

.learning-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1.5rem 0 2rem 0;
  overflow: visible;
  opacity: 1 !important;
  visibility: visible !important;
}

.learning-card {
  padding: 0.85rem 1rem;
  border: 1px solid #d0d7de;
  border-left: 4px solid #374151;
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
  overflow: visible;
  opacity: 1 !important;
  visibility: visible !important;
}

.learning-card h3 {
  margin-top: 0;
  margin-bottom: 0.3rem;
  font-size: 1rem;
  color: #111827;
}

.learning-card p {
  margin: 0;
  line-height: 1.5;
  color: #374151;
}


/* =========================================================
   Simple note block
   Use when you want a clean technical explanation box
   ========================================================= */

.note-box {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid #d0d7de;
  border-left: 4px solid #374151;
  border-radius: 6px;
  background: #fafafa;
  color: #111827;
  overflow: visible;
  opacity: 1 !important;
  visibility: visible !important;
}

.note-box p:last-child {
  margin-bottom: 0;
}


/* =========================================================
   D2 and technical diagrams
   ========================================================= */

.wide-diagram {
  margin: 2rem 0;
  width: 100%;
  overflow: visible;
  opacity: 1 !important;
  visibility: visible !important;
}

.wide-diagram svg,
.wide-diagram img {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: auto;
  margin: 0 auto;
  opacity: 1 !important;
  visibility: visible !important;
}

.route-diagram {
  margin: 1.25rem 0;
  width: 100%;
  overflow: visible;
  opacity: 1 !important;
  visibility: visible !important;
}

.route-diagram svg,
.route-diagram img {
  display: block;
  width: 760px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  opacity: 1 !important;
  visibility: visible !important;
}


/* =========================================================
   Blockquotes
   ========================================================= */

blockquote {
  margin: 1.5rem 0;
  padding: 0.8rem 1rem;
  border-left: 4px solid #374151;
  background: #fafafa;
  color: #374151;
  opacity: 1 !important;
  visibility: visible !important;
}

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


/* =========================================================
   Links
   ========================================================= */

a {
  color: #0645ad;
  text-decoration: underline;
  opacity: 1;
  visibility: visible;
}

a:hover {
  color: #0b63ce;
}


/* =========================================================
   Responsive layout
   ========================================================= */

@media (max-width: 900px) {
  .three-card-grid {
    grid-template-columns: 1fr;
  }

  .comparison-table {
    font-size: 0.9rem;
  }

  .comparison-table thead th,
  .comparison-table tbody td {
    padding: 0.7rem 0.8rem;
  }

  .wide-diagram svg,
  .wide-diagram img {
    max-width: 100%;
  }

  .route-diagram svg,
  .route-diagram img {
    width: 100%;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 0.96rem;
  }

  .stack-flow,
  .tech-card,
  .learning-card,
  .note-box {
    padding: 0.85rem;
  }

  .flow-step {
    padding: 0.75rem 0.85rem;
  }

  .comparison-table {
    font-size: 0.85rem;
  }

  .comparison-table thead th,
  .comparison-table tbody td {
    padding: 0.6rem 0.65rem;
  }
}