/* nilquit.com. Shared stylesheet.
   Plain CSS, no build step, no third-party requests, one light appearance.
   Every value below comes from the app's bluebird design contract
   (nil-app/bluebird-brief.md and Nil/Design/Bluebird.swift). */

/* Quicksand, self-hosted. SIL Open Font License 1.1, see /fonts/OFL.txt. */
@font-face {
  font-family: "Quicksand";
  src: url("/fonts/Quicksand-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ink grades: the only colors that render text */
  --ink: #16324A;
  --slate: #31506A;
  --blue-ink: #1A5FD0;   /* money text, the wordmark's drop, and the ring on the selected pill */
  --red-ink: #BE3440;    /* craving lane; unused on the site */
  --green-ink: #2E6B46;  /* growth lane; unused on the site */
  --paper: #FFFFFF;

  /* drawing grades: illustration only, never text */
  --blue-drop: #3B82E8;
  --red-drop: #FF7A70;
  --leaf: #5FA463;
  --sun: #FFC531;
  --sun-wash: #FFEFC2;   /* the one highlighter */
  --meadow: #E4F4DC;
  --cloud-shade: #DCEBF7;
  --row-select: #E3F1FF; /* brightened selection */

  /* the sky, top to bottom */
  --zenith: #8FCCFF;
  --title-zone: #C6E5FF;
  --content-zone: #EAF5FF;
  --horizon: #F7FBFF;

  /* lines and the one shadow */
  --hairline: rgba(22, 50, 74, 0.1);        /* pills, rules */
  --card-border: rgba(22, 50, 74, 0.08);    /* default card */
  --money-border: rgba(26, 95, 208, 0.14);  /* money-lane card */
  --shadow: 0 6px 16px rgba(22, 50, 74, 0.08);

  /* type */
  --font-display: "Quicksand", ui-rounded, -apple-system, "SF Pro Rounded", system-ui, sans-serif;
  --font-body: ui-rounded, -apple-system, "SF Pro Rounded", system-ui, sans-serif;

  /* layout */
  --margin: 24px;
  --radius: 24px;
  --measure: 34em; /* about 68 characters of body text */

  color-scheme: light;
}

/* ---------- base ---------- */

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

html {
  font-size: 106.25%; /* 17px body on a 16px default, never smaller */
  background: var(--horizon);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  /* The sky: a fixed band at the top of every page, then the horizon.
     Pixel stops, not percentages, so long policies never put prose on raw sky. */
  background-color: var(--horizon);
  background-image: linear-gradient(
    to bottom,
    var(--zenith) 0,
    var(--title-zone) 180px,
    var(--content-zone) 372px,
    var(--horizon) 600px
  );
  background-repeat: no-repeat;
  overflow-wrap: break-word;
  font-synthesis: none;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: 1.8824rem; /* 32px: display 32, one size at every width */
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.5rem; /* 25.5px, between the brief's display 28 and sub-numeral 24 */
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 1rem;
}

h3 {
  font-size: 1.1765rem; /* 20px, between control 17 and sub-numeral 24 */
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  scroll-margin-top: 1rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
  max-width: var(--measure);
}

ol {
  padding-left: 1.25rem;
}

/* Bulleted lists use the app's promise-row dot: a 7px ink circle. */
ul {
  list-style: none;
  padding-left: 0;
}

li {
  margin-bottom: 0.5rem;
}

ul > li {
  position: relative;
  padding-left: 17px;
}

ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

strong {
  font-weight: 600;
}

/* Links are ink; the underline is the affordance. Blue stays the money lane. */
a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(22, 50, 74, 0.6); /* 3.4:1 or better on every ground a link sits on; 3.1:1 on the raw zenith, where nothing is underlined */
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: rgba(227, 241, 255, 0.6);
}

@media (hover: hover) {
  a:hover {
    text-decoration-color: currentColor;
    text-decoration-thickness: 2px;
  }
}

/* Phone-number links reach a 44px hit box without moving the text: the
   horizontal padding is cancelled by the margins, and the focus ring is pulled
   back in so it hugs the text like every other inline link. */
a[href^="tel:"] {
  padding: 12px;
  margin: 0 -12px;
  -webkit-box-decoration-break: clone; /* a wrapped number keeps the padding on both fragments */
  box-decoration-break: clone;
}

a[href^="tel:"]:focus-visible {
  outline-offset: -9px;
}

.nowrap {
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- landmarks ---------- */

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--margin);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--paper);
  background: var(--ink);
  border-radius: 999px;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--margin);
}

.site-header {
  padding: var(--margin) var(--margin) 0;
}

.site-main {
  flex: 1 0 auto;
  padding: 0 var(--margin);
}

.site-footer {
  padding: 2rem var(--margin) 3rem;
}

.wrap {
  width: 100%;
  max-width: 38rem;
  margin-inline: auto;
}

.site-footer .wrap {
  border-top: 1px solid var(--hairline);
  padding-top: 1.5rem;
}

/* ---------- wordmark ---------- */

/* Lowercase nil in Quicksand Bold; the dot of the i is the app's raindrop
   (BBWordmark: a 0.20em by 0.26em drop in blueInk, kerned -0.01em). The i
   is a dotless ı and the drop is drawn by the pseudo-element. */
.wordmark {
  display: inline-block;
  padding: 8px; /* at least 44px tall and wide */
  margin-left: -8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.wordmark .stem {
  position: relative;
  display: inline-block;
}

.wordmark .stem::after {
  content: "";
  position: absolute;
  top: -0.105em;
  left: 50%;
  width: 0.2em;
  height: 0.26em;
  margin-left: -0.1em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16'%3E%3Cpath fill='%231A5FD0' d='M6 .8C8.2 4.6 11 7.6 11 10.8C11 13.56 8.76 15.8 6 15.8C3.24 15.8 1 13.56 1 10.8C1 7.6 3.8 4.6 6 .8Z'/%3E%3C/svg%3E") no-repeat;
  background-size: 100% 100%;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- cards ---------- */

/* BBCard: white, radius 24, 1px border in the lane color (default ink 8%),
   one shadow: ink 8%, blur 16, y 6. */
.card {
  background: var(--paper);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 1.5rem 0;
}

.card > :first-child {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.card--money {
  border-color: var(--money-border);
}

/* ---------- buttons (capsule, min height 56, press = 0.97 squish) ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 56px;
  padding: 14px 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
  overflow-wrap: normal;
  -webkit-tap-highlight-color: transparent;
}

/* PRIMARY: ink fill, paper label. */
.button--primary {
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
}

/* QUIET: paper fill, ink label, ink-12% hairline. */
.button--quiet {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(22, 50, 74, 0.12);
}

/* Hover brightens, never inverts. #324B60 is ink plus 12% white. */
@media (hover: hover) {
  .button--primary:hover {
    background: #324B60;
    border-color: #324B60;
  }

  .button--quiet:hover {
    background: var(--row-select);
  }
}

.button:active {
  transform: scale(0.97);
}

.cta {
  margin: 1.25rem 0;
  max-width: none;
}

.cta .button {
  width: 100%;
}

@media (min-width: 40em) {
  .cta .button {
    width: auto;
    min-width: 16rem;
  }
}

@media (max-width: 22.5em) {
  .card {
    padding: 20px;
  }

  .button {
    padding-inline: 14px;
  }
}

/* ---------- footer nav: the docked bar's pills ---------- */

.pills {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pills li {
  margin: 0;
  padding: 0;
}

.pills li::before {
  content: none;
}

.pills a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .pills a:hover {
    background: var(--row-select);
  }
}

.pills a:active {
  transform: scale(0.97);
}

/* Selection brightens: rowSelect fill and a blueInk ring, never a dark fill. */
.pills a[aria-current="page"] {
  background: var(--row-select);
  border-color: var(--blue-ink);
  box-shadow: inset 0 0 0 0.5px var(--blue-ink); /* reads as the 1.5px ring */
}

.footer-mail {
  margin: 1rem 0 0;
}

.footer-mail a {
  display: inline-block;
  padding: 10px 0;
}

/* ---------- landing ---------- */

.hero {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.hook-cloud {
  display: block;
  margin: 0 0 1rem -4px;
}

.lede {
  font-size: 1.0625rem;
}

/* Number Leads: the numeral first, its label under it in lane ink. */
.price {
  margin: 0 0 1rem;
  max-width: none;
}

.price .numeral {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.7059rem; /* 46px: hero numeral 46 */
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--blue-ink);
}

.price .label {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--blue-ink);
}

.price--sub .numeral {
  font-size: 1.4118rem; /* 24px: sub-numeral 24 */
}

/* The highlighter: a hand-drawn sunWash swash behind one positive line,
   rotated -0.8deg like a marker swipe. One per page, never under red text.
   As on the app's price screen, the prose is in the body face and only the
   number is Quicksand Bold. */
.hl {
  position: relative;
  isolation: isolate;
  display: inline-block;
  padding: 2px 9px;
  margin: 0 -9px;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: transparent;
}

.hl b {
  font-family: var(--font-display);
  font-weight: 700;
}

.hl::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--sun-wash);
  border-radius: 9px;
  transform: rotate(-0.8deg);
}

.meta,
.foot,
.effective {
  color: var(--slate);
}

/* ---------- documents ---------- */

.doc {
  padding-top: 1.5rem;
  padding-bottom: 1rem;
}

.effective {
  margin-bottom: 1.5rem;
}

.summary h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.summary ul {
  margin-bottom: 0;
}

.summary li:last-child {
  margin-bottom: 0;
}

.doc > h2:first-of-type {
  margin-top: 2rem;
}

.faq h3 {
  margin-top: 2rem;
}

/* Owner placeholders: visible, but never the highlighter. */
.todo {
  padding: 0.05em 0.35em;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  outline: 1.5px dashed var(--ink);
  outline-offset: 1px;
  border-radius: 6px;
}

/* ---------- not found ---------- */

.lost {
  padding-top: clamp(2rem, 12vh, 6rem);
  padding-bottom: 3rem;
}

.lost .art {
  display: block;
  margin: 0 0 1rem;
}

/* ---------- print ---------- */

@media print {
  html,
  body {
    background: #fff;
    color: var(--ink);
  }

  body {
    display: block;
    min-height: 0;
  }

  .skip-link,
  .pills,
  .card--money .cta,
  .lost .cta,
  .hook-cloud {
    display: none;
  }

  .button {
    color: var(--ink);
    background: none;
    border: 1px solid var(--ink);
  }

  .card {
    box-shadow: none;
    border: 1px solid rgba(22, 50, 74, 0.25);
    break-inside: avoid;
  }

  a {
    color: var(--ink);
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.9em;
  }

  h2,
  h3 {
    break-after: avoid;
  }

  p,
  li {
    orphans: 3;
    widows: 3;
  }

  .wrap {
    max-width: none;
  }

  @page {
    margin: 2cm;
  }
}
