/* Shillong Teer Results Today - public stylesheet (mobile-first, no external fonts) */
:root {
  --navy: #0c2340;
  --ink: #1a2f4b;
  --muted: #55657a;
  --paper: #f3f6f9;
  --card: #ffffff;
  --line: #d9e2eb;
  --green: #0b6e4f;
  --green-dark: #08523b;
  --mint: #e2f3eb;
  --mint-line: #b9e0cf;
  --amber: #7a5200;
  --amber-bg: #fff2d3;
  --red: #9b2222;
  --red-bg: #fde8e8;
  --blue: #1a4a8a;
  --blue-bg: #e4edfb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(12, 35, 64, .06), 0 6px 18px rgba(12, 35, 64, .07);
  --font: "Segoe UI", "Helvetica Neue", Roboto, "Noto Sans", system-ui, -apple-system, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper);
  line-height: 1.6; font-size: 1rem;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--green); text-underline-offset: 2px; }
a:hover { color: var(--green-dark); }
:focus-visible { outline: 3px solid #1d6fe0; outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .6rem; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 3.5vw, 1.7rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; color: #fff; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(12, 35, 64, .03);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--navy); font-weight: 800; font-size: 1.05rem; line-height: 1.15; }
.brand img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.brand:hover { color: var(--navy); }
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px;
  padding: 0 11px; background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--navy); border-radius: 2px; }
.primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); padding: .5rem 1rem 1rem; }
.primary-nav.is-open { display: block; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; }
.primary-nav a {
  display: block; padding: .8rem .5rem; color: var(--navy); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line);
}
.primary-nav a[aria-current="page"] { color: var(--green); }
.datebar { background: var(--navy); color: #dbe6f3; font-size: .875rem; }
.datebar .container { padding-top: .4rem; padding-bottom: .4rem; display: flex; flex-wrap: wrap; gap: .25rem 1rem; justify-content: space-between; }
.datebar strong { color: #fff; font-weight: 600; }
.site-notice { background: var(--amber-bg); color: var(--amber); border-bottom: 1px solid #f0d58d; font-size: .95rem; }
.site-notice .container { padding-top: .5rem; padding-bottom: .5rem; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .primary-nav { display: block; position: static; border: 0; padding: 0; background: transparent; }
  .primary-nav ul { display: flex; gap: .1rem; }
  .primary-nav a { border: 0; padding: .5rem .7rem; border-radius: 8px; font-size: .92rem; }
  .primary-nav a:hover { background: var(--mint); color: var(--green-dark); }
  .primary-nav a[aria-current="page"] { background: var(--mint); }
}

/* ---------- Layout ---------- */
main { display: block; padding: 1.25rem 0 2.5rem; }
.layout { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
.content, .aside { min-width: 0; }
@media (min-width: 960px) { .layout.has-aside { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; } }
.breadcrumb { font-size: .875rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.breadcrumb li + li::before { content: "/"; margin-right: .25rem; color: #93a1b3; }
.breadcrumb a { color: var(--muted); }
.page-head { margin-bottom: 1.25rem; }
.page-head p { color: var(--muted); max-width: 70ch; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
.panel + .panel { margin-top: 1.25rem; }
.prose { max-width: none; }
.prose p, .prose ul { max-width: 78ch; }
.prose h2 { margin-top: 1.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.faq h3 { margin-top: 1.1rem; margin-bottom: .25rem; }
.faq p { margin-bottom: .5rem; }

/* ---------- Result cards ---------- */
.result-grid { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .result-grid.two-col { grid-template-columns: 1fr 1fr; } }
.result-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.rc-head { padding: 1rem 1.25rem; background: linear-gradient(180deg, var(--mint), #fff); border-bottom: 1px solid var(--mint-line); }
.rc-head h2, .rc-head h3 { margin: 0; font-size: 1.2rem; }
.rc-date { margin: .15rem 0 0; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.rc-rounds { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; padding: 1.25rem 1rem 1rem; }
.round { display: flex; flex-direction: column; align-items: center; gap: .55rem; text-align: center; }
.round-label { font-weight: 700; color: var(--navy); font-size: .95rem; }
.round-time { font-size: .8rem; color: var(--muted); }

/* The number tile: archery-target rings, the memorable element of the site */
.num {
  --ring: var(--mint-line);
  width: clamp(5.4rem, 24vw, 7rem); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  font-size: clamp(2.2rem, 10vw, 3rem); font-weight: 800; color: var(--navy);
  font-variant-numeric: tabular-nums lining-nums; letter-spacing: .02em;
  background: radial-gradient(circle closest-side, #fff 0 52%, var(--ring) 52% 56%, #fff 56% 72%, var(--ring) 72% 76%, #fff 76% 90%, var(--green) 90% 100%);
}
.num.is-word { font-size: .78rem; font-weight: 800; letter-spacing: .06em; padding: 0 .4rem; }
.num.is-waiting { color: var(--amber); background: radial-gradient(circle closest-side, #fff 0 52%, #f0dfb4 52% 56%, #fff 56% 72%, #f0dfb4 72% 76%, #fff 76% 90%, #d9b45a 90% 100%); }
.num.is-off { color: var(--blue); background: radial-gradient(circle closest-side, #fff 0 52%, #c9daf3 52% 56%, #fff 56% 72%, #c9daf3 72% 76%, #fff 76% 90%, #5f8ed0 90% 100%); }
.num.is-cancelled { color: var(--red); background: radial-gradient(circle closest-side, #fff 0 52%, #f3c6c6 52% 56%, #fff 56% 72%, #f3c6c6 72% 76%, #fff 76% 90%, #c95a5a 90% 100%); }
.rc-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .25rem 1.25rem 1rem; }
.rc-updated { font-size: .82rem; color: var(--muted); }
.rc-actions { display: flex; flex-wrap: wrap; gap: .6rem; padding: 0 1.25rem 1.25rem; margin-top: auto; }
.rc-actions .btn { flex: 1 1 8rem; }

.badge { display: inline-block; padding: .2rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.b-ok { background: var(--mint); color: var(--green-dark); }
.b-wait { background: var(--amber-bg); color: var(--amber); }
.b-info { background: var(--blue-bg); color: var(--blue); }
.b-bad { background: var(--red-bg); color: var(--red); }
.b-muted { background: #e8edf3; color: #3b4b61; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem 1.1rem; border-radius: 10px;
  background: var(--green); color: #fff; font: inherit; font-weight: 700; font-size: .95rem; text-decoration: none; border: 2px solid var(--green); cursor: pointer; text-align: center;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--green-dark); }
.btn-ghost:hover { background: var(--mint); color: var(--green-dark); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.refresh-bar { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; margin: 1rem 0 1.25rem; }
.refresh-bar .status { font-size: .9rem; color: var(--muted); }
.refresh-bar .btn { min-height: 40px; padding: .35rem .9rem; }

/* ---------- Home hero ---------- */
.hero { padding: .5rem 0 .25rem; }
.hero p { max-width: 62ch; color: var(--muted); font-size: 1.05rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table.data { width: 100%; border-collapse: collapse; min-width: 420px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: .65rem .9rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data thead th { background: var(--navy); color: #fff; font-size: .85rem; font-weight: 600; position: sticky; top: 0; }
table.data tbody tr:nth-child(even) { background: #f7fafc; }
table.data tbody tr:last-child td { border-bottom: 0; }
td.n { font-weight: 800; font-size: 1.1rem; color: var(--navy); letter-spacing: .04em; }
td.off { color: var(--muted); font-weight: 600; font-style: normal; }
.table-note { color: var(--muted); font-size: .85rem; margin: .5rem 0 0; }

.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin-bottom: 1rem; }
.field { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 600; color: var(--navy); }
.field select, .field input {
  min-height: 44px; padding: .4rem .7rem; border: 1px solid #b8c5d4; border-radius: 10px; font: inherit; background: #fff; color: var(--ink); min-width: 9rem; max-width: 100%;
}
.pager { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin-top: 1rem; }
.pager .btn { min-height: 40px; padding: .3rem .9rem; }
.archive { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: .5rem 0 0; }
.archive a { display: inline-block; padding: .3rem .8rem; border: 1px solid var(--mint-line); background: var(--mint); border-radius: 999px; text-decoration: none; font-size: .88rem; font-weight: 600; color: var(--green-dark); }
.archive a:hover { background: #cfeadd; }
.history-block { margin-top: 1.5rem; }

/* ---------- Aside ---------- */
.aside-links { list-style: none; margin: 0; padding: 0; }
.aside-links li + li { border-top: 1px solid var(--line); }
.aside-links a { display: block; padding: .6rem .25rem; text-decoration: none; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c8d6e8; padding: 2rem 0 1.5rem; font-size: .92rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h2 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35rem; }
.footer-note { border-top: 1px solid #28426a; margin-top: 1.5rem; padding-top: 1rem; font-size: .85rem; color: #aebfd6; }

.mt { margin-top: 1.25rem; }
.num-404 { font-size: 1.9rem; }
.aside-links.narrow { max-width: 22rem; margin: 1rem auto 0; text-align: left; }
.notfound { text-align: center; padding: 3rem 0; }
.notfound .num { margin: 0 auto 1rem; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print { .site-header, .site-footer, .refresh-bar, .rc-actions { display: none; } }
