/* TK Investment Research — gilded leather stance badge, v0.3.
   No dependencies. Render 0–4 chevron children from the validated stance. */
.tkir-badge {
  --leather: #3f202b; --leather-light: #663a45; --gold: #f0d49c;
  --signal: #ff9da7; --outer-edge: #101110;
  box-sizing: border-box; position: relative; display: inline-grid;
  grid-template-rows: 49px 10px; row-gap: 4px;
  justify-items: center; align-content: start; align-items: center;
  width: 88px; height: 88px; padding: 9px 7px 8px; flex-shrink: 0;
  border: 1px solid #25171b;
  border-radius: 15px 15px 26px 26px / 14px 14px 20px 20px;
  color: var(--gold); color-scheme: light;
  background:
    radial-gradient(ellipse at 20% 10%, #ffffff0b, transparent 65%),
    radial-gradient(ellipse at 65% 60%, #00000000, #00000038),
    radial-gradient(#ffffff12 .5px, transparent .9px) 0 0/3px 4px,
    radial-gradient(#00000033 .6px, transparent 1px) 1px 2px/5px 3px,
    linear-gradient(135deg, var(--leather-light), var(--leather) 55%);
  box-shadow: 0 3px 0 #1d1418, 0 5px 8px #251f202e,
    inset 0 1px 2px #ffffff35, inset 0 -3px 5px #00000066;
}
.tkir-badge *, .tkir-badge::before { box-sizing: border-box; }
.tkir-badge--increase { --leather: #16332c; --leather-light: #345247; --signal: #7ee6b1; --outer-edge: #e8e2d6; }
.tkir-badge::before {
  content: ''; position: absolute; inset: 4px; pointer-events: none;
  border: 1px solid #e7c789;
  border-radius: 11px 11px 22px 22px / 10px 10px 16px 16px;
  box-shadow: 0 0 0 3px var(--outer-edge), inset 0 1px 0 #ffffff12;
}
.tkir-badge__score {
  display: block; width: 100%; height: 49px; margin: 0; text-align: center;
  font: 500 49px/49px 'Times New Roman', Times, serif;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: 'lnum' 1, 'tnum' 1; letter-spacing: 0;
  text-shadow: 0 -1px 0 #140f0c, 0 1px 0 #fff3c240, 0 2px 2px #00000090;
}
.tkir-badge__direction {
  display: grid; grid-template-columns: repeat(4,5px) 8px repeat(4,5px);
  grid-template-rows: 10px; column-gap: 1px; width: 56px; height: 10px;
  align-items: center; justify-items: center; justify-self: center;
}
.tkir-badge__direction::after {
  content: ''; grid-column: 5; grid-row: 1; width: 8px; height: 8px;
  background: var(--signal); clip-path: polygon(50% 0,100% 50%,50% 100%,0 50%);
}
.tkir-badge__chevron {
  display: block; grid-row: 1; width: 5px; height: 8px; background: #ffe0a1;
  clip-path: polygon(100% 0,60% 0,0 50%,60% 100%,100% 100%,40% 50%);
}
.tkir-badge__chevron:nth-child(1) { grid-column: 4; }
.tkir-badge__chevron:nth-child(2) { grid-column: 3; }
.tkir-badge__chevron:nth-child(3) { grid-column: 2; }
.tkir-badge__chevron:nth-child(4) { grid-column: 1; }
.tkir-badge--increase .tkir-badge__chevron { clip-path: polygon(0 0,40% 0,100% 50%,40% 100%,0 100%,60% 50%); }
.tkir-badge--increase .tkir-badge__chevron:nth-child(1) { grid-column: 6; }
.tkir-badge--increase .tkir-badge__chevron:nth-child(2) { grid-column: 7; }
.tkir-badge--increase .tkir-badge__chevron:nth-child(3) { grid-column: 8; }
.tkir-badge--increase .tkir-badge__chevron:nth-child(4) { grid-column: 9; }
.tkir-badge--report {
  width: 106px; height: 105px; padding: 11px 8px 9px;
  grid-template-rows: 59px 10px; row-gap: 5px;
}
.tkir-badge--report .tkir-badge__score { font-size: 59px; height: 59px; line-height: 59px; }
.tkir-badge--inline {
  width: 30px; height: 34px; padding: 3px 2px;
  border-radius: 5px 5px 8px 8px; grid-template-rows: 1fr; row-gap: 0; align-content: stretch;
  box-shadow: 0 1px 0 #1d1418, 0 2px 3px #251f2026;
}
.tkir-badge--inline::before { inset: 2px; border-radius: 3px 3px 6px 6px; box-shadow: 0 0 0 1px var(--outer-edge); }
.tkir-badge--inline .tkir-badge__score { font-size: 18px; height: 18px; line-height: 18px; }
.tkir-badge--inline .tkir-badge__direction { display: none; }
.tkir-badge--inline .tkir-badge__direction::after { width: 4px; height: 4px; }
.tkir-badge--inline .tkir-badge__chevron { width: 2px; height: 4px; }
@media print { .tkir-badge { print-color-adjust: exact; -webkit-print-color-adjust: exact; } }
/* Integration fallbacks: keep numeral and edge readable without decorative backgrounds. */
@media (forced-colors: active) {
  .tkir-badge { background: Canvas; color: CanvasText; border-color: CanvasText; box-shadow: none; }
  .tkir-badge::before { border-color: CanvasText; box-shadow: none; }
  .tkir-badge__score { text-shadow: none; }
  .tkir-badge__direction { display: none; }
}
@media print {
  .tkir-badge { background: white; color: black; border-color: black; box-shadow: none; }
  .tkir-badge::before { border-color: black; box-shadow: none; }
  .tkir-badge__score { text-shadow: none; }
  .tkir-badge__direction { display: none; }
}
