/* language: CSS, file: assets/css/style.css
   Guwahati Teer Result — layout and skin built to the same spec as the reference
   result page: blue masthead, bordered ticker, 750px bleeding result tables,
   Rubik body, themed table heads, card sections. Every brand colour below reads
   from the five --blue* custom properties that app.js writes from server settings,
   so the admin palette reaches the whole skin without a redeploy. */

:root {
  --blue: #00695c;
  --blue-deep: #004d40;
  --blue-mid: #00897b;
  --blue-soft: #e0f2f1;
  --blue-line: #b2dfdb;
  --green: #25d366;
  --green-head: #2e7d32;
  --red: #d32f2f;
  --yellow: #ffeb3b;
  --yellow-line: #fbc02d;
  --ink: #222222;
  --ink-2: #334155;
  --ink-3: #444444;
  --bg: #f7f8f9;
  --max: 768px;
  --font: 'Rubik', -apple-system, system-ui, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-btn: 'Poppins', 'Rubik', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }

img { max-width: 100%; height: auto; }

/* ================= masthead ================= */

.site-header {
  background: var(--blue);
  border-bottom: 3px solid var(--blue-deep);
}

.header-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px 12px 8px;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.brand-mark {
  width: 34px; height: 34px; flex: 0 0 auto;
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.brand-text strong {
  color: #fff;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
.brand-text em {
  font-style: normal;
  font-size: .7rem;
  font-weight: 500;
  color: var(--blue-soft);
  letter-spacing: .06em;
}

.pill-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
.pill-nav a {
  display: inline-block;
  background: var(--blue-soft);
  color: var(--blue-deep) !important;
  border: 1px solid var(--blue-line);
  border-radius: 3px;
  padding: 4px 10px;
  font-family: var(--font-btn);
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.2;
}
.pill-nav a.on { background: #fff; border-color: #fff; color: var(--blue) !important; }

/* ================= page frame ================= */

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 14px 22px;
}

/* tables bleed to the screen edge on phones, like the reference */
.bleed {
  width: 100vw;
  max-width: 750px;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* ================= ticker ================= */

.news-ticker {
  position: relative;
  height: 40px;
  margin-top: -6px;
  margin-bottom: 8px;
  border: 2px solid var(--blue-mid);
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(90deg, #fefefe, var(--blue-soft), #fefefe);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticker-text {
  position: absolute;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: #222;
  padding: 0 6px;
  opacity: 0;
  animation: tickerCycle 18s ease-in-out infinite;
}
.ticker-text:nth-child(1) { animation-delay: 0s; }
.ticker-text:nth-child(2) { animation-delay: 6s; }
.ticker-text:nth-child(3) { animation-delay: 12s; }

@keyframes tickerCycle {
  0%   { opacity: 0; transform: scale(.95); }
  4%   { opacity: 1; transform: scale(1); }
  28%  { opacity: 1; transform: scale(1); }
  33%  { opacity: 0; transform: scale(.95); }
  100% { opacity: 0; }
}

/* ================= live badge ================= */

.live-row { text-align: center; margin: 8px 0 2px; }

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--blue-deep);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 30px;
}
.live-dot {
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: blink 1s infinite;
}
@keyframes blink { 0%, 50%, 100% { opacity: 1; } 25%, 75% { opacity: .3; } }

/* ================= mini nav ================= */

.mini-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0;
  padding: 0 2px;
}
.mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid;
  font-family: var(--font-btn);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
}
.mini-btn.morning { background: var(--blue-soft); color: var(--blue-deep) !important; border-color: var(--blue-line); box-shadow: 1px 1px 0 var(--blue-line); }
.mini-btn.night { background: var(--blue-deep); color: #fff !important; border-color: var(--blue-deep); box-shadow: 1px 1px 0 var(--blue-deep); }

/* ================= result tables ================= */

.result-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 4px;
  font-family: var(--font);
}
.result-table th {
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 6px 5px;
  text-align: center;
  border: 1px solid var(--blue);
}
.result-table th.head-green { background: var(--green-head); border-color: var(--green-head); }
.result-table th.head-red { background: var(--red); border-color: var(--red); }
.result-table th.head-yellow { background: var(--yellow); color: #111; border-color: var(--yellow-line); }
.result-table th.round { border-radius: 12px 12px 0 0; }

.result-table td {
  border: 1px solid var(--blue-line);
  color: var(--blue);
  font-weight: 700;
  font-size: 14px;
  padding: 1px;
  text-align: center;
}
.result-table tr.sub td {
  background: #f0f0f0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  padding: 3px;
  border: 1px solid #e0e0e0;
}
.result-table td.num { font-size: 30px; line-height: 1.45; padding: 2px; }
.result-table td.num.pending { color: #b2b2be; }

/* ================= button row ================= */

.btn-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 5px 0 12px;
}
.btn-row a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 2px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  border: 1.5px solid transparent;
  white-space: nowrap;
  line-height: 1.2;
  font-family: var(--font-btn);
}
.btn-row a.f-green { background: #d6ffd6; color: #064d00 !important; border-color: #9ee89e; }
.btn-row a.f-blue { background: var(--blue); color: #fff !important; border-color: var(--blue-deep); }
.btn-row a.f-alt { background: var(--blue-soft); color: var(--blue) !important; border-color: var(--blue-mid); }

/* ================= copy ================= */

.click-line {
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-2);
  font-weight: 500;
  line-height: 1.5;
  margin: 10px auto;
}
.click-line a {
  color: var(--blue) !important;
  font-weight: 800;
  text-decoration: underline;
}

.page h1 {
  font-size: 1.55rem;
  line-height: 1.3;
  color: var(--blue);
  font-weight: 700;
  margin: 18px 0 10px;
}
.page h1 .d { display: block; font-size: 1.1rem; font-weight: 600; color: var(--ink-2); margin-top: 4px; }

.page h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--blue);
  font-weight: 700;
  margin: 26px 0 16px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--blue-soft);
  scroll-margin-top: 10px;
}
.page h3 {
  font-size: 1.3rem;
  color: var(--blue);
  font-weight: 700;
  margin: 22px 0 10px;
  letter-spacing: .01em;
}
.page p { font-size: 15px; line-height: 1.65; color: var(--ink-2); margin: 12px 0; }
.page ul { margin: 16px 0; padding-left: 22px; }
.page ul li { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin-bottom: 10px; }
.page strong { color: var(--ink); }
.page hr { border: 0; border-top: 1px solid var(--blue-line); margin: 24px 0; }

/* ================= author strip ================= */

.author-date-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 10px 12px;
  border-left: 4px solid var(--blue);
  background: var(--blue-soft);
  border-radius: 6px;
  font-size: 14px;
  color: var(--blue);
  margin: 12px 0 20px;
}
.author-line { display: flex; align-items: center; gap: 8px; }
.author-icon {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: grid; place-items: center;
  font-size: .78rem; font-weight: 700;
}
.author-text { font-weight: 500; font-size: 14px; }
.date-line { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }

/* ================= table of contents ================= */

.toc {
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--blue) 15%, transparent);
  border-radius: 12px;
  padding: 10px;
  margin: 15px 0;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--blue) 8%, transparent);
}
.toc strong {
  display: block;
  font-size: 19px;
  font-weight: 600;
  color: var(--blue);
  border-left: 5px solid var(--blue);
  padding-left: 10px;
  margin-bottom: 14px;
}
.toc ol {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
}
.toc li {
  counter-increment: toc;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  background: var(--blue-soft);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 15px;
}
.toc li::before {
  content: counter(toc);
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.toc a { color: var(--blue-deep) !important; font-weight: 500; }

/* ================= key/value info table ================= */

.kv-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-family: var(--font);
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--blue-line);
}
.kv-table th, .kv-table td {
  border-bottom: 1px solid var(--blue-line);
  padding: 8px 10px;
  text-align: left;
  font-size: 14px;
}
.kv-table th { background: var(--blue-soft); color: var(--blue); font-weight: 700; width: 45%; }
.kv-table td { color: var(--ink-2); font-weight: 500; }
.kv-table tr:last-child th, .kv-table tr:last-child td { border-bottom: 0; }

/* ================= common number ================= */

.common-block {
  background: #f0f0f0;
  border-radius: 10px;
  padding: 15px;
  margin: 16px 0;
  text-align: center;
}
.common-block .cb-title {
  font-size: 17px;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 10px;
}
.common-circles { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.common-circles span {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ================= direct hit card ================= */

.direct-card {
  background: #f3f4f6;
  border-radius: 12px;
  padding: 12px;
  margin: 16px 0;
  border: 1px solid var(--blue-line);
}
.direct-card .dc-title {
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.direct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.direct-cell {
  background: #020617;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  color: #fff;
}
.direct-cell em {
  display: block;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--yellow);
  margin-bottom: 4px;
}
.direct-cell b {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #fff;
}

/* ================= house / ending ================= */

.he-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 16px;
  font-family: var(--font);
}
.he-table th {
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px;
  border: 1px solid var(--blue);
}
.he-table td {
  border: 1px solid var(--blue-line);
  text-align: center;
  padding: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
}
.he-table td.k { background: #f0f0f0; color: #222; font-weight: 700; font-size: 12px; }

/* ================= note ================= */

.note {
  background: var(--blue-soft);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
}
.note p { margin: 0; font-size: 15px; color: #2c3e50; }
.note b { color: var(--red); }

/* ================= chart CTA ================= */

.chart-card {
  display: block;
  max-width: 400px;
  margin: 16px auto;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: #fff !important;
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--blue) 28%, transparent);
}
.chart-card .cc-top { font-size: 10px; font-weight: 700; letter-spacing: .16em; color: var(--blue-soft); text-transform: uppercase; }
.chart-card .cc-main { font-size: 15px; font-weight: 800; margin: 3px 0 2px; }
.chart-card .cc-sub { font-size: 12px; color: var(--blue-soft); }

/* ================= archive table ================= */

.archive-filters {
  display: flex;
  gap: 6px;
  background: var(--blue-soft);
  padding: 6px;
  border-radius: 8px;
  border: 1px solid var(--blue-line);
  margin-bottom: 10px;
  max-width: 340px;
}
.filter-group { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.filter-group label { font-size: 10px; font-weight: 800; color: var(--blue); margin-left: 2px; text-transform: uppercase; }
.stg-select {
  padding: 2px 5px;
  border-radius: 4px;
  border: 1.5px solid var(--blue-mid);
  font-weight: 700;
  color: var(--blue);
  background: #fff;
  height: 32px;
  font-size: 12px;
  width: 100%;
  font-family: var(--font);
  outline: none;
}

.archive-wrap {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--blue-line);
  overflow: hidden;
}
.archive-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font);
}
.archive-table th {
  background: var(--blue-mid);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid var(--blue-mid);
}
.archive-table td {
  font-size: 15px;
  font-weight: 700;
  color: #000;
  padding: 9px 6px;
  text-align: center;
  border-bottom: 1px solid var(--blue-line);
}
.archive-table td.date { font-size: 14px; color: #1f2f45; }
.archive-table td .n { color: var(--blue); font-size: 16px; }
.archive-table td .n.dash { color: #b2b2be; }
.archive-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--blue-soft) 45%, #fff); }
.archive-empty { padding: 14px; text-align: center; font-size: 14px; color: var(--ink-2); }

/* ================= faq ================= */

.faq-item {
  background: color-mix(in srgb, var(--blue-soft) 55%, #fff);
  border: 1px solid var(--blue-line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
}
.faq-q {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 6px;
  line-height: 1.4;
}
.faq-a { font-size: 15px; line-height: 1.55; color: #444; margin: 0; }

/* ================= share ================= */

.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 6px; }
.share-row span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.share-row a {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue) !important;
}

/* ================= footer ================= */

.site-foot {
  background: var(--blue);
  margin-top: 10px;
  padding: 20px 14px 26px;
}
.foot-in { max-width: var(--max); margin: 0 auto; text-align: center; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-bottom: 10px; }
.foot-links a { color: var(--blue-soft); font-size: 13px; font-weight: 500; }
.foot-links a:hover { color: #fff; text-decoration: underline; }
.foot-in p { margin: 4px 0; font-size: 12px; color: var(--blue-soft); line-height: 1.5; }

/* ================= search ================= */

.search-row { display: flex; gap: 8px; margin: 12px 0; }
.search-row input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--blue-line);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background: #fff;
}
.search-row input:focus { outline: 2px solid var(--blue-mid); outline-offset: 1px; }

/* ================= forms ================= */

.form { display: grid; gap: 12px; margin: 14px 0; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.form input, .form textarea {
  border: 1.5px solid var(--blue-line);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  resize: vertical;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--blue-mid); outline-offset: 1px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff !important;
  border: 0;
  border-radius: 8px;
  padding: 12px 20px;
  font-family: var(--font-btn);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
.btn:hover { background: var(--blue-deep); }

/* ================= wide ================= */

@media (min-width: 640px) {
  .page { padding: 16px 18px 26px; }
  .page h1 { font-size: 1.8rem; }
  .page h1 .d { display: inline; font-size: 1.1rem; margin: 0; }
  .page h2 { font-size: 1.55rem; }
  .bleed { margin-left: 0; margin-right: 0; width: 100%; }
  .result-table td.num { font-size: 32px; }
  .btn-row a { padding: 8px 10px; font-size: 13px; max-width: 220px; box-shadow: 0 2px 5px rgba(0, 0, 0, .1); }
  .brand-text strong { font-size: 1.6rem; }
  .pill-nav a { font-size: .78rem; padding: 5px 14px; }
  .archive-filters { max-width: 380px; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-text { animation: none; opacity: 1; position: static; }
  .ticker-text:nth-child(n+2) { display: none; }
  .live-dot { animation: none; }
}
