/* Hoosier Backgammon Club */
:root {
  --felt: #1d4a37;
  --felt-deep: #12301f;
  --ink: #1b221e;
  --muted: #5b655f;
  --paper: #f7f2e8;
  --card: #fffdf8;
  --line: #e3dccd;
  --red: #9a2f27;
  --red-soft: #f4e3df;
  --brass: #b88a2e;
  --brass-soft: #f5ecd6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 25, .06), 0 6px 20px rgba(20, 30, 25, .06);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; display: block; }
a { color: var(--felt); text-underline-offset: 3px; }
a:hover { color: var(--red); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }

/* Header */
.site-header {
  background: var(--felt-deep);
  color: #fff;
  position: sticky; top: 0; z-index: 5;
  border-bottom: 3px solid var(--brass);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #d9c48f; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: #e8efe9; text-decoration: none; font-weight: 600; font-size: .98rem; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav a[aria-current="page"] { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 -2px 0 var(--brass); }
.menu-btn { display: none; background: none; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 8px; padding: 6px 12px; font: inherit; font-weight: 600; cursor: pointer; }

@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--felt-deep); flex-direction: column; padding: 8px 20px 16px; border-bottom: 3px solid var(--brass); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
}

/* Board-point strip (backgammon triangles) */
.points {
  height: 28px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2756%27 height=%2728%27%3E%3Cpath d=%27M0 0h28L14 28z%27 fill=%27%239a2f27%27/%3E%3Cpath d=%27M28 0h28L42 28z%27 fill=%27%23e6d6b3%27/%3E%3C/svg%3E") 0 0 / 56px 28px repeat-x;
}
.points.up { transform: scaleY(-1); }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 80% -10%, #2a6249 0%, var(--felt) 45%, var(--felt-deep) 100%); color: #fff; padding: 64px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.25fr .9fr; gap: 48px; align-items: center; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #e2cd94; margin-bottom: 14px; }
.hero h1 { color: #fff; }
.hero p.lead { font-size: 1.2rem; color: #dbe7df; max-width: 36em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 10px; font-weight: 700; text-decoration: none; border: 2px solid transparent; }
.btn-primary { background: var(--brass); color: #1b1606; }
.btn-primary:hover { background: #cf9f3e; color: #1b1606; }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-felt { background: var(--felt); color: #fff; }
.btn-felt:hover { background: var(--felt-deep); color: #fff; }

.next-card { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; box-shadow: 0 20px 50px rgba(0,0,0,.25); position: relative; }
.next-card .label { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.next-card .when { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1.15; margin: 6px 0 2px; }
.next-card .time { font-size: 1.15rem; font-weight: 600; color: var(--felt); }
.next-card hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.next-card .where strong { display: block; font-size: 1.1rem; }
.next-card .where span { color: var(--muted); }
.next-card .small { font-size: .92rem; color: var(--muted); margin-top: 14px; margin-bottom: 0; }

@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; gap: 32px; } .hero { padding: 44px 0 56px; } }

/* Sections */
section { padding: 64px 0; }
section.alt { background: #efe8d9; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head p { color: var(--muted); margin: 0; }
.page-head { background: var(--felt); color: #fff; padding: 48px 0 44px; }
.page-head h1 { color: #fff; margin-bottom: .25em; }
.page-head p { color: #dbe7df; font-size: 1.15rem; margin: 0; max-width: 44em; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 880px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.fact .big { font-family: var(--serif); font-size: 2rem; font-weight: 600; color: var(--felt); line-height: 1.1; margin-bottom: 6px; }
.fact .big small { font-size: 1rem; color: var(--muted); font-family: var(--sans); font-weight: 600; }

.prose { max-width: 46em; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.callout { background: var(--brass-soft); border: 1px solid #e6d3a4; border-radius: 12px; padding: 16px 20px; margin: 1.2em 0; }
.callout p:last-child { margin-bottom: 0; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding: 18px 20px 18px 68px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.steps li::before { content: counter(step); position: absolute; left: 18px; top: 16px; width: 34px; height: 34px; border-radius: 50%; background: var(--felt); color: #fff; font-weight: 700; display: grid; place-items: center; }
.steps li strong { display: block; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: 1rem; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: #faf6ee; position: sticky; top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #faf6ee; }
.rank { font-weight: 700; color: var(--muted); width: 3.5em; }
tr.top1 .rank { color: var(--brass); }
tr.top1 td, tr.top2 td, tr.top3 td { font-weight: 600; }
.medal { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: .85rem; font-weight: 700; color: #fff; }
.medal.g { background: var(--brass); } .medal.s { background: #8d969a; } .medal.b { background: #a5673a; }
.open-flag { color: var(--red); font-weight: 700; margin-left: 2px; cursor: help; }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brass-soft); color: #6d5212; }
.tag.red { background: var(--red-soft); color: var(--red); }
.note { font-size: .92rem; color: var(--muted); margin-top: 12px; }
.table-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.table-tools input { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-width: 240px; }

details.night { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
details.night summary { cursor: pointer; padding: 14px 18px; font-weight: 600; display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
details.night summary span { color: var(--muted); font-weight: 400; }
details.night .table-wrap { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; box-shadow: none; }

/* Mini leaderboard */
.leader { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px; align-items: center; }
.leader .pos { font-weight: 700; color: var(--muted); width: 2em; }
.leader .pts { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--felt); }
.leader > div { padding: 8px 0; border-bottom: 1px solid var(--line); }
.potm { display: flex; gap: 16px; align-items: center; }
.potm .crown { width: 54px; height: 54px; border-radius: 50%; background: var(--brass-soft); display: grid; place-items: center; flex: none; }

/* Map */
.map { width: 100%; height: 340px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: #ddd; }

/* Footer */
.site-footer { background: var(--felt-deep); color: #cfdcd3; padding: 44px 0 28px; font-size: .98rem; }
.site-footer a { color: #f0dfae; }
.site-footer .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; }
.site-footer h3 { color: #fff; font-size: 1.05rem; }
.site-footer .fine { border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding-top: 18px; font-size: .86rem; color: #9fb4a6; }
@media (max-width: 820px) { .site-footer .cols { grid-template-columns: 1fr; } }

.placeholder { background: #fff3b0; color: #5b4a00; padding: 0 4px; border-radius: 4px; }

@media print {
  .site-header, .site-footer, .hero-actions, .menu-btn, .points, .table-tools { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  section { padding: 16px 0; }
  .page-head { background: none; color: #000; padding: 0; }
  .page-head h1, .page-head p { color: #000; }
  .table-wrap { box-shadow: none; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  th, td { padding: 9px 8px; }
  .hide-sm { display: none; }
  .table-tools input { min-width: 0; width: 100%; }
  section { padding: 48px 0; }
}
