/* CrierData shopfront — shared styles.
   Brand values verified against frontend source: ink #182633, navy #234896. */

:root {
  --ink: #182633;
  --navy: #234896;
  /* Hover-only. A darkened derivative of --navy for .btn:hover, not a
     brand pack value -- there's no verified "hover navy," this is just
     --navy manually darkened. Flagged during brand audit Phase 2
     (25 Aug 2026), kept as-is rather than invented into a false pack
     entry. */
  --navy-dark: #1B3A7C;
  --page: #F5F6F8;
  --card: #FFFFFF;
  --border: #E3E6EB;
  --text: #2A3441;
  --muted: #5A6472;
  --faint: #8B93A0;
  --tint: #EDF1FA;
  --radius: 8px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

a { color: var(--navy); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin: 0 0 0.6em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); margin: 0 0 0.6em; }
h3 { font-size: 1.1rem; margin: 0 0 0.4em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 720px; }

/* ---------- nav ---------- */
.nav {
  background: var(--ink);
  padding: 14px 0;
}
.nav .wrap {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand img { width: 30px; height: 30px; border-radius: 7px; display: block; }
.brand span { color: #fff; font-weight: 600; font-size: 1.15rem; letter-spacing: 0.1px; }
.nav a.nl { color: #C7CEDA; font-size: 0.95rem; }
.nav a.nl:hover { color: #fff; text-decoration: none; }
.nav a.nl[aria-current="page"] { color: #fff; font-weight: 600; }
.btn {
  display: inline-block; background: var(--navy); color: #fff;
  padding: 10px 20px; border-radius: 6px; font-weight: 600; font-size: 0.98rem;
}
.btn:hover { background: var(--navy-dark); text-decoration: none; }
.btn.ghost {
  background: transparent; color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn.ghost:hover { background: var(--tint); }
.nav .btn { padding: 8px 16px; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; }
.hero p.lede { font-size: 1.15rem; color: var(--muted); max-width: 620px; margin: 0 0 28px; }
.hero .ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* signature: register-join strip */
.join-strip { padding: 8px 0 56px; }
.join-strip .chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 14px; font-size: 0.85rem; color: var(--muted); white-space: nowrap;
}
.join-arrow { color: var(--faint); font-size: 0.9rem; padding: 0 4px; }
.chip.result {
  background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600;
}

/* ---------- sections ---------- */
.section { padding: 52px 0; }
.section.tint { background: var(--tint); }
.section.inkband { background: var(--ink); }
.section.inkband h2, .section.inkband p { color: #fff; }
.section.inkband p.sub { color: #B9C2CF; }

.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 8px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 22px;
}
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.card h3 .tick { color: var(--navy); }

/* stat band */
.stats { display: flex; flex-wrap: wrap; gap: 12px 44px; margin: 20px 0 4px; }
.stat b { display: block; font-size: 1.7rem; color: var(--ink); letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 0.92rem; }
.inkband .stat b { color: #fff; }
.inkband .stat span { color: #B9C2CF; }

/* ---------- pricing ---------- */
.plans { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: stretch; }
.plan {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; display: flex; flex-direction: column;
}
.plan.featured { border: 2px solid var(--navy); }
.plan .price { font-size: 1.9rem; color: var(--ink); font-weight: 700; letter-spacing: -0.02em; }
.plan .price small { font-size: 0.95rem; color: var(--muted); font-weight: 400; }
.plan p { color: var(--muted); font-size: 0.96rem; flex-grow: 1; }
.plan .btn { align-self: flex-start; margin-top: 8px; }

.qa { margin-top: 40px; display: grid; gap: 22px; }
.qa h3 { margin-bottom: 0.2em; }
.qa p { margin: 0; color: var(--muted); }

/* ---------- source list ---------- */
.sources { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.sources li { padding-left: 26px; position: relative; color: var(--muted); }
.sources li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 12px; height: 12px; border-radius: 3px; background: var(--navy);
}
.sources li b { color: var(--ink); }

/* Permitted-purposes notice: RESTRICTIONS_NOTICE (crierdata/schema.py),
   rendered verbatim by tools/build_licensing_page.py. pre-wrap, not
   plain pre -- the source string's own ~80-char line breaks read fine
   on a full-width page but must still reflow on a narrow one, never
   force horizontal scroll on prose. */
.restrictions-notice {
  white-space: pre-wrap;
  font-family: inherit;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 16px 0 0;
  color: var(--text);
  line-height: 1.6;
}

/* honest-gap pull */
.honest {
  border-left: 4px solid var(--navy);
  background: var(--card); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px; margin: 26px 0 0;
}
.honest p { margin: 0; color: var(--text); }

/* doors */
.doors { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 26px; }
.door {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.door:hover { border-color: var(--navy); text-decoration: none; }
.door b { color: var(--ink); display: block; margin-bottom: 4px; }
.door span { color: var(--muted); font-size: 0.95rem; }

/* ---------- about values ---------- */
.values { display: grid; gap: 20px; margin-top: 8px; }
.values h3 { margin-bottom: 0.15em; }
.values p { margin: 0; color: var(--muted); }

/* ---------- footer ---------- */
footer { background: var(--ink); margin-top: 64px; padding: 40px 0 32px; }
footer .cols { display: flex; flex-wrap: wrap; gap: 28px 56px; }
footer h4 { color: #fff; font-size: 0.9rem; margin: 0 0 10px; letter-spacing: 0.03em; }
footer a { color: #C7CEDA; font-size: 0.92rem; display: block; margin-bottom: 7px; }
footer a:hover { color: #fff; }
footer .legal {
  border-top: 1px solid #2B3A4C; margin-top: 30px; padding-top: 20px;
  color: #8B93A0; font-size: 0.85rem; line-height: 1.7;
}
footer .legal a { display: inline; color: #A9B2C0; }

/* ---------- markdown-rendered pages (docs/api-reference.md -> docs.html) ---------- */
.md-body h2 { margin-top: 2.2em; }
.md-body h3 { margin-top: 1.6em; }
.md-body hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
.md-body p, .md-body li { color: var(--text); }

/* Block code: page-grey background, bordered, radius matching .card,
   monospace, horizontal-scrolls itself rather than the page. No
   syntax-highlighting library -- markdown.py's fenced_code extension
   without codehilite emits plain <pre><code>, nothing to theme. */
.md-body pre {
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.55;
}
.md-body pre code {
  background: none; border: none; padding: 0; border-radius: 0;
  font-size: inherit;
}
.md-body pre, .md-body code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13.5px;
}
/* Inline code: same page-grey background, no border -- distinguishes
   it from a bordered code block without a second visual language.
   overflow-wrap: a long unbroken inline token (a test path like
   test_x.py::test_y[z] has no space to wrap at) has no scroll
   container of its own the way a <pre> does -- without this, one long
   identifier forces the whole page wider on a narrow viewport. Found
   live: this is the actual mobile-overflow source, not the <pre>
   blocks (which already scroll themselves correctly). */
.md-body code {
  background: var(--page);
  padding: 2px 5px;
  border-radius: 4px;
  overflow-wrap: break-word;
}

/* Tables: each gets its own horizontal-scroll container (render_docs_page.py
   wraps every <table> in this div) so a wide table scrolls itself on a
   narrow viewport rather than forcing the whole page to scroll sideways. */
.md-body .table-wrap { overflow-x: auto; margin: 1.2em 0; }
.md-body table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.md-body th, .md-body td {
  border: 1px solid var(--border); padding: 8px 12px; text-align: left;
  vertical-align: top;
}
.md-body th { background: var(--tint); color: var(--ink); font-weight: 600; }

@media (max-width: 640px) {
  .hero { padding: 48px 0 36px; }
  .section { padding: 38px 0; }
  body { font-size: 16px; }
  .md-body pre, .md-body code { font-size: 13px; }
}
