/* The site's faces, self-hosted (served through the gate even while it is
   locked). DM Sans's latin file has no ₹; the 1.7 KB U+20B9 subset is the same
   family with that unicode-range, so it is fetched only where a ₹ appears
   (the liability cap in terms.html). JetBrains Mono has no ₹ either, so keep
   ₹ out of mono text. Same declarations as index.html. */
@font-face {
  font-family: "DM Sans";
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/fonts/dm-sans-latin.woff2') format('woff2');
}
@font-face {
  font-family: "DM Sans";
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/fonts/dm-sans-rupee.woff2') format('woff2');
  unicode-range: U+20B9;
}
@font-face {
  font-family: "DM Sans";
  font-style: italic; font-weight: 400 700; font-display: swap;
  src: url('/fonts/dm-sans-italic-latin.woff2') format('woff2');
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Dark only, as the home page is. These pages used to switch to a bone theme
   under prefers-color-scheme: light, which made /terms and /privacy look like a
   different site from the page that links to them. Same values as index.html. */
:root {
  color-scheme: dark;
  --ground:  #08080A;
  --raise:   #101014;
  --line:    #1D1D23;
  --line-hi: #2A2A33;
  --dim:     #7A7A85;
  --mid:     #8E8C88;
  --text:    #C6C3BC;
  --bright:  #F2EFE8;
  --grad-a:  #14141A;
  --grad-b:  #08080A;
  --warn:    #9A8F7E;
  --accent:  #E8A855;

  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --pad: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 36rem;
  --rule: 1px solid var(--line);
}

body {
  background: var(--ground);
  background-image: linear-gradient(180deg, var(--grad-a) 0%, var(--grad-b) 42%, var(--grad-b) 100%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The home page's column, so the title lines up under the wordmark. The prose
   keeps its reading measure; boxes stop at 52rem. */
.wrap { max-width: 66rem; margin: 0 auto; padding: 0 var(--pad); }
.notice, .kv { max-width: 52rem; }

a { color: var(--bright); text-decoration: none; border-bottom: 1px solid var(--line-hi); }
a:hover { border-bottom-color: var(--mid); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- top bar + mobile menu: copied from index.html ----------
   Same markup and rules as the home page, so leaving / for /terms changes the
   content and nothing above it. Change one, change both. */
.bar {
  position: sticky; top: 0; z-index: 50;
  border-bottom: var(--rule);
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.bar-in {
  max-width: 66rem; margin: 0 auto; padding: 0 var(--pad); min-height: 50px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem;
}
.wm {
  display: inline-flex; align-items: center; gap: 0.7rem; justify-self: start;
  font-family: var(--sans); font-size: 15px; letter-spacing: 0.06em; color: var(--bright);
  border-bottom: 0;
}
.wm b { font-weight: 500; }
.bar-nav { display: flex; gap: 1.75rem; }
.bar-nav a {
  font-family: var(--sans); font-size: 14px; color: var(--mid);
  border-bottom: 0; padding: 0.35rem 0; transition: color 180ms ease;
}
.bar-nav a:hover, .bar-nav a[aria-current] { color: var(--bright); }
.bar-end { justify-self: end; display: flex; align-items: center; gap: 1.25rem; }
.bar-cta {
  display: inline-flex; align-items: center; height: 34px; padding: 0 15px;
  font-family: var(--sans); font-size: 14px; font-weight: 500; white-space: nowrap;
  color: var(--ground); background: var(--accent); border-bottom: 0; border-radius: 2px;
  transition: background 180ms ease;
}
.bar-cta:hover { background: color-mix(in srgb, var(--accent) 82%, var(--bright)); }

.gspin { display: inline-grid; grid-template-columns: repeat(5, 1fr); flex: 0 0 auto; }
.gspin i { background: var(--line-hi); border-radius: 1px; }
.gspin[data-mark] { width: 29px; height: 29px; gap: 1px; }

.menu-btn {
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  width: 48px; height: 48px; margin-right: -12px; justify-self: end;
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--text);
}
.menu-btn i { display: block; width: 22px; height: 1.5px; background: currentColor; }
.menu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.menu-x { display: inline-flex; gap: 0; }
.menu-x i { position: absolute; }
.menu-x i:first-child { transform: rotate(45deg); }
.menu-x i:last-child { transform: rotate(-45deg); }
.menu {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; background: var(--ground);
  opacity: 0; visibility: hidden;
  transition: opacity 300ms ease, visibility 0s linear 300ms;
}
.menu.open { opacity: 1; visibility: visible; transition: opacity 300ms ease; }
.menu-top {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 50px; padding: 0 var(--pad); border-bottom: var(--rule);
}
.menu-top .menu-btn { position: relative; }
.menu-body {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem var(--pad) calc(2rem + env(safe-area-inset-bottom, 0px));
}
.menu-body a {
  display: flex; align-items: center; min-height: 48px; padding: 0 1rem;
  font-family: var(--sans); font-size: 30px; letter-spacing: -0.02em; color: var(--text); border-bottom: 0;
  transition: color 180ms ease;
}
.menu-body a:hover, .menu-body a[aria-current] { color: var(--bright); }

/* Re-measured 2026-10-07 after adding "About": the bar wraps at an 828px
   window and below, so the menu takes over ~16px above that. */
@media (max-width: 53rem) {
  .js .bar { position: relative; }
  .js .bar-in { grid-template-columns: 1fr auto; }
  .js .bar-nav, .js .bar-end { display: none; }
  .js .bar .menu-btn { display: inline-flex; }
  .no-js .bar-in { display: flex; flex-wrap: wrap; padding-block: 0.65rem; }
}
@media (pointer: coarse) {
  .bar-nav a { padding: 0.7rem 0.5rem; }
  .bar-nav { gap: 0.75rem; }
  .bar-end { gap: 0.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001s !important; }
}

header.doc {
  padding: clamp(3rem, 9vw, 5.5rem) 0 clamp(1.75rem, 4vw, 2.5rem);
  border-bottom: var(--rule);
  display: grid; gap: 1rem;
}
h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4.4vw, 2.6rem);
  font-weight: 500; letter-spacing: -0.03em; line-height: 1.15;
  color: var(--bright); text-wrap: balance;
}
.meta {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--dim); margin: 0;
}

.notice {
  border: 1px solid var(--line-hi); background: var(--raise);
  padding: 1.15rem 1.25rem; margin: 2rem 0 0;
  font-size: 13.5px; color: var(--mid); line-height: 1.6;
}
.notice strong { color: var(--warn); font-weight: 500; }

section.clause { padding: clamp(2rem, 5vw, 2.75rem) 0; border-bottom: var(--rule); }
section.clause:last-of-type { border-bottom: 0; }

h2 {
  margin: 0 0 1rem;
  font-size: 1.05rem; font-weight: 500; letter-spacing: -0.012em;
  color: var(--bright);
  display: grid; grid-template-columns: 2.5rem 1fr; gap: 0.75rem; align-items: baseline;
}
h2 .n {
  font-family: var(--mono); font-size: 10.5px; font-weight: 400;
  letter-spacing: 0.08em; color: var(--dim);
}
h3 {
  margin: 1.5rem 0 0.6rem;
  font-size: 0.95rem; font-weight: 500; color: var(--text);
}

p { margin: 0 0 0.9rem; max-width: var(--measure); color: var(--mid); }
p:last-child { margin-bottom: 0; }
p strong, li strong { color: var(--text); font-weight: 500; }
em { color: var(--text); font-style: italic; }

ul, ol { margin: 0 0 0.9rem; padding-left: 1.15rem; max-width: var(--measure); color: var(--mid); }
li { margin-bottom: 0.5rem; }
li::marker { color: var(--dim); }

.kv { border: var(--rule); margin: 1.25rem 0; }
.kv-row { display: grid; gap: 0.25rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); }
.kv-row:last-child { border-bottom: 0; }
@media (min-width: 40rem) { .kv-row { grid-template-columns: 12rem 1fr; gap: 1.25rem; align-items: baseline; } }
.kv-k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.kv-v { font-size: 13.5px; color: var(--text); }
/* cookie names are case-sensitive: keep _ga from rendering as _GA */
.kv-k code { text-transform: none; letter-spacing: 0; font-size: 11.5px; }

code {
  font-family: var(--mono); font-size: 0.86em; color: var(--text);
  background: var(--raise); padding: 0.1em 0.36em; border: 1px solid var(--line);
}

.fill { color: var(--warn); font-family: var(--mono); font-size: 0.9em; }

/* ---------- footer: copied from index.html ---------- */
footer {
  border-top: var(--rule); margin-top: 2rem; padding: 2.5rem 0 4rem;
  display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; align-items: baseline;
}
footer p, footer a {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--dim); margin: 0;
}
footer a { border-bottom: 0; }
footer a:hover, footer a[aria-current] { color: var(--mid); }

/* the lockup mark, as index.html: sized in em so it tracks the text beside it */
.mark-sm {
  display: inline-block; width: 1.55em; height: 1.55em; vertical-align: -0.42em;
  margin-right: 0.5em; color: var(--accent);
}
.mark-sm svg { width: 100%; height: 100%; display: block; }

/* the sticky bar is 50px: keep linked headings (privacy#cookies) clear of it */
h3[id] { scroll-margin-top: 5rem; }
