@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..24,400..600,0..1,0&display=swap");

:root {
  --primary: #06c755;
  --primary-dark: #04a647;
  --primary-soft: #ecfdf5;
  --accent: #ff6b35;
  --accent-soft: #fff3ec;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-alt: #f9fafb;
  --text: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --slate: #0f172a;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans Thai", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.material-symbols-rounded {
  direction: ltr;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: "Material Symbols Rounded";
  font-feature-settings: "liga";
  font-style: normal;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  font-weight: normal;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
}

.site-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.site-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--slate);
  color: #cbd5e1;
  padding: 18px 14px;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 4px 8px 16px;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 14px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.brand-name {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.brand-sub {
  color: #94a3b8;
  font-size: 11px;
  margin-top: 2px;
}

.nav-group {
  margin-bottom: 14px;
}

.nav-title {
  padding: 10px 8px 6px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-menu-toggle,
.nav-drawer {
  display: none;
}

.nav-links-track {
  min-width: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13px;
}

.nav-link:hover {
  background: #1e293b;
  color: #fff;
}

.nav-link.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.nav-icon {
  width: 18px;
  text-align: center;
  font-size: 18px;
}

.sidebar-note {
  border-top: 1px solid #1e293b;
  margin-top: 18px;
  padding: 14px 8px 2px;
  color: #94a3b8;
  font-size: 11px;
}

.site-main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.crumb {
  color: var(--text-muted);
  font-size: 12px;
}

.topbar-title {
  font-size: 15px;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.page {
  width: min(1180px, calc(100vw - 320px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.hero-panel,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 28px;
}

.hero h1,
.report-head h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.16;
  letter-spacing: 0;
}

.hero p,
.report-head p {
  margin: 14px 0 0;
  max-width: 760px;
  color: var(--text-muted);
  font-size: 16px;
}

.signal-panel {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.signal {
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
  padding: 12px;
  border-radius: var(--radius);
}

.signal.orange {
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.signal strong {
  display: block;
  font-size: 13px;
}

.signal span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
}

.section {
  margin-top: 22px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.section-desc {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
}

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

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

.card-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.card p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.pill.green {
  background: var(--primary-soft);
  border-color: #a7f3d0;
  color: var(--primary-dark);
}

.pill.orange {
  background: var(--accent-soft);
  border-color: #ffd4be;
  color: #9a3412;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn.secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn.secondary:hover {
  border-color: var(--primary);
}

.report-head {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.exec-answer {
  margin-top: 16px;
  padding: 24px 28px;
  background: var(--slate);
  border-radius: var(--radius);
  color: #fff;
  box-shadow: var(--shadow);
}

.exec-answer h2 {
  margin: 0;
  font-size: 18px;
}

.exec-answer p {
  margin: 8px 0 0;
  max-width: 940px;
  color: #e2e8f0;
  font-size: 20px;
  line-height: 1.55;
}

.summary-icon {
  color: var(--primary-dark);
  font-size: 24px;
}

.summary-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.summary-kicker .material-symbols-rounded {
  color: var(--primary-dark);
  font-size: 20px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.summary-block {
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.summary-block h2 {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

.summary-block p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.summary-takeaway {
  margin-top: 16px;
  padding: 18px;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary-soft);
}

.summary-takeaway h2 {
  margin: 0;
  font-size: 15px;
}

.summary-takeaway p {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 15px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.meta {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.meta-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.meta-value {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 16px;
  margin-top: 16px;
}

.panel {
  overflow: hidden;
}

.panel-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}

.panel-head h2 {
  margin: 0;
  font-size: 15px;
}

.panel-body {
  padding: 16px;
}

.list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.list li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  flex: 0 0 auto;
  margin-top: 8px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

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

.table th {
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.code-path {
  display: inline-flex;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #374151;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  white-space: normal;
  word-break: break-word;
}

.file-link {
  text-decoration: none;
  border: 1px solid transparent;
}

.file-link:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.muted-code {
  color: var(--text-light);
}

.path-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.path-separator {
  color: var(--text-light);
  font-weight: 600;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.doc-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 96px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.doc-card:hover {
  border-color: var(--primary);
}

.doc-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.35;
}

.doc-card > span {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.viewer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.viewer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
}

.viewer-head .viewer-toolbar {
  margin-top: 0;
}

.viewer-frame {
  width: 100%;
  height: min(76vh, 820px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.markdown-body {
  margin-top: 16px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 24px 0 10px;
  line-height: 1.3;
}

.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child,
.markdown-body h4:first-child {
  margin-top: 0;
}

.markdown-body h1 {
  font-size: 30px;
}

.markdown-body h2 {
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 22px;
}

.markdown-body h3 {
  font-size: 17px;
}

.markdown-body p,
.markdown-body li,
.markdown-body blockquote {
  color: var(--text);
  font-size: 14px;
}

.markdown-body a {
  color: var(--primary-dark);
  font-weight: 600;
}

.markdown-body ul,
.markdown-body ol {
  display: grid;
  gap: 7px;
  padding-left: 22px;
}

.markdown-body blockquote {
  margin: 16px 0;
  padding: 12px 14px;
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
  border-radius: var(--radius);
}

.markdown-body code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #f3f4f6;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.markdown-body pre {
  overflow-x: auto;
  padding: 14px;
  border-radius: var(--radius);
  background: #111827;
}

.markdown-body pre code {
  padding: 0;
  background: transparent;
  color: #e5e7eb;
}

.markdown-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.table-wrap .table th,
.table-wrap .table td {
  border-bottom: 1px solid var(--border);
}

.flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.flow-step {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 600;
  font-size: 12px;
}

.flow-arrow {
  color: var(--text-light);
}

.footer-note {
  margin-top: 28px;
  color: var(--text-muted);
  font-size: 12px;
}

.token-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.token-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.swatch {
  min-height: 64px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--radius);
}

.token-card h3,
.spec-card h3,
.icon-sample h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

.token-card p,
.spec-card p,
.icon-sample p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.spec-card {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.spec-value {
  display: block;
  margin-top: 8px;
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.font-panel {
  display: grid;
  gap: 14px;
}

.font-sample {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.font-sample .display {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
}

.font-sample .body-copy {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 15px;
}

.icon-sample-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.icon-sample {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.icon-sample .material-symbols-rounded {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.baseline-box {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 0.65fr);
  gap: 16px;
  align-items: center;
}

.iphone-frame {
  width: min(100%, 195px);
  aspect-ratio: 390 / 844;
  margin: 0 auto;
  padding: 23px 0 17px;
  border: 10px solid #111827;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.iphone-safe-top,
.iphone-safe-bottom {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.iphone-safe-top {
  height: 47px;
  background: var(--surface-alt);
  border-bottom: 1px dashed var(--border-strong);
}

.iphone-content {
  display: grid;
  min-height: 246px;
  place-items: center;
  padding: 14px;
  color: var(--primary-dark);
  font-weight: 700;
  text-align: center;
}

.iphone-safe-bottom {
  height: 34px;
  background: var(--surface-alt);
  border-top: 1px dashed var(--border-strong);
}

.board-page {
  padding-top: 24px;
}

.board-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
  align-items: stretch;
}

.board-hero-copy,
.board-visual,
.baseline-item,
.flow-node,
.status-card,
.next-item,
.asset-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.board-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px;
}

.board-hero-copy h1 {
  margin: 14px 0 0;
  max-width: 760px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
}

.board-hero-copy p {
  margin: 16px 0 0;
  max-width: 720px;
  color: var(--text-muted);
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.board-visual {
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
}

.board-visual img,
.asset-card img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.board-visual img {
  height: 100%;
  min-height: 340px;
}

.board-visual figcaption,
.asset-card figcaption {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

.baseline-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.baseline-item {
  min-height: 178px;
  padding: 16px;
  border-top: 4px solid var(--primary);
}

.baseline-item.warning {
  border-top-color: var(--warning);
}

.baseline-item .material-symbols-rounded {
  color: var(--primary-dark);
  font-size: 28px;
}

.baseline-item.warning .material-symbols-rounded {
  color: var(--warning);
}

.baseline-item h3,
.flow-node h3,
.status-card h3,
.next-item h3 {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.3;
}

.baseline-item p,
.flow-node p,
.status-card p,
.next-item p {
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.flow-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.flow-node {
  position: relative;
  min-height: 164px;
  padding: 18px;
}

.flow-node > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--slate);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 700;
}

.flow-arrow {
  display: none;
}

.status-grid,
.next-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.status-card,
.next-item {
  min-height: 190px;
  padding: 16px;
}

.status-card.complete {
  border-top: 4px solid var(--success);
}

.status-card.active {
  border-top: 4px solid var(--accent);
}

.status-top {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.status-card.complete .status-top .material-symbols-rounded {
  color: var(--success);
}

.status-card.active .status-top .material-symbols-rounded {
  color: var(--accent);
}

.status-card a {
  display: inline-flex;
  margin-top: 14px;
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
}

.split-board {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 14px;
}

.board-panel {
  padding: 18px;
}

.target-list,
.gate-list {
  display: grid;
  gap: 9px;
}

.target-list div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) minmax(120px, auto);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.target-list strong {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.target-list span {
  min-width: 0;
  font-weight: 700;
}

.target-list em {
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
  text-align: right;
}

.gate {
  display: grid;
  grid-template-columns: 12px 70px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.gate > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.gate.done > span {
  background: var(--success);
}

.gate.partial > span {
  background: var(--warning);
}

.gate strong {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.gate p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.next-item .material-symbols-rounded {
  color: var(--primary-dark);
  font-size: 26px;
}

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

.asset-card {
  margin: 0;
  overflow: hidden;
}

.asset-card img {
  height: 280px;
  background: #fff;
  object-fit: contain;
  object-position: center;
}

.brand-hero .board-hero-copy {
  min-height: 420px;
}

.brand-wordmark {
  margin-top: 18px;
  color: var(--slate);
  font-size: clamp(34px, 6vw, 76px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.brand-visual img {
  object-fit: contain;
  background: #fff;
}

.brand-principles {
  margin-top: 14px;
}

.brand-token-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.brand-token {
  display: grid;
  gap: 7px;
  min-height: 124px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.brand-token span {
  min-height: 42px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--radius);
}

.brand-token strong {
  font-size: 13px;
}

.brand-token em {
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-style: normal;
}

.ci-hero .board-hero-copy {
  min-height: 440px;
}

.ci-visual img {
  min-height: 440px;
  background: #fff;
  object-fit: contain;
}

.ci-manual-spread {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ci-sheet {
  min-height: 360px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ci-sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.ci-sheet-top span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--slate);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}

.ci-sheet p {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.ci-logo-demo,
.ci-color-demo,
.ci-grid-demo {
  margin-top: 20px;
  min-height: 190px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.ci-logo-demo {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ci-wordmark {
  position: relative;
  z-index: 1;
  color: var(--slate);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0;
}

.ci-clearspace {
  position: absolute;
  inset: 34px;
  border: 1px dashed var(--border-strong);
}

.ci-clearspace::before,
.ci-clearspace::after {
  position: absolute;
  inset: 22px;
  content: "";
  border: 1px dashed #cbd5e1;
}

.ci-color-demo {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.ci-color-demo div {
  min-height: 190px;
}

.ci-grid-demo {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  padding: 12px;
  gap: 6px;
}

.ci-grid-demo span {
  border: 1px solid var(--border-strong);
  background: #fff;
}

.story-page {
  width: min(1280px, calc(100vw - 320px));
  padding-top: 24px;
}

.story-hero {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
  align-items: stretch;
}

.story-hero-copy,
.story-hero-visual,
.story-section,
.visual-story-card,
.rationale-panel,
.persona-ledger article,
.closing-decision {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.story-hero-copy {
  display: flex;
  min-height: 520px;
  flex-direction: column;
  justify-content: center;
  padding: 38px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.98)),
    linear-gradient(135deg, rgba(6, 199, 85, 0.1), rgba(255, 107, 53, 0.1));
}

.story-status {
  margin: 0;
  color: #9a3412;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.story-hero-copy h1 {
  margin: 16px 0 0;
  max-width: 640px;
  color: var(--slate);
  font-size: clamp(36px, 5vw, 70px);
  line-height: 1.05;
  letter-spacing: 0;
}

.story-lead {
  margin: 18px 0 0;
  max-width: 620px;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.72;
}

.story-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.story-hero-visual {
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  background: #111827;
}

.story-hero-visual img {
  display: block;
  width: 100%;
  min-height: 520px;
  object-fit: contain;
  object-position: center;
}

.story-hero-visual figcaption {
  padding: 11px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 12px;
}

.story-section {
  margin-top: 18px;
  padding: 24px;
}

.story-section-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  align-items: flex-start;
}

.story-section-head > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: var(--slate);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 700;
}

.story-section-head h2 {
  margin: 0;
  max-width: 940px;
  color: var(--slate);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.2;
}

.story-section-head p {
  margin: 10px 0 0;
  max-width: 900px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.72;
}

.story-thesis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.story-thesis div {
  min-height: 172px;
  padding: 18px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.story-thesis div:nth-child(2) {
  border-top-color: var(--accent);
}

.story-thesis div:nth-child(3) {
  border-top-color: var(--slate);
}

.story-thesis h3 {
  margin: 0;
  color: var(--slate);
  font-size: 15px;
}

.story-thesis p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.72;
}

.persona-ledger {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.persona-ledger article {
  min-height: 230px;
  padding: 16px;
  border-top: 4px solid var(--primary);
}

.persona-ledger article:nth-child(2) {
  border-top-color: var(--accent);
}

.persona-ledger article:nth-child(3) {
  border-top-color: var(--success);
}

.persona-ledger article:nth-child(4) {
  border-top-color: var(--info);
}

.persona-ledger article:nth-child(5) {
  border-top-color: var(--warning);
}

.persona-ledger .material-symbols-rounded {
  color: var(--primary-dark);
  font-size: 28px;
}

.persona-ledger h3 {
  margin: 12px 0 0;
  color: var(--slate);
  font-size: 15px;
  line-height: 1.3;
}

.persona-ledger p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.68;
}

.rationale-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.rationale-panel {
  min-height: 330px;
  padding: 22px;
}

.rationale-panel h2 {
  margin: 0;
  color: var(--slate);
  font-size: 22px;
  line-height: 1.25;
}

.rationale-panel p {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.72;
}

.mini-swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.mini-swatches span {
  min-height: 64px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--radius);
}

.type-rhythm {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.type-rhythm strong {
  color: var(--slate);
  font-size: 24px;
  line-height: 1.35;
}

.type-rhythm code {
  color: var(--primary-dark);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}

.visual-story-card {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(330px, 0.72fr);
  gap: 0;
  margin-top: 18px;
  overflow: hidden;
}

.visual-story-card.reverse {
  grid-template-columns: minmax(330px, 0.72fr) minmax(0, 1.28fr);
}

.visual-story-card.reverse figure {
  order: 2;
}

.visual-story-card.reverse aside {
  order: 1;
  border-right: 1px solid var(--border);
  border-left: 0;
}

.visual-story-card figure {
  display: grid;
  min-height: 520px;
  margin: 0;
  place-items: center;
  background: #0f172a;
}

.visual-story-card img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 660px;
  object-fit: contain;
  background: #0f172a;
}

.visual-story-card aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  border-left: 1px solid var(--border);
  background: #fff;
}

.visual-kicker {
  margin: 0;
  color: var(--primary-dark);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.visual-story-card h3 {
  margin: 12px 0 0;
  color: var(--slate);
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.2;
}

.visual-story-card aside > p:not(.visual-kicker) {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.78;
}

.closing-decision {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 24px;
  background: var(--slate);
  color: #fff;
}

.closing-decision h2 {
  margin: 0;
  font-size: 26px;
}

.closing-decision p {
  margin: 8px 0 0;
  max-width: 820px;
  color: #d1d5db;
  font-size: 15px;
  line-height: 1.72;
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.closing-actions .btn.secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

@media (max-width: 980px) {
  .site-shell {
    grid-template-columns: 1fr;
  }

  .site-sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    padding: 12px;
    overflow: visible;
  }

  .site-sidebar #site-nav {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  .site-sidebar .brand {
    min-width: 0;
    margin: 0;
    padding: 0 12px 0 0;
    border-right: 1px solid #1e293b;
    border-bottom: 0;
  }

  .site-sidebar .brand > div:last-child {
    min-width: 0;
  }

  .site-sidebar .brand-name,
  .site-sidebar .brand-sub {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-sidebar .nav-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 42px;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid #1e293b;
    border-radius: var(--radius);
    background: #111827;
    color: #cbd5e1;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .site-sidebar .nav-menu-toggle:hover,
  .site-sidebar .nav-menu-toggle[aria-expanded="true"] {
    border-color: #334155;
    background: #1e293b;
    color: #fff;
  }

  .site-sidebar .nav-menu-icon {
    font-size: 21px;
  }

  .site-sidebar .nav-drawer {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: 0;
    z-index: 40;
    display: grid;
    min-width: 0;
    max-height: min(72vh, 560px);
    gap: 10px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #1e293b;
    border-radius: var(--radius);
    background: var(--slate);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.32);
  }

  .site-sidebar .nav-drawer[hidden] {
    display: none;
  }

  .site-sidebar .nav-drawer-group {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid #1e293b;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.42);
  }

  .site-sidebar .nav-drawer-title {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 30px;
    padding: 5px 9px;
    border-radius: var(--radius);
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
  }

  .site-sidebar .nav-drawer-title.active {
    background: var(--primary);
    color: #fff;
  }

  .site-sidebar .nav-drawer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .site-sidebar .nav-drawer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    max-width: 100%;
    padding: 7px 10px;
    border-radius: var(--radius);
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.2;
    text-decoration: none;
  }

  .site-sidebar .nav-drawer-link:hover {
    background: #1e293b;
    color: #fff;
  }

  .site-sidebar .nav-drawer-link.active {
    background: rgba(6, 199, 85, 0.18);
    color: #fff;
    font-weight: 700;
  }

  .site-sidebar .nav-links-track {
    display: none;
  }

  .site-sidebar .nav-group {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
    margin: 0;
  }

  .site-sidebar .nav-title,
  .site-sidebar .sidebar-note {
    display: none;
  }

  .site-sidebar .nav-link {
    flex: 0 0 auto;
    min-height: 34px;
    white-space: nowrap;
  }

  .page {
    width: min(100% - 28px, 900px);
    padding-top: 18px;
  }

  .hero,
  .board-hero,
  .story-hero,
  .visual-story-card,
  .visual-story-card.reverse,
  .split-board,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .grid.cols-2,
  .grid.cols-3,
    .baseline-strip,
    .flow-board,
    .status-grid,
    .next-board,
    .visual-grid,
    .brand-token-row,
    .doc-grid,
    .ci-manual-spread,
    .story-thesis,
    .persona-ledger,
    .rationale-grid,
  .meta-grid,
  .token-grid,
  .spec-grid,
  .icon-sample-grid,
  .baseline-box {
    grid-template-columns: 1fr;
  }

  .board-visual img {
    min-height: 260px;
  }

  .asset-card img {
    height: 240px;
  }

  .story-page {
    width: min(100% - 28px, 900px);
  }

  .story-hero-copy,
  .story-hero-visual img,
  .visual-story-card figure {
    min-height: 360px;
  }

  .visual-story-card.reverse figure,
  .visual-story-card.reverse aside {
    order: initial;
  }

  .visual-story-card aside,
  .visual-story-card.reverse aside {
    border-top: 1px solid var(--border);
    border-right: 0;
    border-left: 0;
  }

  .closing-decision {
    align-items: flex-start;
    flex-direction: column;
  }

  .closing-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .site-sidebar #site-nav {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .site-sidebar .brand {
    width: auto;
    padding: 0 10px 0 0;
    border-right: 1px solid #1e293b;
    border-bottom: 0;
  }

  .site-sidebar .nav-menu-label {
    display: none;
  }

  .site-sidebar .nav-drawer {
    max-height: calc(100vh - 92px);
  }

  .site-sidebar .nav-drawer-link {
    width: 100%;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 16px;
  }

  .hero-panel,
  .board-hero-copy,
  .story-hero-copy,
  .story-section,
  .report-head,
  .markdown-body {
    padding: 20px;
  }

  .viewer-head {
    flex-direction: column;
  }

  .viewer-head .viewer-toolbar {
    margin-top: 0;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .font-sample .display {
    font-size: 26px;
  }

  .target-list div {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .target-list em {
    grid-column: 2;
    text-align: left;
  }

  .gate {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  .gate p {
    grid-column: 2;
  }

  .story-section-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .story-section-head > span {
    width: 38px;
    height: 38px;
  }

  .story-hero-copy,
  .story-hero-visual img {
    min-height: auto;
  }

  .visual-story-card figure {
    min-height: 260px;
  }

  .visual-story-card aside {
    padding: 20px;
  }

  .persona-ledger article,
  .rationale-panel {
    min-height: auto;
  }
}
