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

:root {
  --bg:          #f4f5f7;
  --surface:     #ffffff;
  --surface-2:   #eef0f4;
  --ink:         #111827;
  --ink-muted:   #4b5563;
  --ink-faint:   #9ca3af;
  --rule:        #d1d5db;
  --rule-strong: #9ca3af;
  --accent:      #17873a;
  --accent-dim:  #dcfce7;
  --accent-mid:  #bbf7d0;
  --navy:        #0f1f5c;
  --navy-mid:    #1e3a8a;
  --steel:       #2a5f80;
  --amber:       #d97706;
  --red:         #dc2626;

  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans:  'IBM Plex Sans', sans-serif;
  --font-mono:  'IBM Plex Mono', monospace;

  --nav-h: 52px;
  --tab-h: 44px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
}

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(244,245,247,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(244,245,247,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(30,58,138,0.12); }
  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(17,24,39,0.35);
  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: #e8f0f5; border-color: #b5ccd9; }
.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: #e8f0f5;
  border: 1px solid #b5ccd9; 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(17, 24, 39, 0.45);
  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: #e8f0f5; border: 1px solid #b5ccd9;
  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: #fde68a; background: #fffbeb; }

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

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