/*
  IndianLegalInfo placeholder: design system.
  Every colour, size, space, radius and motion value is a token on :root. Components use tokens only,
  so a test can pin contrast and forbid colour literals elsewhere. Fonts: system stacks, no font files.
  Direction: a legal publication (serif headlines, plain reading column, citations as a first-class element)
  in the platform's own blue and orange, alternating light and dark bands.
*/

:root {
  color-scheme: light;

  /* Brand (from the platform: primary blue 222/68/44, accent orange 24/94/54) */
  --brand: #2452bd;
  --brand-strong: #1c4399;
  --brand-ink: #1c4399;
  --on-brand: #ffffff;
  --brand-tint: #e8eefb;
  --accent: #e8590c;
  --accent-ink: #7c2d12;
  --accent-tint: #fdf0dc;

  /* Surfaces and text */
  --bg: #ffffff;
  --bg-subtle: #f3f6fc;
  --surface: #ffffff;
  --ink: #0e1a2b;
  --ink-muted: #3d4b61;
  --line: #d5dce8;
  --line-strong: #76849a;
  --focus: #2452bd;

  /* Bands that keep their colour in both themes */
  --band-dark-bg: #0b1b4a;
  --band-dark-surface: #12275f;
  --band-dark-fg: #eef3ff;
  --band-dark-muted: #b9c6e8;
  --band-dark-accent: #ffc58f;
  --band-dark-line: #2d4688;
  --band-accent-bg: #f8731b;
  --band-accent-fg: #1a0e02;
  --band-accent-link: #1a0e02;

  /* Type */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-xl: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
  --fs-2xl: clamp(2.1rem, 1.3rem + 3vw, 3.4rem);
  --lh-tight: 1.15;
  --lh-snug: 1.35;
  --lh-body: 1.65;

  /* Space (4px base) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;
  --s-9: 6rem;

  /* Shape, depth, motion */
  --r-1: 0.375rem;
  --r-2: 0.75rem;
  --r-3: 1.25rem;
  --shadow-1: 0 1px 2px rgb(14 26 43 / 8%), 0 2px 8px rgb(14 26 43 / 6%);
  --shadow-2: 0 8px 28px rgb(14 26 43 / 14%);
  --dur: 160ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --tap: 2.75rem;
  --container: 72rem;
  --measure: 68ch;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --brand-ink: #9db9ff;
  --brand-tint: #14264d;
  --accent-ink: #ffc58f;
  --accent-tint: #3a2410;
  --bg: #0b1220;
  --bg-subtle: #101a2e;
  --surface: #131f36;
  --ink: #e8eefb;
  --ink-muted: #b4c2dc;
  --line: #2a3a5c;
  --line-strong: #7d90b5;
  --focus: #9db9ff;
  --shadow-1: 0 1px 2px rgb(0 0 0 / 40%), 0 2px 8px rgb(0 0 0 / 30%);
  --shadow-2: 0 8px 28px rgb(0 0 0 / 50%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--brand-ink);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-1);
}

.skip-link {
  position: absolute;
  left: var(--s-3);
  top: -4rem;
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--brand);
  color: var(--on-brand);
  border-radius: var(--r-1);
}

.skip-link:focus {
  top: var(--s-3);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-5);
}

.narrow {
  max-width: 50rem;
}

.centered {
  text-align: center;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-4);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-2xl);
}

h2 {
  font-size: var(--fs-xl);
}

h3 {
  font-size: var(--fs-lg);
  margin-top: var(--s-5);
}

p {
  margin: 0 0 var(--s-4);
  max-width: var(--measure);
  text-wrap: pretty;
}

.centered p {
  margin-inline: auto;
}

.lead {
  font-size: var(--fs-md);
  color: var(--ink-muted);
}

.fine {
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-height: 4rem;
  flex-wrap: wrap;
  padding-block: var(--s-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--tap);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-weight: 700;
}

.brand img {
  width: 2rem;
  height: 2rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-3);
  margin-left: auto;
  align-items: center;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding-inline: var(--s-2);
  color: var(--ink-muted);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 600;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.theme-toggle {
  min-width: var(--tap);
  min-height: var(--tap);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--brand);
}

/* Bands */
.band-light,
.band-subtle,
.band-dark,
.band-accent {
  padding-block: var(--s-8);
}

.band-subtle {
  background: var(--bg-subtle);
  border-block: 1px solid var(--line);
}

.band-dark {
  background: var(--band-dark-bg);
  color: var(--band-dark-fg);
}

.band-dark .section-lead,
.band-dark p {
  color: var(--band-dark-muted);
}

.band-dark a {
  color: var(--band-dark-accent);
}

.band-accent {
  background: var(--band-accent-bg);
  color: var(--band-accent-fg);
}

.band-accent a {
  color: var(--band-accent-link);
  font-weight: 700;
}

.section-lead {
  font-size: var(--fs-md);
  color: var(--ink-muted);
  max-width: var(--measure);
}

.more {
  margin-top: var(--s-5);
  font-weight: 600;
}

/* Hero */
.hero {
  padding-block: var(--s-8) var(--s-9);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  gap: var(--s-7);
  align-items: center;
}

.hero h1 {
  max-width: 20ch;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
  padding: var(--s-1) var(--s-3);
  background: var(--accent-tint);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 700;
}

.dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin: var(--s-5) 0 var(--s-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: var(--s-2) var(--s-5);
  border-radius: var(--r-2);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.btn-primary {
  background: var(--brand);
  color: var(--on-brand);
}

.btn-primary:hover {
  background: var(--brand-strong);
}

.btn-quiet {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-quiet:hover {
  border-color: var(--brand);
}

/* Citation card: the one signature element */
.cite-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.cite-card figcaption {
  padding: var(--s-3) var(--s-5);
  background: var(--brand-tint);
  color: var(--brand-ink);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cite-body {
  padding: var(--s-5);
}

.cite-line {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  line-height: var(--lh-snug);
  color: var(--ink);
  margin-bottom: var(--s-5);
}

.cite-meta {
  display: grid;
  gap: var(--s-3);
  margin: 0;
}

.cite-meta div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
}

.cite-meta dt {
  color: var(--ink-muted);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.cite-meta dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
}

.cite-note {
  margin: 0;
  padding: var(--s-3) var(--s-5) var(--s-4);
  font-size: var(--fs-sm);
  color: var(--ink-muted);
  max-width: none;
}

/* Trust strip */
.trust-strip {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line);
  padding-block: var(--s-4);
}

.trust-grid {
  display: grid;
  gap: var(--s-2) var(--s-6);
  font-size: var(--fs-sm);
}

.trust-grid p {
  margin: 0;
  max-width: none;
}

/* Cards */
.cards {
  display: grid;
  gap: var(--s-5);
  list-style: none;
  margin: var(--s-6) 0 0;
  padding: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: var(--r-2);
  padding: var(--s-5);
  box-shadow: var(--shadow-1);
}

.card h3,
.card .card-title {
  margin-top: 0;
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  line-height: var(--lh-tight);
}

.card p:last-child {
  margin-bottom: 0;
}

.checks {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s-3);
  max-width: var(--measure);
}

.checks li {
  position: relative;
  padding-left: var(--s-6);
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 1rem;
  height: 0.55rem;
  border-left: 3px solid var(--band-dark-accent);
  border-bottom: 3px solid var(--band-dark-accent);
  transform: rotate(-45deg);
}

/* Inner pages */
.page-head {
  padding-block: var(--s-7) var(--s-5);
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  font-size: var(--fs-xl);
}

.crumbs {
  font-size: var(--fs-sm);
  color: var(--ink-muted);
  margin-bottom: var(--s-4);
}

.prose-section {
  padding-block: var(--s-7) var(--s-8);
}

.prose h2 {
  margin-top: var(--s-7);
  font-size: var(--fs-lg);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: var(--fs-md);
  font-family: var(--font-sans);
  letter-spacing: 0;
}

.prose ul,
.prose ol {
  max-width: var(--measure);
  padding-left: var(--s-5);
}

.prose li {
  margin-bottom: var(--s-2);
}

.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: var(--s-7);
  margin-bottom: var(--s-4);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1em;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
  font-size: var(--fs-sm);
}

.facts {
  display: grid;
  gap: 0;
  max-width: var(--measure);
  margin: 0;
}

.facts div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: var(--s-4);
  padding-block: var(--s-3);
  border-top: 1px solid var(--line);
}

.facts dt {
  font-weight: 700;
  color: var(--ink-muted);
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

address {
  font-style: normal;
}

/* Footer */
.footer {
  background: var(--band-dark-bg);
  color: var(--band-dark-muted);
  padding-block: var(--s-7) var(--s-6);
  font-size: var(--fs-sm);
}

.footer a {
  color: var(--band-dark-fg);
}

.footer-grid {
  display: grid;
  gap: var(--s-6);
}

.footer h2 {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--band-dark-accent);
  margin-bottom: var(--s-3);
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-1);
}

.footer p {
  max-width: none;
}

.footer-legal {
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--band-dark-line);
}

@media (min-width: 48rem) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .cards-two {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-grid {
    grid-template-columns: repeat(3, auto);
    justify-content: space-between;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

@media (min-width: 62rem) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

@media (max-width: 30rem) {
  .facts div,
  .cite-meta div {
    grid-template-columns: 1fr;
    gap: var(--s-1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}

/* Print: legal pages are printed or saved as PDF. Plain black on white, no navigation. */
@media print {
  :root {
    color-scheme: light;
  }

  body,
  .band-light,
  .band-subtle,
  .band-dark,
  .band-accent,
  .footer {
    background: Canvas;
    color: CanvasText;
  }

  .skip-link,
  .topbar nav,
  .theme-toggle,
  .actions,
  .footer-grid nav {
    display: none;
  }

  .topbar,
  .footer {
    border: 0;
  }

  /* Pale text on the dark band and the footer would vanish on white paper. */
  :is(.band-dark, .footer) :is(h2, h3, p, li, a, span, dt, dd) {
    color: CanvasText !important;
  }

  :is(.band-dark, .footer) a {
    text-decoration: underline;
  }

  .card,
  .cite-card {
    box-shadow: none;
    break-inside: avoid;
  }

  h1,
  h2,
  h3 {
    break-after: avoid;
  }

  main a[href^="/"]::after {
    content: " (indianlegalinfo.com" attr(href) ")";
    font-size: 0.85em;
  }

  main a[href^="mailto:"]::after {
    content: none;
  }
}

/* Full-width reading rows: heading on the left, text on the right, on wide screens. */
.split {
  display: grid;
  gap: var(--s-3) var(--s-7);
  padding-block: var(--s-6);
  border-top: 1px solid var(--line);
}

.split:first-child {
  border-top: 0;
  padding-top: 0;
}

.prose .split > h2 {
  margin: 0;
  font-size: var(--fs-lg);
}

.split-body > :last-child {
  margin-bottom: 0;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: minmax(13rem, 1fr) minmax(0, 2.6fr);
  }

  .prose .split > h2 {
    position: sticky;
    top: var(--s-6);
    align-self: start;
  }
}

@media print {
  .split {
    display: block;
    padding-block: var(--s-4);
  }

  .prose .split > h2 {
    position: static;
  }
}

.split-body > :first-child {
  margin-top: 0;
}

.cards + .prose {
  margin-top: var(--s-7);
}

.cards + .prose .split:first-child {
  border-top: 1px solid var(--line);
  padding-top: var(--s-6);
}
