/*
 * Nigehbaan360 — the public web surface's shared stylesheet. [O-031, U-408]
 *
 * Every page loads this: the landing page (then landing.css), the policy pages, the beta
 * screener and the pages the API renders on this origin (/plans, invitations). It holds the
 * fonts, the app's tokens in both themes, the base, the buttons, the masthead, the footer, and
 * the document, form and plan styles. The host's CSP is `style-src 'self'`, so nothing here may
 * move inline. The invitation pages need this file and the page, gzipped, inside one TCP round
 * trip (link-pages.spec.ts), so it stays lean.
 */
/* ── Fonts: self-hosted, subset, swap ──────────────────────────────────── */
@font-face {
  font-family: 'Jakarta';
  src: url('/assets/fonts/jakarta-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Jakarta';
  src: url('/assets/fonts/jakarta-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Jakarta';
  src: url('/assets/fonts/jakarta-800.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Nastaliq';
  src: url('/assets/fonts/nastaliq.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
/* A metric-matched fallback, so the swap does not shove the page. */
@font-face {
  font-family: 'Jakarta Fallback';
  src: local('Arial'), local('Helvetica Neue'), local('Roboto');
  size-adjust: 104%;
  ascent-override: 92%;
  descent-override: 24%;
}

/* ── Tokens ────────────────────────────────────────────────────────────── */
:root {
  --ground: #faf7f1;
  --ground-2: #f2ede3;
  --surface: #ffffff;
  --ink: #221f1a;
  --ink-2: #4a453d;
  --ink-3: #6d665b;
  --line: #e3ddd0;
  --brand: #0b6b5d;
  --brand-500: #159480;
  --brand-50: #edf7f5;
  --brand-100: #d7eee9;
  --on-brand: #ffffff;
  --band: #053b33;
  --band-2: #0a4a40;
  --on-band: #f3efe6;
  --on-band-2: #b9d6cf;
  --clay: #d97a34;
  --ok: #146c5e;
  --ok-bg: #dcefe9;
  --warn: #96570a;
  --warn-bg: #fbebd3;
  --bezel: #1a1f1d;
  --shadow-lo: 0 1px 2px rgb(34 31 26 / 0.06), 0 4px 12px rgb(34 31 26 / 0.05);
  --shadow-hi: 0 2px 6px rgb(5 59 51 / 0.08), 0 24px 60px -12px rgb(5 59 51 / 0.28);
  --watermark: rgb(11 107 93 / 0.07);

  --font: 'Jakarta', 'Jakarta Fallback', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-ur: 'Nastaliq', 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;

  --text-sm: 0.875rem;
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --text-h3: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --text-h2: clamp(2rem, 1.35rem + 2.6vw, 3.4rem);
  --text-hero: clamp(2.6rem, 1.3rem + 5.4vw, 5.6rem);

  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --space-section: clamp(4.5rem, 3rem + 6vw, 9rem);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 220ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --ground: #0c1614;
    --ground-2: #101d1a;
    --surface: #14231f;
    --ink: #eee9df;
    --ink-2: #c6bfb2;
    --ink-3: #978f83;
    --line: #233530;
    --brand: #4cc2aa;
    --brand-500: #2fa58c;
    --brand-50: #10261f;
    --brand-100: #173a33;
    --on-brand: #04201b;
    --band: #07211d;
    --band-2: #0c2f29;
    --ok: #6fd0b9;
    --ok-bg: #12332c;
    --warn: #eaab55;
    --warn-bg: #3a2a14;
    --bezel: #000000;
    --shadow-lo: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 12px rgb(0 0 0 / 0.3);
    --shadow-hi: 0 2px 6px rgb(0 0 0 / 0.4), 0 24px 60px -12px rgb(0 0 0 / 0.7);
    --watermark: rgb(76 194 170 / 0.07);
  }
}
:root[data-theme='dark'] {
  --ground: #0c1614;
  --ground-2: #101d1a;
  --surface: #14231f;
  --ink: #eee9df;
  --ink-2: #c6bfb2;
  --ink-3: #978f83;
  --line: #233530;
  --brand: #4cc2aa;
  --brand-500: #2fa58c;
  --brand-50: #10261f;
  --brand-100: #173a33;
  --on-brand: #04201b;
  --band: #07211d;
  --band-2: #0c2f29;
  --ok: #6fd0b9;
  --ok-bg: #12332c;
  --warn: #eaab55;
  --warn-bg: #3a2a14;
  --bezel: #000000;
  --shadow-lo: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 12px rgb(0 0 0 / 0.3);
  --shadow-hi: 0 2px 6px rgb(0 0 0 / 0.4), 0 24px 60px -12px rgb(0 0 0 / 0.7);
  --watermark: rgb(76 194 170 / 0.07);
}

/* ── Base ──────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img,
svg {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h2 {
  font-size: var(--text-h2);
  font-weight: 800;
}
h3 {
  font-size: var(--text-h3);
  font-weight: 800;
  letter-spacing: -0.015em;
}
p {
  margin: 0;
  text-wrap: pretty;
}
a {
  color: var(--brand);
  text-underline-offset: 0.2em;
}
:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: 6px;
}
[lang='ur'] {
  font-family: var(--font-ur);
  line-height: 2.1;
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--brand);
  color: var(--on-brand);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip:focus {
  top: 1rem;
}
.shell {
  width: min(1200px, 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.25rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: 600 1rem/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out),
    background-color var(--dur);
}
.btn svg {
  width: 1.15rem;
  height: 1.15rem;
  transition: transform var(--dur) var(--ease-out);
}
.btn:hover svg {
  transform: translateX(3px);
}
.btn:active {
  transform: translateY(1px) scale(0.98);
}
.btn--primary {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.18) inset, 0 8px 22px -8px rgb(11 107 93 / 0.6);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.18) inset, 0 14px 30px -10px rgb(11 107 93 / 0.7);
}
.btn--ghost {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface);
}
.btn--ghost:hover {
  border-color: var(--brand-500);
  transform: translateY(-2px);
}
.btn--light {
  background: #faf7f1;
  color: #053b33;
}
.btn--light:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -12px rgb(0 0 0 / 0.5);
}
.btn--small {
  min-height: 2.6rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.9375rem;
  background: var(--brand);
  color: var(--on-brand);
}
.btn--block {
  width: 100%;
}

/* ── Masthead ──────────────────────────────────────────────────────────── */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.masthead__row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}
.brand__mark {
  width: 2.4rem;
  height: 2.4rem;
}
.brand__name {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.brand__name b {
  color: var(--brand-500);
}
.nav {
  display: none;
  gap: 0.25rem;
  margin-inline-start: auto;
}
.nav a {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color var(--dur), color var(--dur);
}
.nav a:hover {
  background: var(--brand-50);
  color: var(--brand);
}
.nav a[aria-current='page'] {
  background: var(--brand-50);
  color: var(--brand);
}
.nav .nav__ur {
  font-family: var(--font-ur);
  font-size: 1rem;
  line-height: 1.4;
}
.masthead .btn--small {
  margin-inline-start: auto;
}
@media (min-width: 960px) {
  .nav {
    display: flex;
  }
  .masthead .btn--small {
    margin-inline-start: 0;
  }
}


.footer {
  padding-block: 3rem;
  border-top: 1px solid var(--line);
  background: var(--ground);
  color: var(--ink-3);
  font-size: var(--text-sm);
}
.footer__grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 900px) {
  .footer__grid {
    grid-template-columns: 1fr 1.4fr;
  }
}
.footer__lockup {
  display: inline-block;
  border-radius: var(--radius-sm);
}
.footer__lockup img {
  display: block;
  width: auto;
  height: 64px;
}
.footer__brand p {
  margin-top: 0.75rem;
}
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-content: start;
}
.footer__nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
}
.footer__nav a:hover {
  color: var(--brand);
  text-decoration: underline;
}
.footer__legal {
  grid-column: 1 / -1;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

/* ── Documents: the policy, terms, security, delete and beta pages [U-408] ─
   Scoped to main.wrap, which only those pages (and the API's) use, so the
   landing page's own sections are never touched by these rules. */
body:has(main.wrap) {
  background:
    radial-gradient(70% 420px at 85% -80px, var(--brand-100), transparent 70%),
    radial-gradient(50% 360px at 0% -60px, var(--brand-50), transparent 70%),
    var(--ground);
  background-repeat: no-repeat;
  background-color: var(--ground);
}
main.wrap {
  width: min(48rem, 100%);
  margin-inline: auto;
  padding: clamp(2.5rem, 1.5rem + 4vw, 5rem) var(--gutter) clamp(3.5rem, 2rem + 5vw, 6rem);
}
main.wrap h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 1.5rem + 3vw, 3.6rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
}
main.wrap h2 {
  margin: 3rem 0 0.9rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
main.wrap h3 {
  margin: 1.9rem 0 0.4rem;
  font-size: 1.125rem;
  font-weight: 800;
}
main.wrap p,
main.wrap li {
  color: var(--ink-2);
}
main.wrap p + p {
  margin-top: 1rem;
}
main.wrap ul,
main.wrap ol {
  display: grid;
  gap: 0.45rem;
  padding-inline-start: 1.25rem;
}
main.wrap li::marker {
  color: var(--brand-500);
}
main.wrap strong,
main.wrap b {
  color: var(--ink);
}
main.wrap .lede {
  margin-bottom: 1.25rem;
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--ink);
}
main.wrap .meta {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-3);
  font-size: var(--text-sm);
}
main.wrap .callout {
  margin: 1.75rem 0;
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
}
main.wrap .callout > :last-child {
  margin-bottom: 0;
}
main.wrap .data-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}
main.wrap .data-list li {
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
main.wrap .data-list .what {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--ink);
  font-weight: 800;
}
main.wrap .scroll-x {
  overflow-x: auto;
  margin: 1.25rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
main.wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}
main.wrap th,
main.wrap td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
  color: var(--ink-2);
}
main.wrap th {
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}
main.wrap tr:last-child > * {
  border-bottom: 0;
}
main.wrap .lang-divider {
  margin: clamp(3rem, 2rem + 4vw, 5rem) 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}
main.wrap [lang='ur'] h1,
main.wrap [lang='ur'] h2,
main.wrap [lang='ur'] h3 {
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.8;
}
main.wrap [lang='ur'] h1 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem);
}
main.wrap section[lang='ur'] {
  font-size: 1.1rem;
}
main.wrap [lang='ur'] ol {
  list-style-type: urdu;
}
/* On a phone a three-column table becomes one card per row, each cell under its heading. */
@media (max-width: 640px) {
  main.wrap .scroll-x {
    overflow: visible;
    border: 0;
    background: none;
  }
  main.wrap .scroll-x thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  main.wrap .scroll-x :is(table, tbody, tr, td) {
    display: block;
  }
  main.wrap .scroll-x tr {
    margin-bottom: 0.75rem;
    padding: 1rem 1.2rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
  }
  main.wrap .scroll-x td {
    padding: 0.2rem 0;
    border: 0;
  }
  main.wrap .scroll-x td:first-child {
    color: var(--ink);
    font-size: 1.05rem;
  }
  main.wrap .scroll-x td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-top: 0.5rem;
    color: var(--brand);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
}

/* ── Forms: the beta screener and the invitation pages (B-04, S8.10) ─────
   Plain forms, no script; every control native and thumb-sized. */
main.wrap form {
  display: grid;
  gap: 1.25rem;
  margin-block: 2rem;
}
main.wrap fieldset {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 1.1rem 1.25rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
/* Floated, the legend sits inside its box and wraps like text instead of riding the border. */
main.wrap legend {
  float: inline-start;
  width: 100%;
  margin-bottom: 0.4rem;
  padding: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.5;
}
main.wrap legend + * {
  clear: both;
}
main.wrap fieldset label,
main.wrap .choice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  cursor: pointer;
}
main.wrap fieldset label:hover,
main.wrap .choice:hover {
  background: var(--brand-50);
}
main.wrap .field {
  display: grid;
  gap: 0.5rem;
  color: var(--ink);
  font-weight: 600;
}
main.wrap input[type='email'],
main.wrap input[type='tel'],
main.wrap input[type='text'],
main.wrap select {
  min-height: 52px;
  padding-inline: 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 400 1rem var(--font);
  transition: border-color var(--dur);
}
main.wrap input:focus-visible,
main.wrap select:focus-visible {
  border-color: var(--brand-500);
  outline-offset: 1px;
}
main.wrap input[type='radio'],
main.wrap input[type='checkbox'] {
  flex: none;
  inline-size: 1.25rem;
  block-size: 1.25rem;
  accent-color: var(--brand);
}
main.wrap button,
main.wrap a.button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.8rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font: 600 1rem/1.3 var(--font);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 22px -10px rgb(11 107 93 / 0.6);
  transition:
    transform var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}
main.wrap button:hover,
main.wrap a.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -12px rgb(11 107 93 / 0.7);
}
main.wrap button:active,
main.wrap a.button:active {
  transform: translateY(1px) scale(0.98);
}
main.wrap button.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line);
  box-shadow: none;
}
main.wrap button.link {
  min-height: auto;
  padding: 0;
  background: none;
  color: var(--brand);
  font-weight: 400;
  text-decoration: underline;
  box-shadow: none;
}
/* A field no person sees and every form-filling bot fills — the honeypot. */
main.wrap .trap {
  position: absolute;
  inset-inline-start: -10000px;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
}

/* ── Plans bought on the website (S8.8, BD-314), rendered by the API ──────
   The price is the one large figure, because it must not be misread. */
.plans .plan-options {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  margin: 1.75rem 0;
}
.plans .plan-option {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  padding: 1.6rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.plans .plan-option h2 {
  margin: 0;
  padding: 0;
  border: 0;
}
.plans .price {
  margin: 0;
  color: var(--ink) !important;
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.plans .price span {
  color: var(--ink-3);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}
.plans .signout {
  margin-top: 2.5rem;
}
.plans table.receipt th {
  width: 40%;
}
.plans .plans-ur {
  margin-top: clamp(3rem, 2rem + 4vw, 5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.plans .mock-banner {
  border-color: var(--warn);
  background: var(--warn-bg);
}
.plans .mock-choices {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}
.plans .mock-choices .button {
  display: flex;
}
