/* FlipCV: WSG Energy Services resume converter
 *
 * Style: "framed sheet" (taste-skill app style, seed 1630086051) with WSG's brand kept:
 *   - one pale frame tinted toward WSG navy holds the sidebar and the 48px top bar, no rule between them;
 *   - the work sits on a white sheet inset 8px from the window's right and bottom, 1px edge, 16px corners, no shadow;
 *   - WSG navy (#001389, from the logo) is the one primary action; WSG cyan (#019DD8) is the one data hue.
 * Every text pair below was checked at 4.5:1 or better; borders sit at 1.1-1.3:1 against white.
 *
 * Grid arithmetic (1440 wide): sidebar 232 + sheet (1440 - 232 - 8 inset) = 1200; sheet padding 32 each side
 * leaves a 1136px content column. The review screen splits it 1fr + 360 rail with a 24px gutter (752 + 24 + 360).
 */

:root {
  --frame: #f1f3f8;
  --surface: #ffffff;
  --raised: #f6f7fa;
  --active: #e2e6ef;
  --border: #e3e7ee;
  --rule: #edf0f4;
  --control: #c9cfda;

  --text: #0b1530;
  --muted: #525b6e;
  --faint: #5f6779;

  --primary: #001389;          /* WSG navy */
  --primary-hover: #000c5e;
  --data: #019dd8;             /* WSG cyan: data marks and focus, 3.1:1 on white */
  --data-ink: #0072a3;         /* cyan family for text, 5.3:1 */
  --data-pale: #e2f4fb;

  --positive: #1f7a4c;  --pill-positive-bg: #dcf6e6;  --pill-positive-ink: #0f3d24;
  --negative: #b42318;  --pill-negative-bg: #fdecea;  --pill-negative-ink: #7a1a12;
  --warning-bg: #fff6e5; --warning-edge: #f7d9a0; --warning-ink: #8a3b0a;

  --radius-sheet: 16px;
  --radius-panel: 12px;
  --radius-control: 8px;

  --gap: 24px;
  --sheet-pad: 32px;
  --control-h: 36px;
  --control-h-sm: 32px;

  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --fs-title: 22px;
  --fs-kpi: 28px;
  --fs-section: 16px;
  --fs-body: 14px;
  --fs-small: 12px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --z-sticky: 10;
  --z-nav: 40;
  --z-dialog: 50;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 var(--fs-body)/20px var(--font);
  color: var(--text);
  background: var(--frame);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--data); outline-offset: 2px; border-radius: 4px; }
.num, table, .kpi-value { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }

.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon.lg { width: 20px; height: 20px; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--primary); color: #fff; padding: 8px 14px; border-radius: var(--radius-control); text-decoration: none;
}
.skip:focus { top: 8px; }

/* ---------- Shell: tinted L-frame + white sheet ---------- */
.app {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  grid-template-rows: 48px minmax(0, 1fr);
  min-height: 100vh;
}
.side {
  grid-row: 1 / 3;
  display: flex; flex-direction: column;
  padding: 20px 12px 16px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: block; padding: 2px 10px 22px; text-decoration: none; color: var(--text); }
.brand img { display: block; width: 156px; height: auto; }
.brand-app { display: block; margin-top: 12px; font-size: 16px; line-height: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav-btn {
  display: flex; align-items: center; gap: 10px;
  min-height: 34px; padding: 0 10px; border-radius: var(--radius-control);
  color: var(--muted); text-decoration: none; font-weight: 500;
  border: 0; background: none; width: 100%; text-align: left;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.nav a:hover, .nav-btn:hover { background: #e9ecf3; color: var(--text); }
.nav a[aria-current="page"] { background: var(--active); color: var(--text); }
.nav a[aria-current="page"] .icon { color: var(--primary); }
.nav-group { margin: 22px 10px 6px; font-size: var(--fs-small); color: var(--faint); }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 16px; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 10px; }
.me b { display: block; font-weight: 500; }
.me .me-role { display: block; font-size: var(--fs-small); color: var(--muted); line-height: 16px; }

.top {
  grid-column: 2; display: flex; align-items: center; gap: 12px;
  padding: 0 8px 0 0;
}
.menu-btn, .top-mark { display: none; }
.search {
  position: relative; display: flex; align-items: center;
  width: min(480px, 100%); margin: 0 auto;
}
.search .icon { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 32px; padding: 0 40px 0 34px;
  border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface);
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--data); box-shadow: 0 0 0 3px var(--data-pale); } /* taste-skill-ignore: focus ring, not a resting shadow */
.search kbd {
  position: absolute; right: 8px; font: 500 12px/18px var(--font); color: var(--muted);
  border: 1px solid var(--border); border-radius: 4px; padding: 0 6px; background: var(--raised);
}

.sheet {
  grid-column: 2; grid-row: 2;
  margin: 0 8px 8px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sheet);
  padding: 28px var(--sheet-pad) 48px;
  min-width: 0;
}
.sheet:focus { outline: none; }

/* ---------- Title row ---------- */
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.title-row h1, .title-row h2[data-title] { margin: 0; font-size: var(--fs-title); line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.subline { margin: 4px 0 0; color: var(--muted); max-width: 72ch; }
.subline b { color: var(--text); font-weight: 500; }
.title-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
h2 { font-size: var(--fs-section); line-height: 24px; font-weight: 600; margin: 0; }
h3 { font-size: var(--fs-body); line-height: 20px; font-weight: 600; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--control-h); padding: 0 14px;
  border-radius: var(--radius-control); border: 1px solid var(--control);
  background: var(--surface); color: var(--text); font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease), transform 100ms var(--ease);
}
.btn:hover { background: var(--raised); border-color: #b5bcca; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text); }
.btn.ghost:hover { background: var(--raised); }
.btn.danger { color: var(--negative); border-color: #f0c4bf; }
.btn.danger:hover { background: var(--pill-negative-bg); border-color: var(--negative); }
.btn.sm { height: var(--control-h-sm); padding: 0 12px; font-size: 13px; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: progress; transform: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none;
  border-radius: var(--radius-control); border: 1px solid transparent; background: transparent; color: var(--muted);
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.icon-btn:hover { background: var(--raised); color: var(--text); }
.icon-btn.danger:hover { background: var(--pill-negative-bg); color: var(--negative); }
.icon-btn[disabled] { opacity: .4; cursor: not-allowed; }
.link-btn { border: 0; background: none; padding: 0; color: var(--primary); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Tabs + toolbar ---------- */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-bottom: 0; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; margin-bottom: -1px;
  color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap;
  border-bottom: 2px solid transparent; transition: color 150ms var(--ease), border-color 150ms var(--ease);
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--primary); font-weight: 600; }
.count { font-size: var(--fs-small); color: var(--muted); font-weight: 500; }
.tabs a[aria-current="page"] .count { color: var(--text); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0 6px; color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
.list th {
  text-align: left; font-size: var(--fs-small); font-weight: 400; color: var(--muted);
  height: 38px; padding: 0 12px; white-space: nowrap;
}
.list td { padding: 10px 12px; border-top: 1px solid var(--rule); vertical-align: middle; }
.list th:first-child, .list td:first-child { padding-left: 0; }
.list th:last-child, .list td:last-child { padding-right: 0; }
.list .num { text-align: right; }
.list tbody tr { transition: background-color 120ms var(--ease); }
.list tbody tr:hover { background: #fafbfd; }
.list td.act { width: 1%; white-space: nowrap; }
.row-actions { display: flex; gap: 4px; align-items: center; justify-content: flex-end; }
.ident { display: flex; flex-direction: column; min-width: 0; }
.ident a, .ident strong { font-weight: 500; color: var(--text); text-decoration: none; }
.ident a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ident span { color: var(--muted); font-size: 13px; line-height: 18px; }
.ident .err { color: var(--negative); }
.file { color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.when { display: flex; flex-direction: column; white-space: nowrap; }
.when span + span { font-size: 13px; color: var(--muted); line-height: 18px; }

/* People: a stable initial and a pale tint of their own hue (identity, not data). */
.person { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.avatar {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; flex: none;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  background: var(--active); color: var(--text);
}
.avatar.lg { width: 32px; height: 32px; font-size: 13px; }
.tint-0 { background: #fde9d7; color: #7a3409; }
.tint-1 { background: #f2efc6; color: #514806; }
.tint-2 { background: #daf2e2; color: #14532d; }
.tint-3 { background: #dcecf9; color: #0b4a7a; }
.tint-4 { background: #fbe1ea; color: #8b1d43; }

/* Status: pale tint, dark ink of the same hue. One mark per row. */
.pill {
  display: inline-flex; align-items: center; gap: 6px; flex: none; white-space: nowrap;
  height: 22px; padding: 0 9px; border-radius: 999px; font-size: var(--fs-small); font-weight: 500;
  background: var(--raised); color: var(--muted);
}
.pill.working { background: var(--data-pale); color: #00507a; }
.pill.failed { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.pill.ok { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.pill.warn { background: var(--warning-bg); color: var(--warning-ink); }
.pill.neutral { background: var(--raised); color: var(--text); border: 1px solid var(--border); }
.pill.dark { background: var(--text); color: #fff; }
.spin { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty-row td { padding: 28px 0; color: var(--muted); }
.more { display: flex; justify-content: center; padding-top: 16px; }

/* ---------- Panels, notices ---------- */
.panel { background: var(--raised); border-radius: var(--radius-panel); padding: 16px 20px; }
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--warning-bg); border: 1px solid var(--warning-edge); color: var(--warning-ink);
  border-radius: var(--radius-control); padding: 10px 12px;
}
.notice .icon { margin-top: 2px; }
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--pill-negative-bg); color: var(--pill-negative-ink);
  border-radius: var(--radius-control); padding: 10px 12px; margin-top: 12px;
}
.alert .icon { margin-top: 2px; }
.ok-msg { display: flex; gap: 8px; align-items: center; color: var(--positive); font-weight: 500; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field .label { font-weight: 500; }
.field .sub { font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 38px; padding: 8px 11px;
  border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface);
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.field input:hover, .field textarea:hover { border-color: var(--control); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--data); box-shadow: 0 0 0 3px var(--data-pale); } /* taste-skill-ignore: focus ring */
.field textarea { resize: vertical; line-height: 21px; min-height: 84px; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field .help { font-size: 13px; color: var(--muted); line-height: 18px; }
.field.invalid input { border-color: var(--negative); }
.field .error-text { font-size: 13px; color: var(--negative); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid2 .wide { grid-column: 1 / -1; }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; }

/* ---------- Upload ---------- */
.convert-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gap); align-items: start; }
.drop {
  position: relative; display: flex; align-items: center; gap: 20px;
  min-height: 264px; padding: 32px;
  border: 1.5px dashed var(--control); border-radius: var(--radius-panel); background: var(--raised);
  cursor: pointer; transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}
.drop:hover, .drop.over { border-color: var(--data); background: var(--data-pale); }
.drop:focus-within { outline: 2px solid var(--data); outline-offset: 2px; }
.drop-icon {
  display: grid; place-items: center; width: 56px; height: 56px; flex: none;
  border-radius: 50%; background: var(--surface); border: 1px solid var(--border); color: var(--primary);
}
.drop-icon .icon { width: 24px; height: 24px; }
.drop strong { display: block; font-size: 18px; line-height: 26px; font-weight: 600; }
.drop span.hint { color: var(--muted); }
.drop .btn { margin-left: auto; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.steps-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.steps-list li { display: flex; flex-direction: column; gap: 4px; }
.steps-list b { font-weight: 600; }
.steps-list span { color: var(--muted); }

.side-block h2 { margin-bottom: 8px; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); }
.mini-list li:first-child { border-top: 0; }
.mini-list .ident { flex: 1; }

/* Progress */
.progress { max-width: 560px; }
.stage-list { list-style: none; margin: 20px 0 0; padding: 0; }
.stage-list li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: center; min-height: 44px; border-top: 1px solid var(--rule); color: var(--muted); }
.stage-list .mark { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--control); display: grid; place-items: center; }
.stage-list li.active { color: var(--text); font-weight: 500; }
.stage-list li.active .mark { border-color: var(--data); border-right-color: transparent; animation: spin .8s linear infinite; }
.stage-list li.done { color: var(--text); }
.stage-list li.done .mark { border: 0; background: var(--positive); color: #fff; }
.stage-list li.done .mark .icon { width: 11px; height: 11px; stroke-width: 3; }

/* ---------- Review: editor + work-history rail ---------- */
.review { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gap); align-items: start; }
.editor > section { padding: 24px 0; border-top: 1px solid var(--border); }
.editor > section:first-child { border-top: 0; padding-top: 4px; }
.editor h2 { margin-bottom: 4px; }
.editor .note { color: var(--muted); margin: 0 0 16px; }
.editor .grid2 { margin-top: 12px; }
.role { padding: 20px 0 4px; border-top: 1px solid var(--rule); scroll-margin-top: 16px; }
.role:first-of-type { border-top: 0; padding-top: 8px; }
.role-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.role-head h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; font-size: 15px; }
.role-head .rank { color: var(--faint); font-weight: 500; font-variant-numeric: tabular-nums; min-width: 1.5em; }
.role-tools { display: flex; gap: 2px; }
.role-flash { animation: flash 1.2s var(--ease); }
@keyframes flash { from { background: var(--data-pale); } to { background: transparent; } }
.add-role { margin-top: 16px; }

.rail { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
.rail .panel { padding: 18px 20px; }
.kpi { display: flex; align-items: baseline; gap: 8px; }
.kpi-value { font-size: var(--fs-kpi); line-height: 34px; font-weight: 400; }
.kpi-label { font-weight: 600; }
.rail .sub { color: var(--muted); margin: 2px 0 0; }
.coverage { margin-top: 16px; }
.coverage > svg { display: block; max-width: 100%; overflow: visible; }
.coverage .legend { display: flex; gap: 16px; margin-top: 8px; font-size: var(--fs-small); color: var(--muted); }
.coverage .legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 8px; border-radius: 2px; background: var(--data); display: inline-block; }
.swatch.gap { background: var(--warning-bg); border: 1px solid var(--warning-edge); }
.flags { list-style: none; margin: 10px 0 0; padding: 0; }
.flags li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.flags li:first-child { border-top: 0; }
.flags li .icon { color: var(--warning-ink); margin-top: 2px; }
.flags q { display: block; color: var(--muted); font-size: 13px; line-height: 18px; margin-top: 2px; quotes: '“' '”'; }
.flags .link-btn { text-align: left; color: var(--text); text-decoration-color: var(--control); }
.clear { display: flex; gap: 8px; align-items: center; color: var(--positive); font-weight: 500; margin-top: 8px; }
.rail-actions { display: flex; flex-direction: column; gap: 8px; }
.rail-actions .btn { width: 100%; }
.save-state { font-size: 13px; color: var(--muted); text-align: center; min-height: 18px; }

/* ---------- Settings: label column + panel ---------- */
.setting { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; padding: 28px 0; border-top: 1px solid var(--border); }
.setting:first-of-type { border-top: 0; padding-top: 4px; }
.setting-label h2 { margin-top: 6px; }
.setting-label p { color: var(--muted); margin: 6px 0 0; }
.setting-label ul { color: var(--muted); padding-left: 18px; margin: 10px 0 0; }
.setting-label li { margin-bottom: 4px; }
.setting .panel { padding: 16px; }
.current { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-control); padding: 14px 16px; }
.doc { display: flex; gap: 12px; align-items: center; min-width: 0; }
.doc-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: var(--radius-control); background: var(--data-pale); color: #00507a; }
.doc .ident strong { overflow-wrap: anywhere; }
.upload-line { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.upload-line p { margin: 0; color: var(--muted); }
.result { margin-top: 16px; border-radius: var(--radius-control); padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); }
.result.ok { border-color: #b7e3c8; }
.result.warn { border-color: var(--warning-edge); background: var(--warning-bg); }
.result.bad { border-color: #f0c4bf; background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.result ul { margin: 8px 0; padding-left: 18px; }
.result p { margin: 6px 0 10px; }
.result .row-actions { justify-content: flex-start; }
.history .list td { background: transparent; }

/* ---------- Dialog ---------- */
dialog {
  width: min(500px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: var(--radius-panel);
  box-shadow: 0 20px 48px rgba(11, 21, 48, .22), 0 2px 6px rgba(11, 21, 48, .08); /* taste-skill-ignore: the dialog floats */
  color: var(--text);
}
dialog::backdrop { background: rgba(11, 21, 48, .45); }
dialog[open] { animation: rise 180ms var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
dialog form { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; }
.dlg-head h2 { font-size: 18px; }
.choice { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice legend { font-weight: 500; margin-bottom: 6px; padding: 0; }
.choice label {
  display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-control); cursor: pointer;
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}
.choice label:hover { border-color: var(--control); }
.choice label:has(input:checked) { border-color: var(--primary); background: #f3f5fc; }
.choice label:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.choice input { margin: 3px 0 0; accent-color: var(--primary); }
.choice b { display: block; font-weight: 500; }
.choice span span { color: var(--muted); font-size: 13px; line-height: 18px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }

/* ---------- Sign-in ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); background: var(--frame); }
.auth-brand { padding: 40px 48px; display: flex; flex-direction: column; gap: 32px; }
.auth-figure { margin: 0; max-width: 560px; }
.auth-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius-control); background: #fff; }
.auth-figure figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.auth-sample { margin-top: auto !important; }
.auth-brand > img { width: 220px; height: auto; }
.auth-brand h1 { font-size: 30px; line-height: 38px; font-weight: 600; letter-spacing: -0.015em; margin: 0; max-width: 18ch; }
.auth-brand p { color: var(--muted); font-size: 16px; line-height: 24px; max-width: 46ch; margin: 12px 0 0; }
.auth-sample { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 13px; }
.auth-panel { align-self: center; margin: 24px 40px 24px 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sheet); display: flex; justify-content: center; padding: 40px; }
.auth-form { width: min(360px, 100%); display: flex; flex-direction: column; gap: 16px; }
.auth-form h2 { font-size: var(--fs-title); line-height: 28px; }
.auth-form .btn { width: 100%; height: 40px; }

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .spin, .stage-list li.active .mark { animation: none !important; border-right-color: currentColor; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .review, .convert-grid { grid-template-columns: 1fr; }
  .rail { position: static; }
  .setting { grid-template-columns: 1fr; gap: 14px; }
  .col-file { display: none; }
}

/* ---------- Phone + small tablet: the frame folds away ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 52px 1fr; }
  .top { grid-column: 1; padding: 0 12px; position: sticky; top: 0; z-index: var(--z-sticky); background: var(--frame); }
  .menu-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: -8px; border: 0; background: none; border-radius: var(--radius-control); color: var(--text); }
  .top-mark { display: block; width: 26px; height: 26px; }
  .search { margin: 0 0 0 auto; width: auto; flex: 1; max-width: 360px; }
  .search kbd { display: none; }
  .side {
    position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); height: 100%; z-index: var(--z-nav);
    background: var(--frame); box-shadow: 0 0 0 100vmax rgba(11, 21, 48, .45); /* taste-skill-ignore: scrim behind the phone menu */
    transform: translateX(-105%); visibility: hidden; transition: transform 200ms var(--ease), visibility 0s 200ms;
  }
  .nav-open .side { transform: none; visibility: visible; transition: transform 200ms var(--ease); }
  .nav a, .nav-btn { min-height: 44px; }
  .sheet { grid-column: 1; margin: 0; border-radius: 0; border-width: 1px 0 0; padding: 20px 16px 40px; }
}
@media (max-width: 700px) {
  .title-row { margin-bottom: 16px; }
  .title-row .btn.primary { width: 100%; }
  .title-actions { width: 100%; }
  .grid2, .choice { grid-template-columns: 1fr; }
  .steps-list { grid-template-columns: 1fr; gap: 12px; }
  .drop { flex-direction: column; align-items: flex-start; min-height: 0; padding: 24px; }
  .drop .btn { margin-left: 0; }
  .btn, .field input { min-height: 44px; }
  .btn.sm { min-height: 40px; }
  .icon-btn { width: 40px; height: 40px; }
  /* Tables become two-line rows: identity and key figure on line 1, the rest under it. */
  table.list thead { display: none; }
  table.list, .list tbody, .list tr { display: block; width: 100%; }
  .list tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--rule); }
  .list td { display: block; border: 0; padding: 0 !important; }
  .list td.c-main { grid-column: 1; }
  .list td.act { grid-column: 2; grid-row: 1 / span 3; align-self: center; width: auto; }
  .list td.c-meta { grid-column: 1; font-size: 13px; color: var(--muted); }
  .list td.c-meta::before { content: attr(data-label) ' '; }
  .list .num { text-align: left; }
  .list td.c-hide-phone { display: none; }
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Loading: the final layout with each value as a flat grey bar at its real size. */
.skel { display: block; height: 12px; border-radius: 4px; background: var(--rule); }
.skel + .skel { margin-top: 6px; }
.skel.thin { height: 10px; }
.skel.w20 { width: 20px; margin-left: auto; } .skel.w40 { width: 40%; } .skel.w60 { width: 60%; } .skel.w70 { width: 70%; }
.skel.w-btn { width: 108px; height: 32px; border-radius: var(--radius-control); }
.skel-row td { height: 57px; }

/* Review header stays in reach while editing a long work history. */
.review-head { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--surface); padding: 12px 0; margin: -12px 0 12px; border-bottom: 1px solid var(--border); }
.review-head .save-state { flex-basis: 100%; text-align: right; margin: -8px 0 0; }
.review-head .save-state:empty { display: none; }

/* Work-history coverage strip: one bar per role in WSG cyan, gaps of 6+ months hatched. */
.cov-track { fill: var(--raised); }
.cov-seg { fill: var(--data); cursor: pointer; transition: fill 120ms var(--ease); }
.cov-seg:hover, .cov-seg:focus-visible { fill: #00507a; outline: none; }
.cov-grid { stroke: var(--border); stroke-width: 1; }
.cov-tick { fill: var(--muted); font: 400 11px var(--font); }
.cov-gap-bg { fill: var(--warning-bg); }
.cov-gap-line { stroke: var(--warning-ink); stroke-width: 1; }
.cov-gap-edge { fill: none; stroke: var(--warning-edge); stroke-width: 1; }
.swatch-svg { width: 14px; height: 8px; display: block; }
.coverage .legend svg { width: 14px; height: 8px; flex: none; }
.flags li.clear { display: flex; gap: 8px; color: var(--positive); font-weight: 500; }
.flags li.clear .icon { color: var(--positive); }
.crumb { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); text-decoration: none; margin-bottom: 2px; }
.crumb:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.crumb .icon { width: 14px; height: 14px; transform: rotate(90deg); }

/* Settings rows keep their own height; action columns line up row to row. */
.setting { align-items: start; }
.history td.c-meta { white-space: nowrap; }
.history .row-actions { display: grid; grid-template-columns: 64px 84px 32px; justify-items: end; }

/* A narrow table pairs with a rail rather than spanning the sheet (1136 = 752 + 24 + 360). */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gap); align-items: start; }
.split .rail { position: static; }
.rail .panel h2 + .sub, .rail .panel .sub + .sub { margin-top: 8px; }
.roles-dl { margin: 12px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 12px; align-items: start; }
.roles-dl dt { margin: 0; }
.roles-dl dd { margin: 0; color: var(--muted); }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }

/* Sign-in stacks below 960px so the title never squeezes into a narrow column. */
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; align-content: start; }
  .auth-brand { padding: 24px 20px 8px; gap: 16px; }
  .auth-brand h1 { font-size: 24px; line-height: 30px; }
  .auth-sample, .auth-figure { display: none; }
  .auth-panel { align-self: start; margin: 8px 20px 24px; padding: 28px 20px 32px; }
}
.preview-h { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); margin-bottom: 10px; }
.preview { margin: 0; }
.preview img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius-control); background: #fff; }
.preview figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 18px; }
.auth-figure { flex: none; }
/* Narrow screens: the work-history check answers the screen's question, so it comes first;
   on a phone the review header scrolls away instead of pinning a third of the screen. */
@media (max-width: 1100px) { .review > .rail { order: -1; } }
@media (max-width: 700px) {
  .review-head { position: static; border-bottom: 0; margin-bottom: 0; }
  .review-head .save-state { text-align: left; margin: 0; }
}
.cov-swatch { fill: var(--data); }
