/* Job: a typist's desk. Cream paper, black ink, a brass accent, typewriter labels.
   Calm and plain on purpose: the page is three boxes and one button. */
:root {
  --bg: #f3ede1; --paper: #fbf8f1; --fg: #1d1a16; --muted: #5d554a; --faint: #6c6457; --line: #ddd3c2; --edge: #c9bba3;
  --brass: #7d5a1e; --brass-ink: #fbf8f1; --ok: #2e6b3f; --warn: #8a5f00; --bad: #a3262e;
  --serif: "Fraunces", Georgia, serif; --text: "Source Serif 4", Georgia, serif; --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16130f; --paper: #201c17; --fg: #efe7d8; --muted: #b6aa96; --faint: #9c907c; --line: #332c24; --edge: #4d4232;
    --brass: #d2a85c; --brass-ink: #16130f; --ok: #8cc49a; --warn: #e2b85a; --bad: #ec8a83;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16130f; --paper: #201c17; --fg: #efe7d8; --muted: #b6aa96; --faint: #9c907c; --line: #332c24; --edge: #4d4232;
  --brass: #d2a85c; --brass-ink: #16130f; --ok: #8cc49a; --warn: #e2b85a; --bad: #ec8a83;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 18px/1.55 var(--text); min-height: 100svh; display: flex; flex-direction: column;
  padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); }
main, .top, .foot { width: 100%; max-width: 760px; margin-inline: auto; }
main { flex: 1; padding-bottom: 56px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; text-wrap: balance; margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; float: none !important; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.hint { color: var(--faint); font-size: 15px; }
.hint.bad, .status.bad, .err { color: var(--bad); }
.center { text-align: center; }

.top { display: flex; justify-content: space-between; align-items: center; padding-top: max(10px, env(safe-area-inset-top)); }
.brand { font-family: var(--mono); font-size: 20px; font-weight: 500; letter-spacing: .02em; text-decoration: none; color: var(--fg); display: inline-flex; align-items: center; min-height: 44px; }
.brand::after { content: "_"; color: var(--brass); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .brand::after { animation: none; } }
.tools { display: flex; gap: 8px; }
.lang, .mode { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid var(--edge); border-radius: 10px; background: transparent; cursor: pointer; font: 500 14px var(--mono); color: var(--muted); }
.lang:hover, .mode:hover { border-color: var(--brass); }
.mode { color: var(--brass); }
.mode svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.mode .i-sun, .mode.is-dark .i-moon { display: none; }
.mode.is-dark .i-sun { display: inline; }

.hero { padding-block: clamp(28px, 7vw, 56px) 28px; }
.hero h1 { font-size: clamp(38px, 7vw, 60px); line-height: 1.05; letter-spacing: -.01em; }
.intro { margin-top: 16px; color: var(--muted); max-width: 60ch; }

.steps { display: grid; gap: 18px; }
.step { margin: 0; padding: 20px; border: 1px solid var(--edge); border-radius: 14px; background: var(--paper); min-width: 0; }
.step legend { float: left; width: 100%; display: flex; align-items: baseline; gap: 10px; padding: 0; margin-bottom: 12px; font: 600 21px var(--serif); }
.step legend + * { clear: both; }
.num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--brass); color: var(--brass); font: 500 14px var(--mono); flex: none; }
.opt { margin-left: auto; font: 400 13px var(--mono); color: var(--faint); letter-spacing: .04em; }
textarea, select { width: 100%; padding: 12px 14px; border: 1px solid var(--edge); border-radius: 10px; background: var(--bg); color: var(--fg); font-size: 17px; line-height: 1.5; }
textarea { resize: vertical; min-height: 120px; }
textarea#cv-text { margin-top: 12px; }
.step .hint + textarea { margin-top: 10px; }
.drop { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 18px; border: 1.5px dashed var(--edge); border-radius: 12px; }
.drop.over { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 8%, transparent); }
#cv-status { margin-top: 10px; }
.link { min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--brass); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; font-size: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid var(--brass);
  background: var(--brass); color: var(--brass-ink); font: 500 16px var(--mono); letter-spacing: .02em; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.ghost { background: transparent; color: var(--brass); }
.go { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.status { min-height: 1.5em; color: var(--muted); }

.options { display: grid; gap: 16px; }
.opt-row { display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: 12px; align-items: center; }
.opt-label { font: 500 14px var(--mono); letter-spacing: .04em; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 8px; border: 1px solid var(--edge); border-radius: 999px; background: transparent; cursor: pointer; font-size: 15px; }
.swatch::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.swatch[aria-checked="true"] { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
@media (max-width: 560px) { .opt-row { grid-template-columns: 1fr; gap: 8px; } }

.pass { border: 1px solid var(--edge); border-radius: 14px; background: var(--paper); color: var(--fg); padding: 22px; width: min(380px, calc(100vw - 32px)); }
.pass::backdrop { background: rgba(0, 0, 0, .45); }
.pass form { display: grid; gap: 10px; }
.pass label { font: 600 20px var(--serif); }
.pass input { min-height: 46px; padding: 0 12px; border: 1px solid var(--edge); border-radius: 10px; background: var(--bg); }

/* The result: tabs, downloads, a sheet of paper, the check */
.result { margin-top: 44px; scroll-margin-top: 12px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 10px 0 16px; }
.tabs [role=tab] { min-height: 44px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; font: 500 15px var(--mono); color: var(--muted); margin-bottom: -1px; }
.tabs [aria-selected=true] { color: var(--fg); border-bottom-color: var(--brass); }
.downloads { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.paper-wrap { overflow-x: auto; }
.paper { --c: #1f4e99; background: #fff; color: #1a1a1f; width: 100%; max-width: 680px; margin-inline: auto; padding: clamp(20px, 6vw, 52px); border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 12px 32px rgba(40, 30, 10, .12); font: 14px/1.42 Helvetica, Arial, sans-serif; }
.paper p { margin: 0 0 4px; }
.pv-name { font-size: 26px; font-weight: 700; margin-bottom: 2px !important; }
.pv-sub { font-size: 15px; color: var(--c); }
.pv-contact { font-size: 12.5px; color: #55555c; white-space: pre-wrap; }
.paper h3 { font: 700 14px Helvetica, Arial, sans-serif; text-transform: uppercase; color: var(--c); border-bottom: 1.2px solid var(--c); padding-bottom: 3px; margin: 18px 0 8px; }
.pv-item + .pv-item { margin-top: 10px; }
.pv-pair { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pv-pair span { color: #55555c; }
.pv-loc { color: #55555c; font-size: 13px; }
.paper ul { margin: 2px 0 0; padding-left: 16px; }
.paper li { margin-bottom: 2px; }
.paper li::marker { color: var(--c); }
.paper hr { border: 0; border-top: 1.2px solid var(--c); margin: 12px 0 18px; }
.letter p { margin-bottom: 10px; }

.ats { margin-top: 36px; padding: 22px; border: 1px solid var(--edge); border-radius: 14px; background: var(--paper); }
.ats h2 { font-size: 26px; }
.ats h3 { font: 500 14px var(--mono); letter-spacing: .04em; color: var(--muted); margin: 18px 0 8px; }
.checks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: flex; gap: 10px; align-items: baseline; }
.mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font: 600 13px var(--mono); flex: none; }
.ok .mark { color: var(--ok); border: 1px solid var(--ok); }
.warn .mark { color: var(--warn); border: 1px solid var(--warn); }
.bad .mark { color: var(--bad); border: 1px solid var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--ok); color: var(--ok); font: 400 14px var(--mono); }
.miss .chip { border-color: var(--warn); color: var(--warn); }
.notes ul { margin: 0; padding-left: 20px; }

.foot { padding-block: 20px max(20px, env(safe-area-inset-bottom)); color: var(--faint); font: 400 13px var(--mono); text-align: center; }
