
:root{
  --bg:#f7f8fc;
  --panel:#ffffff;
  --panel2:#f3f5ff;
  --text:#0b1224;
  --muted:#44527a;

  /* QBA Adaptive palette (sampled from site logo) */
  --accent:#29519c;   /* blue */
  --accent2:#df0a86;  /* magenta */
  --accent3:#a11d65;  /* deep magenta */

  --warn:#ca5010;
  --danger:#d13438;
  --border:rgba(11,18,36,.10);
  --shadow: 0 18px 50px rgba(11,18,36,.10);
  --radius:20px;
  --sans: "Segoe UI Variable","Segoe UI", ui-sans-serif, system-ui, -apple-system, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--sans);
  font-size:16px;
  line-height:1.7;
  color:var(--text);
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(223,10,134,.16), transparent 60%),
    radial-gradient(980px 640px at 85% -12%, rgba(41,81,156,.16), transparent 60%),
    linear-gradient(180deg, #ffffff, var(--bg) 70%, #eef0ff);
}
a{color:inherit; text-decoration:none}
a:hover{color:var(--accent2)}
.container{display:grid; grid-template-columns: 320px 1fr; min-height:100vh}
.sidebar{
  position:sticky; top:0;
  height:100dvh;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  padding:22px 18px 18px;
  border-right:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(243,245,255,.92));
  backdrop-filter: blur(10px);
  z-index:2;
}
.brand{
  display:flex; gap:12px; align-items:center;
  padding:14px 14px;
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.92));
}
.logo{
  width:42px; height:42px; border-radius:14px; display:grid; place-items:center;
  background:
    radial-gradient(circle at 30% 25%, rgba(223,10,134,.22), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(41,81,156,.22), transparent 58%),
    rgba(41,81,156,.08);
  border:1px solid rgba(41,81,156,.18);
}
.brand h1{font-size:15px; margin:0; line-height:1.15; letter-spacing:.2px}
.brand p{margin:2px 0 0 0; font-size:12px; color:var(--muted)}
.nav{
  margin-top:16px;
  padding:10px;
  border-radius: var(--radius);
  border:1px solid var(--border);
  background: rgba(255,255,255,.82);
  overflow:auto;
  flex:1;
}
.nav a{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px;
  border-radius:14px;
  color:var(--muted);
  transition: all .15s ease;
}
.nav a .dot{
  width:9px; height:9px; border-radius:99px;
  background: rgba(11,18,36,.18);
  box-shadow: 0 0 0 3px rgba(11,18,36,.05);
}
.nav a.active{
  color:var(--text);
  background: linear-gradient(90deg, rgba(41,81,156,.16), rgba(223,10,134,.10));
  border:1px solid rgba(0,120,212,.22);
}
.nav a.active .dot{background: var(--accent2)}
.main{padding:30px 28px 64px}
.header{display:flex; justify-content:space-between; align-items:flex-start; gap:18px; margin-bottom:18px}
.title{
  padding:20px 22px;
  border-radius: var(--radius);
  border:1px solid var(--border);
  background:
    radial-gradient(900px 240px at 20% 0%, rgba(0,183,195,.12), transparent 60%),
    radial-gradient(900px 240px at 80% 0%, rgba(0,120,212,.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.92));
  box-shadow: var(--shadow);
  max-width: 1100px;
}
.title h2{margin:0 0 8px 0; font-size:28px; line-height:1.15}
.title p{margin:0; color:var(--muted); max-width:86ch; font-size:15px; line-height:1.6}
.badgeRow{display:flex; gap:10px; flex-wrap:wrap; margin-top:12px}
.badge{
  font-size:12px;
  color:var(--muted);
  border:1px solid var(--border);
  background: rgba(255,255,255,.94);
  padding:6px 10px;
  border-radius: 999px;
}
.grid{display:grid; grid-template-columns: repeat(12, 1fr); gap:18px}
.card{
  grid-column: span 12;
  border-radius: var(--radius);
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.92));
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card .card-hd{
  padding:16px 18px;
  border-bottom:1px solid var(--border);
  display:flex; justify-content:space-between; align-items:center; gap:10px;
}
.card .card-hd h3{margin:0; font-size:16px}
.card .card-bd{padding:18px 18px}
hr.sep{border:none; border-top:1px solid var(--border); margin:16px 0}
.muted{color:var(--muted)}
.callout{
  border:1px solid rgba(0,120,212,.22);
  background: linear-gradient(180deg, rgba(0,120,212,.08), rgba(0,183,195,.05));
  padding:12px 14px;
  border-radius: 16px;
}
.notice{
  border:1px dashed rgba(11,18,36,.20);
  padding:12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.90);
}
.kpi{display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:12px}
.kpi .pill{
  border-radius: 16px;
  padding:12px 12px;
  border:1px solid var(--border);
  background: rgba(242,247,255,.95);
}
.kpi .pill h4{margin:0; font-size:13px}
.kpi .pill p{margin:6px 0 0; font-size:12px; color:var(--muted); line-height:1.45}
table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius: 16px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.96);
}
th,td{padding:10px 10px; border-bottom:1px solid var(--border); vertical-align:top; font-size:13px}
th{color:var(--text); text-align:left; background: rgba(242,247,255,.98)}
tr:last-child td{border-bottom:none}
pre, code{font-family:var(--mono)}
pre{
  padding:14px 14px;
  border-radius: 16px;
  background: rgba(242,247,255,.98);
  border:1px solid var(--border);
  overflow:auto;
}
details.acc{
  border:1px solid var(--border);
  border-radius: 16px;
  background: rgba(242,247,255,.62);
  margin:10px 0;
  overflow:hidden;
}
details.acc summary{
  cursor:pointer;
  padding:12px 14px;
  list-style:none;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
details.acc summary::-webkit-details-marker{display:none}
details.acc summary .left{display:flex; align-items:center; gap:10px}
.picon{
  width:28px; height:28px; border-radius:12px;
  display:grid; place-items:center;
  border:1px solid var(--border);
  background: rgba(255,255,255,.96);
  color: rgba(0,120,212,.95);
  font-size:14px;
}
details.acc .acc-body{padding:14px 14px; border-top:1px solid var(--border)}
.doc h1{font-size:22px; margin:0}
.doc h2{font-size:18px}
.doc h3{font-size:16px}
.doc h4{font-size:14px}
.doc p{line-height:1.75}
.doc-list{line-height:1.75}
.table-wrap{overflow:auto}
.heroimg{width:100%; height:auto; border-radius:16px; border:1px solid var(--border); cursor:zoom-in}
.modal{
  position:fixed; inset:0;
  background: rgba(11,18,36,.45);
  display:none; align-items:center; justify-content:center;
  padding:22px; z-index:9999;
}
.modal.open{display:flex}
.modal .box{max-width:min(1200px, 96vw); max-height: 92vh; position:relative}
.modal img{
  width:100%; height:auto;
  border-radius:18px;
  border:1px solid rgba(11,18,36,.14);
  box-shadow: 0 18px 45px rgba(11,18,36,.18);
}
.modal button{
  position:absolute; top:-12px; right:-12px;
  width:44px; height:44px; border-radius:999px;
  border:1px solid rgba(11,18,36,.14);
  background: rgba(255,255,255,.96);
  color:var(--text);
  cursor:pointer;
}
.svgwrap{
  overflow:auto;
  border:1px solid var(--border);
  border-radius:16px;
  background: rgba(242,247,255,.86);
  padding:12px;
}
footer.small{margin-top:18px; color:var(--muted); font-size:12px}

/* Tabs */
.tabs{border:1px solid var(--border); border-radius: var(--radius); background: rgba(255,255,255,.94); overflow:hidden;}
.tablist{display:flex; gap:8px; padding:10px; border-bottom:1px solid var(--border); flex-wrap:wrap; background: rgba(242,247,255,.80);}
.tabbtn{appearance:none; border:1px solid var(--border); background: rgba(255,255,255,.94); padding:8px 10px; border-radius:999px; cursor:pointer; font:600 13px var(--sans); color:var(--muted);}
.tabbtn.active{color:var(--text); border-color: rgba(0,120,212,.35); background: linear-gradient(90deg, rgba(41,81,156,.16), rgba(223,10,134,.10));}
.tabpanel{display:none; padding:14px 16px;}
.tabpanel.active{display:block;}
.tabpanel h4{margin:0 0 8px 0; font-size:16px;}

@media (max-width: 980px){
  .container{grid-template-columns: 1fr}
  .sidebar{
  position:sticky; top:0;
  height:100dvh;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  padding:22px 18px 18px;
  border-right:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(243,245,255,.92));
  backdrop-filter: blur(10px);
  z-index:2;
}
  .kpi{grid-template-columns: repeat(2, minmax(0,1fr))}
}

/* Storyboard animation (CSS-only) */
.storyboard svg .step{opacity:0; transform: translateY(0px); transform-origin:center; animation-fill-mode:both;}
@keyframes stepFade{0%{opacity:0}5%{opacity:1}70%{opacity:1}100%{opacity:0}}10%{opacity:1}70%{opacity:1}100%{opacity:0}}10%{opacity:1}70%{opacity:1}100%{opacity:0}}
  12%{opacity:1; transform: translateY(0px);}
  80%{opacity:1; transform: translateY(0px);}
  100%{opacity:0; transform: translateY(-6px);}
}
.storyboard svg .s1{animation: stepFade 12s infinite; animation-delay: 0s;}
.storyboard svg .s2{animation: stepFade 12s infinite; animation-delay: 3s;}
.storyboard svg .s3{animation: stepFade 12s infinite; animation-delay: 6s;}
.storyboard svg .s4{animation: stepFade 12s infinite; animation-delay: 9s;}
