/* INDEXMS theme: navy + gold, following the IMS 2026 deck */
:root {
  --ims-navy: #0d1450;
  --ims-navy-deep: #080c35;
  --ims-panel: rgba(20, 30, 95, 0.72);
  --ims-panel-solid: #141e5f;
  --ims-border: rgba(245, 184, 0, 0.22);
  --ims-gold: #f5b800;
  --ims-gold-dark: #8a6a12;
  --ims-banner: linear-gradient(90deg, #8a6a12 0%, #9c7b1e 100%);
  --ims-cyan: #29b6f6;
  --ims-text: #e8ebf7;
  --ims-muted: #a9b0d6;
}

body {
  background: radial-gradient(1200px 700px at 75% 20%, #1b2a7a 0%, rgba(13,20,80,0) 60%),
              linear-gradient(180deg, var(--ims-navy) 0%, var(--ims-navy-deep) 100%);
  background-color: var(--ims-navy-deep);
  color: var(--ims-text);
  min-height: 100vh;
}

/* Navbar */
.navbar {
  background: rgba(8, 12, 53, 0.92) !important;
  border-bottom: 2px solid var(--ims-gold);
  backdrop-filter: blur(6px);
}
.navbar-brand { display: flex; align-items: center; gap: .6rem; }
.ims-brand-mark {
  font-family: "Russo One", sans-serif; letter-spacing: .06em;
  color: var(--ims-gold); font-size: 1.35rem;
}
.ims-brand-sub { color: var(--ims-muted); font-size: .72rem; line-height: 1; }
html { background-color: #080c35; }
.navbar .nav-link { color: var(--ims-text) !important; font-weight: 600; font-size: .84rem; padding-left: .55rem !important; padding-right: .55rem !important; }
.navbar .nav-link.active, .navbar .nav-link:hover { color: var(--ims-gold) !important; }

/* Slide-style section banner: gold band with a left bar */
.ims-banner {
  position: relative; background: var(--ims-banner);
  padding: .55rem 1.1rem .5rem 1.1rem; margin: 1.1rem 0 1rem 14px;
  border-radius: 2px;
}
.ims-banner::before {
  content: ""; position: absolute; left: -14px; top: 0; bottom: 0; width: 7px;
  background: var(--ims-gold);
}
.ims-banner h2 { color: #fff; font-weight: 800; margin: 0; font-size: 1.65rem; }
.ims-banner p { color: #f3ead2; margin: 0; font-size: 1rem; }

/* Hero */
.ims-hero {
  text-align: center; padding: 3.2rem 1rem 2.4rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.15); margin-bottom: 1.4rem;
}
.ims-hero h1 {
  font-family: "Russo One", sans-serif; color: var(--ims-gold);
  font-size: clamp(1.6rem, 4.2vw, 3rem); letter-spacing: .04em;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.ims-hero .ims-date { font-family: "Russo One", sans-serif; color: var(--ims-cyan); font-size: 1.4rem; }
.ims-hero .lead { color: var(--ims-muted); max-width: 820px; margin: .8rem auto 0 auto; }

/* Cards */
.card, .bslib-card, .bslib-value-box {
  background: var(--ims-panel) !important;
  border: 1px solid var(--ims-border) !important;
  color: var(--ims-text);
  border-radius: 10px;
}
.card-header {
  background: rgba(138, 106, 18, 0.55) !important; color: #fff !important;
  font-weight: 700; border-bottom: 1px solid var(--ims-border) !important;
}
.bslib-value-box .value-box-title { color: var(--ims-muted); }
.bslib-value-box .value-box-value { color: var(--ims-gold); font-weight: 800; }
.bslib-sidebar-layout > .sidebar {
  background: rgba(8, 12, 53, .85) !important; border-right: 1px solid var(--ims-border) !important;
}

.ims-gold { color: var(--ims-gold); }
.ims-muted { color: var(--ims-muted); }
ul.ims-list { padding-left: 1.1rem; }
ul.ims-list li::marker { color: var(--ims-gold); }
ul.ims-list li { margin-bottom: .25rem; }

/* Process chevrons */
.ims-process { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.ims-step { display: flex; flex-direction: column; }
.ims-chevron {
  height: 92px; display: flex; align-items: center; justify-content: center;
  clip-path: polygon(0 0, 85% 0, 100% 50%, 85% 100%, 0 100%, 15% 50%);
  font-size: 2.2rem; color: #fff;
}
.ims-step h5 {
  background: #0b2a5b; color: #fff; text-align: center; padding: .35rem;
  margin: .6rem 0 0 0; font-weight: 700;
}
.ims-step ul {
  background: #d6e4f5; color: #0b1a3a; font-size: .86rem; margin: 0;
  padding: .55rem .6rem .55rem 1.4rem; flex: 1; font-weight: 600;
}
.ims-freq { margin-top: .6rem; text-align: center; font-weight: 800; color: #fff; padding: .3rem; }
.ims-freq.once { background: #9b0d0d; }
.ims-freq.periodic { background: #b45f06; }

/* Customised index steps */
.ims-steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.ims-step3 {
  border-radius: 14px; padding: 1.1rem; text-align: center; color: #fff;
  border: 2px solid rgba(255,255,255,.75);
}
.ims-step3 .num {
  display: inline-block; background: #22e01c; color: #0b1a3a; font-weight: 900;
  width: 2rem; height: 2rem; line-height: 2rem; border-radius: 50%; margin-bottom: .4rem;
}
.ims-step3 h4 { font-family: "Russo One", sans-serif; margin: .2rem 0; }

/* Ecosystem tiles */
.ims-eco { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem; }
.ims-eco .tile { border-radius: 12px; padding: .9rem; background: #e0194f; color: #fff; }
.ims-eco .tile.ims { background: #1029f5; }
.ims-eco .tile h5 { font-weight: 800; margin-bottom: .2rem; }
.ims-eco .tile small { color: #ffe9ef; }

/* Database structure columns */
.ims-db { display: grid; grid-template-columns: repeat(6, 1fr); gap: .8rem; }
.ims-db .col-box { background: #cfe3dc; border-radius: 14px; padding: .8rem .6rem; text-align: center; }
.ims-db .col-box h5 { color: #5f6b77; font-weight: 500; min-height: 3rem; }
.ims-db .tbl, .ims-db .tbl:hover { text-decoration: none; }
.ims-db .tbl {
  display: block; width: 100%; background: #1fa085; color: #fff; border: 2px solid #fff;
  border-radius: 8px; padding: .55rem .2rem; margin: .5rem 0; font-size: .8rem; cursor: pointer;
}
.ims-db .tbl:hover, .ims-db .tbl.active { background: var(--ims-gold-dark); }

/* Forms */
.form-control, .form-select, .selectize-input, .selectize-dropdown {
  background: #0f1858 !important; color: var(--ims-text) !important;
  border-color: rgba(255,255,255,.2) !important;
}
.selectize-dropdown .active { background: var(--ims-gold-dark) !important; }
.selectize-input .item { color: var(--ims-text) !important; }
.selectize-control.multi .selectize-input > div {
  background: var(--ims-gold-dark) !important; color: #fff !important; border-radius: 4px;
}
label, .control-label { color: var(--ims-muted); font-weight: 600; font-size: .85rem; }
.btn-primary { background: var(--ims-gold); border-color: var(--ims-gold); color: #0b1a3a; font-weight: 800; }
.btn-primary:hover { background: #ffcf33; border-color: #ffcf33; color: #0b1a3a; }
.btn-outline-light { font-weight: 700; }
.irs--shiny .irs-bar, .irs--shiny .irs-single, .irs--shiny .irs-from, .irs--shiny .irs-to {
  background: var(--ims-gold); border-color: var(--ims-gold); color: #0b1a3a;
}

/* DataTables on dark */
table.dataTable, .dataTables_wrapper { color: var(--ims-text) !important; font-size: .86rem; }
table.dataTable thead th { background: rgba(138,106,18,.55); color: #fff; border-bottom: 1px solid var(--ims-gold) !important; }
table.dataTable tbody tr { background: transparent !important; }
table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd { background: rgba(255,255,255,.035) !important; }
table.dataTable tbody tr:hover { background: rgba(245,184,0,.12) !important; }
table.dataTable td { border-top: 1px solid rgba(255,255,255,.06) !important; }
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select {
  background: #0f1858; color: var(--ims-text); border: 1px solid rgba(255,255,255,.2);
}
.dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_paginate,
.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter { color: var(--ims-muted) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--ims-muted) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current { background: var(--ims-gold) !important; color: #0b1a3a !important; border: none; }
.pos { color: #3ddc84; font-weight: 700; }
.neg { color: #ff5c6c; font-weight: 700; }

.ims-formula { background: rgba(255,255,255,.04); border-left: 4px solid var(--ims-gold); padding: .6rem 1rem; margin: .6rem 0; overflow-x: auto; }
.ims-note { font-size: .8rem; color: var(--ims-muted); }
.ims-footer {
  border-top: 1px solid rgba(255,255,255,.15); margin-top: 2rem; padding: .8rem 0 1.4rem 0;
  text-align: center; color: var(--ims-muted); font-size: .8rem;
}
.ims-leader { display: flex; gap: 1.2rem; align-items: flex-start; }
.ims-avatar {
  flex: 0 0 96px; height: 96px; border-radius: 50%; background: var(--ims-banner);
  display: flex; align-items: center; justify-content: center;
  font-family: "Russo One", sans-serif; font-size: 2rem; color: #fff; border: 3px solid var(--ims-gold);
}

@media (max-width: 992px) {
  .ims-process, .ims-steps3 { grid-template-columns: 1fr 1fr; }
  .ims-db { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 576px) {
  .ims-process, .ims-steps3 { grid-template-columns: 1fr; }
  .ims-db { grid-template-columns: repeat(2, 1fr); }
  .ims-leader { flex-direction: column; }
}

.btn-outline-light { color: var(--ims-gold) !important; border-color: var(--ims-gold) !important; background: transparent; opacity: 1; }
.btn-outline-light:hover { background: rgba(245,184,0,.15) !important; }
.shiny-download-link.disabled { opacity: .45; }

/* ===== Observatory-style shell (navbar + home hero) ===== */
body { font-family: "Poppins", sans-serif; }
.navbar { background: #0a1238 !important; border-bottom: 1px solid #c9a227 !important; min-height: 82px; }
.ims-logo { display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px solid #7f8ab5; border-radius: 8px; padding: 2px 12px 3px 12px; background: #0d1a5a; line-height: 1; }
.ims-logo-mark { font-family: "Russo One", sans-serif; font-size: 1.9rem; color: #2f6df6;
  text-shadow: 1px 1px 0 #f5b800, -1px 0 0 #fff; letter-spacing: .02em; }
.ims-logo-sub { font-size: .55rem; font-weight: 700; color: #fff; letter-spacing: .18em; border-top: 1px solid #7f8ab5; padding-top: 2px; }
.navbar .nav-link { text-transform: uppercase; letter-spacing: .1em; font-weight: 700 !important; font-size: .92rem !important;
  padding: .9rem 1rem !important; border-bottom: 2px solid transparent; }
.navbar .nav-link.active { color: #e9b54a !important; border-bottom-color: #e9b54a; }
.navbar .dropdown-menu { background: #0d1747; border: 1px solid rgba(233,181,74,.35); }
.navbar .dropdown-item { color: #e8ebf7; font-weight: 500; }
.navbar .dropdown-item.active, .navbar .dropdown-item:hover { background: rgba(233,181,74,.18); color: #e9b54a; }
.ims-search .form-group { margin: 0; }
.ims-search .selectize-input { background: #121c4f !important; border: 1px solid rgba(255,255,255,.22) !important;
  border-radius: 8px !important; padding: .55rem .9rem .55rem 2.3rem !important; position: relative; }
.ims-search .selectize-control::before { content: "\2315"; position: absolute; left: .8rem; top: .45rem; z-index: 2;
  color: #a9b0d6; font-size: 1.1rem; transform: scaleX(-1); }
.ims-asof { text-align: right; font-size: .9rem; color: #c9cfe8; margin: 0 1rem 0 1.4rem; line-height: 1.35; }
.ims-asof .ims-gold { color: #e9b54a; font-weight: 700; }
.ims-demo { display: inline-block; background: #5a1530; color: #ff9db5; font-weight: 800; font-size: .72rem;
  letter-spacing: .12em; padding: .1rem .7rem; border-radius: 999px; }
.ims-icon-btn { background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 8px;
  width: 46px; height: 46px; font-size: 1.1rem; }
.ims-icon-btn:hover { border-color: #e9b54a; color: #e9b54a; }

.ims-hero2 { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center;
  padding: 5rem 3.5rem 4.5rem 3.5rem; margin: 0 -12px 1.5rem -12px;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='1600' height='700' viewBox='0 0 1600 700' fill='none' stroke='%23c9a227' stroke-opacity='0.18'><path d='M-50 330 C 400 120, 900 80, 1650 160'/><path d='M-50 700 C 500 560, 1100 520, 1650 380'/><path d='M200 720 C 700 600, 1200 640, 1650 560' stroke='%2329b6f6' stroke-opacity='0.12'/></svg>") center/cover no-repeat,
    radial-gradient(900px 500px at 70% 30%, #17307a 0%, rgba(10,18,56,0) 70%),
    linear-gradient(180deg, #0b1440 0%, #0a1238 100%);
  border-bottom: 1px solid rgba(255,255,255,.08); }
.ims-eyebrow { color: #e9b54a; text-transform: uppercase; letter-spacing: .32em; font-weight: 600; font-size: .9rem; margin-bottom: 1rem; }
.ims-title { font-family: "Lora", serif; font-weight: 700; color: #fff; font-size: clamp(2.4rem, 4.6vw, 4.2rem); line-height: 1.1; margin: 0; }
.ims-title em { color: #d9a641; font-weight: 500; }
.ims-title-abbr { font-size: .55em; color: #c9cfe8; font-weight: 600; margin-left: .3rem; }
.ims-rule { width: 110px; height: 3px; background: #d9a641; margin: 1.4rem 0 1.6rem 0; }
.ims-intro { font-size: 1.15rem; line-height: 1.6; color: #dfe3f5; font-weight: 300; max-width: 780px; }
.ims-intro strong { color: #fff; font-weight: 600; }
.ims-cta { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: 2rem; }
.btn-ims-red, .btn-ims-green, .btn-ims-blue { color: #fff !important; border: none; border-radius: 8px; padding: 1rem 2.4rem;
  text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: 1rem; }
.btn-ims-red { background: #d92c3a; box-shadow: 0 10px 28px rgba(217,44,58,.35); }
.btn-ims-green { background: #1fa45a; box-shadow: 0 10px 28px rgba(31,164,90,.35); }
.btn-ims-red:hover { background: #ee3a48; } .btn-ims-green:hover { background: #27b866; }
.ims-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.ims-stat { background: rgba(32, 46, 100, .55); border: 1px solid rgba(255,255,255,.14); border-radius: 18px; padding: 1.5rem 1.6rem; }
.ims-stat .num { font-family: "Lora", serif; font-weight: 700; color: #f1cd78; font-size: 2.8rem; line-height: 1.1; }
.ims-stat .lbl { color: #c9cfe8; font-weight: 500; letter-spacing: .03em; margin-top: .3rem; }
@media (max-width: 992px) {
  .ims-hero2 { grid-template-columns: 1fr; padding: 3rem 1.2rem; }
}
@media (max-width: 576px) { .ims-stats { grid-template-columns: 1fr 1fr; } .ims-stat .num { font-size: 2rem; } }
.navbar { position: relative; z-index: 1030; }
.navbar .dropdown-menu { z-index: 1040; }

/* Monitor */
.ims-pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.ims-pipe-head { display: flex; align-items: center; gap: .5rem; }
.ims-pipe-dot { width: 26px; height: 26px; border-radius: 50%; background: #1fa45a; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; }
.ims-pipe-bar { height: 6px; background: rgba(255,255,255,.1); border-radius: 3px; margin: .6rem 0 .3rem 0; overflow: hidden; }
.ims-pipe-bar > div { height: 100%; background: linear-gradient(90deg, #1fa45a, #3ddc84); }
.ims-badge { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.ims-badge.ok { background: rgba(31,164,90,.25); color: #3ddc84; }
.ims-badge.warn { background: rgba(245,184,0,.2); color: #f5b800; }
.ims-badge.info { background: rgba(41,182,246,.2); color: #29b6f6; }
.ims-badge.err { background: rgba(255,92,108,.2); color: #ff5c6c; }
table.dataTable thead tr:nth-child(2) td input, table.dataTable thead tr:nth-child(2) td select { background: #0f1858; color: #e8ebf7; border: 1px solid rgba(255,255,255,.2); }
@media (max-width: 992px) { .ims-pipeline { grid-template-columns: 1fr 1fr; } }
.navbar .nav-link { padding: .9rem .7rem !important; font-size: .86rem !important; letter-spacing: .08em; }
.ims-asof { margin: 0 .8rem 0 .8rem; font-size: .82rem; }
.ims-search .selectize-input input { min-width: 160px; }
.ims-title { font-size: clamp(2.2rem, 3.8vw, 3.6rem); }

/* v3: no logo, collapsible search, full-width hero title, stats below */
.navbar-brand { display: none; }
.ims-search { display: flex; align-items: center; gap: .5rem; }
.ims-search .ims-search-box { width: 0; overflow: hidden; opacity: 0; transition: width .25s ease, opacity .2s ease; }
.ims-search.open .ims-search-box { width: 260px; overflow: visible; opacity: 1; }
.ims-search.open .ims-search-toggle { border-color: #e9b54a; color: #e9b54a; }
.ims-search .selectize-control::before { content: none; }
.ims-search .selectize-input { padding-left: .9rem !important; }
.ims-hero2 { grid-template-columns: 1fr; gap: 0; padding: 4rem 3.5rem 3.5rem 3.5rem; }
.ims-title { white-space: nowrap; font-size: clamp(2rem, 4.4vw, 4.6rem); }
.ims-intro { max-width: 1100px; }
.ims-stats { grid-template-columns: repeat(4, 1fr); margin-top: 3rem; }
@media (max-width: 1200px) { .ims-title { white-space: normal; } }
@media (max-width: 992px) { .ims-stats { grid-template-columns: 1fr 1fr; } .ims-hero2 { padding: 3rem 1.2rem; } }

/* Observatory-style home sections */
.ims-section { padding: 3.2rem 2.3rem 1rem 2.3rem; }
.ims-section-head .ims-rule { margin: 1rem 0 1.8rem 0; }
.ims-h2 { font-family: "Lora", serif; font-weight: 700; color: #fff; font-size: clamp(1.7rem, 2.8vw, 2.6rem); margin: 0; }
.ims-h2 em { color: #d9a641; font-weight: 500; }
.ims-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.ims-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.ims-glass { background: rgba(32, 46, 100, .55); border: 1px solid rgba(255,255,255,.14); border-radius: 18px;
  padding: 1.6rem 1.6rem 1.2rem 1.6rem; transition: border-color .2s, transform .2s; }
.ims-glass:hover { border-color: rgba(217,166,65,.6); transform: translateY(-2px); }
.ims-glass h3 { font-family: "Lora", serif; font-weight: 700; color: #fff; font-size: 1.45rem; margin: .8rem 0 .7rem 0; }
.ims-glass ul { list-style: none; padding: 0; margin: 0; }
.ims-glass li { color: #c9cfe8; padding: .35rem 0 .35rem 1.1rem; position: relative; border-top: 1px solid rgba(255,255,255,.06); }
.ims-glass li:first-child { border-top: none; }
.ims-glass li::before { content: ""; position: absolute; left: 0; top: .85rem; width: 6px; height: 6px; border-radius: 50%; background: #d9a641; }
.ims-glass-icon { width: 48px; height: 48px; border-radius: 12px; background: rgba(217,166,65,.15); color: #f1cd78;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.ims-step-top { display: flex; align-items: center; justify-content: space-between; }
.ims-step-num { font-family: "Lora", serif; font-weight: 700; color: #f1cd78; font-size: 2.6rem; line-height: 1; }
.ims-pill { border: 1px solid rgba(217,166,65,.55); color: #e9b54a; border-radius: 999px; padding: .15rem .8rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.ims-journey .ims-glass { position: relative; }
.ims-journey .ims-glass:not(:last-child)::after { content: "\2192"; position: absolute; right: -1.05rem; top: 2rem;
  color: #d9a641; font-size: 1.4rem; z-index: 2; }
@media (max-width: 1200px) { .ims-grid4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) { .ims-grid3, .ims-grid4 { grid-template-columns: 1fr; } .ims-journey .ims-glass::after { display: none; } .ims-section { padding: 2.4rem 1rem 0 1rem; } }

/* indobs "How it works" style */
.ims-section { padding: 3.5rem 2.5rem 1.5rem 2.5rem; background: #0a1230; margin: 0 -12px; }
.ims-section-head { text-align: center; margin-bottom: 2.2rem; }
.ims-eyebrow2 { display: inline-block; color: #fff; background: #0b2fa8; text-transform: uppercase;
  letter-spacing: .3em; font-weight: 600; font-size: .85rem; padding: .05rem .2rem .05rem .5rem; }
.ims-section-head .ims-h2 { color: #f1cd78; font-family: "Lora", serif; font-weight: 700; margin-top: .9rem; }
.ims-rule2 { width: 112px; height: 3px; background: #d9a641; margin: 1.3rem auto 0 auto; border-radius: 2px; }
.ims-card2 { display: flex; gap: 1.4rem; background: #1b2445; border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px; padding: 1.7rem 1.8rem 1.5rem 1.8rem; transition: border-color .2s; }
.ims-card2:hover { border-color: rgba(217,166,65,.5); }
.ims-card2-icon { flex: 0 0 72px; height: 72px; border-radius: 14px; color: #f1cd78; font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #2a62e6 0%, #10339c 100%); box-shadow: 0 6px 18px rgba(16,51,156,.45); }
.ims-card2-body h3 { font-family: "Lora", serif; font-weight: 600; color: #fff; font-size: 1.6rem; margin: .4rem 0 .9rem 0; }
.ims-card2-body p { color: #a9b3d6; font-size: 1.05rem; line-height: 1.65; margin-bottom: .9rem; }
.ims-open { color: #e0a43a !important; font-weight: 700; text-decoration: none !important; font-size: 1.05rem; }
.ims-open:hover { color: #f1cd78 !important; }
.ims-grid4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1400px) { .ims-grid4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) { .ims-grid3, .ims-grid4 { grid-template-columns: 1fr; } .ims-card2 { flex-direction: column; } .ims-section { padding: 2.4rem 1rem 1rem 1rem; } }

/* Indexes process flow */
.ims-flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2.2rem; }
.ims-flow-card { position: relative; background: #1b2445; border: 1px solid rgba(255,255,255,.08); border-radius: 16px;
  padding: 1.5rem 1.5rem 1.3rem 1.5rem; display: flex; flex-direction: column; transition: border-color .2s; }
.ims-flow-card:hover { border-color: rgba(217,166,65,.5); }
.ims-flow-card:not(:last-child)::after { content: "\203A"; position: absolute; right: -1.65rem; top: 50%; transform: translateY(-50%);
  color: #d9a641; font-size: 2.6rem; font-family: "Lora", serif; line-height: 1; }
.ims-flow-top { display: flex; align-items: center; justify-content: space-between; }
.ims-flow-card .ims-card2-icon { flex: 0 0 60px; width: 60px; height: 60px; font-size: 1.35rem; }
.ims-flow-card .ims-step-num { font-family: "Lora", serif; font-weight: 700; color: rgba(241,205,120,.35); font-size: 2.4rem; }
.ims-flow-card h3 { font-family: "Lora", serif; font-weight: 600; color: #fff; font-size: 1.45rem; margin: 1rem 0 .6rem 0; }
.ims-flow-card p { color: #a9b3d6; font-size: .98rem; line-height: 1.6; flex: 1; }
@media (max-width: 1400px) { .ims-flow { grid-template-columns: repeat(3, 1fr); } .ims-flow-card:nth-child(3)::after { display: none; } }
@media (max-width: 768px) { .ims-flow { grid-template-columns: 1fr; gap: 1.2rem; } .ims-flow-card::after { display: none; } }
.ims-eyebrow { letter-spacing: .26em; }

/* Card detail pages */
.ims-page-hero { padding-bottom: 3rem; }
.ims-page-num { font-family: "Lora", serif; color: rgba(241,205,120,.4); margin-right: 1rem; }
.ims-dev { max-width: 900px; margin: 0 auto 2rem auto; }
.ims-dev code { color: #f1cd78; background: rgba(255,255,255,.06); padding: .05rem .35rem; border-radius: 4px; }

/* Numbers band */
.ims-band { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 3rem; padding: 1.6rem 0 1.2rem 0;
  border-top: 2px solid #d9a641; text-align: center; position: relative;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='1200' height='160' viewBox='0 0 1200 160' fill='none'><g stroke='%2329b6f6' stroke-opacity='0.22'><path d='M0 120 C 300 20, 600 160, 1200 40'/><path d='M0 100 C 320 10, 640 150, 1200 60'/><path d='M0 140 C 280 40, 620 170, 1200 20'/><path d='M0 80 C 350 0, 650 140, 1200 90'/></g><g stroke='%23d9a641' stroke-opacity='0.35'><path d='M0 150 C 400 60, 700 120, 1200 10'/><path d='M0 30 C 300 140, 800 20, 1200 130'/></g></svg>") center/100% 100% no-repeat; }
.ims-band-item .num { font-family: "Lora", serif; font-weight: 500; color: #f1cd78; font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: 1.05; }
.ims-band-item .lbl { color: #fff; font-weight: 700; font-size: 1.05rem; margin-top: .3rem; }
@media (max-width: 768px) { .ims-band { grid-template-columns: 1fr; gap: 1.2rem; } }
/* hidden card pages: no navbar entry */
.navbar-nav .nav-item:has(> a.nav-link[data-value^="p_"]) { display: none !important; }
.navbar-nav a.nav-link[data-value^="p_"] { display: none !important; }

/* v8: match indobs "How it works" proportions */
.ims-section { padding: 4rem 2.5rem 2.5rem 2.5rem; background: #0a1230; }
.ims-section-head { margin-bottom: 2.4rem; }
.ims-eyebrow2 { background: none; color: #4d8dff; padding: 0; letter-spacing: .32em; font-size: 1rem; font-weight: 600; }
.ims-section-head .ims-h2 { font-size: clamp(2rem, 2.6vw, 2.7rem); color: #f3d084; margin-top: .9rem; font-weight: 600; }
.ims-rule2 { width: 112px; height: 3px; margin-top: 1.4rem; background: #e0a43a; }
.ims-grid3, .ims-flow { max-width: 1600px; margin-left: auto; margin-right: auto; }
.ims-grid3 { gap: 1.6rem; }
.ims-card2 { padding: 1.75rem 1.9rem 1.9rem 1.9rem; gap: 1.5rem; background: #1b2445; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; }
.ims-card2-icon, .ims-flow-card .ims-card2-icon { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 14px; font-size: 1.75rem;
  background: linear-gradient(160deg, #2f6ae8 0%, #133aa6 100%); }
.ims-card2-body h3, .ims-flow-card h3 { font-family: "Lora", serif; font-weight: 600; color: #fff; font-size: 1.8rem; margin: .45rem 0 .8rem 0; }
.ims-card2-body p, .ims-flow-card p { color: #a3aed4; font-size: 1.12rem; line-height: 1.62; margin-bottom: 1rem; }
.ims-open { color: #e0a43a !important; font-size: 1.15rem; font-weight: 700; }
.ims-flow { gap: 1.9rem; }
.ims-flow-card { padding: 1.75rem 1.7rem 1.9rem 1.7rem; background: #1b2445; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; }
.ims-flow-card:not(:last-child)::after { right: -1.5rem; }

/* v9: two process sections, three steps each */
.ims-flow.ims-flow3 { grid-template-columns: repeat(3, 1fr); gap: 2.6rem; }
.ims-flow.ims-flow3 .ims-flow-card:not(:last-child)::after { display: block; right: -1.85rem; }
@media (max-width: 768px) { .ims-flow.ims-flow3 { grid-template-columns: 1fr; } .ims-flow.ims-flow3 .ims-flow-card::after { display: none !important; } }

/* v10: whole card is the link, no "Open" text */
a.ims-card-link { display: block; color: inherit; text-decoration: none; cursor: pointer; position: relative; }
a.ims-card-link:hover { color: inherit; }
a.ims-card-link > .ims-card2, a.ims-card-link > .ims-flow-card { height: 100%; transition: border-color .15s, transform .15s; }
a.ims-card-link:hover > .ims-card2, a.ims-card-link:hover > .ims-flow-card { border-color: rgba(217,166,65,.6); transform: translateY(-2px); }
.ims-flow > a.ims-card-link .ims-flow-card::after { display: none !important; }
.ims-flow > a.ims-card-link:not(:last-child)::after { content: "\203A"; position: absolute; right: -1.85rem; top: 50%; transform: translateY(-50%);
  color: #e0a43a; font-size: 2.2rem; line-height: 1; }
@media (max-width: 768px) { .ims-flow > a.ims-card-link::after { display: none; } }

/* v11: links to the section pages inside text */
a.ims-text-link { color: #f3d084; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(243,208,132,.55); }
a.ims-text-link:hover { color: #ffd98a; border-bottom-color: #ffd98a; }
.ims-eyebrow2 a.ims-text-link { color: #4d8dff; font-weight: inherit; border-bottom-color: rgba(77,141,255,.55); }
.ims-eyebrow2 a.ims-text-link:hover { color: #7aa9ff; }

/* v12: the three figures in the original stat-box style */
.ims-stats.ims-stats3 { grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 3rem; }
.ims-stats3 .ims-stat { background: #182352; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 1.6rem 2rem; }
.ims-stats3 .ims-stat .num { font-size: 3rem; }
.ims-stats3 .ims-stat .lbl { color: #c9cfe8; font-size: 1.1rem; }
@media (max-width: 768px) { .ims-stats.ims-stats3 { grid-template-columns: 1fr; } }

/* ===== v13: Dashboard screener, index detail and comparison (indobs style) ===== */
.ims-page-head { padding: 3rem max(1.5rem, calc((100% - 1600px) / 2)) 2.6rem; border-bottom: 1px solid rgba(255,255,255,.06);
  background: radial-gradient(ellipse at 70% 0%, rgba(40,70,170,.35), transparent 60%), linear-gradient(180deg, #111a5a 0%, #0d1450 100%); }
.ims-page-head h1 { font-family: "Lora", serif; font-weight: 700; color: #fff; font-size: clamp(2.2rem, 3vw, 3rem); margin: .9rem 0 1rem; }
.ims-page-head > p { color: #dfe4f5; font-size: 1.15rem; line-height: 1.6; max-width: 1100px; margin: 0; }
.ims-crumb { color: #dfe4f5; font-size: 1.05rem; }
.ims-crumb a { color: #f1cd78; text-decoration: none; }
.ims-crumb a:hover { text-decoration: underline; }

.ims-screener { padding: 2.6rem max(1.5rem, calc((100% - 1600px) / 2)) 1rem; }
.ims-screener.ims-after { padding-top: 0; }
.ims-filters { display: grid; grid-template-columns: 2fr repeat(5, 1fr); gap: 1rem; align-items: end; }
.ims-filters .form-group, .ims-filters .shiny-input-container { width: 100% !important; margin-bottom: 0; }
.ims-filters label { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: #c9cfe8; margin-bottom: .55rem; }
.ims-filters .form-control, .ims-filters .form-select, .ims-filters select, .ims-filters .selectize-input {
  background: #121c52 !important; border: 1px solid rgba(255,255,255,.16) !important; border-radius: 8px; color: #fff !important;
  min-height: 50px; font-size: 1.05rem; padding: .7rem 1rem; }
.ims-filters select { appearance: auto; }
.ims-filters .form-control::placeholder { color: #8d96bd; }
.ims-filters-cmp { grid-template-columns: 2.4fr 1.2fr 1fr; }
.ims-f-checks { display: flex; gap: 1.2rem; align-items: center; padding-bottom: .6rem; }
.ims-f-checks .checkbox label, .ims-f-checks .form-check-label { text-transform: none; letter-spacing: 0; font-size: 1rem; font-weight: 500; }
.ims-f-checks .shiny-input-container { width: auto !important; }

.ims-chipbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1.4rem 0 1.4rem; }
.ims-chips { display: flex; gap: .6rem; flex-wrap: wrap; }
.ims-chip { background: #121c52; color: #fff; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: .5rem 1.1rem;
  font-size: 1.02rem; font-weight: 500; cursor: pointer; }
.ims-chip .n { color: #8d96bd; margin-left: .35rem; }
.ims-chip:hover { border-color: rgba(241,205,120,.6); }
.ims-chip.active { background: #e0a43a; color: #0d1450; border-color: #e0a43a; }
.ims-chip.active .n { color: rgba(13,20,80,.6); }
.ims-chip-tools { display: flex; gap: .8rem; align-items: center; }
.ims-count { color: #c9cfe8; font-size: 1.15rem; margin-right: .4rem; }
.ims-count strong { color: #f1cd78; font-size: 1.3rem; }
.btn-ims-dark { background: #121c52 !important; color: #fff !important; border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 8px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; padding: .75rem 1.3rem; }
.btn-ims-dark:hover { border-color: #e0a43a !important; color: #f1cd78 !important; }

.ims-table-card, .ims-panel { background: #121a4c; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; overflow: hidden; }
.ims-table-card { margin-bottom: 2rem; }
table.dataTable.ims-screen-table { font-size: 1.05rem !important; margin: 0 !important; border-collapse: collapse !important; width: 100% !important; }
table.dataTable.ims-screen-table thead th { background: #1b2559 !important; color: #fff; text-transform: uppercase; letter-spacing: .06em;
  font-size: .9rem; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.1) !important; padding: 1.05rem 1rem !important; }
table.dataTable.ims-screen-table tbody tr { background: transparent !important; cursor: pointer; }
table.dataTable.ims-screen-table tbody tr:hover { background: rgba(241,205,120,.07) !important; }
table.dataTable.ims-screen-table tbody td { padding: .95rem 1rem !important; border-top: 1px solid rgba(255,255,255,.07) !important; vertical-align: middle; color: #e8ebf7; }
table.dataTable.ims-screen-table tbody tr.selected td { box-shadow: none !important; background: rgba(241,205,120,.1) !important; }
.ix-name { color: #f1cd78; font-weight: 700; font-size: 1.08rem; }
.ix-sub { color: #a3aed4; font-size: .92rem; margin-top: .15rem; }
.ix-ccy { background: #22306b; color: #dfe4f5; border-radius: 999px; padding: .25rem .6rem; font-size: .88rem; font-weight: 600; }
.up { color: #22c55e; font-weight: 600; }
.down { color: #ef4444; font-weight: 600; }
.ims-table-card .dataTables_paginate { padding: .8rem 1rem !important; }

/* Index detail */
.ims-det-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.ims-det-head h1 { margin-top: 1.8rem; }
.ims-det-sub { color: #dfe4f5; font-size: 1.15rem; margin-bottom: 1rem; }
.ims-tags { display: flex; gap: .6rem; flex-wrap: wrap; }
.ims-tag { background: #121c52; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: .45rem 1rem; color: #fff; font-size: 1rem; }
.ims-det-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.ims-det-last { font-family: "Lora", serif; font-weight: 700; color: #fff; font-size: 3.2rem; line-height: 1.1; margin-top: 1.2rem; }
.ims-det-chg { font-size: 1.4rem; font-weight: 700; }
.ims-det-date { color: #c9cfe8; font-size: 1.05rem; margin-top: .3rem; }
.ims-det-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1.6rem; margin-bottom: 1.6rem; }
.ims-det-grid2 { grid-template-columns: 1fr 1.4fr; }
.ims-panel { padding: 1.6rem 1.8rem; margin-bottom: 1.6rem; overflow: visible; }
.ims-det-grid .ims-panel { margin-bottom: 0; }
.ims-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.ims-panel-head h3 { margin: 0; color: #f1cd78; text-transform: uppercase; letter-spacing: .1em; font-size: 1.15rem; font-weight: 700;
  border-left: 4px solid #e0a43a; padding-left: .8rem; font-family: "Poppins", sans-serif; }
.ims-periods { display: flex; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; overflow: hidden; }
.ims-per { background: transparent; border: none; color: #fff; font-weight: 700; padding: .5rem .9rem; font-size: .95rem; cursor: pointer; }
.ims-per:hover { color: #f1cd78; }
.ims-per.active { background: #e0a43a; color: #0d1450; }
.ims-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.ims-tile { background: #1d2a66; border-radius: 10px; padding: 1.3rem 1.4rem; min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; }
.ims-tile .lbl { text-transform: uppercase; color: #fff; font-size: .9rem; letter-spacing: .04em; }
.ims-tile .val { font-size: 1.6rem; font-weight: 700; color: #fff; margin-top: .8rem; }
.ims-spec { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 2.5rem; }
.ims-spec-row { display: flex; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.ims-spec-row .k { flex: 0 0 160px; color: #a3aed4; text-transform: uppercase; font-size: .85rem; letter-spacing: .06em; padding-top: .15rem; }
.ims-spec-row .v { color: #fff; }
@media (max-width: 1200px) { .ims-filters { grid-template-columns: repeat(3, 1fr); } .ims-det-grid, .ims-det-grid2 { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .ims-filters, .ims-filters-cmp, .ims-spec { grid-template-columns: 1fr; } .ims-tiles { grid-template-columns: 1fr 1fr; }
  .ims-det-right { align-items: flex-start; text-align: left; } }
.ims-tile .val.up { color: #22c55e; }
.ims-tile .val.down { color: #ef4444; }
.ims-panel table.dataTable thead th { background: #1b2559 !important; color: #fff; text-transform: uppercase; letter-spacing: .05em;
  font-size: .82rem; border-bottom: 1px solid rgba(255,255,255,.1) !important; }
.ims-panel table.dataTable tbody tr.odd { background: transparent !important; }
.ims-filters-cmp { align-items: start; margin-bottom: 1.6rem; }
.ims-filters-cmp .ims-f-checks { padding-top: 2.1rem; }

/* v14: same page header on every page */
.ims-page-head { margin-bottom: 2rem; }
.ims-page-head + .ims-screener, .ims-det-head + .ims-screener { margin-top: -2rem; }
.shiny-html-output > .ims-page-head { margin-bottom: 0; }

/* v15: auto reload notice */
#ims-reload { display: none; position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 3000;
  background: #e0a43a; color: #0d1450; font-weight: 700; padding: .7rem 1.4rem; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
#shiny-disconnected-overlay { display: none !important; }

/* v16: Help submenu, database structure and tables */
.navbar .dropdown-menu { background: #121a4c; border: 1px solid rgba(241,205,120,.35); border-radius: 12px; padding: .5rem;
  box-shadow: 0 14px 34px rgba(0,0,0,.45); min-width: 250px; margin-top: .4rem; }
.navbar .dropdown-item { color: #fff; border-radius: 8px; padding: .65rem 1rem; font-weight: 600; letter-spacing: .02em;
  display: flex; align-items: center; gap: .7rem; text-transform: none; }
.navbar .dropdown-item .fa, .navbar .dropdown-item svg { color: #e0a43a; width: 1.1rem; }
.navbar .dropdown-item:hover, .navbar .dropdown-item:focus { background: rgba(241,205,120,.12); color: #f1cd78; }
.navbar .dropdown-item.active { background: #e0a43a; color: #0d1450; }
.navbar .dropdown-item.active svg { color: #0d1450; }

.ims-dbnav { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.ims-dbnav a.ims-chip { text-decoration: none; }
.ims-dbnav a.ims-chip svg { color: #e0a43a; }
.ims-dbgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(480px, 1fr)); gap: 1.2rem; }
.ims-dbcard { background: #1b2559; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 1.2rem 1.3rem; }
.ims-dbcard-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
a.ims-dbname { font-family: "Russo One", "Poppins", sans-serif; color: #f1cd78; font-size: 1.25rem; letter-spacing: .04em; text-decoration: none; }
a.ims-dbname:hover { text-decoration: underline; }
.ims-dbcount { color: #8d96bd; font-size: .9rem; }
.ims-dbdesc { color: #c9cfe8; margin: .4rem 0 .9rem; }
table.ims-struct { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.ims-struct th { text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; color: #a3aed4; font-weight: 700;
  padding: .45rem .5rem; border-bottom: 1px solid rgba(255,255,255,.14); text-align: left; }
table.ims-struct td { padding: .45rem .5rem; border-bottom: 1px solid rgba(255,255,255,.06); color: #e8ebf7; vertical-align: top; }
table.ims-struct td.c { color: #fff; font-weight: 600; font-family: ui-monospace, Menlo, Consolas, monospace; }
table.ims-struct td.t { color: #7aa9ff; font-family: ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
.ims-key { background: rgba(224,164,58,.15); color: #f1cd78; border-radius: 6px; padding: .1rem .45rem; font-size: .78rem; font-weight: 700; white-space: nowrap; }

.ims-tbl-layout { display: grid; grid-template-columns: 260px 1fr; gap: 1.6rem; align-items: start; }
.ims-tbl-menu { background: #121a4c; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 1rem; position: sticky; top: 1rem; }
.ims-tbl-group { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: #a3aed4; margin: .9rem .4rem .4rem; }
.ims-tbl-group:first-child { margin-top: .2rem; }
.ims-tbl-group svg { color: #e0a43a; margin-right: .4rem; }
.ims-tbl-item { display: block; width: 100%; text-align: left; background: transparent; border: none; color: #fff; border-radius: 8px;
  padding: .45rem .8rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95rem; cursor: pointer; }
.ims-tbl-item:hover { background: rgba(241,205,120,.1); color: #f1cd78; }
.ims-tbl-item.active { background: #e0a43a; color: #0d1450; font-weight: 700; }
.ims-tbl-main { min-width: 0; }
.ims-dbmeta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.ims-dbmeta .ims-dbdesc { flex-basis: 100%; margin: 0 0 .3rem; }
.ims-tbl-main .dataTables_filter input { background: #121c52; border: 1px solid rgba(255,255,255,.16); color: #fff; border-radius: 8px; }
@media (max-width: 992px) { .ims-tbl-layout { grid-template-columns: 1fr; } .ims-tbl-menu { position: static; } .ims-dbgrid { grid-template-columns: 1fr; } }
.navbar .dropdown-item svg { fill: #e0a43a !important; }
.navbar .dropdown-item.active svg { fill: #0d1450 !important; }
.ims-tbl-main .dataTables_wrapper { overflow-x: auto; }
.ims-tbl-main .dataTables_filter label { color: #a3aed4; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; font-weight: 700; }
.ims-tbl-main .dataTables_filter input { padding: .4rem .7rem; margin-left: .5rem; }
.navbar .dropdown-item svg, .navbar .dropdown-item i { display: none; }

/* v17: card header row (icon + title + number), text below */
.ims-card3 { display: flex !important; flex-direction: column !important; gap: 0; }
.ims-card3 .ims-card3-head { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.1rem; }
.ims-card3 .ims-card3-head .ims-card2-icon { flex: 0 0 64px; width: 64px; height: 64px; font-size: 1.55rem; margin: 0; }
.ims-card3 .ims-card3-head h3 { flex: 1; margin: 0 !important; font-family: "Lora", serif; font-weight: 600; color: #fff;
  font-size: 1.65rem; line-height: 1.2; }
.ims-card3 .ims-card3-head .ims-step-num { font-family: "Lora", serif; font-weight: 700; color: rgba(241,205,120,.35);
  font-size: 2.2rem; line-height: 1; margin-left: auto; }
.ims-card3 > p { color: #a3aed4; font-size: 1.1rem; line-height: 1.6; margin: 0; }
.ims-card3.ims-card2 { padding: 1.75rem 1.7rem 1.9rem 1.7rem; }

/* v18: menu text +1px */
.navbar .navbar-nav > .nav-item > .nav-link { font-size: calc(.86rem + 1px) !important; }
@media (max-width: 1440px) { .navbar .navbar-nav > .nav-item > .nav-link { padding-left: .4rem !important; padding-right: .4rem !important; letter-spacing: .04em !important; } }

/* v19: Settings > Options (theme, language) */
.ims-options { border-bottom: 1px solid rgba(255,255,255,.12); padding-bottom: .8rem; margin-bottom: .8rem; }
.ims-opt-title { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: #e0a43a; margin-bottom: .6rem; }
.ims-opt-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .55rem; }
.ims-opt-lbl { font-weight: 600; font-size: .92rem; }
.ims-opt-group { display: flex; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; overflow: hidden; }
.ims-opt { background: transparent; border: none; color: inherit; font-weight: 700; font-size: .82rem; padding: .35rem .7rem; cursor: pointer; }
.ims-opt + .ims-opt { border-left: 1px solid rgba(255,255,255,.12); }
.ims-opt:hover { color: #f1cd78; }
.ims-opt.active { background: #e0a43a; color: #0d1450; }
.popover { max-width: 330px; }
html[data-theme="light"] .ims-options { border-bottom-color: #dde3f0; }
html[data-theme="light"] .ims-opt-group { border-color: #dde3f0; }
html[data-theme="light"] .ims-opt + .ims-opt { border-left-color: #dde3f0; }
html[data-theme="light"] .ims-opt.active { background: #b7811d; color: #fff; }
.btn-ims-blue { background: #1f4fd1; box-shadow: 0 10px 28px rgba(31,79,209,.35); }
.btn-ims-blue:hover { background: #2d61ea; }
.ims-grid-ref { grid-template-columns: repeat(4, 1fr) !important; max-width: none; }
.ims-section-gap { height: 2rem; }
@media (max-width: 1100px) { .ims-grid-ref { grid-template-columns: 1fr 1fr !important; } }
/* light theme: bootstrap table cells */
html[data-theme="light"] .table > :not(caption) > * > * { background-color: transparent !important; color: var(--l-text) !important; box-shadow: none !important; }
html[data-theme="light"] .table-striped > tbody > tr:nth-of-type(odd) > * { background-color: #f6f8fd !important; }

/* v20: navigation path, current page in sky blue */
.ims-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; color: #dfe4f5; font-size: 1.05rem; margin-bottom: .2rem; }
.ims-crumb a.ims-crumb-link { color: #f1cd78; text-decoration: none; }
.ims-crumb a.ims-crumb-link:hover { text-decoration: underline; }
.ims-crumb .ims-sep { color: #8d96bd; }
.ims-crumb .ims-crumb-cur { color: #6cc4ff; }
.ims-page-hero .ims-crumb { margin-bottom: 1.4rem; }
html[data-theme="light"] .ims-crumb a.ims-crumb-link { color: #a06f12; }
html[data-theme="light"] .ims-crumb .ims-crumb-cur { color: #0a8fd6; }

/* v21: settings panel (replaces the popover) */
.ims-settings { position: relative; }
.ims-settings-panel { display: none; position: absolute; right: 0; top: calc(100% + .6rem); width: 320px; z-index: 1060;
  background: #121a4c; border: 1px solid rgba(241,205,120,.35); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.45);
  padding: 1rem 1.1rem .4rem; color: #e8ebf7; font-size: .92rem; text-transform: none; letter-spacing: 0; }
.ims-settings-panel.open { display: block; }
.ims-settings-panel p { color: #c9cfe8; margin-bottom: .6rem; }
.ims-settings-title { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 1rem;
  margin-bottom: .8rem; color: #fff; }
.ims-settings-close { background: none; border: none; color: #a3aed4; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.ims-settings-close:hover { color: #f1cd78; }
html[data-theme="light"] .ims-settings-panel { background: #fff; border-color: #dde3f0; color: #1a2350; box-shadow: 0 14px 34px rgba(26,35,80,.14); }
html[data-theme="light"] .ims-settings-panel p { color: #5a6385; }
html[data-theme="light"] .ims-settings-title { color: #1a2350; }

/* ---- v22: table name under each table ---- */
.ims-tblcap { display: flex; gap: .5rem; align-items: baseline; justify-content: center; margin-top: .7rem; padding-top: .55rem;
  border-top: 1px dashed rgba(255,255,255,.14); font-size: .85rem; color: #9aa3c7; }
.ims-tblcap strong { color: #6cc4ff; font-weight: 600; letter-spacing: .02em; }
.ims-tblcap .f { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; opacity: .8; }
html[data-theme="light"] .ims-tblcap { color: #5a6385; border-top-color: rgba(0,0,0,.15); }
html[data-theme="light"] .ims-tblcap strong { color: #0a8fd6; }

/* ---- v23: Reference page, ims_reference table ---- */
.ims-refpanel .datatables { overflow-x: auto; }
.ims-refpanel .ims-tblcap { margin: .2rem 1rem .9rem; }
.ims-refpanel table.dataTable tbody tr { cursor: pointer; }
.ims-refpanel table.dataTable td { white-space: nowrap; }
@media (max-width: 1100px) { .ims-filters.ims-filters-ref { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }

/* ---- v24: table names in lower case ---- */
#db_title, .ims-dbname, .ims-tbl-item, .ims-tblcap strong { text-transform: none !important; }

/* ---- v25: gold column headers in the Indexes reference table ---- */
.ims-refpanel table.dataTable.ims-screen-table thead th { color: #f1cd78 !important; }
html[data-theme="light"] .ims-refpanel table.dataTable.ims-screen-table thead th { color: #9a6b00 !important; }

/* ---- v26: Help > Table display ---- */
table.ims-disp-list td, table.ims-disp-list th, table.ims-disp-fields td, table.ims-disp-fields th { padding: .7rem .75rem; vertical-align: middle; }
table.ims-struct th.n, table.ims-struct td.n { text-align: right; }
table.ims-disp-list tr.sel td { background: rgba(245,184,0,.12); }
table.ims-disp-list tr.sel .ims-dbname { color: #f5b800; }
.ims-disp-hint { margin: .9rem 0 0; }
.ims-disp-tools { display: flex; gap: .5rem; flex-wrap: wrap; }
table.ims-disp-fields td.n { width: 4rem; color: #a3aed4; }
table.ims-disp-fields td.mv { width: 6rem; white-space: nowrap; }
.ims-mv { background: #121c52; border: 1px solid rgba(255,255,255,.16); color: #e8ebf7; border-radius: 6px; width: 2rem; height: 2rem; margin-right: .25rem; font-size: .7rem; }
.ims-mv:hover:not([disabled]) { border-color: #f5b800; color: #f5b800; }
.ims-mv[disabled] { opacity: .3; }
.ims-disp-label { background: #121c52 !important; border: 1px solid rgba(255,255,255,.16) !important; color: #fff !important; max-width: 22rem; padding: .35rem .6rem; }
table.ims-disp-fields .form-check-input { width: 1.25rem; height: 1.25rem; margin: 0; }
table.ims-disp-fields tr.off td.c, table.ims-disp-fields tr.off .ims-disp-label { opacity: .5; }
html[data-theme="light"] .ims-mv, html[data-theme="light"] .ims-disp-label { background: #fff !important; color: #1b2559 !important; border-color: rgba(0,0,0,.2) !important; }
html[data-theme="light"] table.ims-disp-list tr.sel td { background: rgba(245,184,0,.18); }

/* ---- v27: table body text 1px smaller ---- */
table.dataTable.ims-screen-table tbody td { font-size: 15.8px; }
table.dataTable.ims-screen-table .ix-name { font-size: 16.28px; }
table.dataTable.ims-screen-table .ix-sub { font-size: 13.72px; }
table.dataTable.ims-screen-table .ix-ccy { font-size: 13.08px; }
/* Sub group column: wider than its natural width (168px) */
table.dataTable.ims-screen-table th.ims-col-x2, table.dataTable.ims-screen-table td.ims-col-x2 { min-width: 168px; }

/* ---- v28: Reference tabs (primary / all indexes) in the page header ---- */
.ims-head-split { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.ims-head-split .ims-head-main { flex: 1 1 520px; min-width: 0; }
.ims-ref-tabs { display: flex; gap: 1rem; flex-wrap: wrap; }
.ims-ref-tab { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; min-width: 230px; padding: 1.1rem 1.5rem;
  background: #182352; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; color: #e8ebf7; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.ims-ref-tab .lbl { text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; font-weight: 700; color: #c9cfe8; }
.ims-ref-tab .num { font-size: 2.3rem; font-weight: 700; line-height: 1.1; color: #fff; }
.ims-ref-tab .f { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .75rem; color: #8d96bd; }
.ims-ref-tab:hover:not([disabled]) { border-color: #f1cd78; }
.ims-ref-tab.active { border: 2px solid #f5b800; background: rgba(245,184,0,.12); }
.ims-ref-tab.active .num, .ims-ref-tab.active .lbl { color: #f5b800; }
.ims-ref-tab.missing { opacity: .45; cursor: not-allowed; }
html[data-theme="light"] .ims-ref-tab { background: #fff; border-color: rgba(0,0,0,.14); color: #1b2559; }
html[data-theme="light"] .ims-ref-tab .num { color: #1b2559; }
html[data-theme="light"] .ims-ref-tab .lbl { color: #5a6385; }
html[data-theme="light"] .ims-ref-tab.active { background: #fff6dc; border-color: #d99a00; }
html[data-theme="light"] .ims-ref-tab.active .num, html[data-theme="light"] .ims-ref-tab.active .lbl { color: #9a6b00; }

/* ---- v29: Reference table, columns other than the index name 1px smaller ---- */
.ims-refpanel table.dataTable.ims-screen-table tbody td { font-size: 14.8px; }
.ims-refpanel table.dataTable.ims-screen-table tbody td .ix-ccy { font-size: 12.08px; }
.ims-refpanel table.dataTable.ims-screen-table tbody td:has(.ix-name) { font-size: 15.8px; }

/* ---- v30: sort arrows in table headers, light cyan ---- */
table.dataTable thead th.sorting, table.dataTable thead th.sorting_asc, table.dataTable thead th.sorting_desc {
  background-image: none !important; position: relative; padding-right: 1.7rem !important; }
table.dataTable thead th.sorting::before, table.dataTable thead th.sorting_asc::before, table.dataTable thead th.sorting_desc::before,
table.dataTable thead th.sorting::after, table.dataTable thead th.sorting_asc::after, table.dataTable thead th.sorting_desc::after {
  position: absolute !important; right: .55rem !important; left: auto !important; display: block !important;
  font-size: .62rem !important; line-height: 1 !important; color: #9ff3ff !important; opacity: .6 !important; }
table.dataTable thead th.sorting::before, table.dataTable thead th.sorting_asc::before, table.dataTable thead th.sorting_desc::before { content: "\25B2" !important; bottom: 50% !important; top: auto !important; }
table.dataTable thead th.sorting::after, table.dataTable thead th.sorting_asc::after, table.dataTable thead th.sorting_desc::after { content: "\25BC" !important; top: 52% !important; bottom: auto !important; }
table.dataTable thead th.sorting_asc::before, table.dataTable thead th.sorting_desc::after { opacity: 1 !important; }
/* DataTables 2 */
table.dataTable thead th .dt-column-order::before, table.dataTable thead th .dt-column-order::after { color: #9ff3ff !important; }
html[data-theme="light"] table.dataTable thead th.sorting::before, html[data-theme="light"] table.dataTable thead th.sorting::after,
html[data-theme="light"] table.dataTable thead th.sorting_asc::before, html[data-theme="light"] table.dataTable thead th.sorting_asc::after,
html[data-theme="light"] table.dataTable thead th.sorting_desc::before, html[data-theme="light"] table.dataTable thead th.sorting_desc::after { color: #0a8fd6 !important; }

/* ---- v31: Database page ---- */
.ims-dbp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.ims-dbp-tile { display: flex; flex-direction: column; gap: .15rem; padding: 1.1rem 1.5rem; background: #182352;
  border: 1px solid rgba(255,255,255,.14); border-radius: 16px; }
.ims-dbp-tile .lbl { text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; font-weight: 700; color: #c9cfe8; }
.ims-dbp-tile .num { font-size: 2.1rem; font-weight: 700; line-height: 1.15; color: #f5b800; }
.ims-dbp-tile .f { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .75rem; color: #8d96bd; }
.ims-filters.ims-filters-dbp { grid-template-columns: minmax(0, 420px); }
@media (max-width: 900px) { .ims-dbp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
html[data-theme="light"] .ims-dbp-tile { background: #fff; border-color: rgba(0,0,0,.14); }
html[data-theme="light"] .ims-dbp-tile .num { color: #9a6b00; }
html[data-theme="light"] .ims-dbp-tile .lbl { color: #5a6385; }
#dbp_title { text-transform: none !important; }
/* nine menus: keep one line on smaller screens */
@media (max-width: 1440px) { .navbar .navbar-nav > .nav-item > .nav-link { padding-left: .32rem !important; padding-right: .32rem !important; letter-spacing: .02em !important; } }
@media (max-width: 1340px) { .navbar .navbar-nav > .nav-item > .nav-link { font-size: .8rem !important; } .navbar .ims-asof { display: none; } }

/* ---- v32: Database page tabs ---- */
.ims-dbt-tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.8rem; }
.ims-dbt-tabs .ims-dbt-tab { min-width: 0; padding: .9rem 1rem; }
.ims-dbt-tabs .ims-dbt-tab .lbl { font-size: .72rem; line-height: 1.25; min-height: 1.8em; display: flex; align-items: flex-end; }
.ims-dbt-tabs .ims-dbt-tab .num { font-size: 1.7rem; }
.ims-dbt-tabs .ims-dbt-tab .f { font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ims-dbt-tabs .ims-ref-tab.missing { cursor: pointer; }
@media (max-width: 1200px) { .ims-dbt-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px) { .ims-dbt-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* numbers right-aligned, badges centred */
table.dataTable th.dt-right, table.dataTable td.dt-right { text-align: right !important; }
table.dataTable th.dt-center, table.dataTable td.dt-center { text-align: center !important; }
