/* MF Mitra — product and legal pages.
   Colour tokens are copied from the brand bundle's colors.xml. They are the
   single source of truth; do not introduce a new brand colour here. The only
   thing that marks this sub-brand apart from the parent site is --accent. */

:root {
  --indigo:      #433FCF;
  --indigo-dark: #2E2AA8;
  --ink:         #161A2E;
  --ink-muted:   #5C6178;
  --surface:     #F4F5F8;
  --hairline:    #E1E3EB;
  --card:        #FFFFFF;

  --invest: #12897C;
  --legal:  #7A55C7;
  --assist: #C7573F;

  --page:    #FFFFFF;
  --accent:  var(--invest);
  --measure: 62ch;
  --gutter:  16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:       #EEF0F6;
    --ink-muted: #A2A8BC;
    --surface:   #10131F;
    --hairline:  #272B3D;
    --card:      #171B2B;
    --page:      #0C0E18;
    --indigo:    #8E8BF0;
    --invest:    #3FB5A6;
    --legal:     #A98BE0;
    --assist:    #E08670;
  }
}

:root[data-theme="dark"] {
  --ink:       #EEF0F6;
  --ink-muted: #A2A8BC;
  --surface:   #10131F;
  --hairline:  #272B3D;
  --card:      #171B2B;
  --page:      #0C0E18;
  --indigo:    #8E8BF0;
  --invest:    #3FB5A6;
  --legal:     #A98BE0;
  --assist:    #E08670;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchors from the table of contents must clear the sticky header. */
  scroll-padding-top: 88px;
}

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

a { color: var(--accent); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.9rem;
  text-decoration: none;
  z-index: 10;
}

.skip:focus { left: 16px; }

/* ---- brand lockup ------------------------------------------------------
   Clear space = one pill width = symbol size / 4.9. The gap between symbol
   and wordmark uses the same value, per the brand brief. */

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.lockup svg {
  width: 32px;
  height: 32px;
  flex: none;
  color: var(--accent);
}

.lockup .wordmark {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
}

/* ---- header ---- */

header {
  border-bottom: 1px solid var(--hairline);
  padding: 18px 0;
  position: sticky;
  top: 0;
  background: var(--page);
  z-index: 5;
}

header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

header nav {
  display: flex;
  gap: 24px;
  font-size: 0.9rem;
}

header nav a {
  color: var(--ink-muted);
  text-decoration: none;
}

header nav a:hover { color: var(--accent); }

header nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
}

/* ---- hero ---- */

.hero { padding: 88px 0 72px; }

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  font-weight: 600;
  max-width: 18ch;
}

.hero > p {
  margin: 0 0 20px;
  max-width: var(--measure);
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.hero .lede {
  color: var(--ink);
  font-size: 1.0625rem;
  margin-bottom: 0;
}

/* ---- sections ---- */

section { padding: 64px 0; }

section > .wrap > h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 32px;
  color: var(--ink);
}

#what { border-top: 1px solid var(--hairline); }

/* ---- what it does ------------------------------------------------------
   A definition list, not cards: the reader scans the terms down the left
   edge and only reads across for the ones that matter to them. */

.feature-list {
  margin: 0;
  padding: 0;
}

.feature-list > div {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--hairline);
}

.feature-list > div:last-child { border-bottom: 1px solid var(--hairline); }

@media (max-width: 720px) {
  .feature-list > div { grid-template-columns: 1fr; gap: 6px; }
}

.feature-list dt {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.9375rem;
}

.feature-list dd {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  max-width: var(--measure);
}

/* ---- reference sections ------------------------------------------------
   Deliberately calmer than the feature list. Heading on the left so the
   long explanations do not leave the right half of the page empty. */

.reference {
  background: var(--surface);
  border-top: 1px solid var(--hairline);
}

.ref-row {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--hairline);
}

.ref-row:last-child { border-bottom: 0; }

@media (max-width: 720px) {
  .ref-row { grid-template-columns: 1fr; gap: 8px; }
}

.ref-row h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0;
}

.ref-body p,
.ref-body li {
  color: var(--ink-muted);
  max-width: var(--measure);
  font-size: 0.9375rem;
}

.ref-body p { margin: 0 0 12px; }
.ref-body p:last-child { margin-bottom: 0; }

.ref-body ul {
  margin: 0;
  padding-left: 20px;
}

.ref-body li { margin-bottom: 10px; }
.ref-body li:last-child { margin-bottom: 0; }

.ref-body strong { color: var(--ink); font-weight: 500; }

/* The disclaimer earns a visible edge without shouting. */
.note {
  border-left: 3px solid var(--hairline);
  padding-left: 16px;
}

/* ---- long-form documents ----------------------------------------------
   Privacy policy and terms: a contents rail beside the prose. */

.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding-top: 56px;
  padding-bottom: 80px;
}

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; gap: 32px; }
}

.toc {
  position: sticky;
  top: 96px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 20px;
  font-size: 0.8125rem;
}

@media (max-width: 900px) {
  .toc { position: static; }
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc li { margin-bottom: 10px; }
.toc li:last-child { margin-bottom: 0; }

.toc a {
  color: var(--ink-muted);
  text-decoration: none;
  display: block;
  line-height: 1.4;
}

.toc a:hover { color: var(--accent); }

/* Inside .doc-layout the grid owns the spacing; a document that is its own
   <main> has to provide it, and reads better centred at a narrower measure. */
.doc { padding: 0; }

main.doc {
  max-width: 880px;
  padding-top: 56px;
  padding-bottom: 80px;
}

.doc h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 8px;
}

.doc .updated {
  margin: 0 0 40px;
  color: var(--ink-muted);
  font-size: 0.875rem;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hairline);
}

.doc h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 44px 0 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

.doc h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 28px 0 8px;
  color: var(--ink);
}

.doc p,
.doc li {
  max-width: var(--measure);
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.doc p { margin: 0 0 16px; }

.doc ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

.doc li { margin-bottom: 10px; }

.doc strong { color: var(--ink); font-weight: 500; }

.doc .lede {
  color: var(--ink);
  font-size: 1.0625rem;
  max-width: var(--measure);
}

/* ---- delete account ----------------------------------------------------
   The two ways to do it are the point of the page, so they sit in cards
   above the reference sections. */

.routes {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin: 0 0 12px;
}

.route {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--accent);
  border-radius: 12px;
  padding: 24px;
}

.route h2 {
  margin: 0 0 12px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
}

.route p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  max-width: none;
}

/* The one record that survives deletion is worth marking. */
.callout {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 20px;
  max-width: none;
}

.split {
  border-left: 3px solid var(--hairline);
  padding-left: 16px;
  margin-bottom: 12px;
}

/* ---- footer ---- */

footer {
  border-top: 1px solid var(--hairline);
  padding: 32px 0 48px;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

footer a { color: var(--ink-muted); }
