:root {
  --bg: #f4f1ea;
  --paper: #fffdf8;
  --ink: #1b2422;
  --muted: #5f6b67;
  --line: #ddd6c8;
  --accent: #1d7a5c;
  --accent-ink: #ffffff;
  --accent-soft: #dcefe6;
  --warm: #d9822b;
  --warm-soft: #fbe9d4;
  --bad: #b23a3a;
  --bad-soft: #f6dddd;
  --night: #12302c;
  --shadow: 0 1px 2px rgba(27, 36, 34, .06), 0 6px 20px rgba(27, 36, 34, .06);
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1716;
    --paper: #16211f;
    --ink: #e7eeeb;
    --muted: #9aa9a4;
    --line: #2a3a37;
    --accent: #3fb68b;
    --accent-ink: #0b1513;
    --accent-soft: #19362d;
    --warm: #f2a541;
    --warm-soft: #3a2b16;
    --bad: #ef7d7d;
    --bad-soft: #3b1f1f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.loading { padding: 3rem 1rem; text-align: center; color: var(--muted); }

/* header */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1.2rem;
  padding: .6rem clamp(1rem, 3vw, 2rem); background: var(--night); color: #e9f5ef; }
.brand { display: flex; align-items: center; gap: .55rem; color: inherit; text-decoration: none;
  font-family: var(--serif); font-size: 1.2rem; white-space: nowrap; }
.brand b { color: #3fb68b; font-weight: 700; }
.brand .colon { color: #f2a541; }
nav { display: flex; gap: .2rem; flex: 1; overflow-x: auto; scrollbar-width: none; }
nav a { color: #b9d3ca; text-decoration: none; padding: .4rem .75rem; border-radius: 999px; white-space: nowrap; font-size: .95rem; }
nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
nav a.on { color: var(--night); background: #3fb68b; }
.me { color: #b9d3ca; text-decoration: none; font-size: .9rem; white-space: nowrap; }
@media (max-width: 760px) {
  .top { flex-wrap: wrap; gap: .4rem .8rem; }
  nav { order: 3; flex-basis: 100%; }
}

main { max-width: 1040px; margin: 0 auto; padding: clamp(1.2rem, 3vw, 2.2rem) 16px 4rem; }

/* building blocks */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(1rem, 2.5vw, 1.5rem); margin-bottom: 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
button, .btn { font: inherit; border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  padding: .55rem 1rem; border-radius: 10px; cursor: pointer; text-decoration: none; display: inline-flex;
  align-items: center; gap: .4rem; }
button:hover, .btn:hover { border-color: var(--accent); }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.primary:hover { filter: brightness(1.07); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.ghost:hover { color: var(--ink); border-color: var(--line); }
button.danger:hover { border-color: var(--bad); color: var(--bad); }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: .55rem .7rem; width: 100%; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { min-height: 6rem; resize: vertical; }
label.field { display: block; margin-bottom: .9rem; }
label.field > span { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .95rem; }
.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: .12rem .55rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.badge.warm { background: var(--warm-soft); color: var(--warm); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.plain { background: transparent; border: 1px solid var(--line); color: var(--muted); font-weight: 500; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: .4rem .9rem; cursor: pointer; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip .x { margin-left: .35rem; opacity: .7; }

/* login */
.auth { max-width: 400px; margin: 8vh auto; text-align: center; }
.auth .card { text-align: left; }
.radar { width: 120px; height: 120px; margin: 0 auto 1rem; border-radius: 50%; position: relative; overflow: hidden;
  background: radial-gradient(circle, transparent 30%, rgba(63, 182, 139, .25) 31%, transparent 33%, transparent 62%,
    rgba(63, 182, 139, .25) 63%, transparent 65%), var(--night); }
.radar::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(63, 182, 139, .7), transparent 25%); animation: sweep 3s linear infinite; }
.radar i { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #f2a541; top: 28%; left: 64%; z-index: 1; }
@keyframes sweep { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .radar::after { animation: none; } }

/* overview steps */
.steps { counter-reset: s; display: grid; gap: .6rem; }
.step { display: flex; gap: .9rem; align-items: center; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); text-decoration: none; color: inherit; }
.step:hover { border-color: var(--accent); }
.step .dot { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  border: 2px solid var(--line); color: var(--muted); }
.step.done .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.step.next .dot { border-color: var(--warm); color: var(--warm); }
.step .txt { flex: 1; }
.step .txt b { display: block; }

.progress { display: flex; gap: .8rem; align-items: center; padding: .9rem 1rem; border-radius: 12px; background: var(--accent-soft); }
.progress.failed { background: var(--bad-soft); }
.spinner { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 3px solid var(--accent); border-right-color: transparent;
  animation: sweep 1s linear infinite; }

/* upload */
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.6rem; text-align: center; background: var(--bg);
  transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.doclist { list-style: none; padding: 0; margin: 0; }
.doclist li { display: flex; gap: .7rem; align-items: center; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.doclist li:last-child { border-bottom: 0; }
.doclist .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* profile */
.kv { display: grid; grid-template-columns: 9rem 1fr; gap: .35rem 1rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: .6rem 0 .6rem 1rem; border-left: 2px solid var(--accent-soft); }
.timeline ul { margin: .3rem 0 0; padding-left: 1.1rem; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; } .kv dt { margin-top: .4rem; } }

/* tour */
.tour { max-width: 640px; margin: 0 auto; }
.bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-bottom: 1.4rem; }
.bar > i { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.tour .q { font-size: clamp(1.4rem, 3.4vw, 1.9rem); }
.tour .nav { display: flex; justify-content: space-between; margin-top: 1.6rem; }
.choices { display: grid; gap: .55rem; }
.choice { display: flex; gap: .8rem; align-items: flex-start; text-align: left; padding: .85rem 1rem; border-radius: 12px; width: 100%; }
.choice.on { border-color: var(--accent); background: var(--accent-soft); }
.choice small { display: block; color: var(--muted); }
.loc { display: grid; grid-template-columns: 1fr 1fr 7rem; gap: .5rem; margin-bottom: .9rem; align-items: center;
  padding-bottom: .9rem; border-bottom: 1px dashed var(--line); }
.loc > button { justify-self: end; }
.loc > input { grid-column: 1 / 3; }
.loc > input.wide { grid-column: 1 / -1; }
.loc .geo { grid-column: 1 / -1; margin-top: -.3rem; color: var(--muted); }
.loc .geo.ok { color: var(--accent); }
.loc .geo.bad { color: var(--bad); }
@media (max-width: 520px) { .loc { grid-template-columns: 1fr 1fr auto; } .loc > input { grid-column: 1 / -1; } }

/* jobs */
.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.filters select, .filters input[type=search] { width: auto; }
.job { padding: 0; overflow: hidden; }
.job > summary { list-style: none; cursor: pointer; display: flex; gap: 1rem; align-items: center; padding: 1rem 1.2rem; }
.job > summary::-webkit-details-marker { display: none; }
.score { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  font-size: 1.05rem; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); position: relative; }
.score::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--paper); }
.score span { position: relative; }
.job .head { flex: 1; min-width: 0; }
.job .head h3 { margin: 0 0 .15rem; font-family: var(--sans); font-size: 1.02rem; }
.job .meta { color: var(--muted); font-size: .9rem; }
.job .body { padding: 0 1.2rem 1.2rem; border-top: 1px solid var(--line); }
.job .cols { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin-top: 1rem; }
@media (max-width: 640px) { .job .cols { grid-template-columns: 1fr; } .job > summary { padding: .9rem; gap: .7rem; } }
.job ul { margin: .2rem 0 0; padding-left: 1.1rem; }
.job .desc { white-space: pre-line; max-height: 18rem; overflow: auto; background: var(--bg); border-radius: 10px;
  padding: .8rem 1rem; font-size: .9rem; margin-top: .8rem; }
.job.hidden-job { opacity: .6; }
.nearmiss { margin-top: .8rem; padding: .7rem 1rem; border-radius: 10px; background: var(--warm-soft); }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }

#toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%) translateY(1rem); background: var(--night);
  color: #e9f5ef; padding: .7rem 1.1rem; border-radius: 12px; box-shadow: var(--shadow); transition: transform .25s, opacity .25s;
  z-index: 50; max-width: calc(100vw - 32px); opacity: 0; visibility: hidden; }
#toast.show { transform: translateX(-50%); opacity: 1; visibility: visible; }
#toast.err { background: var(--bad); color: #fff; }

/* CV check */
mark { background: var(--warm-soft); color: inherit; padding: 0 .2em; border-radius: 4px; }
.tip { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.tip:last-child { border-bottom: 0; }
.beforeafter { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: .6rem; }
.beforeafter > div { background: var(--bg); border-radius: 10px; padding: .6rem .8rem; font-size: .92rem; }
.beforeafter > div:last-child { background: var(--accent-soft); }
.beforeafter p { margin: .2rem 0 0; }
@media (max-width: 600px) { .beforeafter { grid-template-columns: 1fr; } }
.cvframe { width: 100%; height: 78vh; min-height: 520px; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin: 1rem 0 .5rem; }
.entry { box-shadow: none; }

/* applications */
.board { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: .8rem; overflow-x: auto; padding-bottom: .5rem; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }
.col { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; min-height: 8rem; }
.col h3 { font-family: var(--sans); font-size: .92rem; margin-bottom: .6rem; }
.appcard { display: flex; flex-direction: column; gap: .1rem; padding: .7rem .8rem; margin-bottom: .55rem; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line); color: inherit; text-decoration: none; }
.appcard:hover { border-color: var(--accent); }
.tabs { display: flex; gap: .3rem; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 1rem 0 1.2rem; scrollbar-width: none; }
.tabs a { padding: .55rem .9rem; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.attach { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .9rem; margin: 0 0 1rem; }
.attach label, .steps-check label { display: flex; gap: .5rem; align-items: flex-start; padding: .25rem 0; }
.attach input, .steps-check input { width: auto; margin-top: .3rem; }
.salbar { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: .6rem; margin: .5rem 0 1rem; }
.salbar > div { background: var(--bg); border-radius: 12px; padding: .8rem; text-align: center; display: flex; flex-direction: column; }
.salbar .target { background: var(--accent); color: var(--accent-ink); }
.salbar b { font-size: 1.25rem; }
.say { font-family: var(--serif); font-size: 1.05rem; background: var(--accent-soft); border-radius: 12px; padding: .9rem 1.1rem; }
.qa { border-bottom: 1px solid var(--line); padding: .6rem 0; }
.qa summary { cursor: pointer; }
.qa p { margin: .4rem 0 0 1rem; }
.opp .gain { text-align: right; display: flex; flex-direction: column; }
.opp .gain b { color: var(--accent); font-size: 1.15rem; }
@media (max-width: 520px) { .salbar { grid-template-columns: 1fr; } .opp .gain { text-align: left; } }

/* job ideas in the walkthrough */
.ideas { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.ideas h4 { font-size: .9rem; margin: .9rem 0 .4rem; color: var(--muted); }
.idealist { display: grid; gap: .45rem; }
.idea { text-align: left; display: block; width: 100%; border-radius: 12px; padding: .6rem .8rem; background: var(--bg); }
.idea small { display: block; color: var(--muted); margin-top: .15rem; }
.idea.on { border-color: var(--accent); background: var(--accent-soft); }
button.small { padding: .3rem .6rem; font-size: .85rem; }

/* LinkedIn texts and statistics */
.copyblock { background: var(--bg); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .7rem; }
.copytext { white-space: pre-line; margin: .4rem 0 0; }
.over { color: var(--bad) !important; font-weight: 600; }
table.stats { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.stats th, table.stats td { text-align: right; padding: .3rem .4rem; border-bottom: 1px solid var(--line); }
table.stats th:first-child, table.stats td:first-child { text-align: left; }

/* Kompass (interest check) */
h2.sect { margin: 1.6rem 0 .6rem; }
.strengths { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .6rem; }
.strengths > div { background: var(--bg); border-radius: 12px; padding: .6rem .8rem; }
.strengths small { display: block; color: var(--muted); margin-top: .15rem; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1rem; }
.fields .card { margin: 0; }
.fields h3 { margin: 0; }
.fit { flex: 0 0 5rem; height: .5rem; border-radius: 999px; background: var(--line); overflow: hidden; }
.fit i { display: block; height: 100%; background: var(--accent); }
