/* TRC · tool-specific visuals (report hero, likelihood bars, connection matrix, tax output).
   Layout, shell, forms, buttons and dialogs come from kit/kit.css. */
.ctag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 30px;
  padding: 4px 10px;
  font-size: 12px;
}
.ctag button {
  border: 0;
  background: none;
  color: #6f8566;
  padding: 0 0 0 6px;
  font-size: 13px;
}
.resulttop .ctag {
  background: #ffffff18;
  color: #e0edda;
  border-color: #ffffff22;
}
.report-cards > .card + .card {
  margin-top: 15px;
}
.resultcard h3 {
  font-size: 18px;
}
.resultcard h4 {
  margin: 14px 0 0;
}
.howto {
  margin-bottom: 15px;
}
.howto summary {
  font-weight: 600;
  cursor: pointer;
}
.howto dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  margin: 12px 0 0;
  font-size: 12px;
}
.howto dt {
  font-weight: 600;
}
.howto dd {
  margin: 0;
  color: var(--muted);
}
.country-select {
  display: flex;
  gap: 10px;
}
.country-select > select {
  flex: 1;
  min-width: 0;
}
.period-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end; /* keep both date inputs on one line when one label wraps */
}
.priorities {
  margin: 0;
}
@media (max-width: 760px) {
  .period-grid {
    grid-template-columns: 1fr;
  }
  .visual-result-hero {
    grid-template-columns: 1fr;
  }
  .completeness {
    border-left: 0;
    padding-left: 0;
  }
}
.taglist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.resulttop {
  background: var(--green);
  padding: 30px;
  border-radius: 15px;
  color: white;
  margin-bottom: 24px;
}
.resulttop .eyebrow {
  color: #bfd6ad;
}
.resulttop h2 {
  font-size: 28px;
  line-height: 1.5;
}
.resulttop p {
  color: #c8d9c4;
  font-size: 12px;
}
.resultcard {
  margin-bottom: 15px;
}
.resultcard ul {
  font-size: 12px;
  line-height: 2;
  color: #798577;
  padding-left: 20px;
}
@media (max-width: 720px) {
  .taxmetrics {
    grid-template-columns: 1fr;
  }
  .taxmetrics > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .taxmetrics strong {
    margin: 0;
  }
  .resulttop h2 {
    font-size: 23px;
  }
}
.routebox {
  background: #edf3e7;
  border: 1px solid #dce8d4;
  border-radius: 9px;
  padding: 15px;
  margin: 15px 0;
  font-size: 12px;
}
.routebox ul {
  margin: 8px 0 0;
}
.opinion {
  background: #f5f6ef;
  border-radius: 8px;
  padding: 1px 16px 15px;
  margin: 16px 0;
}
.opinion p {
  margin: 0;
}
.resultcard details,
.card details {
  font-size: 12px;
  line-height: 1.8;
  margin: 16px 0;
}
.resultcard summary,
.card summary {
  cursor: pointer;
  color: #4c7140;
}
.reviewlist {
  padding-left: 20px;
  font-size: 12px;
  line-height: 2.2;
  color: #6f7f66;
}
.taxmetrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 20px 0;
}
.taxmetrics > div {
  background: #edf3e6;
  padding: 16px;
  border-radius: 9px;
}
.taxmetrics small {
  font-size: 10px;
  display: block;
  color: #718166;
}
.taxmetrics strong {
  display: block;
  font-size: 21px;
  margin-top: 10px;
}
.event {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  overflow-wrap: anywhere;
}
.visual-result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  gap: 25px;
  background: radial-gradient(ellipse at 85% 10%, #4e7653aa, transparent 55%), var(--green);
}
.result-hero-message h2 {
  max-width: 750px;
}
.completeness {
  text-align: center;
  border-left: 1px solid #ffffff15;
  padding-left: 24px;
}
.completeness svg {
  width: 150px;
  height: 150px;
}
.completeness p {
  font-size: 11px !important;
  margin: 0 !important;
}
.completeness small {
  font-size: 9px;
  color: #b6cfad;
}
.insight-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
  margin: 24px 0;
}
.insight-grid h2 {
  font-size: 19px;
  margin-top: 10px;
}
.possibility-row {
  margin: 24px 0;
}
.possibility-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.possibility-name > span {
  font-size: 10px;
  padding: 5px 8px;
  border-radius: 5px;
  background: #f3f5ee;
}
.evidence-segments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 10px 0;
}
.evidence-segments span {
  height: 10px;
  background: #edf0e7;
  border-radius: 3px;
}
.evidence-segments.unrated span {
  background: repeating-linear-gradient(130deg, #ecefe8, #ecefe8 3px, #f8f9f4 3px, #f8f9f4 7px);
}
.evidence-segments .lit.level-3 {
  background: #376c4f;
}
.evidence-segments .lit.level-2 {
  background: #b7a46d;
}
.evidence-segments .lit.level-1 {
  background: #a6b59a;
}
.possibility-name .level-3 {
  color: #316647;
}
.possibility-name .level-2 {
  color: #9a7c39;
}
.possibility-name .level-0 {
  color: #8f9988;
}
.possibility-row p {
  margin: 0;
  font-size: 10px;
  color: #8b9684;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 10px;
  color: #7d8a75;
  margin-top: 18px;
}
.legend span {
  display: flex;
  gap: 6px;
  align-items: center;
}
.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot.high {
  background: #376c4f;
}
.legend-dot.possible {
  background: #b7a46d;
}
.legend-dot.weak {
  background: #c9d5bd;
}
.legend-dot.unknown {
  background: #dfe4d9;
}
.dimension {
  margin: 21px 0;
}
.dimension > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.dimension b {
  font-size: 10px;
  color: #86967a;
}
.dimension-track {
  margin-top: 9px;
  height: 6px;
  background: #edf1e7;
  border-radius: 10px;
  overflow: hidden;
}
.dimension-track span {
  display: block;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #abc991, #537d52);
}
.connection-card {
  margin-bottom: 25px;
}
.connection-card .section-head {
  margin: 10px 0 18px;
}
.connection-card td,
.connection-card th {
  font-size: 11px;
}
.matrix-dot {
  color: #c8d1c1;
}
.matrix-dot.on {
  color: #4b7953;
  font-size: 15px;
}
.tax-composition {
  padding: 12px 0;
}
.composition-track {
  height: 23px;
  background: #dce8ce;
  border-radius: 6px;
  overflow: hidden;
  margin: 13px 0;
}
.composition-track span {
  display: block;
  height: 100%;
  background: #376c4f;
}
@media (max-width: 900px) {
  .insight-grid {
    grid-template-columns: 1fr;
  }
  .visual-result-hero {
    grid-template-columns: minmax(0, 1fr) 155px;
  }
  .completeness {
    padding-left: 10px;
  }
}
@media (max-width: 600px) {
  .visual-result-hero {
    grid-template-columns: 1fr;
  }
  .completeness {
    border-left: 0;
    border-top: 1px solid #ffffff20;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 0 0;
  }
  .completeness svg {
    width: 110px;
    height: 110px;
  }
  .completeness small {
    max-width: 90px;
  }
  .connection-card .section-head {
    display: block;
  }
}
@media print {
  .insight-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 12px 0;
  }
  .resulttop,
  .stat,
  .routebox,
  .opinion,
  .insight-grid > article,
  .connection-card {
    break-inside: avoid;
  }
  .possibility-row,
  .dimension {
    margin: 12px 0;
  }
  .visual-result-hero,
  .evidence-segments span,
  .dimension-track span,
  .pill,
  .matrix-dot {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .resulttop p {
    color: #dce8d5;
  }
  .resulttop h2 {
    color: #fff;
  }
}.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.event {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.event:first-child {
  border-top: 0;
}
@media (max-width: 1100px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}
/* Connection matrix on phones: keep headers and country names on one line and let the table scroll sideways */
@media (max-width: 760px) {
  .connection-card .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
  .connection-card table { min-width: 520px; }
  .connection-card th, .connection-card td { white-space: nowrap; padding-left: 8px; padding-right: 8px; }
}
