/* provix.loan: the look of the app and the portal (docs/ui.md): neutral greys, one brand
   blue for actions, white panels on a light canvas, system fonts. Light and dark follow the
   OS. Mobile first: one column, then two from 720px. No JavaScript anywhere. */
:root {
  color-scheme: light dark;
  --canvas: #f5f6f8;
  --surface: #fff;
  --subtle: #f8f9fb;
  --line: #e3e6ec;
  --line-strong: #cdd3dd;
  --fg: #18202e;
  --muted: #535c6b;
  --brand: #244f8c;
  --brand-hover: #1d406f;
  --brand-fg: #1d406f;
  --brand-subtle: #eef4fb;
  --ring: #2f64ad;
  --btn: #244f8c;
  --btn-hover: #1d406f;
  --bad: #b42318;
  --bad-bg: #fef3f2;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0d1117;
    --surface: #151b23;
    --subtle: #1a212b;
    --line: #2a323d;
    --line-strong: #3a4350;
    --fg: #e6e9ef;
    --muted: #a4adbb;
    --brand: #4f82c6;
    --brand-hover: #7fa7da;
    --brand-fg: #adc8ea;
    --brand-subtle: #16233a;
    --ring: #7fa7da;
    /* white on the dark-mode brand blue is under 4.5:1; buttons keep a deeper blue */
    --btn: #2f64ad;
    --btn-hover: #285a9c;
    --bad: #f97066;
    --bad-bg: #33100d;
    --shadow: none;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 72px;
}
body {
  margin: 0;
  min-width: 320px;
  font: 17px / 1.6 var(--sans);
  color: var(--fg);
  background: var(--canvas);
}
a {
  color: var(--brand-fg);
  text-underline-offset: 2px;
}
a:hover {
  color: var(--brand);
}
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 4px;
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
  font-weight: 650;
}
h1 {
  font-size: clamp(28px, 6vw, 42px);
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(22px, 4.5vw, 28px);
}
h3 {
  font-size: 18px;
}
p,
ul,
ol,
dl {
  margin: 0;
}
code,
.mono {
  font-family: var(--mono);
  font-size: 0.9em;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 8px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
}

.in {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* header: brand, the four sections, and the one action. On a phone the links wrap below. */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.top .in {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 650;
  font-size: 18px;
}
.brand i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font-style: normal;
  font-weight: 700;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  order: 3;
  width: 100%;
  margin: 0 -10px;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.nav a:hover {
  color: var(--fg);
}
.nav a[aria-current="page"] {
  color: var(--brand-fg);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.top .btn {
  margin-left: auto;
}

/* buttons */
.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--btn);
  border-radius: 8px;
  background: var(--btn);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover,
button:hover {
  background: var(--btn-hover);
  border-color: var(--btn-hover);
  color: #fff;
}
.btn.secondary {
  background: transparent;
  color: var(--brand-fg);
  border-color: var(--line-strong);
}
.btn.secondary:hover {
  background: var(--brand-subtle);
  color: var(--brand-fg);
}
.top .btn {
  min-height: 40px;
  padding: 0 14px;
  font-size: 15px;
}

/* page */
main {
  display: block;
}
section {
  padding: 40px 0;
}
section + section {
  border-top: 1px solid var(--line);
}
.hero {
  padding: 48px 0 40px;
}
.hero p.lead {
  margin-top: 16px;
  max-width: 46em;
  font-size: 19px;
  color: var(--muted);
}
.hero .actions {
  margin-top: 24px;
}
.page-head {
  padding: 40px 0 8px;
}
.page-head p {
  margin-top: 12px;
  max-width: 46em;
  color: var(--muted);
  font-size: 18px;
}
.stack > * + * {
  margin-top: 16px;
}
.stack h2 + p,
.stack h2 + ul,
.stack h2 + ol {
  margin-top: 12px;
}
.prose {
  max-width: 46em;
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li + li {
  margin-top: 6px;
}
.muted {
  color: var(--muted);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.cards {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card h3 + p {
  margin-top: 8px;
  color: var(--muted);
}

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin-top: 24px;
  display: grid;
  gap: 12px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 16px 20px 16px 64px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-subtle);
  color: var(--brand-fg);
  font-weight: 700;
}
.steps b {
  display: block;
}
.steps span {
  color: var(--muted);
}

.callout {
  margin-top: 20px;
  padding: 16px 20px;
  border-left: 3px solid var(--brand);
  background: var(--brand-subtle);
  border-radius: 0 8px 8px 0;
}

.flow {
  margin-top: 24px;
  width: 100%;
  max-width: 720px;
  height: auto;
  display: block;
}
.flow .box {
  fill: var(--surface);
  stroke: var(--line-strong);
}
.flow .box.home {
  stroke: var(--brand);
  stroke-width: 2;
}
.flow text {
  fill: var(--fg);
  font: 15px var(--sans);
}
.flow .small {
  fill: var(--muted);
  font-size: 13px;
}
.flow .arrow {
  stroke: var(--brand);
  stroke-width: 2;
  fill: none;
}
.flow .head {
  fill: var(--brand);
}

pre {
  margin: 12px 0 0;
  padding: 14px 16px;
  overflow-x: auto;
  background: var(--subtle);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 14px / 1.5 var(--mono);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 16px;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}
.scroll {
  overflow-x: auto;
}

dl.kv {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 24px;
  margin-top: 16px;
}
dl.kv dt {
  color: var(--muted);
  font-size: 15px;
  margin-top: 10px;
}
dl.kv dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* the form */
.form {
  margin-top: 24px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 720px;
}
.grid {
  display: grid;
  gap: 16px;
}
.field {
  display: grid;
  gap: 6px;
  /* rows keep their own height, so inputs line up whether or not a hint follows */
  align-content: start;
}
.field > span {
  font-weight: 600;
  font-size: 16px;
}
.field small {
  color: var(--muted);
  font-size: 14px;
}
input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}
textarea {
  min-height: 120px;
  resize: vertical;
}
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 16px;
}
.check input {
  width: 22px;
  min-height: 22px;
  height: 22px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--brand);
}
.form .actions {
  margin-top: 20px;
}
.form-error {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--bad);
  background: var(--bad-bg);
  border-radius: 8px;
  color: var(--fg);
}
.form-error[hidden] {
  display: none;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* footer */
.foot {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 15px;
}
.foot p + p {
  margin-top: 8px;
}

@media (min-width: 720px) {
  .nav {
    order: 0;
    width: auto;
    margin: 0;
  }
  .cards.two {
    grid-template-columns: 1fr 1fr;
  }
  .grid.two {
    grid-template-columns: 1fr 1fr;
  }
  .form {
    padding: 28px;
  }
  dl.kv {
    grid-template-columns: max-content 1fr;
  }
  dl.kv dt {
    margin-top: 0;
  }
  section {
    padding: 56px 0;
  }
  .hero {
    padding: 72px 0 56px;
  }
}
.mt {
  margin-top: 16px;
}
.founder {
  margin-top: 24px;
  max-width: 46em;
}
.founder .role {
  margin-top: 4px;
  color: var(--muted);
}
.founder .facts {
  margin: 16px 0;
  padding-left: 1.2em;
}
.founder .facts li + li {
  margin-top: 8px;
}
.founder {
  display: grid;
  gap: 16px 24px;
  align-items: start;
}
.founder .photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}
@media (min-width: 720px) {
  .founder {
    grid-template-columns: 120px 1fr;
  }
}
