/* Shubhdin legal site. Structure and measurements follow reelsave-legal (the same studio's
   other legal site) so the two read as one family; the colours are Shubhdin's own, from
   ui/theme/Color.kt -- kesari on Banaras sandstone, never white ground. Plain HTML and CSS,
   zero JavaScript, because a policy a crawler cannot read without running scripts is a
   policy that is not there.

   Two deliberate departures from ReelSave, both for Devanagari:
   - No letter-spacing on Hindi. Tracking breaks the shirorekha, the headline stroke that
     joins the letters of a word, so the tight and spaced labels apply to :lang(en) only.
   - More leading for Hindi (1.8 against 1.6), the same rule the app keeps: matras above
     and below need the room. */

:root {
  --kesari: #C2461A;        /* brand */
  --kesari-soft: #E07A45;   /* the tl;dr edge, as ReelSave's lighter pink */
  --kesari-tint: #FCE6D6;
  --ground: #F7EAD7;        /* sandstone */
  --surface: #FFF7E8;       /* the app's raised surface */
  --fg1: #2B1810;
  --fg2: #6B4E3D;
  --fg3: #957A68;
  --border: #E8D3B6;
  --radius: 18px;
  --radius-sm: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --kesari: #F0A36E; --kesari-soft: #C2461A; --kesari-tint: #3A1F17;
    --ground: #1B0B0A; --surface: #2A1411;
    --fg1: #F7E8D0; --fg2: #CDB397; --fg3: #A88D74; --border: #4A2C22;
  }
}
:root[data-theme="dark"] {
  --kesari: #F0A36E; --kesari-soft: #C2461A; --kesari-tint: #3A1F17;
  --ground: #1B0B0A; --surface: #2A1411;
  --fg1: #F7E8D0; --fg2: #CDB397; --fg3: #A88D74; --border: #4A2C22;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  /* Latin from the system font, as ReelSave; Devanagari falls through to Noto. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Devanagari", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--fg1);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}
:lang(en) { line-height: 1.6; }

.container { max-width: 720px; margin: 0 auto; padding: 48px 24px 64px; }

/* ---------- HEADER ---------- */
header { text-align: center; margin-bottom: 48px; }
.logo-circle {
  width: 56px; height: 56px; border-radius: 28px; display: block;
  margin: 0 auto 16px;
  box-shadow: 0 4px 18px rgba(194, 70, 26, 0.32);
}
header h1 { font-size: 36px; font-weight: 800; line-height: 1.4; margin-bottom: 6px; }
header .tag { color: var(--fg2); font-size: 15px; }

/* ---------- INDEX CARDS ---------- */
.cards { display: grid; gap: 16px; margin-bottom: 48px; }
.card {
  display: block; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover, .card:focus-visible {
  transform: translateY(-2px); border-color: var(--kesari);
  box-shadow: 0 8px 24px rgba(194, 70, 26, 0.16); outline: none;
}
.card h2 { font-size: 20px; line-height: 1.5; margin-bottom: 8px; }
.card p { color: var(--fg2); font-size: 15px; margin-bottom: 14px; }
.card .arrow { color: var(--kesari); font-weight: 600; font-size: 14px; }

/* ---------- DOC PAGES ---------- */
.doc {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px 36px; margin-bottom: 32px;
}
.doc .back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--kesari); text-decoration: none;
  font-size: 14px; font-weight: 600; margin-bottom: 24px;
}
.doc .back:hover { text-decoration: underline; }
.doc h1 { font-size: 32px; line-height: 1.4; margin-bottom: 8px; }
.doc .meta { color: var(--fg3); font-size: 13px; margin-bottom: 6px; }
.doc .langs { font-size: 13px; color: var(--fg3); margin-bottom: 32px; }
.doc .langs a { text-decoration: none; font-weight: 600; }

.doc .part { border-top: 1px solid var(--border); margin-top: 44px; padding-top: 28px; }
.doc .part:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.doc .part > h2:first-child { margin-top: 0; }

.doc h2 { font-size: 19px; line-height: 1.5; margin-top: 36px; margin-bottom: 12px; }
.doc p { margin-bottom: 14px; }
.doc ul { padding-left: 22px; margin-bottom: 16px; }
.doc li { margin-bottom: 8px; }
.doc a { color: var(--kesari); text-decoration: underline; text-underline-offset: 2px; }
.doc strong { font-weight: 700; }
.doc code {
  font-size: 13px; background: var(--kesari-tint);
  padding: 1px 6px; border-radius: 6px; word-break: break-word;
}

.doc .tldr {
  background: var(--kesari-tint); border-left: 3px solid var(--kesari-soft);
  border-radius: var(--radius-sm); padding: 18px 22px; margin: 24px 0 32px;
}
.doc .tldr h2 { font-size: 13px; color: var(--kesari); margin-top: 0; margin-bottom: 10px; }
.doc .tldr h2:lang(en) { letter-spacing: 1.2px; text-transform: uppercase; }
.doc .tldr ul { margin-bottom: 0; }

/* English headings take ReelSave's tight tracking; Hindi never does (see top). */
.doc h1:lang(en), .doc h2:lang(en), .card h2:lang(en) { letter-spacing: -0.3px; }

/* ---------- FOOTER ---------- */
footer {
  text-align: center; font-size: 14px; color: var(--fg2);
  padding-top: 32px; border-top: 1px solid var(--border);
}
footer p { margin-bottom: 4px; }
footer a { color: var(--kesari); text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .muted { color: var(--fg3); font-size: 13px; margin-top: 6px; }

/* ---------- MOBILE ---------- */
@media (max-width: 600px) {
  .container { padding: 32px 18px 48px; }
  header h1 { font-size: 30px; }
  .doc { padding: 28px 22px; }
  .doc h1 { font-size: 26px; }
  .doc h2 { font-size: 17px; }
}
