/* Digital Job Club — phone-first, no external assets */
:root {
  --ink: #15231b;
  --muted: #56655c;
  --bg: #f6f4ee;
  --card: #ffffff;
  --line: #e2ddd0;
  --brand: #5b2a86;
  --brand-d: #43196a;
  --brand-soft: #efe6f7;
  --ok: #1f7a4a;
  --ok-soft: #e4f1e9;
  --sky: #1a8fc9;
  --sky-soft: #e3f2fa;
  --sun: #f4c430;
  --sun-soft: #fdf4d4;
  --red: #b3261e;
  --red-soft: #fbe9e7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(21, 35, 27, .06), 0 4px 14px rgba(21, 35, 27, .05);
  --tap: 48px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; margin-top: 1.2em; }
p { margin: 0 0 .8em; }
a { color: var(--brand); }
code { font: .95em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

/* ---------- Header ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.topbar-inner { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brand-mark { width: 36px; height: 36px; flex: none; border-radius: 9px; }
.wordmark { font-weight: 800; letter-spacing: -.02em; }
.wordmark span { color: var(--sun); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 1.05rem; }
.brand-text small { opacity: .85; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang { display: flex; background: var(--brand-d); border-radius: 999px; padding: 3px; flex: none; }
.lang button { border: 0; background: transparent; color: #fff; font: 700 .85rem/1 inherit; padding: 9px 13px; border-radius: 999px; cursor: pointer; min-height: 36px; }
.lang button[aria-pressed="true"] { background: var(--sun); color: var(--ink); }

.steps-nav { max-width: 1100px; margin: 0 auto; display: flex; gap: 4px; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; }
.steps-nav::-webkit-scrollbar { display: none; }
.steps-nav a { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 5px; color: #fff; text-decoration: none; padding: 8px 8px; border-radius: 10px; font-weight: 600; font-size: .86rem; opacity: .85; min-height: 40px; white-space: nowrap; }
@media (max-width: 380px) { .steps-nav { padding: 0 6px 8px; gap: 2px; } .steps-nav a { padding: 8px 6px; } }
@media (min-width: 480px) { .steps-nav a { padding: 8px 12px; font-size: .92rem; } }
.steps-nav a b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.2); font-size: .78rem; }
.steps-nav a.done b { background: var(--sun); color: var(--ink); }
.steps-nav a.active { background: #fff; color: var(--brand-d); opacity: 1; }
.steps-nav a.active b { background: var(--brand); color: #fff; }

/* ---------- Layout ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 40px; outline: none; }
.view-head { margin: 4px 0 18px; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--brand); margin-bottom: .3em; }
.lead { font-size: 1.07rem; color: var(--muted); max-width: 60ch; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 16px; box-shadow: var(--shadow); }
fieldset.card { min-width: 0; }
fieldset.card > legend { font-weight: 700; font-size: 1.1rem; padding: 0 6px; margin-left: -6px; }
.grid-2 { display: grid; gap: 16px; }
.grid-2 > .card { margin: 0; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 10px 18px; border-radius: 12px; border: 2px solid var(--brand); background: #fff; color: var(--brand-d); font: 700 1rem/1.2 inherit; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--brand-soft); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-d); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--brand); padding-left: 6px; padding-right: 6px; }
.btn-danger { border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { min-height: 40px; font-size: .92rem; }
.btn-lg { min-height: 54px; font-size: 1.08rem; padding: 12px 24px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.btn-row .btn { flex: 1 1 160px; }

/* ---------- Home ---------- */
.hero { display: grid; gap: 12px; align-items: center; margin-bottom: 18px; }
.hero-art { width: 100%; max-width: 420px; justify-self: center; }
.step-cards { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; }
.step-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; box-shadow: var(--shadow); min-height: 84px; }
.step-card:hover { border-color: var(--brand); }
.step-card .num { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-d); font-weight: 800; font-size: 1.2rem; }
.step-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.step-body strong { font-size: 1.06rem; }
.step-body span { color: var(--muted); font-size: .95rem; }
.pill { flex: none; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #eee9dd; color: var(--muted); }
.pill.done { background: var(--brand); color: #fff; }
.privacy { font-size: .92rem; color: var(--muted); padding-left: 28px; position: relative; }
.privacy::before { content: "🔒"; position: absolute; left: 0; }

.banner { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 2px; }
.banner-ok { background: var(--sun-soft); border: 2px solid var(--sun); }

.ticks { list-style: none; padding: 0; margin: 0 0 .8em; }
.ticks li { position: relative; padding: 4px 0 4px 30px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 14px; height: 8px; border-left: 3px solid var(--brand); border-bottom: 3px solid var(--brand); transform: rotate(-45deg); }

.rules { margin: 0; padding-left: 0; list-style: none; counter-reset: r; }
.rules li { counter-increment: r; position: relative; padding: 6px 0 6px 40px; }
.rules li::before { content: counter(r); position: absolute; left: 0; top: 5px; width: 28px; height: 28px; border-radius: 50%; background: var(--sun-soft); color: var(--ink); font-weight: 800; font-size: .9rem; display: grid; place-items: center; border: 2px solid var(--sun); }

details.learn > summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 32px; }
details.learn > summary::-webkit-details-marker { display: none; }
details.learn > summary::after { content: "+"; font-size: 1.5rem; color: var(--brand); line-height: 1; }
details.learn[open] > summary::after { content: "–"; }
details.learn[open] > summary { margin-bottom: 10px; }

/* ---------- Forms ---------- */
.field { margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
fieldset.field { margin-bottom: 16px; }
fieldset.field > legend { font-weight: 600; padding: 0; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; width: 100%; }
.label-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.label-row label, .field.inline label { font-weight: 600; }
input[type=text], input[type=tel], input[type=email], input[type=date], select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px; font: inherit; color: inherit;
  background: #fff; border: 2px solid #cfc8b8; border-radius: 10px;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { border-color: var(--sky); outline: none; box-shadow: 0 0 0 3px var(--sky-soft); }
.row-2 { display: grid; gap: 0 14px; }
.field.inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.field.inline select, .field.inline input { width: auto; min-width: 140px; flex: 1; }
.hint-static { color: var(--muted); font-size: .95rem; }

.help-btn { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--sky); background: #fff; color: var(--sky); font: 800 .95rem/1 inherit; cursor: pointer; padding: 0; }
.help-btn[aria-expanded="true"] { background: var(--sky); color: #fff; }
.hint { background: var(--sky-soft); border-left: 4px solid var(--sky); padding: 8px 12px; border-radius: 0 8px 8px 0; font-size: .95rem; margin: 0 0 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 2px solid #cfc8b8; background: #fff; font-size: .95rem; font-weight: 600; }
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip input:checked + span::before { content: "✓ "; white-space: pre; }
.chip input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }

.opt { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 8px 12px; border: 2px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; background: #fff; }
.opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.opt input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; margin: 0; }
.opt-box { align-items: flex-start; }
.opt-box input { margin-top: 2px; }

.err { color: var(--red); font-weight: 600; font-size: .93rem; margin: 6px 0 0; }
.err:empty { display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); background: #fffafa; }
.field.invalid .opt { border-color: #e7b4b0; }

.msg { border-radius: 10px; padding: 12px 14px; margin: 12px 0; font-weight: 500; }
.msg-warn { background: var(--sun-soft); border: 1px solid var(--sun); }
.msg-err { background: var(--red-soft); border: 1px solid #f0b8b3; color: #7d1a14; font-weight: 600; }
.msg-tip { background: var(--sky-soft); border: 1px solid #b6dcf0; }
.msg-tip::before { content: "💡 "; }

.form-sec { margin-top: 1.6em; padding-top: 1em; border-top: 1px solid var(--line); color: var(--brand-d); }
.appform h2 + .hint-static + .msg + .form-sec, .appform .form-sec:first-of-type { border-top: 0; padding-top: 0; margin-top: .8em; }

/* ---------- CV builder ---------- */
.builder { display: grid; gap: 16px; }
.preview { background: #ebe6d9; border-radius: var(--radius); padding: 16px; align-self: start; }
.preview-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.preview-bar h2 { margin: 0; }
.saved { font-size: .82rem; color: var(--brand); font-weight: 600; opacity: 0; transition: opacity .3s; }
.saved.show { opacity: 1; }
.preview .field.inline { margin: 10px 0; }
.jump-preview { position: fixed; right: 16px; bottom: 16px; z-index: 15; background: var(--ink); color: #fff; text-decoration: none; font-weight: 700; padding: 12px 18px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }

.paper { background: #fff; border-radius: 6px; padding: 24px 22px; box-shadow: 0 2px 10px rgba(0,0,0,.1); font-size: .92rem; line-height: 1.45; color: #1b1b1b; min-height: 320px; }
.cv-name { font-size: 1.55rem; font-weight: 800; margin: 0; color: #2a1240; letter-spacing: -.01em; }
.cv-name.empty { color: #b9b3a6; }
.cv-contact { color: #555; margin: 4px 0 12px; font-size: .88rem; }
.cv-contact span + span::before { content: " · "; color: #aaa; }
.cv-h { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); border-bottom: 2px solid var(--brand); padding-bottom: 3px; margin: 16px 0 8px; font-weight: 800; }
.cv-item strong { display: block; }
.cv-item .cv-sub { color: #555; }
.cv-list { margin: 0; padding-left: 18px; }
.cv-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-tags span { background: #f3ecfa; border-radius: 4px; padding: 2px 8px; }
.cv-placeholder { color: #a8a294; font-style: italic; }

/* ---------- Email ---------- */
.parts li code, .parts li em { background: var(--sun-soft); padding: 1px 6px; border-radius: 4px; font-style: normal; }
.compare { display: grid; gap: 10px; margin-bottom: 12px; }
.compare > div { border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.compare .bad { background: var(--red-soft); }
.compare .good { background: var(--ok-soft); }
.compare .tag { font-weight: 800; font-size: .85rem; }
.compare .bad .tag { color: var(--red); }
.compare .bad .tag::before { content: "✗ "; }
.compare .good .tag { color: var(--ok); }
.compare .good .tag::before { content: "✓ "; }
.compare code { word-break: break-all; }

.task { background: var(--sun-soft); border: 2px dashed var(--sun); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.task h2 { margin-bottom: .3em; }
.task-address code { background: #fff; padding: 6px 10px; border-radius: 6px; display: inline-block; font-size: 1rem; user-select: all; word-break: break-all; }

.mail { padding: 0; overflow: hidden; }
.mail-row { display: flex; align-items: center; border-bottom: 1px solid var(--line); padding: 0 14px; }
.mail-row label { flex: none; width: 92px; color: var(--muted); font-size: .92rem; font-weight: 600; }
.mail-row input { border: 0 !important; box-shadow: none !important; padding-left: 0; border-radius: 0; background: transparent; }
.mail textarea { border: 0; border-radius: 0; min-height: 240px; padding: 14px; }
.mail textarea:focus { box-shadow: inset 0 0 0 3px var(--sky-soft); }
.mail-foot { border-top: 1px solid var(--line); padding: 10px 14px; background: #faf8f3; }
.attach { position: relative; display: inline-flex; cursor: pointer; }
.attach input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.attach > span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 2px dashed #b9b2a2; font-weight: 600; }
.attach .attach-on { display: none; border-style: solid; border-color: var(--brand); background: var(--brand-soft); color: var(--brand-d); }
.attach input:checked ~ .attach-off { display: none; }
.attach input:checked ~ .attach-on { display: inline-flex; }
.attach input:focus-visible ~ span { outline: 3px solid var(--sky); outline-offset: 2px; }

.example { background: #fbfaf6; }
.ex-meta { color: var(--muted); font-size: .93rem; margin-bottom: 4px; }
.ex-body { white-space: pre-wrap; font: inherit; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin: 10px 0; }

.feedback .score { margin-bottom: 10px; }
.bar { height: 10px; background: #eee9dd; border-radius: 999px; overflow: hidden; margin-top: 6px; }
.bar span { display: block; height: 100%; background: var(--brand); width: 0; transition: width .4s; border-radius: 999px; }
.checks { list-style: none; padding: 0; margin: 0 0 14px; }
.checks li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.checks .ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: #fff; }
.checks .ok .ic { background: var(--ok); }
.checks .no .ic { background: var(--red); }

.success { text-align: center; border: 2px solid var(--brand); }
.success .ticks { text-align: left; max-width: 520px; margin: 0 auto 1em; }
.big-tick { width: 64px; height: 64px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 2rem; display: grid; place-items: center; margin: 4px auto 12px; }
.refbox { display: inline-flex; flex-direction: column; gap: 2px; background: var(--sun-soft); border: 2px solid var(--sun); border-radius: 12px; padding: 12px 20px; margin: 6px 0 8px; }
.refbox strong { font: 800 1.4rem ui-monospace, Menlo, Consolas, monospace; letter-spacing: .05em; }
.refbox small { color: var(--muted); max-width: 32ch; }

/* ---------- Job ad ---------- */
.ad { border-top: 6px solid var(--sky); }
.ad-badge { display: inline-block; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; background: var(--sky-soft); color: #0e5f88; padding: 4px 10px; border-radius: 999px; }
.ad-head { display: flex; gap: 14px; align-items: center; margin: 6px 0 12px; }
.ad-logo { flex: none; width: 56px; height: 56px; border-radius: 14px; background: var(--brand); color: var(--sun); font-weight: 900; font-size: 1.3rem; display: grid; place-items: center; }
.ad-company { margin: 0; color: var(--muted); font-weight: 600; }
.ad-role { margin: 0; font-size: 1.35rem; }
.ad-meta { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.ad-meta li { background: #f2efe6; border-radius: 8px; padding: 6px 10px; font-size: .93rem; font-weight: 600; }
.ad-meta .deadline { background: var(--red-soft); color: #7d1a14; }
.ad-fake { font-size: .85rem; color: var(--muted); font-style: italic; margin-top: 12px; }

/* ---------- Facilitator ---------- */
.assume { border-left: 6px solid var(--sun); }
.table-wrap { overflow-x: auto; }
.stats { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 340px; }
.stats th, .stats td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.stats thead th { font-size: .85rem; color: var(--muted); }
.stats tbody th { font-weight: 600; }
.obs-row { margin-bottom: 14px; }
.obs-row > strong { display: block; margin-bottom: 6px; }
.obs-row .chips { margin-bottom: 0; }

/* ---------- Footer ---------- */
.foot { max-width: 1100px; margin: 0 auto; padding: 20px 16px 90px; color: var(--muted); font-size: .88rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.foot p { margin: 0; max-width: 60ch; }

/* ---------- Wider screens ---------- */
@media (min-width: 640px) {
  .row-2 { grid-template-columns: 1fr 1fr; }
  .compare { grid-template-columns: 1fr 1fr; }
  .step-cards { grid-template-columns: repeat(3, 1fr); }
  .step-card { flex-direction: column; align-items: flex-start; }
  .step-card .pill { margin-top: auto; }
}
@media (min-width: 820px) {
  .hero { grid-template-columns: 1.2fr 1fr; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .builder { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .preview { position: sticky; top: 130px; max-height: calc(100vh - 146px); overflow-y: auto; }
  .jump-preview { display: none; }
}

/* ---------- Print: only the CV ---------- */
@media print {
  @page { margin: 16mm; }
  body { background: #fff; }
  body * { visibility: hidden; }
  #cvPaper, #cvPaper * { visibility: visible; }
  #cvPaper { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; padding: 0; font-size: 11pt; }
  .topbar, .jump-preview, .foot { display: none; }
  .preview { position: static !important; max-height: none !important; overflow: visible !important; }
}
