/* Orbit Connect base: fonts, reset, element defaults, typography, prose, focus, motion, print. */

/* ---- Fonts: Inter Variable, self-hosted (OFL, see fonts/LICENSE-inter.txt) ------------------- */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-variable-latin.woff2") format("woff2");
}
/* Rupee sign only (1 KB), fetched only when a page contains one; being declared later it wins for U+20B9. */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-variable-rupee.woff2") format("woff2");
  unicode-range: U+20B9;
}
/* Metric-adjusted stand-in until Inter arrives (no jump on swap): Inter is 107.5% of Arial's width; ascent/descent divided by that. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 107.5%;
  ascent-override: 90.1%;
  descent-override: 22.4%;
  line-gap-override: 0%;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "calt", "kern";
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
  display: block;
}

img,
picture,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--color-selection);
  color: var(--color-text);
}

/* ---- Focus ---------------------------------------------------------------------------------- */
:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--focus-offset);
}

[tabindex="-1"]:focus {
  outline: 0; /* skip-link target (<main>): a big ring around the whole page is noise */
}

/* ---- Element defaults: rhythm from bottom margins, trimmed on the last child ---- */
p,
ul,
ol,
dl,
blockquote,
pre,
figure,
table,
form {
  margin: 0 0 var(--space-4);
}

:where(p, ul, ol, dl, h1, h2, h3, h4, h5, h6, blockquote, pre, figure, table, form):last-child {
  margin-bottom: 0;
}

ul,
ol {
  padding-left: 1.25em;
}

li::marker {
  color: var(--color-muted);
}

dd {
  margin-left: 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--space-8) 0;
}

strong,
b {
  font-weight: var(--weight-semibold);
}

sub,
sup {
  line-height: 0;
}

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

/* ---- Links: coloured and underlined so they never rely on colour alone; components switch the underline off. ---- */
a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-link-hover);
  text-decoration-thickness: 0.12em;
}

/* ---- Headings + type scale (classes are tag-independent) ---- */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4 {
  margin: 0 0 var(--space-3);
  color: var(--color-text);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

h1,
.h1 {
  font-size: var(--text-4xl);
  line-height: var(--leading-tight);
  letter-spacing: -0.03em;
}

h2,
.h2 {
  font-size: var(--text-3xl);
  line-height: 1.16;
}

h3,
.h3 {
  font-size: var(--text-2xl);
  line-height: 1.22;
  font-weight: 650;
}

h4,
.h4 {
  font-size: var(--text-xl);
  line-height: 1.3;
  font-weight: 650;
}

h5,
h6 {
  font-size: var(--text-base);
}

.lead {
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--color-text-2);
  text-wrap: pretty;
}

small,
.small {
  font-size: var(--text-sm);
  line-height: 1.5;
}

.muted {
  color: var(--color-muted);
}

.tabular,
.table,
.stat__value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum", "calt", "kern";
}

/* ---- Code ----------------------------------------------------------------------------------- */
code,
kbd,
samp,
pre,
.code,
.kbd {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

code,
.code {
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  overflow-wrap: anywhere;
}

kbd,
.kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.1em 0.45em;
  border: 1px solid var(--color-border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: var(--weight-medium);
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

pre {
  padding: var(--space-4);
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  line-height: 1.6;
  tab-size: 2;
}

pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 1em;
  overflow-wrap: normal;
}

/* ---- Prose: long-form text (legal, about). Put it on the wrapper. ---- */
.prose { max-width: 70ch; font-size: 1.0625rem; line-height: 1.7; color: var(--color-text-2); }
.prose > :first-child { margin-top: 0; }
.prose :is(h1, h2, h3, h4) { color: var(--color-text); scroll-margin-top: calc(var(--header-h) + var(--space-4)); }
.prose h2 { margin: 2.4em 0 0.6em; padding-top: 0.9em; border-top: 1px solid var(--color-border); font-size: var(--text-2xl); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { margin: 1.9em 0 0.5em; font-size: var(--text-xl); }
.prose h4 { margin: 1.6em 0 0.4em; font-size: var(--text-lg); }
.prose :is(p, ul, ol, dl, blockquote, pre, table, figure) { margin-bottom: 1.15em; }
.prose li + li { margin-top: 0.4em; }
.prose li > :is(ul, ol) { margin: 0.4em 0 0; }
.prose ul { padding-left: 1.35em; }
.prose ol { padding-left: 1.5em; }
.prose strong { color: var(--color-text); }
.prose a { text-decoration-thickness: 0.09em; }
.prose blockquote { padding: 0.25em 0 0.25em 1.1em; border-left: 3px solid var(--brand-300); color: var(--color-text); }
.prose img { border-radius: var(--radius-md); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.prose :is(th, td) { padding: 0.6em 0.8em; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.prose th { color: var(--color-text); font-weight: var(--weight-semibold); border-bottom-color: var(--color-border-strong); }
.prose hr { margin: 2.4em 0; }

/* ---- Motion ---- */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Print: legal/prose pages print cleanly; chrome and controls are dropped ---- */
@media print {
  @page { margin: 18mm 16mm; }
  html, body { background: #fff !important; color: #000 !important; font-size: 11pt; }
  body { display: block; }
  .site-header, .site-footer, .skip-link, .tabs, .breadcrumbs, .section--dark, .btn, .password-toggle, [data-copy], .u-no-print { display: none !important; }
  .container, .container--narrow, .container--wide { max-width: none; padding-inline: 0; }
  .section { padding-block: 0.6cm; background: none !important; border: 0; }
  .prose { max-width: none; font-size: 11pt; color: #000; }
  .prose h2, .prose h3, .prose h4 { break-after: avoid; color: #000; }
  .prose p, .prose li { orphans: 3; widows: 3; }
  a { color: #000; text-decoration: underline; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
  .card, .alert, .notice, .table-wrap { box-shadow: none !important; break-inside: avoid; }
}
