/* jobs.gene-works.fi — site stylesheet (brief §14: system fonts, one accent colour, 18px base, AA contrast,
   mobile first, light/dark via prefers-color-scheme, no photos, no icons). Source: gen/assets/site.css. */

/* ---------- tokens ---------- */
:root {
  color-scheme: light dark;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-0: 1rem;        /* 18px body */
  --fs-1: 1.125rem;    /* lead */
  --fs-2: 1.333rem;    /* h3 */
  --fs-3: 1.667rem;    /* h2 */
  --fs-4: 2.111rem;    /* h1 mobile */
  --fs-5: 2.667rem;    /* h1 desktop */
  --lh: 1.55;
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem; --sp-5: 1.5rem; --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4rem;
  --radius: 6px;
  --wrap: 68rem;
  --measure: 42rem;

  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #17202a;
  --text-2: #4a5563;          /* AA on --bg and --surface */
  --border: #cfd6df;
  --accent: #0f5fa8;          /* single accent: Nordic blue, 6.3:1 on white */
  --accent-hover: #0b4a84;
  --accent-text: #ffffff;
  --accent-soft: #e4eef9;
  --focus: #b8560a;           /* focus ring in a second hue so it is visible on accent */
  --ok: #1e7a3c;
  --warn: #9a5b00;
  --bad: #b3261e;
  --neutral: #6b7480;
  --shadow: 0 1px 2px rgba(23, 32, 42, 0.06), 0 4px 14px rgba(23, 32, 42, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111a22;
    --surface: #18232d;
    --surface-2: #1f2c38;
    --text: #e8edf2;
    --text-2: #aeb9c5;
    --border: #34434f;
    --accent: #7cb7ee;        /* 8.9:1 on --surface */
    --accent-hover: #a3cdf5;
    --accent-text: #0b1a28;
    --accent-soft: #1b3550;
    --focus: #ffb15c;
    --ok: #6fcf8f;
    --warn: #f0b860;
    --bad: #f28b82;
    --neutral: #97a3b0;
    --shadow: none;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-0);
  line-height: var(--lh);
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1 0 auto; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 var(--sp-3); font-weight: 650; letter-spacing: -0.01em; overflow-wrap: anywhere; }
h1 { font-size: var(--fs-4); }
h2 { font-size: var(--fs-3); margin-top: var(--sp-6); }
h3 { font-size: var(--fs-2); }
p, ul, ol { margin: 0 0 var(--sp-4); max-width: var(--measure); }
li { margin-bottom: var(--sp-1); }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hover); }
strong { font-weight: 650; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); padding: 0 0.3em; border-radius: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--sp-4); }
.page { padding-top: var(--sp-5); padding-bottom: var(--sp-8); }
.visually-hidden, .hp-field {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.muted { color: var(--text-2); }
.skip-link { position: absolute; left: var(--sp-4); top: -100px; background: var(--surface); color: var(--text); padding: var(--sp-2) var(--sp-3); border-radius: var(--radius); z-index: 100; }
.skip-link:focus { top: var(--sp-2); }

@media (min-width: 48em) {
  h1 { font-size: var(--fs-5); }
  .page { padding-top: var(--sp-6); }
}

/* ---------- header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); padding-top: var(--sp-3); padding-bottom: var(--sp-3); }
.wordmark { font-weight: 750; font-size: var(--fs-2); letter-spacing: -0.02em; color: var(--text); text-decoration: none; margin-right: auto; }
.wordmark:hover { color: var(--accent); }
.nav-toggle { font: inherit; font-weight: 600; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-2) var(--sp-3); cursor: pointer; }
.site-nav { flex-basis: 100%; display: none; }
.site-nav.is-open { display: block; }
.site-nav ul, .lang-switch ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); }
.site-nav a { display: inline-block; padding: var(--sp-2) 0; color: var(--text); text-decoration: none; font-weight: 550; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--accent); }
.lang-switch { flex-basis: 100%; }
.lang-switch a { color: var(--text-2); text-decoration: none; font-size: 0.95em; }
.lang-switch a[aria-current="true"] { color: var(--text); font-weight: 600; text-decoration: underline; }
.lang-switch a:hover { color: var(--accent); }
@media (min-width: 60em) {
  .nav-toggle { display: none; }
  .site-nav { display: block; flex-basis: auto; }
  .lang-switch { flex-basis: auto; margin-left: var(--sp-4); }
}
@media (prefers-reduced-motion: no-preference) { .site-nav a { transition: border-color 120ms; } }

.breadcrumbs { font-size: 0.9em; color: var(--text-2); margin-bottom: var(--sp-4); }
.breadcrumbs a { color: var(--text-2); }
.byline { color: var(--text-2); font-size: 0.95em; margin-top: calc(-1 * var(--sp-2)); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font: inherit; font-weight: 650; line-height: 1.2; text-decoration: none; text-align: center;
  padding: 0.8em 1.4em; border-radius: var(--radius); border: 2px solid transparent; cursor: pointer;
  min-height: 48px; min-width: 48px; overflow-wrap: anywhere;
}
.btn--primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-text); }
.btn--secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn--secondary:hover { background: var(--accent-soft); color: var(--accent-hover); }
.btn--large { font-size: var(--fs-1); width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.6; cursor: progress; }
@media (min-width: 40em) { .btn--large { width: auto; } }

/* ---------- hero ---------- */
.hero { padding: var(--sp-5) 0 var(--sp-6); border-bottom: 1px solid var(--border); margin-bottom: var(--sp-5); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8em; font-weight: 650; color: var(--text-2); margin-bottom: var(--sp-3); }
.lead { font-size: var(--fs-1); color: var(--text-2); max-width: var(--measure); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }
.hero-actions .btn { flex: 1 1 14rem; }
@media (min-width: 40em) { .hero-actions .btn { flex: 0 0 auto; } }

/* ---------- cards ---------- */
.card-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 40em) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-5); box-shadow: var(--shadow); }
.card h3 { margin-bottom: var(--sp-2); }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }   /* whole card clickable */
.card:has(h3 a):hover { border-color: var(--accent); }
.card:has(h3 a):hover h3 a { color: var(--accent); text-decoration: underline; }
.card p { margin: 0; color: var(--text-2); }

/* ---------- trust line ---------- */
.trust-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2) var(--sp-5); grid-template-columns: 1fr; max-width: none; }
.trust-list li { padding-left: 1.1em; position: relative; }
.trust-list li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 0.5em; height: 0.5em; background: var(--accent); border-radius: 50%; }
@media (min-width: 40em) { .trust-list { grid-template-columns: repeat(2, 1fr); } }

/* ---------- steps ---------- */
.steps { list-style: none; counter-reset: step; padding: 0; display: grid; gap: var(--sp-4); max-width: none; }
.steps li { counter-increment: step; position: relative; padding-left: 3.4rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 700; display: grid; place-items: center; }
.steps h3 { font-size: var(--fs-1); margin-bottom: var(--sp-1); }
.steps p { margin: 0; color: var(--text-2); }
@media (min-width: 48em) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: var(--sp-3); }
table { border-collapse: collapse; width: 100%; min-width: 28rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: top; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); }
thead th { background: var(--surface-2); font-weight: 650; white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; }

/* ---------- notes, disclaimer, data version ---------- */
.note { border-left: 4px solid var(--border); padding: var(--sp-3) var(--sp-4); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; color: var(--text-2); font-size: 0.95em; }
.note--warning { border-left-color: var(--warn); }
.disclaimer { border: 1px solid var(--border); border-left: 4px solid var(--warn); background: var(--surface); padding: var(--sp-4); border-radius: var(--radius); font-size: 0.95em; }
.data-version { font-size: 0.9em; color: var(--text-2); font-family: var(--mono); border-top: 1px dashed var(--border); padding-top: var(--sp-3); }

/* ---------- FAQ ---------- */
.faq-item { border-top: 1px solid var(--border); padding: var(--sp-4) 0; }
.faq-item h3 { font-size: var(--fs-1); margin-bottom: var(--sp-2); }
.faq-item p { margin: 0; color: var(--text-2); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--accent-soft); border-radius: var(--radius); padding: var(--sp-5); margin: var(--sp-6) 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4); }
.cta-band p { margin: 0; font-size: var(--fs-1); font-weight: 600; flex: 1 1 16rem; }

/* ---------- forms and calculator ---------- */
.calculator, .form-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-5); margin: var(--sp-6) 0; box-shadow: var(--shadow); }
.calculator h2, .form-section h2 { margin-top: 0; }
.calc-intro, .form-intro { color: var(--text-2); }
.field { margin-bottom: var(--sp-5); max-width: var(--measure); }
.field label, .field legend, .field .label { display: block; font-weight: 600; margin-bottom: var(--sp-2); }
.field--static { display: block; }
.field--static .label { display: inline; margin-right: var(--sp-2); }
.field--inline { margin: var(--sp-2) 0 var(--sp-3) 2rem; }
.field--inline label { display: inline; margin-right: var(--sp-2); }
fieldset { border: 0; padding: 0; margin: 0 0 var(--sp-5); min-width: 0; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="month"], input[type="url"], select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.65em 0.8em; width: 100%; min-height: 48px;
}
input[type="number"] { width: 7rem; }
select { appearance: auto; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: var(--bad); }
.radio, .field--check { display: flex; align-items: flex-start; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.radio label, .field--check label { font-weight: 450; margin: 0; }
input[type="radio"], input[type="checkbox"] { width: 1.35rem; height: 1.35rem; margin: 0.2rem 0 0; flex: none; accent-color: var(--accent); }
.help { color: var(--text-2); font-size: 0.9em; margin: var(--sp-1) 0 0; }
.req { color: var(--bad); font-weight: 700; }
.optional { color: var(--text-2); font-weight: 450; font-size: 0.9em; }
.free-line, .promise { color: var(--text-2); font-size: 0.9em; margin-top: var(--sp-3); }
.form-status { border-left: 4px solid var(--warn); background: var(--surface-2); padding: var(--sp-3) var(--sp-4); border-radius: 0 var(--radius) var(--radius) 0; }
.form-status.is-error { border-left-color: var(--bad); }
.form-status.is-ok { border-left-color: var(--ok); }
.form-thanks { border: 1px solid var(--ok); border-left-width: 4px; border-radius: var(--radius); padding: var(--sp-4) var(--sp-5); }
.form-thanks h3 { margin-top: 0; }

/* result: 11 rows in the order of brief §7.3 */
.calc-result { margin-top: var(--sp-6); border-top: 2px solid var(--accent); padding-top: var(--sp-5); }
.calc-result h2 { margin-top: 0; }
.badge { display: inline-block; font-size: 0.8em; font-weight: 650; padding: 0.2em 0.6em; border-radius: 999px; background: var(--accent-soft); color: var(--text); margin-bottom: var(--sp-3); }
.calc-row { padding: var(--sp-4) 0; border-bottom: 1px solid var(--border); }
.calc-row h3 { font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); margin-bottom: var(--sp-2); }
.calc-row .value { font-size: var(--fs-2); font-weight: 650; font-variant-numeric: tabular-nums; }
.calc-row .sub { color: var(--text-2); margin: var(--sp-1) 0 0; }
.calc-row ul { margin: var(--sp-2) 0 0; padding-left: 1.2em; }
.calc-row--net { background: var(--accent-soft); margin: 0 calc(-1 * var(--sp-5)); padding: var(--sp-5); border: 0; }
.calc-row--net .value { font-size: var(--fs-4); }
.calc-row--conditional, .calc-row--raise { border-bottom: 0; }
.calc-row .disclaimer { margin: 0; }
.calc-row--version { border-bottom: 0; }
.calc-actions { margin-top: var(--sp-5); }
.deductions { list-style: none; padding: 0; margin: 0; }
.deductions li { display: flex; justify-content: space-between; gap: var(--sp-4); border-bottom: 1px dotted var(--border); padding: var(--sp-1) 0; }
.deductions li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.raise-group h4 { font-size: 0.95em; margin: var(--sp-3) 0 var(--sp-1); color: var(--text); }
.raise-group ul { margin: 0; }
.raise-group .meta { color: var(--text-2); font-size: 0.9em; }

/* ---------- traffic-light status (phase 2 cabinet; reserved) ---------- */
.status { display: inline-flex; align-items: center; gap: 0.5em; font-weight: 600; }
.status::before { content: ""; width: 0.8em; height: 0.8em; border-radius: 50%; background: var(--neutral); border: 2px solid transparent; }
.status--ok::before { background: var(--ok); }
.status--warn::before { background: var(--warn); }
.status--bad::before { background: var(--bad); }
.status--none::before { background: transparent; border-color: var(--neutral); }

/* ---------- footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); color: var(--text-2); font-size: 0.95em; margin-top: var(--sp-8); }
.footer-inner { padding-top: var(--sp-6); padding-bottom: var(--sp-6); }
.footer-company strong { color: var(--text); }
.footer-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); }
.footer-verify { max-width: var(--measure); }
.footer-copy { margin: 0; }

/* ---------- print ---------- */
@media print {
  .site-header, .site-footer, .btn, .nav-toggle, .skip-link { display: none !important; }
  .calc-result { break-inside: avoid; }
  body { background: #fff; color: #000; }
}

/* ---------- additions: details, footer heading, docs request, notes rows ---------- */
.calc-details { margin-top: var(--sp-3); }
.calc-details summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.calc-details summary:hover { color: var(--accent-hover); }
.calc-details ul { margin-top: var(--sp-2); }
.calc-row--notes ul, .calc-row--conditional ul { color: var(--text-2); }
.calc-row--work-right p { margin: 0; }
.footer-heading { font-size: var(--fs-0); margin: var(--sp-4) 0 var(--sp-2); color: var(--text); }
.footer-note { max-width: var(--measure); }
.field--check label { flex: 1; }

/* ---------- classes used by forms.js (T5): inline errors, summary box, compact docs form ---------- */
.field-error { color: var(--bad); font-size: 0.9em; margin: var(--sp-1) 0 0; font-weight: 600; }
.form-summary { border-left: 4px solid var(--accent); background: var(--surface-2); padding: var(--sp-3) var(--sp-4); border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: var(--sp-4); }
.form-summary--error { border-left-color: var(--bad); }
.form-summary--info { border-left-color: var(--ok); }
.docs-request { margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--border); background: transparent; border-radius: 0; }
.docs-request h3 { margin-bottom: var(--sp-2); }
.lead-form--compact .field { margin-bottom: var(--sp-4); }
