/* ── Variables ─────────────────────────────────── */
:root {
  --bg:           #ffffff;
  --bg2:          #f8f9fa;
  --bg3:          #eef0f4;
  --blue:         #334155;
  --blue-rgb:     51,65,85;
  --blue-light:   #64748b;
  --white:        #0f172a;
  --gray:         #64748b;
  --card-bg:      rgba(0,0,0,0.03);
  --card-border:  rgba(0,0,0,0.09);
  --menu-w:       170px;
  --radius:       14px;
}

/* ── Per-product accent colours ─────────────────── */
body[data-product="cms"]       { --blue: #2563eb; --blue-rgb: 37,99,235; }
body[data-product="banking"]   { --blue: #4f46e5; --blue-rgb: 79,70,229; }
body[data-product="infosys"]   { --blue: #7c3aed; --blue-rgb: 124,58,237; }
body[data-product="connector"] { --blue: #0f9981; --blue-rgb: 15,153,129; }

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

body {
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* ── Hub Page ───────────────────────────────────── */
body.hub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100dvh;
  overflow-y: auto;
  gap: 48px;
  padding: 60px 40px;
}

.hub-header { text-align: center; }
.hub-header h1 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.5px;
}
.hub-header p {
  color: var(--gray);
  margin-top: 8px;
  font-size: 15px;
}

/* ── Showroom Journey ───────────────────────────── */
.journey-section {
  width: 100%;
  max-width: 1160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  background: var(--bg2);
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  padding: 40px;
  margin-top: 16px;
}

.journey-label {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--white);
}

.journey-narrative {
  font-size: 12px;
  color: var(--gray);
  text-align: center;
  line-height: 2;
  max-width: 700px;
}

.journey-flow {
  display: flex;
  align-items: flex-start;
  gap: 0;
  width: 100%;
  justify-content: center;
}

.journey-connector {
  display: flex;
  align-items: center;
  padding-top: 28px;
  flex-shrink: 0;
}

.journey-arrow {
  font-size: 18px;
  color: var(--bg3);
  padding: 0 8px;
}

.journey-stop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  text-align: center;
  flex: 1;
  min-width: 0;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  background: var(--bg);
  position: relative;
}

.journey-stop--entry {
  background: var(--white);
  border-color: var(--white);
  flex: 0 0 auto;
  min-width: 88px;
}

.journey-stop--entry .journey-icon,
.journey-stop--entry .journey-stop-name {
  color: #fff;
}

.journey-icon {
  font-size: 22px;
  color: var(--gray);
  line-height: 1;
}

.journey-num {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--gray);
  font-variant-numeric: tabular-nums;
}

.journey-stop-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: var(--white);
  white-space: nowrap;
}

.journey-stop--entry .journey-stop-name {
  color: var(--gray);
  font-size: 12px;
}

.journey-stop-q {
  font-size: 11px;
  line-height: 1.7;
  color: var(--gray);
}

/* ── Hub Cards ──────────────────────────────────── */
.hub-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 1160px;
}

/* Hub section divider */
.hub-divider {
  width: 100%;
  max-width: 1160px;
  height: 1px;
  background: var(--card-border);
  border: none;
  margin: 8px 0;
}

/* Hub card — per-product accent via top border */
.card[href="/cms/"]       { --card-accent: #2563eb; --card-accent-rgb: 37,99,235; }
.card[href="/banking/"]   { --card-accent: #4f46e5; --card-accent-rgb: 79,70,229; }
.card[href="/infosys/"]   { --card-accent: #7c3aed; --card-accent-rgb: 124,58,237; }
.card[href="/connector/"] { --card-accent: #0f9981; --card-accent-rgb: 15,153,129; }

.card {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-top: 3px solid var(--card-accent, var(--card-border));
  border-radius: var(--radius);
  padding: 32px 28px;
  text-decoration: none;
  color: var(--white);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.10);
  transform: translateY(-4px);
}
.card--planned { cursor: default; }
.card--planned:hover { transform: none; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.card-en   { color: var(--card-accent, var(--blue)); font-weight: 700; font-size: 16px; }
.card-kr   { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.card-desc { color: var(--gray); font-size: 13px; line-height: 1.75; flex: 1; margin-top: 4px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.card-tags span {
  background: rgba(var(--card-accent-rgb, 51,65,85), 0.08);
  border: 1px solid rgba(var(--card-accent-rgb, 51,65,85), 0.18);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--card-accent, var(--blue));
}

/* ── Showroom Page Layout ───────────────────────── */
body.sr-page {
  display: grid;
  grid-template-columns: var(--menu-w) 1fr;
  grid-template-rows: 100dvh;
  height: 100dvh;
  overflow: hidden;
  position: relative;
}

/* ── Top Controls (lang + back) ─────────────────── */
.top-controls {
  position: fixed;
  top: 16px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 100;
}

.back-btn {
  color: var(--gray);
  text-decoration: none;
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  transition: color 0.2s, border-color 0.2s;
}
.back-btn:hover { color: var(--white); border-color: var(--gray); }

.lang-switch {
  display: flex;
  background: var(--bg3);
  border-radius: 20px;
  overflow: hidden;
}
.lang-switch button {
  background: none;
  border: none;
  color: var(--gray);
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-switch button.active {
  background: var(--blue);
  color: #fff;
  border-radius: 20px;
}

/* ── Left Menu ──────────────────────────────────── */
.left-menu {
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  border-right: 1px solid var(--card-border);
  gap: 2px;
}

.menu-logo {
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 12px;
}
.menu-logo .logo-en  { color: var(--blue); font-weight: 700; font-size: 13px; }
.menu-logo .logo-kr  { font-size: 15px; font-weight: 700; margin-top: 4px; }

/* Connector category switcher */
.conn-cat-tabs {
  display: flex;
  gap: 4px;
  margin-top: 14px;
}
.conn-cat-btn {
  flex: 1;
  background: var(--bg3);
  border: none;
  border-radius: 8px;
  color: var(--gray);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  padding: 6px 4px;
  cursor: pointer;
  transition: all 0.18s;
}
.conn-cat-btn.active {
  background: var(--blue);
  color: #fff;
}

/* Connector menu group */
.conn-menu-group {
  display: contents;
}

/* Menu item count badge */
.menu-cnt {
  font-size: 11px;
  font-weight: 500;
  color: var(--blue);
  margin-left: 4px;
  opacity: 0.75;
}

/* Menu item sub-label (세계금융기관 등) */
.menu-sub {
  display: block;
  font-size: 10px;
  color: var(--gray);
  font-weight: 400;
  margin-top: 2px;
  opacity: 0.8;
}

.left-menu button {
  background: none;
  border: none;
  border-left: 3px solid transparent;
  color: var(--gray);
  padding: 13px 20px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
  width: 100%;
}
.left-menu button:hover { color: var(--white); background: rgba(15,23,42,0.04); }
.left-menu button.active {
  color: var(--blue);
  background: rgba(var(--blue-rgb),0.07);
  border-left-color: var(--blue);
  font-weight: 600;
}

/* ── Section Content ────────────────────────────── */
.section {
  display: none;
  height: 100dvh;
  overflow-y: auto;
  padding: 60px 64px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
}
.section.active { display: flex; }

/* Main section — hero */
.section-main {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}
.main-en   { color: var(--blue); font-size: 18px; font-weight: 700; }
.main-kr   { font-size: clamp(28px, 4vw, 48px); font-weight: 900; letter-spacing: -1px; }
.main-desc { color: var(--gray); font-size: 16px; line-height: 1.8; max-width: 480px; margin-top: 8px; }
.main-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px; }
.main-tags span {
  background: rgba(var(--blue-rgb),0.08);
  border: 1px solid rgba(var(--blue-rgb),0.20);
  border-radius: 20px;
  padding: 6px 16px;
  color: var(--blue);
  font-size: 13px;
}

/* Main section — dashboard variant */
.section-main--db {
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  gap: 0;
}
.main-dashboard {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.main-header { text-align: center; }
.main-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.main-stat-card {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.main-stat-card strong {
  display: block;
  font-size: 34px;
  font-weight: 900;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 8px;
}
.main-stat-card p { font-size: 12px; color: var(--gray); }

.main-content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}

.panel-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

/* Breakdown panel */
.breakdown-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.breakdown-card {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 14px 18px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.breakdown-card:hover {
  border-color: rgba(var(--blue-rgb),0.40);
  box-shadow: 0 3px 10px rgba(var(--blue-rgb),0.10);
}
.bc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.bc-name { font-size: 14px; font-weight: 600; color: var(--white); }
.bc-nums { display: flex; align-items: baseline; gap: 8px; }
.bc-count { font-size: 22px; font-weight: 900; color: var(--blue); }
.bc-pct { font-size: 12px; color: var(--gray); }
.bc-bar {
  height: 4px;
  background: rgba(15,23,42,0.08);
  border-radius: 2px;
  margin-bottom: 8px;
  overflow: hidden;
}
.bc-bar-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 2px;
  transition: width 0.6s ease;
}
.bc-sub { display: flex; gap: 14px; }
.bc-sub-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--gray); }
.bc-sub-item strong { color: var(--white); font-weight: 600; }

/* Side panel */
.side-panel { display: flex; flex-direction: column; gap: 14px; }
.trend-panel,
.recent-panel {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* Trend chart */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 80px;
}
.chart-bar-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
  height: 100%;
}
.chart-bar-fill {
  width: 100%;
  background: rgba(var(--blue-rgb),0.15);
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: height 0.6s ease;
}
.chart-bar-wrap.current .chart-bar-fill { background: var(--blue); }
.chart-labels {
  display: flex;
  gap: 3px;
  margin-top: 6px;
}
.chart-label {
  flex: 1;
  font-size: 9px;
  color: var(--gray);
  text-align: center;
}

/* Recent list */
.recent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(15,23,42,0.06);
}
.recent-row:last-child { border-bottom: none; }
.recent-name { font-size: 13px; color: var(--white); flex: 1; }
.recent-meta { display: flex; align-items: center; gap: 8px; }
.recent-date { font-size: 12px; color: var(--gray); }

/* ── Concept Diagram ────────────────────────────── */
.concept-diagram {
  width: 100%;
  background: rgba(var(--blue-rgb),0.04);
  border: 1px solid rgba(var(--blue-rgb),0.14);
  border-radius: var(--radius);
  padding: 26px 36px 30px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.cd-headline {
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
  text-align: center;
  line-height: 1.45;
}
.cd-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.cd-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.cd-side-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.cd-pills {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.cd-pill {
  padding: 7px 18px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
}
.c-blue   { background: rgba(37,99,235,0.10);  border: 1px solid rgba(37,99,235,0.25);  color: #1d4ed8; }
.c-purple { background: rgba(124,58,237,0.10); border: 1px solid rgba(124,58,237,0.25); color: #7c3aed; }
.c-green  { background: rgba(22,163,74,0.10);  border: 1px solid rgba(22,163,74,0.25);  color: #16a34a; }
.c-teal   { background: rgba(15,153,129,0.10); border: 1px solid rgba(15,153,129,0.25); color: #0f9981; }
.c-orange { background: rgba(234,88,12,0.10);  border: 1px solid rgba(234,88,12,0.25);  color: #ea580c; }

/* Arrow connectors */
.cd-connector {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0 6px;
}
.cd-conn-line {
  width: 52px;
  height: 1.5px;
  background: linear-gradient(90deg, rgba(var(--blue-rgb),0.15), rgba(var(--blue-rgb),0.45));
}
.cd-conn-arrow {
  width: 0; height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid rgba(var(--blue-rgb),0.45);
  flex-shrink: 0;
}
.cd-connector.cd-bi .cd-conn-arrow:first-child {
  border-left: none;
  border-right: 8px solid rgba(var(--blue-rgb),0.45);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

/* Central AI node */
.cd-core {
  flex-shrink: 0;
  background: linear-gradient(140deg, rgba(var(--blue-rgb),0.10), rgba(var(--blue-rgb),0.03));
  border: 1.5px solid rgba(var(--blue-rgb),0.30);
  border-radius: 18px;
  padding: 18px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 24px rgba(var(--blue-rgb),0.12), inset 0 1px 0 rgba(255,255,255,0.9);
  min-width: 175px;
  text-align: center;
}
.cd-core-icon {
  width: 46px; height: 46px;
  background: rgba(var(--blue-rgb),0.12);
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  box-shadow: 0 4px 16px rgba(var(--blue-rgb),0.15);
}
.cd-core-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.2px;
}
.cd-core-sub {
  font-size: 11px;
  color: var(--blue);
  font-weight: 600;
}

/* ── Customers section ──────────────────────────── */
.section-customers {
  gap: 20px;
  justify-content: flex-start;
  align-items: stretch;
}

/* Stat row in customers section */
.cust-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.cust-stat-card {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.cust-stat-card strong {
  display: block;
  font-size: 30px;
  font-weight: 900;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 6px;
}
.cust-stat-card p { font-size: 12px; color: var(--gray); }

.count-row {
  display: flex;
  gap: 24px;
}
.count-box {
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px 28px;
  min-width: 160px;
}
.count-box strong { font-size: 36px; font-weight: 900; color: var(--blue); }
.count-box p      { font-size: 13px; color: var(--gray); margin-top: 4px; }

.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.category-tabs button {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  color: var(--gray);
  padding: 6px 16px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.category-tabs button:hover {
  border-color: rgba(var(--blue-rgb),0.35);
  color: var(--blue);
}
.category-tabs button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 600;
}

.customer-table-wrap { width: 100%; max-width: 640px; }
.customer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.customer-table th {
  text-align: left;
  color: var(--gray);
  font-weight: 500;
  padding: 10px 12px;
  border-bottom: 1px solid var(--card-border);
}
.customer-table td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(15,23,42,0.06);
}
.customer-table tr:hover td { background: rgba(var(--blue-rgb),0.03); }
.new-badge {
  font-size: 10px;
  background: var(--blue);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.paging {
  display: flex;
  gap: 4px;
  margin-top: 16px;
}
.paging button {
  background: var(--bg);
  border: 1px solid var(--card-border);
  color: var(--gray);
  width: 32px; height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  transition: all 0.2s;
}
.paging button.active,
.paging button:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── Demo section ───────────────────────────────── */
.section-demo {
  align-items: center;
  justify-content: center;
}
.demo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--gray);
}
.demo-placeholder svg { opacity: 0.3; }
.demo-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius);
}

/* ── Tech Panel ─────────────────────────────────── */
.tech-toggle {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px 0 0 8px;
  padding: 16px 10px;
  cursor: pointer;
  z-index: 210;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.05em;
  writing-mode: vertical-rl;
  transition: right 0.35s cubic-bezier(0.4,0,0.2,1), background 0.2s;
  box-shadow: -2px 0 12px rgba(0,0,0,0.12);
}
.tech-toggle:hover { filter: brightness(1.1); }
.tech-toggle.open  { right: 400px; }

.tech-panel {
  position: fixed;
  right: 0;
  top: 0;
  height: 100dvh;
  width: 400px;
  background: #fff;
  border-left: 1px solid var(--card-border);
  box-shadow: -6px 0 32px rgba(0,0,0,0.10);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tech-panel.open { transform: translateX(0); }

.tp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--card-border);
  flex-shrink: 0;
}
.tp-header-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.3px;
}
.tp-header-sub {
  font-size: 11px;
  color: var(--gray);
  margin-top: 2px;
}
.tp-close {
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  font-size: 18px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.tp-close:hover { color: var(--white); background: var(--bg3); }

.tp-body {
  overflow-y: auto;
  padding: 20px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tp-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.tp-section-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 13px;
  background: var(--blue);
  border-radius: 2px;
}

.tp-row {
  display: flex;
  font-size: 13px;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(15,23,42,0.05);
}
.tp-row:last-child { border-bottom: none; }
.tp-label { color: var(--gray); min-width: 80px; flex-shrink: 0; }
.tp-value { color: var(--white); font-weight: 500; word-break: break-all; }
.tp-value code {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  background: var(--bg3);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--blue);
}

.tp-endpoints { display: flex; flex-direction: column; gap: 7px; }
.tp-endpoint  { display: flex; align-items: baseline; gap: 9px; font-size: 13px; }
.tp-method {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  min-width: 42px;
  text-align: center;
  flex-shrink: 0;
}
.tp-method.get  { background: rgba(22,163,74,0.12);  color: #16a34a; }
.tp-method.post { background: rgba(37,99,235,0.12);  color: #2563eb; }
.tp-method.ws   { background: rgba(124,58,237,0.12); color: #7c3aed; }
.tp-path {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--white);
  flex-shrink: 0;
}
.tp-path-desc { font-size: 12px; color: var(--gray); }

.tp-code {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}
.tp-code .c-green  { color: #86efac; }
.tp-code .c-yellow { color: #fde68a; }
.tp-code .c-gray   { color: #94a3b8; }

.tp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tp-tag {
  background: rgba(var(--blue-rgb),0.08);
  border: 1px solid rgba(var(--blue-rgb),0.18);
  color: var(--blue);
  border-radius: 14px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
}

/* ── Video section ──────────────────────────────── */
.section-video {
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.section-video video {
  max-width: 100%;
  max-height: 80dvh;
  border-radius: var(--radius);
}
.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--gray);
}
.video-placeholder svg { opacity: 0.3; }

/* ── Connector institution grid sections ────────── */
.conn-inst-section {
  padding: 28px 32px;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}
.conn-sect-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.conn-sect-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
}
.conn-sect-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  background: rgba(var(--blue-rgb), 0.1);
  border-radius: 20px;
  padding: 3px 12px;
}
.conn-inst-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}
.conn-inst-chip {
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  color: var(--white);
}
.conn-region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.conn-region-card {
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 16px 18px;
}
.conn-region-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--white);
}
.conn-region-cnt {
  font-size: 28px;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
}
.conn-region-unit {
  font-size: 12px;
  color: var(--gray);
  margin-left: 3px;
  font-weight: 500;
}
.conn-region-examples {
  font-size: 11px;
  color: var(--gray);
  margin-top: 8px;
  line-height: 1.7;
}
.conn-erp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.conn-erp-chip {
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.conn-erp-name { font-size: 13px; font-weight: 700; color: var(--white); }
.conn-erp-type { font-size: 11px; color: var(--gray); }

/* ── Sitemap connector branches ─────────────────── */
.sm-conn-branches {
  display: flex;
  gap: 6px;
  padding: 2px 0;
}
.sm-conn-branch {
  flex: 1;
  background: rgba(var(--pa-rgb, 51,65,85), 0.04);
  border: 1px solid rgba(var(--pa-rgb, 51,65,85), 0.14);
  border-radius: 8px;
  padding: 7px 9px;
}
.sm-branch-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--pa, #334155);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
  opacity: 0.85;
}

/* ── Sitemap / Page Structure ───────────────────── */
.sitemap-section {
  width: 100%;
  max-width: 1160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.sitemap-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--white);
}
.sitemap-sub {
  font-size: 13px;
  color: var(--gray);
  margin-top: -12px;
}

.sitemap-flow {
  display: flex;
  align-items: flex-start;
  gap: 0;
  width: 100%;
}

.sm-col--hub {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  padding-top: 8px;
}

.sm-arrow-right {
  font-size: 22px;
  color: var(--gray);
  padding: 0 16px;
  padding-top: 22px;
  flex-shrink: 0;
}

.sm-col--products {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* Hub node */
.sm-node--hub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--white);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px 22px;
  text-decoration: none;
  min-width: 110px;
  text-align: center;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 16px rgba(15,23,42,0.18);
}
.sm-node--hub:hover { opacity: 0.88; transform: translateY(-2px); }
.sm-node--hub .sm-node-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
}
.sm-node--hub .sm-node-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

/* Product block */
.sm-product {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.sm-node--product {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--pa, #334155);
  color: #fff;
  border-radius: var(--radius);
  padding: 14px 12px;
  text-decoration: none;
  width: 100%;
  text-align: center;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 12px rgba(var(--pa-rgb, 51,65,85), 0.25);
}
.sm-node--product:hover { opacity: 0.88; transform: translateY(-2px); }
.sm-node-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255,255,255,0.2);
  padding: 2px 8px;
  border-radius: 10px;
}
.sm-node--product .sm-node-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  opacity: 0.92;
}

.sm-arrow-down {
  font-size: 16px;
  color: var(--pa, var(--gray));
  opacity: 0.5;
  padding: 4px 0;
}

/* Section chips */
.sm-sections {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}
.sm-section {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--pa, #334155);
  background: rgba(var(--pa-rgb, 51,65,85), 0.07);
  border: 1px solid rgba(var(--pa-rgb, 51,65,85), 0.18);
  border-radius: 8px;
  padding: 6px 8px;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}
.sm-section:hover {
  background: rgba(var(--pa-rgb, 51,65,85), 0.14);
  transform: translateX(2px);
}
.sm-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 2px 0 2px 10px;
}
.sm-cat {
  font-size: 10px;
  font-weight: 500;
  color: var(--pa, #334155);
  background: rgba(var(--pa-rgb, 51,65,85), 0.04);
  border: 1px solid rgba(var(--pa-rgb, 51,65,85), 0.12);
  border-radius: 6px;
  padding: 3px 7px;
  white-space: nowrap;
}
/* Planned (no-link) product nodes */
.sm-product--planned {
  grid-column: span 2;
}
.sm-node--planned {
  cursor: default;
  pointer-events: none;
}
/* Common section indicator */
.sm-common-tag {
  display: inline-block;
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  background: rgba(100,116,139,0.15);
  color: var(--gray);
  border-radius: 4px;
  padding: 1px 4px;
  margin-left: 4px;
  vertical-align: middle;
  letter-spacing: 0;
}

/* ── Hub Docs Section ───────────────────────────── */
.hub-docs {
  width: 100%;
  max-width: 1160px;
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  margin-bottom: 60px;
}

.docs-tabs {
  display: flex;
  border-bottom: 1px solid var(--card-border);
  background: var(--bg2);
  overflow-x: auto;
}
.docs-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--gray);
  padding: 14px 22px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -1px;
}
.docs-tab-btn:hover { color: var(--white); }
.docs-tab-btn.active {
  color: var(--white);
  border-bottom-color: #334155;
  font-weight: 700;
  background: var(--bg);
}

.docs-panel {
  display: none;
  padding: 32px 40px 40px;
  flex-direction: column;
  gap: 32px;
}
.docs-panel.active { display: flex; }

.docs-h2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.docs-h2::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  background: #334155;
  border-radius: 2px;
  flex-shrink: 0;
}

.docs-code {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  line-height: 1.75;
  overflow-x: auto;
  white-space: pre;
}
.docs-code .c-green  { color: #86efac; }
.docs-code .c-yellow { color: #fde68a; }
.docs-code .c-gray   { color: #94a3b8; }
.docs-code .c-blue   { color: #93c5fd; }
.docs-code .c-purple { color: #c4b5fd; }

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.docs-table th {
  background: var(--bg2);
  color: var(--gray);
  font-weight: 600;
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
  font-size: 12px;
}
.docs-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(15,23,42,0.06);
  vertical-align: top;
  line-height: 1.6;
}
.docs-table td code {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  background: var(--bg3);
  padding: 1px 6px;
  border-radius: 4px;
  color: #334155;
}
.docs-table tr:last-child td { border-bottom: none; }
.docs-table tr:hover td { background: var(--bg2); }

.docs-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  min-width: 40px;
  text-align: center;
}
.docs-badge.get  { background: rgba(22,163,74,0.12);  color: #16a34a; }
.docs-badge.post { background: rgba(37,99,235,0.12);  color: #2563eb; }

.docs-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.docs-info-card {
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 16px 20px;
}
.docs-info-card-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
}
.docs-info-row {
  display: flex;
  gap: 10px;
  font-size: 13px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(15,23,42,0.05);
}
.docs-info-row:last-child { border-bottom: none; }
.docs-info-label { color: var(--gray); min-width: 88px; flex-shrink: 0; font-size: 12px; }
.docs-info-value { color: var(--white); font-weight: 500; }
.docs-info-value code {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  background: var(--bg3);
  padding: 1px 6px;
  border-radius: 4px;
  color: #334155;
}

.docs-note {
  background: rgba(37,99,235,0.06);
  border: 1px solid rgba(37,99,235,0.18);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #1e40af;
  line-height: 1.6;
}
.docs-note strong { font-weight: 700; }

.docs-warn {
  background: rgba(234,88,12,0.06);
  border: 1px solid rgba(234,88,12,0.22);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #9a3412;
  line-height: 1.6;
}
.docs-warn strong { font-weight: 700; }
