/* LTC Athletics Site — DEMO prototype. Mobile-first. Theme tokens are overridden by the AD theme (see app.js applyTheme). */
:root {
  --primary: #0B1F3A;      /* LTC navy (libertasteams.com) */
  --accent: #C8102E;       /* LTC red */
  --surface: #FFFFFF;
  --on-primary: #FFFFFF;
  --on-accent: #FFFFFF;
  --ink: #0B1F3A;
  --muted: #5B6B82;
  --line: #E3E8F0;
  --soft: #F4F7FC;
  --win: #047857;
  --loss: #C8102E;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--soft); -webkit-font-smoothing: antialiased; line-height: 1.45; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }

.demo-ribbon { background: #FFF7E6; color: #7A4B00; font-size: 12px; font-weight: 600; text-align: center; padding: 6px 12px; border-bottom: 1px solid #F3D9A4; }

/* header */
.site-header { background: var(--primary); color: var(--on-primary); position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.hdr-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; max-width: 1200px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; flex: 1; }
.brand img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: #fff1; flex: none; }
.brand .bn { font-weight: 800; font-size: 15px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .bs { font-size: 11px; opacity: .8; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.menu-btn { background: transparent; border: 1px solid rgba(255,255,255,.35); color: var(--on-primary); border-radius: 8px; padding: 6px 10px; font-weight: 700; cursor: pointer; }
.nav { display: none; flex-direction: column; background: var(--primary); border-top: 1px solid rgba(255,255,255,.12); padding: 6px 8px 12px; }
.nav.open { display: flex; }
.nav a { color: var(--on-primary); text-decoration: none; padding: 10px 10px; border-radius: 8px; font-weight: 600; font-size: 15px; }
.nav a.active, .nav a:hover { background: rgba(255,255,255,.12); }
.nav .nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .65; padding: 10px 10px 2px; }
.nav a.admin-link { color: var(--on-accent); background: var(--accent); margin-top: 6px; text-align: center; }
.accent-bar { height: 4px; background: var(--accent); }

/* scores strip */
.strip { background: #fff; border-bottom: 1px solid var(--line); }
.strip-inner { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px; max-width: 1200px; margin: 0 auto; scroll-snap-type: x mandatory; }
.chip-game { flex: none; scroll-snap-align: start; min-width: 178px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; text-decoration: none; background: #fff; font-size: 13px; }
.chip-game:hover { border-color: var(--primary); }
.chip-game .cg-top { display: flex; flex-wrap: wrap; gap: 2px 8px; justify-content: space-between; font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.chip-game .cg-row { display: flex; justify-content: space-between; font-weight: 700; margin-top: 3px; gap: 6px; }
.chip-game .cg-row span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }

main { max-width: 1200px; margin: 0 auto; padding: 14px; }
.hero { background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 60%, var(--accent) 160%); color: var(--on-primary); border-radius: var(--radius); padding: 22px 18px; position: relative; overflow: hidden; }
.hero h1 { margin: 6px 0 6px; font-size: 24px; line-height: 1.15; }
.hero p { margin: 0; opacity: .9; }
.hero .kicker { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--accent); display: inline-block; padding: 3px 8px; border-radius: 4px; }
.hero a.btn { margin-top: 14px; }
.hero .hero-mark { position: absolute; right: -20px; bottom: -20px; width: 140px; opacity: .14; border-radius: 20px; }

h2.sec { font-size: 18px; margin: 22px 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
h2.sec a { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 700; }
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
a.card { text-decoration: none; display: block; transition: box-shadow .15s, border-color .15s; }
a.card:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(11,31,58,.08); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--soft); color: var(--primary); border: 1px solid var(--line); text-transform: uppercase; letter-spacing: .03em; }
.tag.live { background: var(--accent); color: #fff; border-color: var(--accent); animation: pulse 1.6s infinite; }
.tag.final { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.tag.cancel { background: #FDF2F6; color: #C8102E; border-color: #F5C2CF; }
.tag.change { background: #FFFBEB; color: #B45309; border-color: #FCD9A0; }
@keyframes pulse { 50% { opacity: .65; } }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 9px; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; cursor: pointer; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--primary); border-color: var(--line); }
.hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* score card */
.score-card .sc-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); font-weight: 700; margin-bottom: 8px; gap: 6px; }
.team-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.team-line .tn { display: flex; align-items: center; gap: 8px; font-weight: 700; min-width: 0; }
.team-line .tn span.name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-line .pts { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.team-line.lose { color: var(--muted); }
.mono { width: 28px; height: 28px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; flex: none; }
.sc-foot { font-size: 12.5px; color: var(--muted); margin-top: 6px; display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.sc-foot b { color: var(--accent); }

/* upcoming list */
.ev { display: flex; gap: 12px; align-items: center; text-decoration: none; padding: 12px; border-bottom: 1px solid var(--line); background: #fff; }
.ev:last-child { border-bottom: 0; }
.ev:hover { background: var(--soft); }
.ev .date { width: 52px; text-align: center; flex: none; border-radius: 9px; background: var(--primary); color: var(--on-primary); padding: 5px 0; }
.ev .date .m { font-size: 11px; font-weight: 700; text-transform: uppercase; opacity: .85; }
.ev .date .d { font-size: 20px; font-weight: 800; line-height: 1; }
.ev .info { flex: 1; min-width: 0; }
.ev .info .t { font-weight: 700; }
.ev .info .s { font-size: 12.5px; color: var(--muted); }
.list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }

/* sport tiles */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; display: flex; flex-direction: column; gap: 4px; border-top: 4px solid var(--accent); }
.tile:hover { border-color: var(--primary); border-top-color: var(--accent); }
.tile .ic { font-size: 22px; }
.tile .nm { font-weight: 800; }

/* sponsor bar */
.sponsor-bar { margin: 22px 0 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.sponsor-bar .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: 8px; display: flex; justify-content: space-between; }
.logos { display: flex; gap: 10px; overflow-x: auto; align-items: center; }
.logos a { flex: none; display: flex; align-items: center; justify-content: center; width: 140px; height: 64px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 6px; }
.logos img { max-height: 50px; }

/* page head */
.page-head { background: var(--primary); color: var(--on-primary); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; border-bottom: 4px solid var(--accent); }
.page-head h1 { margin: 2px 0; font-size: 22px; }
.page-head .crumb { font-size: 12px; opacity: .8; }
.page-head .crumb a { color: inherit; }
.page-head .meta { font-size: 13px; opacity: .9; margin-top: 4px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; border-bottom: 2px solid var(--line); }
.tabs a { padding: 10px 12px; text-decoration: none; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a.on { color: var(--primary); border-bottom-color: var(--accent); }

/* tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--soft); }
tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.res-W { color: var(--win); font-weight: 800; }
.res-L { color: var(--loss); font-weight: 800; }

/* recap */
.scoreboard { background: var(--primary); color: var(--on-primary); border-radius: var(--radius); padding: 16px; border-bottom: 4px solid var(--accent); }
.scoreboard .sb-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; }
.scoreboard .sb-team .mono { width: 44px; height: 44px; font-size: 15px; border: 2px solid rgba(255,255,255,.4); }
.scoreboard .sb-team .nm { font-weight: 800; margin-top: 6px; font-size: 14px; }
.scoreboard .sb-team .rec { font-size: 12px; opacity: .75; }
.scoreboard .sb-score { font-size: 34px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.scoreboard .sb-status { text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-top: 8px; opacity: .9; }
.leaders { display: grid; grid-template-columns: 1fr; gap: 10px; }
.leader { display: flex; gap: 10px; align-items: center; }
.leader .jn { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.leader .lv { font-size: 20px; font-weight: 800; }
.notice { background: #FFFBEB; border: 1px solid #FCD9A0; color: #7A4B00; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 10px 0; }
.privacy { background: var(--soft); border: 1px dashed #B9C4D6; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: var(--muted); margin-top: 10px; }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid .dow { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-day { background: #fff; border: 1px solid var(--line); border-radius: 8px; min-height: 58px; padding: 4px; font-size: 11px; }
.cal-day.out { background: transparent; border-color: transparent; }
.cal-day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-day .dn { font-weight: 800; font-size: 12px; }
.cal-day a { display: block; text-decoration: none; background: var(--primary); color: var(--on-primary); border-radius: 4px; padding: 1px 4px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.cal-day a.away { background: var(--accent); color: var(--on-accent); }
.cal-day a.cx { background: #E5E7EB; color: #6B7280; text-decoration: line-through; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.filters button { border: 1px solid var(--line); background: #fff; padding: 6px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--primary); }
.filters button.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.ics-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.ics-box code { display: block; background: var(--soft); padding: 8px; border-radius: 8px; font-size: 12px; overflow-x: auto; white-space: nowrap; margin: 6px 0; }

/* staff */
.staff-card { display: flex; gap: 12px; align-items: center; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; border: 2px solid var(--accent); }
.staff-card .nm { font-weight: 800; }
.staff-card .ti { font-size: 13px; color: var(--muted); }
.staff-card a.em { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 600; word-break: break-all; }

/* sponsors */
.sp-tier { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; }
.sp-card { display: flex; gap: 12px; align-items: center; }
.sp-card img { width: 110px; height: 56px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; flex: none; }
.booster { background: linear-gradient(135deg, var(--primary), var(--primary) 70%, var(--accent)); color: var(--on-primary); border-radius: var(--radius); padding: 18px; }
.booster a.btn { background: #fff; color: var(--primary); border-color: #fff; }

/* news */
.news-card .k { font-size: 11px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.news-card h3 { margin: 4px 0 6px; font-size: 16px; line-height: 1.25; }
.article { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; max-width: 760px; }
.article h1 { font-size: 24px; margin: 6px 0; line-height: 1.2; }

/* admin */
.admin-shell { display: grid; grid-template-columns: 1fr; gap: 14px; }
.admin-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.admin-panel h3 { margin: 0 0 10px; font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: 13px; font-weight: 600; }
.field input[type=text], .field textarea, .field select { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-weight: 400; }
.field textarea { min-height: 80px; }
.color-row { display: flex; gap: 10px; flex-wrap: wrap; }
.color-row label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 600; }
.color-row input[type=color] { width: 36px; height: 28px; border: 0; background: none; padding: 0; cursor: pointer; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.presets button { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px 4px 4px; background: #fff; display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.presets .sw { width: 20px; height: 20px; border-radius: 50%; display: inline-block; }
.contrast { font-size: 12px; padding: 6px 8px; border-radius: 8px; margin-top: 6px; }
.contrast.ok { background: #EBFBF3; color: #047857; }
.contrast.bad { background: #FDF2F6; color: #C8102E; }
.mini-preview { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mini-preview .mp-h { background: var(--primary); color: var(--on-primary); padding: 10px; display: flex; gap: 8px; align-items: center; font-weight: 800; font-size: 13px; }
.mini-preview .mp-h img { width: 28px; height: 28px; border-radius: 6px; }
.mini-preview .mp-b { padding: 10px; display: flex; gap: 8px; align-items: center; }
.row-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.row-item:last-child { border-bottom: 0; }
.row-item img { width: 70px; height: 34px; object-fit: contain; }
.row-item .grow { flex: 1; min-width: 0; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #CBD5E1; border-radius: 999px; cursor: pointer; transition: .15s; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--win); }
.switch input:checked + span::before { transform: translateX(16px); }
.feed { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.feed:last-child { border-bottom: 0; }
.ok-dot::before { content: "●"; color: var(--win); margin-right: 6px; }
.warn-dot::before { content: "●"; color: #B45309; margin-right: 6px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); z-index: 50; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }

footer.site-footer { background: var(--primary); color: var(--on-primary); margin-top: 26px; border-top: 4px solid var(--accent); }
.foot-inner { max-width: 1200px; margin: 0 auto; padding: 18px 14px; display: grid; gap: 12px; font-size: 13px; }
.foot-inner a { color: inherit; opacity: .85; text-decoration: none; margin-right: 12px; }
.foot-inner .pw { opacity: .7; font-size: 12px; display: flex; gap: 8px; align-items: center; }
.foot-inner .pw img { width: 22px; height: 22px; border-radius: 5px; }

/* ≥ 720px */
@media (min-width: 720px) {
  .grid.g2 { grid-template-columns: repeat(2, 1fr); }
  .grid.g3 { grid-template-columns: repeat(3, 1fr); }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .hero { padding: 34px 30px; }
  .hero h1 { font-size: 32px; }
  .hero .hero-mark { width: 220px; }
  .cal-day { min-height: 92px; font-size: 12px; }
  .leaders { grid-template-columns: repeat(2, 1fr); }
  .admin-shell { grid-template-columns: 1fr 1fr; }
  .foot-inner { grid-template-columns: 2fr 1fr; }
}
/* ≥ 1024px: horizontal nav */
@media (min-width: 1024px) {
  .menu-btn { display: none; }
  .nav { display: flex !important; flex-direction: row; flex-wrap: nowrap; justify-content: center; border-top: 1px solid rgba(255,255,255,.12); padding: 4px 8px; gap: 2px; }
  .nav a { font-size: 14px; padding: 8px 10px; }
  .nav .nav-group { display: none; }
  .nav a.admin-link { margin: 0 0 0 10px; padding: 8px 12px; }
  .grid.g4 { grid-template-columns: repeat(4, 1fr); }
  .home-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
  .leaders { grid-template-columns: repeat(4, 1fr); }
}
.hide-m { display: none; }
@media (min-width: 720px) { .hide-m { display: inline; } }
/* overflow guards */
.cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-day { min-width: 0; overflow: hidden; }
.admin-shell { grid-template-columns: minmax(0, 1fr); }
.home-cols > div, .admin-shell > * { min-width: 0; }
@media (min-width: 720px) { .admin-shell { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (min-width: 1024px) { .home-cols { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
@media (max-width: 719px) { .cal-day a { text-align: center; padding: 2px 0; } }
