/* ============================================================
   Fitcheck (Honor Health Network) - design system
   Honor Health Network brand: navy, brand blue, HHN teal, on a
   cool paper ground. Poppins throughout, which is the typeface
   honorhealthnetwork.com uses.

   Colours sampled from the live HHN site and the logo SVG:
     #09315D navy   #0F54AA blue   #1A92D0 bright   #3BC1C6 teal
     #A4D16D leaf   #E8F4FA pale   #C8D4E3 blue-grey
   Text colours are darkened from those so everything clears
   WCAG AA. HHN's own #1A92D0 button is only 3.46:1 with white,
   so it is used as an accent here, never as a text background.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  /* ground */
  --paper:      #F5F8FB;
  --paper-2:    #FFFFFF;
  --paper-sunk: #E8F4FA;

  /* ink */
  --ink:        #0B2440;
  --ink-2:      #33506E;
  --muted:      #4A6684;   /* 5.6:1 on paper */
  --faint:      #52708C;   /* 4.9:1 on paper */

  /* lines: cool, keyed to the navy */
  --line:       rgba(11, 36, 64, 0.11);
  --line-2:     rgba(11, 36, 64, 0.07);
  --hairline:   rgba(11, 36, 64, 0.18);

  /* brand */
  --navy:       #09315D;
  --brand:      #0F54AA;   /* primary action, 7.3:1 with white */
  --brand-2:    #09315D;
  --brand-soft: #E8F4FA;
  --accent:     #1A92D0;   /* HHN bright blue: icons, rules, large numerals */
  --teal:       #3BC1C6;
  --teal-soft:  #E4F7F7;
  --leaf:       #A4D16D;

  /* legacy aliases so older markup keeps working */
  --brass:      #0F54AA;
  --brass-soft: #E8F4FA;

  /* score bands, all >=5:1 with white */
  --good: #1A6E45;
  --ok:   #4A7A2E;
  --warn: #8A6410;
  --low:  #A65420;
  --bad:  #A6332A;

  /* geometry: squarer than before, closer to the HHN site */
  --r-shell: 16px;
  --r-core:  12px;
  --r-pill:  999px;
  --r-field: 10px;

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur:  260ms;

  /* elevation: cool and soft */
  --lift-1: 0 1px 2px rgba(11,36,64,.05), 0 6px 18px -10px rgba(11,36,64,.14);
  --lift-2: 0 2px 5px rgba(11,36,64,.06), 0 16px 40px -18px rgba(11,36,64,.20);
  --inset:  none;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Poppins', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.display,
h1.display,
.qtext {
  font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--brass);
  background: var(--brass-soft);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  margin-bottom: 18px;
}

.eyebrow.plain { background: none; padding: 0; color: var(--muted); }

h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 600;
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--brand);
}

.hint { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; max-width: 62ch; }

.mono, .num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ---------- shell / nav ---------- */

header.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 30px;
  background: rgba(245, 248, 251, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--line-2);
}

header.bar h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 21px;
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--ink);
}

header.bar .spacer { flex: 1; }

header.bar a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

header.bar a:hover { color: var(--ink); background: rgba(11,36,64,.05); }
header.bar a.on { color: var(--brand); background: var(--brand-soft); }

main { max-width: 1140px; margin: 0 auto; padding: 56px 30px 120px; }
main.narrow { max-width: 780px; }

/* ---------- double-bezel card ---------- */

.card {
  background: rgba(11,36,64, 0.028);
  border: 1px solid var(--line-2);
  border-radius: var(--r-shell);
  padding: 7px;
  margin-bottom: 22px;
}

.card > .core,
.card.solo {
  background: var(--paper-2);
  border-radius: var(--r-core);
  box-shadow: var(--inset), var(--lift-1);
  padding: 30px 32px;
}

.card.solo { border: 1px solid var(--line-2); padding: 30px 32px; }
.card.flush > .core { padding: 0; overflow: hidden; }

/* ---------- fields ---------- */

label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 20px 0 8px;
}

input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], textarea, select {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-field);
  font: inherit;
  font-size: 15px;
  background: var(--paper-2);
  color: var(--ink);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

textarea { resize: vertical; min-height: 120px; line-height: 1.65; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

input::placeholder, textarea::placeholder { color: var(--faint); }

/* ---------- buttons ---------- */

button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--brand);
  color: #FFFFFF;
  border: 0;
  border-radius: var(--r-pill);
  padding: 13px 16px 13px 24px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  box-shadow: var(--lift-1);
}

button:hover { background: var(--brand-2); box-shadow: var(--lift-2); }
button:active { transform: scale(0.985); }
button:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; }

/* button-in-button trailing icon */
button .cap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  font-size: 13px;
  line-height: 1;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}

button:hover .cap { transform: translate(2px, -1px) scale(1.06); background: rgba(255,255,255,.26); }
button.noicon { padding: 13px 24px; }

button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline);
  box-shadow: none;
}
button.ghost:hover { background: rgba(11,36,64,.045); box-shadow: none; }
button.ghost .cap { background: rgba(11,36,64,.06); }

button.small { padding: 8px 14px; font-size: 12.5px; gap: 7px; }
button.small .cap { width: 20px; height: 20px; font-size: 11px; }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- tables ---------- */

table { width: 100%; border-collapse: collapse; font-size: 14px; }

th {
  text-align: left;
  padding: 14px 16px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: var(--paper-sunk);
}

td {
  text-align: left;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}

tbody tr { transition: background var(--dur) var(--ease); }
tbody tr:hover { background: rgba(11,36,64,.022); }
tbody tr:last-child td { border-bottom: 0; }

.tablewrap { overflow-x: auto; }

/* ---------- score chips ---------- */

.score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  color: var(--paper-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: -0.02em;
}

.s-good { background: var(--good); }
.s-ok   { background: var(--ok); }
.s-warn { background: var(--warn); }
.s-low  { background: var(--low); }
.s-bad  { background: var(--bad); }
.s-none { background: transparent; color: var(--faint); border: 1px dashed var(--hairline); }

.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand);
}

.pill.grey  { background: rgba(11,36,64,.05); color: var(--muted); }
.pill.brass { background: var(--teal-soft); color: #14606B; }

/* ---------- stat row ---------- */

.stat { display: flex; gap: 8px; flex-wrap: wrap; }

.stat > div {
  flex: 1 1 130px;
  padding: 20px 22px;
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-core);
  box-shadow: var(--inset);
}

.stat span {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 38px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stat small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.err { color: var(--bad); font-size: 13px; }
.ok  { color: var(--good); font-size: 13px; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--paper-sunk);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 12px;
}

.qitem {
  border: 1px solid var(--line-2);
  border-radius: var(--r-core);
  padding: 18px 20px;
  margin-bottom: 12px;
  background: var(--paper-2);
  box-shadow: var(--inset);
}

.qitem textarea { min-height: 70px; }

/* ---------- scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(6px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease), filter 800ms var(--ease);
}

.reveal.in { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 1ms !important; animation-duration: 1ms !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
}

/* ---------- mobile ---------- */

@media (max-width: 768px) {
  main { padding: 32px 16px 80px; }
  header.bar { padding: 14px 16px; gap: 10px; }
  header.bar h1 { font-size: 18px; }
  .card { padding: 5px; border-radius: 22px; }
  .card > .core, .card.solo { padding: 22px 18px; border-radius: 18px; }
  .stat > div { flex: 1 1 100%; }
  .stat span { font-size: 32px; }
}


/* ============================================================
   Fitcheck logo lockup: mark + wordmark + 'by Honor Health Network'
   ============================================================ */
.fclock { display: inline-flex; align-items: center; gap: 12px; line-height: 1; }
.fclock img { height: 46px; width: auto; display: block; flex: none; }
.fcword { font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif; font-weight: 700; font-size: 30px; letter-spacing: -.04em; line-height: .95; color: #09315D; white-space: nowrap; }
.fcword b { font-weight: 700; color: #1A92D0; }
.fcby { display: block; margin-top: 6px; font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif; font-size: 8.6px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: #5B7390; white-space: nowrap; }
.fclock.lg { gap: 16px; }
.fclock.lg img { height: 66px; }
.fclock.lg .fcword { font-size: 46px; }
.fclock.lg .fcby { font-size: 11px; margin-top: 9px; letter-spacing: .17em; }
.fclock.md img { height: 54px; }
.fclock.md .fcword { font-size: 36px; }
.fclock.md .fcby { font-size: 9.6px; margin-top: 7px; }
