/* ==========================================================================
   Dogtor Robotics · Technical Architecture & Evaluation System
   Kami Parchment Design System · Editorial Engineering Aesthetics
   ========================================================================== */

/* Font Face: Kami TsangerJinKai02 & JetBrains Mono with CDN fallback */
@font-face {
  font-family: "TsangerJinKai02";
  src: url("https://cdn.jsdelivr.net/gh/tw93/Kami@main/assets/fonts/TsangerJinKai02-W04.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TsangerJinKai02";
  src: url("https://cdn.jsdelivr.net/gh/tw93/Kami@main/assets/fonts/TsangerJinKai02-W05.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Kami Parchment Canvas & Surfaces */
  --parchment: #f5f4ed;
  --ivory: #faf9f5;
  --surface-hover: #f0eee6;
  --inline-code-bg: #f0eee6;

  /* Ink Blue (Kami single accent, ≤ 5% of surface) */
  --brand: #1B365D;
  --brand-light: #2D5A8A;
  --brand-tint: #EEF2F7;
  --tag-bg: #E4ECF5;

  /* Warm Text Rungs (all with warm yellow-brown undertone, no cool grays) */
  --near-black: #141413;
  --dark-warm: #3d3d3a;
  --olive: #504e49;
  --stone: #6b6a64;

  /* Warm Hairlines & Borders */
  --border: #e8e6dc;
  --border-soft: #e5e3d8;
  --line: #d8d5c8;

  /* Sanctioned Caution Tint (for hardware & safety warnings) */
  --caution-bg: #f0e0d8;
  --caution-fg: #8b4513;
  --caution-border: #e2c2b0;

  /* Typography Stacks */
  --serif: "TsangerJinKai02", "Source Han Serif SC", "Source Han Serif CN",
           "Noto Serif CJK SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun",
           Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Consolas, Monaco, monospace;

  /* Geometry & Concentric Radii */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  /* Shadows: flat by default, whisper elevation only */
  --shadow-sm: 0 1px 2px rgba(20, 20, 19, 0.04);
  --shadow-md: 0 3px 8px rgba(20, 20, 19, 0.06);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
  background-color: var(--parchment);
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--parchment);
  color: var(--dark-warm);
  font-family: var(--sans);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Number Discipline: lining-nums and tabular-nums everywhere numbers appear */
body, table, .meta-val, .spec-value, .stat-value, .sidebar-meta, .source-annotation {
  font-variant-numeric: lining-nums tabular-nums;
}

/* Links & Focus States */
a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-light);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

button {
  font-family: inherit;
  font-size: inherit;
}

/* Reading Progress Bar */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
  z-index: 1000;
}

.progress-bar {
  height: 100%;
  width: 100%;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left center;
}

/* ==========================================================================
   Sidebar Navigation (Kami Editorial Rail)
   ========================================================================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 250px;
  background-color: var(--parchment);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 18px 24px;
  z-index: 100;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}

.brand-badge {
  width: 34px;
  height: 34px;
  background-color: var(--brand);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--near-black);
  line-height: 1.2;
}

.brand-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--stone);
  margin-top: 2px;
}

.sidebar-meta {
  padding: 14px 4px 18px;
}

.meta-tag {
  display: inline-block;
  padding: 2px 7px;
  background-color: var(--tag-bg);
  color: var(--brand);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 500;
}

.meta-date {
  font-size: 11px;
  color: var(--stone);
  margin-top: 6px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--olive);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
  background: transparent;
}

.nav-link:hover {
  background-color: var(--surface-hover);
  color: var(--near-black);
}

.nav-link.active {
  background-color: var(--ivory);
  color: var(--brand);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-note {
  font-size: 11px;
  line-height: 1.5;
  color: var(--stone);
}

.sidebar-note strong {
  display: block;
  color: var(--dark-warm);
  font-weight: 500;
  margin-top: 2px;
}

.btn-report-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 7px 10px;
  background-color: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--brand);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.btn-report-view:hover {
  background-color: #dbe4ef;
  color: var(--brand-light);
}

.btn-print {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 7px 10px;
  background-color: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--dark-warm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-print:hover {
  background-color: var(--surface-hover);
  border-color: var(--line);
  color: var(--near-black);
}

/* ==========================================================================
   Page Container & Topbar
   ========================================================================== */
.page-container {
  margin-left: 250px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--parchment);
}

.topbar {
  position: sticky;
  top: 0;
  height: 52px;
  background-color: var(--parchment);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 44px;
  z-index: 90;
}

.topbar-path {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--stone);
}

.path-sep {
  color: var(--line);
}

.current-topic {
  color: var(--near-black);
  font-weight: 500;
}

.view-switch {
  display: flex;
  background-color: var(--surface-hover);
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.view-btn {
  background: transparent;
  border: 0;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--olive);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-btn:hover {
  color: var(--near-black);
}

.view-btn.active {
  background-color: var(--ivory);
  color: var(--brand);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.main-content {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 44px 96px;
}

.section-block {
  margin-bottom: 64px;
  scroll-margin-top: 70px;
}

.section-lead {
  margin-bottom: 24px;
}

.block-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--near-black);
  margin: 0 0 6px;
  line-height: 1.3;
  letter-spacing: 0.2pt;
}

.block-sub {
  font-size: 14px;
  color: var(--olive);
  margin: 0;
  max-width: 820px;
  line-height: 1.6;
}

/* ==========================================================================
   01 Header & Document Meta
   ========================================================================== */
.doc-header {
  background-color: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 38px 42px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.category-tag {
  display: inline-block;
  padding: 2px 8px;
  background-color: var(--tag-bg);
  color: var(--brand);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 14px;
}

.doc-title {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  color: var(--near-black);
  line-height: 1.25;
  letter-spacing: 0.3pt;
  margin: 0 0 14px;
}

.doc-summary {
  font-size: 15px;
  color: var(--olive);
  line-height: 1.75;
  margin: 0 0 24px;
  max-width: 880px;
}

.meta-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--stone);
}

.meta-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--near-black);
  margin-top: 2px;
}

/* Scope Box */
.scope-card {
  background-color: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.scope-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.scope-card-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--near-black);
  margin: 0;
}

.scope-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--stone);
  background: var(--surface-hover);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.scope-item-title {
  display: block;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  color: var(--brand);
  margin-bottom: 6px;
}

.scope-item p {
  font-size: 13px;
  color: var(--olive);
  line-height: 1.65;
  margin: 0;
}

/* Routes Comparison Cards */
.routes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.route-card {
  background-color: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}

.route-card:hover {
  border-color: var(--line);
}

.route-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  background-color: var(--tag-bg);
  color: var(--brand);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  margin-bottom: 10px;
}

.route-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--near-black);
  margin: 0 0 8px;
  line-height: 1.35;
}

.route-desc {
  font-size: 13.5px;
  color: var(--olive);
  margin: 0 0 18px;
  line-height: 1.6;
}

.route-specs {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 18px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
}

.spec-name {
  color: var(--stone);
  font-weight: 500;
  white-space: nowrap;
}

.spec-value {
  color: var(--near-black);
  font-weight: 500;
  text-align: right;
}

.route-action {
  margin-top: auto;
}

.text-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.text-link:hover {
  color: var(--brand-light);
}

/* ==========================================================================
   02 Hardware Feature Cards (Primebot / Reachy)
   ========================================================================== */
.hardware-card {
  background-color: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: 380px 1fr;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}

.hardware-media {
  background-color: #1a1917;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
}

.media-frame {
  margin: 0;
  position: relative;
  flex: 1;
  min-height: 260px;
  background-color: #1a1917;
  overflow: hidden;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-fallback {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #262420;
  color: #e8e6dc;
  text-align: center;
  padding: 20px;
}

.fallback-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.fallback-desc {
  font-size: 12px;
  color: #a8a59b;
  margin-top: 6px;
}

.media-caption {
  padding: 10px 14px;
  background-color: var(--surface-hover);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--olive);
}

.hardware-content {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
}

.hardware-header {
  margin-bottom: 10px;
}

.hardware-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--brand);
  background: var(--tag-bg);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  margin-bottom: 6px;
}

.hardware-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  color: var(--near-black);
  margin: 0;
}

.hardware-desc {
  font-size: 13.5px;
  color: var(--olive);
  line-height: 1.7;
  margin: 0 0 16px;
}

.hardware-specs-table-wrap {
  margin: 8px 0 16px;
  overflow-x: auto;
}

.hardware-tips {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--stone);
  line-height: 1.6;
}

.hardware-tips strong {
  color: var(--dark-warm);
  font-weight: 500;
}

.links-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.bullet-sep {
  color: var(--line);
}

/* Gallery Grid */
.primebot-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.primebot-gallery figure {
  margin: 0;
  background-color: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.primebot-gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.primebot-gallery figcaption {
  padding: 8px 12px;
  font-size: 11.5px;
  color: var(--stone);
  background-color: var(--surface-hover);
  border-top: 1px solid var(--border-soft);
}

.primebot-gallery p {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--stone);
  margin: 4px 0 0;
  text-align: right;
}

/* ==========================================================================
   Data Tables (Kami Editorial Clean Tables)
   ========================================================================== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table th {
  background-color: var(--surface-hover);
  color: var(--dark-warm);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 12px;
  white-space: nowrap;
}

.row-label {
  font-weight: 500;
  color: var(--near-black);
  white-space: nowrap;
}

/* Evaluation Tags (Clean, Restrained, Non-Rainbow) */
.eval-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 500;
  background: var(--tag-bg);
  color: var(--brand);
  border: 1px solid var(--border);
  margin-right: 4px;
}

.eval-tag.tag-caution {
  background: var(--caution-bg);
  color: var(--caution-fg);
  border-color: var(--caution-border);
}

.eval-tag.tag-neutral {
  background: var(--surface-hover);
  color: var(--dark-warm);
  border-color: var(--border);
}

/* ==========================================================================
   Case Studies
   ========================================================================== */
.cases-section {
  margin-bottom: 40px;
}

.subsection-header {
  margin-bottom: 20px;
}

.subsection-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--near-black);
  margin: 0 0 4px;
}

.subsection-sub {
  font-size: 13px;
  color: var(--olive);
  margin: 0;
}

.cases-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.case-card {
  background-color: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}

.case-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.case-category {
  font-size: 11px;
  font-weight: 500;
  color: var(--stone);
  display: block;
  margin-bottom: 3px;
}

.case-name {
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 500;
  color: var(--near-black);
  margin: 0;
  line-height: 1.4;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--ivory);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--dark-warm);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-outline:hover {
  border-color: var(--line);
  color: var(--brand);
  background-color: var(--surface-hover);
}

.case-body-media {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  background-color: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

.media-preview {
  position: relative;
  min-height: 150px;
  background-color: #1a1917;
}

.media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.case-preview-desc {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.case-preview-desc strong {
  font-size: 13px;
  font-weight: 500;
  color: var(--near-black);
  margin-bottom: 4px;
}

.case-preview-desc p {
  font-size: 12.5px;
  color: var(--olive);
  line-height: 1.6;
  margin: 0 0 10px;
}

.preview-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
}

.case-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.case-col {
  display: flex;
  flex-direction: column;
}

.col-heading {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 500;
  color: var(--brand);
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 5px;
  margin-bottom: 8px;
}

.case-col p {
  font-size: 12.5px;
  color: var(--olive);
  line-height: 1.65;
  margin: 0;
}

/* ==========================================================================
   Architecture Pipeline & Flow
   ========================================================================== */
.architecture-box {
  background-color: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 34px;
  box-shadow: var(--shadow-sm);
  margin-top: 32px;
}

.arch-head {
  margin-bottom: 24px;
}

.arch-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--brand);
  background-color: var(--tag-bg);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  margin-bottom: 6px;
}

.arch-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--near-black);
  margin: 0 0 6px;
}

.arch-desc {
  font-size: 13.5px;
  color: var(--olive);
  margin: 0;
}

.pipeline-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 24px 0 32px;
  overflow-x: auto;
  padding: 4px;
}

.pipeline-node {
  flex: 1;
  min-width: 140px;
  background-color: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
}

.node-highlight {
  background-color: var(--brand-tint);
  border-color: var(--brand);
}

.node-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--stone);
  margin-bottom: 3px;
}

.node-highlight .node-badge {
  color: var(--brand);
}

.node-title {
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--near-black);
  margin-bottom: 4px;
}

.node-desc {
  font-size: 11px;
  color: var(--olive);
  line-height: 1.45;
}

.flow-arrow {
  color: var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.arch-pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}

.pillar-card {
  background-color: var(--parchment);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.pillar-label {
  display: block;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  color: var(--brand);
  margin-bottom: 5px;
}

.pillar-card p {
  font-size: 12.5px;
  color: var(--olive);
  line-height: 1.65;
  margin: 0;
}

/* Feature bullets in Desktop */
.feature-bullets {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0 20px;
}

.bullet-item {
  border-left: 2px solid var(--border);
  padding-left: 12px;
}

.bullet-key {
  display: block;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  color: var(--near-black);
  margin-bottom: 2px;
}

.bullet-item p {
  font-size: 12.5px;
  color: var(--olive);
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   03 Implementation Matrix & Roadmap
   ========================================================================== */
.matrix-card {
  background-color: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 30px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}

.matrix-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--near-black);
  margin: 0 0 16px;
}

.table-container {
  overflow-x: auto;
}

.timeline-container {
  margin-bottom: 32px;
}

.timeline-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--near-black);
  margin: 0 0 16px;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.timeline-step {
  background-color: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.step-badge {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 6px;
}

.step-name {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  color: var(--near-black);
  margin: 0 0 6px;
  line-height: 1.35;
}

.step-desc {
  font-size: 12px;
  color: var(--olive);
  line-height: 1.6;
  margin: 0 0 14px;
}

.step-criteria {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
  font-size: 11.5px;
}

.criteria-label {
  display: block;
  font-weight: 500;
  color: var(--stone);
  margin-bottom: 1px;
}

.criteria-text {
  color: var(--brand);
  font-weight: 500;
}

.checklist-card {
  background-color: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}

.checklist-title {
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 500;
  color: var(--near-black);
  margin: 0 0 16px;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 20px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--olive);
}

.check-box-icon {
  color: var(--brand);
  font-size: 16px;
  line-height: 1.2;
}

.check-content strong {
  color: var(--near-black);
  font-weight: 500;
}

/* ==========================================================================
   04 Sources & References
   ========================================================================== */
.sources-container {
  background-color: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 28px;
  box-shadow: var(--shadow-sm);
}

.sources-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}

.source-item:last-child {
  border-bottom: 0;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--brand);
  white-space: nowrap;
}

.source-link:hover {
  color: var(--brand-light);
}

.source-annotation {
  font-size: 12px;
  color: var(--stone);
  text-align: right;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.footer-brand strong {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--near-black);
  margin-right: 10px;
}

.footer-brand span {
  font-size: 11.5px;
  color: var(--stone);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--olive);
}

.footer-link:hover {
  color: var(--brand);
}

.footer-legal {
  font-size: 11px;
  color: var(--stone);
  line-height: 1.5;
}

/* SVG Utilities */
.icon-svg {
  flex-shrink: 0;
  vertical-align: middle;
}

.ext-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--brand);
}

.ext-link:hover {
  color: var(--brand-light);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1024px) {
  .hardware-card {
    grid-template-columns: 1fr;
  }
  .hardware-media {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .media-frame {
    min-height: 220px;
  }
  .meta-strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .scope-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .case-body-media {
    grid-template-columns: 1fr;
  }
  .media-preview {
    min-height: 180px;
  }
  .case-columns {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .timeline-grid {
    grid-template-columns: 1fr 1fr;
  }
  .checklist-grid {
    grid-template-columns: 1fr;
  }
  .primebot-gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 16px 18px;
  }
  .sidebar-meta,
  .sidebar-footer {
    display: none;
  }
  .nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .nav-link {
    white-space: nowrap;
    padding: 6px 10px;
    font-size: 12px;
  }
  .page-container {
    margin-left: 0;
  }
  .topbar {
    padding: 0 18px;
  }
  .topbar-path {
    display: none;
  }
  .main-content {
    padding: 24px 18px 60px;
  }
  .doc-header {
    padding: 24px 20px;
  }
  .doc-title {
    font-size: 24px;
  }
  .routes-grid {
    grid-template-columns: 1fr;
  }
  .hardware-content {
    padding: 20px;
  }
  .case-card {
    padding: 18px;
  }
  .architecture-box {
    padding: 22px 18px;
  }
  .arch-pillars {
    grid-template-columns: 1fr;
  }
  .timeline-grid {
    grid-template-columns: 1fr;
  }
  .matrix-card {
    padding: 18px;
  }
  .source-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .source-annotation {
    text-align: left;
  }
}

/* ==========================================================================
   Print Optimization (Kami A4 Clean Print)
   ========================================================================== */
@media print {
  @page {
    margin: 18mm 20mm 20mm 20mm;
    size: A4;
  }

  body {
    background: #ffffff !important;
    color: #141413 !important;
    font-size: 11pt;
    line-height: 1.55;
  }

  .sidebar,
  .topbar,
  .progress-container,
  .btn-print,
  .btn-report-view,
  .view-switch {
    display: none !important;
  }

  .page-container {
    margin-left: 0 !important;
    background: transparent !important;
  }

  .main-content {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .doc-header,
  .scope-card,
  .route-card,
  .hardware-card,
  .case-card,
  .architecture-box,
  .matrix-card,
  .timeline-step,
  .checklist-card,
  .sources-container {
    background: #ffffff !important;
    box-shadow: none !important;
    border: 1px solid #d8d5c8 !important;
    break-inside: avoid;
  }

  .section-block {
    margin-bottom: 24pt;
    break-inside: avoid;
  }

  a {
    color: #141413 !important;
    text-decoration: none !important;
  }
}
