/*
 * Voltify onboarding, in the Voltify brand (BRAND USAGE SHEET + voltify.com):
 * FK Grotesk / FK Grotesk Mono, Black #141414, Primary #0040FF, Secondary
 * #BCC5CC, Tertiary #F8F9FA, gradient #0040FF -> #AAC8F3, chevron motif.
 * No inline styles anywhere: the CSP forbids them.
 */

@font-face {
  font-family: "FK Grotesk";
  src: url("fonts/FKGrotesk-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "FK Grotesk";
  src: url("fonts/FKGrotesk-Medium.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "FK Grotesk Mono";
  src: url("fonts/FKGroteskMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #141414;
  --ink: #151619;
  --white: #ffffff;
  --primary: #0040ff;
  --primary-600: #0033cc;
  --primary-700: #002aa6;
  --primary-50: #f5f6fa;
  --primary-100: #eaedf6;
  --primary-200: #c9d2ed;
  --primary-300: #aac8f3;
  --secondary: #bcc5cc;
  --tertiary: #f8f9fa;
  --n100: #f4f4f6;
  --n200: #e3e4e8;
  --n300: #cfd1d8;
  --n400: #9a9fac;
  --n500: #676d7e;
  --n600: #494e5a;
  --success: #136c46;
  --success-tint: #e1f4ec;
  --warn: #6c4513;
  --warn-tint: #f4ece1;
  --danger: #c4231b;
  --danger-tint: #fdecea;

  --font: "FK Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "FK Grotesk Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font: 400 15px/1.55 var(--font);
  color: var(--ink);
  background: var(--tertiary);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-700); text-decoration: underline; }

h1, h2, h3 { font-weight: 500; }
h1 { font-size: 40px; line-height: 1.1; letter-spacing: -1.2px; margin: 0 0 6px; }
h2 { font-size: 20px; line-height: 1.25; letter-spacing: -0.3px; margin: 0 0 14px; }
/* Section labels (checklist sections, card sub-heads): the site's mono ticker style. */
h3 {
  font: 400 12px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--n500);
  margin: 22px 0 8px;
}

.eyebrow {
  font: 400 12px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--n500);
}
.muted { color: var(--n500); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none; }

/* ------------------------------------------------------------ header */
.topbar { background: var(--black); color: var(--white); }
.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 36px;
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--white); }
.brand:hover { text-decoration: none; color: var(--white); }
.brand img { height: 16px; width: auto; display: block; }
.brand span {
  font: 400 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--n400);
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}
.nav { display: flex; gap: 26px; flex: 1; flex-wrap: wrap; }
.nav a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  padding: 22px 0 20px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--white); text-decoration: none; }
.nav a.active { color: var(--white); border-bottom-color: var(--primary); }
.whoami { display: flex; align-items: center; gap: 14px; font: 400 12px var(--mono); color: var(--n400); }
.whoami form { margin: 0; }
.whoami .badge { background: rgba(255, 255, 255, 0.08); color: var(--white); border-color: rgba(255, 255, 255, 0.16); }
.topbar button, .topbar .btn {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}
.topbar button:hover, .topbar .btn:hover { background: var(--white); color: var(--black); }

/* ------------------------------------------------------------ layout */
.page { max-width: 1240px; margin: 0 auto; padding: 40px 32px 80px; }
.page.narrow { max-width: 780px; }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.page-head .muted { font-size: 16px; margin: 4px 0 0; }
.page-head .eyebrow { margin-bottom: 10px; }
/* The site's two-tone headline: statement in ink, follow-up in grey. */
h1 .muted, .page-head h1 .muted { color: var(--n400); font-size: inherit; margin: 0; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--n200);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.card > h2:first-child { margin-top: 0; }
.stat { position: relative; overflow: hidden; }
.stat .value { font-size: 44px; font-weight: 500; letter-spacing: -1.5px; line-height: 1.05; }
.stat .label { font: 400 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--n500); margin-top: 8px; }
.stat.alert .value { color: var(--danger); }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 0; }
dl.facts dt { color: var(--n500); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

/* ------------------------------------------------------------ tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--n200); vertical-align: top; }
th {
  font: 400 11px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--n500);
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--primary-50); }
td select { width: auto; height: 34px; padding: 4px 32px 4px 8px; font-size: 13px; background-position: right 10px center; }

/* ------------------------------------------------------------ badges */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font: 400 11px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--n100);
  color: var(--n600);
  border: 1px solid var(--n200);
  white-space: nowrap;
}
.badge.success { background: var(--success-tint); color: var(--success); border-color: #c3e8d8; }
.badge.warn { background: var(--warn-tint); color: var(--warn); border-color: #e8d6bd; }
.badge.danger { background: var(--danger-tint); color: var(--danger); border-color: #f6c4c0; }
.badge.blue { background: var(--primary-100); color: var(--primary-700); border-color: var(--primary-200); }

/* ------------------------------------------------------------ forms */
form.stack { display: grid; gap: 18px; }
/* Cards inside a form stack their fields with even spacing. */
form .card, section.card.stack { display: grid; gap: 22px; }
form .card > h2, section.card.stack > h2 { margin: 0; }
form .card > .hidden { display: none; }
/* Fields keep label, control and hint packed at the top, so controls in the
   same row line up even when a neighbour has a hint or an error. */
.field { display: grid; gap: 7px; align-content: start; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field .label { font-weight: 500; font-size: 14px; line-height: 1.3; padding: 0; }
/* <legend> sits outside the fieldset's grid, so it gets the gap as margin. */
fieldset.field > legend { margin-bottom: 7px; }
.field .hint { color: var(--n500); font-size: 13px; line-height: 1.4; }
.field .error { color: var(--danger); font-size: 13px; line-height: 1.4; }
.row { display: grid; gap: 22px 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); align-items: start; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=datetime-local],
input[type=number], input[type=url], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  color: inherit;
  padding: 10px 12px;
  border: 1px solid var(--n300);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color 0.12s, box-shadow 0.12s;
}
/* One height for every single-line control, native selects included. */
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=datetime-local],
input[type=number], input[type=url], select { height: 44px; }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background: var(--white) url("brand/select-arrow.svg") no-repeat right 14px center / 12px 8px;
  cursor: pointer;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 64, 255, 0.15);
}
button:focus-visible, a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* Checkbox lists: a grid. Radio groups: one line, like segmented options. */
.choices { display: grid; gap: 10px 18px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.choices.inline { display: flex; flex-wrap: wrap; gap: 10px 22px; min-height: 44px; align-items: center; }
.choices label { font-weight: 400; display: flex; gap: 10px; align-items: center; cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; flex: none; }
.required::after { content: " *"; color: var(--primary); }
input.code { font: 400 30px var(--mono); letter-spacing: 0.4em; text-align: center; max-width: 280px; height: 56px; }
.filters select { width: auto; min-width: 180px; }

/* ------------------------------------------------------------ buttons */
.btn, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: 500 15px/1.2 var(--font);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--n300);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn:hover, button:hover { background: var(--n100); color: var(--ink); text-decoration: none; }
.btn.primary, button.primary { background: var(--primary); border-color: var(--primary); color: var(--white); }
.btn.primary:hover, button.primary:hover { background: var(--primary-600); border-color: var(--primary-600); color: var(--white); }
.btn.dark, button.dark { background: var(--black); border-color: var(--black); color: var(--white); }
.btn.dark:hover, button.dark:hover { background: #2a2a2a; color: var(--white); }
.btn.danger, button.danger { background: var(--danger); border-color: var(--danger); color: var(--white); }
.btn.danger:hover, button.danger:hover { background: #a51d16; color: var(--white); }
.btn.small, button.small { padding: 6px 11px; font-size: 13px; }
button.link { border: none; background: none; color: var(--primary); padding: 0; font-weight: 400; }
button.link:hover { text-decoration: underline; background: none; }
.inline { display: inline; margin: 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------ flash */
.flash {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  border: 1px solid;
  border-left-width: 3px;
}
.flash.info { background: var(--primary-50); border-color: var(--primary-200); border-left-color: var(--primary); color: var(--primary-700); }
.flash.warning { background: var(--warn-tint); border-color: #e8d6bd; border-left-color: #bd7c28; color: var(--warn); }
.flash.error { background: var(--danger-tint); border-color: #f6c4c0; border-left-color: var(--danger); color: var(--danger); }

/* ------------------------------------------------------------ checklists */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--n200);
  align-items: start;
}
.checklist li:last-child { border-bottom: none; }
.checklist .mark {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 4px;
  border: 1.5px solid var(--n300);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--white);
  background: var(--white);
}
.checklist li.done .mark { background: var(--primary); border-color: var(--primary); }
.checklist li.na .mark { background: var(--n100); border-color: var(--n200); color: var(--n400); }
.checklist li.done .label, .checklist li.na .label { color: var(--n500); }
.checklist li.na .label { text-decoration: line-through; }
.checklist .meta { font-size: 12px; color: var(--n500); margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.checklist .meta > div { flex-basis: 100%; }
.checklist .controls { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.checklist .controls input[type=text] { width: 190px; padding: 6px 9px; font-size: 13px; }

progress {
  width: 100%;
  height: 6px;
  appearance: none;
  border: none;
  border-radius: 999px;
  background: var(--n200);
  overflow: hidden;
}
progress::-webkit-progress-bar { background: var(--n200); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--primary); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--primary); border-radius: 999px; }

/* ------------------------------------------------------------ sub-navigation, paging */
.subnav { display: flex; gap: 24px; margin: 0 0 24px; border-bottom: 1px solid var(--n200); }
.subnav a {
  color: var(--n500);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.subnav a:hover { color: var(--ink); text-decoration: none; }
.subnav a.active { color: var(--ink); border-bottom-color: var(--primary); }
.pager { margin-top: 14px; justify-content: flex-end; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--n100); padding: 1px 5px; border-radius: 4px; }

/* ------------------------------------------------------------ confirmation pages */
.confirm .danger-zone {
  border: 1px solid #f6c4c0;
  background: var(--danger-tint);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 18px 0;
}

/* ------------------------------------------------------------ brand surfaces */
/* The site's blue band with the chevron motif along the right edge. */
.portal-hero, .brand-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary) 55%, #4770eb 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  margin-bottom: 20px;
}
.portal-hero::after, .brand-panel::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 38%;
  background: url("brand/chevrons-light.svg") repeat;
  background-size: 36px 36px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
  mask-image: linear-gradient(90deg, transparent, #000 60%);
  pointer-events: none;
}
.portal-hero > *, .brand-panel > * { position: relative; z-index: 1; }
.portal-hero .eyebrow, .brand-panel .eyebrow { color: var(--primary-300); }
.portal-hero h1 { color: var(--white); font-size: 44px; letter-spacing: -1.5px; margin-top: 8px; }
.portal-hero p { color: var(--primary-100); margin: 8px 0 0; font-size: 17px; }
.portal-hero dl.facts { margin-top: 24px; }
.portal-hero dl.facts dt { font: 400 11px/1.9 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary-300); }
.portal-hero dl.facts dd { color: var(--white); font-weight: 500; }

/* Sign-in and the other signed-out pages. */
.login-box { max-width: 440px; margin: 9vh auto; text-align: left; padding: 36px; }
.login-box img { height: 22px; width: auto; display: block; margin-bottom: 30px; }
.login-box h1 { font-size: 34px; margin-top: 12px; }
.login-box .btn { width: 100%; padding: 13px 16px; margin-top: 8px; }
.login-box .eyebrow { margin-top: 22px; }

footer.foot {
  text-align: center;
  color: var(--n500);
  font: 400 11px/1.6 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 28px;
}

@media (max-width: 760px) {
  .topbar-inner { height: auto; padding: 14px 20px; flex-wrap: wrap; gap: 14px; }
  .nav a { padding: 6px 0; }
  .page { padding: 28px 20px 60px; }
  h1 { font-size: 32px; }
  .portal-hero { padding: 28px; }
  .portal-hero h1 { font-size: 34px; }
  .checklist li { grid-template-columns: 28px 1fr; }
  .checklist .controls { grid-column: 2; justify-content: flex-start; }
}
