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

:root {
  --bg:          #fbf8f2;
  --surface:     #fffdf9;
  --surface-2:   #f6f0e4;
  --ink:         #1e1a17;
  --ink-muted:   #5e564d;
  --ink-faint:   #766d62;
  --rule:        #e9e0cf;
  --rule-strong: #d8cbb0;
  --accent:      #6b2437;
  --accent-dim:  #f6e9ec;
  --accent-mid:  #e4c4cc;
  --navy:        #1f2a4d;
  --navy-mid:    #3a4a7a;
  --steel:       #4a5a86;
  --amber:       #8a661c;
  --red:         #a3262f;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'DM Sans', sans-serif;
  --font-mono:  'DM Mono', monospace;

  --nav-h: 56px;
  --tab-h: 44px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --shadow-sm: 0 1px 2px rgba(90,65,25,.05), 0 2px 10px rgba(90,65,25,.05);
  --shadow-md: 0 2px 4px rgba(90,65,25,.05), 0 10px 28px rgba(90,65,25,.09);
  --shadow-lg: 0 4px 8px rgba(90,65,25,.06), 0 18px 44px rgba(90,65,25,.14);
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.container { max-width: 780px; margin: 0 auto; padding: 0 2rem; }
a { color: inherit; }

/* ======= NAV ======= */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  background: rgba(251,248,242,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 780px; margin: 0 auto; padding: 0 2rem;
  height: 100%; display: flex; justify-content: space-between; align-items: center;
}
.nav-brand {
  font-family: var(--font-serif); font-size: 1.08rem; font-weight: 400;
  color: var(--ink); text-decoration: none; letter-spacing: 0.02em;
}
.nav-right { display: flex; align-items: center; gap: 0.75rem; }
.nav-pill {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 0.22rem 0.65rem; border-radius: 2px;
  background: var(--navy); color: #fff;
}

/* ======= TAB BAR ======= */
.tab-bar {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 190;
  height: var(--tab-h);
  background: rgba(251,248,242,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.tab-bar-inner {
  max-width: 780px; margin: 0 auto; padding: 0 2rem;
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.tab-active-desc {
  flex: 1; min-width: 0; max-width: 100%;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  display: block;
  font-family: var(--font-serif); font-size: 1.02rem; letter-spacing: -0.01em;
  font-style: italic; font-weight: 300;
  cursor: pointer; color: var(--steel); text-align: left;
}
.tab-menu-btn {
  width: auto; height: 32px; display: flex; align-items: center; gap: 0.4rem;
  padding: 0 0.6rem;
  background: none; border: 1px solid var(--rule); border-radius: var(--radius-sm);
  cursor: pointer; color: var(--ink-muted); flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  animation: pulse-hint 2.5s ease-in-out 0.5s infinite;
}
.tab-menu-label {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em;
  text-transform: uppercase; cursor: pointer; color: var(--ink-muted);
  transition: color 0.15s;
}
.tab-menu-btn:hover .tab-menu-label { color: var(--navy); }
.tab-chevron {
  font-size: inherit; color: var(--ink-faint); margin-left: 0.1rem;
  line-height: 1;
}
@keyframes pulse-hint {
  0%   { border-color: var(--rule); box-shadow: none; }
  50%  { border-color: var(--navy-mid); box-shadow: 0 0 0 3px rgba(185,154,91,0.2); }
  100% { border-color: var(--rule); box-shadow: none; }
}
.tab-menu-btn svg { width: 14px; height: 14px; }
.tab-active-label {
  display: flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--navy); font-weight: 500;
  flex-shrink: 0;
}
.tab-active-label .tab-dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0;
}

/* ======= DRAWER ======= */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(30,26,23,0.4);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.drawer-backdrop.open { opacity: 1; pointer-events: all; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 310;
  width: 300px; max-width: 85vw;
  background: var(--surface);
  border-right: 1px solid var(--rule);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--rule);
  flex-shrink: 0;
}
.drawer-title {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--navy);
}
.drawer-close {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--rule); border-radius: var(--radius-sm);
  cursor: pointer; color: var(--ink-muted);
  transition: border-color 0.15s, color 0.15s;
}
.drawer-close:hover { border-color: var(--red); color: var(--red); }
.drawer-close svg { width: 12px; height: 12px; }
.drawer-items { display: flex; flex-direction: column; padding: 0.6rem 0; overflow-y: auto; }
.drawer-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.18rem;
  padding: 0.85rem 1.4rem;
  background: none; border: none; cursor: pointer; text-align: left;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.drawer-item:hover { background: var(--surface-2) !important; }
.drawer-item.active { border-left-color: var(--navy); background: var(--surface-2); }
.drawer-item-name {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--navy); font-weight: 500;
}
.drawer-item.active .drawer-item-name { color: var(--navy); }
.drawer-item-desc {
  font-size: 0.78rem; color: var(--ink-faint); line-height: 1.4;
}
.drawer-item.active .drawer-item-desc { color: var(--ink-muted); }


/* ======= HERO ======= */
.page-hero {
  padding-top: calc(var(--nav-h) + var(--tab-h) + 3.5rem);
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}
.hero-breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.74rem;
  color: var(--ink-faint); letter-spacing: 0.08em;
  margin-bottom: 1.6rem;
}
.hero-breadcrumb .bc-sep { color: var(--rule-strong); }
.hero-breadcrumb .bc-active { color: var(--accent); }
.hero-breadcrumb .bc-cursor {
  display: inline-block; width: 6px; height: 12px;
  background: var(--accent); border-radius: 1px;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

.page-hero-eyebrow {
  font-family: var(--font-mono); font-size: 0.70rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--navy-mid); margin-bottom: 0.8rem;
}
.page-hero-title {
  font-family: var(--font-serif); font-size: clamp(2.4rem, 6vw, 3.9rem);
  font-weight: 300; line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 0.8rem;
}
.page-hero-title em { font-style: italic; color: var(--ink-muted); }
.page-hero-sub {
  font-size: 1.00rem; color: var(--ink-muted); max-width: 540px;
  line-height: 1.85; margin-bottom: 2rem;
}

/* stat strip */
.hero-stats {
  display: flex; gap: 0; margin-bottom: 2rem;
  border: 1px solid var(--rule); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.hero-stat {
  flex: 1; padding: 0.85rem 1.1rem;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 0.2rem;
}
.hero-stat:last-child { border-right: none; }
.stat-val {
  font-family: var(--font-serif); font-size: 1.75rem; font-weight: 400;
  line-height: 1; color: var(--navy);
}
.stat-label {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint);
}

/* badge row */
.hero-badges { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.hero-badge {
  font-family: var(--font-mono); font-size: 0.70rem; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--rule); color: var(--ink-muted);
}
.hero-badge.accent { background: var(--accent-dim); border-color: var(--accent-mid); color: var(--accent); }

.status-bar { display: flex; align-items: center; gap: 0.5rem; }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  flex-shrink: 0; box-shadow: 0 0 0 2px var(--accent-dim);
}
.status-text { font-family: var(--font-mono); font-size: 0.80rem; color: var(--ink-faint); letter-spacing: 0.04em; }

/* ======= TAB PANELS ======= */
.tab-panel { display: none; padding: 3rem 0; }
.tab-panel.active { display: block; }

/* ======= SECTION SHARED ======= */
.section { padding: 2.5rem 0; border-bottom: 1px solid var(--rule); }
.section:last-child { border-bottom: none; }
.section-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.section-label {
  font-family: var(--font-mono); font-size: 0.70rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--navy); white-space: nowrap;
  padding: 0.2rem 0.6rem; border-left: 2px solid var(--navy); background: var(--surface-2);
}
.section-rule { flex: 1; height: 1px; background: var(--rule); }
.section-intro { font-size: 0.975rem; color: var(--ink-muted); line-height: 1.85; margin-bottom: 1.75rem; }
.hl { color: var(--ink); font-weight: 400; }

/* ======= ARCHITECTURE CARDS ======= */
.arch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px,1fr)); gap: 0.75rem; }
.server-card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-md); padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow-sm); transition: border-color 0.18s, box-shadow 0.18s;
}
.server-card:hover { border-color: var(--navy-mid); box-shadow: var(--shadow-md); }
.server-card-top { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.7rem; }
.server-index {
  font-family: var(--font-mono); font-size: 0.60rem; color: var(--accent);
  border: 1px solid var(--accent-mid); background: var(--accent-dim);
  padding: 0.12rem 0.4rem; border-radius: 2px; letter-spacing: 0.06em;
}
.server-name { font-family: var(--font-mono); font-size: 0.83rem; color: var(--navy); letter-spacing: 0.06em; font-weight: 500; }
.server-hw { font-family: var(--font-mono); font-size: 0.66rem; color: var(--ink-faint); margin-bottom: 0.6rem; }
.server-role { font-size: 0.92rem; color: var(--ink-muted); line-height: 1.65; margin-bottom: 0.7rem; }
.server-services { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.svc-tag {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em;
  background: var(--surface-2); border: 1px solid var(--rule);
  color: var(--steel); padding: 0.12rem 0.38rem; border-radius: 2px; text-transform: uppercase;
}

/* ======= LIVE SERVICE CARDS ======= */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px,1fr)); gap: 0.75rem; }
.svc-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-md);
  padding: 1.3rem 1.15rem 1.1rem; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 0.55rem;
  box-shadow: var(--shadow-sm); transition: border-color 0.18s, box-shadow 0.18s, transform 0.16s;
}
.svc-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.svc-card-icon {
  width: 36px; height: 36px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background 0.18s, border-color 0.18s;
}
.svc-card:hover .svc-card-icon { background: var(--accent-dim); border-color: var(--accent-mid); }
.svc-card-icon svg { width: 17px; height: 17px; stroke: var(--steel); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.18s; }
.svc-card:hover .svc-card-icon svg { stroke: var(--accent); }
.svc-card-name { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; }
.svc-card-desc { font-size: 0.83rem; color: var(--ink-muted); line-height: 1.55; }
.svc-card-host { font-family: var(--font-mono); font-size: 0.64rem; color: var(--ink-faint); letter-spacing: 0.04em; margin-top: auto; }
.svc-card-arrow {
  display: flex; align-items: center; gap: 0.3rem;
  font-family: var(--font-mono); font-size: 0.60rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); opacity: 0; transition: opacity 0.16s;
}
.svc-card:hover .svc-card-arrow { opacity: 1; }
.svc-card-arrow svg { width: 10px; height: 10px; stroke: var(--accent); fill: none; stroke-width: 2; }

/* ── Internal card distinction ── */
.svc-card.internal {
  border-color: var(--steel);
  cursor: pointer;
}
.svc-card.internal:hover {
  border-color: var(--steel);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.svc-card.internal .svc-card-icon svg { stroke: var(--steel); }
.svc-card.internal:hover .svc-card-icon { background: #f1f3fa; border-color: #d3d8ec; }
.svc-card.internal:hover .svc-card-icon svg { stroke: var(--steel); }

.svc-card-host {
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--ink-faint); letter-spacing: 0.04em; margin-top: auto;
}

/* LAN badge */
.svc-lan-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-family: var(--font-mono); font-size: 0.60rem; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 0.16rem 0.48rem;
  border-radius: 2px; background: #f1f3fa;
  border: 1px solid #d3d8ec; color: var(--steel);
  margin-top: 0.5rem; width: fit-content;
}
.svc-lan-badge::before {
  content: ''; display: inline-block; width: 5px; height: 5px;
  border-radius: 50%; background: var(--steel); flex-shrink: 0;
}

/* ── Modal overlay ── */
#svc-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(30,26,23,0.5);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  padding: 1.5rem;
}
#svc-modal-overlay.open { display: flex; }

/* ── Modal panel ── */
#svc-modal {
  background: var(--surface); border: 1px solid var(--rule);
  border-top: 3px solid var(--steel);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px;
  max-height: 88vh; overflow-y: auto;
  display: flex; flex-direction: column;
  animation: modal-in 0.18s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Modal header */
.modal-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 1.3rem 1.4rem 1rem;
  border-bottom: 1px solid var(--rule);
  gap: 1rem;
}
.modal-header-left { display: flex; align-items: center; gap: 0.8rem; flex: 1; min-width: 0; }
.modal-icon {
  width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0;
  background: #f1f3fa; border: 1px solid #d3d8ec;
  display: flex; align-items: center; justify-content: center;
}
.modal-icon svg { width: 18px; height: 18px; stroke: var(--steel); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.modal-title { font-family: var(--font-mono); font-size: 0.88rem; color: var(--navy); letter-spacing: 0.06em; font-weight: 500; }
.modal-subtitle { font-family: var(--font-mono); font-size: 0.64rem; color: var(--ink-faint); letter-spacing: 0.04em; margin-top: 0.15rem; }

.modal-close {
  background: none; border: 1px solid var(--rule); border-radius: var(--radius-sm);
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink-muted); flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.modal-close:hover { border-color: var(--rule-strong); color: var(--ink); background: var(--surface-2); }
.modal-close svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Modal body */
.modal-body { padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: 1.1rem; }

/* Row */
.modal-row { display: flex; flex-direction: column; gap: 0.25rem; }
.modal-row-label {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--navy); 
}
.modal-row-value { font-size: 0.875rem; color: var(--ink-muted); line-height: 1.72; }
.modal-row-value.mono { font-family: var(--font-mono); font-size: 0.78rem; color: var(--steel); }

/* Features list */
.modal-features { display: flex; flex-direction: column; gap: 0.3rem; }
.modal-feature {
  display: flex; gap: 0.65rem; align-items: flex-start;
  font-size: 0.875rem; color: var(--ink-muted); line-height: 1.65;
}
.modal-feature::before { content: '//'; font-family: var(--font-mono); font-size: 0.74rem; color: var(--accent); flex-shrink: 0; margin-top: 0.05rem; font-weight: 500; }

/* Tags inside modal */
.modal-tags { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.modal-tag {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.05em;
  background: var(--surface-2); border: 1px solid var(--rule);
  color: var(--steel); padding: 0.12rem 0.38rem; border-radius: 2px; text-transform: uppercase;
}

.modal-divider { border: none; border-top: 1px solid var(--rule); margin: 0; }


/* ======= SUBPROJECT (BUILD JOURNEY) ======= */
.subproject { margin-bottom: 2.6rem; }
.subproject:last-child { margin-bottom: 0; }
.sp-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.sp-num {
  font-family: var(--font-mono); font-size: 0.64rem; color: var(--ink-faint);
  border: 1px solid var(--rule); background: var(--surface-2);
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; flex-shrink: 0; margin-top: 0.12rem;
}
.sp-title { font-family: var(--font-serif); font-size: 1.32rem; font-weight: 400; font-style: italic; color: var(--steel); margin-bottom: 0.15rem; }
.sp-subtitle { font-family: var(--font-mono); font-size: 0.66rem; color: var(--ink-faint); letter-spacing: 0.06em; text-transform: uppercase; }
.sp-body p { font-size: 0.975rem; color: var(--ink-muted); line-height: 1.82; margin-bottom: 0.8rem; }
.sp-body p:last-child { margin-bottom: 0; }

/* decisions block */
.decisions {
  margin-top: 1.1rem;
  background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--navy);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.9rem 1rem; box-shadow: var(--shadow-sm);
}
.decisions-label {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--navy); margin-bottom: 0.6rem;
}
.decision-list { display: flex; flex-direction: column; gap: 0.35rem; }
.decision-item {
  display: flex; gap: 0.75rem; align-items: flex-start;
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-muted); line-height: 1.65;
}
.decision-item::before { content: '//'; color: var(--accent); font-size: 0.78rem; flex-shrink: 0; margin-top: 0.03rem; font-weight: 500; }

/* tech tags */
.tech-row { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.9rem; }
.tech-tag {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.06em;
  background: var(--surface-2); border: 1px solid var(--rule);
  color: var(--navy-mid); padding: 0.14rem 0.42rem; border-radius: 2px; text-transform: uppercase;
}
.tech-tag.pending { color: var(--amber); border-color: #ead9a6; background: #fbf4e1; }

.sp-divider { border: none; border-top: 1px solid var(--rule); margin: 2.2rem 0; }

/* ======= LEARNING CARDS ======= */
.learning-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 0.75rem; }
.learning-card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-md);
  padding: 1.15rem 1.2rem; box-shadow: var(--shadow-sm);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.learning-card:hover { border-color: var(--navy-mid); box-shadow: var(--shadow-md); }
.lc-num { font-family: var(--font-mono); font-size: 0.64rem; color: var(--ink-faint); letter-spacing: 0.08em; margin-bottom: 0.55rem; }
.lc-title { font-family: var(--font-serif); font-size: 0.98rem; font-weight: 400; color: var(--ink); margin-bottom: 0.4rem; line-height: 1.35; }
.lc-body { font-size: 0.83rem; color: var(--ink-muted); line-height: 1.68; }

/* ======= PENDING ITEMS ======= */
.pending-list { display: flex; flex-direction: column; gap: 0.5rem; }
.pending-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 0.85rem 1.1rem; border: 1px solid var(--rule);
  border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm);
}
.pending-marker {
  font-family: var(--font-mono); font-size: 0.60rem; color: #fff;
  background: var(--red); padding: 0.1rem 0.38rem; border-radius: 2px;
  flex-shrink: 0; margin-top: 0.22rem; letter-spacing: 0.04em;
}
.pending-marker.amber { background: var(--amber); }
.pending-text { font-size: 0.83rem; color: var(--ink-muted); line-height: 1.65; }
.pending-server { font-family: var(--font-mono); font-size: 0.66rem; color: var(--ink-faint); margin-top: 0.1rem; letter-spacing: 0.04em; }

/* ======= INFO ROW (key-value pairs) ======= */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 0.5rem; margin-bottom: 1.25rem; }
.info-row {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.65rem 0.9rem; background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.info-key {
  font-family: var(--font-mono); font-size: 0.66rem; color: var(--ink-faint);
  letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  padding-top: 0.08rem; min-width: 80px;
}
.info-val { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink); line-height: 1.5; }

/* ======= STATUS TABLE ======= */
.status-table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; table-layout: fixed; }
.status-table th {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint);
  padding: 0.5rem 0.75rem; text-align: left;
  border-bottom: 1px solid var(--rule); background: var(--surface-2);
}
.status-table td {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-muted);
  padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.status-table tr:last-child td { border-bottom: none; }
.status-table tr:hover td { background: var(--surface-2); }
.st-ok { color: var(--accent); }
.st-warn { color: var(--amber); }
.st-note { color: var(--ink-faint); font-size: 0.70rem; }

/* ─── SERVICE HEALTH ─── */
.svh-wrap {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.svh-group { border-bottom: 1px solid var(--rule); }
.svh-group:last-child { border-bottom: none; }
.svh-group-title {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint);
  padding: 0.6rem 1rem 0.3rem; background: var(--surface-2);
}
.svh-row {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.55rem 1rem; border-top: 1px solid var(--rule);
}
.svh-group .svh-row:first-of-type { border-top: none; }
.svh-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.svh-name { font-size: 0.85rem; color: var(--ink); flex: 1; min-width: 0; }
.svh-uptime {
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-muted);
  width: 56px; text-align: right; flex-shrink: 0;
}
.svh-bar { display: flex; gap: 1px; flex-shrink: 0; }
.svh-bar-seg { width: 3px; height: 14px; border-radius: 1px; }
.svh-empty { padding: 1rem; font-size: 0.85rem; color: var(--ink-faint); text-align: center; }
@media (max-width: 620px) { .svh-bar { display: none; } }

/* ======= ALERT CARDS ======= */
.alert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 0.75rem; }
.alert-card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-md); padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm); border-top: 3px solid var(--navy);
}
.alert-card.accent { border-top-color: var(--accent); }
.alert-card.amber { border-top-color: var(--amber); }
.alert-name { font-family: var(--font-mono); font-size: 0.74rem; color: var(--navy); font-weight: 500; letter-spacing: 0.06em; margin-bottom: 0.4rem; }
.alert-card.accent .alert-name { color: var(--accent); }
.alert-card.amber .alert-name { color: var(--amber); }
.alert-desc { font-size: 0.83rem; color: var(--ink-muted); line-height: 1.6; margin-bottom: 0.6rem; }
.alert-meta { font-family: var(--font-mono); font-size: 0.66rem; color: var(--ink-faint); letter-spacing: 0.04em; }

/* ======= FOOTER ======= */
.site-footer {
  border-top: 1px solid var(--rule); padding: 1.8rem 0;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem; margin-top: 0.5rem;
}
.f-name { font-family: var(--font-mono); font-size: 0.66rem; color: var(--ink-muted); letter-spacing: 0.06em; }
.f-domain { font-family: var(--font-mono); font-size: 0.66rem; color: var(--ink-muted); }
.f-domain span { color: var(--accent); font-weight: 500; }

/* ======= FEEDBACK WIDGET ======= */
#fb-btn {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--navy); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.22); transition: transform 0.18s, background 0.18s;
}
#fb-btn:hover { transform: scale(1.08); background: var(--navy-mid); }
#fb-btn svg { width: 20px; height: 20px; fill: #fff; }
#fb-panel {
  position: fixed; bottom: 86px; right: 28px; z-index: 9999;
  width: 300px; background: #fff; border-radius: 10px;
  border: 1px solid var(--rule); padding: 20px;
  display: none; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-lg); font-family: var(--font-sans);
}
#fb-panel.open { display: flex; }
.fb-title { font-family: var(--font-sans); font-size: 13.5px; font-weight: 500; color: var(--ink); margin: 0; }
.fb-thumb-row { display: flex; gap: 10px; }
.fb-thumb {
  flex: 1; padding: 8px; border-radius: 6px;
  border: 1px solid var(--rule); background: var(--surface-2);
  cursor: pointer; font-size: 18px; text-align: center;
  transition: background 0.15s, border-color 0.15s;
}
.fb-thumb:hover, .fb-thumb.selected { background: var(--accent-dim); border-color: var(--accent-mid); }
#fb-comment {
  width: 100%; box-sizing: border-box; padding: 8px 10px;
  border: 1px solid var(--rule); border-radius: 6px;
  font-size: 13px; resize: none; font-family: var(--font-sans);
  outline: none; color: var(--ink); background: var(--bg);
}
#fb-comment:focus { border-color: var(--accent); }
#fb-submit {
  background: var(--navy); color: #fff; border: none;
  border-radius: 6px; padding: 9px; font-size: 13px;
  font-weight: 500; cursor: pointer; font-family: var(--font-sans);
  transition: background 0.15s;
}
#fb-submit:hover { background: var(--navy-mid); }
#fb-thanks { font-size: 13px; color: var(--accent); text-align: center; display: none; font-family: var(--font-mono); }
#fb-error { font-size: 13px; color: var(--red); text-align: center; display: none; }

/* ======= RESPONSIVE ======= */
@media (max-width: 620px) {
  .arch-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; }
  .hero-stat { border-right: none; border-bottom: 1px solid var(--rule); }
  .hero-stat:last-child { border-bottom: none; }
  .nav-brand { display: none; }
  .nav-inner { padding: 0 1rem; }
  .tab-bar-inner { padding: 0 1rem; }
  .tab-menu-label { display: none; }
  .container { padding: 0 1.2rem; overflow-x: hidden; }
  .learning-grid { grid-template-columns: 1fr; }
  .alert-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .drawer { width: 85vw; }
  .status-table { display: block; overflow-x: auto; table-layout: auto; }
  #svc-modal { max-width: 100%; border-radius: var(--radius-sm); }
  .modal-header { padding: 1rem 1.1rem 0.85rem; }
  .modal-body { padding: 1rem 1.1rem; }
}

/* =====================================================================
   PREMIUM LAYER — warm ivory, champagne, deep bordeaux + navy ink
   Overrides tokens/components above. Light mode only.
   ===================================================================== */
:root {
  --champagne: #eadfc6; --champagne-soft: #f3ebd9;
  --gold: #b99a5b; --gold-ink: #7d6228;
  --accent-dark: #511a2a;
  --ok: #2f7a4e; --ok-dim: #e4f1e9; --ok-mid: #bcdcc8;
  --ease: cubic-bezier(.22,1,.36,1);
  --radius-lg: 26px;
  --pad-x: clamp(1.1rem, 4.5vw, 2rem);
}
.ico { width: 13px; height: 13px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -2px; }

.container, .nav-inner, .tab-bar-inner { max-width: 840px; padding-left: var(--pad-x); padding-right: var(--pad-x); }
main { overflow-x: clip; }

/* nav + tab bar: no blur, soft elevation */
nav { background: rgba(251,248,242,0.97); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: var(--shadow-sm); }
.tab-bar { background: rgba(251,248,242,0.97); backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav-brand { font-weight: 600; letter-spacing: 0.03em; display: inline-flex; align-items: center; min-height: 44px; transition: color .25s var(--ease); }
.nav-brand:hover { color: var(--accent); }
.nav-pill { border-radius: 100px; padding: 0.3rem 0.85rem; background: var(--navy); color: #f3ebd9; }

.tab-active-desc { color: var(--section-tile, var(--navy-mid)); font-weight: 400; }
.tab-menu-btn { height: 40px; border-radius: 100px; padding: 0 0.95rem; min-width: 44px; justify-content: center; background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease); }
.tab-menu-btn:hover { border-color: var(--gold); background: var(--champagne-soft); }
@keyframes pulse-hint {
  0%   { border-color: var(--rule); box-shadow: var(--shadow-sm); }
  50%  { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(185,154,91,0.2); }
  100% { border-color: var(--rule); box-shadow: var(--shadow-sm); }
}
.tab-active-label .tab-dot { background: var(--gold); }

/* drawer + modal */
.drawer-backdrop { background: rgba(30,26,23,0.4); backdrop-filter: none; }
.drawer { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; transition-timing-function: var(--ease); box-shadow: var(--shadow-lg); }
.drawer-close, .modal-close { width: 44px; height: 44px; border-radius: 50%; }
.drawer-item { min-height: 44px; transition: background .25s var(--ease), border-color .25s var(--ease); }
.drawer-item.active { border-left-color: var(--gold); }
.drawer-title { color: var(--navy); }
#svc-modal-overlay { background: rgba(30,26,23,0.5); backdrop-filter: none; }
#svc-modal { border-radius: var(--radius-lg); border-top: 3px solid var(--gold); box-shadow: var(--shadow-lg); }

/* hero */
.page-hero { position: relative; border-bottom: 0; padding-bottom: 3.6rem; }
.page-hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='10' viewBox='0 0 120 10'%3E%3Cpath d='M0 5 Q30 0 60 5 T120 5' fill='none' stroke='%23d8cbb0' stroke-width='1'/%3E%3C/svg%3E") repeat-x center;
}
.hero-breadcrumb .bc-active { color: var(--accent); }
.hero-breadcrumb .bc-cursor { background: var(--gold); }
.page-hero-eyebrow { color: var(--accent); }
.page-hero-title { font-weight: 300; }
.page-hero-title em { color: var(--accent); font-weight: 400; }
.hero-portrait {
  width: 150px; height: 190px; object-fit: cover; flex-shrink: 0; margin: 0.4rem 10px 0 0;
  border: 4px solid var(--surface); border-radius: 75px 75px 20px 20px;
  box-shadow: var(--shadow-md), 11px 11px 0 -3px var(--surface), 11px 11px 0 -2px var(--gold);
}
.hero-stats { border-radius: var(--radius-md); box-shadow: var(--shadow-md); flex-wrap: wrap; }
.stat-val { color: var(--navy); }
.hero-badge { border-radius: 100px; padding: 0.3rem 0.8rem; box-shadow: var(--shadow-sm); }
.hero-badge.accent { background: var(--accent-dim); border-color: var(--accent-mid); color: var(--accent); }
.status-dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-dim); }

/* panels + section headers */
.tab-panel { animation: fadeUp .5s var(--ease) backwards; }
/* opacity-only: a lingering transform would trap position:fixed modals inside the panel */
@keyframes fadeUp { from { opacity: 0; } to { opacity: 1; } }
.section-label { border-left: 0; background: none; padding: 0; display: flex; align-items: center; gap: 0.7rem; color: var(--navy); }
.section-label::before { content: ''; flex-shrink: 0; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }
.section-rule { background: linear-gradient(to right, var(--rule-strong), transparent); }
.hl { color: var(--ink); }

/* cards */
.server-card, .svc-card, .learning-card, .alert-card, .svh-wrap {
  border-radius: var(--radius-md);
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
}
.server-card { padding: 1.35rem 1.5rem; }
.server-card:hover, .learning-card:hover { border-color: var(--gold); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.server-index { border-radius: 100px; padding: 0.12rem 0.55rem; color: var(--accent); border-color: var(--accent-mid); background: var(--accent-dim); }
.svc-tag, .tech-tag, .modal-tag { border-radius: 100px; padding: 0.14rem 0.6rem; background: var(--champagne-soft); border-color: var(--champagne); color: var(--gold-ink); }
.tech-tag { color: var(--navy-mid); background: #f1f3fa; border-color: #d3d8ec; }
.tech-tag.pending { color: var(--amber); border-color: #ead9a6; background: #fbf4e1; }

.svc-card { padding: 1.4rem 1.25rem 1.2rem; }
.svc-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.svc-card-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--champagne-soft); border-color: var(--champagne); }
.svc-card-icon svg { stroke: var(--gold-ink); }
.svc-card:hover .svc-card-icon { background: var(--accent-dim); border-color: var(--accent-mid); }
.svc-card:hover .svc-card-icon svg { stroke: var(--accent); }
.svc-card-arrow, .svc-card-arrow svg { color: var(--accent); stroke: var(--accent); }
.svc-card.internal { border-color: #b9c1dd; }
.svc-card.internal:hover { border-color: var(--navy-mid); }
.svc-card.internal .svc-card-icon { background: #f1f3fa; border-color: #d3d8ec; }
.svc-card.internal .svc-card-icon svg { stroke: var(--navy-mid); }
.svc-card.internal:hover .svc-card-icon { background: #e6eaf6; border-color: #b9c1dd; }
.svc-card.internal:hover .svc-card-icon svg { stroke: var(--navy-mid); }
.svc-lan-badge { border-radius: 100px; padding: 0.16rem 0.6rem; background: #f1f3fa; border-color: #d3d8ec; color: var(--navy-mid); }
.svc-lan-badge::before { background: var(--navy-mid); }
.modal-icon { border-radius: 50%; background: var(--champagne-soft); border-color: var(--champagne); }
.modal-icon svg { stroke: var(--gold-ink); }
.modal-feature::before, .decision-item::before { color: var(--gold-ink); }
.modal-row-label { color: var(--accent); }

.sp-num { border-color: var(--gold); background: var(--champagne-soft); color: var(--gold-ink); }
.sp-title { color: var(--navy-mid); }
.decisions { border-left: 3px solid var(--gold); border-radius: 0 var(--radius-md) var(--radius-md) 0; padding: 1rem 1.25rem; }
.decisions-label { color: var(--accent); }
.sp-divider { border: none; height: 10px; margin: 2.4rem 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='10' viewBox='0 0 120 10'%3E%3Cpath d='M0 5 Q30 0 60 5 T120 5' fill='none' stroke='%23d8cbb0' stroke-width='1'/%3E%3C/svg%3E") repeat-x center; }

.learning-card { padding: 1.3rem 1.4rem; }
.lc-title { font-weight: 500; font-size: 1.06rem; }

.pending-item { border-radius: var(--radius-md); padding: 0.95rem 1.25rem; }
.pending-marker { border-radius: 100px; padding: 0.12rem 0.55rem; background: var(--red); }
.pending-marker.amber { background: var(--amber); }
.info-row { border-radius: var(--radius-sm); }
.status-table th { background: var(--surface-2); }
.st-ok { color: var(--ok); }
.st-warn { color: var(--amber); }
.svh-wrap { box-shadow: var(--shadow-md); }
.svh-group-title { background: var(--surface-2); }

.alert-card { padding: 1.25rem 1.4rem; border-top: 3px solid var(--navy-mid); }
.alert-card.accent { border-top-color: var(--ok); }
.alert-card.accent .alert-name { color: var(--ok); }
.alert-card.amber { border-top-color: var(--amber); }
.alert-card.amber .alert-name { color: var(--amber); }

.site-footer .f-domain span { color: var(--accent); }

/* figure on Management Coverage tab */
.table-scroll figure img { border-radius: var(--radius-md) !important; }

/* feedback widget */
#fb-btn { width: 52px; height: 52px; right: 24px; bottom: 24px; background: var(--accent); box-shadow: 0 2px 4px rgba(107,36,55,.2), 0 10px 24px rgba(107,36,55,.28); transition: transform .3s var(--ease), background .3s var(--ease); }
#fb-btn:hover { background: var(--accent-dark); transform: scale(1.06); }
#fb-panel { width: min(300px, calc(100vw - 32px)); background: var(--surface); border-radius: var(--radius-md); border-color: var(--rule-strong); right: 24px; bottom: 88px; }
.fb-title { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 500; }
.fb-thumb { min-height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--ink-muted); background: var(--bg); border-color: var(--rule-strong); }
.fb-thumb svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fb-thumb:hover, .fb-thumb.selected { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
#fb-comment { border-radius: 12px; background: var(--surface); }
#fb-comment:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
#fb-submit { background: var(--accent); border-radius: 100px; min-height: 44px; }
#fb-submit:hover { background: var(--accent-dark); }

@media (max-width: 768px) {
  .hero-portrait { width: 124px; height: 160px; border-radius: 62px 62px 18px 18px; }
}
@media (max-width: 620px) {
  .nav-inner, .tab-bar-inner { padding-left: 1rem; padding-right: 1rem; }
  .container { padding-left: var(--pad-x); padding-right: var(--pad-x); }
  .hero-portrait { width: 96px; height: 124px; border-radius: 48px 48px 16px 16px; border-width: 3px; margin-right: 8px; }
  #svc-modal { border-radius: var(--radius-md); }
  #fb-btn { right: 16px; bottom: 16px; }
  #fb-panel { right: 16px; bottom: 80px; }
  .hero-stat { border-right: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tab-panel { animation: none; }
  .tab-menu-btn { animation: none; }
  .bc-cursor { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
html { font-variant-numeric: lining-nums; }
.drawer:not(.open) { box-shadow: none; }

:root { --tab-h: 52px; }
.tab-menu-btn { height: 44px; }
.section-label { white-space: normal; min-width: 0; line-height: 1.5; }
.section-header { min-width: 0; }

/* =====================================================================
   BUILD LOG — pinned photo stage + scrolling chapters (Premium)
   ===================================================================== */
.bl { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2.6rem; align-items: start; }
.bl-stage { position: sticky; top: calc(var(--nav-h) + var(--tab-h) + 1.4rem); align-self: start; }
.bl-frame {
  position: relative; display: block; width: 100%; padding: 0; cursor: zoom-in;
  aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2);
  border: 4px solid var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md), 10px 10px 0 -3px var(--surface), 10px 10px 0 -2px var(--gold);
}
.bl-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s var(--ease); }
.bl-frame img.on { opacity: 1; }
.bl-frame img[data-fit="contain"] { object-fit: contain; }
.bl-frame img[data-pos="low"] { object-position: 50% 64%; }
.bl-zoom-hint {
  position: absolute; right: .7rem; bottom: .7rem; z-index: 2;
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--navy); background: rgba(255,253,249,.92); border: 1px solid var(--rule-strong);
  border-radius: 100px; padding: .22rem .65rem; box-shadow: var(--shadow-sm); pointer-events: none;
}
.bl-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 1.5rem; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.bl-meta strong { font-weight: 500; color: var(--navy); }
.bl-rail { position: relative; margin: .5rem 22px 0; height: 62px; }
.bl-rail::before { content: ''; position: absolute; left: 0; right: 0; top: 21px; height: 1px; background: var(--rule-strong); }
.bl-rail-fill { position: absolute; left: 0; top: 20px; height: 3px; width: 0; border-radius: 3px; background: var(--gold); transition: width .6s var(--ease); }
.bl-node {
  position: absolute; top: 0; transform: translateX(-50%); width: 44px; min-height: 62px; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: .4rem; cursor: pointer;
  background: none; border: 0; border-radius: 12px;
  font-family: var(--font-mono); font-size: .58rem; letter-spacing: 0; text-transform: uppercase; white-space: nowrap; color: var(--ink-faint);
  transition: color .25s var(--ease);
}
.bl-node i { display: block; width: 11px; height: 11px; margin-top: 16px; transform: rotate(45deg); background: var(--surface); border: 1.5px solid var(--gold); transition: background .25s var(--ease), transform .35s var(--ease); }
.bl-node[aria-current="true"] { color: var(--navy); }
.bl-node[aria-current="true"] i { background: var(--gold); transform: rotate(45deg) scale(1.25); }
.bl-node:hover { color: var(--navy); }
.bl-note { margin-top: .4rem; font-family: var(--font-mono); font-size: .64rem; letter-spacing: .04em; color: var(--ink-faint); line-height: 1.6; }

.bl-chapters { position: relative; padding-left: 1.6rem; border-left: 1px solid var(--rule-strong); }
.bl-ch { position: relative; min-height: 64vh; display: flex; flex-direction: column; justify-content: center; padding: 1.2rem 0; opacity: .5; transition: opacity .45s var(--ease); }
.bl-ch.on { opacity: 1; }
.bl-ch::before { content: ''; position: absolute; left: calc(-1.6rem - 4px); top: calc(50% - 3.5rem); width: 7px; height: 7px; transform: rotate(45deg); background: var(--surface); border: 1.5px solid var(--gold); transition: background .3s var(--ease); }
.bl-ch.on::before { background: var(--gold); }
.bl-ch-top { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.bl-ch-top .bl-pill { font-size: .64rem; letter-spacing: .06em; color: var(--gold-ink); background: var(--champagne-soft); border: 1px solid var(--champagne); border-radius: 100px; padding: .1rem .6rem; }
.bl-ch-title { font-family: var(--font-serif); font-size: 1.32rem; font-weight: 400; font-style: italic; color: var(--navy-mid); line-height: 1.25; margin-bottom: .6rem; }
.bl-ch p { font-size: .975rem; color: var(--ink-muted); line-height: 1.8; margin-bottom: .9rem; }
.bl-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .9rem; }
.bl-chip { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-ink); background: var(--champagne-soft); border: 1px solid var(--champagne); border-radius: 100px; padding: .14rem .65rem; }
.bl-chip::before { content: '+ '; color: var(--gold); }
.bl-link { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent-mid); text-underline-offset: 4px; transition: text-decoration-color .25s var(--ease); }
.bl-link:hover { text-decoration-color: var(--accent); }
.bl-inline { display: none; }

.bl-end { margin-top: 1.6rem; padding: 1.4rem 1.6rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.bl-end .bl-ch-title { margin-bottom: .4rem; }
.bl-end p { font-size: .975rem; color: var(--ink-muted); line-height: 1.8; margin-bottom: .6rem; }
.bl-end-links { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }

.bl-frame:focus-visible, .bl-node:focus-visible, .bl-link:focus-visible, .bl-inline:focus-visible, .bl-lb button:focus-visible { outline: 2px solid var(--navy-mid); outline-offset: 3px; }

/* lightbox */
.bl-lb { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; flex-direction: column; gap: .9rem; padding: 1rem; background: rgba(30,26,23,.86); }
.bl-lb.open { display: flex; }
.bl-lb img { max-width: min(94vw, 1400px); max-height: 78vh; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); background: var(--surface-2); }
.bl-lb-cap { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--champagne-soft); text-align: center; }
.bl-lb-btn { position: absolute; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 1px solid var(--rule-strong); background: var(--surface); color: var(--navy); box-shadow: var(--shadow-md); }
.bl-lb-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bl-lb-close { top: 1rem; right: 1rem; }
.bl-lb-prev { left: 1rem; top: 50%; margin-top: -22px; }
.bl-lb-next { right: 1rem; top: 50%; margin-top: -22px; }

@media (max-width: 720px) {
  .bl { display: block; }
  .bl-stage { display: none; }
  .bl-chapters { padding-left: 1.1rem; }
  .bl-ch { min-height: 0; opacity: 1; padding: 0 0 2.2rem; }
  .bl-ch::before { left: calc(-1.1rem - 4px); top: .35rem; background: var(--gold); }
  .bl-inline {
    display: block; width: 100%; padding: 0; margin-bottom: 1rem; cursor: zoom-in;
    aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2);
    border: 3px solid var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  }
  .bl-inline img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .bl-inline img[data-fit="contain"] { object-fit: contain; }
  .bl-inline img[data-pos="low"] { object-position: 50% 64%; }
  .bl-lb-prev { left: .5rem; } .bl-lb-next { right: .5rem; }
}
@media (max-width: 620px) { .bl-end { padding: 1.1rem 1.1rem; } }


/* BUILD LOG — milestones */
.bl-ms-section { margin-top: 3rem; }
.bl-ms { list-style: none; position: relative; margin-top: 1.4rem; padding-left: 1.6rem; border-left: 1px solid var(--rule-strong); }
.bl-ms-month { margin: 1.8rem 0 .8rem; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.bl-ms-month:first-child { margin-top: 0; }
.bl-ms-item { position: relative; display: grid; grid-template-columns: 8.5rem 1fr; gap: .2rem 1.2rem; padding: .7rem 0 .9rem; }
.bl-ms-item::before { content: ''; position: absolute; left: calc(-1.6rem - 4px); top: 1.15rem; width: 7px; height: 7px; transform: rotate(45deg); background: var(--surface); border: 1.5px solid var(--gold); }
.bl-ms-date { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); padding-top: .35rem; }
.bl-ms-t { font-family: var(--font-serif); font-size: 1.32rem; font-weight: 400; font-style: italic; color: var(--navy-mid); line-height: 1.25; margin-bottom: .25rem; }
.bl-ms-item p { font-size: .975rem; color: var(--ink-muted); line-height: 1.75; max-width: 62ch; }
@media (max-width: 600px) {
  .bl-ms-item { grid-template-columns: 1fr; }
  .bl-ms-date { padding-top: 0; }
}
