/* Flatpay Hub in the Flatpay brand: the same tokens and chrome as AC Call Tracker, Interview QA
   and JARVIS's brief pages (JARVIS/public/brand.css). A black band with the Flatpay wordmark,
   mint #92f8c2, Arial Black headings, white cards on Flatpay grey, the Flatpay pastels for
   topics. Phone first: reps read this on a doorstep. */
:root {
  --ink: #000; --paper: #fff; --grey: #f1f2f1; --line: #e4e6e4;
  --muted: #6e6e6e; --faint: #9a9a9a;
  --mint: #92f8c2; --mint-soft: #dbf9eb;
  --peach: #f8b185; --pink: #f8b5d3; --cyan: #9beef8; --peri: #afbdfc;
  --peach-soft: #fde4d4; --pink-soft: #fde3ef;
  --good: #1d7a4a; --warn: #c2382f;
  --r: 14px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08);
  --head: "Arial Black", "Arial Bold", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--grey); color: var(--ink);
  font: 16px/1.5 Calibri, "Segoe UI", -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- the black band: brand, nav, then each screen's title */
.top {
  position: sticky; top: 0; z-index: 10; background: var(--ink); color: var(--paper);
  display: flex; align-items: center; gap: 14px; padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--paper); flex: none; }
.brand .logo { width: 96px; display: block; }
.brand .logo svg { display: block; }
.brand .hub {
  font-family: var(--head); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  background: var(--mint); color: var(--ink); padding: 4px 9px; border-radius: 20px;
}
.top-nav { margin-left: auto; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.top-nav::-webkit-scrollbar { display: none; }
.top-nav a, .top-nav button {
  color: var(--paper); text-decoration: none; background: none; border: 0; padding: 8px 11px; border-radius: 10px;
  font-size: 15px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.top-nav a:hover, .top-nav button:hover { background: #1c1c1c; }
.top-nav a.on { background: var(--mint); color: var(--ink); }

.hero { background: var(--ink); color: var(--paper); padding: 10px 16px 30px; }
.hero-in { max-width: 860px; margin: 0 auto; }
.hero .kicker { font-family: var(--head); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mint); margin-bottom: 8px; }
.hero .kicker a { color: var(--mint); text-decoration: none; }
.hero .kicker a:hover { text-decoration: underline; }
.hero h1 { font-size: 34px; line-height: 1.05; margin: 0 0 10px; color: var(--paper); }
.hero p { color: #bebebe; font-size: 16px; line-height: 1.45; margin: 0; max-width: 62ch; }
.hero .searchbar { margin-top: 18px; }
.hero .searchbar input { border-color: transparent; }

.viewas {
  background: var(--mint); color: var(--ink); padding: 8px 16px; font-size: 14px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.viewas b { font-family: var(--head); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.viewas select, .viewas button { width: auto; min-height: 34px; padding: 4px 10px; border-radius: 10px; border: 0; background: var(--paper); font-weight: 700; }

main { max-width: 860px; margin: 0 auto; padding: 22px 16px 56px; }

/* ---------- type */
h1, h2, h3 { font-family: var(--head); letter-spacing: -.01em; line-height: 1.15; margin: 0 0 10px; }
h1 { font-size: 30px; }
h2 { font-size: 18px; margin-top: 28px; }
h3 { font-size: 16px; margin-top: 18px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.crumb a { text-decoration: none; font-weight: 700; }

/* ---------- cards and tiles */
.card { background: var(--paper); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile {
  display: block; text-decoration: none; border-radius: var(--r); padding: 16px 14px 32px; min-height: 120px;
  position: relative; color: var(--ink); transition: transform .12s ease;
}
.tile:hover { transform: translateY(-2px); }
.tile.dark { color: var(--paper); }
.tile.dark em { color: var(--mint); opacity: 1; }
.tile b { display: block; font-family: var(--head); font-size: 17px; overflow-wrap: anywhere; }
.tile span { display: block; font-size: 14px; margin-top: 6px; line-height: 1.35; }
.tile em { position: absolute; left: 14px; bottom: 10px; font-style: normal; font-size: 12px; font-weight: 700; opacity: .65; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list a, .list .row { display: flex; gap: 10px; align-items: center; padding: 13px 2px; text-decoration: none; }
.list a:hover b { text-decoration: underline; }
.list .grow { flex: 1; min-width: 0; }
.list .grow b { display: block; }
.list .grow span { display: block; font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

/* Chips, as the brand's status chips: Arial Black, uppercase, a pastel per state. */
.badge {
  display: inline-block; font-family: var(--head); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 20px; white-space: nowrap; color: var(--ink);
}
.badge.ready { background: var(--mint); }
.badge.draft { background: var(--peach-soft); }
.badge.coming { background: var(--line); color: var(--muted); }
.badge.warn { background: var(--pink); }
.badge.info { background: var(--cyan); }

/* ---------- a page */
.page-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.page-body { font-size: 17px; line-height: 1.55; }
.page-body h2 { font-size: 17px; margin-top: 24px; }
.page-body h3 { font-size: 15px; }
.page-body ul, .page-body ol { padding-left: 22px; margin: 0 0 14px; }
.page-body li { margin: 5px 0; }
.page-body li::marker { color: var(--muted); }
.page-body blockquote {
  margin: 0 0 14px; padding: 12px 16px; background: var(--mint-soft); border-radius: 12px; font-weight: 700;
  border-left: 5px solid var(--mint);
}
.draft-note { background: var(--peach-soft); padding: 10px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 14px; }
.pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }
.pager a { text-decoration: none; font-weight: 700; font-size: 15px; }

/* ---------- forms and buttons */
button { cursor: pointer; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: var(--ink); color: var(--paper);
  padding: 12px 20px; border-radius: 12px; font-weight: 700; text-decoration: none; min-height: 46px;
}
.btn.mint { background: var(--mint); color: var(--ink); }
.btn.ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 7px 12px; min-height: 36px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: default; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
input[type=text], input[type=search], input[type=password], input[type=date], input[type=month], input[type=number], select, textarea {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); min-height: 46px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); border-color: transparent; }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; font-size: 15px; letter-spacing: normal; text-transform: none; color: var(--ink); margin: 6px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.error { background: var(--pink-soft); color: var(--warn); font-weight: 700; padding: 10px 14px; border-radius: 12px; margin: 10px 0; font-size: 14px; }
.ok { background: var(--mint-soft); color: var(--good); font-weight: 700; padding: 10px 14px; border-radius: 12px; margin: 10px 0; font-size: 14px; }

.searchbar { display: flex; gap: 8px; }
.searchbar input { flex: 1; }

/* ---------- ask */
.answer { white-space: pre-wrap; font-size: 17px; line-height: 1.55; }
.cites { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cites a { font-size: 13px; font-weight: 700; background: var(--mint-soft); border-radius: 20px; padding: 5px 12px; text-decoration: none; }
.cites a:hover { background: var(--mint); }

/* ---------- quiz */
.q { margin-bottom: 16px; }
.q .opts { display: grid; gap: 6px; }
.q .opt {
  display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background: var(--paper); cursor: pointer; margin: 0; font-size: 16px; font-weight: 400; letter-spacing: normal; text-transform: none; color: var(--ink);
}
.q .opt:has(input:checked) { border-color: var(--ink); background: var(--mint-soft); }
.q .opt input { margin-top: 4px; accent-color: var(--ink); }
.q .opt.right { border-color: var(--good); background: var(--mint-soft); }
.q .opt.wrong { border-color: var(--warn); background: var(--pink-soft); }
.score { font-family: var(--head); font-size: 40px; }

/* ---------- numbers */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: var(--paper); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); }
.stat b { display: block; font-family: var(--head); font-size: 26px; }
.stat span { font-size: 13px; color: var(--muted); }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--mint); border-radius: 99px; }
.bar.low i { background: var(--peach); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 7px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.zero td { background: var(--peach-soft); }
.scroll { overflow-x: auto; }
.flag { border-left: 5px solid var(--peach); padding: 10px 14px; background: var(--paper); border-radius: 0 12px 12px 0; margin: 8px 0; box-shadow: var(--shadow); }
.note { white-space: pre-wrap; background: var(--mint-soft); border-radius: 12px; padding: 14px 16px; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- sign-in */
.login { max-width: 420px; margin: 0 auto; }

/* ---------- admin */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { text-decoration: none; padding: 8px 14px; border-radius: 20px; font-weight: 700; font-size: 14px; background: var(--paper); box-shadow: var(--shadow); }
.tabs a.on { background: var(--ink); color: var(--paper); }
.editor { display: grid; gap: 14px; }
main.wide { max-width: 1200px; }
@media (min-width: 900px) { .editor { grid-template-columns: 1fr 1fr; } }
.editor textarea { min-height: 420px; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.preview { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.preview h1 { font-size: 24px; }

@media (max-width: 640px) {
  .brand .logo { width: 78px; }
  .hero h1 { font-size: 27px; }
  h1 { font-size: 24px; }
  .tile { min-height: 104px; }
  .tile b { font-size: 15px; }
  .page-body { font-size: 16px; }
  .card { padding: 16px 14px; }
}

main > h2:first-child { margin-top: 2px; }
