/* Layout idea: one shared frame (header, footer) on four pages. Plum and rose, gold for emphasis. */
:root {
  --ink: #22142a;
  --paper: #f7f3f8;
  --card: #ffffff;
  --plum: #5b2150;
  --rose: #d8365f;
  --gold: #e9b44c;
  --line: #e2d8e6;
  --muted: #6c5d74;
  --good: #1f7a4d;
  --bad: #b3261e;
  --on-plum: #ffffff;
  --font-display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f4eaf6; --paper: #170e1c; --card: #241731; --plum: #e7a8da; --rose: #ff6d8f;
    --gold: #f0c36a; --line: #3d2a4a; --muted: #b7a6c0; --good: #5fd39a; --bad: #ff8b84; --on-plum: #1d0f24;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #f4eaf6; --paper: #170e1c; --card: #241731; --plum: #e7a8da; --rose: #ff6d8f;
  --gold: #f0c36a; --line: #3d2a4a; --muted: #b7a6c0; --good: #5fd39a; --bad: #ff8b84; --on-plum: #1d0f24;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.55; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; }

/* header */
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 16px 0; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.01em; }
.logo img { width: 42px; height: 42px; display: block; }
.logo b { color: var(--rose); font-weight: 800; }
nav.main { display: flex; align-items: center; gap: 6px 22px; flex-wrap: wrap; font-weight: 600; }
nav.main a { text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; }
nav.main a:hover { border-color: var(--gold); }
nav.main a[aria-current="page"] { border-color: var(--rose); }
nav.main a.btn { border-bottom: 0; padding: 10px 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 14px 22px; font: 700 16px var(--font-body); background: var(--rose); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn.small { padding: 10px 16px; font-size: 15px; }

/* hero */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; padding: 28px 0 56px; }
.hero h1 { font-size: clamp(36px, 6vw, 58px); font-weight: 800; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: var(--rose); }
.hero .lead { margin-top: 18px; font-size: 19px; color: var(--muted); max-width: 46ch; }
.hero .cta { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.ticks svg { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--good); }

.pagehead { padding: 28px 0 8px; }
.pagehead h1 { font-size: clamp(32px, 5.5vw, 48px); font-weight: 800; letter-spacing: -0.02em; max-width: 20ch; }
.pagehead p { margin-top: 14px; color: var(--muted); font-size: 18px; max-width: 58ch; }

/* calculator */
.calc { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: 0 18px 40px -24px rgba(91,33,80,.45); }
.calc h2 { font-size: 22px; margin-bottom: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .field .lab { font-weight: 700; font-size: 14px; letter-spacing: .02em; color: var(--muted); }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=number], .field input[type=date], .field select {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--line); background: var(--paper); color: var(--ink); font: 500 17px var(--font-body); }
.field input:focus, .field select:focus { border-color: var(--rose); outline: none; }
.amount-row { display: flex; align-items: baseline; justify-content: space-between; }
.amount-row output { font: 800 40px var(--font-display); color: var(--plum); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--rose); height: 28px; }
.range-ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result { margin-top: 6px; background: var(--plum); color: var(--on-plum); border-radius: 14px; padding: 18px; }
.result .big { font: 800 34px var(--font-display); font-variant-numeric: tabular-nums; }
.result .sub { opacity: .9; font-size: 15px; }
.result dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid currentColor; border-top-color: rgba(255,255,255,.3); font-size: 15px; font-variant-numeric: tabular-nums; }
.result dt { opacity: .9; } .result dd { margin: 0; font-weight: 700; text-align: right; }

/* sections */
section { padding: 56px 0; }
section.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kicker { font-weight: 700; font-size: 14px; color: var(--rose); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; }
section h2 { font-size: clamp(28px, 4.5vw, 40px); max-width: 22ch; }
.section-lead { margin-top: 14px; color: var(--muted); max-width: 60ch; font-size: 18px; }

.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.steps li { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 22px; counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: #2a1a00; font: 800 18px var(--font-display); margin-bottom: 14px; }
.steps h3 { font-size: 20px; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 16px; }

.payday { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.timeline { border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
section.alt .timeline { background: var(--paper); }
.timeline .row { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.timeline .row:last-child { border-bottom: 0; }
.timeline .n { width: 30px; height: 30px; border-radius: 50%; background: var(--plum); color: var(--on-plum); display: grid; place-items: center; font: 700 14px var(--font-body); }
.timeline .d { font-weight: 600; } .timeline .d small { display: block; font-weight: 400; color: var(--muted); }
.timeline .a { font-weight: 700; }
.timeline .empty { padding: 18px; color: var(--muted); }
.rules { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.rules li { padding-left: 18px; border-left: 4px solid var(--gold); }
.rules strong { display: block; }
.rules span { color: var(--muted); font-size: 16px; }

.faq { margin-top: 28px; display: grid; gap: 10px; max-width: 760px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; }
.faq details p { color: var(--muted); padding: 0 0 16px; }

table.rates { width: 100%; border-collapse: collapse; margin-top: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-variant-numeric: tabular-nums; }
table.rates th, table.rates td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--line); }
table.rates th:first-child, table.rates td:first-child { text-align: left; }
table.rates thead th { font-size: 14px; color: var(--muted); }
table.rates tr:last-child td { border-bottom: 0; }
.tablewrap { overflow-x: auto; }
.prose { max-width: 700px; display: grid; gap: 16px; margin-top: 24px; }
.prose h3 { font-size: 22px; margin-top: 12px; }
.prose p, .prose li { color: var(--muted); }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* application form */
.apply { max-width: 720px; }
.apply form { margin-top: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.apply h3 { font-size: 20px; margin: 8px 0 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0; font-size: 16px; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--rose); flex: none; }
.err { color: var(--bad); font-weight: 600; font-size: 15px; margin-top: 6px; }
.verdict { margin-top: 24px; border-radius: 16px; padding: 22px; border: 2px solid var(--line); background: var(--card); }
.verdict.ok { border-color: var(--good); }
.verdict.no { border-color: var(--bad); }
.verdict h3 { font-size: 24px; margin-bottom: 8px; }
.verdict p + p { margin-top: 8px; }
.verdict .actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.note { margin-top: 14px; font-size: 14px; color: var(--muted); }

.band { background: var(--plum); color: var(--on-plum); border-radius: 20px; padding: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.band h2 { font-size: clamp(24px, 4vw, 32px); max-width: 24ch; }

footer { padding: 36px 0 56px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
footer .logo { font-size: 20px; color: var(--ink); margin-bottom: 14px; }
footer .logo img { width: 34px; height: 34px; }
footer p + p { margin-top: 10px; }
footer nav { display: flex; gap: 8px 18px; flex-wrap: wrap; margin-bottom: 14px; font-weight: 600; }

@media (max-width: 820px) {
  .hero, .payday { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 440px) {
  .two { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* agreement page */
.box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.box h3 { font-size: 20px; margin-bottom: 12px; }
dl.facts { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0; font-variant-numeric: tabular-nums; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 700; text-align: right; }
#contract h3 { font-size: 20px; margin: 24px 0 10px; }
#contract .box h3 { margin-top: 0; }
#contract .prose h3 { font-size: 20px; margin-top: 8px; }
mark { background: var(--gold); color: #2a1a00; padding: 0 4px; border-radius: 4px; font-weight: 700; }
ul.verify { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
ul.verify li { display: flex; gap: 12px; align-items: flex-start; }
ul.verify .dot { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--gold); margin-top: 4px; }
ul.verify small { display: block; color: var(--muted); font-size: 15px; }
form.signform { margin-top: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
form.signform h3 { font-size: 22px; margin-bottom: 10px; }
