/* Layout concept: a chamber-and-court identity. Cool paper ground, court-green bands, one sealing-wax mark.
   Left-aligned text column with a wide asymmetric hero; tables carry the subject-specific information. */
:root {
  --paper: #F6F7F4;
  --surface: #FFFFFF;
  --ink: #17211C;
  --muted: #536058;
  --line: #D8DED8;
  --accent: #1E4D3A;
  --band: #1E4D3A;
  --band-ink: #F1F5F2;
  --band-muted: #B9CCC1;
  --seal: #A3322A;
  --display: "Spectral", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --hindi: "Tiro Devanagari Hindi", "Noto Serif Devanagari", "Mangal", serif;
  --hindi-body: "Hind", "Noto Sans Devanagari", "Mangal", sans-serif;
  --measure: 66ch;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1613; --surface: #151E1A; --ink: #E5ECE7; --muted: #9DABA3; --line: #2A3830;
    --accent: #8CC7A9; --band: #143427; --band-ink: #E5ECE7; --band-muted: #9FB8AA; --seal: #E07A6F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F1613; --surface: #151E1A; --ink: #E5ECE7; --muted: #9DABA3; --line: #2A3830;
  --accent: #8CC7A9; --band: #143427; --band-ink: #E5ECE7; --band-muted: #9FB8AA; --seal: #E07A6F;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.65;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--seal); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; }
.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 12px; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { text-decoration: none; color: var(--ink); display: grid; gap: 1px; }
.brand-name { font-family: var(--display); font-size: 1.32rem; font-weight: 600; line-height: 1.1; }
.brand-role { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.01em; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; }
.nav .hi { font-family: var(--hindi-body); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 0.98rem/1 var(--body); padding: 13px 20px; border-radius: 4px;
  text-decoration: none; border: 1.5px solid var(--accent); cursor: pointer;
}
.btn-solid { background: var(--accent); color: var(--paper); }
.btn-solid:hover { filter: brightness(1.08); text-decoration: none; }
.btn-line { background: transparent; color: var(--accent); }
.btn-line:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.btn svg { width: 18px; height: 18px; flex: none; }
.menu-toggle { display: none; background: none; border: 1.5px solid var(--line); border-radius: 4px; color: var(--ink); font: 600 0.9rem var(--body); padding: 9px 12px; cursor: pointer; }

@media (max-width: 920px) {
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 6px max(20px, env(safe-area-inset-right, 0px)) 16px max(20px, env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav .btn { margin-top: 12px; border-bottom: 1.5px solid var(--accent); }
}

/* Hero */
.hero { padding-block: clamp(36px, 6vw, 80px) clamp(36px, 5vw, 64px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero-court { font-family: var(--display); font-style: italic; color: var(--muted); font-size: 1.1rem; }
.hero h1 { max-width: 17ch; }
.hero-lede { font-size: 1.15rem; color: var(--muted); max-width: 54ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.number { font-variant-numeric: tabular-nums; }
.credentials { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 4px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: 0.92rem; color: var(--muted); }
.credentials strong { display: block; color: var(--ink); font-weight: 600; font-size: 0.98rem; }

.portrait { position: relative; margin: 0; min-width: 0; }
.portrait-frame { position: relative; aspect-ratio: 4 / 5; max-width: 100%; border-radius: 4px; overflow: hidden; background: var(--band); }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait-fallback { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: var(--band-ink); gap: 8px; padding: 24px; }
.portrait-fallback .mono { font-family: var(--display); font-size: clamp(4rem, 9vw, 6.5rem); line-height: 1; letter-spacing: 0.02em; }
.portrait-fallback small { color: var(--band-muted); font-size: 0.9rem; }
.portrait-frame.has-img .portrait-fallback { display: none; }
.seal {
  position: absolute; left: -18px; bottom: 28px; width: 92px; height: 92px; border-radius: 50%;
  background: var(--seal); color: #FFF7F5; display: grid; place-content: center; text-align: center;
  font-family: var(--display); font-size: 0.78rem; line-height: 1.2; padding: 10px;
  box-shadow: 0 0 0 4px var(--paper);
}
.seal b { display: block; font-size: 1.05rem; font-weight: 600; }
.portrait figcaption { margin-top: 12px; font-size: 0.85rem; color: var(--muted); }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; }
  .seal { left: auto; right: 12px; bottom: 12px; width: 80px; height: 80px; }
}

/* Sections */
.section { padding-block: clamp(44px, 6vw, 84px); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 10px; margin-bottom: 30px; max-width: var(--measure); }
.section-head p { color: var(--muted); }
.prose { max-width: var(--measure); display: grid; gap: 1.05em; }
.prose h2 { margin-top: 1.2em; }
.prose h3 { margin-top: 0.8em; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; display: grid; gap: 0.45em; }
.prose blockquote { margin: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--seal); font-family: var(--display); font-size: 1.15rem; }
.note { font-size: 0.92rem; color: var(--muted); }

/* Forum guide table */
.table-scroll { overflow-x: auto; max-width: 100%; }
.forum { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 0.98rem; }
.forum th, .forum td { text-align: left; vertical-align: top; padding: 16px 18px 16px 0; border-bottom: 1px solid var(--line); }
.forum thead th { font-family: var(--body); font-weight: 600; font-size: 0.85rem; color: var(--muted); padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.forum td:first-child { font-family: var(--display); font-size: 1.12rem; width: 32%; }
.forum td small { display: block; color: var(--muted); font-size: 0.86rem; margin-top: 4px; font-family: var(--body); }

/* Practice list */
.practice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.practice a { display: grid; gap: 6px; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.practice a:hover h3 { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.practice p { color: var(--muted); font-size: 0.98rem; }
.practice .lead-item { grid-column: 1 / -1; padding-top: 0; }
.practice .lead-item h3 { font-size: 1.7rem; }
@media (max-width: 720px) { .practice { grid-template-columns: 1fr; } }

/* About split */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.facts { margin: 0; display: grid; gap: 0; }
.facts div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 0.92rem; }
.facts dd { margin: 0; }
@media (max-width: 520px) { .facts div { grid-template-columns: 1fr; gap: 2px; } }

/* Article list */
.articles { display: grid; gap: 0; max-width: 820px; }
.articles a { display: grid; gap: 6px; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.articles a:first-child { padding-top: 0; }
.articles a:hover h3 { color: var(--accent); }
.articles .meta { font-size: 0.86rem; color: var(--muted); }
.articles p { color: var(--muted); }
.articles .hi-item h3, .articles .hi-item p { font-family: var(--hindi-body); }
.articles .hi-item h3 { font-family: var(--hindi); font-weight: 400; }

/* Band */
.band { background: var(--band); color: var(--band-ink); }
.band .wrap { padding-block: clamp(44px, 6vw, 76px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); }
.band h2 { color: var(--band-ink); }
.band p { color: var(--band-muted); }
.band a { color: var(--band-ink); }
.band .btn-solid { background: var(--band-ink); color: var(--band); border-color: var(--band-ink); }
.band .btn-line { color: var(--band-ink); border-color: var(--band-ink); }
.contact-lines { margin: 0; display: grid; gap: 0; }
.contact-lines div { padding: 12px 0; border-bottom: 1px solid color-mix(in srgb, var(--band-ink) 22%, transparent); display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 12px; }
.contact-lines dt { color: var(--band-muted); font-size: 0.9rem; }
.contact-lines dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 820px) { .band .wrap { grid-template-columns: 1fr; } }

/* Page head for inner pages */
.page-head { padding-block: clamp(36px, 5vw, 64px) clamp(24px, 3vw, 36px); border-bottom: 1px solid var(--line); }
.page-head .wrap { display: grid; gap: 14px; }
.crumbs { font-size: 0.88rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.page-head p.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.byline { font-size: 0.92rem; color: var(--muted); }

.layout-aside { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(28px, 5vw, 64px); align-items: start; }
.aside { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 96px); display: grid; gap: 14px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.aside h2 { font-size: 1.25rem; }
.aside p { font-size: 0.95rem; color: var(--muted); }
.aside .btn { width: 100%; }
@media (max-width: 920px) { .layout-aside { grid-template-columns: 1fr; } .aside { position: static; } }

/* Publications */
.pubs { display: grid; gap: 34px; max-width: 860px; }
.pubs ol { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 0; }
.pubs li { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.pubs li em { font-family: var(--display); font-style: normal; font-size: 1.12rem; color: var(--ink); }
.pubs li span { color: var(--muted); font-size: 0.95rem; }

/* Contact form */
.form { display: grid; gap: 16px; max-width: 560px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 4px; padding: 12px 14px; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field textarea { min-height: 130px; resize: vertical; }
.form .hint { font-size: 0.88rem; color: var(--muted); }
.form-error { color: var(--seal); font-size: 0.92rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 40px 110px; font-size: 0.92rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 26px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 0.8fr)); gap: 28px; }
.foot-grid h2 { font-family: var(--body); font-size: 0.92rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-grid a { color: var(--muted); }
.legal-line { border-top: 1px solid var(--line); padding-top: 18px; max-width: 90ch; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* Mobile action bar */
.mobile-bar { display: none; }
@media (max-width: 720px) {
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: var(--paper); border-top: 1px solid var(--line);
    padding: 10px max(14px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
  }
  .mobile-bar .btn { padding: 14px 10px; }
}

/* Disclaimer dialog */
.gate { position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, var(--ink) 55%, transparent); display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.gate-box { background: var(--surface); color: var(--ink); max-width: 620px; width: 100%; max-height: 86vh; overflow-y: auto; border-radius: 6px; padding: clamp(22px, 4vw, 34px); display: grid; gap: 14px; }
.gate-box h2 { font-size: 1.5rem; }
.gate-box p, .gate-box li { font-size: 0.95rem; color: var(--muted); }
.gate-box ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }

/* Hindi pages */
.lang-hi body, body.lang-hi { font-family: var(--hindi-body); line-height: 1.8; }
body.lang-hi h1, body.lang-hi h2, body.lang-hi h3 { font-family: var(--hindi); font-weight: 400; line-height: 1.35; }

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

/* Process steps (a real sequence, so numbered) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 8px; align-content: start; padding-top: 16px; border-top: 2px solid var(--ink); }
.steps li::before { content: counter(step); font-family: var(--display); font-size: 2.2rem; line-height: 1; color: var(--seal); }
.steps p { color: var(--muted); font-size: 0.98rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.contact-photo { max-width: 300px; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.gallery figure { margin: 0; display: grid; gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; display: block; }
.gallery figcaption { font-size: 0.88rem; color: var(--muted); }
@media (max-width: 720px) { .gallery { grid-template-columns: 1fr; } }
