
    :root {
      color-scheme: light dark;
      --bg: #f3f5f1;
      --panel: #fbfcf8;
      --paper: #ffffff;
      --ink: #17231d;
      --muted: #607068;
      --faint: #8b9891;
      --line: #d8ded9;
      --line-strong: #bdc8c0;
      --accent: #10b981;
      --accent-dark: #10b981;
      --accent-soft: #10b981;
      --warn: #a94b20;
      --warn-soft: #fff0e7;
      --shadow: 0 18px 55px rgba(28, 48, 38, .12);
      --radius: 12px;
    }
    @media (prefers-color-scheme: dark) {
      :root {
        --bg: #111613;
        --panel: #18201b;
        --paper: #f9faf7;
        --ink: #ecf3ee;
        --muted: #a8b7ae;
        --faint: #809087;
        --line: #2f3b34;
        --line-strong: #45544b;
        --accent: #10b981;
        --accent-dark: #10b981;
        --accent-soft: #10b981;
        --warn: #f3a277;
        --warn-soft: #3b251b;
        --shadow: 0 22px 65px rgba(0, 0, 0, .38);
      }
    }
    * { box-sizing: border-box; }
    html { min-height: 100%; background: var(--bg); }
    body {
      min-height: 100vh;
      margin: 0;
      background: var(--bg);
      color: var(--ink);
      font-family: "IBM Plex Sans", sans-serif;
      -webkit-font-smoothing: antialiased;
    }
    button, input, textarea, select { font: inherit; }
    button { color: inherit; }
    .app {
      min-height: 100vh;
      display: grid;
      grid-template-columns: 210px minmax(360px, 500px) minmax(500px, 1fr);
    }
    .rail {
      position: sticky;
      top: 0;
      height: 100vh;
      padding: 30px 22px;
      border-right: 1px solid var(--line);
      background: var(--bg);
      display: flex;
      flex-direction: column;
      gap: 26px;
    }
    .brand-block { display: grid; gap: 12px; }
    .brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .wordmark { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; }
    .product-lockup { display: grid; gap: 4px; }
    .product-lockup strong { font-size: 13px; }
    .product-lockup span { color: var(--muted); font-size: 10px; }
    .byline { display: inline-flex; align-items: center; gap: 6px; }
    .byline-logo { width: 50px; height: 50px; object-fit: contain; vertical-align: middle; }
    .products-menu { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 9px 0; }
    .products-menu summary { cursor: pointer; list-style: none; color: var(--muted); font-size: 11px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
    .products-menu summary::-webkit-details-marker { display: none; }
    .products-menu summary::after { content: "+"; font-size: 15px; font-weight: 400; }
    .products-menu[open] summary::after { content: "−"; }
    .product-list { padding: 10px 0 2px; display: grid; gap: 7px; }
    .product-current { display: grid; gap: 1px; padding: 8px 9px; background: var(--accent-soft); border-radius: 7px; }
    .product-current strong { font-size: 11px; color: #041006; }
    .product-current span, .product-future { font-size: 10px; color: var(--muted); line-height: 1.4; }
    .product-current span { color: #041006; }
    .progress-block { display: grid; gap: 9px; }
    .progress-copy { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
    .progress-copy strong { font-size: 13px; }
    .progress-copy span { color: var(--muted); font-size: 12px; }
    .progress-track { height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
    .progress-fill { height: 100%; width: 20%; background: var(--accent); border-radius: inherit; transition: width .2s ease; }
    .steps { display: grid; gap: 4px; }
    .step {
      appearance: none;
      border: 0;
      background: transparent;
      width: 100%;
      display: grid;
      grid-template-columns: 28px 1fr;
      align-items: center;
      gap: 10px;
      text-align: left;
      padding: 8px 6px;
      border-radius: 8px;
      cursor: pointer;
    }
    .step:hover { background: color-mix(in srgb, var(--panel) 78%, transparent); }
    .step[aria-current="step"] { background: var(--accent-soft); color: var(--accent-dark); }
    .step-number {
      width: 26px; height: 26px; border-radius: 50%;
      display: grid; place-items: center;
      border: 1px solid var(--line-strong); font-size: 12px; font-weight: 600;
    }
    .step[aria-current="step"] .step-number { border-color: var(--accent); background: var(--accent); color: #fff; }
    .step-label { font-size: 13px; font-weight: 500; }
    .rail-note { margin-top: auto; color: var(--muted); font-size: 12px; line-height: 1.5; }
    .rail-actions { display: grid; gap: 8px; }
    .jfm-footer { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--faint); font-size: 10px; line-height: 1.45; display: flex; align-items: center; gap: 5px; }
    .jfm-footer .byline-logo { width: 40px; height: 40px; }
    .text-btn {
      border: 0; padding: 4px 0; background: transparent; color: var(--accent);
      text-align: left; font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
    }
    .editor {
      min-height: 100vh;
      background: var(--panel);
      padding: 34px clamp(24px, 3vw, 42px) 48px;
      border-right: 1px solid var(--line);
      overflow-y: auto;
    }
    .editor-head { margin-bottom: 26px; }
    .eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
    h1 { margin: 0; max-width: 480px; font: 600 clamp(28px, 3vw, 40px)/1.08 "IBM Plex Serif", serif; letter-spacing: -.025em; }
    .lede { margin: 12px 0 0; color: var(--muted); max-width: 470px; font-size: 14px; line-height: 1.6; }
    .form-section { display: none; }
    .form-section.active { display: block; }
    .section-title { margin: 0 0 18px; font: 600 21px/1.2 "IBM Plex Serif", serif; }
    .field { display: grid; gap: 7px; margin-bottom: 16px; }
    .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    label { font-size: 12px; font-weight: 600; color: var(--muted); }
    input, textarea, select {
      width: 100%;
      border: 1px solid var(--line-strong);
      border-radius: 8px;
      background: var(--bg);
      color: var(--ink);
      padding: 11px 12px;
      outline: 0;
      transition: border-color .15s, box-shadow .15s;
    }
    textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
    input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
    ::placeholder { color: var(--faint); opacity: 1; }
    .help { margin: -2px 0 0; color: var(--faint); font-size: 11px; line-height: 1.45; }
    .editor-actions { margin-top: 26px; display: flex; justify-content: space-between; gap: 12px; }
    .btn {
      border: 1px solid transparent;
      border-radius: 8px;
      padding: 10px 16px;
      font-weight: 600;
      font-size: 13px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 42px;
      text-decoration: none;
    }
    .btn-primary { background: var(--accent); color: #fff; }
    .btn-primary:hover { background: var(--accent-dark); }
    .btn-secondary { border-color: var(--line-strong); background: var(--panel); }
    .btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
    .btn:disabled { opacity: .45; cursor: not-allowed; }
    .bullet-tool { border: 1px solid var(--line); padding: 14px; border-radius: 10px; background: var(--bg); margin-top: 8px; }
    .bullet-tool strong { font-size: 12px; }
    .bullet-tool p { margin: 5px 0 10px; font-size: 12px; line-height: 1.5; color: var(--muted); }
    .quality { margin-top: 12px; display: grid; gap: 8px; }
    .quality-item { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; line-height: 1.45; color: var(--muted); }
    .quality-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--line-strong); flex: 0 0 auto; }
    .quality-item.good .quality-dot { background: var(--accent); }
    .template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .template-choice { position: relative; }
    .template-choice input { position: absolute; opacity: 0; pointer-events: none; }
    .template-card { display: grid; gap: 10px; cursor: pointer; }
    .template-thumb { height: 130px; padding: 12px; background: #fff; border: 2px solid var(--line); border-radius: 7px; transition: border-color .15s, transform .15s; overflow: hidden; }
    .template-choice input:checked + .template-card .template-thumb { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
    .template-choice input:focus-visible + .template-card .template-thumb { outline: 2px solid var(--accent); outline-offset: 3px; }
    .template-lines { display: grid; gap: 6px; }
    .template-lines i { display: block; height: 3px; background: #d5dbd7; }
    .template-lines i:first-child { width: 58%; height: 7px; background: #1d2a23; }
    .thumb-minimal { padding-top: 22px; }
    .thumb-minimal .template-lines { gap: 9px; }
    .thumb-minimal .template-lines i { height: 2px; }
    .thumb-corporate { border-top: 9px solid #1f5796; }
    .thumb-corporate .template-lines i:first-child { width: 78%; }
    .thumb-bold { border-top: 24px solid #10b981; }
    .thumb-serif .template-lines i:first-child { width: 72%; height: 9px; font-family: Georgia, serif; }
    .thumb-serif { border-bottom: 5px solid #8a3b24; }
    .thumb-compact .template-lines { gap: 4px; }
    .thumb-compact .template-lines i { height: 2px; }
    .thumb-sidebar { background: linear-gradient(90deg, #e8eeea 0 34%, #fff 34%); padding-left: 42%; }
    .thumb-ats { border-color: #9aa39d; border-radius: 0; }
    .thumb-ats .template-lines i { background: #a6aca8; }
    .thumb-ats .template-lines i:first-child { width: 52%; background: #111; }
    .thumb-executive { border-top: 3px solid #17231d; border-bottom: 3px solid #17231d; }
    .thumb-executive .template-lines i:first-child { width: 88%; }
    .thumb-studio { border-left: 10px solid #8a3b24; }
    .thumb-technical .template-lines { grid-template-columns: 1fr 1fr; gap: 6px 8px; }
    .thumb-technical .template-lines i:first-child { grid-column: 1 / -1; width: 62%; }
    .thumb-classic { border-radius: 0; }
    .thumb-classic .template-lines { justify-items: center; }
    .thumb-classic .template-lines i { width: 88%; }
    .thumb-classic .template-lines i:first-child { width: 66%; }
    .template-name { font-size: 12px; font-weight: 600; text-align: center; }
    .accent-choice { margin-top: 24px; }
    .accent-controls { display: flex; align-items: end; gap: 12px; margin-top: 10px; }
    .accent-color-field, .accent-hex-field { display: grid; gap: 7px; }
    .accent-color-field { flex: 0 0 auto; }
    .accent-hex-field { width: min(100%, 180px); }
    .accent-color-field input[type="color"] {
      width: 58px;
      height: 46px;
      min-height: 46px;
      padding: 4px;
      border: 1px solid var(--line-strong);
      border-radius: 8px;
      background: var(--bg);
      cursor: pointer;
    }
    .accent-color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
    .accent-color-field input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 5px; }
    .accent-color-field input[type="color"]::-moz-color-swatch { border: 0; border-radius: 5px; }
    .hex-input-wrap {
      display: flex;
      align-items: center;
      min-height: 46px;
      border: 1px solid transparent;
      border-radius: 8px;
      background: var(--bg);
      transition: background .15s, border-color .15s, box-shadow .15s;
    }
    .hex-input-wrap:hover { border-color: var(--line-strong); }
    .hex-input-wrap:focus-within { background: var(--panel); border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
    .hex-prefix { padding-left: 13px; color: var(--faint); font-size: 13px; font-weight: 700; user-select: none; }
    .accent-hex-field input {
      min-height: 44px;
      border: 0;
      padding-left: 3px;
      background: transparent;
      text-transform: uppercase;
      font-variant-numeric: tabular-nums;
      box-shadow: none;
    }
    .accent-hex-field input:hover, .accent-hex-field input:focus { border: 0; background: transparent; box-shadow: none; }
    .hex-input-wrap.invalid { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
    .accent-help { margin-top: 9px; }
    .preview-pane {
      min-width: 0;
      min-height: 100vh;
      padding: 24px clamp(20px, 3vw, 42px) 50px;
      background:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px),
        var(--bg);
      background-size: 22px 22px;
    }
    .preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 820px; margin: 0 auto 16px; }
    .preview-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
    .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
    .preview-actions { display: flex; gap: 8px; }
    .resume-paper {
      --resume-accent: #10b981;
      color: #17231d;
      background: var(--paper);
      width: min(100%, 820px);
      aspect-ratio: 8.5 / 11;
      min-height: 820px;
      margin: 0 auto;
      box-shadow: var(--shadow);
      padding: clamp(34px, 4vw, 58px);
      position: relative;
      overflow: hidden;
    }
    .resume-paper::after {
      content: "FREE PREVIEW";
      position: absolute;
      left: 50%;
      top: 50%;
      width: 122%;
      min-height: 210px;
      padding-top: 130px;
      transform: translate(-50%, -50%) rotate(-32deg);
      background: url("assets/jfm-letters.png") top center / min(48%, 320px) auto no-repeat;
      font: 700 clamp(28px, 4.4vw, 58px)/1 "Manrope", sans-serif;
      color: rgba(24, 98, 67, .34);
      text-align: center;
      letter-spacing: .16em;
      white-space: nowrap;
      opacity: .68;
      pointer-events: none;
      z-index: 4;
    }
    .resume-head { border-bottom: 2px solid var(--resume-accent); padding-bottom: 18px; }
    .resume-name { margin: 0; font: 600 clamp(25px, 3.2vw, 39px)/1 "IBM Plex Serif", serif; color: #17231d; letter-spacing: -.02em; }
    .resume-role { margin-top: 7px; color: var(--resume-accent); font-size: 13px; font-weight: 600; }
    .resume-contact { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 5px 13px; color: #516058; font-size: 10px; }
    .resume-body { padding-top: 22px; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(130px, .75fr); gap: 28px; }
    .resume-section { margin-bottom: 21px; }
    .resume-section h3 { margin: 0 0 9px; color: var(--resume-accent); font: 600 11px/1 "IBM Plex Sans", sans-serif; letter-spacing: .12em; text-transform: uppercase; }
    .resume-section p { margin: 0; color: #35433b; font-size: 10.5px; line-height: 1.55; white-space: pre-line; }
    .job { margin-bottom: 15px; }
    .job-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
    .job-title { font-size: 11.5px; font-weight: 600; color: #17231d; }
    .job-dates { font-size: 9px; color: #647168; white-space: nowrap; }
    .job-company { margin: 2px 0 6px; font-size: 10px; color: #536158; }
    .skill-list { display: flex; flex-wrap: wrap; gap: 6px; }
    .skill-pill { border: 1px solid #d4dad6; padding: 4px 7px; font-size: 9px; color: #35433b; }
    .empty-copy { color: #8c9690 !important; font-style: italic; }
    .resume-paper.template-clean .resume-head { border-bottom: 1px solid #ccd5cf; }
    .resume-paper.template-clean .resume-role, .resume-paper.template-clean .resume-section h3 { color: #34443b; }
    .resume-paper.template-bold .resume-head { margin: calc(clamp(34px, 4vw, 58px) * -1) calc(clamp(34px, 4vw, 58px) * -1) 0; padding: 38px clamp(34px, 4vw, 58px) 24px; background: var(--resume-accent); border: 0; }
    .resume-paper.template-bold .resume-name, .resume-paper.template-bold .resume-role, .resume-paper.template-bold .resume-contact { color: #fff; }
    .resume-paper.template-bold .resume-body { padding-top: 28px; }

    /* Distinct, single-column-source resume finishes */
    .resume-paper.template-minimal { padding-inline: clamp(44px, 5vw, 72px); }
    .resume-paper.template-minimal .resume-head { border: 0; padding-bottom: 26px; }
    .resume-paper.template-minimal .resume-name { font-family: "Manrope", sans-serif; font-weight: 500; letter-spacing: -.045em; }
    .resume-paper.template-minimal .resume-role { color: #4d5952; font-weight: 500; }
    .resume-paper.template-minimal .resume-body { grid-template-columns: 1fr; gap: 0; border-top: 1px solid #d8ded9; }
    .resume-paper.template-minimal .resume-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
    .resume-paper.template-minimal .resume-section h3 { color: #35433b; letter-spacing: .16em; }
    .resume-paper.template-minimal .skill-pill { border: 0; padding: 0 10px 0 0; }

    .resume-paper.template-corporate { border-top: 7px solid var(--resume-accent); }
    .resume-paper.template-corporate .resume-head { text-align: center; border-bottom: 1px solid #b7c2bb; }
    .resume-paper.template-corporate .resume-name { font-family: "Manrope", sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
    .resume-paper.template-corporate .resume-contact { justify-content: center; }
    .resume-paper.template-corporate .resume-body { grid-template-columns: 1fr; gap: 0; }
    .resume-paper.template-corporate .resume-sidebar { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 20px; border-top: 1px solid #d4dad6; padding-top: 18px; }
    .resume-paper.template-corporate .resume-section h3 { padding-bottom: 5px; border-bottom: 1px solid #d4dad6; }

    .resume-paper.template-serif .resume-head { text-align: left; border-bottom: 1px solid var(--resume-accent); }
    .resume-paper.template-serif .resume-name { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(29px, 3.8vw, 45px); }
    .resume-paper.template-serif .resume-role { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400; }
    .resume-paper.template-serif .resume-body { grid-template-columns: 1fr; gap: 0; }
    .resume-paper.template-serif .resume-sidebar { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 22px; }
    .resume-paper.template-serif .resume-section h3 { font-family: Georgia, "Times New Roman", serif; font-size: 12px; letter-spacing: 0; text-transform: none; }

    .resume-paper.template-compact { padding: clamp(28px, 3vw, 40px); }
    .resume-paper.template-compact .resume-head { padding-bottom: 12px; }
    .resume-paper.template-compact .resume-name { font-family: "Manrope", sans-serif; font-size: clamp(23px, 2.7vw, 33px); }
    .resume-paper.template-compact .resume-contact { margin-top: 7px; }
    .resume-paper.template-compact .resume-body { padding-top: 15px; gap: 22px; grid-template-columns: minmax(0, 1.75fr) minmax(125px, .7fr); }
    .resume-paper.template-compact .resume-section { margin-bottom: 13px; }
    .resume-paper.template-compact .resume-section p { line-height: 1.38; font-size: 9.7px; }
    .resume-paper.template-compact .job { margin-bottom: 9px; }
    .resume-paper.template-compact .skill-list { gap: 4px; }
    .resume-paper.template-compact .skill-pill { padding: 3px 5px; font-size: 8px; }

    .resume-paper.template-sidebar { padding-left: clamp(28px, 3vw, 42px); }
    .resume-paper.template-sidebar .resume-head { border: 0; padding-left: 35%; }
    .resume-paper.template-sidebar .resume-name { font-family: "Manrope", sans-serif; font-weight: 700; }
    .resume-paper.template-sidebar .resume-body { grid-template-columns: minmax(145px, .72fr) minmax(0, 1.55fr); gap: 30px; padding-top: 24px; }
    .resume-paper.template-sidebar .resume-main { order: 2; }
    .resume-paper.template-sidebar .resume-sidebar { order: 1; background: #eef2ef; padding: 22px 18px; margin: -104px 0 -60px calc(clamp(28px, 3vw, 42px) * -1); }
    .resume-paper.template-sidebar .resume-section h3 { color: #26352d; }
    .resume-paper.template-sidebar .skill-pill { border-color: #bfc9c2; }

    .resume-paper.template-ats { font-family: Arial, Helvetica, sans-serif; padding: clamp(34px, 4vw, 52px); }
    .resume-paper.template-ats .resume-head { border-bottom: 1px solid #202020; text-align: left; }
    .resume-paper.template-ats .resume-name { font-family: Arial, Helvetica, sans-serif; font-weight: 700; letter-spacing: 0; }
    .resume-paper.template-ats .resume-role, .resume-paper.template-ats .resume-section h3 { color: #111; }
    .resume-paper.template-ats .resume-body { grid-template-columns: 1fr; gap: 0; padding-top: 18px; }
    .resume-paper.template-ats .resume-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
    .resume-paper.template-ats .resume-section h3 { letter-spacing: 0; border-bottom: 1px solid #333; padding-bottom: 4px; }
    .resume-paper.template-ats .skill-list { gap: 0; }
    .resume-paper.template-ats .skill-pill { border: 0; padding: 0 8px 0 0; }

    .resume-paper.template-executive .resume-head { border-top: 4px solid #17231d; border-bottom: 1px solid #17231d; padding-top: 18px; }
    .resume-paper.template-executive .resume-name { font-family: "Manrope", sans-serif; font-size: clamp(25px, 3vw, 37px); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
    .resume-paper.template-executive .resume-role { color: #35433b; text-transform: uppercase; letter-spacing: .14em; font-size: 10px; }
    .resume-paper.template-executive .resume-section h3 { color: #17231d; border-bottom: 2px solid var(--resume-accent); padding-bottom: 5px; }

    .resume-paper.template-studio { border-left: 13px solid var(--resume-accent); }
    .resume-paper.template-studio .resume-head { border: 0; padding-bottom: 26px; }
    .resume-paper.template-studio .resume-name { font-family: "Manrope", sans-serif; font-weight: 700; }
    .resume-paper.template-studio .resume-role { display: inline-block; padding: 4px 9px; background: var(--resume-accent); color: #fff; }
    .resume-paper.template-studio .resume-section h3 { color: #17231d; font-size: 13px; letter-spacing: -.01em; text-transform: none; }
    .resume-paper.template-studio .skill-pill { border-color: var(--resume-accent); }

    .resume-paper.template-technical .resume-head { border-bottom: 1px dashed #829087; }
    .resume-paper.template-technical .resume-name { font-family: "Courier New", monospace; font-weight: 700; letter-spacing: -.04em; }
    .resume-paper.template-technical .resume-role, .resume-paper.template-technical .resume-section h3 { font-family: "Courier New", monospace; color: #26352d; }
    .resume-paper.template-technical .resume-section h3::before { content: "// "; color: var(--resume-accent); }
    .resume-paper.template-technical .skill-pill { border-radius: 2px; background: #f1f4f2; }

    .resume-paper.template-classic { padding-inline: clamp(48px, 5vw, 76px); }
    .resume-paper.template-classic .resume-head { text-align: center; border-top: 1px solid #17231d; border-bottom: 1px solid #17231d; padding: 18px 0; }
    .resume-paper.template-classic .resume-name { font-family: "Times New Roman", Times, serif; font-weight: 400; letter-spacing: .03em; }
    .resume-paper.template-classic .resume-role { color: #35433b; font-family: "Times New Roman", Times, serif; font-style: italic; font-weight: 400; }
    .resume-paper.template-classic .resume-contact { justify-content: center; }
    .resume-paper.template-classic .resume-body { grid-template-columns: 1fr; gap: 0; }
    .resume-paper.template-classic .resume-sidebar { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 22px; }
    .resume-paper.template-classic .resume-section h3 { color: #17231d; font-family: "Times New Roman", Times, serif; font-size: 12px; letter-spacing: .08em; text-align: center; }
    .resume-paper.pro-unlocked::after { display: none; }
    .modal-backdrop { position: fixed; inset: 0; background: rgba(4, 10, 7, .64); display: none; place-items: center; padding: 20px; z-index: 20; }
    .modal-backdrop.open { display: grid; }
    .modal { width: min(100%, 450px); background: var(--panel); border: 1px solid var(--line); padding: 25px; box-shadow: var(--shadow); border-radius: 12px; }
    .modal h2 { margin: 0 0 8px; font: 600 24px/1.2 "IBM Plex Serif", serif; }
    .modal p { color: var(--muted); font-size: 13px; line-height: 1.55; }
    .price { margin: 20px 0; display: flex; align-items: baseline; gap: 8px; }
    .price strong { font: 600 36px/1 "IBM Plex Serif", serif; }
    .price span { color: var(--muted); font-size: 12px; }
    .feature-list { display: grid; gap: 10px; margin: 18px 0 22px; }
    .feature { display: flex; gap: 9px; font-size: 13px; }
    .check { color: var(--accent); font-weight: 700; }
    .access-note { margin: 20px 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .access-note strong { display: block; margin-bottom: 5px; font-size: 13px; }
    .access-note p { margin: 0; font-size: 12px; }
    .pro-unlock-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 13px; }
    .pro-unlock-form input { min-width: 0; }
    .pro-status { min-height: 18px; margin: 10px 0 0 !important; color: var(--muted); }
    .pro-status.is-error { color: var(--warn); }
    .pro-status.is-success { color: var(--accent-dark); font-weight: 700; }
    .pro-status a, .manage-subscription { color: var(--accent-dark); font-weight: 700; text-underline-offset: 3px; }
    .manage-subscription[hidden] { display: none; }
    .modal-actions { display: grid; gap: 8px; }
    @media (max-width: 480px) {
      .pro-unlock-form { grid-template-columns: 1fr; }
      .pro-unlock-form .btn { width: 100%; }
    }
    .toast { position: fixed; right: 18px; bottom: 18px; background: var(--ink); color: var(--panel); border-radius: 8px; padding: 11px 14px; font-size: 12px; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; z-index: 30; }
    .toast.show { opacity: 1; transform: translateY(0); }
    .help-chat { position: fixed; right: 20px; bottom: 20px; z-index: 19; display: grid; justify-items: end; gap: 10px; }
    .help-launcher {
      width: 52px; height: 52px; border: 0; border-radius: 50%; background: var(--ink); color: var(--panel);
      display: grid; place-items: center; cursor: pointer; box-shadow: 0 12px 34px rgba(6, 16, 10, .22);
    }
    .help-launcher:hover { background: var(--accent); color: #041006; }
    .help-launcher svg { width: 22px; height: 22px; }
    .help-panel {
      width: min(360px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 96px));
      display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--panel); border: 1px solid var(--line);
      border-radius: 14px; box-shadow: 0 22px 70px rgba(4, 12, 7, .24); overflow: hidden;
    }
    .help-panel[hidden] { display: none; }
    .help-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 17px 18px 14px; border-bottom: 1px solid var(--line); }
    .help-head strong { display: block; font-size: 14px; letter-spacing: -.02em; }
    .help-head span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
    .help-close { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--bg); color: var(--ink); cursor: pointer; font-size: 19px; line-height: 1; }
    .help-thread { min-height: 240px; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
    .help-message { max-width: 88%; padding: 10px 12px; border-radius: 11px; font-size: 12px; line-height: 1.5; }
    .help-message.bot { align-self: flex-start; background: var(--bg); color: var(--ink); border-bottom-left-radius: 3px; }
    .help-message.user { align-self: flex-end; background: var(--ink); color: var(--panel); border-bottom-right-radius: 3px; }
    .help-message a { color: var(--accent-dark); font-weight: 700; text-underline-offset: 2px; }
    .help-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
    .help-suggestion { border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink); padding: 7px 10px; font-size: 10px; font-weight: 700; cursor: pointer; }
    .help-suggestion:hover { border-color: var(--ink); }
    .help-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--panel); }
    .help-form input { min-height: 40px; padding: 9px 11px; font-size: 12px; }
    .help-form button { min-height: 40px; padding: 8px 14px; }
    @media (max-width: 1120px) {
      .app { grid-template-columns: 178px minmax(350px, 430px) minmax(430px, 1fr); }
      .rail { padding-inline: 14px; }
      .resume-body { gap: 20px; }
    }
    @media (max-width: 900px) {
      .app { display: block; }
      .rail {
        position: sticky; z-index: 10; top: 0; width: 100%; height: auto; padding: 10px 14px;
        border-right: 0; border-bottom: 1px solid var(--line); display: block; overflow: hidden;
      }
      .progress-block { margin-bottom: 8px; }
      .steps { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
      .steps::-webkit-scrollbar { display: none; }
      .step { width: auto; min-width: max-content; grid-template-columns: 24px auto; padding: 6px 8px; }
      .step-number { width: 22px; height: 22px; }
      .rail-note, .rail-actions { display: none; }
      .editor { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 28px 20px 36px; }
      .preview-pane { min-height: auto; padding: 22px 14px 40px; }
      .resume-paper { min-height: 0; }
    }
    @media (max-width: 560px) {
      .step-label { display: none; }
      .step[aria-current="step"] .step-label { display: block; }
      .editor-head { margin-bottom: 22px; }
      .field-row { grid-template-columns: 1fr; gap: 0; }
      .template-grid { grid-template-columns: 1fr; }
      .template-card { grid-template-columns: 92px 1fr; align-items: center; }
      .template-thumb { height: 112px; }
      .template-name { text-align: left; }
      .preview-toolbar { align-items: flex-start; }
      .preview-actions { flex-direction: column; align-items: stretch; }
      .preview-actions .btn { min-height: 36px; padding: 7px 10px; }
      .resume-paper { width: 100%; padding: 28px 24px; aspect-ratio: auto; min-height: 620px; }
      .resume-paper.template-bold .resume-head { margin: -28px -24px 0; padding: 28px 24px 20px; }
      .resume-name { font-size: 27px; }
      .resume-body { grid-template-columns: 1fr; gap: 4px; }
      .resume-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
      .resume-contact { gap: 4px 9px; }
    }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
    }

    /* Clean trading-dashboard visual system */
    :root {
      --bg: #f5f7f5;
      --panel: #ffffff;
      --paper: #ffffff;
      --ink: #0b0d0c;
      --muted: #58615b;
      --faint: #7c8780;
      --line: #e3e8e4;
      --line-strong: #cbd3cd;
      --accent: #10b981;
      --accent-dark: #10b981;
      --accent-soft: #10b981;
      --warn: #9b3d17;
      --warn-soft: #fff2ea;
      --shadow: 0 20px 60px rgba(10, 20, 13, .10);
      --radius: 10px;
    }
    @media (prefers-color-scheme: dark) {
      :root {
        --bg: #070908;
        --panel: #101311;
        --paper: #ffffff;
        --ink: #f5f8f6;
        --muted: #a7b0aa;
        --faint: #77827b;
        --line: #242a26;
        --line-strong: #3a443e;
        --accent: #10b981;
        --accent-dark: #10b981;
        --accent-soft: #10b981;
        --warn: #ff9a70;
        --warn-soft: #321d16;
        --shadow: 0 22px 70px rgba(0, 0, 0, .52);
      }
    }
    body { font-family: "Manrope", sans-serif; letter-spacing: -.01em; }
    .app { height: 100vh; min-height: 680px; grid-template-columns: 224px minmax(390px, 520px) minmax(510px, 1fr); }
    .rail {
      padding: 26px 20px 22px;
      background: var(--panel);
      gap: 24px;
    }
    .brand-block { gap: 18px; }
    .brand-row { align-items: flex-start; }
    .product-lockup { gap: 3px; }
    .product-lockup strong { font-size: 19px; line-height: 1; letter-spacing: -.04em; }
    .product-lockup span { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
    .wordmark {
      width: 38px;
      height: 38px;
      border: 1px solid var(--line);
      border-radius: 9px;
      padding: 0;
    }
    .byline-logo { border: 0; }
    .vitae-logo, .jfm-inline, .jfm-badge {
      display: inline-block;
      width: auto;
      object-fit: contain;
      vertical-align: -.12em;
    }
    .vitae-logo { height: 1em; }
    .jfm-inline { height: 1.15em; vertical-align: -.22em; }
    .jfm-badge { height: 48px; vertical-align: middle; }
    .vitae-lockup { display: grid; gap: 5px; align-items: start; }
    .vitae-lockup .vitae-logo { width: 104px; height: auto; }
    .vitae-lockup span { color: var(--ink); font-size: 12px; letter-spacing: -.01em; text-transform: none; }
    .product-current .vitae-logo { width: 62px; height: auto; }
    .eyebrow .vitae-logo { height: 18px; }
    .jfm-footer .vitae-logo { height: 14px; }
    .jfm-footer .jfm-badge { height: 36px; }
    .modal h2 .vitae-logo { height: 28px; }
    .products-menu { border: 0; padding: 0; }
    .products-menu summary {
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 9px 10px;
      font-size: 11px;
      transition: border-color .15s, background .15s;
    }
    .products-menu summary:hover { border-color: var(--line-strong); background: var(--bg); }
    .product-list { padding-bottom: 0; }
    .product-current { border-radius: 8px; padding: 10px; }
    .progress-block { gap: 10px; }
    .progress-copy strong { font-size: 13px; letter-spacing: -.02em; }
    .progress-copy span { font-size: 11px; font-weight: 600; }
    .progress-track { height: 4px; background: var(--line); }
    .steps { gap: 3px; }
    .step {
      grid-template-columns: 30px 1fr;
      gap: 9px;
      min-height: 43px;
      border-radius: 8px;
      padding: 7px 8px;
      color: var(--muted);
    }
    .step:hover { background: var(--bg); color: var(--ink); }
    .step[aria-current="step"] { background: var(--ink); color: var(--panel); }
    .step-number {
      width: 27px;
      height: 27px;
      border: 0;
      background: var(--bg);
      color: var(--muted);
      font-size: 11px;
    }
    .step[aria-current="step"] .step-number { border: 0; background: var(--accent); color: #041006; }
    .step-label { font-weight: 600; font-size: 12px; }
    .rail-note { max-width: 170px; font-size: 11px; }
    .text-btn { color: var(--ink); font-weight: 600; text-decoration: none; }
    .text-btn:hover { color: var(--accent-dark); }
    .jfm-footer { font-size: 9px; letter-spacing: .03em; }
    .editor {
      height: 100vh;
      min-height: 680px;
      padding: 38px clamp(26px, 3vw, 46px) 44px;
      background: var(--panel);
      scrollbar-width: thin;
    }
    .editor-head { margin-bottom: 30px; }
    .eyebrow { margin-bottom: 10px; color: var(--accent-dark); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
    h1 { font: 700 clamp(28px, 2.8vw, 38px)/1.06 "Manrope", sans-serif; letter-spacing: -.05em; }
    .lede { max-width: 440px; margin-top: 13px; font-size: 13px; line-height: 1.65; }
    .section-title { margin-bottom: 20px; font: 700 19px/1.25 "Manrope", sans-serif; letter-spacing: -.035em; }
    .field { gap: 7px; margin-bottom: 17px; }
    .field-row { gap: 11px; }
    label { color: var(--ink); font-size: 11px; font-weight: 700; }
    input, textarea, select {
      border-color: transparent;
      border-radius: 8px;
      background: var(--bg);
      padding: 12px 13px;
      font-size: 13px;
      transition: background .15s, border-color .15s, box-shadow .15s;
    }
    input { min-height: 46px; }
    textarea { min-height: 104px; }
    input:hover, textarea:hover, select:hover { border-color: var(--line-strong); }
    input:focus, textarea:focus, select:focus { background: var(--panel); border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
    .help { color: var(--muted); font-size: 10px; }
    .editor-actions { margin-top: 30px; align-items: center; }
    .btn {
      min-height: 44px;
      border-radius: 999px;
      padding: 10px 18px;
      font-size: 12px;
      font-weight: 700;
      transition: background .15s, color .15s, border-color .15s;
    }
    .btn-primary { background: var(--accent); color: #041006; }
    .btn-primary:hover { background: var(--accent); color: #041006; box-shadow: inset 0 0 0 2px rgba(4, 16, 6, .18); }
    .btn-secondary { border-color: var(--line-strong); background: transparent; }
    .btn-secondary:hover { background: var(--bg); border-color: var(--ink); color: var(--ink); }
    .bullet-tool { border: 0; border-radius: 8px; background: var(--bg); padding: 16px; }
    .bullet-tool strong { color: var(--ink); }
    .quality-dot { width: 8px; height: 8px; background: var(--line-strong); }
    .template-grid { gap: 12px; }
    .template-card { gap: 9px; }
    .template-thumb { height: 136px; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 18px rgba(12, 20, 15, .05); }
    .template-choice input:checked + .template-card .template-thumb { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); transform: translateY(-2px); }
    .template-name { font-size: 11px; }
    .preview-pane {
      height: 100vh;
      min-height: 680px;
      overflow-y: auto;
      padding: 24px clamp(20px, 3.4vw, 48px) 54px;
      background: var(--bg);
    }
    .preview-toolbar { margin-bottom: 18px; max-width: 790px; }
    .preview-label { color: var(--ink); font-size: 11px; }
    .live-dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
    .resume-paper { max-width: 790px; min-height: 800px; border: 1px solid rgba(19, 32, 23, .08); box-shadow: var(--shadow); }
    .resume-name { font-family: "Source Serif 4", serif; }
    .modal { border: 0; border-radius: 14px; padding: 28px; }
    .modal h2 { font: 700 24px/1.2 "Manrope", sans-serif; letter-spacing: -.04em; }
    .price strong { font-family: "Manrope", sans-serif; letter-spacing: -.05em; }
    .launch-note { border-radius: 7px; }
    .toast { border-radius: 999px; background: var(--ink); color: var(--panel); font-weight: 600; padding-inline: 16px; }
    @media (max-width: 1120px) {
      .app { grid-template-columns: 190px minmax(350px, 450px) minmax(450px, 1fr); }
      .rail { padding-inline: 14px; }
    }
    @media (max-width: 900px) {
      .app { height: auto; min-height: 100vh; }
      .rail { padding: 12px 16px 10px; background: color-mix(in srgb, var(--panel) 96%, transparent); }
      .brand-block { display: none; }
      .progress-block { margin-bottom: 9px; }
      .steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; overflow: visible; }
      .step { width: 100%; min-width: 0; grid-template-columns: 1fr; gap: 4px; justify-items: center; min-height: 49px; padding: 5px 2px; text-align: center; }
      .step-number { width: 23px; height: 23px; }
      .step-label, .step[aria-current="step"] .step-label { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 9px; }
      .editor { height: auto; min-height: 0; padding: 30px 20px 38px; }
      .preview-pane { height: auto; min-height: 0; padding: 24px 14px 44px; }
      .preview-toolbar { max-width: 790px; }
    }
    @media (max-width: 560px) {
      .editor-head { margin-bottom: 26px; }
      h1 { font-size: 29px; }
      .lede { font-size: 12px; }
      .template-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
      .template-card { grid-template-columns: 1fr; }
      .template-thumb { height: 108px; padding: 9px; }
      .template-name { text-align: center; }
      .preview-toolbar { display: grid; grid-template-columns: 1fr; }
      .preview-actions { display: grid; grid-template-columns: 1fr 1fr; }
      .preview-actions .btn { min-height: 40px; padding: 7px 9px; font-size: 10px; }
      .resume-paper { padding: 27px 22px; min-height: 600px; }
      .resume-paper.template-bold .resume-head { margin: -27px -22px 0; padding: 27px 22px 20px; }
      .resume-sidebar { grid-template-columns: 1fr; gap: 0; }
      .resume-paper.template-minimal,
      .resume-paper.template-classic { padding-inline: 28px; }
      .resume-paper.template-minimal .resume-sidebar,
      .resume-paper.template-corporate .resume-sidebar,
      .resume-paper.template-serif .resume-sidebar,
      .resume-paper.template-ats .resume-sidebar,
      .resume-paper.template-classic .resume-sidebar { grid-template-columns: 1fr; gap: 0; }
      .resume-paper.template-sidebar { padding-left: 22px; }
      .resume-paper.template-sidebar .resume-head { padding-left: 0; }
      .resume-paper.template-sidebar .resume-body { grid-template-columns: 1fr; gap: 0; }
      .resume-paper.template-sidebar .resume-main,
      .resume-paper.template-sidebar .resume-sidebar { order: initial; }
      .resume-paper.template-sidebar .resume-sidebar { margin: 0; padding: 18px; }
      .resume-paper.template-compact .resume-body { grid-template-columns: 1fr; gap: 0; }
      .help-chat { right: 12px; bottom: 12px; }
      .help-panel { width: calc(100vw - 24px); max-height: calc(100vh - 82px); }
      .help-thread { min-height: 210px; }
    }

    /* JFM company hub */
    .hub {
      min-height: 100vh;
      padding: clamp(28px, 5vw, 72px) clamp(20px, 6vw, 88px) clamp(52px, 7vw, 96px);
      background: var(--panel);
      border-bottom: 1px solid var(--line);
    }
    .hub-shell { width: min(1180px, 100%); margin: 0 auto; }
    .hub-kicker {
      margin: 0 0 clamp(54px, 9vw, 112px);
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: .12em;
      text-transform: uppercase;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
      text-align: center;
    }
    .hub-kicker strong { color: var(--ink); }
    .hub-kicker .jfm-badge { height: clamp(112px, 11vw, 148px); }
    .hub-hero {
      display: grid;
      grid-template-columns: minmax(0, 1.55fr) minmax(250px, .65fr);
      gap: clamp(46px, 9vw, 124px);
      align-items: end;
      padding-bottom: clamp(64px, 10vw, 126px);
    }
    .hub-title {
      max-width: 800px;
      margin: 0;
      font: 700 clamp(48px, 7.2vw, 92px)/.94 "Manrope", sans-serif;
      letter-spacing: -.07em;
    }
    .hub-intro { max-width: 670px; margin: 28px 0 0; color: var(--muted); font-size: clamp(15px, 1.5vw, 18px); line-height: 1.65; }
    .hub-cta { margin-top: 30px; }
    .hub-note { border-top: 1px solid var(--ink); padding-top: 16px; }
    .hub-note b { display: block; margin-bottom: 14px; color: var(--accent-dark); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
    .hub-note p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
    .products-section { scroll-margin-top: 24px; }
    .products-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
    .products-head h2 { margin: 0; font-size: clamp(25px, 3vw, 38px); letter-spacing: -.05em; }
    .products-head p { margin: 0; color: var(--muted); font-size: 12px; }
    .hub-products { display: grid; grid-template-columns: 1fr; gap: 14px; }
    .hub-product {
      min-height: 270px;
      padding: clamp(24px, 3.4vw, 42px);
      border: 1px solid var(--line);
      background: var(--bg);
      display: flex;
      flex-direction: column;
    }
    .product-status { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
    .product-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
    .hub-product h3 { margin: auto 0 10px; font-size: clamp(32px, 4vw, 54px); letter-spacing: -.06em; }
    .hub-product h3.vitae-product-title { line-height: 0; }
    .vitae-product-title .vitae-logo { width: clamp(190px, 24vw, 300px); height: auto; }
    .hub-product p { max-width: 630px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
    .hub-product-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 26px; }
    .hub-product-meta { color: var(--muted); font-size: 11px; }
    .future-product { background: transparent; }
    .future-product .product-status::before { background: var(--line-strong); }
    .future-product h3 { font-size: clamp(24px, 2.8vw, 36px); }
    #vitae { scroll-margin-top: 0; }
    @media (max-width: 760px) {
      .hub { min-height: auto; }
      .hub-kicker { margin-bottom: 58px; }
      .hub-hero { grid-template-columns: 1fr; gap: 48px; padding-bottom: 72px; }
      .hub-title { font-size: clamp(45px, 15vw, 68px); }
      .hub-products { grid-template-columns: 1fr; }
      .hub-product { min-height: 245px; }
      .future-product { min-height: 190px; }
      .products-head { align-items: flex-start; flex-direction: column; gap: 8px; }
    }
    @media (max-width: 480px) {
      .hub { padding-inline: 18px; }
      .hub-product-foot { align-items: flex-start; flex-direction: column; }
      .hub-product-foot .btn { width: 100%; }
    }

    /* Resume margin presets */
    .margin-choice { margin-top: 24px; }
    .margin-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
    .margin-option {
      min-height: 58px;
      display: grid;
      place-content: center;
      gap: 3px;
      border: 1px solid var(--line-strong);
      border-radius: 8px;
      background: transparent;
      color: var(--ink);
      text-align: center;
      cursor: pointer;
      transition: background .15s, border-color .15s, box-shadow .15s;
    }
    .margin-option strong { font-size: 11px; }
    .margin-option small { color: var(--muted); font-size: 9px; }
    .margin-option[aria-pressed="true"] { border-color: var(--ink); background: var(--bg); box-shadow: 0 0 0 1px var(--ink); }
    .margin-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
    .resume-paper { --resume-margin: clamp(34px, 4vw, 58px); padding: var(--resume-margin); }
    .resume-paper[data-margin="narrow"] { --resume-margin: clamp(24px, 3vw, 38px); }
    .resume-paper[data-margin="wide"] { --resume-margin: clamp(48px, 6vw, 78px); }
    .resume-paper.template-minimal,
    .resume-paper.template-compact,
    .resume-paper.template-ats,
    .resume-paper.template-classic { padding: var(--resume-margin); }
    .resume-paper.template-bold .resume-head {
      margin: calc(var(--resume-margin) * -1) calc(var(--resume-margin) * -1) 0;
      padding: var(--resume-margin) var(--resume-margin) 24px;
    }
    .resume-paper.template-sidebar { padding: var(--resume-margin); }
    .resume-paper.template-sidebar .resume-head { padding-left: 35%; }
    .resume-paper.template-sidebar .resume-sidebar { margin-left: calc(var(--resume-margin) * -1); }
    .preview-margin { color: var(--muted); font-weight: 500; }
    .preview-actions { flex-wrap: wrap; justify-content: flex-end; }
    @media (max-width: 560px) {
      .resume-paper { --resume-margin: 28px; }
      .resume-paper[data-margin="narrow"] { --resume-margin: 18px; }
      .resume-paper[data-margin="wide"] { --resume-margin: 38px; }
      .resume-paper.template-sidebar .resume-head { padding-left: 0; }
      .resume-paper.template-sidebar .resume-sidebar { margin-left: 0; }
      .preview-actions { grid-template-columns: 1fr; }
    }

    /* Cover letter builder */
    .cover-builder {
      min-height: 100vh;
      display: grid;
      grid-template-columns: minmax(390px, 520px) minmax(500px, 1fr);
      border-top: 1px solid var(--line);
      background: var(--panel);
      scroll-margin-top: 0;
    }
    .cover-editor {
      min-width: 0;
      padding: 38px clamp(26px, 3vw, 46px) 48px;
      border-right: 1px solid var(--line);
      background: var(--panel);
    }
    .cover-jump {
      display: flex;
      gap: 7px;
      margin: 0 0 28px;
      padding-bottom: 14px;
      border-bottom: 1px solid var(--line);
    }
    .cover-jump button {
      flex: 1;
      min-width: 0;
      border: 1px solid transparent;
      border-radius: 999px;
      padding: 8px 6px;
      background: var(--bg);
      color: var(--muted);
      font-size: 10px;
      font-weight: 700;
      cursor: pointer;
    }
    .cover-jump button[aria-current="step"] { background: var(--ink); color: var(--panel); }
    .cover-form-section { display: none; }
    .cover-form-section.active { display: block; }
    .cover-actions { margin-top: 28px; display: flex; justify-content: space-between; gap: 10px; }
    .copy-grid, .tone-grid, .letter-template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .choice-button {
      min-height: 70px;
      padding: 11px 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--bg);
      color: var(--ink);
      text-align: left;
      cursor: pointer;
    }
    .choice-button strong { display: block; font-size: 11px; }
    .choice-button span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }
    .choice-button[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: var(--panel); }
    .choice-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .template-swatch { width: 100%; height: 24px; margin-bottom: 8px; background: #fff; border: 1px solid #dbe2dd; position: relative; overflow: hidden; }
    .template-swatch::before { content: ""; position: absolute; inset: 6px auto auto 7px; width: 44%; height: 3px; background: #17231d; box-shadow: 0 7px 0 #c5cec8; }
    .template-swatch.modern { border-top: 4px solid #10b981; }
    .template-swatch.minimal::before { height: 2px; box-shadow: 0 8px 0 #d8ded9; }
    .template-swatch.corporate { background: linear-gradient(90deg, #18382b 0 26%, #fff 26%); }
    .template-swatch.executive { border-left: 5px solid #17231d; }
    .template-swatch.editorial::before { width: 28%; height: 5px; font-family: Georgia, serif; }
    .template-swatch.bold { background: #10b981; }
    .template-swatch.technical::before { background: repeating-linear-gradient(90deg, #17231d 0 4px, transparent 4px 6px); }
    .template-swatch.classic { border-block: 2px solid #17231d; }
    .cover-preview-pane {
      min-width: 0;
      min-height: 100vh;
      padding: 24px clamp(20px, 3.4vw, 48px) 54px;
      background: var(--bg);
    }
    .cover-paper {
      --letter-accent: #10b981;
      width: min(100%, 790px);
      min-height: 910px;
      margin: 0 auto;
      padding: clamp(42px, 6vw, 76px);
      background: #fff;
      color: #17231d;
      border: 1px solid rgba(19,32,23,.08);
      box-shadow: var(--shadow);
      position: relative;
      overflow: hidden;
    }
    .cover-paper::after {
      content: "FREE PREVIEW";
      position: absolute;
      left: 50%; top: 52%;
      transform: translate(-50%,-50%) rotate(-30deg);
      color: rgba(24,98,67,.22);
      font: 700 clamp(28px, 4vw, 54px)/1 "Manrope", sans-serif;
      letter-spacing: .14em;
      white-space: nowrap;
      pointer-events: none;
    }
    .cover-paper.pro-unlocked::after { display: none; }
    .letter-head { padding-bottom: 22px; border-bottom: 2px solid var(--letter-accent); }
    .letter-name { margin: 0; font: 700 clamp(27px, 3.2vw, 40px)/1 "Manrope", sans-serif; letter-spacing: -.045em; }
    .letter-contact { margin-top: 10px; color: #56635c; font-size: 10px; line-height: 1.6; }
    .letter-meta { margin-top: 34px; display: grid; gap: 3px; color: #47534c; font-size: 11px; line-height: 1.5; }
    .letter-subject { margin-top: 23px; font-size: 11px; font-weight: 700; color: #17231d; }
    .letter-body { margin-top: 22px; font: 400 11px/1.7 "Manrope", sans-serif; color: #2d3932; }
    .letter-body p { margin: 0 0 16px; white-space: pre-line; }
    .letter-signoff { margin-top: 24px; }
    .letter-signoff strong { display: block; margin-top: 24px; color: #17231d; }
    .cover-paper.template-minimal .letter-head { border: 0; }
    .cover-paper.template-minimal .letter-name { font-weight: 500; }
    .cover-paper.template-minimal .letter-body { color: #3d4842; }
    .cover-paper.template-corporate { border-top: 10px solid var(--letter-accent); }
    .cover-paper.template-corporate .letter-head { margin: calc(clamp(42px, 6vw, 76px) * -1) calc(clamp(42px, 6vw, 76px) * -1) 0; padding: 38px clamp(42px, 6vw, 76px) 24px; background: #eff5f1; border: 0; }
    .cover-paper.template-corporate .letter-name { text-transform: uppercase; letter-spacing: .035em; }
    .cover-paper.template-executive { border-left: 13px solid var(--letter-accent); }
    .cover-paper.template-executive .letter-head { border-bottom-color: #17231d; }
    .cover-paper.template-executive .letter-subject { text-transform: uppercase; letter-spacing: .1em; }
    .cover-paper.template-editorial .letter-name { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(34px, 4vw, 48px); }
    .cover-paper.template-editorial .letter-head { border-bottom: 1px solid #17231d; }
    .cover-paper.template-editorial .letter-body { font-family: Georgia, "Times New Roman", serif; font-size: 12px; line-height: 1.78; }
    .cover-paper.template-bold .letter-head { margin: calc(clamp(42px, 6vw, 76px) * -1) calc(clamp(42px, 6vw, 76px) * -1) 0; padding: 42px clamp(42px, 6vw, 76px) 28px; background: var(--letter-accent); border: 0; }
    .cover-paper.template-bold .letter-name, .cover-paper.template-bold .letter-contact { color: #06130c; }
    .cover-paper.template-technical { font-family: "Courier New", monospace; }
    .cover-paper.template-technical .letter-name, .cover-paper.template-technical .letter-body { font-family: "Courier New", monospace; }
    .cover-paper.template-technical .letter-head { border-bottom: 1px dashed #66736b; }
    .cover-paper.template-technical .letter-subject::before { content: "// "; color: var(--letter-accent); }
    .cover-paper.template-classic { padding-inline: clamp(52px, 7vw, 92px); }
    .cover-paper.template-classic .letter-head { text-align: center; border-block: 1px solid #17231d; padding: 18px 0; }
    .cover-paper.template-classic .letter-name, .cover-paper.template-classic .letter-body { font-family: "Times New Roman", Times, serif; }
    .cover-paper.template-classic .letter-name { font-weight: 400; letter-spacing: .02em; }
    .cover-paper.template-classic .letter-contact { font-family: "Times New Roman", Times, serif; }
    .element-style-block { margin-top: 25px; padding-top: 22px; border-top: 1px solid var(--line); }
    .element-style-block > label { display: block; margin-bottom: 11px; }
    .element-style-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .element-control { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 9px; min-height: 55px; padding: 8px 9px 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
    .element-control label { color: var(--ink); font-size: 10px; }
    .element-control input[type="color"] { width: 38px; height: 34px; min-height: 34px; padding: 3px; border: 1px solid var(--line-strong); background: var(--panel); cursor: pointer; }
    .font-control { display: grid; gap: 6px; }
    .font-control select { min-height: 42px; padding: 9px 10px; font-size: 11px; }
    .reset-styles { margin-top: 12px; }
    .resume-paper { background: var(--resume-background, #fff) !important; border-color: var(--resume-border, rgba(19,32,23,.08)) !important; }
    .resume-paper .resume-name { color: var(--resume-heading, #17231d) !important; font-family: var(--resume-name-font, "Source Serif 4", serif) !important; }
    .resume-paper .resume-section h3 { color: var(--resume-section-color, var(--resume-accent)) !important; font-family: var(--resume-heading-font, "Manrope", sans-serif) !important; }
    .resume-paper .resume-section p, .resume-paper .job-title { color: var(--resume-body, #35433b) !important; font-family: var(--resume-body-font, "Manrope", sans-serif) !important; }
    .resume-paper .resume-contact, .resume-paper .job-company, .resume-paper .job-dates, .resume-paper .skill-pill { font-family: var(--resume-meta-font, "Manrope", sans-serif) !important; }
    .resume-paper .resume-head { border-color: var(--resume-divider, var(--resume-accent)) !important; }
    .resume-paper .skill-pill { border-color: var(--resume-border, #d4dad6) !important; }
    .cover-paper { background: var(--letter-background, #fff) !important; border-color: var(--letter-border, rgba(19,32,23,.08)) !important; }
    .cover-paper .letter-name, .cover-paper .letter-subject { color: var(--letter-heading, #17231d) !important; font-family: var(--letter-name-font, "Manrope", sans-serif) !important; }
    .cover-paper .letter-subject { font-family: var(--letter-heading-font, "Manrope", sans-serif) !important; }
    .cover-paper .letter-body { color: var(--letter-body, #2d3932) !important; font-family: var(--letter-body-font, "Manrope", sans-serif) !important; }
    .cover-paper .letter-meta, .cover-paper .letter-contact { font-family: var(--letter-meta-font, "Manrope", sans-serif) !important; }
    .cover-paper .letter-head { border-color: var(--letter-divider, var(--letter-accent)) !important; }
    @media (max-width: 900px) {
      .cover-builder { grid-template-columns: 1fr; }
      .cover-editor { border-right: 0; border-bottom: 1px solid var(--line); }
      .cover-preview-pane { min-height: 0; }
    }
    @media (max-width: 560px) {
      .cover-editor { padding: 30px 20px 38px; }
      .cover-jump { display: grid; grid-template-columns: repeat(4, 1fr); }
      .cover-jump button { font-size: 9px; padding-inline: 3px; }
      .copy-grid, .tone-grid, .letter-template-grid { grid-template-columns: 1fr 1fr; }
      .choice-button { min-height: 66px; }
      .cover-paper { min-height: 720px; padding: 38px 25px; }
      .cover-paper.template-corporate .letter-head, .cover-paper.template-bold .letter-head { margin: -38px -25px 0; padding: 32px 25px 24px; }
      .cover-paper.template-classic { padding-inline: 30px; }
    }

    /* Three-page navigation */
    :root { --site-nav-height: 64px; }
    .page-view[hidden] { display: none !important; }
    .site-nav {
      position: sticky;
      top: 0;
      z-index: 40;
      height: var(--site-nav-height);
      border-bottom: 1px solid var(--line);
      background: color-mix(in srgb, var(--panel) 96%, transparent);
    }
    .site-nav-inner {
      width: min(1180px, 100%);
      height: 100%;
      margin: 0 auto;
      padding: 0 clamp(18px, 4vw, 44px);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 22px;
    }
    .site-nav-mark {
      color: var(--ink);
      font-size: 12px;
      font-weight: 800;
      letter-spacing: .11em;
      text-decoration: none;
    }
    .site-nav-links { display: flex; align-items: center; gap: 6px; }
    .site-nav-link {
      min-height: 38px;
      display: inline-flex;
      align-items: center;
      border-radius: 999px;
      padding: 8px 13px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
      text-decoration: none;
      white-space: nowrap;
    }
    .site-nav-link:hover { color: var(--ink); background: var(--bg); }
    .site-nav-link[aria-current="page"] { color: #041006; background: var(--accent); }
    .site-nav-link:focus-visible, .site-nav-mark:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
    .hub { min-height: calc(100vh - var(--site-nav-height)); }
    .app { height: calc(100vh - var(--site-nav-height)); min-height: 616px; }
    .rail { top: var(--site-nav-height); height: calc(100vh - var(--site-nav-height)); }
    .editor, .preview-pane { height: calc(100vh - var(--site-nav-height)); min-height: 616px; }
    .cover-builder { min-height: calc(100vh - var(--site-nav-height)); }
    @media (max-width: 900px) {
      .app { height: auto; min-height: calc(100vh - var(--site-nav-height)); }
      .rail { top: var(--site-nav-height); height: auto; }
      .editor, .preview-pane { height: auto; min-height: 0; }
    }
    @media (max-width: 560px) {
      :root { --site-nav-height: 58px; }
      .site-nav-inner { padding-inline: 12px; gap: 10px; }
      .site-nav-mark { font-size: 11px; }
      .site-nav-links { gap: 2px; }
      .site-nav-link { min-height: 36px; padding: 7px 9px; font-size: 10px; }
    }
  