/* =========================================================================
   Bharat Visa Services — Legal pages (/privacy/, /terms/)
   Layered on /assets/css/site.css + /assets/css/service.css.
   Uses only bharatvisa.com design tokens. Production build: no staging,
   draft or decision styles.
   ========================================================================= */

/* ---- Hero ----------------------------------------------------------------
   Service pages pair a lede with the "At a glance" card. Legal pages have no
   lede, so the card becomes a full-width facts strip under the title. */
.legal-hero { padding-bottom: var(--s-6); }
.legal-hero .hero-title-main { font-size: var(--t-xl); }
.legal-hero .hero-title { margin-bottom: 0; }
.legal-hero .sv-hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.legal-hero .sv-facts { padding: var(--s-4) var(--s-5); }
.legal-hero .sv-facts-title { font-size: var(--t-sm); margin-bottom: var(--s-3); }
.legal-hero .sv-facts dl { display: grid; gap: var(--s-3) var(--s-5); }
.legal-hero .sv-fact { border: 0; margin: 0; }
.legal-hero .sv-fact dd { overflow-wrap: anywhere; }
@media (min-width: 40em) { .legal-hero .sv-facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .legal-hero .sv-facts dl { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.link-btn {
  font: inherit;
  color: var(--link);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.link-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

/* ---- Reading layout -------------------------------------------------------- */
section.legal { padding-top: var(--s-5); }
.legal-grid { display: grid; gap: var(--s-6); }
.toc-rail { display: none; }

@media (min-width: 64em) {
  .legal-grid { grid-template-columns: 16rem minmax(0, 1fr); gap: var(--s-8); }
  .toc-rail {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    align-self: start;
    max-height: calc(100vh - var(--header-h) - 3rem);
    overflow: auto;
    padding-right: var(--s-2);
  }
  .toc-inline { display: none; }
}

.toc-title {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 var(--s-3);
}
.toc-list, .toc-list ol { list-style: none; margin: 0; padding: 0; }
.toc-list ol { padding-left: var(--s-3); border-left: 1px solid var(--line); margin: var(--s-1) 0 var(--s-2) 2px; }
.toc-list a {
  display: block;
  padding: 5px 8px;
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: var(--t-sm);
  line-height: 1.35;
  text-decoration: none;
}
.toc-list a:hover { background: var(--pale); color: var(--navy); }
.toc-list a[aria-current="true"] { background: var(--pale); color: var(--royal-700); font-weight: 700; }
.toc-list .toc-part > a { font-weight: 700; color: var(--navy); }

.toc-inline {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--light);
  margin-bottom: var(--s-6);
}
.toc-inline > summary {
  cursor: pointer;
  padding: var(--s-3) var(--s-4);
  font-weight: 700;
  color: var(--navy);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
}
.toc-inline > summary::-webkit-details-marker { display: none; }
.toc-inline > summary .icon { transition: transform var(--dur-1, 140ms) var(--ease); }
.toc-inline[open] > summary .icon { transform: rotate(180deg); }
.toc-inline .toc-list { padding: 0 var(--s-3) var(--s-3); }

/* ---- Article typography -------------------------------------------------- */
.legal-body { max-width: 44rem; min-width: 0; }
.legal-body > :first-child { margin-top: 0; }
.legal-body h2 {
  font-family: var(--font-display);
  font-size: var(--t-lg);
  font-weight: 560;
  line-height: 1.2;
  color: var(--heading);
  margin: var(--s-7) 0 var(--s-3);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.legal-body h2.part-title {
  font-size: var(--t-xl);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
  margin-top: var(--s-8);
}
.legal-body h2.part-title:first-of-type { border-top: 0; padding-top: 0; margin-top: var(--s-6); }
.legal-body h3 {
  font-family: var(--font-body);
  font-size: var(--t-md);
  font-weight: 700;
  line-height: 1.3;
  color: var(--heading);
  margin: var(--s-6) 0 var(--s-2);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.legal-body p,
.legal-body li { font-size: var(--t-base); line-height: 1.65; color: var(--text); }
.legal-body p { margin: 0 0 var(--s-4); }
.legal-body ul { margin: 0 0 var(--s-5); padding-left: 1.3em; }
.legal-body li + li { margin-top: .45em; }
.legal-body li::marker { color: var(--royal); }
.legal-body strong { color: var(--navy); font-weight: 700; }
.legal-body :is(p, ul) a:not(.btn) { color: var(--link); text-underline-offset: 2px; }

.legal-intro {
  background: var(--pale);
  border-left: 4px solid var(--royal);
  border-radius: var(--r-md);
  padding: var(--s-5);
  margin-bottom: var(--s-6);
}
.legal-intro p:last-child { margin-bottom: 0; }

.legal-contact {
  margin-top: var(--s-7);
  padding: var(--s-6);
  background: var(--light);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.legal-contact h2 { margin-top: 0; scroll-margin-top: calc(var(--header-h) + 1rem); }
.legal-contact p:last-child { margin-bottom: 0; }

.back-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--s-6);
  font-size: var(--t-sm);
  font-weight: 600;
}
.back-top .icon { transform: rotate(-90deg); width: 1em; height: 1em; }

/* ---- Print ---------------------------------------------------------------- */
@media print {
  .skip-link, .disclosure, .site-header, .mobile-nav, .dock,
  .site-footer, .toc-rail, .toc-inline, .sv-crumbs, .back-top, .link-btn { display: none !important; }
  .legal-grid { display: block; }
  .legal-body { max-width: none; }
  .legal-hero { padding: 0 0 12pt !important; }
  .legal-body p, .legal-body li { font-size: 11pt; line-height: 1.45; }
  .legal-body h2 { break-after: avoid; }
  .legal-body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; }
}

@media (prefers-reduced-motion: reduce) {
  .toc-inline > summary .icon { transition: none; }
}
