/* RecOfficials.com */
:root {
    --brand: #0b5d3b;        /* park green */
    --brand-dark: #08452c;
    --accent: #f2a900;       /* whistle gold */
    --ink: #1d2327;
    --muted: #5b6670;
    --line: #d9e1dc;
    --bg: #f5f7f5;
    --card: #ffffff;
    --on: #e3f2ea;
    --error: #b42318;
    --error-bg: #fdecea;
    --ok-bg: #e6f4ea;
    --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
}
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}
h1 { font-size: 30px; line-height: 1.2; margin: 8px 0 8px; }
h2 { font-size: 20px; margin: 0 0 8px; }
.lead { font-size: 17px; color: var(--muted); margin: 0 0 20px; max-width: 720px; }
.muted { color: var(--muted); margin: 0 0 8px; }
.hint { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.hint.warn { color: var(--error); }

/* Header / footer */
.site-header { background: var(--brand); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.wordmark { color: #fff; text-decoration: none; font-weight: 800; font-size: 24px; letter-spacing: -0.5px; }
.wordmark span { color: var(--accent); }
.header-nav { display: flex; align-items: center; gap: 18px; }
.header-nav a, .header-nav button {
    color: #fff; font: inherit; font-weight: 600; font-size: 15px; text-decoration: none;
    background: none; border: none; cursor: pointer; padding: 0;
}
.header-nav a:hover, .header-nav button:hover { text-decoration: underline; }
.header-nav form { margin: 0; }
.header-nav .header-btn { border: 2px solid rgba(255,255,255,.8); border-radius: 8px; padding: 6px 14px; }
.header-nav .header-btn:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.site-footer { color: var(--muted); font-size: 14px; padding: 32px 0 40px; margin-top: 48px; border-top: 1px solid var(--line); }
.site-footer .by { display: block; font-size: 12.5px; margin-top: 4px; }
main.wrap { padding-top: 20px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 11px 20px; border-radius: 8px; border: 2px solid transparent;
    font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer;
    font-family: inherit; line-height: 1.2;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn-secondary:hover { background: var(--on); }
.btn-link { background: none; border: none; color: var(--brand); padding: 6px 0; font-size: 15px; text-decoration: underline; }
.btn-lg { padding: 14px 28px; font-size: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: flex-end; margin-top: 24px; }
.actions .count { margin-right: auto; color: var(--muted); font-weight: 600; }
.sticky-actions {
    position: sticky; bottom: 0; background: var(--bg);
    padding: 12px 0; border-top: 1px solid var(--line); margin-top: 16px;
}

/* Flash / errors */
.flash { padding: 12px 16px; border-radius: 8px; margin: 0 0 16px; font-weight: 600; }
.flash-error { background: var(--error-bg); color: var(--error); }
.flash-success { background: var(--ok-bg); color: var(--brand-dark); }
.field-error { color: var(--error); font-size: 14px; margin: 6px 0 10px; padding-left: 18px; }
p.field-error { padding-left: 0; }

/* Cards / forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card.narrow { max-width: 520px; }
label { font-weight: 600; display: block; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], select, textarea {
    width: 100%; padding: 10px 12px; font-size: 16px; font-family: inherit;
    border: 1px solid #b8c4bd; border-radius: 6px; background: #fff; color: var(--ink);
}
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus, input[type=date]:focus, input[type=time]:focus, select:focus, textarea:focus { border-color: var(--brand); }
input[aria-invalid=true] { border-color: var(--error); }

/* Stepper */
.stepper ol { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 18px; flex-wrap: wrap; }
.stepper li { flex: 1 1 0; min-width: 120px; }
.stepper li > a, .stepper li > span {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px;
    border-radius: 8px; background: #e9eeeb; color: var(--muted);
    font-size: 14px; font-weight: 600; text-decoration: none;
}
.stepper .num {
    display: inline-flex; width: 22px; height: 22px; border-radius: 50%;
    align-items: center; justify-content: center; background: #fff; font-size: 12px;
}
.stepper li.done > a { background: var(--on); color: var(--brand-dark); }
.stepper li.current > span { background: var(--brand); color: #fff; }
.stepper li.current .num { color: var(--brand); }
.org-name { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

/* Landing */
.hero { text-align: center; padding: 48px 0 24px; }
.hero h1 { font-size: 40px; max-width: 780px; margin: 0 auto 14px; color: var(--brand-dark); }
.hero .lead { margin: 0 auto 26px; }
.sport-strip { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.badge {
    display: inline-block; background: var(--accent); color: #2b2100; font-weight: 800;
    letter-spacing: .5px; text-transform: uppercase; font-size: 14px;
    padding: 6px 14px; border-radius: 999px; margin: 0 0 16px;
}
.coming-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 36px; }
.coming-grid h2 { font-size: 18px; color: var(--brand-dark); margin-bottom: 4px; }
.coming-grid p { margin: 0; color: var(--muted); }
.notify { max-width: 640px; margin: 28px auto 0; text-align: center; }
.notify p { color: var(--muted); margin: 0 0 16px; }
.sport-strip span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 600; color: var(--muted); }

/* Sports x leagues grid */
.grid-scroll { overflow-x: auto; }
.program-grid { border-collapse: separate; border-spacing: 6px; margin: 0 auto 0 -6px; }
.program-grid th button {
    background: none; border: none; font: inherit; font-weight: 700; color: var(--ink);
    cursor: pointer; padding: 6px 8px; border-radius: 6px; width: 100%;
}
.program-grid th button:hover { background: var(--on); color: var(--brand-dark); }
.program-grid thead th { font-size: 15px; }
.program-grid tbody th { text-align: left; white-space: nowrap; }
.program-grid tbody th button { text-align: left; }
.program-grid .corner { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px; }
.program-grid td { padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.program-grid td.on { background: var(--on); border-color: var(--brand); }
.program-grid .cell { display: flex; align-items: center; justify-content: center; width: 96px; height: 52px; margin: 0; cursor: pointer; }
.program-grid input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--brand); cursor: pointer; }

/* Officials step */
.sport-group { margin-top: 28px; }
.sport-group > h2 { font-size: 22px; color: var(--brand-dark); border-bottom: 2px solid var(--line); padding-bottom: 6px; }
.program-card { margin: 14px 0 0; }
.program-card legend { font-weight: 700; font-size: 17px; padding: 0 6px; }
.program-card.has-error { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.count-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.count-label { font-weight: 600; margin-right: 6px; }
.pill { margin: 0; }
.pill input { position: absolute; opacity: 0; }
.pill span {
    display: inline-flex; width: 42px; height: 38px; align-items: center; justify-content: center;
    border: 2px solid var(--line); border-radius: 8px; font-weight: 700; cursor: pointer; background: #fff;
}
.pill input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.positions { display: grid; gap: 8px; }
.pos-head, .pos-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 150px; gap: 10px; align-items: center; }
.pos-head { font-size: 13px; font-weight: 600; color: var(--muted); }
.pos-row[hidden] { display: none; }
.pos-num { color: var(--muted); font-weight: 700; text-align: center; }
.money { display: flex; align-items: center; gap: 4px; font-weight: 600; color: var(--muted); }
.copy-note { color: var(--brand); font-size: 14px; margin-left: 8px; }

/* Review */
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.review-card h2 { font-size: 18px; margin-bottom: 2px; }
.pay-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.pay-table th, .pay-table td { padding: 6px 0; border-bottom: 1px solid var(--line); text-align: left; }
.pay-table thead th { color: var(--muted); font-size: 13px; }
.pay-table tfoot th, .pay-table tfoot td { border-bottom: none; font-weight: 700; }
.pay-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Sign in / create account */
.auth-wrap { max-width: 460px; margin: 16px auto 0; }
.auth-wrap h1 { margin-bottom: 12px; }
.field { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-block { width: 100%; margin-top: 6px; }
.auth-alt { text-align: center; color: var(--muted); margin-top: 16px; }
.preview-signin { color: var(--muted); margin: 0; }

/* Dashboard */
.callout { border-left: 5px solid var(--accent); margin: 16px 0 0; }
.callout h2 { margin-bottom: 4px; }
.callout p { color: var(--muted); margin: 0 0 14px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; margin-top: 18px; align-items: start; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; }
.card-head a, .card-foot a { font-weight: 600; font-size: 15px; }
.card-foot { margin: 10px 0 0; }
.muted-cell { color: var(--muted); font-style: italic; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 4px 0 0; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts dd a { font-size: 14px; margin-left: 6px; }
.section-title { font-size: 20px; margin: 32px 0 10px; }
.soon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.soon { border: 1px dashed #b8c4bd; border-radius: var(--radius); padding: 14px 16px; }
.soon h3 { margin: 0 0 4px; font-size: 16px; color: var(--muted); }
.soon p { margin: 0; color: var(--muted); font-size: 14px; }

/* Sport workspace */
.sport-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.sport-switch a {
    padding: 7px 14px; border-radius: 999px; border: 2px solid var(--line); background: #fff;
    color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none;
}
.sport-switch a:hover { border-color: var(--brand); }
.sport-switch a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.sport-title { margin-top: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 6px 0 20px; overflow-x: auto; }
.tabs a {
    padding: 10px 16px; font-weight: 700; color: var(--muted); text-decoration: none;
    border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap;
}
.tabs a:hover { color: var(--brand); }
.tabs a.on { color: var(--brand-dark); border-bottom-color: var(--brand); }
.actions-start { justify-content: flex-start; }
.narrow-form { max-width: 720px; }
textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; resize: vertical; }
select { appearance: auto; }
.opt { color: var(--muted); font-weight: 400; font-size: 13px; }
.field-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.add-panels { display: grid; gap: 12px; margin-bottom: 8px; }
.panel { padding: 0; }
.panel > summary {
    cursor: pointer; padding: 14px 18px; font-weight: 700; font-size: 17px; color: var(--brand-dark);
    list-style: none; display: flex; align-items: center; gap: 10px;
}
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary::before { content: "+"; display: inline-flex; width: 22px; height: 22px; align-items: center;
    justify-content: center; border-radius: 50%; background: var(--on); color: var(--brand-dark); font-size: 16px; }
.panel[open] > summary::before { content: "\2212"; }
.panel > form { padding: 0 18px 18px; }
.panel .actions { margin-top: 12px; }
.league-checks { border: none; padding: 0; margin: 4px 0 0; }
.league-checks legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin: 0 16px 6px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.sport-checks { display: flex; flex-wrap: wrap; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.sport-checks-label { width: 120px; font-weight: 700; }
.list-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-top: 24px; }
.list-head a { font-weight: 600; font-size: 15px; }
.list-title { font-size: 20px; margin: 24px 0 10px; }
.list-head .list-title { margin: 0; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.filters select { width: auto; padding: 6px 10px; }
.filters .check { margin: 0; }
.table-wrap { overflow-x: auto; }
.list-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.list-table th, .list-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list-table thead th { font-size: 13px; color: var(--muted); background: #fafbfa; }
.list-table tbody tr:last-child td { border-bottom: none; }
.tag { display: inline-block; background: var(--on); color: var(--brand-dark); border-radius: 999px;
    padding: 1px 9px; font-size: 13px; font-weight: 600; margin: 1px 4px 1px 0; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions a { font-weight: 600; margin-right: 12px; }
.row-actions form { display: inline; margin: 0; }
.link-danger { background: none; border: none; padding: 0; color: var(--error); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
.danger-zone { margin-top: 18px; }
.game-day { margin-top: 18px; }
.game-day h3 { font-size: 16px; margin: 0 0 6px; color: var(--brand-dark); }
.game-day.past { opacity: .65; }
.game-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.game-list li { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.game-list li:last-child { border-bottom: none; }
.g-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.g-main { display: flex; flex-direction: column; min-width: 0; }
.g-teams { font-weight: 600; }
.g-teams .at { color: var(--muted); font-weight: 400; }
.g-meta { color: var(--muted); font-size: 14px; }
.sport-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 10px; }
.sport-card h3 { margin: 0 0 6px; font-size: 20px; }
.sport-card h3 a { text-decoration: none; color: var(--brand-dark); }
.sport-card h3 a:hover { text-decoration: underline; }
.sport-leagues { margin: 0 0 8px; }
.sport-stats { display: flex; gap: 16px; color: var(--muted); margin: 0 0 12px; font-size: 15px; }
.sport-stats strong { color: var(--ink); }
.sport-links { display: flex; flex-wrap: wrap; gap: 6px 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.sport-links a { font-weight: 700; font-size: 15px; }
.section-title.flush { margin-top: 0; }
.program-grid td.locked { background: #f1f3f2; }
.lock-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--muted); margin-left: 4px; }

/* Accounts, roles, CSV import */
.league-checks.stack .check, .block-check { display: flex; margin: 0 0 6px; }
.block-check { margin-top: 12px; }
.auth-wrap.wide { max-width: 640px; }
.form-section { font-size: 17px; margin: 22px 0 8px; color: var(--brand-dark); }
.form-section.flush { margin-top: 0; }
.readonly { margin: 0; padding: 8px 0; font-weight: 600; }
.consent { align-items: flex-start; margin-bottom: 8px; }
.consent input { margin-top: 3px; flex: none; }
.consent .hint { display: block; margin-top: 2px; }
.status { display: inline-block; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.status.ok { background: var(--ok-bg); color: var(--brand-dark); }
.status.wait { background: #fff4d6; color: #7a5600; }
.status.none { background: #eef0ef; color: var(--muted); }
.tag-admin { background: #e7ecff; color: #233a8c; }
.link-btn { background: none; border: none; padding: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; margin-right: 12px; }
.side-card { margin-top: 16px; }
.copy-row { display: flex; gap: 8px; margin: 6px 0 12px; }
.copy-row input { font-size: 13px; }
.people-list { list-style: none; margin: 8px 0; padding: 0; }
.people-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.people-list form { display: inline; margin: 0 0 0 10px; }
.muted-small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.inline-add > summary { cursor: pointer; font-weight: 700; color: var(--brand); margin-top: 8px; }
.inline-add form { margin-top: 10px; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 16px; margin-top: 10px; }
.narrow-field { max-width: 360px; margin-top: 10px; }
.map-table { margin-top: 10px; max-width: 560px; }
.preview-table td, .preview-table th { white-space: nowrap; font-size: 13px; }
.error-list { margin: 8px 0 0; padding-left: 20px; font-weight: 400; }
section.card + section.card { margin-top: 14px; }
.game-list.compact li { grid-template-columns: 88px minmax(0, 1fr); }
input[type=tel] { width: 100%; padding: 10px 12px; font-size: 16px; font-family: inherit; border: 1px solid #b8c4bd; border-radius: 6px; }
input[type=file] { font: inherit; }

@media (max-width: 640px) {
    .field-row.three { grid-template-columns: 1fr; }
    .list-table thead { display: none; }
    .list-table, .list-table tbody, .list-table tr, .list-table td { display: block; }
    .list-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
    .list-table td { border: none; padding: 3px 12px; }
    .list-table td.row-actions { text-align: left; padding-top: 6px; }
    .game-list li { grid-template-columns: 70px minmax(0, 1fr); }
    .game-list .row-actions { grid-column: 2; text-align: left; }
    .sport-checks-label { width: 100%; }
    .wordmark { font-size: 20px; }
    .header-nav { gap: 10px; }
    .header-nav a, .header-nav button { font-size: 14px; }
    .header-nav .header-btn { padding: 4px 10px; }
    .list-table td.empty { display: none; }
    .tabs { scrollbar-width: none; }
    .dash-grid, .field-row { grid-template-columns: 1fr; }
    .header-nav { gap: 12px; }
    h1 { font-size: 24px; }
    .hero h1 { font-size: 28px; }
    .program-grid { border-spacing: 4px; margin-left: -4px; }
    .program-grid .cell { width: 54px; height: 46px; }
    .program-grid thead th, .program-grid tbody th { font-size: 13px; }
    .program-grid tbody th { white-space: normal; max-width: 80px; }
    .program-grid th button { padding: 4px 2px; }
    .pos-head, .pos-row { grid-template-columns: 20px minmax(0, 1fr) 104px; gap: 6px; }
    .stepper ol { flex-wrap: nowrap; }
    .stepper li { min-width: 0; flex: 0 0 auto; }
    .stepper li.current { flex: 1 1 auto; }
    .stepper li > a, .stepper li > span { font-size: 13px; padding: 6px; white-space: nowrap; }
    .stepper li:not(.current) .label { display: none; }
    .count-label { width: 100%; }
    .actions .btn { flex: 1 1 auto; }
}
