/* Atleable's public careers pages (/careers). Self-contained: no app styles.
   Flat and quiet: hairlines instead of boxes, one accent colour, the brand's
   navy for headings. On a job page the description and the apply form sit
   side by side, the form staying in view while the text scrolls. */
:root {
  --bg: #f6f4f0; --panel: #fcfcfd; --ink: #0e1a2c; --muted: #556072; --faint: #7a8496; --line: #e3ded5; --line-strong: #cfc8bc;
  --navy: #1f3660; --blue: #175495; --ring: rgba(23, 84, 149, 0.28); --ok: #1b7a50; --bad: #b42318; --bad-soft: #fdf0ee;
  --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1318; --panel: #171c23; --ink: #e7edf6; --muted: #a3b0c4; --faint: #7f8ba0; --line: rgba(172, 199, 229, 0.14);
    --line-strong: rgba(172, 199, 229, 0.26); --navy: #acc7e5; --blue: #86a6db; --ring: rgba(134, 166, 219, 0.35); --ok: #5cc28f;
    --bad: #f2867c; --bad-soft: rgba(242, 134, 124, 0.1); }
}
* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 "Segoe UI", "Segoe UI Variable Text", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a, button, label, select { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.cw { max-width: 50rem; margin: 0 auto;
  padding: 0 max(1rem, env(safe-area-inset-right, 0px)) 0 max(1rem, env(safe-area-inset-left, 0px)); }
.cw-wide { max-width: 75rem; }
.cw-top { border-bottom: 1px solid var(--line); margin-bottom: 2.5rem; }
.cw-top .cw { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; min-height: 4.25rem; }
.cw-logo img { display: block; width: 12rem; max-width: 55vw; height: auto; }
@media (prefers-color-scheme: dark) { .cw-logo { background: #f6f4f0; border-radius: 6px; padding: 0.375rem 0.625rem; } }
.cw-site { color: var(--muted); font-size: 0.875rem; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .cw-site:hover { color: var(--ink); } }

h1 { margin: 0 0 0.5rem; font-size: 2.25rem; line-height: 1.15; font-weight: 700; color: var(--navy); letter-spacing: -0.01em; text-wrap: balance; }
h2 { margin: 0 0 1.25rem; font-size: 1.25rem; line-height: 1.3; font-weight: 600; color: var(--navy); }
.cw-lead { color: var(--muted); margin: 0 0 2rem; font-size: 1.0625rem; }
.cw-empty { padding: 2rem 0; border-top: 1px solid var(--line); color: var(--muted); }

/* Facts ("Lisbon, Portugal · Hybrid · Full-time") as one quiet line. */
.cw-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; color: var(--muted); font-size: 0.9375rem; }
.cw-facts li + li::before { content: "·"; margin: 0 0.5rem; color: var(--faint); }

/* The list of jobs: rows divided by hairlines. */
.cw-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cw-list li { border-bottom: 1px solid var(--line); }
.cw-job { display: flex; align-items: center; gap: 1rem; padding: 1.125rem 0.25rem; color: var(--ink); text-decoration: none; }
.cw-job-main { display: grid; gap: 0.25rem; flex: 1; min-width: 0; }
.cw-job strong { font-size: 1.125rem; font-weight: 600; overflow-wrap: anywhere; }
.cw-go { flex: none; font-size: 0.875rem; font-weight: 600; color: var(--blue); }
@media (hover: hover) and (pointer: fine) {
  .cw-job:hover strong { color: var(--blue); }
  .cw-job:hover .cw-go { text-decoration: underline; }
}

/* A job: the text on the left, the form on the right. */
.cw-job-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, 26rem); grid-template-rows: auto 1fr; column-gap: 3.5rem; align-items: start; }
.cw-intro { grid-column: 1; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 1.75rem; }
.cw-back { display: inline-block; margin-bottom: 0.75rem; color: var(--muted); text-decoration: none; font-size: 0.875rem; }
.cw-back::before { content: "←"; margin-right: 0.375rem; }
@media (hover: hover) and (pointer: fine) { .cw-back:hover { color: var(--ink); } }
.cw-jump { display: none; }
.cw-desc { grid-column: 1; max-width: 42rem; overflow-wrap: anywhere; }
.cw-desc > :first-child { margin-top: 0; }
.cw-desc h1, .cw-desc h2, .cw-desc h3, .cw-desc h4 { font-size: 1.125rem; line-height: 1.35; margin: 1.75rem 0 0.5rem; color: var(--ink); font-weight: 600; }
.cw-desc p, .cw-desc ul, .cw-desc ol { margin: 0 0 1rem; }
.cw-desc ul, .cw-desc ol { padding-left: 1.25rem; }
.cw-desc li { margin: 0.25rem 0; }
.cw-desc li::marker { color: var(--faint); }
.cw-side { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 1.5rem;
  max-height: calc(100dvh - 3rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }

/* The form. */
.cw-apply { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: 1.125rem; }
.cw-apply h2 { margin: 0; }
.cw-field { display: grid; gap: 0.375rem; }
.cw-field > label { font-weight: 600; font-size: 0.9375rem; }
.req { color: var(--bad); }
.cw-opt { color: var(--faint); font-weight: 400; font-size: 0.875rem; }
.cw-apply input:not([type=checkbox]):not([type=file]), .cw-apply textarea, .cw-cc {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 0.625rem 0.75rem; width: 100%; min-height: 2.875rem; transition: border-color 150ms ease, box-shadow 150ms ease; }
.cw-apply textarea { resize: vertical; min-height: 7.5rem; line-height: 1.5; }
.cw-apply input:focus, .cw-apply textarea:focus, .cw-cc:focus-within { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--ring); }
.cw-field.bad input:not([type=checkbox]), .cw-field.bad textarea, .cw-field.bad .cw-cc, .cw-field.bad .cw-file { border-color: var(--bad); }
.cw-hint { margin: 0; color: var(--muted); font-size: 0.8125rem; }
.cw-err { margin: 0; color: var(--bad); font-size: 0.875rem; font-weight: 500; }
.cw-err::before { content: "! "; font-weight: 700; }

/* Phone: the country code beside the number. The select covers the code
   it shows, so a tap opens the system list of countries. */
.cw-phone { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem; }
.cw-cc { position: relative; display: flex; align-items: center; gap: 0.375rem; width: auto; padding-right: 1.75rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cw-cc::after { content: ""; position: absolute; right: 0.75rem; top: 50%; width: 0.4rem; height: 0.4rem; margin-top: -0.3rem;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); }
.cw-cc-shown .iso { color: var(--muted); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; }
.cw-cc select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.cw-phone input { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

/* CV: a real file input under a plain button and the chosen file's name. */
.cw-file { position: relative; display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--bg); min-height: 2.875rem; }
.cw-file input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.cw-file-btn { flex: none; padding: 0.3125rem 0.75rem; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); font-size: 0.875rem; font-weight: 600; }
.cw-file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 0.9375rem; }
.cw-file.has-file .cw-file-name { color: var(--ink); }
.cw-file:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--ring); }
@media (hover: hover) and (pointer: fine) { .cw-file:hover { border-color: var(--blue); } }

.cw-field > .cw-check { font-weight: 400; }
.cw-check { display: flex; gap: 0.625rem; align-items: flex-start; font-size: 0.875rem; color: var(--muted); cursor: pointer; }
.cw-check input { width: 1.125rem; height: 1.125rem; margin: 0.15rem 0 0; flex: none; accent-color: var(--blue); }
.cw-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.cw-summary { padding: 0.75rem 0.875rem; border-radius: 8px; background: var(--bad-soft); border-left: 3px solid var(--bad); font-size: 0.875rem; }
.cw-summary:focus { outline: none; }
.cw-summary p { margin: 0 0 0.25rem; font-weight: 600; color: var(--bad); }
.cw-summary ul { margin: 0; padding-left: 1.125rem; }
.cw-summary a { color: var(--ink); }

.cw-apply button { width: 100%; font: inherit; font-weight: 600; color: #fff; background: var(--navy); border: 0; border-radius: 8px;
  padding: 0.8125rem 1.25rem; min-height: 3rem; cursor: pointer; -webkit-user-select: none; user-select: none; transition: background-color 150ms ease, transform 100ms ease-out; }
@media (prefers-color-scheme: dark) { .cw-apply button { background: #2c5a95; } }
@media (hover: hover) and (pointer: fine) { .cw-apply button:hover:not(:disabled) { background: var(--blue); } }
.cw-apply button:active:not(:disabled) { transform: scale(0.98); }
.cw-apply button:disabled { opacity: 0.55; cursor: default; }
.cw-msg { margin: 0; font-size: 0.9375rem; }
.cw-msg:empty { display: none; }
.cw-msg.ok { color: var(--ok); font-weight: 600; }
.cw-msg.bad { color: var(--bad); }
.cw-apply.sent .cw-field, .cw-apply.sent button, .cw-apply.sent .cw-summary { display: none; }
.cw-apply [hidden] { display: none !important; }

.cw-foot { margin: 4rem 0 0; padding: 1.5rem 0 calc(2rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); color: var(--faint); font-size: 0.8125rem; }
.cw-foot a { color: inherit; }

/* Tablets and phones: one column, the form after the text, a link to it at the top. */
@media (max-width: 960px) {
  .cw-job-page { grid-template-columns: minmax(0, 1fr); }
  .cw-side { grid-column: 1; grid-row: auto; position: static; max-height: none; overflow: visible; margin-top: 1.5rem; scroll-margin-top: 1rem; }
  .cw-jump { display: inline-flex; align-items: center; margin-top: 1.25rem; padding: 0.625rem 1.25rem; min-height: 2.75rem; border-radius: 8px;
    background: var(--navy); color: #fff; font-weight: 600; text-decoration: none; }
  @media (prefers-color-scheme: dark) { .cw-jump { background: #2c5a95; } }
}
@media (max-width: 560px) {
  h1 { font-size: 1.75rem; }
  .cw-top { margin-bottom: 1.75rem; }
  .cw-apply { padding: 1.25rem 1rem; }
  .cw-go { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
