/* Arkansas Strongman — site styles. No framework, no build step. */
/* Theme: Arkansas state flag — red field, white diamond, blue border and stars. */
:root {
  --red: #bf0a30;
  --red-dark: #9a0826;
  --blue: #002868;
  --white: #ffffff;
  --bg: #071a3d;          /* deep flag-blue base */
  --bg-2: #0b2350;
  --panel: #0f2a5e;
  --line: #24427d;
  --text: #ffffff;
  --muted: #b9c6e0;
  --accent: var(--red);
  --accent-2: #ffffff;
  --ok: #3fa66b;
  --err: #e0574f;
  --radius: 10px;
  --max: 1120px;
  --head: "Oswald", "Arial Narrow", "Helvetica Neue Condensed", Impact, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--body);
}
img { max-width: 100%; display: block; }
a { color: #9cc0ff; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid #9cc0ff; outline-offset: 2px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; color: #000; padding: 8px 12px; z-index: 100; }

h1, h2, h3 { font-family: var(--head); text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.eyebrow { font-family: var(--head); color: var(--accent-2); text-transform: uppercase; letter-spacing: .15em; font-size: .85rem; margin-bottom: .5em; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(7,26,61,.95); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { font-family: var(--head); font-size: 1.35rem; text-transform: uppercase; color: var(--text); text-decoration: none; letter-spacing: .04em; white-space: nowrap; }
.brand span { color: #ff5c74; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav a { display: block; padding: 8px 7px; color: var(--text); text-decoration: none; font-family: var(--head); text-transform: uppercase; letter-spacing: .03em; font-size: .88rem; border-radius: 6px; white-space: nowrap; }
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a[aria-current="page"] { color: var(--accent-2); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 8px 12px; font: inherit; font-family: var(--head); text-transform: uppercase; cursor: pointer; }
/* 8 nav items: switch to the Menu button before they can collide with the brand */
@media (max-width: 1150px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; left: 0; right: 0; top: 64px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px 12px 16px; }
  .nav a { padding: 12px; font-size: 1.05rem; }
}

/* Hero */
/* Hero: red field + white diamond with blue border, echoing the state flag */
.hero {
  position: relative; overflow: hidden; background: var(--red);
  border-bottom: 8px solid var(--blue); box-shadow: inset 0 -8px 0 #fff;
}
.hero::before {           /* blue-bordered white diamond */
  content: ""; position: absolute; right: -60px; top: 50%;
  width: 460px; height: 460px; transform: translateY(-50%) rotate(45deg);
  background: #fff; border: 34px solid var(--blue); outline: 10px solid #fff;
  opacity: .95;
}
.hero::after {            /* stars ring inside the blue band */
  content: "★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★"; position: absolute; right: 60px; top: 50%;
  transform: translateY(-50%); color: var(--red); font-size: 1.6rem; letter-spacing: .1em;
  width: 220px; text-align: center; line-height: 1.6; opacity: .9; font-family: serif;
}
.hero .wrap { position: relative; z-index: 1; padding-top: 88px; padding-bottom: 80px; }
.hero h1 { max-width: 640px; text-shadow: 0 2px 0 rgba(0,0,0,.2); }
.hero .eyebrow { color: #fff; opacity: .9; }
.hero .btn { background: var(--blue); border-color: var(--blue); }
.hero .btn:hover { background: #001a45; border-color: #001a45; }
.hero .btn.ghost { background: transparent; border-color: #fff; color: #fff; }
.hero .btn.ghost:hover { background: #fff; color: var(--red); }
@media (max-width: 900px) {
  .hero::before { width: 300px; height: 300px; right: -150px; border-width: 24px; opacity: .25; }
  .hero::after { display: none; }
}
.page-hero { border-top: 4px solid var(--red); }
.hero p.lead { font-size: 1.2rem; max-width: 640px; color: #fff; }
.page-hero { background: var(--bg-2); border-bottom: 1px solid var(--line); }
.site-header { border-top: 4px solid var(--red); }
th { color: #fff; }
.page-hero .wrap { padding-top: 48px; padding-bottom: 32px; }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 6px; font-family: var(--head); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; border: 2px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; font-size: 1rem; }
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--text); border-color: #fff; }
.btn.ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Sections and cards */
section.block { padding: 56px 0; }
section.block + section.block { border-top: 1px solid var(--line); }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-bottom: .35em; }
.card .meta { color: var(--muted); font-size: .92rem; margin-bottom: .75em; }
.card.link-card { text-decoration: none; color: inherit; display: block; transition: border-color .15s, transform .15s; }
.card.link-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tag { display: inline-block; font-size: .75rem; font-family: var(--head); text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 4px; background: #fff; color: var(--blue); margin-right: 6px; }
.tag.red { background: var(--accent); color: #fff; }

/* Events */
.event { display: grid; grid-template-columns: 84px 1fr; gap: 18px; align-items: start; }
.date-badge { background: var(--accent); color: #fff; border-radius: 8px; text-align: center; padding: 10px 6px; font-family: var(--head); text-transform: uppercase; line-height: 1.05; }
.date-badge .m { font-size: .9rem; letter-spacing: .1em; }
.date-badge .d { font-size: 2rem; }
.date-badge .y { font-size: .8rem; opacity: .85; }
.event-list { display: grid; gap: 16px; }
.empty { border: 1px dashed #3a5a96; border-radius: var(--radius); padding: 24px; color: var(--muted); text-align: center; }

/* Records table */
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 18px; }
.filters label { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; gap: 4px; }
select, input, textarea {
  font: inherit; color: var(--text); background: #061532; border: 1px solid #3a5a96; border-radius: 6px; padding: 10px 12px; min-height: 44px;
}
textarea { min-height: 140px; resize: vertical; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--head); text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; background: var(--bg-2); color: var(--accent-2); position: sticky; top: 0; }
tbody tr:hover { background: #12306a; }
td.num { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.count { color: var(--muted); font-size: .9rem; margin-top: 10px; }

/* Forms */
.form { display: grid; gap: 16px; max-width: 680px; }
.form .row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.form .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.status { padding: 12px 14px; border-radius: 6px; display: none; }
.status.ok { display: block; background: rgba(63,166,107,.15); border: 1px solid var(--ok); }
.status.err { display: block; background: rgba(224,87,79,.15); border: 1px solid var(--err); }

/* Lists */
.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { padding: 8px 0 8px 30px; position: relative; border-bottom: 1px solid var(--line); }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 12px; height: 12px; background: var(--accent); transform: rotate(45deg); }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding: 16px 16px 16px 64px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--head); display: grid; place-items: center; font-size: 1.1rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #04112a; color: var(--muted); font-size: .92rem; }
.site-footer .wrap { padding-top: 36px; padding-bottom: 36px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* Flag-theme accents */
.nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--red); border-radius: 0; }
.eyebrow::before { content: "◆ "; color: var(--red); }
.hero .eyebrow::before { color: #fff; }
.card { border-top: 3px solid var(--red); }
.flag-rule { height: 10px; background: linear-gradient(180deg, var(--red) 0 33%, #fff 33% 66%, var(--blue) 66%); }

/* Utilities (no inline styles: the CSP blocks them) */
.narrow { max-width: 700px; }
.mt-8 { margin-top: 8px; }
.mt-18 { margin-top: 18px; }
.filters label.grow { flex: 1; min-width: 200px; }
.rep-photo { width: 140px; height: 140px; object-fit: cover; border-radius: 50%; margin-bottom: 14px; }

/* Records: stacked cards on phones instead of a sideways-scrolling table */
@media (max-width: 640px) {
  .table-wrap { border: 0; overflow: visible; }
  table { min-width: 0; }
  thead { position: absolute; left: -9999px; }
  table, tbody, tr, td { display: block; width: 100%; }
  tbody tr { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--red); border-radius: var(--radius); margin-bottom: 14px; padding: 8px 0; }
  td { border: 0; padding: 6px 16px; display: flex; justify-content: space-between; gap: 16px; text-align: right; }
  td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; text-align: left; }
  td.ev { font-family: var(--head); text-transform: uppercase; font-size: 1.15rem; text-align: left; }
  td.ev::before { display: none; }
  td[colspan] { justify-content: center; }
  td[colspan]::before { display: none; }
}

/* Federation tags + tabs, event lift lists */
.tag.fed { background: var(--red); color: #fff; }
.meta.strong { color: #fff; font-weight: 600; }
.event-lifts { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: 6px; }
.event-lifts li { font-size: .85rem; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.fed-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.fed-tabs[hidden] { display: none; }
.fed-tab { font: inherit; font-family: var(--head); text-transform: uppercase; letter-spacing: .06em; padding: 10px 16px; border-radius: 6px; cursor: pointer; background: transparent; color: var(--text); border: 2px solid var(--line); min-height: 44px; }
.fed-tab[aria-selected="true"] { background: #fff; color: var(--blue); border-color: #fff; }
.small { font-size: .9rem; }

@media (max-width: 640px) {
  .event { grid-template-columns: 1fr; gap: 12px; }
  .date-badge { display: inline-flex; gap: 8px; align-items: baseline; justify-self: start; padding: 6px 12px; }
  .date-badge .d { font-size: 1.3rem; }
  .date-badge .y { font-size: .9rem; }
}

/* Hide the Contest column when the current record book has no contest data */
table.no-contest th:nth-child(6), table.no-contest td:nth-child(6) { display: none; }

/* Records / Open records toggle */
.view-toggle { display: inline-flex; border: 2px solid #fff; border-radius: 8px; overflow: hidden; margin: 4px 0 10px; }
.view-toggle button { font: inherit; font-family: var(--head); text-transform: uppercase; letter-spacing: .06em; background: transparent; color: #fff; border: 0; padding: 10px 18px; min-height: 44px; cursor: pointer; }
.view-toggle button[aria-pressed="true"] { background: #fff; color: var(--blue); }
.view-toggle .n { display: inline-block; margin-left: 6px; font-family: var(--body); font-size: .8rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--red); color: #fff; }
table.open-mode th:nth-child(5), table.open-mode td:nth-child(5),
table.open-mode th:nth-child(6), table.open-mode td:nth-child(6),
table.open-mode th:nth-child(7), table.open-mode td:nth-child(7) { display: none; }
td .note { display: block; font-weight: 400; font-size: .85rem; margin-top: 4px; }
@media (max-width: 640px) { td .note { display: inline; margin: 0 0 0 8px; } }

/* Submit page + claim/proof links */
.current-record:empty { display: none; }
.current-record p { margin: 0 0 .4em; }
a.claim { display: block; margin-top: 6px; font-size: .9rem; font-weight: 600; }
a.proof { margin-left: 8px; font-size: .8rem; }
@media (max-width: 640px) { a.claim { display: inline; margin-left: 10px; } }

/* State reps */
.rep-stack { display: grid; gap: 16px; align-content: start; }
.rep-list { display: grid; gap: 10px; margin: 6px 0 10px; }
.rep-name { font-family: var(--head); font-size: 1.35rem; text-transform: uppercase; letter-spacing: .03em; }

/* External nav link marker */
.nav .ext, .site-footer .ext { font-size: .75em; opacity: .7; }
