/* ============================================================
   Enterprise Architecture Demonstrator — Design System
   Vivid blue accent · Light/Dark themes · Responsive
   ============================================================ */

:root {
  --accent: #1f6bff;
  --accent-2: #4d8bff;
  --accent-3: #0a4bd6;
  --accent-soft: rgba(31, 107, 255, 0.12);
  --accent-glow: rgba(31, 107, 255, 0.35);
  --ok: #17c98a;
  --warn: #f5a623;
  --err: #ff5470;
  --purple: #8b5cf6;
  --teal: #06b6d4;
  --radius: 14px;
  --radius-sm: 9px;
  --font-sans: 'Inter', 'Noto Sans JP', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --sidebar-w: 268px;
  --header-h: 62px;
  --tr: 0.22s cubic-bezier(.4,0,.2,1);
}

/* ---------- Dark theme (default) ---------- */
[data-theme="dark"] {
  --bg: #070b16;
  --bg-2: #0b1223;
  --panel: #0f172c;
  --panel-2: #131c34;
  --panel-3: #18233f;
  --border: rgba(120,150,220,0.14);
  --border-strong: rgba(120,150,220,0.28);
  --text: #e8eefc;
  --text-2: #9fb0d4;
  --text-3: #63769c;
  --shadow: 0 18px 50px -20px rgba(0,0,0,0.7);
  --grid: rgba(120,150,220,0.06);
}

/* ---------- Light theme ---------- */
[data-theme="light"] {
  --bg: #eef2fa;
  --bg-2: #e4eaf5;
  --panel: #ffffff;
  --panel-2: #f6f9ff;
  --panel-3: #eef3fd;
  --border: rgba(30,60,120,0.12);
  --border-strong: rgba(30,60,120,0.22);
  --text: #0d1a33;
  --text-2: #4a5b7a;
  --text-3: #8493ad;
  --shadow: 0 16px 40px -22px rgba(30,60,120,0.35);
  --grid: rgba(30,60,120,0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background var(--tr), color var(--tr);
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 600px at 82% -8%, var(--accent-soft), transparent 60%),
    radial-gradient(700px 500px at 5% 100%, rgba(139,92,246,0.08), transparent 55%);
  pointer-events: none;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 46px 46px; pointer-events: none;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-glow); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================================
   LAYOUT
   ============================================================ */
.layout { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--border); padding: 22px 14px 18px;
  display: flex; flex-direction: column; gap: 6px; z-index: 40;
}
.brand { display: flex; align-items: flex-start; gap: 11px; padding: 2px 8px 16px; }
.brand-logo {
  width: 40px; height: 40px; flex-shrink: 0; margin-top: -11px;
  background: transparent; border: none; box-shadow: none;
  display: grid; place-items: center;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-txt { display: flex; flex-direction: column; }
.brand-txt b { display: block; font-size: 14.5px; font-weight: 800; letter-spacing: .2px; line-height: 1.25; }
.brand-txt span { font-size: 9px; color: var(--text-3); letter-spacing: .2px; text-transform: uppercase; white-space: nowrap; }

.nav-group-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-3); padding: 14px 12px 6px; font-weight: 700;
}
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius-sm); color: var(--text-2); cursor: pointer;
  font-size: 13.5px; font-weight: 500; transition: var(--tr); position: relative;
  border: 1px solid transparent;
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; }
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active {
  background: var(--accent-soft); color: var(--accent-2);
  border-color: var(--border-strong); font-weight: 600;
}
.nav-item.active::before {
  content: ""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; background: var(--accent); border-radius: 0 3px 3px 0;
}
.nav-badge {
  margin-left: auto; font-size: 9.5px; padding: 2px 7px; border-radius: 20px;
  background: var(--accent); color: #fff; font-weight: 700; letter-spacing: .3px;
}
.nav-badge.badge-si {
  background: color-mix(in srgb, var(--text-3) 22%, transparent);
  color: var(--text-2);
}
.sidebar-foot { margin-top: auto; padding: 14px 10px 4px; font-size: 10.5px; color: var(--text-3); border-top: 1px solid var(--border); }
.sidebar-foot .conf { color: var(--warn); font-weight: 700; }

/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; height: var(--header-h); z-index: 30;
  display: flex; align-items: center; gap: 14px; padding: 0 22px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 20px; cursor: pointer; }
.breadcrumb { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.breadcrumb b { color: var(--text); font-weight: 700; }
.topbar-spacer { flex: 1; }
.env-pill {
  display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600;
  padding: 6px 12px; border-radius: 20px; background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text-2);
}
.env-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.toggle-btn {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text-2); font-size: 12px; font-weight: 600; cursor: pointer; transition: var(--tr);
  font-family: var(--font-sans);
}
.toggle-btn:hover { border-color: var(--accent); color: var(--accent-2); }
.toggle-btn i { font-size: 13px; }

.content { padding: 26px 28px 60px; max-width: 1500px; width: 100%; margin: 0 auto; animation: fadeUp .4s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================
   COMMON COMPONENTS
   ============================================================ */
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 25px; font-weight: 800; letter-spacing: -.3px; display: flex; align-items: center; gap: 12px; }
.page-head h1 .ph-ico {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-2); font-size: 17px;
}
.page-head p { color: var(--text-2); font-size: 13.5px; margin-top: 8px; max-width: 900px; }
.page-head .kicker { color: var(--accent-2); font-weight: 700; font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 6px; }

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); transition: var(--tr);
}
.card:hover { border-color: var(--border-strong); }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.card-title i { color: var(--accent-2); }
.card-title .sub { margin-left: auto; font-size: 11px; color: var(--text-3); font-weight: 500; }

/* Chart container — fixed height prevents Chart.js infinite-growth bug */
.chart-box { position: relative; height: 240px; width: 100%; }
.chart-box canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; }
.pill.blue { background: var(--accent-soft); color: var(--accent-2); }
.pill.ok { background: rgba(23,201,138,.14); color: var(--ok); }
.pill.warn { background: rgba(245,166,35,.14); color: var(--warn); }
.pill.err { background: rgba(255,84,112,.14); color: var(--err); }
.pill.grey { background: var(--panel-3); color: var(--text-3); }
.pill.purple { background: rgba(139,92,246,.14); color: var(--purple); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 13px; cursor: pointer;
  border: none; transition: var(--tr); font-family: var(--font-sans);
}
.btn:hover { background: var(--accent-3); box-shadow: 0 8px 20px -8px var(--accent-glow); }
.btn.ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent-2); box-shadow: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }

/* KPI cards */
.kpi { position: relative; overflow: hidden; }
.kpi .kpi-ico { position: absolute; right: 14px; top: 14px; font-size: 30px; opacity: .12; color: var(--accent); }
.kpi .kpi-label { font-size: 11.5px; color: var(--text-3); font-weight: 600; letter-spacing: .3px; text-transform: uppercase; }
.kpi .kpi-val { font-size: 30px; font-weight: 800; margin: 6px 0 4px; letter-spacing: -.5px; }
.kpi .kpi-val small { font-size: 15px; color: var(--text-2); font-weight: 600; }
.kpi .kpi-delta { font-size: 11.5px; font-weight: 600; }
.kpi .kpi-delta.up { color: var(--ok); }
.kpi .kpi-delta.down { color: var(--err); }
.kpi .kpi-note { font-size: 11.5px; font-weight: 600; color: var(--text-2); line-height: 1.4; }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th {
  text-align: left; padding: 11px 12px; color: var(--text-3); font-weight: 700;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--panel);
}
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: top; }
.tbl tr:hover td { background: var(--panel-2); }
.tbl td b, .tbl td strong { color: var(--text); font-weight: 600; }
.tbl-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }

/* Coverage marks (◎○△−) */
.cov { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 12px; font-weight: 800; }
.cov.core { background: rgba(23,201,138,.16); color: var(--ok); border: 2px solid var(--ok); }
.cov.yes { background: rgba(31,107,255,.14); color: var(--accent-2); border: 2px solid var(--accent-2); }
.cov.partial { background: rgba(245,166,35,.14); color: var(--warn); border: 2px solid var(--warn); }
.cov.no { background: var(--panel-3); color: var(--text-3); border: 2px solid var(--text-3); }

/* section title */
.sec-title { font-size: 15px; font-weight: 800; margin: 28px 0 14px; display: flex; align-items: center; gap: 10px; }
.sec-title .bar { width: 4px; height: 18px; background: var(--accent); border-radius: 3px; }
.muted { color: var(--text-3); }
.mono { font-family: var(--font-mono); }

/* ============================================================
   ARCHITECTURE DIAGRAM
   ============================================================ */
.arch-stack { display: flex; flex-direction: column; gap: 0; position: relative; }
.arch-layer {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 34px;
  position: relative; background: linear-gradient(180deg, var(--panel), var(--panel-2)); transition: var(--tr);
}
.arch-layer:last-child { margin-bottom: 0; }
.arch-layer::after {
  content: "\f063"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; left: 50%; bottom: -28px; transform: translateX(-50%);
  color: var(--accent); font-size: 15px; opacity: .8;
}
.arch-layer:last-child::after { display: none; }
.arch-layer.hl { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-glow), var(--shadow); }
.layer-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.layer-tag { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--accent-2); background: var(--accent-soft); padding: 4px 10px; border-radius: 6px; }
.layer-head h3 { font-size: 15px; font-weight: 800; }
.layer-head .layer-owner { margin-left: auto; font-size: 11px; color: var(--text-3); }
.block-row { display: flex; gap: 10px; flex-wrap: wrap; }
.arch-block {
  flex: 1; min-width: 150px; background: var(--panel-3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 13px; transition: var(--tr); cursor: default;
}
.arch-block:hover { border-color: var(--accent); transform: translateY(-2px); }
.arch-block.accent { background: linear-gradient(135deg, var(--accent), var(--accent-3)); color: #fff; border: none; }
.arch-block.accent .ab-desc { color: rgba(255,255,255,.85); }
.arch-block .ab-tag { font-size: 9px; font-weight: 700; letter-spacing: .5px; opacity: .7; text-transform: uppercase; }
.arch-block .ab-name { font-size: 13px; font-weight: 700; margin: 3px 0; }
.arch-block .ab-desc { font-size: 11px; color: var(--text-3); line-height: 1.4; }

/* ============================================================
   TERMINAL
   ============================================================ */
.terminal {
  background: #060a14; border: 1px solid var(--border-strong); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 12.5px; overflow: hidden; box-shadow: var(--shadow);
}
.term-bar { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: #0b1120; border-bottom: 1px solid var(--border); }
.term-dot { width: 11px; height: 11px; border-radius: 50%; }
.term-dot.r { background: #ff5f56; } .term-dot.y { background: #ffbd2e; } .term-dot.g { background: #27c93f; }
.term-title { margin-left: 10px; font-size: 11px; color: #7b8ba8; }
.term-actions { margin-left: auto; display: flex; gap: 8px; }
.term-body { padding: 14px 16px; height: 340px; overflow-y: auto; line-height: 1.7; color: #c9d6ee; }
.term-body .l { white-space: pre-wrap; word-break: break-word; }
.t-prompt { color: var(--accent-2); }
.t-cmd { color: #e8eefc; font-weight: 500; }
.t-ok { color: #17c98a; } .t-warn { color: #f5a623; } .t-err { color: #ff5470; }
.t-info { color: #63a4ff; } .t-dim { color: #63769c; } .t-hash { color: #8b5cf6; }
.t-cursor { display: inline-block; width: 8px; height: 15px; background: var(--accent-2); vertical-align: middle; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* flow / process visualization */
.flow { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 6px 2px 12px; }
.flow-step {
  min-width: 150px; flex: 1; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 13px; position: relative; transition: var(--tr);
}
.flow-step:not(:last-child) { margin-right: 30px; }
.flow-step:not(:last-child)::after {
  content: "\f061"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; right: -22px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 13px;
}
.flow-step.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent-glow); }
.flow-step.done { border-color: var(--ok); }
.flow-step .fs-num { font-size: 10px; color: var(--text-3); font-weight: 700; }
.flow-step .fs-name { font-size: 12.5px; font-weight: 700; margin: 4px 0; }
.flow-step .fs-owner { font-size: 10.5px; color: var(--text-3); }
.flow-step .fs-ico { position: absolute; right: 12px; top: 12px; font-size: 13px; color: var(--accent-2); }

/* product cards */
.prod-card { display: flex; flex-direction: column; gap: 10px; }
.prod-head { display: flex; align-items: center; gap: 12px; }
.prod-logo { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; color: #fff; flex-shrink: 0; }
.prod-head h3 { font-size: 16px; font-weight: 800; }
.prod-head .prod-sub { font-size: 11px; color: var(--text-3); }

/* ---- Product technical validation (prodeval) ---- */
.prodeval-card { display: flex; flex-direction: column; }
.pe-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.pe-col { border-radius: var(--radius-sm); padding: 10px 11px; }
.pe-col.pe-owns { background: color-mix(in srgb, var(--ok) 9%, transparent); }
.pe-col.pe-notowns { background: color-mix(in srgb, var(--text-3) 10%, transparent); }
.pe-col-lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.pe-owns .pe-col-lbl { color: var(--ok); }
.pe-notowns .pe-col-lbl { color: var(--text-3); }
.pe-col ul, .pe-poc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.pe-col li, .pe-poc li { font-size: 11.5px; line-height: 1.45; color: var(--text-2); padding-left: 13px; position: relative; }
.pe-col li::before, .pe-poc li::before { content: ""; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .5; }
.pe-poc { border-radius: var(--radius-sm); padding: 10px 11px; background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid var(--border); }
.pe-poc .pe-col-lbl { color: var(--accent-2); }
.pe-poc li { color: var(--text); }
@media (max-width: 720px) { .pe-cols { grid-template-columns: 1fr; } }

.spec-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.spec-row:last-child { border-bottom: none; }
.spec-row .sk { color: var(--text-3); font-weight: 600; flex-shrink: 0; }
.spec-row .sv { color: var(--text); text-align: right; }

/* progress bar */
.bar-track { height: 7px; background: var(--panel-3); border-radius: 20px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 1s ease; }

/* code block */
.code {
  background: #060a14; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 12px; line-height: 1.65; overflow-x: auto;
  padding: 14px 16px; color: #c9d6ee; position: relative;
}
.code .cm { color: #63769c; } .code .kw { color: #ff8bd0; } .code .st { color: #7ee787; }
.code .fn { color: #79c0ff; } .code .nm { color: #ffab70; } .code .ty { color: #8b5cf6; }
.code-head { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-3); margin-bottom: 8px; font-family: var(--font-mono); }
.code-copy { margin-left: auto; cursor: pointer; color: var(--text-3); font-size: 11px; }
.code-copy:hover { color: var(--accent-2); }

/* tabs */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.tab {
  padding: 9px 16px; font-size: 12.5px; font-weight: 600; color: var(--text-3); cursor: pointer;
  border-bottom: 2px solid transparent; transition: var(--tr); white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent-2); border-bottom-color: var(--accent); }

/* toast */
.toast-wrap { position: fixed; bottom: 22px; right: 22px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--panel); border: 1px solid var(--border-strong); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 12px 16px; font-size: 12.5px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px; animation: slideIn .3s ease; max-width: 340px;
}
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* stat inline */
.inline-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.inline-stat b { display: block; font-size: 20px; font-weight: 800; }
.inline-stat span { font-size: 11px; color: var(--text-3); }

/* node visual */
.node-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 12px; }
.node {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; text-align: center; transition: var(--tr); position: relative;
}
.node .node-ico { font-size: 20px; color: var(--accent-2); }
.node .node-name { font-size: 11.5px; font-weight: 700; margin-top: 6px; }
.node .node-role { font-size: 9.5px; color: var(--text-3); }
.node.leader { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-glow); }
.node .node-status { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); }

.divider { height: 1px; background: var(--border); margin: 22px 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }

/* callout */
.callout {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--accent-soft); border: 1px solid var(--border-strong); font-size: 12.5px; color: var(--text-2);
}
.callout i { color: var(--accent-2); font-size: 16px; margin-top: 2px; }
.callout.warn { background: rgba(245,166,35,.1); }
.callout.warn i { color: var(--warn); }

/* list */
.clist { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.clist li { display: flex; gap: 10px; font-size: 12.5px; color: var(--text-2); }
.clist li i { color: var(--accent-2); margin-top: 3px; font-size: 11px; }

/* ============================================================
   BPMN-STYLE SWIMLANE PROCESS DIAGRAM
   ============================================================ */
.bpmn { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--panel-2); }
.bpmn-toolbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--panel); flex-wrap: wrap; }
.bpmn-toolbar .sp { flex: 1; }
.bpmn-legend { display: flex; gap: 12px; font-size: 10.5px; color: var(--text-3); flex-wrap: wrap; }
.bpmn-legend i { margin-right: 4px; }
.bpmn-scroll { overflow-x: auto; }
.bpmn-grid { display: grid; min-width: 720px; }
.lane { display: grid; grid-template-columns: 150px 1fr; border-bottom: 1px solid var(--border); }
.lane:last-child { border-bottom: 0; }
.lane-head {
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
  padding: 14px 12px; border-right: 1px solid var(--border);
  background: var(--panel); font-weight: 700; font-size: 12px;
}
.lane-head .lh-sub { font-size: 10px; color: var(--text-3); font-weight: 500; }
.lane-head i { color: var(--accent-2); margin-right: 6px; }
.lane-track { display: flex; align-items: center; gap: 0; padding: 16px 10px; position: relative; }
.pnode {
  position: relative; flex: 0 0 auto; min-width: 118px; max-width: 150px;
  padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--panel-2); font-size: 11.5px; line-height: 1.3; text-align: center;
  transition: all .35s ease; opacity: .5;
}
.pnode.task { border-radius: 10px; }
.pnode.event { border-radius: 40px; }
.pnode.gateway { transform: rotate(0deg); border-radius: 8px; background: var(--panel); }
.pnode.data { border-radius: 4px; border-style: dashed; }
.pnode .pn-ico { display: block; font-size: 15px; margin-bottom: 4px; color: var(--accent-2); }
.pnode .pn-t { font-weight: 700; }
.pnode .pn-d { font-size: 9.5px; color: var(--text-3); margin-top: 2px; }
.pnode.active { opacity: 1; border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-glow); transform: translateY(-2px); }
.pnode.done { opacity: 1; border-color: var(--ok); }
.pnode.done .pn-ico { color: var(--ok); }
.pnode.gateway.active .pn-ico { color: var(--warn); }
.pnode:not(:last-child) { margin-right: 34px; }
.pnode .pn-badge { position: absolute; top: -8px; left: -6px; font-size: 8.5px; background: var(--accent); color: #fff; padding: 1px 5px; border-radius: 6px; font-weight: 700; z-index: 3; }
/* SVG connector overlay — draws the real col-order flow across lanes */
.bpmn-body { position: relative; width: max-content; min-width: 100%; }
.bpmn-edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.bpmn-edges .edge { fill: none; stroke: var(--border-strong); stroke-width: 2; transition: stroke .35s ease; }
.bpmn-edges .edge.done { stroke: var(--ok); }
.bpmn-edges .edge-head { fill: var(--border-strong); transition: fill .35s ease; }
.bpmn-edges .edge-head.done { fill: var(--ok); }
.lane { position: relative; z-index: 2; }
.bpmn-status { padding: 8px 14px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-2); font-family: 'JetBrains Mono', monospace; min-height: 30px; display: flex; align-items: center; gap: 8px; }
.bpmn-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.bpmn-status.running .dot { background: var(--accent); animation: pulse 1s infinite; }
.bpmn-status.done .dot { background: var(--ok); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* metric strip for verification */
.vstrip { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-top: 12px; }
.vstat { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: var(--panel-2); }
.vstat .vs-n { font-size: 20px; font-weight: 800; font-family: 'JetBrains Mono', monospace; color: var(--accent-2); }
.vstat .vs-l { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.vstat .vs-d { font-size: 10px; color: var(--text-2); margin-top: 4px; }

/* verification checkpoint list */
.vck { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.vck li { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); }
.vck li i { margin-top: 2px; color: var(--accent-2); width: 15px; text-align: center; }
.vck li b { color: var(--text); }
.vck li .vq { color: var(--text-3); font-size: 10.5px; display: block; margin-top: 2px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
.overlay { display: none; }
@media (max-width: 620px) { .vstrip { grid-template-columns: repeat(2,1fr); } .lane { grid-template-columns: 110px 1fr; } }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; width: 280px; transform: translateX(-100%);
    transition: transform .3s ease; box-shadow: var(--shadow);
  }
  .sidebar.open { transform: none; }
  .hamburger { display: block; }
  .overlay.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 39; }
  /* keep compact cards side-by-side; only long-content grids drop to 1 col */
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .g2 { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  /* short-content cards (KPI / counts) stay 2-up to avoid endless scroll */
  .g4, .g3 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .content { padding: 18px 14px 50px; }
  .page-head h1 { font-size: 20px; }
  .env-pill span.env-txt { display: none; }
  .toggle-btn span { display: none; }
  .topbar { padding: 0 14px; gap: 8px; }
  /* tighten KPI typography + padding so 2-up fits cleanly on phones */
  .card { padding: 14px; }
  .kpi .kpi-val { font-size: 24px; }
  .kpi .kpi-ico { font-size: 24px; right: 10px; top: 10px; }
  .kpi .kpi-label { font-size: 10.5px; }
  .kpi .kpi-note, .kpi .kpi-delta { font-size: 10.5px; }
}
@media (max-width: 380px) {
  /* very narrow: allow full width to keep numbers readable */
  .g4, .g3 { grid-template-columns: 1fr; }
}

/* ============================================================
   DECISION MATERIALS (論点・判断材料) + ROADMAP refinements
   ============================================================ */

/* --- table compact variant --- */
.tbl.compact th, .tbl.compact td { padding: 8px 10px; font-size: 11.5px; }

/* --- source of truth --- */
.sot-card { position: relative; }
.sot-card.sot-key { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-glow) inset; }
.sot-idx { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; color: var(--accent-2);
  letter-spacing: .04em; margin-bottom: 6px; }
.sot-card.sot-key .sot-idx { color: var(--accent); }
.sot-card h3 { font-size: 14px; font-weight: 800; }

/* --- finality cards --- */
.fin-card { border-left: 3px solid var(--border-strong); }
.fin-tech { border-left-color: var(--teal); }
.fin-legal { border-left-color: var(--accent); }

/* --- issue cards --- */
.issue-card { display: flex; flex-direction: column; gap: 10px; }
.issue-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.issue-name { font-size: 13px; margin-left: 2px; }
.issue-q { font-size: 12px; color: var(--text-2); line-height: 1.55; }
.issue-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700;
  color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.issue-lbl i { color: var(--accent-2); }
.opt-list { list-style: none; margin: 6px 0 0; display: flex; flex-direction: column; gap: 5px; }
.opt-list li { font-size: 11.5px; color: var(--text-2); padding: 6px 9px; border: 1px solid var(--border);
  border-radius: 7px; background: var(--panel-2); }
.issue-sm { font-size: 11.5px; color: var(--text-2); margin-top: 5px; }
.issue-rec { display: flex; gap: 9px; align-items: flex-start; font-size: 11.5px; color: var(--text);
  background: color-mix(in srgb, var(--ok) 10%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
  border-radius: 8px; padding: 9px 11px; line-height: 1.5; }
.issue-rec i { color: var(--ok); margin-top: 2px; }

/* --- api/mq use bars --- */
.usebar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--panel-2); }

/* --- state machine --- */
.sm-track { display: flex; align-items: stretch; gap: 4px; overflow-x: auto; padding-bottom: 6px; }
.sm-node { flex: 1 0 128px; min-width: 128px; border: 1px solid var(--border); border-radius: 9px;
  padding: 10px; background: var(--panel-2); display: flex; flex-direction: column; gap: 4px; }
.sm-node.sm-final { border-color: var(--ok); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ok) 40%, transparent) inset; }
.sm-code { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--accent-2); letter-spacing: -.02em; }
.sm-node.sm-final .sm-code { color: var(--ok); }
.sm-t { font-size: 12px; font-weight: 700; color: var(--text); }
.sm-d { font-size: 10.5px; color: var(--text-3); line-height: 1.45; }
.sm-arrow { display: grid; place-items: center; color: var(--text-3); font-size: 11px; flex: 0 0 auto; }
.sm-errline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px;
  padding-top: 12px; border-top: 1px dashed var(--border); }
.sm-errlbl { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.pr-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.pr-list li { display: flex; gap: 9px; font-size: 12px; color: var(--text-2); line-height: 1.5; align-items: flex-start; }
.pr-n { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; color: var(--accent-2);
  background: var(--accent-soft); border-radius: 5px; padding: 1px 5px; flex: 0 0 auto; margin-top: 1px; }

/* --- config patterns --- */
.cfg-card .cfg-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.cfg-lbl { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.cfg-lbl.ok { color: var(--ok); }
.cfg-lbl.warn { color: var(--warn); }
.cfg-cols ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.cfg-cols li { font-size: 11px; color: var(--text-2); padding-left: 12px; position: relative; line-height: 1.4; }
.cfg-cols li::before { content: ''; position: absolute; left: 2px; top: 6px; width: 4px; height: 4px;
  border-radius: 50%; background: var(--text-3); }
.cfg-fit { margin-top: 12px; font-size: 11.5px; color: var(--text-2); padding: 8px 10px; border-radius: 7px;
  background: var(--panel-2); border: 1px solid var(--border); }
.cfg-fit i { color: var(--accent-2); margin-right: 4px; }

/* --- must-decide / confirm lists --- */
.dec-list { list-style: none; counter-reset: none; display: flex; flex-direction: column; gap: 8px; }
.dec-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--text-2);
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); line-height: 1.45; }
.dec-n { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; background: var(--accent); color: #fff; }
.dec-list.confirm .dec-n { background: var(--teal); }

/* --- FAQ accordion --- */
.faq-item { padding: 0; overflow: hidden; }
.faq-q { width: 100%; display: flex; align-items: center; gap: 11px; padding: 14px 16px; background: none;
  border: none; cursor: pointer; text-align: left; color: var(--text); font-family: inherit; }
.faq-badge { flex: 0 0 auto; font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--accent-2);
  background: var(--accent-soft); border-radius: 6px; padding: 3px 7px; }
.faq-qt { flex: 1; font-size: 12.5px; font-weight: 600; }
.faq-chev { color: var(--text-3); font-size: 12px; transition: transform var(--tr); }
.faq-item.open .faq-chev { transform: rotate(180deg); }
.faq-a { display: none; gap: 11px; padding: 0 16px 15px 16px; align-items: flex-start; }
.faq-item.open .faq-a { display: flex; animation: fadeUp .2s ease; }
.faq-a > i { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  background: var(--ok); color: #fff; font-size: 11px; font-weight: 700; }
.faq-a p { font-size: 12px; color: var(--text-2); line-height: 1.6; }

/* --- roadmap: month cards --- */
.month-card { border-top: 3px solid var(--accent); display: flex; flex-direction: column; gap: 10px; }
.month-head { display: flex; align-items: center; gap: 10px; }
.month-head h3 { font-size: 14.5px; font-weight: 800; }
.month-goal { font-size: 11.5px; color: var(--text-2); line-height: 1.5; }
.month-out { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--text-2);
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; line-height: 1.45; }
.mo-lbl { font-size: 10px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.mo-lbl i { color: var(--accent-2); }
.month-gate { font-size: 11.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft);
  border-radius: 8px; padding: 8px 10px; }
.month-gate i { margin-right: 5px; }

/* --- roadmap: decision gate rail --- */
.gate-rail { display: flex; align-items: stretch; gap: 6px; }
.gate-card { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.gate-top { display: flex; align-items: center; justify-content: space-between; }
.gate-id { font-family: var(--font-mono); font-size: 12px; font-weight: 800; color: #fff; background: var(--accent);
  border-radius: 6px; padding: 3px 9px; }
.gate-when { font-size: 11px; color: var(--text-3); }
.gate-t { font-size: 13px; font-weight: 800; line-height: 1.35; }
.gate-sub { font-size: 10.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.gate-sub i { color: var(--ok); }
.gate-cond { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.gate-cond li { display: flex; gap: 8px; font-size: 11px; color: var(--text-2); line-height: 1.45; align-items: flex-start; }
.gate-cond li i { color: var(--ok); font-size: 10px; margin-top: 3px; }
.gate-kpi { margin-top: auto; font-size: 11px; color: var(--text-2); background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; line-height: 1.45; }
.gate-kpi i { color: var(--accent-2); }
.gate-conn { display: grid; place-items: center; color: var(--accent-2); font-size: 14px; flex: 0 0 auto; }

@media (max-width: 820px) {
  .pr-list, .cfg-card .cfg-cols { grid-template-columns: 1fr; }
  .gate-rail { flex-direction: column; }
  .gate-conn { transform: rotate(90deg); padding: 4px 0; }
}

/* ============================================================
   Fit & Gap Evaluation page (fitgap)
   ============================================================ */
.callout.accent { border-left: 3px solid var(--accent); background: var(--accent-soft); }

/* "評価中" WIP banner — 結果と誤読されないよう最上部で強調 */
.wip-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 13px 16px;
  border: 1.5px dashed var(--warn);
  border-left: 5px solid var(--warn);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
}
.wip-badge {
  display: inline-flex; align-items: center; gap: 7px;
  flex-shrink: 0;
  padding: 6px 13px; border-radius: 999px;
  background: var(--warn); color: #1b1300;
  font-weight: 800; font-size: 13px; letter-spacing: 0.02em;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--warn) 45%, transparent);
}
.wip-badge i { font-size: 12px; }
.wip-text { font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.5; }

/* (1) criteria definition */
.crit-cat { padding: 16px 18px; }
.crit-cat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 14px; }
.crit-cat-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 13px; flex-shrink: 0; }
.crit-grid { gap: 12px; }
.crit-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 13px; }
.crit-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.crit-top b { font-size: 12.5px; }
.crit-w { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent); background: var(--accent-soft); padding: 1px 7px; border-radius: 20px; font-weight: 600; }
.crit-def { font-size: 11.5px; color: var(--text-2); line-height: 1.55; margin-bottom: 7px; }
.crit-how { font-size: 10.8px; color: var(--text-3); line-height: 1.5; border-top: 1px dashed var(--border); padding-top: 6px; }
.crit-how i { color: var(--teal); margin-right: 4px; }

/* (2) weight sliders */
.wsliders { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.wsl-row { display: grid; grid-template-columns: 120px 1fr 26px; align-items: center; gap: 10px; }
.wsl-lb { font-size: 11.5px; color: var(--text-2); cursor: help; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wsl-in { -webkit-appearance: none; appearance: none; height: 5px; border-radius: 5px; background: var(--panel-3); outline: none; cursor: pointer; }
.wsl-in::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 0 0 3px var(--accent-soft); }
.wsl-in::-moz-range-thumb { width: 15px; height: 15px; border: none; border-radius: 50%; background: var(--accent); cursor: pointer; }
.wsl-val { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--accent); text-align: right; }
.btn.xs, .pill.xs { font-size: 10.5px; padding: 3px 9px; }

/* (4) weighted rank list */
.fg-rank { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.fg-rank-item { display: grid; grid-template-columns: 24px 18px 1fr 120px 44px; align-items: center; gap: 9px; font-size: 12px; }
.fg-rank-pos { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-3); color: var(--text-2); font-weight: 700; font-size: 11px; }
.fg-rank-pos.top { background: var(--accent); color: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.fg-rank-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg-rank-bar { height: 8px; border-radius: 8px; background: var(--panel-3); overflow: hidden; }
.fg-rank-bar span { display: block; height: 100%; border-radius: 8px; transition: width .5s cubic-bezier(.4,0,.2,1); }
.fg-rank-val { font-family: var(--font-mono); font-weight: 700; text-align: right; }

/* (5) heat table */
.heat-tbl td, .heat-tbl th { text-align: center; }
.heat-tbl .heat-ax { text-align: left; }
.heat-ax b { font-size: 12px; }
.heat-w { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-3); margin-left: 6px; }
.heat-cell { position: relative; cursor: pointer; font-weight: 700; transition: filter .15s; }
.heat-cell:hover { filter: brightness(1.12); }
.heat-cell .heat-s { font-size: 14px; }
.heat-conf { display: inline-block; font-size: 9px; font-weight: 700; padding: 0 4px; border-radius: 4px; margin-left: 4px; vertical-align: middle; }
.conf-H { background: var(--ok); color: #04241a; }
.conf-M { background: var(--warn); color: #3a2600; }
.conf-L { background: var(--err); color: #3a0010; }
.heat-i { font-size: 8.5px; opacity: .45; position: absolute; top: 5px; right: 6px; }
.heat-total td { background: var(--panel-3) !important; font-size: 13px; }
/* heat colors — work in both themes */
.h5 { background: rgba(23,201,138,0.26); color: var(--text); }
.h4 { background: rgba(23,201,138,0.15); color: var(--text); }
.h3 { background: rgba(245,166,35,0.16); color: var(--text); }
.h2 { background: rgba(245,166,35,0.24); color: var(--text); }
.h1 { background: rgba(255,84,112,0.22); color: var(--text); }

/* (6) pattern qualitative heat */
.pat-fit { font-size: 10.5px; color: var(--text-3); margin-top: 3px; font-weight: 400; }
.pat-cell { font-weight: 700; font-size: 12px; }
.v-high { background: rgba(23,201,138,0.24); color: var(--text); }
.v-mid { background: rgba(245,166,35,0.20); color: var(--text); }
.v-low { background: rgba(120,140,180,0.14); color: var(--text-2); }

/* evidence modal */
.ev-scoreline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ev-score { font-family: var(--font-mono); font-size: 30px; font-weight: 800; padding: 4px 14px; border-radius: 10px; line-height: 1; }
.ev-score small { font-size: 13px; font-weight: 600; opacity: .6; }
.ev-conf { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.ev-conf.conf-H { background: var(--ok); color: #04241a; }
.ev-conf.conf-M { background: var(--warn); color: #3a2600; }
.ev-conf.conf-L { background: var(--err); color: #3a0010; }
.ev-w { font-family: var(--font-mono); font-size: 11px; color: var(--text-2); background: var(--panel-3); padding: 3px 9px; border-radius: 20px; }
.ev-body { font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.ev-body p { margin-top: 5px; }

@media (max-width: 820px) {
  .crit-grid { grid-template-columns: 1fr; }
  #fgTop { grid-template-columns: 1fr; }
  .wsl-row { grid-template-columns: 96px 1fr 24px; }
  .fg-rank-item { grid-template-columns: 22px 16px 1fr 70px 40px; }
}

/* ===== Signature architecture SVG (dashboard hero) ===== */
.arch-hero { overflow: hidden; }
.arch-svg-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 10px;
  background:
    linear-gradient(var(--panel-2), var(--panel-2)) padding-box,
    var(--panel-2);
  border: 1px solid var(--border);
  padding: 8px;
}
.arch-svg {
  display: block;
  width: 100%;
  min-width: 760px;   /* keep it legible; scrolls on small screens */
  height: auto;
}
.arch-svg text { pointer-events: none; }
@media (max-width: 820px) {
  .arch-svg-wrap { padding: 4px; }
}

/* ============================================================
   PRODUCT TECHNICAL SPECIFICATIONS (#specs)
   ============================================================ */
/* confidence legend */
.spec-legend {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px;
  padding: 10px 14px; margin: 4px 0 14px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 11.5px; color: var(--text-2);
}
.spec-legend-lbl { font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; font-size: 10.5px; }
.spec-legend small { color: var(--text-2); margin-right: 6px; }

/* confidence badge */
.spec-conf {
  display: inline-grid; place-items: center; width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 6px; font-weight: 800; font-size: 11px; letter-spacing: 0;
  border: 1px solid transparent; cursor: help;
}
.spec-conf.conf-h { background: color-mix(in srgb, var(--ok, #22c55e) 18%, transparent); color: var(--ok, #22c55e); border-color: color-mix(in srgb, var(--ok, #22c55e) 40%, transparent); }
.spec-conf.conf-m { background: color-mix(in srgb, var(--warn, #f59e0b) 18%, transparent); color: var(--warn, #f59e0b); border-color: color-mix(in srgb, var(--warn, #f59e0b) 40%, transparent); }
.spec-conf.conf-l { background: color-mix(in srgb, var(--text-3) 20%, transparent); color: var(--text-2); border-color: color-mix(in srgb, var(--text-3) 34%, transparent); }

/* index / jump chips */
.spec-index { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.spec-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 22px;
  font-size: 12px; color: var(--text-2); text-decoration: none; transition: var(--tr); font-weight: 600;
}
.spec-chip:hover { border-color: var(--accent); color: var(--accent-2); transform: translateY(-1px); }
.spec-chip b { color: var(--text-3); font-size: 11px; }
.spec-chip-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 10px; }

/* product spec card */
.spec-card { margin-bottom: 18px; scroll-margin-top: 84px; }
.spec-head { display: flex; align-items: flex-start; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.spec-head-txt { flex: 1; min-width: 0; }
.spec-head-txt h3 { font-size: 17px; font-weight: 800; }
.spec-one { color: var(--text-2); font-size: 12.5px; margin-top: 6px; line-height: 1.5; }

/* spec table (category rows) */
.spec-table { display: flex; flex-direction: column; }
.spec-row { display: grid; grid-template-columns: 210px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.spec-row:last-child { border-bottom: none; }
.spec-cat { display: flex; align-items: flex-start; gap: 8px; font-weight: 700; font-size: 12.5px; color: var(--text); padding-top: 2px; }
.spec-cat i { color: var(--accent-2); width: 16px; text-align: center; margin-top: 2px; }
.spec-vals { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.spec-item { display: flex; align-items: flex-start; gap: 10px; }
.spec-item-body { min-width: 0; }
.spec-v { display: block; font-size: 12.5px; color: var(--text-2); line-height: 1.6; word-break: break-word; }
.spec-src {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 5px;
  font-size: 10.5px; color: var(--accent-2); text-decoration: none; font-weight: 600;
  padding: 2px 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel-2);
}
.spec-src:hover { border-color: var(--accent); background: var(--accent-soft); }
.spec-src i { font-size: 9px; }

/* primary sources footer */
.spec-sources { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.spec-src-lbl { display: block; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.spec-src-lbl i { color: var(--accent-2); margin-right: 4px; }
.spec-src-list { display: flex; flex-wrap: wrap; gap: 8px; }
.spec-src-pill {
  font-size: 11px; color: var(--text-2); text-decoration: none; font-weight: 600;
  padding: 5px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); transition: var(--tr);
}
.spec-src-pill:hover { border-color: var(--accent); color: var(--accent-2); background: var(--accent-soft); }

@media (max-width: 820px) {
  .spec-row { grid-template-columns: 1fr; gap: 8px; }
  .spec-cat { padding-top: 0; }
}

/* help desk / technical contact footer */
.spec-support { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.spec-support-lbl { display: block; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.spec-support-lbl i { color: var(--accent-2); margin-right: 4px; }
.spec-support-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.spec-support-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 11px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2);
  text-decoration: none; transition: var(--tr); min-width: 0;
}
.spec-support-item:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.spec-support-ico { width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); font-size: 12px; }
.spec-support-txt { display: flex; flex-direction: column; min-width: 0; }
.spec-support-txt b { font-size: 12px; color: var(--text); font-weight: 700; line-height: 1.3; }
.spec-support-txt small { font-size: 10.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   Access Gate (auth.js) — vivid-blue gradient, transparent logo
   ============================================================ */
#ea-gate {
  position: fixed; inset: 0; z-index: 99999;
  display: grid; place-items: center;
  overflow: hidden;
  opacity: 1; transition: opacity .4s ease;
  font-family: 'Inter', 'Noto Sans JP', system-ui, sans-serif;
}
#ea-gate.ea-gate-out { opacity: 0; pointer-events: none; }

/* vivid blue gradient background */
.ea-gate-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 600px at 15% 10%, rgba(120,170,255,.55), transparent 60%),
    radial-gradient(1000px 700px at 85% 90%, rgba(10,60,200,.60), transparent 60%),
    linear-gradient(135deg, #2f7bff 0%, #1f6bff 42%, #0a3fd6 100%);
}
/* soft moving sheen */
.ea-gate-bg::after {
  content: ''; position: absolute; inset: -20%;
  background: radial-gradient(700px 400px at 50% 0%, rgba(255,255,255,.18), transparent 70%);
  animation: eaGateSheen 8s ease-in-out infinite alternate;
}
@keyframes eaGateSheen {
  0%   { transform: translate(-6%, -4%); opacity: .7; }
  100% { transform: translate(6%, 6%);   opacity: 1; }
}

/* light card */
.ea-gate-card {
  position: relative; z-index: 1;
  width: min(92vw, 380px);
  padding: 40px 34px 26px;
  border-radius: 22px;
  text-align: center;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 30px 70px rgba(6, 28, 90, 0.45), 0 4px 14px rgba(6, 28, 90, 0.25);
  animation: eaGateIn .5s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes eaGateIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ea-gate-card.shake { animation: eaGateShake .38s ease; }
@keyframes eaGateShake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-9px); } 40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); } 80% { transform: translateX(4px); }
}

/* logo — soft blue disc frames the transparent blue logo */
.ea-gate-logo {
  width: 84px; height: 84px; margin: 0 auto 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #eef4ff;
  box-shadow: inset 0 0 0 1px #dbe6ff, 0 6px 18px rgba(31, 107, 255, .18);
}
.ea-gate-logo img { width: 52px; height: 52px; object-fit: contain; }

.ea-gate-title {
  color: #0d1a33; font-weight: 800; font-size: 20px; letter-spacing: .04em;
}
.ea-gate-sub {
  color: #6a7c9c; font-size: 11.5px; font-weight: 500;
  letter-spacing: .04em; margin-top: 6px; margin-bottom: 24px;
}

.ea-gate-form { display: flex; flex-direction: column; gap: 12px; }
.ea-gate-field {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px; height: 48px;
  border-radius: 12px;
  background: #f4f7fd;
  border: 1px solid #d7e0f2;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.ea-gate-field:focus-within {
  border-color: #1f6bff; background: #fff;
  box-shadow: 0 0 0 3px rgba(31,107,255,.15);
}
.ea-gate-field i { color: #8493ad; font-size: 13px; }
.ea-gate-field input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #0d1a33; font-size: 14.5px; letter-spacing: .04em;
}
.ea-gate-field input::placeholder { color: #9aa8c2; letter-spacing: 0; }

.ea-gate-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 48px; border: none; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, #2f7bff, #1f6bff 55%, #0a4bd6);
  color: #fff;
  font-weight: 800; font-size: 14px; letter-spacing: .04em;
  box-shadow: 0 8px 22px rgba(31, 107, 255, .38);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s;
}
.ea-gate-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(31, 107, 255, .48); filter: brightness(1.05); }
.ea-gate-btn:active { transform: translateY(0); }
.ea-gate-btn i { font-size: 12px; }

.ea-gate-err {
  min-height: 16px; font-size: 11.5px; font-weight: 600;
  color: #e11d48; letter-spacing: .02em;
}
.ea-gate-foot {
  margin-top: 20px; font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: #9aa8c2;
}

/* ---- flowsvg.js : 3-pattern SVG validation cards ---- */
.flowsvg-grid { margin-top: 6px; }
.flowsvg-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.flowsvg-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px var(--accent-soft);
}
.flowsvg-head {
  display: flex; align-items: center; gap: 9px; margin-bottom: 8px;
}
.flowsvg-chip {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  box-shadow: 0 2px 8px var(--accent-soft);
}
.flowsvg-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  line-height: 1.25;
}
.flowsvg-canvas {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 4px;
  margin-bottom: 10px;
}
.flowsvg-desc {
  font-size: 11.5px; line-height: 1.55; color: var(--text-2);
  margin: 0;
}
@media (max-width: 980px) {
  .flowsvg-grid { grid-template-columns: 1fr; }
}
