.archive-record-summary {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(260px, 1.15fr);
  align-items: center;
  gap: 20px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--green);
  padding: 14px 18px;
  background: #f7fbf8;
}
.archive-record-summary h2,
.archive-record-summary p { margin: 0; }
.archive-record-summary-main,
.archive-record-summary-note { display: grid; gap: 4px; }
.archive-record-summary-main h2 { font-size: 20px; }
.archive-record-summary-main p,
.archive-record-summary-note p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.archive-record-summary-note { border-left: 1px solid var(--line); padding-left: 20px; }
.archive-record-summary-note strong { color: var(--green-dark); font-size: 14px; }
.team-score-row > strong {
  gap: 5px;
  padding: 5px;
}
.team-score-row > strong span { font-size: 12px; }
.team-score-row > strong input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  padding: 4px;
  background: white;
  font-size: 11px;
  text-align: center;
}
.score-stepper {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) 27px;
  min-width: 0;
  background: white;
}
.team-score-row .score-stepper { border-left: 1px solid var(--line); }
.team-score-row .score-stepper input,
.team-side-extras .score-stepper input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding-inline: 3px;
  text-align: center;
  appearance: textfield;
}
.score-stepper input::-webkit-inner-spin-button,
.score-stepper input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.score-stepper button {
  border: 0;
  background: #edf5f1;
  color: var(--green-dark);
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
}
.score-stepper button:focus-visible,
.score-stepper input:focus-visible { position: relative; z-index: 2; outline: 2px solid var(--teal); }
.team-side-extras .score-stepper { min-height: 42px; border: 2px solid var(--ink); }
.team-side-extras .score-stepper > input { min-height: 38px; }
.team-record-visualizations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.team-radar-card { margin-top: 0; }
.player-average-panel {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(180px, .7fr) minmax(0, 1.5fr);
  gap: 18px;
  align-items: end;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--yellow);
  padding: 18px;
  background: #fffdf4;
}
.player-average-panel h3,
.player-average-panel p { margin: 0; }
.player-average-panel p:not(.kicker) { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.player-average-panel label { display: grid; gap: 6px; color: var(--green-dark); font-weight: 900; }
.player-average-panel select { min-height: 46px; border: 2px solid var(--ink); padding: 0 10px; background: white; }
.player-average-panel .record-stats { margin: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.player-average-panel .record-empty.compact { width: 100%; min-width: 0; grid-column: 1 / -1; writing-mode: horizontal-tb; }
.record-identity-action { align-content: end; }
.record-identity-action .record-button { width: 100%; padding-inline: 10px; }
.member-archive-embed .player-average-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.member-archive-embed .player-average-panel .record-stats { grid-column: 1 / -1; }
/* R2: the embedded ballot viewport is narrower than the outer growth page. */
@media (max-width:600px) {
  .member-archive-embed .player-average-panel { grid-template-columns:minmax(0,1fr); }
  .member-archive-embed .player-average-panel > * { min-width:0; }
  .member-archive-embed .player-average-panel select { width:100%; min-width:0; max-width:100%; }
}
.player-average-panel .record-stat small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.record-empty.compact { grid-column: 1 / -1; min-height: 90px; padding: 16px; }
.team-progress-svg { width: 100%; min-height: 250px; }
.progress-subject-control { display: grid; gap: 5px; margin: 14px 0 4px; color: var(--green-dark); font-size: 11px; font-weight: 900; }
.progress-subject-control select { min-height: 42px; border: 2px solid var(--ink); padding: 0 9px; background: white; color: var(--ink); }
.team-progress-svg .progress-grid line { stroke: #d9e1dd; stroke-width: 1; }
.team-progress-svg .progress-grid text { fill: var(--muted); font-size: 10px; }
.team-progress-svg .progress-line { fill: none; stroke: var(--coral); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.team-progress-svg circle { fill: var(--green); stroke: white; stroke-width: 3; }
.team-progress-svg text { fill: var(--ink); font-size: 10px; font-weight: 800; }

@media (max-width: 760px) {
  .archive-record-summary { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 12px; margin-bottom: 10px; padding: 11px 13px; }
  .archive-record-summary-main h2 { font-size: 17px; }
  .archive-record-summary-main p,
  .archive-record-summary-note p { font-size: 11px; }
  .archive-record-summary-note { padding-left: 12px; }
  .team-score-head,
  .team-score-row { grid-template-columns: 76px repeat(3, minmax(0, 1fr)); }
  .team-score-row > strong input { min-height: 30px; font-size: 10px; }
  .score-stepper { grid-template-columns: 22px minmax(28px, 1fr) 22px; }
  .score-stepper button { font-size: 15px; }
  .team-record-visualizations { grid-template-columns: none; }
  .player-average-panel { grid-template-columns: 1fr; align-items: stretch; padding: 14px; }
  .player-average-panel .record-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 390px) {
  .team-score-head,
  .team-score-row { grid-template-columns: 68px repeat(3, minmax(0, 1fr)); }
  .score-stepper { grid-template-columns: 20px minmax(24px, 1fr) 20px; }
  .team-score-row .score-stepper input { font-size: 11px; }
  .player-average-panel .record-stats { grid-template-columns: 1fr; }
}

footer .footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
}
.footer-about { display: grid; gap: 7px; }
.footer-contacts { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 18px; }
footer .footer-contacts a { margin: 0; color: white; font-size: 13px; overflow-wrap: anywhere; }
.footer-contact-icon { display: none; }
footer .footer-contacts a:hover,
footer .footer-contacts a:focus-visible { color: var(--yellow); }

@media (max-width: 760px) {
  footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  footer .footer-shell { grid-template-columns: 1fr; align-items: start; }
  .footer-contacts { display: flex; justify-content: flex-start; gap: 10px; }
  footer .footer-contacts a { width: 46px; min-height: 46px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; font-size: 21px; text-decoration: none; }
  .footer-contact-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .footer-contact-icon { display: inline-grid; place-items: center; }
  .footer-threads-icon { width: 25px; height: 25px; border: 2px solid currentColor; border-radius: 50%; font-size: 16px; font-weight: 900; }
}
