/*
 * Kryptoverolaskuri: a light, calm theme. Mobile first (360 px and up).
 * Contrast (WCAG 2.2): body text --ink on white 15.4:1, --muted on white 6.2:1,
 * white on --brand 5.2:1, --brand-strong links 6.7:1, form field borders 3.6:1.
 * The page is light only: `only light` also keeps browsers from darkening it on their own.
 */
:root {
  color-scheme: only light;
  --bg: #ffffff;           /* page */
  --bg-soft: #f5f8fc;      /* alternate bands, footer, table heads */
  --bg-hero: #edf3ff;      /* top of the hero gradient */
  --surface: #ffffff;      /* cards */
  --ink: #1b2536;          /* headings and body text */
  --ink-2: #344054;        /* secondary text, navigation */
  --muted: #556274;        /* help text, captions */
  --line: #e3e8ef;         /* card borders, dividers (decorative) */
  --line-strong: #cfd7e2;  /* table frames, the file drop area */
  --field: #7d8899;        /* form field borders (3:1 or more) */
  --brand: #2563eb;        /* primary buttons, focus ring, current step */
  --brand-strong: #1d4ed8; /* links, hover, secondary button text */
  --brand-soft: #eef4ff;   /* secondary buttons, info notices, current page in the menu */
  --brand-softer: #dbe7ff;
  --ok: #047857; --ok-soft: #e7f6ef; --ok-line: #a8dcc4;
  --warn: #8a5300; --warn-soft: #fff4db; --warn-line: #f0d08a;
  --bad: #b42318; --bad-strong: #912018; --bad-soft: #fdeceb; --bad-line: #f3b8b2;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-family: var(--font);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); overflow-wrap: break-word; }
main { flex: 1 0 auto; width: 100%; }
main:focus, h1:focus, h2:focus { outline: none; }
img, svg { max-width: 100%; }

a { color: var(--brand-strong); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 1.35rem + 2vw, 2.4rem); margin: 0 0 12px; font-weight: 750; letter-spacing: -.02em; }
h2 { font-size: clamp(1.25rem, 1.1rem + .7vw, 1.55rem); margin: 0 0 12px; font-weight: 700; }
h3 { font-size: 1.1rem; margin: 0 0 8px; font-weight: 650; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 1.25em; }
strong { font-weight: 650; }

.lead { color: var(--ink-2); font-size: 1.125rem; line-height: 1.55; margin: 0 0 20px; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.mono { font-family: var(--mono); font-size: .9em; overflow-wrap: anywhere; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: 1120px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
.page { padding-top: 28px; padding-bottom: 56px; }
.narrow { max-width: 760px; }
.flash { padding-top: 16px; }
.flash .notice { margin: 0 0 8px; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 10; background: var(--brand); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.1rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; min-height: 44px; }
.brand-mark { width: 30px; height: 30px; flex: 0 0 auto; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 550; }
.top nav a:hover { background: var(--bg-soft); color: var(--ink); }
.top nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-strong); }

/* ---------- footer ---------- */
.foot { background: var(--bg-soft); border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.foot-in { display: grid; gap: 14px; padding-top: 28px; padding-bottom: 32px; }
.foot-brand { color: var(--ink); font-weight: 700; margin-bottom: 4px; }
.foot p { margin: 0; max-width: 62ch; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot nav a { color: var(--ink-2); display: inline-flex; align-items: center; min-height: 32px; }

/* ---------- landing ---------- */
.hero { background:
  radial-gradient(520px 320px at 92% 0%, rgba(16, 185, 129, .12), transparent 70%),
  linear-gradient(180deg, var(--bg-hero) 0%, #f6f9ff 55%, var(--bg) 100%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; padding-bottom: 40px; align-items: start; }
.hero h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.1rem); line-height: 1.1; max-width: 16ch; }
.eyebrow { display: inline-block; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: .875rem; font-weight: 600; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 32px; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .2em; width: 22px; height: 22px; border-radius: 50%; background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23047857' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.ticks.no li::before { background: #eef1f5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6.5 10h7' fill='none' stroke='%23556274' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 16px no-repeat; }

.band { padding: 48px 0; }
.band.alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 24px; }
.section-head p { color: var(--muted); margin: 0; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); counter-reset: step; }
.steps li { counter-increment: step; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 20px 72px; box-shadow: var(--shadow); }
.steps li::before { content: counter(step); position: absolute; left: 20px; top: 20px; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); font-weight: 750; display: grid; place-items: center; }
.steps h3 { margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); }

.split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.split > .card { margin-bottom: 0; }

.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 650; position: relative; border-radius: var(--radius-sm); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .15s ease; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:hover { background: var(--bg-soft); }
.faq .answer { padding: 0 18px 16px; color: var(--ink-2); }
.faq .answer p:last-child { margin-bottom: 0; }

.cta-band { text-align: center; }
.cta-band .lead { margin-left: auto; margin-right: auto; }

/* ---------- cards and grids ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); min-width: 0; }
.card > :last-child { margin-bottom: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); margin-bottom: 16px; }
.grid > .card { margin-bottom: 0; }
.cols { display: grid; gap: 0 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.hero-card { border-color: #d6e2f7; box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 12px 32px rgba(37, 99, 235, .10); }
.hero-card h2 { margin-bottom: 4px; }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; margin: 16px 0 6px; color: var(--ink); }
.card > h2 + label, .card > h2 + p + label { margin-top: 8px; }
.optional { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--field); border-radius: var(--radius-sm);
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface);
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #667085; opacity: 1; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
input[type=file] {
  display: block; width: 100%; padding: 14px; border: 2px dashed var(--line-strong); border-radius: var(--radius-sm);
  background: var(--bg-soft); color: var(--ink-2); font: inherit; font-size: .95rem; cursor: pointer;
}
input[type=file]:hover { border-color: var(--brand); background: var(--brand-soft); }
input[type=file]::file-selector-button {
  margin-right: 12px; padding: 9px 14px; border: 0; border-radius: 8px; background: var(--brand-soft); color: var(--brand-strong);
  font: inherit; font-weight: 600; cursor: pointer;
}
input[type=file]:hover::file-selector-button { background: var(--brand-softer); }
input[type=file]:disabled { cursor: default; opacity: .6; }
.help { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }
.field-error { color: var(--bad); font-size: .92rem; font-weight: 600; margin: 6px 0 0; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; margin: 18px 0; color: var(--ink-2); }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--brand); }
.actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 16px; }
.row { display: flex; gap: 8px 12px; align-items: flex-end; flex-wrap: wrap; }
.row > * { flex: 1 1 200px; }
.row > button { flex: 0 0 auto; }

input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--brand); outline-offset: 2px;
}
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus, textarea:focus, select:focus { border-color: var(--brand); }

/* ---------- buttons ---------- */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  background: var(--brand); color: #fff; border: 1px solid transparent; border-radius: var(--radius-sm);
  font: inherit; font-weight: 650; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease;
}
button:hover, .btn:hover { background: var(--brand-strong); }
.btn-lg { min-height: 52px; padding: 13px 22px; font-size: 1.05rem; width: 100%; }
button.secondary, .btn.secondary { background: var(--brand-soft); color: var(--brand-strong); }
button.secondary:hover, .btn.secondary:hover { background: var(--brand-softer); }
button.danger, .btn.danger { background: var(--bad); }
button.danger:hover, .btn.danger:hover { background: var(--bad-strong); }
button:disabled, button:disabled:hover { background: var(--line); color: var(--muted); cursor: default; }
button.link { background: none; color: var(--brand-strong); padding: 4px 2px; min-height: 32px; font-weight: 500; text-decoration: underline; text-underline-offset: .18em; }
button.link:hover { background: none; text-decoration-thickness: 2px; }
button.link.danger-link { color: var(--bad); }

/* ---------- notices and badges ---------- */
.notice { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--brand-soft); border: 1px solid #c9dafc; margin: 12px 0; color: var(--ink); }
.notice.warn { background: var(--warn-soft); border-color: var(--warn-line); }
.notice.error { background: var(--bad-soft); border-color: var(--bad-line); }
.notice.ok { background: var(--ok-soft); border-color: var(--ok-line); }
.notice > :last-child { margin-bottom: 0; }
.notice strong { display: block; margin-bottom: 2px; }
.notice .actions { margin-top: 10px; }

.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 650; background: #eef1f5; color: var(--ink-2); white-space: nowrap; line-height: 1.6; }
.badge.good { background: var(--ok-soft); color: var(--ok); }
.badge.fair { background: var(--warn-soft); color: var(--warn); }
.badge.weak { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--brand-soft); color: var(--brand-strong); }

/* ---------- the estimate ---------- */
.year { display: flex; flex-direction: column; }
.year .btn { margin-top: auto; align-self: flex-start; }
.big { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.6rem); font-weight: 750; letter-spacing: -.02em; line-height: 1.1; margin: 6px 0; font-variant-numeric: tabular-nums; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 4px 0 16px; }
.facts { display: grid; grid-template-columns: minmax(0, 1fr); margin: 12px 0 0; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }

.status { border-color: #c9dafc; }
.status-head { display: flex; align-items: center; gap: 10px; font-weight: 650; margin-bottom: 14px; }
.stepper { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.stepper li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.stepper li::before { content: ""; width: 24px; height: 24px; flex: 0 0 auto; border-radius: 50%; border: 2px solid var(--field); background: var(--surface); }
.stepper li.done { color: var(--ink-2); }
.stepper li.done::before { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.stepper li.current { color: var(--ink); font-weight: 650; }
.stepper li.current::before { border-color: var(--brand); background: radial-gradient(circle, var(--brand) 0 5px, var(--surface) 6px); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 20px; }
.tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
.tabs a:hover { border-color: var(--brand); color: var(--brand-strong); }
.tabs a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- lists and tables ---------- */
.list { list-style: none; padding: 0; margin: 0 0 8px; }
.list li { display: flex; justify-content: space-between; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: flex-start; flex-wrap: wrap; }
.list li:first-child { padding-top: 4px; }
.list .item { min-width: 0; flex: 1 1 220px; }
.list .name { font-weight: 600; overflow-wrap: anywhere; margin-right: 6px; }
.list .note { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.list .actions { margin-top: 0; gap: 4px 16px; }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
th { color: var(--ink-2); font-weight: 650; background: var(--bg-soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; overflow-wrap: normal; }
tr.total td { font-weight: 700; border-top: 2px solid var(--ink); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroll-x table { min-width: 560px; }

/* ---------- the account flows ---------- */
.step { position: relative; padding-left: 64px; }
.step .num { position: absolute; left: 20px; top: 22px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); display: grid; place-items: center; font-weight: 750; font-size: .95rem; }
.step.done .num { background: var(--ok); color: #fff; }
.auth { max-width: 460px; }

/* ---------- pricing ---------- */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); margin-bottom: 16px; }
.plan { display: flex; flex-direction: column; margin-bottom: 0; }
.plan.featured { border-color: #c9dafc; box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 12px 32px rgba(37, 99, 235, .10); }
.plan .price { font-size: 1.5rem; font-weight: 750; margin: 2px 0 14px; letter-spacing: -.01em; }
.plan ul { padding-left: 0; list-style: none; margin: 0 0 18px; display: grid; gap: 8px; }
.plan li { position: relative; padding-left: 26px; color: var(--ink-2); }
.plan li::before { content: ""; position: absolute; left: 0; top: .3em; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8' fill='none' stroke='%23047857' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.plan-foot { margin-top: auto; }

/* ---------- assistant ---------- */
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 4px; margin-bottom: 8px; }
.msg { padding: 10px 14px; border-radius: 14px; max-width: 85%; white-space: pre-wrap; line-height: 1.5; }
.msg.user { align-self: flex-end; background: var(--brand); color: #fff; }
.msg.assistant { align-self: flex-start; background: var(--bg-soft); border: 1px solid var(--line); }

/* ---------- spinner ---------- */
.spin { display: inline-block; width: 18px; height: 18px; flex: 0 0 auto; border: 2.5px solid var(--brand-softer); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- the privacy notice and the terms ---------- */
.doc { max-width: 800px; padding-top: 28px; padding-bottom: 56px; line-height: 1.65; }
.doc h2 { margin-top: 36px; }
.doc ul ul { margin-top: 8px; }
.doc li { margin-bottom: 8px; }
.doc table { margin: 8px 0 16px; border: 1px solid var(--line); }
.doc th, .doc td { padding: 10px 12px; }
.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; margin: 20px 0 8px; }
.toc h2 { font-size: 1rem; margin: 0 0 6px; }
.toc ol { margin: 0; padding-left: 1.4em; columns: 2 220px; column-gap: 24px; }
.toc li { margin: 0 0 4px; break-inside: avoid; }
.doc h2[id] { scroll-margin-top: 16px; }

/* ---------- larger screens ---------- */
@media (min-width: 640px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .btn-lg { width: auto; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps li { padding: 66px 20px 22px; }
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-in { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
  .foot nav { justify-content: flex-end; }
  .stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card { padding: 24px; }
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; padding-top: 64px; padding-bottom: 72px; }
  .band { padding: 64px 0; }
  .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page { padding-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .top nav, .foot nav, button, .btn, .skip { display: none !important; }
  .card { box-shadow: none; break-inside: avoid; }
  .hero { background: none; }
}
