/* Fixed income uses the same shell, palette and typography as the Website modules. */

.bond-tool {
  --bg: var(--paper);
  --panel: var(--white);
  --a: var(--brand-teal);
  --b: var(--brand-blue);
  --allocation-a: #06434c;
  --allocation-b: #cc7c26;
  --allocation-b-ink: #7a3d0a;
  --ok: #13735e;
  --bad: #b62c43;
  --gap: 16px;
  color: var(--ink);
  min-width: 0;
}
.bond-tool [hidden] { display: none !important; }

.bond-header {
  margin-bottom: 20px;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 22px;
  background: var(--deep);
  color: var(--white);
  animation: bond-enter .28s ease-out both;
}
.bond-header .eyebrow { color: var(--lime); }
.bond-header h1 {
  margin: 5px 0 9px;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.12;
}
.bond-header > p:last-child { margin: 0; color: #ecf6f5; }
@keyframes bond-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.bond-tool .panel, .bond-tool .kpi {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
.bond-tool .panel { margin-bottom: var(--gap); padding: clamp(16px, 2.1vw, 24px); }
.bond-tool .bond-query { margin-bottom: 10px; }
.bond-tool .row, .bond-tool .g2, .bond-tool .g3, .bond-tool .g4, .bond-tool .ch {
  display: grid;
  gap: var(--gap);
}
.bond-tool .row { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; }
.bond-tool .g2, .bond-tool .ch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bond-tool .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bond-tool .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bond-tool .g3, .bond-tool .g4, .bond-tool .ch { margin-bottom: var(--gap); }
.bond-tool .g2 > .panel, .bond-tool .ch > .panel { margin-bottom: 0; }
.bond-tool .g2 { margin-bottom: var(--gap); }

.bond-tool label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.bond-tool input:not([type="range"]), .bond-tool select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #afc6ca;
  border-radius: 9px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
}
.bond-tool label input[type="number"] { margin-top: 4px; }
.bond-tool input[type="text"] { text-transform: uppercase; }
.bond-tool #rg, .bond-tool #cm { width: auto; max-width: 100%; }
.bond-tool :is(select, .q):focus-visible { outline: 2px solid var(--brand-teal); outline-offset: 2px; }
.bond-tool #w {
  --allocation-track: linear-gradient(to right, var(--allocation-a) 0 var(--allocation-split, 70%),
    var(--allocation-b) var(--allocation-split, 70%) 100%);
  appearance: none;
  display: block;
  width: 100%;
  height: 44px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.bond-tool #w::-webkit-slider-runnable-track { height: 10px; border-radius: 7px; background: var(--allocation-track); }
.bond-tool #w::-moz-range-track { height: 10px; border-radius: 7px; background: var(--allocation-track); }
.bond-tool #w::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -6px;
  border: 2px solid var(--allocation-a);
  border-radius: 50%;
  background: var(--white);
}
.bond-tool #w::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid var(--allocation-a);
  border-radius: 50%;
  background: var(--white);
}
@media (forced-colors: active) {
  .bond-tool #w { appearance: auto; }
}

.bond-tool button {
  min-height: 44px;
  padding: 8px 20px;
  border: 1px solid var(--brand-teal);
  border-radius: 9px;
  background: var(--brand-teal);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.bond-tool button:hover:not(:disabled) { background: var(--deep); border-color: var(--deep); }
.bond-tool button:active:not(:disabled) { transform: translateY(1px); }
.bond-tool button:disabled { opacity: .65; cursor: wait; }
.bond-tool .tabs {
  display: flex;
  gap: 8px;
  margin: 4px 0 var(--gap);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.bond-tool .tabs button { background: var(--white); color: var(--ink); border-color: var(--line); }
.bond-tool .tabs button:hover { background: var(--lime); border-color: var(--brand-teal); }
.bond-tool .tabs button.on { background: var(--deep); color: var(--white); border-color: var(--deep); }

.bond-tool .status {
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #e9f3f2;
  color: var(--deep);
  font-size: 13px;
}
.bond-tool .status.err { border-color: #eed0d5; background: #fff3f4; color: var(--bad); }
.bond-tool .legend { margin: 0 0 var(--gap); color: var(--muted); font-size: 12px; }
.bond-tool .note, .bond-tool .cs, .bond-tool .s { color: var(--muted); font-size: 13px; }
.bond-tool summary { cursor: pointer; font-weight: 650; font-size: 13px; }

.bond-tool .mix { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-weight: 800; }
.bond-tool .mix .a { color: var(--allocation-a); }
.bond-tool .mix .b { color: var(--allocation-b-ink); text-align: right; }
.bond-tool .bar { display: none; }

.bond-tool h2, .bond-tool h3 { margin: 0 0 10px; font-weight: 760; line-height: 1.35; }
.bond-tool h2 { font-size: 17px; }
.bond-tool h3 { font-size: 15px; }
.bond-tool .kpi { padding: clamp(12px, 1.6vw, 19px); }
.bond-tool .kpi small { display: block; color: var(--muted); font-size: 13px; font-weight: 650; }
.bond-tool .kpi b { display: block; margin: 4px 0; font-size: clamp(20px, 3vw, 31px); line-height: 1.15; }
.bond-tool .kpi .s { display: block; }
.bond-tool .kpi b, .bond-tool .mix, .bond-tool table { font-variant-numeric: tabular-nums; }
.bond-tool .tag {
  display: inline-block;
  margin-inline: 5px 2px;
  padding: 1px 6px;
  border: 1px solid;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  vertical-align: .05em;
}
.bond-tool .t-o { color: #073d2a; background: #bcefd5; border-color: #157251; }
.bond-tool .t-c { color: #11366d; background: #c6e1ff; border-color: #2d5e99; }
.bond-tool .t-e { color: #542600; background: #ffcf86; border-color: #9b591a; }
.bond-tool .t-p { color: #303943; background: #e0e6ec; border-color: #667385; border-style: dashed; }

.bond-tool table { font-size: 13px; overflow-wrap: anywhere; }
.bond-tool :is(th, td) { padding: 7px 5px; text-align: right; vertical-align: top; }
.bond-tool :is(th, td):first-child { text-align: left; }
.bond-tool #src :is(th, td):first-child { width: 23%; }
.bond-tool #src a { color: var(--a); font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.bond-tool #rates { overflow-wrap: anywhere; }
.bond-tool .hm td { text-align: center; }

.bond-tool svg { display: block; width: 100%; height: auto; }
.bond-tool .chart-point:focus { outline: none; stroke: var(--ink); stroke-width: 1.5; }
.bond-tool .point-value { paint-order: stroke; stroke: var(--panel); stroke-width: 2.5px; stroke-linejoin: round; }
.bond-tool pre {
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  border-radius: 9px;
  background: #eef5f4;
  font-size: 12px;
}
.bond-tool .q {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-inline: 4px 0;
  border: 1px solid #9cb9c0;
  border-radius: 50%;
  color: var(--muted);
  cursor: help;
  font: 700 10px/1 "Segoe UI", sans-serif;
}
.bond-tool .q em {
  position: absolute;
  z-index: 15;
  top: 21px;
  left: 0;
  display: none;
  width: 240px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 10px 24px #114b5f20;
  font: 500 12px/1.5 "Segoe UI", "Microsoft YaHei", sans-serif;
  white-space: normal;
}
.bond-tool .q:is(:hover, :focus) em { display: block; }

@media (max-width: 760px) {
  .bond-tool { --gap: 12px; }
  .bond-tool .row, .bond-tool .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bond-tool .g2, .bond-tool .g3, .bond-tool .ch { grid-template-columns: minmax(0, 1fr); }
  .bond-tool .tabs button { flex: 1; }
  .bond-tool .q em { position: fixed; inset: auto 18px 18px; width: auto; }
}
@media (max-width: 360px) {
  .bond-tool .g4 { grid-template-columns: minmax(0, 1fr); }
}

