/* Plain Resume. App chrome: VAS K-10 Quiet + H-29 (square, grayscale, one burnt-red accent).
   The resume sheet is the user's content (VAS A-45), so its faces are chosen for parsers and print,
   not for the theme. */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: #fff; }
.app {
  min-height: 100vh;
  background: var(--k-ground, #fff);
  color: var(--k-text, #333);
  font: 15px/1.5 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---- top bar ---- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 24px;
  background: var(--k-ground, #fff);
  box-shadow: 0 1px 0 var(--k-field-border, #919191);
}
.brand {
  font-family: 'League Gothic', 'Inter', sans-serif;
  font-size: 30px; line-height: 1; letter-spacing: .02em;
  color: var(--k-text, #333); text-decoration: none;
}
.brand span { color: var(--k-accent, #ff4b33); }
.bar-status { margin: 0; flex: 1; font-size: 13px; color: var(--k-muted, #747474); }
.bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.mobile-tabs { display: none; }

/* ---- two columns ---- */
.work {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(360px, 1.1fr);
  gap: 24px;
  max-width: 1500px; margin: 0 auto; padding: 24px;
}
.editor { min-width: 0; }
.preview {
  position: sticky; top: 72px; align-self: start;
  max-height: calc(100vh - 88px); display: flex; flex-direction: column; gap: 10px; min-width: 0;
}

/* ---- form ---- */
fieldset.block { margin: 0 0 18px; padding: 18px 18px 14px; min-width: 0; }
fieldset.block > legend { float: left; width: 100%; padding: 0; margin: 0 0 10px; }
fieldset.block > legend + * { clear: both; }
.vas-card-title { font-weight: 600; font-size: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid2.tight { gap: 0 10px; }
.field { margin: 0 0 12px; min-width: 0; }
.field .vas-label { display: block; margin-bottom: 4px; }
.field .vas-input { width: 100%; }
.field.inline { display: flex; align-items: center; gap: 8px; margin: 0; }
.field.inline .vas-label { margin: 0; }
.field.inline .vas-input { width: auto; }
textarea.vas-input { resize: vertical; font: inherit; line-height: 1.45; }
.vas-hint { margin: 4px 0 0; }

.list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.item { padding: 14px; }
.item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.item-title { margin: 0; flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-tools { display: flex; gap: 4px; }
.vas-btn.sm { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.intro { margin: 0 0 18px; }
.intro .vas-btn { margin-top: 10px; }
.foot { font-size: 13px; color: var(--k-muted, #747474); padding: 8px 2px 32px; }

/* ---- preview ---- */
.pv-tools { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pv-pages { margin: 0 0 0 auto; font-size: 13px; color: var(--k-muted, #747474); }
.checks { border: 1px solid var(--k-field-border, #919191); background: var(--k-surface, #fff); }
.checks > summary { cursor: pointer; padding: 8px 12px; font-weight: 600; font-size: 14px; }
#checks-list { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow: auto; }
.pv-frame {
  flex: 1; min-height: 0; overflow: auto;
  background: #e9e9e9; padding: 16px;
  border: 1px solid var(--k-field-border, #919191);
}
.pv-scale { overflow: hidden; }
.pv-scale .sheet { transform-origin: top left; }

/* ---- the resume sheet (shared by preview and print) ---- */
.sheet {
  --page-w: 8.5in; --page-h: 11in; --pad: .55in;
  width: var(--page-w); min-height: var(--page-h);
  padding: var(--pad);
  background: #fff; color: #111;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  position: relative;
  font-family: Arial, Helvetica, sans-serif; font-size: 10.5pt; line-height: 1.35;
}
.sheet[data-paper="a4"] { --page-w: 210mm; --page-h: 297mm; }
.sheet .page-line {
  position: absolute; left: 0; right: 0; height: 0;
  border-top: 1px dashed #c33; pointer-events: none;
}
.sheet .page-line span {
  position: absolute; right: 6px; top: -18px; font: 11px/1 Inter, sans-serif; color: #c33; background: #fff; padding: 2px 4px;
}
.r-name { margin: 0; font-size: 20pt; line-height: 1.1; font-weight: 700; }
.r-headline { margin: 2px 0 0; font-size: 11.5pt; }
.r-contact { margin: 6px 0 0; font-size: 10pt; }
.r-sec { margin-top: 12pt; }
.r-h { margin: 0 0 5pt; font-size: 11pt; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; padding-bottom: 2pt; border-bottom: 1px solid #111; }
.r-p { margin: 0; }
.r-entry { margin-top: 7pt; break-inside: avoid-page; }
.r-entry:first-of-type { margin-top: 0; }
.r-line { display: flex; justify-content: space-between; gap: 12pt; }
.r-line b { font-weight: 700; }
.r-sub { font-style: italic; }
.r-ul { margin: 3pt 0 0; padding-left: 14pt; }
.r-ul li { margin: 1pt 0; }

.sheet[data-template="clean"] { font-family: 'Inter', Arial, sans-serif; font-size: 10pt; color: #1a1a1a; }
.sheet[data-template="clean"] .r-name { font-weight: 600; font-size: 22pt; letter-spacing: -.01em; }
.sheet[data-template="clean"] .r-headline { color: #444; }
.sheet[data-template="clean"] .r-contact { color: #444; }
.sheet[data-template="clean"] .r-h { font-size: 9.5pt; font-weight: 600; letter-spacing: .12em; border-bottom-color: #bbb; }

.sheet[data-template="bold"] { font-family: 'Inter', Arial, sans-serif; font-size: 10pt; }
.sheet[data-template="bold"] .r-name { font-family: 'League Gothic', 'Arial Narrow', Arial, sans-serif; font-weight: 400; font-size: 36pt; letter-spacing: .01em; text-transform: uppercase; }
.sheet[data-template="bold"] .r-head { padding-bottom: 8pt; border-bottom: 3px solid #111; }
.sheet[data-template="bold"] .r-h { border: 0; font-size: 10pt; letter-spacing: .1em; padding: 0; }

/* ---- toasts ---- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 32px)); }
.vas-msg-action { margin-left: 8px; }
.toasts .vas-cmp--toast { position: relative; overflow: hidden; }

.app { --pr-hot: #FF4B33; } /* VAS C-07 burnt red, the "resume" in the logo; the theme reassigns --k-accent inside buttons */
/* Save PDF: the one action that matters, in the accent of the logo's "resume" (C-07 via --k-accent).
   The label is black, not white: white on #FF4B33 is 3.3:1, black is 6.3:1 (VAS A-50). */
.app .vas-btn.btn-hot.btn-hot,
.app .vas-btn.btn-hot.btn-hot.is-active { background: var(--pr-hot); border-color: var(--pr-hot); color: #000; box-shadow: none; }
.app .vas-btn.btn-hot.btn-hot:hover { background: #000; border-color: #000; color: #fff; }
.app .vas-btn.btn-hot.btn-hot:active { background: #333; border-color: #333; color: #fff; }
.app .vas-btn.btn-hot.btn-hot:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

/* ---- small screens ---- */
@media (max-width: 900px) {
  .bar { padding: 10px 16px; }
  .bar-status { flex-basis: 100%; order: 3; }
  .mobile-tabs { display: flex; gap: 4px; padding: 8px 16px 0; }
  .work { grid-template-columns: 1fr; padding: 16px; }
  .work[data-view="edit"] .preview { display: none; }
  .work[data-view="preview"] .editor { display: none; }
  .preview { position: static; max-height: none; }
  .pv-frame { padding: 8px; }
  .grid2 { grid-template-columns: 1fr; }
}

/* ---- print: only the sheet ---- */
/* @page size and margin are written by app.js (#page-style) to match the Paper choice. */
@media print {
  body * { visibility: hidden; }
  .sheet, .sheet * { visibility: visible; }
  .app { background: #fff; min-height: 0; }
  .bar, .mobile-tabs, .editor, .pv-tools, .checks, .toasts { display: none !important; }
  .work, .preview, .pv-frame { display: block !important; padding: 0; margin: 0; border: 0; background: none; overflow: visible; max-height: none; position: static; }
  .pv-scale { overflow: visible; width: auto !important; height: auto !important; }
  .sheet { transform: none !important; }
  .sheet { position: static; box-shadow: none; min-height: 0 !important; width: 100% !important; padding: 0 !important; }
  .sheet .page-line { display: none; }
}

/* ---- v2: promise band, help, feedback (VAS K-10 chrome) ---- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.bar-help { font-size: 14px; font-weight: 600; color: var(--k-text, #333); text-decoration: underline; text-decoration-color: var(--k-accent, #ff4b33); text-underline-offset: 4px; }
.bar-help:hover { color: #000; }
.promise { max-width: 1500px; margin: 0 auto; padding: 22px 24px 0; }
.promise h1 { margin: 0 0 10px; font-family: 'League Gothic', 'Inter', sans-serif; font-weight: 400; font-size: clamp(30px, 4vw, 44px); line-height: 1.05; letter-spacing: .01em; }
.promise-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 24px; font-size: 14px; color: var(--k-text, #333); }
.promise-list strong { color: #111; }
.help { border-top: 1px solid var(--k-field-border, #919191); background: var(--k-ground, #fff); }
.help-inner { max-width: 900px; margin: 0 auto; padding: 32px 24px 48px; }
.help h2 { margin: 0 0 6px; font-size: 22px; }
.faq { margin: 18px 0 28px; border: 1px solid var(--k-field-border, #919191); }
.faq details + details { border-top: 1px solid #e5e5e5; }
.faq summary { cursor: pointer; padding: 12px 14px; font-weight: 600; }
.faq summary:hover { background: #f5f5f5; }
.faq p { margin: 0; padding: 0 14px 14px; max-width: 70ch; }
.feedback { padding: 18px; }
.feedback .vas-card-title { margin: 0 0 12px; }
.fb-check { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; margin-top: 4px; }
.fb-check input { width: 18px; height: 18px; accent-color: #333; }
.fb-hp { position: absolute; left: -9999px; }
#fb-msg:not(:empty) { margin-bottom: 12px; }
.feedback .vas-btn { margin-top: 12px; }
@media (max-width: 900px) {
  .promise { padding: 16px 16px 0; }
  .promise-list { grid-template-columns: 1fr; }
  .help-inner { padding: 24px 16px 40px; }
}

/* ---- v2: the sheet survives long names, titles and schools ---- */
.r-name, .r-headline, .r-contact, .r-p, .r-ul li, .r-sub { overflow-wrap: anywhere; }
.r-line > span:first-child { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.r-line > span:last-child { flex: 0 0 auto; white-space: nowrap; text-align: right; }
.r-line > span:last-child:empty { display: none; }
@media print {
  .promise, .help, .evolve-reveal, .bar-help { display: none !important; }
}
