:root {
  --ink: #122a34;
  --muted: #5b6b72;
  --paper: #f4f1e9;
  --navy: #123d4b;
  --navy-deep: #092f3a;
  --green: #078a48;
  --yellow: #ffdb1f;
  --line: #dce2df;
  --shell: min(1160px, calc(100% - 40px));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
a { color: inherit; }
button, input, select { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 14px; border-radius: 8px; color: #fff; background: var(--navy-deep); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.records-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid #d9ded8; background: rgba(244, 241, 233, 0.96); backdrop-filter: blur(16px); }
.header-inner { width: var(--shell); min-height: 84px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; line-height: 1.2; }
.brand img { width: 54px; height: 54px; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 6px 18px rgba(18, 42, 52, 0.12); }
.brand span { display: grid; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 0.75rem; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions a { padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 0.85rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.header-actions a:hover { border-color: var(--navy); }

main { min-height: calc(100vh - 160px); }
.state-view { width: min(620px, calc(100% - 40px)); min-height: 52vh; margin: 70px auto; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.state-view h1 { margin: 0 0 8px; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.1; }
.state-view p { margin: 0 0 24px; color: var(--muted); }
.loading-mark { width: 44px; height: 44px; margin-bottom: 24px; border: 5px solid #c7d8d2; border-top-color: var(--green); border-radius: 50%; animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.eyebrow { margin: 0 0 9px; color: var(--green); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.13em; text-transform: uppercase; }
.primary-button { min-height: 46px; padding: 11px 19px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--navy); font-weight: 850; text-decoration: none; }
.primary-button:hover { background: var(--navy-deep); }

.records-shell { width: var(--shell); margin: 28px auto 80px; }
.records-hero { min-height: 240px; padding: clamp(28px, 5vw, 58px); border-radius: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; color: #fff; background: linear-gradient(115deg, rgba(9, 47, 58, 0.97), rgba(18, 61, 75, 0.9)), url("../../assets/branding/outdoor-range-hero.webp") center / cover; }
.records-hero .eyebrow { color: var(--yellow); }
.records-hero h1 { margin: 0 0 8px; font-size: clamp(2.5rem, 6vw, 4.7rem); letter-spacing: -0.04em; line-height: 1; }
.records-hero p:last-child { max-width: 590px; margin: 0; color: #e6efec; font-size: 1.04rem; }
.hero-count { min-width: 155px; padding: 18px 20px; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 18px; display: grid; background: rgba(255, 255, 255, 0.13); text-align: center; }
.hero-count strong { font-size: 2.1rem; line-height: 1; }
.hero-count span { margin-top: 6px; font-size: 0.75rem; font-weight: 850; letter-spacing: 0.06em; text-transform: uppercase; }
.scope-note { margin: 18px 0; padding: 18px 22px; border-left: 5px solid var(--yellow); border-radius: 14px; background: #fffbea; }
.scope-note strong { color: var(--navy-deep); }
.scope-note p { max-width: 900px; margin: 4px 0 0; color: #5a573e; font-size: 0.9rem; }
.records-panel { padding: clamp(22px, 4vw, 38px); border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 18px 44px rgba(18, 42, 52, 0.07); }
.panel-heading { margin-bottom: 22px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.panel-heading h2 { margin: 0; font-size: clamp(1.45rem, 3vw, 2rem); }
.round-count { padding: 7px 11px; border-radius: 999px; color: #075f34; background: #e8f5ed; font-size: 0.8rem; font-weight: 850; white-space: nowrap; }
.filters { padding: 16px; border-radius: 16px; display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(140px, 1fr)) auto; align-items: end; gap: 12px; background: #eef5f1; }
.filters label { min-width: 0; display: grid; gap: 5px; }
.filters label span { color: #4b5e57; font-size: 0.72rem; font-weight: 850; letter-spacing: 0.05em; text-transform: uppercase; }
.filters input, .filters select { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #bfd0c6; border-radius: 9px; color: var(--ink); background: #fff; }
.clear-button, .show-more { min-height: 44px; padding: 9px 16px; border: 1px solid #aebdb5; border-radius: 9px; color: var(--navy); background: #fff; font-weight: 850; cursor: pointer; white-space: nowrap; }
.clear-button:hover, .show-more:hover { border-color: var(--navy); background: #f5f8f6; }
.results-heading { margin: 24px 0 14px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.82rem; }
.results-heading p { margin: 0; color: var(--navy); font-weight: 850; }
.record-list { display: grid; gap: 9px; }
.record-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: 13px; display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(165px, 1.2fr) auto; align-items: center; gap: 16px; background: #fff; }
.record-card:nth-child(even) { background: #fbfcfa; }
.record-round, .record-archer { min-width: 0; display: grid; gap: 3px; }
.record-round strong, .record-archer strong { overflow-wrap: anywhere; font-size: 1rem; }
.record-round span, .record-archer span { color: var(--muted); font-size: 0.78rem; }
.record-score { min-width: 92px; display: grid; justify-items: end; }
.record-score strong { color: var(--navy-deep); font-size: 1.55rem; line-height: 1.1; }
.record-score span { color: var(--muted); font-size: 0.74rem; }
.empty-message { padding: 32px 20px; border: 1px dashed #b8c7bf; border-radius: 12px; color: var(--muted); background: #fbfcfa; text-align: center; }
.show-more { margin: 20px auto 0; display: block; }
footer { width: var(--shell); margin: 0 auto 28px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.8rem; }
footer a { font-weight: 800; }

@media (max-width: 920px) {
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-field { grid-column: 1 / -1; }
  .clear-button { width: fit-content; }
}
@media (max-width: 620px) {
  :root { --shell: min(100% - 28px, 1160px); }
  .header-inner { min-height: 72px; }
  .brand img { width: 44px; height: 44px; }
  .brand small, .header-actions a:last-child { display: none; }
  .header-actions a { padding: 8px 11px; font-size: 0.75rem; }
  .records-hero { min-height: 270px; flex-direction: column; align-items: flex-start; justify-content: flex-end; }
  .hero-count { min-width: auto; padding: 11px 15px; display: flex; align-items: baseline; gap: 6px; }
  .hero-count strong { font-size: 1.6rem; }
  .filters { grid-template-columns: 1fr; }
  .search-field { grid-column: 1; }
  .clear-button { width: 100%; }
  .results-heading { flex-direction: column; }
  .record-card { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .record-archer { grid-column: 1; }
  .record-score { grid-column: 2; grid-row: 1 / 3; }
  footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .loading-mark { animation: none; } }
