/* Statement Navigator - "Cloud Dancer" design system.
 *
 * Tokens lifted verbatim from the handover mockups, which section 4 of the brief
 * names as the source of truth. Hand-written rather than Tailwind so the app
 * deploys on a pure Python buildpack with no Node build step.
 *
 * Status is always conveyed with colour + symbol + text together, never colour
 * alone (brief section 4).
 */

:root {
  --cloud-dancer: #F6F7F9;
  --surface-white: #FFFFFF;
  --sky-haze: #E6EFF7;
  --periwinkle-mist: #E9E6F6;
  --dewy-blue: #BFD0E6;

  --slate-ink: #1F2740;
  --slate-text: #4E586F;
  --muted-text: #747D91;
  --border-soft: #DDE3EC;

  --accent-blue: #6F8FEA;
  --accent-blue-hover: #5D7FD8;
  --accent-lilac: #A79BE5;

  --positive: #38B48B;
  --positive-soft: #E2F5EE;
  --warning: #F5C06A;
  --warning-soft: #FFF3DA;
  --concern: #E57373;
  --concern-soft: #FCE7E7;
  --lock: #E8603A;
  --lock-soft: #FDECE7;

  --radius: 12px;
  --shadow-soft: 0 2px 8px rgba(31, 39, 64, 0.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cloud-dancer);
  color: var(--slate-ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'tnum' 1; /* tabular figures for tables and metrics */
  line-height: 1.55;
}

h1, h2, h3, .metric {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
}
h1 { font-size: clamp(26px, 3.6vw, 36px); margin: 0 0 10px; line-height: 1.22; }
h2 { font-size: 20px; margin: 0 0 6px; }
h3 { font-size: 15px; margin: 0 0 4px; }
p { margin: 0 0 12px; }
a { color: var(--accent-blue-hover); }

/* --- Layout --------------------------------------------------------------- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 560px; margin: 0 auto; padding: 0 24px; }
.wrap-mid { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.section { padding: 48px 0; }
.center { text-align: center; }
.muted { color: var(--muted-text); }
.subtle { color: var(--slate-text); }
.tiny { font-size: 11.5px; }
.small { font-size: 12.5px; }
.lede { font-size: 16px; color: var(--slate-text); }
.stack > * + * { margin-top: 14px; }

/* --- Banners -------------------------------------------------------------- */
.beta-banner {
  background: var(--slate-ink);
  color: #fff;
  text-align: center;
  padding: 9px 16px;
  font-size: 12.5px;
}
.beta-banner b { color: var(--dewy-blue); }

/* --- Navigation ----------------------------------------------------------- */
nav.site {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--slate-ink);
}
.nav-logo img { height: 32px; width: auto; }
.nav-logo span { font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 16px; }
.nav-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn-primary { background: var(--slate-ink); color: #fff; }
.btn-primary:hover { background: #2b3450; }
.btn-ghost {
  background: transparent;
  color: var(--slate-ink);
  border: 1px solid var(--border-soft);
}
.btn-ghost:hover { background: var(--surface-white); }
.btn-lg { padding: 14px 30px; font-size: 15px; border-radius: 10px; }
.btn-block { display: block; width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

/* --- Cards ---------------------------------------------------------------- */
.card {
  background: var(--surface-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}
.card + .card { margin-top: 16px; }
.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- Forms ---------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--slate-ink);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: var(--surface-white);
  color: var(--slate-ink);
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(111, 143, 234, 0.18);
}
.field .helptext { font-size: 11.5px; color: var(--muted-text); margin-top: 4px; display: block; }
.field .errorlist {
  list-style: none;
  padding: 0;
  margin: 5px 0 0;
  color: #B4483F;
  font-size: 12px;
}

/* --- Messages and notices ------------------------------------------------- */
.notice {
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 13px;
  margin-bottom: 14px;
  border-left: 3px solid var(--border-soft);
  background: var(--surface-white);
}
.notice-success { border-left-color: var(--positive); background: var(--positive-soft); }
.notice-warning { border-left-color: var(--warning); background: var(--warning-soft); }
.notice-error { border-left-color: var(--concern); background: var(--concern-soft); }
.notice-info { border-left-color: var(--accent-blue); background: var(--sky-haze); }
.notice-lock { border-left-color: var(--lock); background: var(--lock-soft); }

/* --- Plan pills and locks ------------------------------------------------- */
.pill {
  display: inline-block;
  background: var(--sky-haze);
  color: var(--slate-ink);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.plan-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
}
.lock-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--lock);
  font-size: 11px;
  font-weight: 600;
}

/* --- Pricing -------------------------------------------------------------- */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.plan {
  background: var(--surface-white);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 28px;
  position: relative;
}
.plan.featured {
  border: 2px solid var(--accent-blue);
  box-shadow: 0 16px 40px rgba(111, 143, 234, 0.15);
}
.badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-blue);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 14px;
  border-radius: 20px;
  text-transform: uppercase;
}
.plan-name { font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 19px; margin: 6px 0 4px; }
.plan-tagline { color: var(--muted-text); font-size: 13px; margin-bottom: 16px; }
.plan-price { font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 32px; }
.plan-price span { font-size: 14px; font-weight: 500; color: var(--muted-text); }
.plan-note { font-size: 12px; color: var(--muted-text); margin-bottom: 18px; }
.feature-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-text);
  font-weight: 600;
  margin: 16px 0 4px;
}
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 13.5px;
  color: var(--slate-text);
  padding: 6px 0;
}
.feature-list li .mark { color: var(--positive); font-weight: 700; flex-shrink: 0; }
.feature-list li.locked { color: var(--muted-text); }
.feature-list li.locked .mark { color: var(--border-soft); }

/* --- Tables --------------------------------------------------------------- */
.table-scroll { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
table.data th {
  background: var(--sky-haze);
  font-size: 12px;
  font-weight: 700;
  padding: 11px 12px;
  text-align: left;
  vertical-align: bottom;
}
table.data td {
  padding: 10px 12px;
  font-size: 12.5px;
  border-top: 1px solid var(--border-soft);
  color: var(--slate-text);
}
table.data td.num, table.data th.num { text-align: right; }
table.data tr:hover td { background: #FCFCFD; }

/* --- Metrics -------------------------------------------------------------- */
.ratio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.ratio-card {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 14px 16px;
  background: #FCFCFA;
}
.ratio-name { font-size: 12px; color: var(--muted-text); margin-bottom: 2px; }
.ratio-value { font-family: 'Manrope', sans-serif; font-size: 22px; font-weight: 700; }

/* --- Footer --------------------------------------------------------------- */
footer.site {
  text-align: center;
  padding: 44px 24px 32px;
  font-size: 12px;
  color: var(--muted-text);
}
footer.site a { color: var(--muted-text); margin: 0 8px; }

@media (max-width: 640px) {
  .section { padding: 32px 0; }
  .card { padding: 18px; }
  nav.site { padding: 16px; }
}
