
/* Palette from the new decodingit identity. Light-first by commitment:
   the brand is a light-ground asset and a wall-to-wall dark tool was not
   wanted, so dark appears only as deliberate accent. */
.ims-root{
  --deep:  #005598;
  --brand: #007ACD;
  --azure: #42afea;
  --tint:  #9ec5ec;

  --ink:   #0b1a2b;
  --page:  #ffffff;
  --mist:  #eff5fb;
  --line:  #dbe6f0;
  --text:  #1d2c3a;
  --muted: #5b6f81;

  /* Semantic, deliberately separate from the brand accent so a low score
     never reads as "branded" and a high one never reads as an advert. */
  --bad:   #c2410c;
  --warn:  #b45309;
  --ok:    #0e7490;
  --good:  #15803d;

  --f-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

.ims-root *, .ims-root *::before, .ims-root *::after{ box-sizing: border-box; }
.ims-root{
  margin: 0; background: var(--page); color: var(--text);
  font-family: var(--f-sans); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.ims-root .wrap{ max-width: 1180px; margin: 0 auto; padding-inline: 24px; }

.ims-root h1, .ims-root h2, .ims-root h3{ margin: 0; letter-spacing: -.022em; text-wrap: balance; }
.ims-root h1{ font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800; line-height: 1.06; }
.ims-root h2{ font-size: 1.35rem; font-weight: 800; }
.ims-root p{ margin: 0; }

.ims-root .eyebrow{
  font-family: var(--f-mono); font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .16em; color: var(--deep); margin: 0 0 12px;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.ims-root .hero{ background: var(--mist); position: relative; overflow: hidden; }
.ims-root .hero-f{ position: absolute; inset: 0; pointer-events: none; }
.ims-root .hero-f span{ position: absolute; display: block; }
.ims-root .hf1{ top: 0; right: 0; width: 40%; height: 100%; background: var(--tint); opacity: .38;
       clip-path: polygon(36% 0, 100% 0, 100% 100%, 0 100%); }
.ims-root .hf2{ top: 0; right: 0; width: 22%; height: 56%; background: var(--brand); opacity: .16;
       clip-path: polygon(100% 0, 100% 100%, 0 0); }
/* Constrain the CHILDREN, not this element: it also carries .wrap, and a
   max-width here overrides .wrap's, leaving margin:0 auto to centre a narrow
   box while everything below stays left-aligned. */
.ims-root .hero-in{ position: relative; padding-block: 62px 58px; }
.ims-root .hero-in > *{ max-width: 680px; }
.ims-root .hero p.lede{ font-size: 1.08rem; color: var(--muted); margin-top: 18px; }
.ims-root .hero-meta{
  display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 26px;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.ims-root .hero-meta span{ display: inline-flex; align-items: center; gap: 8px; }
.ims-root .hero-meta i{ width: 6px; height: 6px; background: var(--azure);
               clip-path: polygon(50% 0, 100% 100%, 0 100%); }

/* ── Layout ───────────────────────────────────────────────────────────── */
.ims-root .main{ display: grid; grid-template-columns: 1fr 348px; gap: 26px; align-items: start;
        padding-block: 36px 60px; }
@media (max-width: 1000px) { .ims-root .main{ grid-template-columns: 1fr; } }
.ims-root .qcol{ min-width: 0; }

/* ── Domain cards ─────────────────────────────────────────────────────── */
.ims-root .dom{
  border: 1px solid var(--line); background: var(--page); margin-bottom: 16px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}
.ims-root .dom-hd{
  display: flex; align-items: center; gap: 13px; padding: 16px 20px;
  border-bottom: 1px solid var(--line); background: var(--mist);
}
.ims-root .dom-n{
  width: 27px; height: 27px; flex: none; display: grid; place-items: center;
  background: var(--deep); color: #fff; font-size: .78rem; font-weight: 800;
  font-family: var(--f-mono);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
}
.ims-root .dom-t{ font-size: 1rem; font-weight: 700; letter-spacing: -.012em; flex: 1; }
.ims-root .dom-s{
  font-family: var(--f-mono); font-size: .74rem; font-weight: 700;
  color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ims-root .dom-b{ padding: 6px 20px 18px; }

.ims-root .q{ padding: 16px 0; border-bottom: 1px dashed var(--line); }
.ims-root .q:last-child{ border-bottom: none; }
.ims-root .q-t{ font-size: .94rem; font-weight: 700; margin-bottom: 11px; }
.ims-root .opts{ display: grid; gap: 7px; }
.ims-root .opt{
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--line); cursor: pointer; font-size: .87rem;
  color: var(--muted); transition: border-color .14s, background .14s, color .14s;
}
.ims-root .opt:hover{ border-color: var(--tint); background: var(--mist); }
.ims-root .opt input{ margin: 3px 0 0; accent-color: var(--deep); flex: none; }
.ims-root .opt.sel{ border-color: var(--deep); background: rgba(0,85,152,.05); color: var(--text); }
.ims-root .opt-l{ font-family: var(--f-mono); font-size: .62rem; letter-spacing: .09em;
         text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 2px; }
.ims-root .opt.sel .opt-l{ color: var(--deep); }

/* ── Results ──────────────────────────────────────────────────────────── */
.ims-root .res{ position: sticky; top: 18px; }
@media (max-width: 1000px) { .ims-root .res{ position: static; } }
.ims-root .score-card{
  background: var(--ink); color: #fff; padding: 24px 22px; text-align: center;
  position: relative; overflow: hidden;
}
.ims-root .score-card::after{
  content: ''; position: absolute; right: -10%; bottom: -30%;
  width: 62%; height: 100%; background: var(--deep); opacity: .38;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.ims-root .ring{ position: relative; width: 132px; height: 132px; margin: 0 auto 14px; z-index: 1; }
.ims-root .ring svg{ transform: rotate(-90deg); display: block; }
.ims-root .ring-v{
  position: absolute; inset: 0; display: grid; place-content: center; gap: 0;
}
.ims-root .ring-n{ font-size: 2.1rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ims-root .ring-d{ font-family: var(--f-mono); font-size: .6rem; letter-spacing: .14em;
          text-transform: uppercase; color: rgba(255,255,255,.6); margin-top: 5px; }
.ims-root .band{
  position: relative; z-index: 1;
  font-family: var(--f-mono); font-size: .76rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
}
.ims-root .band-d{ position: relative; z-index: 1; font-size: .83rem; color: rgba(255,255,255,.72);
          margin-top: 8px; }
.ims-root .prog{
  position: relative; z-index: 1; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.16);
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.6);
}

.ims-root .panel{ border: 1px solid var(--line); border-top: none; padding: 18px 20px; background: var(--page); }
.ims-root .panel-h{
  font-family: var(--f-mono); font-size: .68rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 13px;
}
.ims-root .bar-row{ margin-bottom: 11px; }
.ims-root .bar-row:last-child{ margin-bottom: 0; }
.ims-root .bar-t{ display: flex; justify-content: space-between; gap: 10px; font-size: .8rem; margin-bottom: 4px; }
.ims-root .bar-t b{ font-variant-numeric: tabular-nums; font-weight: 700; }
.ims-root .bar{ height: 6px; background: var(--mist); border: 1px solid var(--line); overflow: hidden; }
.ims-root .bar i{ display: block; height: 100%; width: 0; transition: width .3s ease; }
@media (prefers-reduced-motion: reduce) { .ims-root .bar i{ transition: none; } }

.ims-root .act{ list-style: none; margin: 0; padding: 0; counter-reset: a; }
.ims-root .act li{
  position: relative; padding: 10px 0 10px 30px; border-top: 1px solid var(--line);
  font-size: .86rem; counter-increment: a;
}
.ims-root .act li:first-child{ border-top: none; }
.ims-root .act li::before{
  content: counter(a); position: absolute; left: 0; top: 11px;
  width: 19px; height: 19px; display: grid; place-items: center;
  background: var(--deep); color: #fff; font-family: var(--f-mono);
  font-size: .62rem; font-weight: 700;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
}
.ims-root .act b{ display: block; font-weight: 700; color: var(--text); }
.ims-root .act span{ color: var(--muted); }
.ims-root .empty{ font-size: .85rem; color: var(--muted); }

.ims-root .cta{ background: var(--mist); border: 1px solid var(--line); border-top: none; padding: 18px 20px; }
.ims-root .cta p{ font-size: .82rem; color: var(--muted); margin-bottom: 12px; }
.ims-root .btn{
  display: inline-flex; align-items: center; gap: 8px; width: 100%;
  justify-content: center; padding: 12px 18px; background: var(--deep); color: #fff;
  font-family: var(--f-sans); font-size: .88rem; font-weight: 700;
  text-decoration: none; border: none; cursor: pointer;
}
.ims-root .btn:hover{ background: #00426f; }
.ims-root .btn[disabled]{ background: var(--line); color: var(--muted); cursor: not-allowed; }
.ims-root .bench{
  margin-top: 12px; padding: 11px 13px; border: 1px dashed var(--tint);
  background: rgba(158,197,236,.12); font-size: .78rem; color: var(--muted);
}

.ims-root :where(a, .ims-root button, .ims-root input, .ims-root label):focus-visible{
  outline: 2px solid var(--azure); outline-offset: 2px;
}

/* ── Method ───────────────────────────────────────────────────────────── */
.ims-root .method{ background: var(--mist); border-top: 1px solid var(--line); padding-block: 54px 62px; }
.ims-root .method-g{ display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; margin-top: 26px; }
@media (max-width: 820px) { .ims-root .method-g{ grid-template-columns: 1fr; } }
.ims-root .method h3{ font-size: .98rem; font-weight: 800; color: var(--deep); margin-bottom: 8px; }
.ims-root .method p{ font-size: .89rem; color: var(--muted); max-width: 62ch; }
.ims-root .method p + p{ margin-top: 9px; }
.ims-root .lvl{ width: 100%; border-collapse: collapse; margin-top: 14px; font-size: .84rem; }
.ims-root .lvl th, .ims-root .lvl td{ text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ims-root .lvl th{ font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em;
          text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ims-root .lvl td:first-child{ white-space: nowrap; font-weight: 700; }
.ims-root .tblwrap{ overflow-x: auto; }

.ims-root .note-int{
  margin-top: 30px; border: 1px solid var(--line); border-left: 3px solid var(--azure);
  background: var(--page); padding: 20px 22px;
}
.ims-root .note-int h3{ color: var(--text); }
.ims-root .note-int .tag{
  display: inline-block; font-family: var(--f-mono); font-size: .64rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line); padding: 4px 9px; margin-bottom: 12px;
}

/* ── Theme bleed-through guards ───────────────────────────────────────────
   Scoping stops this tool's rules leaking outward, but the theme still styles
   bare elements inside it. These reset only what the theme actually changes:
   it sets label/legend bold, and gives inputs its own margins. */
.ims-root label { font-weight: 400; margin: 0; }
.ims-root .opt { font-weight: 400; }
.ims-root .opt input[type="radio"] { margin: 3px 0 0; width: auto; height: auto; }
.ims-root .opt-l { font-weight: 600; }
.ims-root .q-t, .ims-root .dom-t, .ims-root .bar-t b, .ims-root .act b { font-weight: 700; }
.ims-root table { margin: 0; }
.ims-root .lvl td, .ims-root .lvl th { background: transparent; }
