/* Optical Ballistics Age-Cohort Percentile Radar, Decade Carry Curve & Cohort Controls */

.age-cohort-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 12px 0 6px;
}

.age-cohort-btn {
  appearance: none;
  min-height: 46px;
  padding: 8px 8px;
  border-radius: 8px;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.age-cohort-btn small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
}

.age-cohort-btn:hover {
  border-color: var(--turf);
}

.age-cohort-btn[aria-pressed="true"] {
  background: var(--pine);
  border-color: var(--pine);
  color: #f4f7f2;
}

.age-cohort-btn[aria-pressed="true"] small {
  color: rgba(244, 247, 242, 0.8);
}

html[data-theme="radar"] .age-cohort-btn[aria-pressed="true"] {
  background: var(--optic-bright);
  border-color: var(--optic-bright);
  color: #081c14;
}

html[data-theme="radar"] .age-cohort-btn[aria-pressed="true"] small {
  color: rgba(8, 28, 20, 0.78);
}

/* Dark Doppler Peer-Distribution Bell & Percentile Viewport */
.age-radar-box {
  margin: 14px 0 18px;
  padding: 14px 16px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, #0b241b 0%, #071912 100%);
  border: 1px solid #1f4d3b;
  color: #e6f2ec;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 20px rgba(7, 25, 18, 0.14);
}

.age-radar-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 12px;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9ec0b0;
}

.age-radar-svg,
.age-decade-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.age-bell-fill {
  fill: rgba(110, 231, 183, 0.12);
}

.age-bell-stroke {
  fill: none;
  stroke: #6ee7b7;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.age-median-line {
  stroke: rgba(246, 201, 103, 0.78);
  stroke-width: 1.6;
  stroke-dasharray: 4 3;
}

.age-you-line {
  stroke: #6ee7b7;
  stroke-width: 2.4;
}

.age-you-dot {
  fill: #071912;
  stroke: #6ee7b7;
  stroke-width: 3;
}

.age-axis-line {
  stroke: rgba(158, 192, 176, 0.38);
  stroke-width: 1.3;
}

.age-axis-txt {
  fill: rgba(196, 220, 208, 0.75);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.age-med-lbl {
  fill: #fde68a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  font-weight: 700;
}

.age-you-lbl {
  fill: #a7f3d0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
}

/* Decade Progression Ladder Box */
.age-decade-box {
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 10px;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
}

.age-decade-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 10px;
  margin-bottom: 10px;
}

.age-decade-head strong {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.age-decade-head span {
  font-size: 11.5px;
  color: var(--muted);
}

.age-bar-track {
  fill: rgba(120, 138, 128, 0.12);
}

.age-bar-fill {
  fill: #1b5e43;
}

html[data-theme="radar"] .age-bar-fill {
  fill: #34996e;
}

.age-bar-fill.is-selected {
  fill: #d99b26;
}

.age-row-lbl {
  fill: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
}

.age-row-lbl.is-selected {
  fill: #b8780f;
}

html[data-theme="radar"] .age-row-lbl.is-selected {
  fill: #fcd34d;
}

.age-row-val {
  fill: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
}

.age-row-carry {
  fill: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

#age-reset {
  appearance: none;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

#age-reset:hover {
  border-color: var(--turf);
}

@media (max-width: 560px) {
  .age-cohort-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
