/* Oliyon Nigandu — one stylesheet, no build step.
   Palette from the logo: navy #002663, gold #feb001. Type: Noto Sans Tamil for everything,
   Noto Serif Tamil only for large headwords. Tamil needs generous size and line-height. */

:root {
  --navy: #002663;
  --navy-dark: #001a45;
  --navy-soft: #e8edf6;
  --gold: #feb001;
  --gold-deep: #b57b00;
  --gold-soft: #fff1cc;
  --ink: #1a2230;
  --muted: #55606f;
  --line: #d7dce4;
  --line-strong: #b9c1cc;
  --bg: #f7f8fa;
  --card: #ffffff;
  --good: #1f7a46;
  --warn: #a35f00;
  --bad: #b3261e;
  --font: "Noto Sans Tamil", "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Noto Serif Tamil", "Noto Serif", Georgia, serif;
  --radius: 10px;
  --control-h: 44px;
  --wrap: 1080px;
}

* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='%23002663' fill-opacity='0.055'%3E%3Ccircle cx='24' cy='24' r='1.4'/%3E%3Ccircle cx='0' cy='0' r='1.4'/%3E%3Ccircle cx='48' cy='0' r='1.4'/%3E%3Ccircle cx='0' cy='48' r='1.4'/%3E%3Ccircle cx='48' cy='48' r='1.4'/%3E%3C/g%3E%3Cpath d='M24 2 Q30 24 46 24 Q30 24 24 46 Q18 24 2 24 Q18 24 24 2 Z' fill='none' stroke='%23002663' stroke-opacity='0.045' stroke-width='1'/%3E%3C/svg%3E");
  color: var(--ink); font-family: var(--font); line-height: 1.8;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main.wrap { flex: 1 0 auto; width: 100%; padding-top: 2rem; padding-bottom: 3.5rem; }
.site-footer { flex-shrink: 0; margin-top: auto; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-deep); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .6rem; font-weight: 700; color: var(--navy-dark); }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.18rem; margin-top: 2rem; }
h3 { font-size: 1.02rem; margin-top: 1.4rem; }
p { margin: 0 0 1rem; }
small, .muted { color: var(--muted); }
/* a Tamil line followed by its English line: give the pair air */
.en { display: block; margin-top: .4rem; color: var(--muted); font-size: .94em; line-height: 1.65; }
p .en, li .en { margin-top: .4rem; }
.ta + .en { margin-top: .45rem; }
em { font-style: normal; color: var(--muted); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
img { max-width: 100%; height: auto; }

/* ---------- header ---------- */
.site-header {
  color: #fff; box-shadow: 0 2px 10px rgba(0,26,69,.25);
  background: linear-gradient(100deg, #001a45 0%, #002663 55%, #0a3a8a 100%);
  position: relative;
}
.site-header::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M28 4 Q34 28 52 28 Q34 28 28 52 Q22 28 4 28 Q22 28 28 4 Z' fill='none' stroke='%23ffffff' stroke-opacity='0.35' stroke-width='1'/%3E%3Ccircle cx='28' cy='28' r='1.3' fill='%23feb001' fill-opacity='0.5'/%3E%3C/svg%3E");
}
.site-header .wrap { position: relative; }
.site-header .wrap {
  display: grid; grid-template-columns: auto minmax(240px, 1fr) auto auto;
  align-items: center; column-gap: 1.25rem; height: 76px; max-width: 1200px;
}
.brand { display: flex; align-items: center; line-height: 0; }
.brand img { height: 52px; width: auto; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.search-pill {
  display: flex; align-items: center; height: var(--control-h); border-radius: 999px;
  background: #fff; border: 2px solid transparent; overflow: hidden; width: 100%; max-width: 560px;
}
.search-pill:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(254,176,1,.25); }
.search-pill input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; padding: 0 1rem; font: inherit; font-size: 1rem; color: var(--ink); background: transparent;
}
.search-pill input::placeholder { color: #7b8694; }
.search-pill button {
  height: 100%; padding: 0 1.1rem; border: 0; background: var(--gold); color: var(--navy-dark); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.search-pill button:hover { background: #ffc233; }
.site-nav { display: flex; align-items: center; gap: .1rem; }
.site-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 52px; min-width: 0; padding: 0 .6rem; border-radius: 8px; color: #fff; text-decoration: none; line-height: 1.2; font-size: .93rem; font-weight: 500; white-space: nowrap;
}
.site-nav a small { font-size: .68rem; color: #b9c6dd; margin-top: 2px; font-weight: 400; }
.site-nav a:hover, .site-nav a.on { background: rgba(255,255,255,.12); color: #fff; }
.flame { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; }
.flame .flame-svg { width: 54px; height: 54px; overflow: visible; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.flame .badge { animation: badge-breathe 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.flame .halo { animation: halo-pulse 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.flame .flame-body { animation: flame-sway 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.flame .outer { animation: flame-outer 1.35s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.flame .mid { animation: flame-mid 0.95s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.flame .core { animation: flame-core 0.7s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.flame .blue { animation: flame-blue 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes flame-sway { 0%, 100% { transform: rotate(-2.2deg); } 35% { transform: rotate(1.6deg); } 65% { transform: rotate(2.4deg); } }
@keyframes flame-outer { 0%, 100% { transform: scale(1, 1); } 30% { transform: scale(0.97, 1.05); } 60% { transform: scale(1.03, 0.97); } 80% { transform: scale(0.99, 1.03); } }
@keyframes flame-mid { 0%, 100% { transform: scale(1, 1) translateY(0); opacity: .95; } 40% { transform: scale(0.94, 1.08) translateY(-1px); opacity: 1; } 75% { transform: scale(1.05, 0.96) translateY(1px); opacity: .9; } }
@keyframes flame-core { 0%, 100% { transform: scale(1, 1); opacity: .95; } 50% { transform: scale(0.9, 1.1); opacity: 1; } }
@keyframes flame-blue { 0%, 100% { transform: scale(1, 1); opacity: .8; } 50% { transform: scale(1.12, .9); opacity: 1; } }
@keyframes halo-pulse { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes badge-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.015); } }
.site-footer .brandline .flame-svg { width: 24px; height: 24px; }
@media (prefers-reduced-motion: reduce) { .flame .badge, .flame .halo, .flame .flame-body, .flame .outer, .flame .mid, .flame .core, .flame .blue { animation: none; } }

/* ---------- footer ---------- */
.site-footer {
  background: linear-gradient(100deg, #00163a 0%, #001a45 60%, #002663 100%); color: #c9d2e2; font-size: .9rem; padding: 1.8rem 0 2rem; position: relative;
}
.site-footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .12;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M28 4 Q34 28 52 28 Q34 28 28 52 Q22 28 4 28 Q22 28 28 4 Z' fill='none' stroke='%23ffffff' stroke-opacity='0.35' stroke-width='1'/%3E%3C/svg%3E");
}
.site-footer .wrap { position: relative; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--gold); }
.site-footer .licence { margin: 0 0 .8rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; }
.site-footer .brandline { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin-bottom: .8rem; color: #fff; font-weight: 600; }


/* ---------- messages ---------- */
.messages { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.messages li { padding: .7rem 1rem; border-radius: 8px; margin-bottom: .5rem; background: var(--navy-soft); border-left: 4px solid var(--navy); }
.messages li.success { background: #e9f5ee; border-color: var(--good); }
.messages li.error { background: #fbecea; border-color: var(--bad); }
.messages li.info { background: var(--gold-soft); border-color: var(--gold-deep); }

/* ---------- building blocks ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.6rem; box-shadow: 0 1px 2px rgba(0,26,69,.04), 0 6px 18px rgba(0,26,69,.05); }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h2 { margin-top: 0; }
.grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin: 1.2rem 0; }
.grid .card { display: flex; flex-direction: column; }
.grid .card .actions { margin-top: auto; padding-top: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.pill { display: inline-block; padding: .05rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 500; background: #eef1f5; color: var(--muted); white-space: nowrap; vertical-align: middle; }
.pill.gold { background: var(--gold-soft); color: var(--gold-deep); }
.pill.good { background: #e3f3e8; color: var(--good); }
.pill.warn { background: #fff2dd; color: var(--warn); }
.pill.bad { background: #fbe4e2; color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.chips a { display: inline-block; padding: .25rem .8rem; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; text-decoration: none; white-space: nowrap; font-size: .95rem; }
.chips a:hover { border-color: var(--navy); background: var(--navy-soft); color: var(--navy); }
.lead { font-size: 1.02rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.section-head h2 { margin: 0; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: var(--control-h); padding: 0 1.2rem; border-radius: 8px;
  border: 1px solid var(--navy); background: var(--navy); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--navy-dark); color: #fff; }
.btn.secondary { background: #fff; color: var(--navy); }
.btn.secondary:hover { background: var(--navy-soft); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--navy-dark); }
.btn.gold:hover { background: #ffc233; }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.small { height: 36px; padding: 0 .9rem; font-size: .9rem; font-weight: 500; }

/* ---------- home ---------- */
.hero {
  text-align: center; margin: -2rem calc(50% - 50vw) 1.8rem; padding: 2.4rem calc(50vw - 50% + 20px) 1.8rem;
  background: linear-gradient(180deg, rgba(255,241,204,.6) 0%, rgba(255,241,204,0) 100%);
  border-bottom: 1px solid rgba(0,38,99,.06);
}
.hero h1 { font-size: 1.9rem; margin-bottom: .6rem; }
.hero .lead { max-width: 720px; margin: 0 auto 1.4rem; color: var(--muted); }
.hero .search-pill { margin: 0 auto; max-width: 680px; height: 56px; border: 2px solid var(--navy); }
.hero .search-pill input { font-size: 1.15rem; padding: 0 1.3rem; }
.hero .search-pill button { font-size: 1.05rem; padding: 0 1.6rem; }
.stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 2.5rem; margin: 1.6rem 0 .5rem; }
.stats div { text-align: center; }
.stats b { display: block; font-size: 1.7rem; color: var(--navy); line-height: 1.15; }
.stats span { font-size: .88rem; color: var(--muted); }
.wotd .hw { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; text-decoration: none; display: inline-block; line-height: 1.3; }
.wotd .roman { color: var(--muted); font-size: 1rem; margin-left: .5rem; }

/* ---------- entry page ---------- */
.entry-head { padding-bottom: 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.4rem; }
.entry-head h1 { font-family: var(--serif); font-size: 2.3rem; font-weight: 600; margin: 0; line-height: 1.3; }
.entry-head .roman { font-size: 1.1rem; color: var(--muted); }
.entry-head .tags { margin-top: .4rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.sense { display: grid; grid-template-columns: 2.2rem 1fr; padding: 1rem 0; border-top: 1px solid var(--line); }
.sense:first-child { border-top: 0; padding-top: 0; }
.sense:last-child { padding-bottom: 0; }
.sense .n { color: var(--gold-deep); font-weight: 700; padding-top: .1rem; }
.sense .def { font-size: 1.06rem; }
.sense .gloss { color: var(--muted); }
.sense .meta { font-size: .88rem; color: var(--muted); margin-top: .4rem; line-height: 1.9; }
.sense .meta .pill { margin-right: .3rem; }
.sense blockquote { margin: .5rem 0 .3rem; padding: .2rem 0 .2rem .9rem; border-left: 3px solid var(--gold); font-family: var(--serif); font-size: 1.02rem; }
.sense blockquote cite { display: block; font-size: .85rem; color: var(--muted); font-style: normal; font-family: var(--font); }
.cite-box pre { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: .92rem; background: var(--bg); border: 1px solid var(--line); padding: .7rem .9rem; border-radius: 8px; margin: .3rem 0 .9rem; }
.cite-box b { display: block; margin-top: .2rem; }
.disputed { background: var(--gold-soft); border-left: 4px solid var(--gold-deep); padding: .7rem 1rem; border-radius: 8px; }
.article-body { font-family: var(--serif); font-size: 1.08rem; white-space: pre-wrap; }
.comment { padding: .9rem 0; border-top: 1px solid var(--line); }
.comment:first-child { border-top: 0; }
.comment small { display: block; margin-top: .3rem; }

/* ---------- lists & results ---------- */
.result { display: grid; grid-template-columns: 1fr; gap: .15rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.result .head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; }
.result a.hw { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; text-decoration: none; }
.result .snippet { color: var(--muted); font-size: .98rem; }
.filters { display: grid; grid-template-columns: minmax(200px, 1.6fr) repeat(4, minmax(120px, 1fr)) auto; gap: .6rem; align-items: center; margin: 1rem 0 1.4rem; }
.filters input, .filters select { height: var(--control-h); }
.letters { display: flex; flex-wrap: wrap; gap: .35rem; margin: .6rem 0 1.2rem; }
.letters a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 .5rem; border: 1px solid var(--line-strong); border-radius: 8px; text-decoration: none; background: #fff; font-weight: 500; }
.letters a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.word-columns { columns: 3 220px; column-gap: 2.5rem; }
.word-columns a { display: block; text-decoration: none; padding: .15rem 0; break-inside: avoid; }
.pagination { display: flex; gap: 1.2rem; align-items: center; margin-top: 1.4rem; }
.empty { color: var(--muted); }

/* ---------- forms ---------- */
form.std label { display: block; font-weight: 500; margin-bottom: .3rem; color: var(--navy-dark); }
form.std p, form.std .field { margin: 0 0 1.1rem; }
form.std input[type=text], form.std input[type=email], form.std input[type=search], form.std input[type=number], form.std textarea, form.std select,
.filters input, .filters select {
  width: 100%; height: var(--control-h); font: inherit; padding: 0 .8rem; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink);
}
form.std textarea { height: auto; min-height: 5rem; padding: .6rem .8rem; line-height: 1.6; }
form.std input:focus, form.std textarea:focus, form.std select:focus, .filters input:focus, .filters select:focus { outline: 0; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0,38,99,.15); }
form.std .helptext { display: block; font-size: .85rem; color: var(--muted); margin-top: .2rem; font-weight: 400; }
form.std .errorlist { color: var(--bad); list-style: none; padding: 0; margin: .25rem 0 0; font-size: .9rem; }
form.std [id$=categories] { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .25rem 1rem; }
form.std [id$=categories] > div, form.std [id$=categories] > li { margin: 0; }
form.std [id$=categories] label { font-weight: 400; display: flex; align-items: center; gap: .55rem; margin: 0; }
form.std input[disabled] { background: var(--bg); color: var(--muted); }
form.std .checkbox { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
form.std .checkbox input { margin-top: .4rem; }
form.std .submit { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
form.std .choices label, form.std .choices li label { font-weight: 400; display: flex; gap: .5rem; align-items: center; }
form.std [id$=decision] { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; }
form.std [id$=decision] > div, form.std [id$=decision] > li { margin: 0; }
form.std [id$=decision] label { font-weight: 500; display: flex; gap: .5rem; align-items: center; margin: 0; }
.sense-form { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-bottom: 1rem; background: #fff; }
.sense-form h3 { margin-top: 0; color: var(--gold-deep); display: flex; gap: .6rem; align-items: center; }
.two-col { display: grid; gap: 0 1.2rem; grid-template-columns: 1fr 1fr; }
.diff { display: grid; gap: 1.2rem; grid-template-columns: 1fr 1fr; margin: 1.2rem 0; }
.otp-input { font-size: 1.7rem !important; letter-spacing: .35em; text-align: center; height: 60px !important; }
.narrow { max-width: 480px; margin: 1.5rem auto; }
.prose { max-width: 820px; }
.prose p, .prose li { font-size: 1.02rem; }

/* ---------- tables ---------- */
table.plain { border-collapse: collapse; width: 100%; font-size: .95rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.plain th { text-align: left; padding: .65rem .8rem; background: var(--navy-soft); color: var(--navy-dark); font-weight: 600; border-bottom: 1px solid var(--line); }
table.plain td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.plain tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .site-header .wrap { grid-template-columns: auto 1fr auto; grid-template-areas: "brand . flame" "search search search" "nav nav nav"; height: auto; padding-top: .7rem; padding-bottom: .5rem; row-gap: .6rem; }
  .brand { grid-area: brand; }
  .flame { grid-area: flame; }
  .header-search { grid-area: search; }
  .search-pill { max-width: none; }
  .site-nav { grid-area: nav; justify-content: space-between; gap: .3rem; }
  .site-nav a { flex: 1 1 auto; height: 44px; padding: 0 .4rem; font-size: .86rem; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters input { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  html { font-size: 15px; }
  .two-col, .diff { grid-template-columns: 1fr; }
  .entry-head h1 { font-size: 2.1rem; }
  .hero h1 { font-size: 1.7rem; }
  .hero .search-pill { height: 50px; }
  .site-nav a small { display: none; }
  .brand img { height: 44px; }
  .flame, .flame .flame-svg { width: 46px; height: 46px; }
  .card { padding: 1.1rem 1.2rem; }
  .stats { gap: 1.5rem; }
}

/* typing tips under the search boxes */
.search-tips { max-width: 680px; margin: .8rem auto 0; font-size: .9rem; color: var(--muted); }
.search-tips a { display: inline-block; margin: 0 .2rem; padding: 0 .55rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-size: .86rem; line-height: 1.8; }
.search-tips a:hover { border-color: var(--navy); }
.search-tips .en { margin-top: .35rem; }
code { font-size: .88em; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 0 .3rem; }

.needs-def { display: block; margin-top: .3rem; font-size: .88rem; color: var(--warn); }
.needs-def a { color: var(--navy); font-weight: 600; }

/* ---------- legal documents, consent, credits ---------- */
.pill.danger { background: #fbecea; color: var(--bad); }
.wide-narrow { max-width: 640px; }
.legal-doc { max-width: 860px; }
.legal-doc .doc-head { margin-bottom: 1.6rem; }
.legal-doc .doc-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-size: .88rem; color: var(--muted); margin: .2rem 0 .8rem; }
.legal-doc .doc-meta code { font-size: .82rem; background: var(--navy-soft); padding: 0 .35rem; border-radius: 4px; }
.legal-doc .doc-lang { font-size: .9rem; color: var(--muted); border-left: 3px solid var(--gold); padding-left: .8rem; }
.doc-links { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.doc-links a { font-size: .85rem; padding: .25rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; }
.doc-links a:hover { border-color: var(--navy); }
.legal-doc section { margin: 0 0 1.6rem; }
.legal-doc section > h2 { font-size: 1.15rem; border-bottom: 1px solid var(--line); padding-bottom: .35rem; }
.legal-doc ol, .legal-doc ul { padding-left: 1.4rem; }
.legal-doc li { margin-bottom: .45rem; line-height: 1.7; }
.ta-summary { background: var(--gold-soft); border-radius: 8px; padding: .7rem 1rem; line-height: 1.85; font-size: .97rem; }
.legal-doc table.plain { margin: .6rem 0 1rem; }
.doc-list { padding-left: 1.2rem; }
.consent-box { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem .4rem; margin: 0 0 1.1rem; background: #fbfcfe; }
.consent-box legend { font-weight: 600; color: var(--navy-dark); padding: 0 .4rem; }
.consent-box .helptext { margin: 0 0 .8rem; }
form.std .consent-item { margin: 0 0 .75rem; line-height: 1.65; font-size: .95rem; }
form.std .consent-item a { white-space: nowrap; }
form.std .consent-item.has-error { color: var(--bad); }
.consent-item .req { color: var(--bad); }
.credits .purpose { margin-bottom: 1.6rem; }
.source-card { margin-bottom: 1rem; }
.source-card h3 { margin: 0 0 .6rem; color: var(--navy-dark); }
.source-card h3 small { font-weight: 400; color: var(--muted); }
.source-facts { display: grid; grid-template-columns: minmax(150px, 210px) 1fr; gap: .45rem 1rem; margin: 0; font-size: .95rem; }
.source-facts dt { font-weight: 600; color: var(--navy-dark); }
.source-facts dd { margin: 0; line-height: 1.65; }
.source-facts code { white-space: normal; font-size: .85rem; }
.ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; }
@media (max-width: 640px) { .source-facts { grid-template-columns: 1fr; } .source-facts dd { margin-bottom: .4rem; } }

/* ---------- admin console ---------- */
.console { display: grid; grid-template-columns: 210px 1fr; gap: 1.6rem; align-items: start; }
.console-nav { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: .15rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem; }
.console-head { margin: 0 0 .4rem; padding: .2rem .5rem; font-weight: 700; color: var(--navy-dark); font-size: .92rem; }
.console-sep { margin: .7rem .5rem .2rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.console-nav a { display: block; padding: .45rem .6rem; border-radius: 7px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: .93rem; line-height: 1.3; }
.console-nav a small { display: block; font-size: .74rem; color: var(--muted); font-weight: 400; }
.console-nav a:hover { background: var(--navy-soft); }
.console-nav a.on { background: var(--navy); color: #fff; }
.console-nav a.on small { color: #cfd8ea; }
.console-main { min-width: 0; }
.console-main h1 { margin-top: 0; }
.console-main .card { margin-bottom: 1.2rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .9rem; margin: 1rem 0 1.4rem; }
.tile { display: block; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: var(--radius); padding: .8rem 1rem; text-decoration: none; color: var(--ink); }
a.tile:hover { border-color: var(--navy); }
.tile b { display: block; font-size: 1.6rem; color: var(--navy); line-height: 1.2; }
.tile span { display: block; font-size: .86rem; color: var(--ink); }
.tile small { display: block; font-size: .78rem; color: var(--muted); margin-top: .2rem; }
.tile.hot { border-left-color: var(--gold); }
.tile.alert { border-left-color: var(--bad); }
.tile.alert b { color: var(--bad); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
table.plain.compact td, table.plain.compact th { padding: .4rem .6rem; font-size: .9rem; }
tr.dim td { opacity: .55; }
.console-main .filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 1rem; }
.console-main .filters input[type=search], .console-main .filters input[type=text] { width: auto; flex: 1 1 200px; }
.console-main .filters select { width: auto; flex: 0 1 220px; }
.console-main .filters input[type=date] { width: auto; }
.console-main .filters label { font-size: .85rem; color: var(--muted); display: flex; gap: .3rem; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips a { padding: .2rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; font-size: .92rem; }
.chips a small { color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; border-bottom: 1px solid var(--line); padding-bottom: 1.3rem; position: relative; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.bar span { display: block; background: var(--navy); border-radius: 3px 3px 0 0; min-height: 1px; }
.bar small { position: absolute; bottom: -1.25rem; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .68rem; color: var(--muted); }
.limit-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.limit-form input[type=number] { width: 6.5rem; height: 34px; padding: 0 .4rem; border: 1px solid var(--line-strong); border-radius: 6px; font: inherit; }
.limit-form label { font-size: .8rem; color: var(--muted); display: flex; gap: .25rem; align-items: center; }
.expertise-grid ul, .expertise-grid > div { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .3rem 1rem; }
.expertise-grid label { font-weight: 400 !important; display: flex !important; gap: .5rem; align-items: center; margin: 0 !important; }
.new-key { background: var(--gold-soft); border: 1px solid var(--gold); border-radius: 8px; padding: .8rem 1rem; margin: .8rem 0; }
.new-key code { display: inline-block; margin-top: .4rem; font-size: .95rem; user-select: all; word-break: break-all; }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }
.inline-form input[type=text] { flex: 1 1 260px; width: auto; }
@media (max-width: 860px) {
  .console { grid-template-columns: 1fr; }
  .console-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .console-head, .console-sep { width: 100%; }
  .console-nav a small { display: none; }
}
main.wrap.wide { max-width: 1360px; }
.console-main table.plain { font-size: .88rem; }
.console-main table.plain td small { line-height: 1.5; }
.console-main .pill { white-space: nowrap; }
@media (max-width: 480px) {
  .site-nav { flex-wrap: wrap; justify-content: center; row-gap: .15rem; }
  .site-nav a { flex: 1 1 30%; height: 38px; padding: 0 .3rem; font-size: .82rem; }
}
.quote-box { background: var(--bg); border-left: 3px solid var(--line-strong); padding: .7rem .9rem; border-radius: 6px; line-height: 1.7; }
.console-main hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
.console-main .disputed { margin: .4rem 0 1rem; }
