/* Apni Nagri's Legal & Privacy pages: plain reading pages in the city's colours (cream, dark green, saffron).
   System fonts only, so the pages load nothing from anyone else. */
:root {
  --bg: #fbf5ea;
  --card: #fffdf8;
  --ink: #1d3b2a;
  --ink-soft: #4a5a4f;
  --line: #e3d6bf;
  --accent: #b5481d;
  --accent-soft: #f6e3cf;
  --gold: #e0a427;
  --focus: #1c6fd1;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: #8a3311; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 12px; }

header.site { background: var(--ink); color: #f6efe2; }
header.site .in { max-width: 980px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
header.site .brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
header.site .brand span { color: var(--gold); font-weight: 700; }
header.site .back { color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; }
header.site .back:hover { background: rgba(255,255,255,.22); color: #fff; }

nav.tabs { background: #f3e8d5; border-bottom: 1px solid var(--line); }
nav.tabs ul { max-width: 980px; margin: 0 auto; padding: 0 12px; list-style: none; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; }
nav.tabs a { display: block; padding: 12px 12px 11px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; white-space: nowrap; border-bottom: 3px solid transparent; }
nav.tabs a:hover { background: rgba(0,0,0,.04); }
nav.tabs a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--accent); }

main { max-width: 760px; margin: 0 auto; padding: 28px 20px 56px; }
h1 { font-size: clamp(30px, 6vw, 40px); line-height: 1.1; margin: 6px 0 8px; letter-spacing: -.02em; }
h2 { font-size: 23px; line-height: 1.25; margin: 38px 0 10px; padding-top: 6px; scroll-margin-top: 16px; }
h3 { font-size: 18px; margin: 24px 0 6px; }
p, ul, ol { margin: 0 0 14px; }
li { margin-bottom: 6px; }
.meta { color: var(--ink-soft); font-size: 15px; margin-bottom: 18px; }
.lede { font-size: 18.5px; }
.note { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: 8px; margin: 16px 0; }
.note p:last-child { margin-bottom: 0; }

.toc { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 18px 0 8px; }
.toc h2 { font-size: 16px; margin: 0 0 6px; padding: 0; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.toc ol { margin: 0; padding-left: 22px; columns: 2 260px; column-gap: 28px; }
.toc li { margin-bottom: 4px; break-inside: avoid; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 20px 0; padding: 0; list-style: none; }
.cards a { display: block; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; text-decoration: none; color: var(--ink); }
.cards a:hover { border-color: var(--accent); }
.cards b { display: block; font-size: 18px; margin-bottom: 4px; color: var(--accent); }
.cards span { color: var(--ink-soft); font-size: 15px; }

.table-wrap { overflow-x: auto; margin: 14px 0 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: #f3e8d5; font-weight: 800; }
tr:last-child td { border-bottom: 0; }
code { font: 600 14px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #f1e6d3; padding: 1px 5px; border-radius: 5px; word-break: break-word; }

footer.site { border-top: 1px solid var(--line); background: #f3e8d5; }
footer.site .in { max-width: 980px; margin: 0 auto; padding: 18px 20px 28px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 15px; color: var(--ink-soft); }
footer.site a { color: var(--ink); font-weight: 700; }

/* narrow screens: each table row becomes a small card, each cell labelled with its column */
@media (max-width: 640px) {
  .table-wrap { border: 0; background: none; overflow: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap tr { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 6px 0; }
  .table-wrap td { border: 0; padding: 4px 14px; }
  .table-wrap td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  main { padding: 20px 16px 44px; }
  th, td { padding: 9px 10px; }
}
