/* Sebenza R0. No web fonts, no pictures: nothing to download. The glow is plain CSS colour, not a picture.
   Colours live in :root so the contrast test can read them; the dark set follows the phone's own setting. */
:root {
  color-scheme: light dark;
  --bg: #f8f6fd;
  --card: #ffffff;
  --field: #ffffff;
  --text: #18171c;
  --muted: #47454f;
  --brand: #6d28d9;
  --on-brand: #ffffff;
  --btn-a: #7c3aed;
  --btn-b: #5b21b6;
  --on-btn: #ffffff;
  --line: #6b6a78;
  --soft: #efe8fd;
  --warn-bg: #fff3cd;
  --err: #a40000;
  --focus: #4c1d95;
  --spark: #ffb224; /* the orange dot: counts only */
  --on-spark: #201400;
  --c-applied: #1e40af; --cb-applied: #e0e7ff;
  --c-replied: #5b21b6; --cb-replied: #ede9fe;
  --c-interview: #0b5f52; --cb-interview: #d7f5ee;
  --c-offer: #14632f; --cb-offer: #dcf5e3;
  --c-rejected: #8a1c1c; --cb-rejected: #fde8e8;
  --glass: rgb(255 255 255 / .92);
  --edge: rgb(109 40 217 / .14);
  --bar: rgb(255 255 255 / .97);
  --sh: 0 1px 2px rgb(24 23 28 / .06), 0 12px 28px -16px rgb(76 29 149 / .4);
  --btn-sh: 0 8px 20px -8px rgb(109 40 217 / .6);
  --glow: radial-gradient(90% 40% at 80% -8%, rgb(124 58 237 / .18), transparent 70%), radial-gradient(70% 30% at 0% 0%, rgb(167 139 250 / .14), transparent 70%);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0912;
    --card: #16131f;
    --field: #100e19;
    --text: #f2f0f8;
    --muted: #c4c1d1;
    --brand: #a78bfa;
    --on-brand: #150a2e;
    --btn-b: #6d28d9;
    --line: #8d8aa0;
    --soft: #231d3a;
    --warn-bg: #3b300c;
    --err: #ff9d9d;
    --focus: #c4b5fd;
    --c-applied: #b8c7ff; --cb-applied: #1e2a5a;
    --c-replied: #d4c2ff; --cb-replied: #33215f;
    --c-interview: #8be8d3; --cb-interview: #0f3b35;
    --c-offer: #9be8b0; --cb-offer: #0f3a1e;
    --c-rejected: #ffb4b4; --cb-rejected: #4a1818;
    --glass: linear-gradient(180deg, rgb(255 255 255 / .08), rgb(255 255 255 / .035));
    --edge: rgb(255 255 255 / .12);
    --bar: rgb(22 19 33 / .96);
    --sh: 0 1px 0 rgb(255 255 255 / .06) inset, 0 16px 32px -18px rgb(0 0 0 / .9);
    --btn-sh: 0 0 0 1px rgb(196 181 253 / .3) inset, 0 8px 28px -6px rgb(124 58 237 / .75);
    --glow: radial-gradient(85% 42% at 50% -10%, rgb(124 58 237 / .55), transparent 72%), radial-gradient(60% 30% at 105% 55%, rgb(79 70 229 / .22), transparent 70%), radial-gradient(70% 32% at -10% 100%, rgb(91 33 182 / .28), transparent 70%);
  }
}

* { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; } /* 18px, and it still grows with the phone's own text size */
body {
  margin: 0; min-height: 100vh; padding-bottom: 7rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  line-height: 1.5; color: var(--text); background: var(--bg); overflow-wrap: anywhere;
}
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--glow); }
.wrap { max-width: 40rem; margin: 0 auto; padding: 0 var(--s4); }
h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; margin: var(--s4) 0 var(--s3); }
h2 { font-size: 1.15rem; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; margin: var(--s6) 0 var(--s2); }
p, ul, ol { margin: var(--s2) 0 var(--s4); }
a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus { outline: none; }
h1:focus { outline: none; }

.skip { position: absolute; left: -999px; top: var(--s2); z-index: 10; padding: var(--s3) var(--s4); border-radius: 999px; background: var(--card); color: var(--text); }
.skip:focus { left: var(--s2); }

/* top: logo and slogan */
header.wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s2) var(--s3); padding-top: var(--s3); }
.brand { margin: 0; font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.brand a { display: inline-flex; align-items: center; gap: 10px; min-height: 3rem; color: var(--text); text-decoration: none; }
.logo { width: 34px; height: 34px; border-radius: 10px; display: block; }
.tag { margin: 0; padding: var(--s1) var(--s3); border: 1px solid var(--edge); border-radius: 999px; background: var(--glass); color: var(--muted); font-size: .8rem; font-weight: 600; }

/* bottom tab bar: a floating pill, the same six places on every screen */
nav { position: fixed; inset: auto 0 0; z-index: 5; padding: 0 var(--s2) max(var(--s2), env(safe-area-inset-bottom)); pointer-events: none; }
nav ul { pointer-events: auto; display: flex; max-width: 30rem; margin: 0 auto; padding: var(--s1); list-style: none; border: 1px solid var(--edge); border-radius: 30px; background: var(--bar); box-shadow: var(--sh), 0 -6px 30px -12px rgb(0 0 0 / .45); }
@supports (backdrop-filter: blur(1px)) { nav ul { background: color-mix(in srgb, var(--bar) 80%, transparent); backdrop-filter: blur(14px); } }
nav li { flex: 1 1 0; min-width: 0; }
nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 3rem; height: 100%; padding: 6px 2px;
  border-radius: 24px; color: var(--muted); text-align: center; text-decoration: none; font-size: .72rem; font-weight: 600; line-height: 1.15; overflow-wrap: normal;
}
nav a:focus-visible { outline-offset: 2px; }
nav a[aria-current="page"] { color: var(--on-btn); background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); box-shadow: var(--btn-sh); }
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* buttons: pills, one loud one per screen */
.btn {
  display: flex; align-items: center; justify-content: center; gap: var(--s2); width: 100%; min-height: 3rem; margin: var(--s2) 0; padding: 10px var(--s5);
  font: inherit; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer;
  color: var(--on-btn); background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); border: 0; border-radius: 999px; box-shadow: var(--btn-sh);
}
.btn.secondary { color: var(--text); background: transparent; border: 1.5px solid var(--line); box-shadow: none; }
.btn.danger { color: var(--err); background: transparent; border: 1.5px solid var(--err); box-shadow: none; }
.row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.row .btn { flex: 1 1 9rem; }

/* forms: a clear label above each field */
.field { margin: 0 0 var(--s5); }
label { display: block; margin-bottom: 6px; font-size: .95rem; font-weight: 600; }
.hint { margin: 0 0 6px; color: var(--muted); font-size: .875rem; }
input, select, textarea {
  display: block; width: 100%; min-height: 3rem; padding: 10px var(--s4);
  font: inherit; color: var(--text); background: var(--field); border: 1.5px solid var(--line); border-radius: 16px;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { min-height: 7rem; resize: vertical; }
.err { margin: 6px 0 0; color: var(--err); font-size: .9rem; font-weight: 600; }
.err:empty { margin: 0; } /* stays in the page (not display:none) so screen readers announce it when text arrives */
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--err); border-width: 2.5px; }
fieldset { margin: 0 0 var(--s5); padding: var(--s3) var(--s4) 0; border: 1px solid var(--edge); border-radius: 22px; background: var(--glass); box-shadow: var(--sh); }
legend { padding: var(--s1) var(--s3); border-radius: 999px; background: var(--soft); font-size: .875rem; font-weight: 600; }
.steps { display: flex; gap: 6px; margin: 0 0 var(--s3); }
.steps i { flex: 1; height: 5px; border-radius: 5px; background: var(--soft); }
.steps i.on { background: linear-gradient(90deg, var(--btn-a), var(--btn-b)); }

/* cards */
details { margin: var(--s3) 0; padding: 0 var(--s4); border: 1px solid var(--edge); border-radius: 22px; background: var(--glass); box-shadow: var(--sh); }
summary { display: flex; align-items: center; gap: var(--s2); min-height: 3rem; padding: var(--s2) 0; font-weight: 600; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; margin-left: auto; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); }
details[open] > summary { border-bottom: 1px solid var(--edge); margin-bottom: var(--s3); }
details[open] > summary::after { transform: rotate(-135deg); }
.jt { flex: 1; min-width: 0; }
.sep { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.chip { flex: none; padding: 2px var(--s3); border-radius: 999px; font-size: .8rem; font-weight: 600; line-height: 1.5; }
.s-applied { color: var(--c-applied); background: var(--cb-applied); }
.s-replied { color: var(--c-replied); background: var(--cb-replied); }
.s-interview { color: var(--c-interview); background: var(--cb-interview); }
.s-offer { color: var(--c-offer); background: var(--cb-offer); }
.s-rejected { color: var(--c-rejected); background: var(--cb-rejected); }
#job-count { display: inline-block; margin: var(--s2) 0; padding: 2px var(--s4); border-radius: 999px; background: var(--soft); font-size: .9rem; font-weight: 600; }
#job-count::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: var(--s2); border-radius: 50%; background: var(--spark); }

.match { list-style: none; padding: 0; }
.match li { margin: 0 0 var(--s3); padding: var(--s3) var(--s4); border: 1px solid var(--edge); border-radius: 22px; background: var(--glass); box-shadow: var(--sh); }
.match p { margin: var(--s1) 0; }
.match .head { display: inline-block; padding: 2px var(--s3); border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--text); background: var(--warn-bg); }
.match .head.ok { color: var(--c-offer); background: var(--cb-offer); }
.note, .warn { margin: var(--s3) 0; padding: var(--s3) var(--s4); border-radius: 18px; }
.note { background: var(--soft); box-shadow: inset 4px 0 0 var(--brand); }
.warn { background: var(--warn-bg); box-shadow: inset 4px 0 0 var(--spark); }
.empty { padding: var(--s6) var(--s4); text-align: center; border: 1.5px dashed var(--line); border-radius: 24px; background: var(--glass); }
.empty p { margin: var(--s3) auto 0; max-width: 22rem; }
.badge { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--on-btn); background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); box-shadow: var(--btn-sh); }
#status { min-height: 1.5rem; padding-bottom: var(--s5); color: var(--muted); font-size: .9rem; }
#status.bad { color: var(--err); font-weight: 700; }

/* the Start screen */
.hero h1 { margin: var(--s5) 0 var(--s3); font-size: clamp(2rem, 10vw, 2.6rem); line-height: 1.08; letter-spacing: -.03em; }
.hero .lead { margin: 0 0 var(--s4); color: var(--muted); font-size: 1.1rem; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin: 0 0 var(--s5); padding: 0; list-style: none; }
.tiles li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; height: 100%; min-height: 3rem; padding: var(--s4); border: 1px solid var(--edge); border-radius: 24px; background: var(--glass); box-shadow: var(--sh); color: var(--text); text-decoration: none; }
.tile b { font-size: 1.05rem; font-weight: 600; }
.tile .d { color: var(--muted); font-size: .875rem; line-height: 1.35; }
@media (prefers-color-scheme: dark) { .hero .btn { color: #18171c; background: #fff; box-shadow: 0 10px 30px -8px rgb(167 139 250 / .6); } } /* dark welcome: a white pill, the loudest thing on the screen */

dialog { max-width: 26rem; width: calc(100% - 2rem); padding: var(--s5); border: 1px solid var(--edge); border-radius: 28px; color: var(--text); background: var(--card); box-shadow: 0 30px 60px -20px rgb(0 0 0 / .6); }
dialog::backdrop { background: rgb(6 4 14 / .72); }
#ask-q { margin: 0 0 var(--s3); font-size: 1.2rem; font-weight: 600; line-height: 1.3; }

/* the CV as it will look on paper */
.paper { padding: var(--s4); border: 1px solid rgb(0 0 0 / .1); border-radius: 18px; background: #fff; color: #000; box-shadow: var(--sh); }
.paper .name { font-size: 1.6rem; font-weight: 700; margin: 0; }
.paper h2 { font-size: 1.05rem; text-transform: uppercase; border-bottom: 2px solid #000; margin: 1.25rem 0 .5rem; }
.paper p { margin: .25rem 0; }
.paper ul { margin: .25rem 0 .5rem; padding-left: 1.25rem; }
.entry { margin: 0 0 .75rem; break-inside: avoid; }
.entry .head { font-weight: 700; }
.only-print { display: none; }
.letter { white-space: pre-wrap; }

@media (max-width: 339px) { .tiles { grid-template-columns: 1fr; } }
@media (max-width: 299px) { /* very big text or a very small screen: the bar goes back to the top in two rows */
  body { padding-bottom: var(--s5); }
  nav { position: static; padding: 0 var(--s4) var(--s4); pointer-events: auto; }
  nav ul { flex-wrap: wrap; box-shadow: none; }
  nav li { flex: 1 1 30%; }
}
@page { size: A4; margin: 16mm; }
@media print {
  body { padding: 0; background: #fff; color: #000; font-size: 11pt; }
  body::before { display: none; }
  header, nav, footer, .skip, #status, .noprint, main h1 { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .paper { border: 0; padding: 0; box-shadow: none; }
  .only-print { display: block; }
  h2 { break-after: avoid; }
}
/* the only things that move are small colour changes, and only if the phone allows motion */
@media (prefers-reduced-motion: no-preference) {
  .btn, .tile, nav a, input, select, textarea { transition: background-color .2s, border-color .2s, box-shadow .2s, transform .15s; }
  .btn:active, .tile:active { transform: scale(.98); }
}
