/* CAN Resume Review
   Look: a resume on a desk, marked up by a reviewer.
   Yellow highlighter = found / selected. Red pen = reviewer notes and corrections. */

:root {
  --desk: #EEF1F5;
  --paper: #FFFFFF;
  --ink: #1A1D24;
  --muted: #4F5664;
  --line: #C9CFD8;
  --line-strong: #8D95A3;
  --blue: #2346C8;
  --blue-dark: #182F8C;
  --pen: #C8321E;
  --pen-soft: #FCEDEA;
  --highlight: #FFE14D;
  --ok: #1D7A46;

  --font-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --font-pen: "Caveat", "Segoe Print", cursive;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius: 10px;
  --radius-small: 6px;
  --paper-shadow: 0 1px 0 #D5DAE2, 0 12px 28px -14px rgba(26, 29, 36, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }

body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); font-weight: 750; letter-spacing: -0.02em; max-width: 22ch; }
h2 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.mono { font-family: var(--font-mono); font-size: 0.92em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-small); z-index: 10; }
.skip:focus { top: 12px; color: #fff; }

/* ---------- Header and tabs ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 16px; padding-bottom: 8px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 750; font-size: 1.3rem; letter-spacing: -0.01em; }
.wordmark:hover { color: var(--ink); }
.wordmark-mark { width: 34px; height: 34px; color: var(--ink); flex: none; }
.header-note { color: var(--muted); font-size: 0.95rem; }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; display: flex; align-items: center; min-height: 48px; padding: 0 16px;
  color: var(--ink); text-decoration: none; font-weight: 700; white-space: nowrap;
  border-bottom: 4px solid transparent;
}
.tabs a:hover { color: var(--blue); }
.tabs a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }

/* ---------- Views ---------- */
main { padding-bottom: 64px; }
.js .view { display: none; }
.js .view.is-active { display: block; }
.view > * + *, #upload-flow > * + * { margin-top: 32px; }

.intro { padding-top: 40px; }
.intro > p { margin-top: 12px; color: var(--muted); font-size: 1.125rem; max-width: 62ch; }
.intro h1:focus { outline: none; }

.block > h2 + * { margin-top: 10px; }
.lede { color: var(--muted); max-width: 62ch; }
.aside-note { margin-top: 16px; color: var(--muted); font-size: 0.95rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--radius-small);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--desk); color: var(--ink); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn-small { min-height: 40px; padding: 6px 14px; font-size: 0.95rem; }
.btn-big { min-height: 54px; padding: 12px 28px; font-size: 1.15rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Paper (the memorable thing) ---------- */
.desk { min-width: 0; }
.paper {
  background: var(--paper);
  box-shadow: var(--paper-shadow);
  border-radius: 3px;
  padding: 36px 40px 40px 64px;
  font-size: 0.97rem;
  line-height: 1.45;
}
.paper ul { margin: 4px 0 8px; padding-left: 20px; }
.paper li + li { margin-top: 2px; }
.r-name { font-family: var(--font-body); font-size: 1.7rem; font-weight: 700; letter-spacing: 0; }
.r-contact { color: var(--muted); margin-top: 2px; font-size: 0.93rem; }
.r-head { font-family: var(--font-body); font-size: 0.95rem; font-weight: 700; letter-spacing: 0.04em; border-bottom: 1.5px solid var(--ink); padding-bottom: 2px; margin: 14px 0 6px; }
.r-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; }
.r-when { color: var(--muted); }

/* Annotated example */
.annotated { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.r-block { position: relative; padding: 6px 10px; margin: 0 -10px; border-radius: 4px; transition: background-color 0.2s; }
.r-block.is-lit { background: linear-gradient(transparent 8%, rgba(255, 225, 77, 0.55) 8%, rgba(255, 225, 77, 0.55) 92%, transparent 92%); }
.r-block .r-head { margin-top: 6px; }
.pen-circle {
  position: absolute; left: -50px; top: 4px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 2.5px solid var(--pen); background: var(--paper); color: var(--pen);
  font-family: var(--font-pen); font-weight: 700; font-size: 1.35rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0 0 3px;
}
.pen-circle::after { content: ""; position: absolute; inset: -5px; } /* 46px touch target */
.pen-circle:hover, .pen-circle[aria-pressed="true"] { background: var(--pen); color: #fff; }

.pen-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 16px; }
.pen-notes button {
  width: 100%; text-align: left; display: block; cursor: pointer;
  background: transparent; border: 0; border-left: 3px solid var(--line); padding: 8px 12px 8px 16px;
  font: inherit; color: var(--muted);
}
.pen-notes button:hover { border-left-color: var(--pen); }
.pen-title { display: block; font-family: var(--font-pen); font-size: 1.55rem; line-height: 1.1; color: var(--pen); font-weight: 700; }
.pen-body { display: block; font-size: 0.98rem; }
.inline-note { display: none; margin: 8px 0 4px; border-left: 3px solid var(--pen); padding: 4px 0 4px 12px; background: var(--paper); }
.inline-note .pen-title { font-size: 1.35rem; }
.pen-notes li.is-lit button { border-left-color: var(--pen); background: var(--paper); color: var(--ink); border-radius: 0 var(--radius-small) var(--radius-small) 0; }

/* Templates */
.templates { display: grid; gap: 20px; margin-top: 18px; max-width: 640px; }
/* One template: thumbnail on the left, title, description, and button on the right. */
.template { display: grid; grid-template-columns: 130px minmax(0, 1fr); grid-template-rows: auto 1fr auto; gap: 8px 20px; align-items: start; }
.template .thumb { grid-row: 1 / span 3; aspect-ratio: 8.5 / 11; padding: 14px 14px; }
.template .btn-row { justify-self: start; margin-top: 4px; }
.thumb { aspect-ratio: 8.5 / 7; background: var(--paper); box-shadow: var(--paper-shadow); border-radius: 3px; padding: 18px 20px; display: flex; flex-direction: column; gap: 7px; overflow: hidden; }
.thumb i { display: block; height: 6px; border-radius: 3px; background: var(--line); }
.thumb i.t-name { height: 11px; width: 55%; background: var(--ink); margin-bottom: 4px; }
.thumb i.t-head { height: 5px; width: 30%; background: var(--line-strong); margin-top: 6px; }
.thumb i.t-short { width: 70%; }
.template h3 { margin-top: 2px; }
.template p { color: var(--muted); font-size: 0.97rem; }

.next-step { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.next-step h2 { font-size: 1.3rem; }
.next-step p { color: var(--muted); margin-top: 4px; }

/* ---------- AI prompts ---------- */
.explain, .rules { background: var(--paper); border-radius: var(--radius); padding: 26px 28px; border: 1px solid var(--line); }
.explain > p { margin-top: 10px; max-width: 70ch; }
.bots { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.bots li { border: 2px solid var(--ink); border-radius: var(--radius-small); padding: 12px 16px; }
.bots strong { display: block; font-family: var(--font-display); font-size: 1.25rem; }
.bots span { color: var(--muted); font-size: 0.95rem; }
.facts { margin: 22px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px 24px; }
.facts dt { font-weight: 700; }
.facts dd { margin: 2px 0 0; color: var(--muted); font-size: 0.97rem; }

.rules { background: var(--ink); color: #fff; border-color: var(--ink); }
.rules ol { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 8px; }
.rules strong { color: var(--highlight); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 18px; }
label, .label { font-weight: 700; }
input[type="text"], input[type="email"], textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-small);
  background: var(--paper); color: var(--ink); font: inherit;
}
textarea { resize: vertical; }
input[type="text"]:focus, input[type="email"]:focus, textarea:focus { border-color: var(--blue); }
.hint { color: var(--muted); font-size: 0.93rem; }

.prompts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 18px; margin-top: 22px; }
.prompt { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.prompt-kind { color: var(--blue); font-weight: 700; font-size: 0.93rem; }
.prompt-text { flex: 1; background: var(--desk); border-radius: var(--radius-small); padding: 14px 16px; font-size: 0.98rem; line-height: 1.5; white-space: pre-line; }
.prompt-wide { grid-column: 1 / -1; }
.prompt-note { background: #FFF8D6; border-radius: var(--radius-small); padding: 10px 14px; font-size: 0.95rem; }
.prompt-text mark { background: var(--highlight); color: var(--ink); padding: 0 2px; border-radius: 2px; }
.prompt .btn { align-self: flex-start; }
.btn.is-done { background: var(--ok); border-color: var(--ok); color: #fff; }

/* ---------- Game ---------- */
.jump { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; }
.jump a { font-weight: 700; }
.game { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; scroll-margin-top: 16px; }
.game-head p { margin-top: 8px; color: var(--muted); max-width: 66ch; }
.game-body { margin-top: 22px; }
.game .desk { background: var(--desk); border-radius: var(--radius-small); padding: 20px; }

.spot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.paper-flawed { padding: 28px 30px; }
.line-btn {
  display: block; width: 100%; text-align: left; background: transparent; border: 0;
  font: inherit; color: inherit; padding: 4px 6px; margin: 1px -6px; border-radius: 3px;
  cursor: pointer; min-height: 36px; position: relative;
}
.line-btn:hover { background: #F4F6F9; }
.line-btn.r-name { font-size: 1.45rem; font-weight: 700; }
.line-btn.is-found { background: linear-gradient(transparent 10%, rgba(255, 225, 77, 0.75) 10%, rgba(255, 225, 77, 0.75) 90%, transparent 90%); cursor: default; }
.line-btn.is-found .tag {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid var(--pen); color: var(--pen); background: var(--paper);
  font-family: var(--font-pen); font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; padding-bottom: 2px;
}
.flawed-head { font-weight: 700; font-size: 0.95rem; letter-spacing: 0.04em; border-bottom: 1.5px solid var(--ink); margin: 14px 0 4px; padding-bottom: 2px; }

.score { font-family: var(--font-display); font-size: 2rem; font-weight: 750; letter-spacing: -0.01em; }
.meter { height: 12px; background: var(--desk); border-radius: 6px; overflow: hidden; margin-top: 10px; }
.meter-fill { height: 100%; width: 0; background: var(--blue); border-radius: 6px; transition: width 0.3s ease; }
.spot-status { margin-top: 10px; color: var(--muted); }
.spot-note { border-left: 3px solid var(--pen); background: var(--pen-soft); border-radius: 0 3px 3px 0; padding: 6px 10px 8px 12px; margin: 4px 0 10px; animation: note-in 0.25s ease; }
.spot-note .pen-title { display: block; color: var(--pen); font-size: 1.3rem; line-height: 1.2; }
.spot-note p { font-size: 0.93rem; color: var(--ink); }
@keyframes note-in { from { opacity: 0; transform: translateY(-4px); } }
.spot-win { background: #E3F3E9; border-radius: var(--radius-small); padding: 12px 14px; font-weight: 700; margin: 14px 0; }

/* 15-second test */
.six { margin-top: 22px; }
.six-stage { background: var(--desk); border-radius: var(--radius-small); padding: 24px; min-height: 280px; }
.six-ready { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 232px; }
.six-clock { font-family: var(--font-display); font-size: 4.5rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.six-show { position: relative; max-width: 640px; margin: 0 auto; }
.six-count {
  position: absolute; right: -8px; top: -14px; z-index: 1;
  width: 64px; height: 64px; border-radius: 50%; background: var(--pen); color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 2rem; display: flex; align-items: center; justify-content: center;
}
.paper-mini { padding: 26px 30px; }
.paper-mini .r-head { margin-top: 10px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 700; font-size: 1.1rem; margin-bottom: 6px; padding: 0; }
input[type="radio"], input[type="checkbox"] { width: 20px; height: 20px; flex: none; accent-color: var(--blue); margin: 0; }
.six-result { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.stood-out { margin: 0; padding-left: 20px; display: grid; gap: 8px; }

/* ---------- Checklist ---------- */
.checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.group { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.group h2 { font-size: 1.35rem; margin-bottom: 8px; }
.group-wide { grid-column: 1 / -1; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { position: relative; padding: 10px 0 10px 28px; border-top: 1px solid #E6E9EE; }
.check-list li::before { content: ""; position: absolute; left: 4px; top: 1.05em; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.group-note { color: var(--muted); max-width: 70ch; margin-bottom: 6px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.group-safety { border: 2px solid var(--ink); }
.warning { margin-top: 18px; background: var(--pen-soft); border-radius: var(--radius-small); padding: 16px 20px; }
.warning h3 { color: var(--pen); }
.warning ul { margin: 8px 0; padding-left: 20px; }
.warning p { font-weight: 700; }
.checklist-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Upload ---------- */
.deadline-banner { background: var(--paper); border: 2px solid var(--blue); border-radius: var(--radius-small); padding: 12px 16px; font-size: 1.05rem; }
.demo-banner { background: #FFF8D6; border: 1.5px solid #E2C64A; border-radius: var(--radius-small); padding: 12px 16px; font-weight: 700; }
.upload-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.upload-form, .success { background: var(--paper); border-radius: var(--radius); padding: 28px; box-shadow: var(--paper-shadow); }
.upload-form h2 { margin-bottom: 18px; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-pair .field + .field { margin-top: 0; }
.field-pair + .field { margin-top: 18px; }
.code-input { max-width: 260px; text-transform: uppercase; letter-spacing: 0.06em; }
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 120px; padding: 20px; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--desk);
  font-weight: 400; cursor: pointer;
}
.drop svg { width: 30px; height: 30px; }
.drop u { color: var(--blue); font-weight: 700; }
.drop.is-over { border-color: var(--blue); background: #E7ECFB; }
.drop.has-file { border-style: solid; border-color: var(--ok); background: #E3F3E9; }
#u-file:focus-visible + .hint, .drop:has(+ #u-file:focus-visible) { outline: 3px solid var(--blue); outline-offset: 3px; }
.field-error { color: var(--pen); font-weight: 700; font-size: 0.95rem; }
.field-error:empty { display: none; }
.field.has-error input[type="text"], .field.has-error input[type="email"] { border-color: var(--pen); }
.field.has-error .drop { border-color: var(--pen); }
.form-error { color: var(--pen); font-weight: 700; }
.form-summary { background: var(--pen-soft); border-radius: var(--radius-small); padding: 12px 14px; margin-bottom: 16px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.check-line { display: flex; align-items: flex-start; gap: 12px; font-weight: 400; cursor: pointer; }
.check-line input { margin-top: 3px; }
.captcha-demo { color: var(--muted); font-size: 0.93rem; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-small); padding: 12px 14px; max-width: 320px; }
.upload-form .btn-big { margin-top: 26px; }
.success { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.success:focus { outline: none; }
.success h1 { font-size: 2rem; }
#upload-success { margin-top: 40px; }
.upload-side { display: flex; flex-direction: column; gap: 18px; }
.side-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.side-box h2 { font-size: 1.25rem; margin-bottom: 10px; }
.side-box ol, .side-box ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.side-box .mono { display: block; overflow-wrap: anywhere; margin-top: 4px; }
.before-upload { margin-bottom: 18px; }

/* ---------- Footer, toast ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--paper); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-top: 20px; padding-bottom: 20px; color: var(--muted); font-size: 0.95rem; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--radius-small); font-weight: 700;
  transition: opacity 0.2s, transform 0.2s; max-width: calc(100% - 32px); z-index: 20;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .annotated, .spot, .upload-layout { grid-template-columns: minmax(0, 1fr); }
  .pen-notes { display: none; }
  .spot-side { order: -1; } /* score and buttons above the resume, not 1000px below it */
  .r-block.is-lit .inline-note { display: block; }
  .checklist { grid-template-columns: minmax(0, 1fr); }
  .two-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 16px; }
  .intro { padding-top: 28px; }
  .paper { padding: 22px 18px 24px 52px; font-size: 0.92rem; }
  .paper-flawed, .paper-mini { padding: 20px 18px; }
  .pen-circle { left: -44px; width: 32px; height: 32px; font-size: 1.2rem; }
  .game, .explain, .rules, .upload-form, .success { padding: 20px 18px; }
  .game .desk, .six-stage { padding: 12px; }
  .field-pair { grid-template-columns: minmax(0, 1fr); }
  .field-pair .field + .field { margin-top: 18px; }
  .header-note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Print: the checklist prints cleanly ---------- */
@media print {
  body { background: #fff; }
  .site-header, .site-footer, .tabs, .checklist-actions, .next-step, .toast, .intro > p:first-of-type { display: none !important; }
  .group { break-inside: avoid; border-color: #999; }
}
