@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url("/fonts/manrope-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 800; font-display: swap; src: url("/fonts/manrope-latin-800-normal.woff2") format("woff2"); }

/* In Five brand: simple white, vivid orange (the clock), dark ink. One theme, no dark mode. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --field: #faf7f5;
  --surface: #ffffff;
  --border: #ece4dd;
  --text: #1b1414;
  --muted: #6b5a54;
  --primary: #ff6a1f;
  --primary-ink: #1b1414;
  --accent: #1b1414;
  --accent-ink: #ffffff;
  --accent-text: #c2410c;
  --ring: rgba(255, 106, 31, 0.25);
  --danger: #b91c1c;
  --warn: #b45309;
  --ok: #15803d;
  --chip: #fff1e8;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(40, 16, 12, 0.05), 0 8px 24px -14px rgba(40, 16, 12, 0.16);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 15px;
}
h2 { margin: 0 0 6px; font-size: 22px; }
h3 { margin: 18px 0 8px; font-size: 16px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* top bar: white, logo on the left */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 12px 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 48px; height: 48px; display: block; }
.wordmark { font-family: "Manrope", -apple-system, sans-serif; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.brand-name { font-size: 26px; }
.wm-in { color: #1b1414; font-weight: 700; }
.wm-five { color: #e8501a; }
.brand-tag { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; margin-top: 4px; }
.tabs { display: flex; gap: 4px; margin-left: auto; background: #f6f1ed; padding: 4px; border-radius: 10px; }
.tab {
  border: 0; background: transparent; color: var(--muted);
  padding: 8px 12px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 14px;
}
@media (max-width: 1180px) { .topbar .brand-tag { display: none; } } /* five tabs need the room */
.tab:hover { color: var(--text); }
.tab.active { background: var(--primary); color: var(--primary-ink); box-shadow: 0 2px 10px rgba(255,106,31,.3); }

/* Messages float over the page, below the header, without moving it (app.js toast()). A click dismisses one. */
.banner {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; /* at the bottom, clear of the result it is about */
  width: max-content; max-width: min(640px, calc(100vw - 32px)); margin: 0;
  padding: 12px 16px; border-radius: var(--radius); cursor: pointer;
  background: #fff4e5; color: #7c2d12; border: 1px solid #fed7aa; font-size: 14px;
  box-shadow: 0 12px 32px -12px rgba(40, 16, 12, .35);
  animation: toast-in .18s ease-out;
}
.banner.error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.banner code { background: rgba(0,0,0,0.08); padding: 1px 5px; border-radius: 4px; }

main { padding: 20px 24px 40px; max-width: 1400px; margin: 0 auto; }
.panel { display: none; }
.panel.active { display: block; }
.split { display: grid; grid-template-columns: minmax(360px, 480px) 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); min-height: 300px; }

/* forms */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field em { font-weight: 400; color: var(--muted); font-style: normal; }
input[type="text"], input[type="email"], input[type="password"], textarea, select {
  width: 100%; font: inherit; color: var(--text);
  background: var(--field); border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 11px;
}
textarea { resize: vertical; min-height: 60px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: transparent; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.upload-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
input[type="file"] { font-size: 13px; color: var(--muted); max-width: 100%; }
.actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

.btn {
  font: inherit; font-weight: 600; font-size: 14px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 10px 16px; border-radius: 9px; cursor: pointer;
}
.btn:hover { filter: brightness(0.97); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 11px; font-size: 13px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* placeholders / loading */
.placeholder { text-align: center; color: var(--muted); padding: 60px 30px; }
.ph-icon { font-size: 40px; margin-bottom: 10px; }
.loading { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 30px; justify-content: center; }
/* The wait: the logo's clock, its hands moving toward five to twelve, above the step it's on. */
.loading { flex-direction: column; gap: 12px; text-align: center; }
.load-clock { width: 92px; height: 92px; flex: none; filter: drop-shadow(0 10px 16px rgba(232, 80, 26, .22)); }
.spinner { width: 20px; height: 20px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* review result */
.score-row { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.score {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 28px; color: #fff; flex-shrink: 0;
}
.score.good { background: var(--ok); } .score.mid { background: var(--warn); } .score.low { background: var(--danger); }
.score small { font-size: 11px; font-weight: 600; opacity: 0.9; margin-top: -4px; }
.headline { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.pill.high { background: #fee2e2; color: #991b1b; } .pill.medium { background: #fef3c7; color: #92400e; } .pill.low { background: #e0f2fe; color: #075985; }
.issue { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: var(--bg); }
.issue .where { font-weight: 700; margin-left: 8px; }
.issue .fix { margin-top: 6px; }
.issue .fix b { color: var(--accent-text); }
ul.clean { padding-left: 18px; margin: 0 0 8px; }
ul.clean li { margin-bottom: 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { background: var(--chip); padding: 3px 10px; border-radius: 999px; font-size: 13px; }
.chip.missing { background: transparent; border: 1px dashed var(--border); color: var(--muted); }
.rewrite { border-left: 3px solid var(--accent); padding: 6px 12px; margin-bottom: 12px; }
.rewrite .orig { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(185,28,28,0.5); }
.rewrite .new { font-weight: 600; margin: 4px 0; }
.rewrite .why { font-size: 13px; color: var(--muted); }
table.sections { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
table.sections td { padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.sections td:first-child { font-weight: 600; white-space: nowrap; width: 140px; }
.stars { color: var(--warn); letter-spacing: 1px; white-space: nowrap; }
details { margin-bottom: 8px; }
summary { cursor: pointer; font-weight: 700; font-size: 16px; padding: 8px 0; }

/* paper: the rendered resume page */
.paper-wrap { overflow-x: auto; }
.paper {
  background: #fff; color: #000;
  width: 100%; max-width: 8.5in; min-height: 11in; margin: 0 auto;
  padding: 0.5in; box-sizing: border-box;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  font-family: var(--pf, "Times New Roman", Times, Georgia, serif); font-size: var(--ps, 10pt); line-height: var(--pl, 1.2); color: var(--pc, #000);
  outline: none;
}
.paper .p-name, .paper .p-section h2 { color: var(--pa, #000); }
.paper .p-section h2 { border-bottom-color: var(--pa, #000); }
.paper .t[data-ph]:empty::before { content: attr(data-ph); color: #b0b0b0; font-style: italic; font-weight: 400; }
.paper .t { outline: none; border-radius: 2px; }
.paper .t:focus { box-shadow: 0 0 0 2px #93c5fd; background: #eff6ff; }
.paper .t:empty { display: inline-block; min-width: 1ch; }
.paper .r .t:empty::before { font-weight: 400; }
.paper .blank { opacity: 0.9; }
/* The page's tools (+ bullet, + entry, ↑ ↓, ×) float over it on hover or while typing in that part, so showing them
   never moves the text (and the first click lands where it was aimed). */
.paper .p-section, .paper .p-entry { position: relative; }
.paper .add-row { position: absolute; right: 0; bottom: 0; transform: translateY(85%); z-index: 3; visibility: hidden; margin: 0; white-space: nowrap; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.paper .p-entry > .add-row { right: auto; left: 11pt; z-index: 4; } /* + bullet under the bullets; + entry / + label line at the section's right */
.paper .add-row.end { position: static; transform: none; visibility: visible; margin-top: 10pt; }
.paper .p-entry:hover > .add-row, .paper .p-section:hover > .add-row, .paper .p-entry:focus-within > .add-row, .paper .p-section:focus-within > .add-row { visibility: visible; }
.paper .p-section:hover > .p-entry:not(:hover) > .add-row { visibility: hidden; }
.add-btn, .del-btn, .move-btn {
  font: 600 11px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #4b5563;
  background: #f3f4f6; border: 1px dashed #c4c8d2; border-radius: 6px; padding: 2px 8px; cursor: pointer; margin-right: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.add-btn:hover, .move-btn:hover { background: #e5e7eb; color: #111; }
.row-tools { display: inline-flex; gap: 3px; margin-left: 6px; visibility: hidden; vertical-align: middle; font-style: normal; font-weight: 400; }
.del-btn, .move-btn { padding: 0 6px; margin: 0; border-style: solid; color: #6b7280; line-height: 16px; font-size: 12px; }
.del-btn:hover { color: #b91c1c; border-color: #b91c1c; }
.move-btns { display: inline-flex; gap: 3px; }
.paper .p-entry:hover > .p-row1 .row-tools, .paper h2:hover .row-tools, .paper .p-line:hover .row-tools,
.paper .p-row1:focus-within .row-tools, .paper h2:focus-within .row-tools, .paper .p-line:focus-within .row-tools { visibility: visible; }
/* A heading or organization line with nothing in it (a bare rule) always shows its ×. */
.paper h2:has(> .t:empty) .row-tools, .paper .p-row1:has(.l > .t:empty) .row-tools { visibility: visible; }
/* On touch screens only the tools of what's being edited show: a job's while in its lines, a section's while in its heading. */
@media (hover: none) {
  .paper .p-entry:focus-within .row-tools, .paper .p-section > h2:focus-within .row-tools { visibility: visible; }
  /* A tap leaves :hover stuck on whatever was under the finger (or under it after a scroll): there, the tools and the
     + buttons follow what's being edited only, so they never float over lines nobody touched. */
  .paper .p-entry:hover:not(:focus-within) > .p-row1 .row-tools, .paper h2:hover:not(:focus-within) .row-tools, .paper .p-line:hover:not(:focus-within) .row-tools,
  .paper .p-entry:hover:not(:focus-within) > .add-row, .paper .p-section:hover:not(:focus-within) > .add-row { visibility: hidden; }
  .paper h2:has(> .t:empty) .row-tools, .paper .p-row1:has(.l > .t:empty) .row-tools { visibility: visible; }
}
.banner .banner-undo { margin-left: 8px; font-weight: 700; color: inherit; text-decoration: underline; }
.style-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 0 0 10px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.style-bar label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.style-bar select { width: auto; padding: 4px 6px; font-size: 13px; }
.style-bar input[type="color"] { width: 30px; height: 24px; padding: 0; border: 1px solid var(--border); border-radius: 5px; background: none; cursor: pointer; }
.paper .p-name { font-size: 30pt; font-weight: 700; text-align: center; margin: 0; letter-spacing: 1px; font-variant: small-caps; line-height: 1.05; }
.paper .p-contact { text-align: center; font-size: 10pt; margin: 2pt 0 6pt; }
.paper .p-section { margin-top: 5pt; }
.paper .p-section h2 { font-size: 12pt; font-variant: small-caps; font-weight: 700; margin: 0 0 2pt; padding-bottom: 0; border-bottom: 1.5pt solid #000; letter-spacing: 0.3px; }
.paper .p-row { display: flex; justify-content: space-between; gap: 12px; }
.paper .p-row .l { flex: 1 1 auto; }
.paper .p-row .r { flex: 0 0 auto; text-align: right; white-space: nowrap; }
.paper .p-row1 { font-weight: 700; margin-top: 2pt; }
.paper .p-row2 { font-style: italic; }
.paper .p-row2 .l b, .paper .p-row2 .l strong { font-style: normal; }
.paper ul { margin: 0 0 2pt; padding-left: 11pt; list-style: none; }
.paper li { position: relative; margin: 0 0 0.5pt; scroll-margin-top: calc(var(--topbar-h, 119px) + 72px); } /* scrolled to, a line lands clear of the top bars */
.paper .p-line { position: relative; }
/* On a screen wide enough, a bullet's ✓ / ✗ sit in the page's margin, so a line that fills the page stays one line. */
@media (min-width: 701px) {
  .paper li > .edit-ctl, .paper .p-line > .edit-ctl { position: absolute; left: 100%; top: 0; margin-left: 5px; }
  .paper li > .edit-ctl.kept .kept-word, .paper .p-line > .edit-ctl.kept .kept-word { display: none; }
}
.paper li::before { content: "•"; position: absolute; left: -9pt; }
.paper .p-line { margin-top: 1pt; }
.paper .p-line b { font-weight: 700; }

/* inline edits */
.paper .t.accepted { background: #fff7c2; box-shadow: 0 0 0 2px #fff7c2; }
.paper .t ins { text-decoration: underline 1.5px #16a34a; text-underline-offset: 2px; background: none; }
.paper mark.fill-x { background: #fecaca; color: #991b1b; font-weight: 700; border-radius: 3px; padding: 0 2px; outline: 1px dashed #dc2626; }
.paper .t.suggestion { color: #6b7280; font-style: italic; background: #f8fafc; box-shadow: 0 0 0 2px #f8fafc; cursor: default; }
.paper li.suggest::before { color: #cbd5e1; }
.paper .t.accepted.added { background: #dcfce7; box-shadow: 0 0 0 2px #dcfce7; }
.paper .t.rejected { background: #f1f1f1; box-shadow: 0 0 0 2px #f1f1f1; }
.paper .t.deleted { text-decoration: line-through; color: #777; background: #fee2e2; box-shadow: 0 0 0 2px #fee2e2; }
.paper .t.deleted.rejected { text-decoration: none; color: #000; background: #f1f1f1; box-shadow: 0 0 0 2px #f1f1f1; }
.paper .deleted > .p-row, .paper .p-section.deleted h2 { opacity: 0.6; }
.edit-ctl { display: inline-flex; gap: 2px; margin-left: 6px; vertical-align: middle; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.edit-ctl button {
  width: 24px; height: 22px; border-radius: 6px; border: 1px solid #cfd3dc; background: #fff; color: #666;
  font-size: 12px; font-weight: 800; line-height: 1; cursor: pointer; padding: 0;
}
@media (pointer: coarse) { .edit-ctl button { width: 34px; height: 32px; font-size: 15px; } .edit-ctl { gap: 6px; } }
.edit-ctl button.ok.on { background: #15803d; border-color: #15803d; color: #fff; }
.edit-ctl button.no.on { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.edit-ctl button:hover { filter: brightness(0.95); }
/* A change kept with ✓: plain text, a small mark, and ✗ to undo. */
.paper .t.kept { background: none; box-shadow: none; }
.edit-ctl.kept { gap: 4px; align-items: center; }
.edit-ctl.kept .kept-mark { font-size: 11px; font-weight: 700; color: #15803d; white-space: nowrap; }
.edit-ctl.kept button.no { width: 20px; height: 18px; font-size: 10px; color: #9ca3af; border-color: #e5e7eb; }
.edit-ctl.kept button.no:hover { color: #b91c1c; border-color: #b91c1c; filter: none; }
@media (pointer: coarse) { .edit-ctl.kept button.no { width: 30px; height: 28px; font-size: 13px; } }
/* Under each change: why, then what it was (only the cut words are struck through). */
.edit-note { display: inline-block; margin: 2px 0 3px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 11.5px; line-height: 1.4; color: #4b5563; font-style: normal; font-weight: 400; font-variant: normal; text-transform: none; letter-spacing: normal; }
.edit-note .was { color: #6b7280; }
.edit-note del { color: #b91c1c; text-decoration: line-through; text-decoration-color: #ef4444; }
.edit-note.inline { display: none; }
.ask-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 5px; padding: 5px 8px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; font: 12px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #7c2d12; font-style: normal; }
.ask-row .ask-q { font-weight: 600; }
.ask-row .ask-in { width: 90px; padding: 3px 6px; font-size: 12px; border-radius: 6px; }
.ask-row .ask-add { border: 0; background: var(--primary); color: var(--primary-ink); font: 700 12px inherit; padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.order-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 auto 10px; max-width: 8.5in; padding: 10px 12px; border: 1px solid #fde68a; background: #fffbeb; border-radius: 10px; font-size: 13.5px; }
.order-bar.rejected { background: #f8fafc; border-color: var(--border); color: var(--muted); }
.paper .p-row .l:hover .edit-note.inline, .paper .p-row .r:hover .edit-note.inline, .paper h1:hover .edit-note.inline, .paper .p-contact:hover .edit-note.inline, .paper h2:hover .edit-note.inline, .paper .p-line b:hover .edit-note.inline { display: block; font-style: normal; font-weight: 400; }
.edit-note s { color: #9ca3af; }
.edit-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 8px; }
.edit-bar .toolbar { margin: 0; }
.edit-count { font-weight: 700; font-size: 14px; }
.blank-count { color: #b91c1c; }
/* The result's main buttons stay in reach while scrolling the page. */
.sticky-bar { position: sticky; top: var(--topbar-h, 73px); z-index: 5; background: var(--surface); padding: 8px 0; margin-bottom: 6px; box-shadow: 0 8px 12px -12px rgba(40, 16, 12, .25); }
.needs-you, .checklist, .questions { border: 1px solid #fde68a; background: #fffbeb; border-radius: 12px; padding: 12px 14px; margin: 4px 0 12px; }
.needs-you ul, .checklist ul, .questions ul { margin: 6px 0 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.needs-you li { padding-left: 16px; position: relative; } .needs-you li::before { content: "→"; position: absolute; left: 0; color: #b45309; }
.cl-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.checklist li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.checklist li > span:nth-child(2) { flex: 1 1 220px; }
.cl-kind { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 1px 7px; border-radius: 999px; background: #fde68a; color: #78350f; }
.cl-kind.fill_in { background: #fecaca; color: #991b1b; } .cl-kind.add { background: #dcfce7; color: #166534; }
.questions li { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; padding: 8px 10px; background: #fff; border: 1px solid #fde68a; border-radius: 10px; }
.questions .q-by-hand { margin-top: 6px; padding: 6px 8px; border-radius: 8px; background: var(--bg); }
.q-actions { display: flex; gap: 6px; }
.fit-line { font-size: 14px; color: var(--muted); margin: 2px 0 4px; } .fit-line b { color: var(--text); }
.how-to { margin: 4px 0 8px; }
#t-posting-note.error { color: var(--danger); font-weight: 600; }
[aria-invalid="true"] { outline: 2px solid var(--danger) !important; }
#rv-result, #t-result, #b-output-wrap, #iv-chat-wrap, #iv-feedback, #rv-loading, #t-loading, #b-loading, #iv-loading, #t-apply-panel { scroll-margin-top: calc(var(--topbar-h, 73px) + 40px); } /* 40px: the card around a result (22px padding) lands clear of the header, not tucked under it */
/* Inside a result, below its sticky toolbar too. */
#t-apply-panel, #b-checklist, .needs-you { scroll-margin-top: calc(var(--topbar-h, 73px) + 72px); }

/* chat */
.chat-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.chat-header .toolbar { margin: 0; }
.chat { display: flex; flex-direction: column; gap: 12px; max-height: 60vh; min-height: 300px; overflow-y: auto; padding: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; }
.msg.interviewer { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg.candidate { align-self: flex-end; background: var(--primary); color: var(--primary-ink); border-bottom-right-radius: 4px; }
.msg.system { align-self: center; background: transparent; color: var(--muted); font-size: 13px; }
.msg .who { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; opacity: 0.7; margin-bottom: 3px; }
.chat-input { display: flex; gap: 10px; margin-top: 12px; align-items: flex-end; }
.chat-input textarea { flex: 1; }

/* feedback */
.q-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.q-card .q { font-weight: 700; }
.q-card .meta { font-size: 13px; color: var(--muted); margin: 4px 0 8px; }
.q-card .row { margin-bottom: 5px; }
.q-card .row b { color: var(--accent-text); }
.signal { font-weight: 800; }
.signal.strong_yes, .signal.lean_yes { color: var(--ok); }
.signal.lean_no { color: var(--warn); }
.signal.no { color: var(--danger); }

.foot { text-align: center; padding: 20px; }

/* Printing: app.js printPaper() puts a copy of the page in #print-root and nothing else prints. */
#print-root { display: none; }
@media print {
  @page { size: letter; margin: 0.5in; }
  html, body { background: #fff !important; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; }
  #print-root .paper { border: 0; box-shadow: none; padding: 0; max-width: none; min-height: 0; margin: 0; zoom: 1 !important; width: auto !important; }
  #print-root .edit-ctl, #print-root .edit-note, #print-root .ask-row, #print-root .deleted, #print-root li.deleted, #print-root li.suggest, #print-root .t.deleted:not(.rejected), #print-root .t.suggestion, #print-root .add-row, #print-root .row-tools, #print-root .blank { display: none !important; }
  #print-root .t:empty::before { content: none !important; }
  #print-root .t, #print-root mark { background: none !important; box-shadow: none !important; outline: none !important; color: inherit !important; }
  #print-root ins { text-decoration: none !important; }
}

/* small screens */
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 16px; position: static; } /* on a phone the header scrolls away; the result toolbars stick to the top instead */
  .brand-tag { display: none; }
  .logo { width: 36px; height: 36px; }
  .brand-name { font-size: 22px; }
  .status { margin-left: auto; }
  .tabs { order: 3; width: 100%; margin-left: 0; }
  .tab { flex: 1; padding: 8px 6px; font-size: 13px; }
  main { padding: 14px 16px 32px; }
  .col { padding: 16px; }
  .grid2 { grid-template-columns: 1fr; }

}
#iv-feedback { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }

/* ---- voice interview ---- */
.radio-row { display: flex; flex-direction: column; gap: 6px; }
.radio { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.radio input { margin: 0; }
.voice-panel { border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: var(--surface); }
.voice-top { display: flex; gap: 16px; align-items: flex-start; }
/* The interviewer is a voice, not a face: a round meter whose bars move with it (--level, 0 to 1, set by voice.js). */
.voice-orb { position: relative; width: 132px; height: 132px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #fff, var(--bg)); box-shadow: inset 0 0 0 1px var(--border); }
.voice-orb .ring { position: absolute; inset: -6px; border-radius: 50%; border: 3px solid transparent; }
.voice-orb .bars { display: flex; align-items: center; gap: 6px; height: 66px; }
.voice-orb .bars i { display: block; width: 7px; height: calc(10px + var(--level, 0) * var(--reach, 40px)); border-radius: 4px; background: var(--muted); opacity: .5; transition: height .08s linear, background .2s, opacity .2s; }
.voice-orb .bars i:nth-child(1), .voice-orb .bars i:nth-child(5) { --reach: 22px; }
.voice-orb .bars i:nth-child(3) { --reach: 54px; }
.voice-panel[data-state="speaking"] .voice-orb .bars i { background: var(--primary); opacity: 1; }
.voice-panel[data-state="listening"] .voice-orb .bars i { background: var(--ok); opacity: .8; }
.voice-panel[data-state="thinking"] .voice-orb .bars i { animation: bar-wait 1s ease-in-out infinite; }
.voice-panel[data-state="thinking"] .voice-orb .bars i:nth-child(2) { animation-delay: .12s; }
.voice-panel[data-state="thinking"] .voice-orb .bars i:nth-child(3) { animation-delay: .24s; }
.voice-panel[data-state="thinking"] .voice-orb .bars i:nth-child(4) { animation-delay: .36s; }
.voice-panel[data-state="thinking"] .voice-orb .bars i:nth-child(5) { animation-delay: .48s; }
@keyframes bar-wait { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.9); } }
@media (max-width: 700px) { .voice-orb { width: 104px; height: 104px; } }
@media (prefers-reduced-motion: reduce) { .voice-orb .bars i { animation: none !important; transition: none; } }
.voice-who { font-weight: 800; font-size: 17px; }
.voice-panel[data-state="listening"] .ring { border-color: var(--ok); animation: pulse 1.4s ease-out infinite; }
.voice-panel[data-state="speaking"] .ring { border-color: var(--primary); }
.voice-panel[data-state="thinking"] .ring { border-color: var(--warn); border-style: dashed; animation: spin 3s linear infinite; }
@keyframes pulse { 0% { transform: scale(0.96); opacity: 1; } 100% { transform: scale(1.12); opacity: 0; } }
.mic-badge { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--ok); color: #fff; display: none; place-items: center; font-size: 16px; box-shadow: var(--shadow); }
.voice-panel[data-state="listening"] .mic-badge { display: grid; }
.voice-meta { flex: 1; min-width: 0; }
.voice-status { color: var(--muted); font-size: 14px; margin: 2px 0 8px; min-height: 20px; }
.voice-panel[data-state="listening"] .voice-status { color: var(--ok); font-weight: 600; }
.voice-panel[data-state="speaking"] .voice-status { color: var(--primary); font-weight: 600; }
.voice-panel[data-state="mic-blocked"] .voice-status { color: var(--danger); font-weight: 600; }
.silence-track { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 10px; opacity: 0; }
.voice-panel[data-state="listening"] .silence-track { opacity: 1; }
.silence-bar { height: 100%; width: 0; background: var(--ok); }
.silence-bar.run { animation: fill 11s linear forwards; }
@keyframes fill { from { width: 0; } to { width: 100%; } }
.voice-tools { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13px; }
.voice-tools label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.voice-tools select { width: auto; padding: 4px 6px; font-size: 13px; max-width: 220px; }
.live-transcript { margin-top: 12px; min-height: 64px; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px dashed var(--border); font-size: 15px; line-height: 1.5; }
.live-transcript .ph { color: var(--muted); font-style: italic; }
.live-transcript .interim { color: var(--muted); }
.voice-actions { margin: 10px 0 0; }
.voice-panel[data-state="speaking"] #iv-answer-mic, .voice-panel[data-state="thinking"] #iv-answer-mic, .voice-panel[data-state="done"] #iv-answer-mic { display: none; }
.voice-panel:not([data-state="listening"]) #iv-done { display: none; }
.voice-panel[data-state="done"] .voice-actions { display: none; }
@media (max-width: 700px) { .voice-top { flex-direction: column; align-items: center; text-align: center; } .voice-tools { justify-content: center; } }
.stat-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.stat { flex: 1; min-width: 110px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; text-align: center; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 12px; color: var(--muted); }
.pulse-btn { animation: glow 1.2s ease-in-out infinite alternate; }
@keyframes glow { from { box-shadow: 0 0 0 0 rgba(255,106,31,0.6); } to { box-shadow: 0 0 0 7px rgba(255,106,31,0); } }

/* ---- difficulty, camera, scorecard skills ---- */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg-opt { position: relative; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; }
.seg-opt > span { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 2px solid var(--border); border-radius: 10px; background: var(--bg); font-size: 14px; }
.seg-opt small { color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.seg-opt input:checked + span { border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--primary); }
.cam-opt { margin-top: 8px; align-items: flex-start; }
.cam-wrap { position: relative; width: 150px; height: 112px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: #111; border: 1px solid var(--border); }
.cam-wrap video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.cam-status { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 6px; font-size: 11px; color: #fff; background: rgba(0,0,0,0.55); text-align: center; }
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 18px; margin: 4px 0 14px; }
.skill { display: grid; grid-template-columns: 110px 1fr 28px; align-items: center; gap: 8px; font-size: 13px; }
.skill .bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.skill .bar i { display: block; height: 100%; border-radius: 4px; background: var(--primary); }
.skill .bar i.good { background: var(--ok); } .skill .bar i.mid { background: var(--warn); } .skill .bar i.low { background: var(--danger); }
.skill .n { text-align: right; color: var(--muted); }
.starr { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 4px 0 8px; }
.starr b { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--bg); border: 1px solid var(--border); color: var(--muted); }
.starr b.hit { background: #dcfce7; border-color: #86efac; color: #166534; }
.starr b.miss { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.starr-label { font-size: 12px; color: var(--muted); margin-left: 6px; font-style: normal; }
@media (max-width: 700px) { .seg { grid-template-columns: 1fr; } .cam-wrap { margin-top: 10px; } }

.voice-help { margin-top: 10px; font-size: 13px; }
.voice-help summary { font-size: 13px; font-weight: 600; color: var(--muted); padding: 2px 0; }
.voice-help ul { margin-top: 6px; }
.voice-help code { background: var(--bg); padding: 1px 4px; border-radius: 4px; }

/* mic meter, hints, sound check */
.mic-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.mic-meter { flex: 1; height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; }
.mic-meter i { display: block; height: 100%; width: 0%; border-radius: 4px; background: linear-gradient(90deg, #ffb000, #ff6a1f); transition: width 80ms linear; }
.voice-hint { margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.45; background: #fff4e5; color: #7c2d12; border: 1px solid #fed7aa; }
.voice-hint b { font-weight: 700; }
.soundcheck { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.soundcheck-out { margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); font-size: 14px; display: flex; flex-direction: column; gap: 8px; }
.soundcheck-out .line { display: flex; gap: 8px; align-items: flex-start; }
.soundcheck-out .ico { width: 20px; flex-shrink: 0; font-weight: 800; }
.soundcheck-out .ok { color: var(--ok); } .soundcheck-out .bad { color: var(--danger); } .soundcheck-out .wait { color: var(--muted); }
.soundcheck-out .fix { color: var(--muted); font-size: 13px; }
.mic-meter.on i { width: 6%; }
.mic-meter.hearing i { width: 100% !important; animation: hear 0.9s ease-in-out infinite alternate; }
@keyframes hear { from { opacity: .45; } to { opacity: 1; } }
.silence-count { min-height: 18px; margin: -4px 0 6px; color: var(--accent-text); font-weight: 600; }

/* replay */
.cam-status:empty { display: none; }
.modal { position: fixed; inset: 0; z-index: 70; /* above toasts (60): a window's buttons are never covered */ background: rgba(27,20,20,.55); display: flex; align-items: flex-start; justify-content: center; padding: 16px; overflow-y: auto; overscroll-behavior: contain; }
.modal > .modal-card { margin: auto; }
body.modal-open { overflow: hidden; }
.modal-card { background: var(--surface); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.35); width: min(760px, 100%); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-card video { width: 100%; max-height: 60vh; border-radius: 10px; background: #000; }
.recordings { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 8px; }
.recording { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.recording video { width: 100%; border-radius: 8px; background: #000; }
.recording .q { font-size: 13px; font-weight: 600; }
.recording a { font-size: 13px; color: var(--accent-text); }

/* ---- accounts: header, menu, sign-in and plans windows ---- */
.account { position: relative; display: flex; align-items: center; gap: 8px; margin-left: 12px; }
.account:empty { display: none; } /* no accounts (running locally): the tabs sit flush right instead of beside an empty gap */
.acct-chip { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 6px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font: inherit; font-size: 13px; color: var(--text); cursor: pointer; }
.acct-chip:hover { border-color: var(--primary); }
.acct-left { white-space: nowrap; color: var(--muted); }
.acct-left b { color: var(--text); }
.plan-badge { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--chip); color: var(--accent-text); }
.plan-badge.plan-plus { background: var(--primary); color: var(--primary-ink); }
.plan-badge.plan-pro { background: var(--accent); color: var(--accent-ink); }
.acct-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: 300px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.acct-menu-email { font-weight: 700; overflow-wrap: anywhere; }
.acct-note { background: var(--chip); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; line-height: 1.4; }
.acct-usage { display: flex; flex-direction: column; gap: 8px; }
.usage-label { display: flex; justify-content: space-between; font-size: 13px; }
.usage-bar { height: 6px; border-radius: 999px; background: #f2ebe6; overflow: hidden; }
.usage-bar i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.usage-bar.low i { background: var(--danger); }
.usage-parts { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.credits-how { margin: 0; }
.acct-usage .usage-bar { height: 8px; }
.acct-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.icon-btn { border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.icon-btn:hover { color: var(--text); }
.link-btn { border: 0; background: transparent; padding: 0; font: inherit; font-size: 13px; color: var(--accent-text); cursor: pointer; text-align: left; }
.link-btn:hover { text-decoration: underline; }
/* the sign-in window */
.auth-card { width: min(440px, 100%); padding: 28px 28px 24px; gap: 0; position: relative; border-radius: 20px; }
.auth-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; }
.auth-close:hover { background: var(--field); }
.auth-mark { width: 44px; height: 44px; display: block; margin-bottom: 14px; }
.auth-title { font-family: "Manrope", -apple-system, sans-serif; font-weight: 800; font-size: 26px; letter-spacing: -.03em; line-height: 1.1; margin: 0 0 4px; }
.auth-sub { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; }
.auth-note { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--chip); color: var(--text); font-size: 13.5px; border-left: 3px solid var(--primary); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #f6f1ed; padding: 4px; border-radius: 12px; margin-bottom: 18px; }
.auth-tabs button { border: 0; background: transparent; padding: 9px; border-radius: 9px; font: inherit; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.auth-tabs button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(40, 16, 12, .12); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label { font-weight: 700; font-size: 13px; }
.auth-under { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.auth-under #auth-forgot { margin-left: auto; }
.auth-form input { padding: 12px 14px; font-size: 15px; border-radius: 10px; }
.auth-input-wrap { position: relative; }
.auth-input-wrap input { padding-right: 44px; }
.auth-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.auth-eye:hover { background: var(--field); color: var(--text); }
.auth-eye::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat; }
.auth-eye[aria-pressed="true"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.9 17.9A10 10 0 0 1 12 19c-6.5 0-10-7-10-7a18 18 0 0 1 5.1-5.9M9.9 5.2A9.1 9.1 0 0 1 12 5c6.5 0 10 7 10 7a18 18 0 0 1-2.2 3.2M14.1 14.1a3 3 0 1 1-4.2-4.2M2 2l20 20'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.9 17.9A10 10 0 0 1 12 19c-6.5 0-10-7-10-7a18 18 0 0 1 5.1-5.9M9.9 5.2A9.1 9.1 0 0 1 12 5c6.5 0 10 7 10 7a18 18 0 0 1-2.2 3.2M14.1 14.1a3 3 0 1 1-4.2-4.2M2 2l20 20'/%3E%3C/svg%3E"); }
.auth-hint { color: var(--muted); font-size: 12.5px; }
.auth-remember { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.auth-remember input { width: 17px; height: 17px; margin: 0; accent-color: var(--primary); }
.auth-remember em { font-style: normal; font-weight: 400; margin-left: auto; }
.auth-error { color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 9px 12px; font-size: 13.5px; }
.auth-error:empty { display: none; }
.auth-submit { width: 100%; padding: 13px 16px; font-size: 15.5px; border-radius: 12px; margin-top: 4px; transition: transform .1s, filter .15s; }
.auth-submit:not(:disabled):active { transform: scale(.99); }
.auth-back { align-self: center; margin-top: 2px; }
.auth-code-input { font-family: "Manrope", -apple-system, sans-serif; font-weight: 800; font-size: 28px; letter-spacing: .35em; text-align: center; padding: 10px 14px 10px calc(14px + .35em); }
.auth-code-input::placeholder { letter-spacing: .35em; color: #d8cfc8; }
.auth-code-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-code-foot .link-btn:disabled { color: var(--muted); cursor: default; text-decoration: none; }
@media (max-width: 480px) { .auth-card { padding: 24px 20px 20px; border-radius: 16px; } .auth-title { font-size: 23px; } }

.plans-card { width: min(980px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
.plans-card .auth-note { margin-top: 6px; }
.interval-toggle { display: inline-flex; align-self: center; gap: 4px; background: #f6f1ed; padding: 4px; border-radius: 10px; }
.interval-toggle button { border: 0; background: transparent; padding: 7px 14px; border-radius: 7px; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.interval-toggle button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(40, 16, 12, .12); }
.interval-toggle .save { margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-size: 11px; font-weight: 800; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 2px solid var(--border); border-radius: 14px; background: var(--surface); }
.plan-card.featured { border-color: var(--primary); }
.plan-card.current { box-shadow: 0 0 0 3px var(--ring); }
.plan-name { font-family: "Manrope", -apple-system, sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.plan-price { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin-top: 6px; }
.plan-price small { font-size: 14px; font-weight: 600; color: var(--muted); }
.plan-card ul { margin: 8px 0 4px; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.plan-action { margin-top: auto; padding-top: 8px; }
.plan-action .btn { width: 100%; }

.lock-badge { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px; }
.locked { opacity: .6; }

@media (max-width: 700px) {
  .account { margin-left: auto; }
  .acct-left-word { display: none; }
  .acct-menu { width: min(300px, calc(100vw - 32px)); }
  .plan-grid { grid-template-columns: 1fr; }
}

/* ---- what a plan doesn't include: a card at the top of the tab, and the tab dimmed ---- */
.lock-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 16px; padding: 14px 18px; border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.lock-card > div { display: flex; flex-direction: column; gap: 2px; flex: 1 1 320px; }
.lock-card .btn { flex: none; }
.split.locked { opacity: .55; pointer-events: none; user-select: none; }
.tab .lock-badge { margin-left: 3px; font-size: 9.5px; padding: 0 5px; vertical-align: 2px; }
.tab.active .lock-badge { background: var(--primary-ink); color: #fff; }
.btn .lock-badge { margin-left: 4px; }
textarea.locked-box { background: #f3eeea; color: var(--muted); cursor: not-allowed; }

/* ---- tailor & apply ---- */
.apply-panel { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.apply-panel h3 { margin-top: 0; }
.apply-steps { padding-left: 22px; display: flex; flex-direction: column; gap: 14px; margin: 8px 0 16px; }
.apply-steps li { padding-left: 4px; }
.apply-steps li > div { margin-bottom: 6px; }
.apply-steps li > .btn { margin-top: 2px; }
.bookmarklet { display: inline-block; margin: 0 2px; padding: 5px 12px; border-radius: 8px; background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: 13px; text-decoration: none; cursor: grab; border: 1px dashed rgba(27, 20, 20, .35); }
.bookmarklet:active { cursor: grabbing; }
.kit summary { font-size: 15px; }
.kit-grid { display: grid; grid-template-columns: 130px 1fr auto; gap: 8px 12px; align-items: center; margin: 10px 0; }
.kit-grid .k { font-size: 13px; font-weight: 600; color: var(--muted); }
.kit-grid .v { overflow-wrap: anywhere; font-size: 14px; }
.kit-grid textarea { grid-column: 1 / -1; font-size: 13.5px; }
@media (max-width: 700px) { .kit-grid { grid-template-columns: 1fr auto; } .kit-grid .k { grid-column: 1 / -1; margin-bottom: -6px; } }

/* ---- my resumes ---- */
.split.library { grid-template-columns: minmax(300px, 400px) 1fr; }
@media (max-width: 900px) { .split.library { grid-template-columns: 1fr; } }
.lib-folders { display: flex; flex-direction: column; gap: 2px; margin: 10px 0 6px; }
.lib-folder { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; }
.lib-folder.active { background: var(--chip); }
.lib-folder-name, .lib-name { border: 0; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; padding: 0; font-weight: 600; flex: 1; overflow-wrap: anywhere; min-width: 0; }
.lib-folder-name:hover, .lib-name:hover { color: var(--accent-text); }
.lib-folder .icon-btn, .lib-item .icon-btn { opacity: 0; }
.lib-folder:hover .icon-btn, .lib-item:hover .icon-btn, .lib-folder:focus-within .icon-btn, .lib-item:focus-within .icon-btn, .lib-item.active .icon-btn { opacity: 1; }
.icon-btn.small { width: 26px; height: 26px; font-size: 15px; line-height: 1; }
.lib-new { display: flex; gap: 8px; margin: 6px 0 16px; }
.lib-new input { flex: 1; }
.lib-list { display: flex; flex-direction: column; gap: 8px; }
.lib-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; }
.lib-item.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--ring); }
.lib-item .lib-sub { grid-column: 1; }
.lib-item .lib-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 4px; }
.lib-move { width: auto; padding: 4px 6px; font-size: 12px; max-width: 120px; }
.lib-rename { font: inherit; font-weight: 600; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--primary); width: 100%; min-width: 0; }
.lib-head { margin-bottom: 10px; }
.lib-title { font-family: "Manrope", -apple-system, sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -.02em; border: 1px solid transparent; background: transparent; padding: 4px 6px; margin-left: -6px; border-radius: 8px; width: 100%; color: var(--text); }
.lib-title:hover, .lib-title:focus { border-color: var(--border); background: var(--field); outline: none; }
.lib-none { padding: 10px 2px; }

/* ---- the page: a heading with nothing in it still shows its × (so a bare rule can be removed), and the rules can go ---- */
.paper .p-section h2 { border-bottom-width: var(--prule, 1.5pt); }
.paper h2:has(.t:empty) .del-btn, .paper .p-row1:has(.l .t:empty) .del-btn { display: inline-block; }
.style-bar .style-check { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; cursor: pointer; }
.style-bar .style-check input { margin: 0; accent-color: var(--primary); }

/* ---- apply: setting up one-click autofill ---- */
.setup-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin: 8px 0 4px; background: var(--field); display: flex; flex-direction: column; gap: 10px; }
.setup-opt { display: flex; flex-direction: column; gap: 6px; }
.setup-opt > b { font-size: 14.5px; }
.setup-or { text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.setup-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.setup-steps li { line-height: 1.5; }
kbd { font: 600 12.5px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #fff; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.bookmarklet { font-size: 14px; padding: 7px 14px; box-shadow: 0 6px 16px -8px rgba(255, 106, 31, .7); }
.drag-hint { display: inline-block; margin-left: 6px; color: var(--primary); font-weight: 800; animation: nudge 1.2s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.ext-ok { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: #ecfdf3; color: #166534; font-weight: 700; font-size: 12.5px; }
@media (prefers-reduced-motion: reduce) { .drag-hint { animation: none; } }

/* ---- phones: the page and its controls ---- */
@media (max-width: 700px) {
  .banner { top: auto; bottom: 16px; }
  .paper { padding: 16px 14px; min-height: 0; }
  #rv-result, #t-result, #b-output-wrap, #iv-chat-wrap, #iv-feedback, #rv-loading, #t-loading, #b-loading, #iv-loading, #t-apply-panel { scroll-margin-top: calc(var(--topbar-h, 119px) + 16px); }
  .score-row { flex-wrap: wrap; }
}

/* ---- My resumes: cards that read well at any width, tools that show on touch, the open resume in reach ---- */
.lib-folder { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px; }
.lib-folder .lib-count { min-width: 2ch; text-align: right; }
.lib-tools { display: inline-flex; gap: 2px; }
.lib-item { grid-template-columns: minmax(0, 1fr); }
.lib-item .lib-name { overflow-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lib-item .lib-actions { grid-column: 1; grid-row: auto; display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.lib-item .lib-move { flex: 1; max-width: none; }
@media (hover: none) { .lib-folder .icon-btn, .lib-item .icon-btn { opacity: 1; min-width: 40px; min-height: 40px; } }
input.lib-title { font-family: "Manrope", -apple-system, sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -.02em; border: 1px solid transparent; background: transparent; padding: 4px 6px; margin-left: -6px; border-radius: 8px; width: 100%; color: var(--text); }
input.lib-title:hover, input.lib-title:focus { border-color: var(--border); background: var(--field); outline: none; }
input.lib-rename { font: inherit; font-weight: 600; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--primary); background: #fff; width: 100%; min-width: 0; }
.lib-back { display: none; margin-bottom: 8px; }
#lib-open { scroll-margin-top: calc(var(--topbar-h, 73px) + 16px); }
@media (min-width: 901px) { .split.library > .col:last-child { position: sticky; top: calc(var(--topbar-h, 73px) + 14px); max-height: calc(100vh - var(--topbar-h, 73px) - 28px); overflow-y: auto; } }
@media (max-width: 900px) { .lib-back { display: inline-block; } }
.lib-readonly .lib-item .lib-actions { display: none; }

/* ---- the plans window on a phone: its head and the Monthly/Yearly switch stay on screen ---- */
@media (max-width: 700px) {
  .plans-card .modal-head { position: sticky; top: -16px; z-index: 2; background: var(--surface); padding-top: 8px; }
  .plans-card .interval-toggle { position: static; }
  .plan-card.current { order: 3; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { min-width: 0; padding: 8px 5px; font-size: 12.5px; }
}

/* Interview setup: folded extras, a start button that stays in reach, the finished-interview row and the scorecard. */
.more-options { margin: 6px 0 12px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; background: var(--bg); }
.more-options > summary { cursor: pointer; padding: 10px 0; font-weight: 600; list-style-position: inside; }
.more-options > summary .muted { font-weight: 400; margin-left: 6px; }
.more-options[open] { padding-bottom: 10px; }
.start-bar { position: sticky; bottom: 0; z-index: 5; background: var(--surface); padding: 10px 0; border-top: 1px solid var(--border); }
.done-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: center; }
.q-score { display: inline-block; min-width: 42px; text-align: center; padding: 1px 8px; margin-right: 6px; border-radius: 999px; font-weight: 700; font-size: 12px; color: #fff; background: var(--muted); }
.q-score.good { background: var(--ok); } .q-score.mid { background: var(--warn); } .q-score.low { background: var(--danger); }
.q-card .row.worked { border-left: 3px solid var(--ok); padding-left: 8px; }
.q-card .row.improve { border-left: 3px solid var(--warn); padding-left: 8px; }
.skills { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media print {
  #print-root.print-feedback { font: 11pt/1.45 system-ui, sans-serif; color: #000; }
  #print-root.print-feedback details > summary { list-style: none; font-weight: 700; margin: 10px 0 4px; }
  #print-root.print-feedback .q-card { break-inside: avoid; }
  #print-root.print-feedback .q-score { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.voice-settings { margin-top: 6px; font-size: 13px; }
.voice-settings > summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.voice-settings[open] > summary { margin-bottom: 6px; }
@media (max-width: 700px) {
  .voice-actions .btn { flex: 1 1 auto; }
  .start-bar .btn { width: 100%; }
}

/* Result toolbars: the main actions, a More menu for the rest, and a row of next steps that scrolls away. */
.toolbar .btn { white-space: nowrap; }
.more-menu { position: relative; display: inline-block; }
.more-menu > summary { list-style: none; cursor: pointer; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu > summary::after { content: " ▾"; font-size: 11px; }
.more-menu .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 190px; display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow), 0 10px 30px -10px rgba(40, 16, 12, .25); }
.more-menu .menu .btn { border-color: transparent; background: transparent; text-align: left; justify-content: flex-start; }
.more-menu .menu .btn:hover { background: var(--chip); }
.more-menu .menu .danger-text { color: var(--danger); }
.next-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.next-row .btn { white-space: nowrap; }
.edit-bar .toolbar { flex-wrap: wrap; }
@media (hover: none) {
  /* On touch screens the + buttons of the line being edited sit in the flow instead of over the next line. */
  .paper .p-entry:focus-within > .add-row { position: static; transform: none; margin: 3pt 0 4pt; }
  .paper .p-section:focus-within > .add-row { visibility: hidden; }
  .paper .p-section:has(> h2:focus-within) > .add-row { visibility: visible; position: static; transform: none; margin: 4pt 0; }
}
.score-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.score-cap { text-align: center; max-width: 90px; line-height: 1.2; }
/* Note and resume boxes grow with what's in them, so no line is cut in half. */
.panel textarea { field-sizing: content; min-height: 4.5em; max-height: 60vh; }
.plan-card { position: relative; }
.plan-flag { position: absolute; top: -11px; left: 14px; padding: 2px 10px; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-size: 11.5px; font-weight: 700; }
.plan-card li.plan-plus { list-style: none; margin-left: -18px; font-weight: 700; }
.plan-card li.plan-lacks { list-style: none; margin-left: -18px; color: var(--muted); font-style: italic; }
.plan-card.lacks .plan-price { opacity: .75; }
/* With a result on screen at laptop widths, the form column narrows so the page gets the room. */
@media (min-width: 901px) and (max-width: 1320px) {
  .split:has(#rv-result:not(.hidden)), .split:has(#t-result:not(.hidden)), .split:has(#b-output-wrap:not(.hidden)) { grid-template-columns: minmax(280px, 330px) 1fr; }
}
/* The ↑ ↓ × tools float just above the right end of their row, so they take no room when hidden. */
.paper .p-row1, .paper .p-line, .paper h2 { position: relative; }
.paper .row-tools { position: absolute; right: 0; bottom: 100%; margin: 0; padding: 2px; background: #fff; border-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, .14); z-index: 4; }
/* Why a heading, name, date or label changed: a small card under it on hover, or when it is tapped or focused,
   floating so the page doesn't jump. */
.paper .p-row .l, .paper .p-row .r, .paper h1, .paper .p-contact, .paper .p-line b { position: relative; }
.paper .edit-note.inline { position: absolute; left: 0; top: 100%; z-index: 6; width: max-content; max-width: min(340px, 80vw); padding: 5px 9px; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .25); white-space: normal; text-align: left; }
.paper .p-row .r .edit-note.inline { left: auto; right: 0; }
.paper .p-row .l:focus-within .edit-note.inline, .paper .p-row .r:focus-within .edit-note.inline, .paper h1:focus-within .edit-note.inline, .paper .p-contact:focus-within .edit-note.inline, .paper h2:focus-within .edit-note.inline, .paper .p-line b:focus-within .edit-note.inline { display: block; font-style: normal; font-weight: 400; }
.page-fit { font-weight: 600; color: var(--ok); }
.page-fit.over { color: var(--warn); }
.lock-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.example-card { width: min(860px, 100%); }
.example-card .paper-wrap { max-height: none; }
/* The interviewer's current question, inside the voice panel (on a phone the chat sits a screen below). */
.voice-question { display: none; }
@media (max-width: 700px) {
  .voice-question:not(:empty) { display: block; margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--chip); font-size: 15px; line-height: 1.45; }
}

/* ===== Design polish round 1 ===== */

/* F1 the page sits on a tinted desk, so it reads as a sheet of paper, not a blank card */
#b-output, #rv-paper, #t-paper, #lib-paper, #example-body .paper-wrap { background: #f4eee9; border-radius: 12px; padding: 24px; }
.paper { border: 0; box-shadow: 0 1px 2px rgba(40, 16, 12, .06), 0 14px 34px -16px rgba(40, 16, 12, .28); }
#rv-paper .order-bar { margin-bottom: 16px; }
@media (max-width: 700px) { #b-output, #rv-paper, #t-paper, #lib-paper { padding: 10px; margin: 0 -8px; border-radius: 10px; } }

/* F2 toolbars: one height for every button, and the More menu lines up */
.toolbar { align-items: center; }
.more-menu { margin: 0; }

/* F3 one loud button per bar: Next steps are quiet chips, not black buttons */
.next-row .btn, .next-row .btn.accent { background: var(--chip); color: var(--accent-text); border-color: transparent; }
.next-row .btn:hover { background: #ffe4d1; filter: none; }

/* F4 brand-coloured native controls */
input[type="radio"], input[type="checkbox"] { accent-color: var(--primary); }

/* F5 the file picker looks like the app's buttons */
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 6px 12px; margin-right: 10px; cursor: pointer; }
input[type="file"]::file-selector-button:hover { border-color: var(--primary); }

/* F6 your chat answers in a soft brand tint, not a slab of orange */
.msg.candidate { background: var(--chip); color: var(--text); border: 1px solid #fed7aa; }

/* F7 focus mode while interviewing: the setup steps aside */
#tab-interview .split:has(#iv-chat-wrap:not(.hidden)) { grid-template-columns: minmax(0, 860px); justify-content: center; }
#tab-interview .split:has(#iv-chat-wrap:not(.hidden)) #iv-setup { display: none; }
#tab-interview:has(#iv-feedback:not(.hidden)) #iv-form { display: none; }
#iv-finish:disabled { background: transparent; color: var(--muted); border-color: var(--border); opacity: 1; }

/* F8 scores as rings, like the welcome page */
.score { --c: var(--ok); position: relative; isolation: isolate; color: var(--text); background: conic-gradient(var(--c) calc(var(--v, 100) * 1%), #f2ebe6 0); }
.score::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); z-index: -1; }
.score.good { --c: var(--ok); background: conic-gradient(var(--c) calc(var(--v, 100) * 1%), #f2ebe6 0); }
.score.mid { --c: #f59e0b; background: conic-gradient(var(--c) calc(var(--v, 100) * 1%), #f2ebe6 0); }
.score.low { --c: var(--danger); background: conic-gradient(var(--c) calc(var(--v, 100) * 1%), #f2ebe6 0); }
.score small { color: var(--muted); }

/* F9 style controls folded into one line (HTML: attachStyleBar renders <details><summary>Page style …</summary><div class="style-body">…</div></details>) */
.style-bar.folded { display: block; padding: 0; }
.style-bar.folded > details { margin: 0; }
.style-bar.folded summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600; }
.style-bar.folded summary::-webkit-details-marker { display: none; }
.style-bar.folded summary::before { content: "Aa"; font: 700 12px Georgia, serif; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: var(--chip); color: var(--accent-text); }
.style-bar.folded summary .sum-sub { font-weight: 400; color: var(--muted); }
.style-bar.folded summary .page-fit { margin-left: auto; }
.style-bar.folded .style-body { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 4px 12px 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.style-bar input[type="color"] { border-radius: 50%; width: 24px; height: 24px; overflow: hidden; }

/* F10 the account menu email on one line */
.acct-menu-email { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }

/* F11 phone tabs: one line each, short labels, a dot for a locked tab */
.tab .t-short { display: none; }
@media (max-width: 700px) {
  .tab { flex: 1 1 auto; white-space: nowrap; padding: 9px 6px; font-size: 13.5px; }
  .tab .t-long { display: none; } .tab .t-short { display: inline; }
  .tab .lock-badge { font-size: 0; width: 7px; height: 7px; padding: 0; margin-left: 3px; vertical-align: 6px; background: var(--primary); }
  .tab.active .lock-badge { background: var(--primary-ink); }
}

/* F12 inputs stay one column when the form column is narrow */
.col { container-type: inline-size; }
@container (max-width: 400px) { .grid2 { grid-template-columns: 1fr; } }
.grid2 { align-items: end; }

/* F13 disabled "Saved" reads as a state, not a broken button */
#lib-save:disabled, #t-save:disabled, #b-save:disabled, #rv-save:disabled { background: transparent; border-color: transparent; color: var(--ok); opacity: 1; cursor: default; }

/* F14 placeholders lighter and warm, so examples don't read as filled-in values */
::placeholder { color: #a8968e; opacity: 1; }

/* F15 empty states: an outline page instead of an emoji */
.placeholder { padding: 48px 32px; max-width: 520px; margin: 0 auto; }
.placeholder p { font-size: 14.5px; line-height: 1.55; }

/* F16 sticky interview start bar: full-bleed with a soft edge */
.start-bar { margin: 0 -22px -22px; padding: 12px 22px; border-radius: 0 0 var(--radius) var(--radius); border-top: 1px solid var(--border); box-shadow: 0 -10px 18px -14px rgba(40, 16, 12, .25); }

/* F17 the example window: the page ends with its content, and the button is always on screen */
.example-card .paper { min-height: 0; }
.example-card .row-tools, .example-card .add-row { display: none !important; }
.example-card > .toolbar { position: sticky; bottom: -16px; background: var(--surface); padding: 12px 0 4px; margin: 0; border-top: 1px solid var(--border); }

/* F18 summaries: one size, the hint stays on one line */
.more-options > summary { font-size: 15px; }
.more-options > summary .muted { font-size: 12.5px; }

/* F19 apply kit question labels use the full row */
.kit-grid .k.q { grid-column: 1 / 3; color: var(--text); }

/* F20 phones: the result's main actions in a bar at the bottom, in thumb reach (Review's count + Keep/Undo all move to a plain bar above the page, like Tailor's) */
@media (max-width: 700px) {
  .sticky-bar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 40; margin: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--border); box-shadow: 0 -10px 24px -16px rgba(40, 16, 12, .35); }
  .sticky-bar .toolbar { flex-wrap: nowrap; margin: 0; }
  .sticky-bar #t-saved { display: none; }
  .sticky-bar .more-menu .menu { top: auto; bottom: calc(100% + 6px); }
  .sticky-bar .hide-phone { display: none; }

  .banner { bottom: 84px; }
  .paper .p-name { font-size: 22pt; }
}
.more-options > summary .muted { display: block; margin: 2px 0 0 18px; }
/* The phone's bottom bar: short labels and room for three buttons. */
@media (max-width: 700px) {
  .sticky-bar .btn.small { padding: 7px 10px; font-size: 13px; }
  .sticky-bar.toolbar, .edit-bar.sticky-bar { justify-content: safe center; }
}
/* Desktop tabs: a locked tab's plan is a quiet outline, not a loud pill. */
@media (min-width: 701px) {
  .tab .lock-badge { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }
  .tab.active .lock-badge { background: transparent; color: var(--primary-ink); box-shadow: inset 0 0 0 1px rgba(27, 20, 20, .4); }
}
#plans-title { font: 800 24px/1.1 "Manrope", sans-serif; letter-spacing: -.02em; }
.lib-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 14px 0 4px; }
.lib-item .lib-move { flex: 0 1 auto; width: auto; max-width: 60%; font-size: 12px; padding: 3px 8px; border-radius: 999px; border-color: transparent; background-color: var(--chip); color: var(--accent-text); }
.placeholder .ph-page { display: block; margin: 0 auto 14px; }
.ph-faces { display: flex; justify-content: center; margin-bottom: 14px; }
.ph-faces img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface); box-shadow: var(--shadow); }
.ph-faces img + img { margin-left: -14px; }
.on-touch { display: none; }
@media (hover: none) { .on-hover { display: none; } .on-touch { display: inline; } }
@media (max-width: 700px) { .start-bar { margin: 0 -16px -16px; padding: 12px 16px; } .banner { font-size: 13.5px; padding: 10px 14px; } }
.fit-line .muted { font-weight: 400; }
/* ===== Design polish round 1, fixes after the visual check ===== */
/* Saved reads as a state, the same on every tab. */
.btn.is-saved { background: transparent; border-color: transparent; color: var(--ok); }
/* Score rings: the number and its label sit together in the middle. */
.score { align-content: center; line-height: 1.05; }
.score small { margin-top: 1px; font-size: 10px; }
/* Plan pills on buttons are outlines, like the tabs. */
.next-row .btn .lock-badge, .sticky-bar .btn .lock-badge { background: transparent; color: currentColor; box-shadow: inset 0 0 0 1px currentColor; opacity: .75; }
/* Round colour swatches. */
.style-bar input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.style-bar input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.style-bar input[type="color"]::-moz-color-swatch { border: 0; border-radius: 50%; }
/* The folded style line says it opens, and stays one line. */
.style-bar.folded summary .sum-sub::after { content: " ▾"; }
.style-bar.folded details[open] summary .sum-sub::after { content: " ▴"; }
.style-bar.folded summary { white-space: nowrap; }
.style-bar.folded summary .page-fit { flex: none; }
.style-bar.folded summary .sum-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .style-bar.folded summary .sum-sub { display: none; } }
/* After the scorecard, a spoken interview's answering controls step aside too. */
#tab-interview:has(#iv-feedback:not(.hidden)) #iv-voice :is(.voice-actions > :not(#iv-replay), .live-transcript, .mic-row, .voice-help, .voice-settings, .silence-track, .silence-count) { display: none; }
/* With the Apply panel open, Apply → is no longer the loud button. */
#t-result:has(#t-apply-panel:not(.hidden)) #t-apply { background: var(--surface); color: var(--text); border-color: var(--border); }
/* Apply kit on a phone: the question with its Copy button on one row. */
.kit-grid > .btn { justify-self: end; }
@media (max-width: 700px) { .kit-grid .k.q { grid-column: 1; margin-bottom: 0; } }
/* Phones: room under the page for the bottom bar only while it shows; tight bars on very narrow screens. */
@media (max-width: 700px) {
  body:has(.panel.active .sticky-bar:not(.hidden)):not(:has(.panel.active #b-output-wrap.hidden)) .foot { padding-bottom: calc(20px + 72px + env(safe-area-inset-bottom)); }
  .sticky-bar { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  #example-body .paper-wrap { padding: 10px; }
  .phone-hide { display: none !important; }
}
@media (max-width: 360px) { .sticky-bar { padding-left: 8px; padding-right: 8px; } .sticky-bar .toolbar { gap: 6px; } .sticky-bar .btn.small { padding: 7px 8px; } }
@media (max-width: 340px) { .tabs { gap: 2px; } .tab { padding: 8px 3px; font-size: 12.5px; } .tab .lock-badge { margin-left: 2px; } }
.ph-mic { margin-bottom: 14px; }
/* Phones: the "runs onto 2 pages" note wraps under the Page style line instead of running off the screen. */
@media (max-width: 700px) {
  .style-bar.folded summary { white-space: normal; flex-wrap: wrap; }
  .style-bar.folded summary .page-fit { flex: 1 1 100%; margin-left: 34px; }
}

/* A build, review or tailoring that didn't finish: said where its result would have been, with Try again. */
.work-error { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; border-radius: 10px; font-size: 14px; }
.work-error span { flex: 1 1 240px; }
/* The interviewer is thinking: three dots in its bubble until the first words arrive. */
.msg.typing .body::after { content: "•••"; letter-spacing: 3px; color: var(--muted); animation: typing 1.2s ease-in-out infinite; }
@keyframes typing { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.fb-about { margin: -4px 0 10px; }

/* A saved resume after a downgrade: open, download and print it, but no editing that couldn't be saved. */
.lib-readonly-paper .add-row, .lib-readonly-paper .row-tools, .lib-readonly-paper .edit-ctl, .lib-readonly .edit-how-to { display: none !important; }

/* ---------- Round 6: phones ---------- */
@media (max-width: 700px) {
  /* iPhone Safari zooms into any field with text under 16px, and stays zoomed: 16px everywhere one can type. */
  input[type="text"], input[type="email"], input[type="password"], input[type="search"], input:not([type]), textarea, select, .auth-form input, .ask-row .ask-in, .style-bar select { font-size: 16px; }
  /* After a build, the resume comes first and the "Next" suggestions after it. */
  #b-output-wrap { display: flex; flex-direction: column; }
  #b-output-wrap .next-row { order: 9; margin-top: 12px; }
  /* My resumes: no empty card under the list when nothing is open. */
  .split.library > .col:last-child:has(> #lib-open.hidden):has(> #lib-empty.phone-hide) { display: none; }
  /* A locked tab: a small lock, not an orange "new" dot. */
  .tab .lock-badge {
    font-size: 0; width: 9px; height: 10px; padding: 0; margin-left: 4px; vertical-align: 0; background: currentColor; opacity: .55; border-radius: 0;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M2.5 5V3.5a2.5 2.5 0 0 1 5 0V5H9v7H1V5zM4 5h2V3.5a1 1 0 0 0-2 0z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M2.5 5V3.5a2.5 2.5 0 0 1 5 0V5H9v7H1V5zM4 5h2V3.5a1 1 0 0 0-2 0z'/%3E%3C/svg%3E") center/contain no-repeat;
  }
}
/* Touch screens: controls big enough for a thumb. */
@media (hover: none) {
  .paper .row-tools { gap: 8px; padding: 4px; }
  .paper .row-tools .move-btn, .paper .row-tools .del-btn { min-width: 40px; min-height: 36px; font-size: 16px; line-height: 1; }
  .paper .add-btn { min-height: 36px; padding: 8px 12px; }
  .checklist .link-btn { min-height: 40px; padding: 10px 8px; }
  .checklist li { column-gap: 16px; }
  .edit-ctl button { width: 40px; height: 40px; }
}
/* Desktop: a job's "+ bullet" sits right of the page's left edge, so it never covers the next heading. */
@media (hover: hover) { .paper .p-entry > .add-row { left: auto; right: 150px; } }
/* While loading, only the clock shows: the step it's on is for screen readers (role="status"), not on screen. */
.loading > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.loading .load-clock { width: 104px; height: 104px; }

/* ---------- Round 7: design fixes ---------- */
/* Touch: a job's (or heading's) ↑ ↓ × get their own band at the top of it, never over the line above or the heading. */
@media (hover: none) {
  .paper .p-entry:focus-within > .p-row1, .paper .p-section > h2:focus-within { padding-top: 46px; position: relative; }
  .paper .p-entry:focus-within > .p-row1 .row-tools, .paper .p-section > h2:focus-within .row-tools { top: 0; bottom: auto; box-shadow: none; border: 1px solid var(--border); }
}
@media (max-width: 700px) {
  /* Phone tabs: the lock takes the tab's own colour, and sits beside the label at the same height as unlocked tabs. */
  .tab { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
  .tab .lock-badge { color: inherit; margin-left: 0; vertical-align: 0; }
  /* Phone interview: the answer box uses the full width with Send under it, short enough to stay above the keyboard. */
  #iv-answer { max-height: 30vh; }
  .chat-input { flex-direction: column; align-items: stretch; gap: 8px; }
  #iv-send { align-self: flex-end; }
  .chat { min-height: 0; max-height: 45vh; }
  /* Checklist rows: badge, question, then actions, the same way for every kind. */
  .checklist li > span:nth-child(2) { flex-basis: 100%; }
  /* Scores beside their headline, not alone on a row. */
  .score-row { flex-wrap: nowrap; align-items: flex-start; gap: 12px; }
  .score-row .score { width: 64px; height: 64px; font-size: 22px; flex: none; }
  .score-row .score-cap { font-size: 11px; max-width: 70px; }
  /* After a build: "Next" on its own line, then full-width buttons. */
  #b-output-wrap .next-row > .muted { flex-basis: 100%; }
  #b-output-wrap .next-row .btn { flex: 1 1 100%; justify-content: space-between; }
}
/* The loading clock sits in the middle of its card. */
.col:has(> .loading:not(.hidden)) { display: flex; flex-direction: column; justify-content: center; }
/* A primary button that's busy stays readable. */
.btn.primary:disabled { opacity: 1; background: #ffd9c4; color: #7a3a14; border-color: #ffd9c4; }
/* A saved resume's whole card opens it. */
.lib-item { cursor: pointer; }
.lib-item:hover { border-color: var(--primary); }

/* Earlier interview scorecards, under the one showing */
.fb-earlier { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: baseline; margin: 2px 0 12px; }
.fb-earlier[hidden] { display: none; }
.fb-earlier .link-btn { font-size: 13px; }
@media (hover: none) { .fb-earlier .link-btn { min-height: 36px; } }

/* ---------- round 9 design pass ---------- */
/* Phone: every control a thumb uses is at least 44px tall. */
@media (max-width: 700px) {
  .tab { min-height: 44px; }
  .acct-chip { min-height: 44px; }
  .sticky-bar .btn.small { min-height: 44px; padding-top: 11px; padding-bottom: 11px; } /* padding, so More (a <summary>) is centred like the rest */
  .banner { bottom: calc(76px + env(safe-area-inset-bottom)); } /* toasts clear the taller bar on notched phones */
  /* Review: the page first, its Next chips after it (as on Build). */
  #rv-result { display: flex; flex-direction: column; }
  #rv-result > .next-row { order: 9; margin-top: 12px; }
}
.modal-head > .icon-btn, .auth-close { min-width: 44px; min-height: 44px; display: grid; place-items: center; margin: -10px -10px 0 0; }
@media (hover: none) { .lib-folder-name { min-height: 44px; } }
a.btn { text-decoration: none; display: inline-block; }
/* The interview is over: the answer box goes, leaving Get my scorecard. */
#iv-chat-wrap:has(#iv-chat .done-row) #iv-form { display: none; }
/* My resumes: Apply is the one filled button once the copy is saved. */
#lib-save:disabled + #lib-apply:not(.hidden) { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
/* Mid-interview, Send is the loud button; ending is there but quiet. */
#iv-finish:not(:disabled):not(.pulse-btn) { background: var(--surface); color: var(--text); border-color: var(--border); }
/* How you answer (Speak / Type): cards like Difficulty's. */
.radio-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.radio-row .radio { position: relative; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 44px; padding: 8px 10px; border: 2px solid var(--border); border-radius: 10px; background: var(--bg); }
.radio-row .radio input { position: absolute; opacity: 0; inset: 0; }
.radio-row .radio:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.radio-row .radio:has(input:focus-visible) { outline: 2px solid var(--primary); }
.radio-row .radio:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.radio-row .radio .muted.small { font-size: 11.5px; line-height: 1.3; }
.length-pick { display: flex; align-items: center; gap: 8px; flex-basis: 100%; white-space: nowrap; } /* its own row, so the buttons line up under it at any column width */
.length-pick select { font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--field); color: var(--text); }
/* Saved answers under Apply. */
.saved-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.saved-row:last-child { border-bottom: 0; }
.saved-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; margin-top: 8px; }
@media (max-width: 700px) { .saved-add { grid-template-columns: 1fr; } }
/* The PDFs first in the kit's pieces, before the long list to copy. */
.kit > .toolbar { margin: 8px 0 4px; }

/* Wide screens: the tabs are a menu down the left side, under the header, each with its icon. The menu is 236px wide
   (room for the longest name with its plan badge), so it starts at 1137px, where the page beside it is still wide
   enough (901px) for the form and the result side by side; narrower windows keep the tabs in the header, and phones
   keep theirs as they were. */
.tab .tab-ico { display: none; }
@media screen and (min-width: 1137px) {
  /* Only where there is a side menu (the app): the welcome and autofill pages have no tabs, and stay centred. */
  body:has(.topbar .tabs) { --side-w: 236px; padding-left: var(--side-w); }
  body:has(.topbar .tabs) .topbar { margin-left: calc(-1 * var(--side-w)); }
  .topbar .brand-tag { display: block; } /* the tabs no longer need the header's room */
  .topbar .account { margin-left: auto; }
  .tabs {
    position: fixed; left: 0; top: var(--topbar-h, 73px); bottom: 0; width: var(--side-w); box-sizing: border-box;
    flex-direction: column; align-items: stretch; gap: 2px; margin: 0; padding: 18px 12px;
    background: #fff; border-right: 1px solid var(--border); border-radius: 0; overflow-y: auto;
  }
  .tab { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 14.5px; text-align: left; white-space: nowrap; }
  .tab:not(.active):hover { background: #f6f1ed; }
  .tab .tab-ico { display: block; flex: none; width: 18px; height: 18px; }
  .tab .lock-badge { margin-left: auto; }
}
/* The rule above for laptop widths (the form column narrows once a result is showing), for the same page width with
   the menu beside it. */
@media screen and (min-width: 1321px) and (max-width: 1556px) {
  .split:has(#rv-result:not(.hidden)), .split:has(#t-result:not(.hidden)), .split:has(#b-output-wrap:not(.hidden)) { grid-template-columns: minmax(280px, 330px) 1fr; }
}
/* Undo and Redo for the page, at the right of the Page style line. */
.style-bar.folded { display: flex; align-items: flex-start; }
.style-bar.folded > details { flex: 1 1 auto; min-width: 0; }
.history-btns { flex: none; display: inline-flex; gap: 4px; padding: 5px 8px 5px 0; }
.history-btns .btn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; }
.history-btns .btn svg { width: 15px; height: 15px; flex: none; }
.history-btns .btn:disabled { opacity: .4; cursor: default; }
@media (max-width: 520px) { .history-btns .btn span { display: none; } .history-btns .btn { padding: 6px 9px; } } /* arrows alone on a phone */

/* ---- Find jobs: the search and its list on the left, the job picked on the right ---- */
.j-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-bottom: 6px; }
.j-filters label { display: flex; flex-direction: column; gap: 4px; }
.j-filters select { font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--field); color: var(--text); }
.j-filters .j-remote { flex-direction: row; align-items: center; gap: 6px; padding: 7px 0; color: var(--text); font-weight: 600; cursor: pointer; }
.j-resume { margin-top: 14px; }
.j-resume > summary .muted { font-weight: 400; margin-left: 6px; }
.j-status { margin: 14px 0 8px; min-height: 1.4em; }
.j-list { display: flex; flex-direction: column; gap: 8px; }
.j-where-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.j-locate { font-weight: 600; white-space: nowrap; }
.j-for { display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: 999px; background: var(--chip); color: var(--text); font-size: 12px; font-weight: 600; width: fit-content; }
.j-head .j-for { margin-top: 6px; font-size: 12.5px; }
.j-note { margin: 0 0 8px; }
.j-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.j-item:hover { border-color: #e0cfc4; background: #fffaf6; }
.j-item.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); background: #fffaf6; }
.j-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.j-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.j-main b { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.j-sub { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
/* The score as a small ring: how full it is is the score. */
.j-score { --c: #b8a9a1; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; position: relative; isolation: isolate; background: conic-gradient(var(--c) calc(var(--v, 0) * 1%), #f2ebe6 0); }
.j-score::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); z-index: -1; }
.j-item.active .j-score::before, .j-item:hover .j-score::before { background: #fffaf6; }
.j-score.good, .j-bar i.good { --c: var(--ok); }
.j-score.mid, .j-bar i.mid { --c: #f59e0b; }
.j-score.far, .j-bar i.far { --c: #b8a9a1; }
.score.far { --c: #b8a9a1; background: conic-gradient(var(--c) calc(var(--v, 100) * 1%), #f2ebe6 0); }
.j-more { justify-content: center; margin-top: 12px; }
.j-divide { margin: 10px 2px 2px; padding-top: 12px; border-top: 1px dashed var(--border); }

/* The employer's mark: initials on a tint, with the logo over them when there is one. */
.j-logo { flex-shrink: 0; position: relative; width: var(--sz, 44px); height: var(--sz, 44px); border-radius: 10px; display: grid; place-items: center; overflow: hidden; background: var(--tint, var(--chip)); color: #4a3a34; font-weight: 800; font-size: calc(var(--sz, 44px) * .36); letter-spacing: .02em; }
.j-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 12%; box-sizing: border-box; opacity: 0; }
.j-logo img.ok { opacity: 1; }
.j-logo img.small { padding: 22%; } /* a 32-pixel icon, drawn near its own size */
.j-logo:has(img.ok) { box-shadow: inset 0 0 0 1px var(--border); }
.j-back { display: none; margin-bottom: 10px; }
.j-head { margin-bottom: 14px; display: flex; align-items: flex-start; gap: 14px; }
.j-head > div { min-width: 0; }
.j-head .headline { font-size: 22px; line-height: 1.25; }
.j-where { font-size: 15px; }
.j-facts { margin-top: 4px; }
.j-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.j-actions .btn { text-decoration: none; white-space: nowrap; }
.j-fit { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; background: #fffdfb; margin-bottom: 6px; }
.j-fit .score-row { align-items: flex-start; }
.j-fit .headline { font-size: 17px; line-height: 1.35; }
.j-fit p { margin-bottom: 10px; }
.j-full-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.j-next { font-size: 14.5px; }
.j-criteria { display: flex; flex-direction: column; gap: 14px; margin: 6px 0 16px; }
.j-crit-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14.5px; }
.j-crit-top span { font-weight: 800; font-variant-numeric: tabular-nums; }
.j-bar { height: 8px; border-radius: 999px; background: #f2ebe6; overflow: hidden; margin: 5px 0 4px; }
.j-bar i { display: block; height: 100%; border-radius: 999px; background: var(--c, #b8a9a1); }
.j-chip-label { margin: 8px 0 6px; }
.j-basis { margin: 10px 0 0 !important; }
.j-about { font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.j-about p { margin: 0 0 10px; }
.j-source { margin-top: 14px; }

/* Wide screens: the job picked stays in view while the list beside it scrolls. */
@media (min-width: 901px) { .split.jobs > .col:last-child { position: sticky; top: calc(var(--topbar-h, 73px) + 14px); max-height: calc(100vh - var(--topbar-h, 73px) - 28px); overflow-y: auto; } }
@media (max-width: 900px) {
  .j-back { display: inline-block; }
  .split.jobs > .col:last-child:has(> #j-detail.hidden) { display: none; } /* nothing picked yet: the list is the page */
}
@media (max-width: 700px) {
  .j-actions .btn { flex: 1 1 100%; text-align: center; }
  .j-fit { padding: 14px; }
  .j-fit .score-row { flex-wrap: nowrap; }
}

/* ---- Auto-apply: the queue under the job search ---- */
.j-auto { margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: #fffdfb; }
.j-auto-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.j-auto-list { margin: 0 0 10px; display: flex; flex-direction: column; gap: 8px; }
.j-auto-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.j-auto-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; overflow-wrap: anywhere; }
.j-auto-main b { font-size: 14px; line-height: 1.3; }
.j-auto-note { color: var(--warn); margin-top: 3px; }
.j-auto-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; text-align: right; }
.j-auto-state { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.j-auto-row.submitted .j-auto-state { color: var(--ok); }
.j-auto-row.needs_you .j-auto-state { color: var(--warn); }
.j-auto-row.failed .j-auto-state { color: var(--danger); }
.j-auto-ok { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 10px; line-height: 1.45; cursor: pointer; }
.j-auto-ok input { margin-top: 3px; flex-shrink: 0; }
.j-auto-go { align-items: center; margin-top: 0; }
.j-auto-row.review .j-auto-state { color: var(--accent-text); }
.j-auto-opts { margin: 0 0 10px; display: flex; flex-direction: column; gap: 2px; }
.j-auto-opts .j-auto-ok { margin: 0; color: var(--muted); }
.ask-card { width: min(640px, 100%); }
.aq-q { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid var(--border); }
.aq-q:first-child { border-top: 0; padding-top: 0; }
.aq-q > span { font-size: 14.5px; line-height: 1.45; font-weight: 600; }
.aq-q select, .aq-q input[type=text], .aq-q textarea { font: inherit; font-size: 14.5px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--field); color: var(--text); width: 100%; box-sizing: border-box; }
.aq-q .aq-check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; display: flex; }
.ask-card .toolbar { align-items: center; flex-wrap: wrap; position: sticky; bottom: -16px; background: var(--surface); padding: 12px 0 4px; border-top: 1px solid var(--border); }
.review-card { width: min(880px, 100%); }
.review-card .paper-wrap { max-height: none; }
.review-card .paper { min-height: 0; }
.review-card > .toolbar { position: sticky; bottom: -16px; background: var(--surface); padding: 12px 0 4px; margin: 0; border-top: 1px solid var(--border); align-items: center; flex-wrap: wrap; }
.ar-label { margin: 16px 0 6px; font-weight: 700; font-size: 14px; }
.ar-label:first-child { margin-top: 0; }
#ar-body textarea { width: 100%; box-sizing: border-box; font: inherit; line-height: 1.5; }
#ar-body details { margin-top: 12px; }
.ar-answers label { display: block; margin: 10px 0 4px; }
.j-auto-need { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: var(--chip); }
.j-actions .btn.is-on { border-color: var(--ok); color: var(--ok); }
.j-applied { align-self: center; font-weight: 700; color: var(--ok); padding: 0 6px; }
.j-auto-answers { margin-top: 10px; }
.j-std { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin: 8px 0; }
.j-std label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.j-std select, .j-std input { font: inherit; font-size: 13px; font-weight: 400; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--field); color: var(--text); }
@container (max-width: 420px) { .j-std { grid-template-columns: 1fr; } }
.j-auto-need p { margin: 0 0 8px; }
.j-auto-need p:last-child { margin-bottom: 0; }
.j-auto-get { display: flex; flex-wrap: wrap; gap: 8px; }
.j-auto-get .btn { text-decoration: none; }
.j-auto-need details { margin: 0 0 8px; }
.j-auto-need summary { font-size: 13px; font-weight: 700; padding: 2px 0; }
.j-auto-need li { margin: 6px 0; line-height: 1.45; }
