/* Flip Tracker — one stylesheet, no framework, no external requests.
 *
 * The palette is sampled from the logo (web/assets/logo.png): the deep navy of
 * the monogram, the teal of the rising arrow, and the cyan from the gradient
 * between them. Teal at full strength is only ~3.4:1 on a light ground, so it
 * carries rules, marks and large type; --teal-ink is the darkened one that is
 * safe for links and small text.
 *
 * Still no webfont. The wordmark is geometric and a loaded face would match it
 * more closely, but a site whose pitch is that nothing leaves your device
 * should not open a request to a font CDN to say so. The display stack leads
 * with the geometric faces this product's own audience already has.
 */

:root {
  --bg:        #f7f9fb;
  --surface:   #ffffff;
  --border:    #dfe6ed;
  --border-2:  #c6d3df;

  --ink:       #0d1b2a;
  --ink-soft:  #42566a;
  --ink-faint: #73859a;

  --navy:      #002c58;
  --teal:      #0c8f9e;
  --teal-ink:  #0a6b78;   /* the one teal that passes 4.5:1 on --bg */
  --cyan:      #3fbdcc;

  --accent:    #002c58;
  --accent-ink:#ffffff;
  --focus:     #0a6b78;
  --measure:   34rem;

  --display: "Avenir Next", "Segoe UI Variable Display", ui-sans-serif,
             system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #081420;
    --surface:   #0e1e2e;
    --border:    #1d3348;
    --border-2:  #2a4760;
    --ink:       #eaf2f8;
    --ink-soft:  #a6bacb;
    --ink-faint: #758e9e;
    --navy:      #8cbce8;
    --teal:      #3fbdcc;
    --teal-ink:  #62d4e0;
    --cyan:      #7fe0ea;
    --accent:    #3fbdcc;
    --accent-ink:#06202b;
    --focus:     #62d4e0;
  }
}

:root[data-theme="dark"] {
  --bg:        #081420;
  --surface:   #0e1e2e;
  --border:    #1d3348;
  --border-2:  #2a4760;
  --ink:       #eaf2f8;
  --ink-soft:  #a6bacb;
  --ink-faint: #758e9e;
  --navy:      #8cbce8;
  --teal:      #3fbdcc;
  --teal-ink:  #62d4e0;
  --cyan:      #7fe0ea;
  --accent:    #3fbdcc;
  --accent-ink:#06202b;
  --focus:     #62d4e0;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---- masthead ---- */

header.site {
  padding: 2.25rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: .62ch;
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
}

/* The circular monogram, lifted from the logo. It was a 2px rule before the
   brand arrived; it keeps that element and class so every page picks it up
   from here without touching the page's markup. */
.mark .rule {
  display: inline-block;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  background: url("/assets/mark.png") center / contain no-repeat;
  border-radius: 6px;
  transform: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mark .rule { background-color: #fff; }
}
:root[data-theme="dark"] .mark .rule { background-color: #fff; }

header.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.1rem;
  font-family: var(--display);
  font-size: .9375rem;
}
header.site nav a { color: var(--ink-soft); text-decoration: none; }
header.site nav a:hover { color: var(--teal-ink); text-decoration: underline; }

/* ---- type ---- */

h1 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 1.35rem + 2.6vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--navy);
  margin: 2.25rem 0 0;
  text-wrap: balance;
}

h2 {
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.012em;
  margin: 2.5rem 0 .5rem;
}

h3 {
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 650;
  margin: 1.5rem 0 .3rem;
}

p { margin: 1rem 0; color: var(--ink-soft); }
p.lead { font-size: 1.125rem; line-height: 1.55; color: var(--ink); }

a { color: var(--teal-ink); text-underline-offset: 2px; }
a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

ul { color: var(--ink-soft); padding-left: 1.15rem; }
li { margin: .4rem 0; }
li::marker { color: var(--teal); }

strong { color: var(--ink); font-weight: 650; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .08em .35em;
}

/* ---- the full logo, home page only ---- */

.hero-mark {
  display: block;
  width: 150px;
  max-width: 50%;
  height: auto;
  margin: 2.25rem 0 -.25rem;
}

/* ---- phases: the one structured block ---- */

.phases { margin: 1.25rem 0 0; border-top: 2px solid var(--navy); }

.phase {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem 1.1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
.phase .n {
  flex: 0 0 2rem;
  font-family: var(--display);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: .9375rem;
  color: var(--teal);
  padding-top: .18rem;
}
.phase .body { flex: 1 1 14rem; min-width: 0; }
.phase h3 { margin: 0; }
.phase p { margin: .3rem 0 0; font-size: .9375rem; }

/* ---- the one call to action ---- */

.cta {
  margin: 2rem 0 0;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: 10px;
}
.cta p { margin: 0 0 .9rem; color: var(--ink-soft); }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 650;
  font-size: .9375rem;
  padding: .62rem 1.15rem;
  border-radius: 7px;
}
.btn:hover { filter: brightness(1.14); }

/* ---- status line ---- */

.status {
  display: inline-flex;
  align-items: center;
  gap: .55ch;
  font-family: var(--display);
  font-size: .8125rem;
  color: var(--ink-faint);
  letter-spacing: .02em;
  margin-top: 1.75rem;
}
.status::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
}

/* ---- legal pages ---- */

.doc h1 { font-size: clamp(1.55rem, 1.2rem + 1.5vw, 2.05rem); margin-top: 2rem; }
.doc .updated {
  font-family: var(--display);
  font-size: .8125rem;
  color: var(--ink-faint);
  margin: .35rem 0 2rem;
}
.doc p, .doc li { font-size: .9375rem; }

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

footer.site {
  margin: 4.5rem 0 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-family: var(--display);
  font-size: .8125rem;
  color: var(--ink-faint);
}
footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin-bottom: .9rem;
}
footer.site a { color: var(--ink-soft); text-decoration: none; }
footer.site a:hover { color: var(--teal-ink); text-decoration: underline; }
footer.site .entity { margin: 0; color: var(--ink-faint); font-size: .8125rem; }
