/* Look and feel follows proqu.io: warm paper background, logo purple accent, Inter, pill buttons. */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(assets/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(assets/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --canvas: #fbfaf8;
  --surface: #ffffff;
  --raised: #f4f0fa;
  --line: #e8e3ee;
  --line-strong: #d2c9de;
  --fg: #1a1024;
  --muted: #51465f;
  --subtle: #6c627c;
  --accent: #6b21a8;
  --accent-strong: #450b68;
  --accent-ink: #ffffff;
  --error: #b42318;
}

.on-dark {
  --canvas: #1c0a2e;
  --line: #3b2257;
  --fg: #f7f3fb;
  --muted: #d2c6e1;
  --subtle: #a999c0;
  --accent: #40e0d0;
  background: var(--canvas);
  color: var(--fg);
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--fg);
  font: 16px/1.6 "Inter Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { letter-spacing: -0.02em; text-wrap: balance; }
p, li { text-wrap: pretty; }

a { color: var(--accent); text-underline-offset: 4px; text-decoration-color: color-mix(in oklab, var(--accent) 40%, transparent); }
a:hover { text-decoration-color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: color-mix(in oklab, var(--accent) 22%, transparent); }

.wrap { width: 100%; max-width: 64rem; margin: 0 auto; padding: 0 20px; }
@media (min-width: 640px) { .wrap { padding: 0 32px; } }
.narrow { max-width: 48rem; }

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--canvas) 85%, transparent);
  backdrop-filter: blur(12px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--muted); font-size: 0.875rem; font-weight: 500; }
.brand img { height: 24px; width: auto; display: block; }
.brand span { padding-left: 12px; border-left: 1px solid var(--line-strong); }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 20px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { border-color: var(--line-strong); color: var(--fg); padding: 8px 16px; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: 0.6; cursor: wait; }

/* ---------------------------------------------------------------- hero */

.hero { position: relative; isolation: isolate; padding: 56px 0 40px; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, color-mix(in oklab, var(--fg) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklab, var(--fg) 6%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 20%, transparent 75%);
}
.hero h1 { margin: 12px 0 0; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; font-weight: 600; }
.hero .lead { margin: 16px 0 0; max-width: 40rem; font-size: 1.125rem; color: var(--muted); }

.eyebrow { margin: 0; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent); }

main { flex: 1; padding-bottom: 80px; }

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* ---------------------------------------------------------------- chips, salary */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.chips li { border-radius: 999px; background: var(--raised); padding: 4px 12px; font-size: 0.8125rem; font-weight: 500; color: var(--muted); }
.chips li.level { background: var(--accent-strong); color: #fff; }

.salary { margin: 14px 0 0; font-weight: 600; color: var(--fg); }
.salary-note { margin: 4px 0 0; font-size: 0.875rem; color: var(--subtle); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.share .label { margin-right: 4px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--subtle); }
.share a, .share button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.share a:hover, .share button:hover { border-color: var(--accent); color: var(--accent); }
.share .copied { font-size: 0.8125rem; color: var(--subtle); }

/* ---------------------------------------------------------------- job list */

.jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 24px; }
@media (min-width: 640px) { .card { padding: 28px; } }

.job-card { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; transition: border-color 0.2s, box-shadow 0.2s; }
.job-card:hover { border-color: var(--accent); box-shadow: 0 8px 24px -16px color-mix(in oklab, var(--accent) 60%, transparent); }
.job-card h2 { margin: 0; font-size: 1.25rem; font-weight: 600; }
.job-card h2 a { color: var(--fg); text-decoration: none; }
.job-card h2 a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.job-card:hover h2 a { color: var(--accent); }
.job-card .arrow { flex-shrink: 0; font-size: 1.25rem; color: var(--accent); }

/* ---------------------------------------------------------------- job page */

.prose { color: var(--muted); }
.prose h3 { margin: 40px 0 12px; font-size: 1.25rem; font-weight: 600; color: var(--fg); }
.prose p { margin: 14px 0; line-height: 1.7; }
.prose ul { margin: 14px 0; padding-left: 20px; }
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--accent); }

.apply { margin-top: 48px; }
.apply h2 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 600; }
.apply .intro { margin: 0 0 24px; color: var(--muted); }

.info-box { border: 1px solid var(--line); border-radius: 16px; background: color-mix(in oklab, var(--raised) 60%, transparent); padding: 14px 20px; }
.info-box .label { margin: 0; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--subtle); }
.info-box .salary { margin-top: 4px; }

/* ---------------------------------------------------------------- form */

form { display: grid; gap: 18px; }
.row { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; } }

label { display: grid; gap: 6px; font-size: 0.875rem; font-weight: 600; color: var(--fg); }
label .hint { font-weight: 400; color: var(--subtle); }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  padding: 10px 14px;
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  color: var(--fg);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
}
select:disabled { background: var(--canvas); color: var(--subtle); }
/* One height for every single-line control, so a row of mixed fields lines up. */
input:not([type="checkbox"]):not([type="file"]), select { height: 46px; }
textarea { resize: vertical; }
input[type="file"] { padding: 8px; }
input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 0;
  border-radius: 999px;
  background: var(--raised);
  padding: 6px 14px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-strong);
  cursor: pointer;
}
.invalid { border-color: var(--error); }

.check { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--muted); }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); }
.check span { flex: 1; }

.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.error, .field-error { color: var(--error); }
.error { margin: 0; }
.field-error { flex-basis: 100%; font-size: 0.8125rem; font-weight: 400; }

form .btn { justify-self: start; padding: 13px 26px; }

/* scroll-margin: the sticky header must not cover the heading when the page scrolls here */
.done { margin-top: 48px; text-align: center; scroll-margin-top: 88px; }
.done h2 { margin: 0 0 8px; font-size: 1.5rem; }
.done .steps { display: inline-block; max-width: 34rem; margin: 20px 0; padding-left: 20px; text-align: left; color: var(--muted); }
.done .steps li { margin: 8px 0; }
.done .steps li::marker { color: var(--accent); }

/* ---------------------------------------------------------------- footer */

.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-top: 40px; padding-bottom: 40px; }
.site-footer img { height: 24px; width: auto; display: block; }
.site-footer p { margin: 12px 0 0; max-width: 20rem; font-size: 0.875rem; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.875rem; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--accent); }
.site-footer .legal { border-top: 1px solid var(--line); padding-top: 20px; padding-bottom: 20px; font-size: 0.75rem; color: var(--subtle); }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}

/* ---------------------------------------------------------------- tabs */

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.tabs[hidden] { display: none; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  padding: 8px 16px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.tab:hover { border-color: var(--accent); color: var(--accent); }
.tab .count { border-radius: 999px; background: var(--raised); padding: 1px 8px; font-size: 0.75rem; color: var(--muted); }
.tab[aria-selected="true"] { border-color: var(--accent-strong); background: var(--accent-strong); color: #fff; }
.tab[aria-selected="true"] .count { background: rgb(255 255 255 / 0.18); color: #fff; }

/* Logic test (test.html) */
.test-loading { margin-top: 48px; text-align: center; }
.test-intro { margin-top: 32px; }
.test-intro h2 { margin: 0 0 12px; font-size: 1.25rem; }
.test-intro ul { margin: 0 0 20px; padding-left: 20px; color: var(--muted); }
.test-intro li { margin: 10px 0; }
.test-intro li::marker { color: var(--accent); }
.test-intro strong { color: var(--fg); }
.test-bar {
  position: sticky; top: 72px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 24px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.test-bar strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.test-bar strong.low { color: var(--error); }
.test-dots { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.test-dots button {
  width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface);
  color: var(--fg); font: inherit; font-size: 0.875rem; cursor: pointer;
}
.test-dots button.answered { background: var(--raised); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.test-dots button.here { outline: 2px solid var(--accent); outline-offset: 2px; }
.test-question h2 { margin: 0 0 12px; font-size: 1.25rem; }
.test-question p { margin: 12px 0; }
.test-rules { margin: 12px 0; padding-left: 20px; }
.test-rules li { margin: 6px 0; }
.test-table { overflow-x: auto; margin: 16px 0; }
.test-table table { border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.test-table caption { padding-bottom: 6px; text-align: left; font-weight: 600; }
.test-table th, .test-table td { padding: 6px 14px; border: 1px solid var(--line); text-align: left; white-space: nowrap; }
.test-table th { background: var(--raised); font-weight: 600; }
.test-options { margin: 20px 0 0; padding: 0; border: 0; }
.test-options legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.test-options label {
  display: flex; align-items: center; gap: 10px; margin: 8px 0; padding: 10px 14px; border: 1px solid var(--line-strong);
  border-radius: 10px; cursor: pointer;
}
.test-options label:has(input:checked) { border-color: var(--accent); background: var(--raised); }
.test-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 48px; }
.test-actions #test-hand-in { margin-left: auto; }
.test-confirm { margin: -28px 0 48px; }
.test-confirm p { margin: 0 0 12px; }
