/* =================================================================================================
   C++ Prep — Resume Builder: A4 templates (10 × v1/v2), builder UI, print-to-PDF
   ================================================================================================= */

/* ---------- A4 paper (always white, in every theme) ---------- */
.paper { width: 794px; min-height: 1123px; background: #fff; color: #16181d; box-sizing: border-box; text-align: left; font-kerning: normal;
  -webkit-font-smoothing: antialiased; -webkit-print-color-adjust: exact; print-color-adjust: exact; overflow-wrap: break-word; }
.paper *, .paper *::before, .paper *::after { margin: 0; padding: 0; box-sizing: border-box; }
.paper ul { list-style: none; }
/* Bullets without positioning: positioned boxes are painted (and written into the PDF text layer)
   after normal text, which would move every bullet to the end of the page for ATS parsers. */
.paper li { padding-left: 13px; }
.paper li::before { content: "•"; display: inline-block; width: 13px; margin-left: -13px; text-indent: 1px; }
.paper .row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.paper .row > :first-child { min-width: 0; }
.paper .row > :last-child { flex: none; white-space: nowrap; }
.paper b, .paper strong { font-weight: 700; }
.paper a { color: inherit; text-decoration: none; }
.paper.v2 .lnk { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.paper .num { font-variant-numeric: tabular-nums; }
.paper .pb { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed #d4572f; pointer-events: none; }
.paper .pb span { position: absolute; right: 10px; top: -11px; background: #d4572f; color: #fff; font: 700 11px/1 Arial, sans-serif; padding: 4px 7px; border-radius: 4px; }

/* ---------- v1 ---------- */
.t1 { font-family: "Source Serif 4", Georgia, serif; font-size: 13px; line-height: 1.32; padding: 44px 54px; }
.t1 h1 { font-size: 34px; font-weight: 700; text-align: center; font-variant: small-caps; letter-spacing: 0.02em; line-height: 1.1; }
.t1 .contact { text-align: center; font-size: 12.5px; margin-top: 6px; }
.t1 h2 { font-size: 15.5px; font-weight: 600; font-variant: small-caps; letter-spacing: 0.03em; border-bottom: 1px solid #222; padding-bottom: 2px; margin: 13px 0 6px; }
.t1 .entry { margin-bottom: 7px; }
.t1 .sub { font-style: italic; font-size: 12.5px; }
.t1 ul { margin-top: 3px; }
.t1 li { font-size: 12.5px; margin-bottom: 1.5px; }
.t1 .skills p { margin-bottom: 2px; }
.t2 { font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif; font-size: 12.6px; line-height: 1.3; padding: 36px 44px; }
.t2 header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; border-bottom: 2px solid #1b1f24; padding-bottom: 8px; }
.t2 h1 { font-size: 29px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.05; }
.t2 .tagline { font-size: 13.5px; color: #3c4450; margin-top: 3px; font-weight: 600; }
.t2 .contact { text-align: right; font-size: 11.8px; line-height: 1.45; color: #2a2f37; }
.t2 h2 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; margin: 11px 0 4px; color: #1b1f24; display: flex; align-items: center; gap: 8px; }
.t2 h2::after { content: ""; flex: 1; height: 1px; background: #b8bec6; }
.t2 .entry { margin-bottom: 6px; }
.t2 .d { color: #4a525e; font-size: 11.8px; }
.t2 li { margin-top: 1.5px; }
.t2 .skills { display: grid; grid-template-columns: 92px 1fr; gap: 2px 10px; }
.t3 { font-family: "Inter", Arial, sans-serif; font-size: 12px; line-height: 1.37; padding: 40px 50px; color: #1f2328; }
.t3 h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.t3 .tagline { font-size: 14px; color: #57606a; margin-top: 2px; }
.t3 .contact { font-size: 11.8px; color: #57606a; margin-top: 8px; }
.t3 h2 { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: #6e7781; margin: 12px 0 6px; padding-bottom: 4px; border-bottom: 1px solid #e1e4e8; }
.t3 .entry { margin-bottom: 6px; }
.t3 .row b { font-weight: 600; font-size: 13px; }
.t3 .d { color: #6e7781; font-size: 11.6px; font-variant-numeric: tabular-nums; }
.t3 .sub { color: #57606a; }
.t3 li { margin-top: 1.5px; }
.t3 li::before { color: #8c959f; }
.t3 .skills p { margin-bottom: 3px; }
.t3 .skills b { font-weight: 600; }
.t4 { --acc: #1d4f91; font-family: "Source Sans 3", Arial, sans-serif; font-size: 13px; line-height: 1.36; padding: 44px 52px; }
.t4 header { text-align: center; }
.t4 h1 { font-size: 33px; font-weight: 700; color: var(--acc); line-height: 1.1; }
.t4 .contact { font-size: 12.4px; margin-top: 5px; color: #333; }
.t4 h2 { color: var(--acc); font-size: 16px; font-weight: 700; border-bottom: 1px solid var(--acc); padding-bottom: 2px; margin: 13px 0 6px; }
.t4 .entry { margin-bottom: 7px; }
.t4 .sub { font-style: italic; }
.t4 li { margin-top: 2px; }
.t4 li::before { color: var(--acc); }
.t4 .skills p { margin-bottom: 2px; }
.t5 { --acc: #0f6e6e; font-family: "Lato", Arial, sans-serif; font-size: 12.1px; line-height: 1.32; padding: 36px 46px; }
.t5 h1 { font-size: 34px; font-weight: 900; letter-spacing: -0.01em; color: #14181d; line-height: 1.1; }
.t5 .tagline { color: var(--acc); font-size: 15px; font-weight: 700; margin-top: 2px; }
.t5 .contact { margin-top: 6px; font-size: 11.8px; color: #444; }
.t5 .sec { display: grid; grid-template-columns: 112px 1fr; column-gap: 16px; }
.t5 h2 { grid-column: 2; font-size: 14.5px; font-weight: 700; color: var(--acc); margin: 9px 0 4px; }
.t5 .hb { grid-column: 1; align-self: center; height: 3px; margin-top: 5px; background: var(--acc); }
.t5 .dt { grid-column: 1; text-align: right; color: #555; font-size: 11.6px; padding-top: 1px; }
.t5 .ct { grid-column: 2; margin-bottom: 5px; min-width: 0; }
.t5 .co { font-style: italic; color: #333; }
.t5 li::before { color: var(--acc); }
.t6 { font-family: "Crimson Pro", Georgia, serif; font-size: 13.8px; line-height: 1.27; padding: 38px 52px; color: #1a1a1a; }
.t6 header { text-align: center; }
.t6 h1 { font-size: 34px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.1; }
.t6 .tagline { font-style: italic; font-size: 16.5px; margin-top: 2px; color: #333; }
.t6 .contact { font-size: 13.4px; margin-top: 6px; color: #333; }
.t6 h2 { display: flex; align-items: center; gap: 12px; font-size: 13.5px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; margin: 9px 0 4px; }
.t6 h2::before, .t6 h2::after { content: ""; flex: 1; height: 1px; background: #9a9a9a; }
.t6 .summary { text-align: center; font-style: italic; padding: 0 24px; }
.t6 .entry { margin-bottom: 4px; }
.t6 .sub { font-style: italic; }
.t6 li { margin-top: 1px; }
.t6 .skills p { margin-bottom: 1px; }
.t7 { font-family: "Manrope", Arial, sans-serif; font-size: 12.2px; line-height: 1.45; padding: 48px 52px; color: #16181d; }
.t7 header { margin-bottom: 14px; }
.t7 h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.t7 .tagline { font-size: 14px; color: #5b6370; font-weight: 500; }
.t7 .contact { font-size: 11.6px; color: #5b6370; margin-top: 6px; }
.t7 .sec { display: grid; grid-template-columns: 104px 1fr; gap: 0 20px; padding: 10px 0; border-top: 1px solid #e3e6ea; }
.t7 h2 { font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #8a919c; padding-top: 2px; }
.t7 .entry + .entry { margin-top: 8px; }
.t7 .d { color: #8a919c; font-size: 11.4px; }
.t7 .co { color: #5b6370; }
.t7 li { margin-top: 2px; }
.t7 .skills p { margin-bottom: 2px; }
.t8 { --acc: #14324a; font-family: "IBM Plex Sans", Arial, sans-serif; font-size: 12.3px; line-height: 1.4; padding: 0 0 36px; }
.t8 header { background: var(--acc); color: #fff; padding: 28px var(--mx, 48px) 22px; }
.t8 h1 { font-size: 30px; font-weight: 700; line-height: 1.15; }
.t8 .tagline { font-size: 14px; color: #c9d6e3; margin-top: 2px; }
.t8 .contact { font-size: 11.8px; color: #e6edf4; margin-top: 8px; }
.t8 .body { padding: 0 var(--mx, 48px); }
.t8 h2 { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--acc); margin: 14px 0 6px; padding-bottom: 3px; border-bottom: 2px solid #d5dde6; }
.t8 .skills { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
.t8 .skills b { display: block; font-weight: 600; color: var(--acc); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.t8 .entry { margin-bottom: 7px; }
.t8 .co { color: #4a5868; }
.t8 .d { color: #4a5868; font-size: 11.6px; }
.t8 li { margin-top: 1.5px; }
.t8 li::before { color: var(--acc); }
.t9 { --acc: #4b32b5; font-family: "Source Sans 3", Arial, sans-serif; font-size: 12.9px; line-height: 1.37; padding: 42px 50px; }
.t9 h1 { font-family: "Space Grotesk", Arial, sans-serif; font-size: 31px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
.t9 .tagline { font-size: 14px; color: var(--acc); font-weight: 600; margin-top: 2px; }
.t9 .contact { font-size: 12px; color: #444; margin-top: 5px; }
.t9 h2 { font-family: "Space Grotesk", Arial, sans-serif; font-size: 14px; font-weight: 700; margin: 13px 0 6px; color: #16181d; }
.t9 h2::after { content: ""; display: block; width: 34px; height: 3px; background: var(--acc); margin-top: 3px; }
.t9 .proj { border-left: 3px solid var(--acc); padding-left: 12px; margin-bottom: 8px; }
.t9 .entry { margin-bottom: 7px; }
.t9 .sub { font-style: italic; color: #444; }
.t9 strong.m { color: var(--acc); }
.t9 li { margin-top: 1.5px; }
.t9 .skills p { margin-bottom: 2px; }
.t10 { font-family: "Roboto", Arial, sans-serif; font-size: 11.8px; line-height: 1.33; padding: 30px 42px; color: #1d1f22; }
.t10 header { border-bottom: 2px solid #1d1f22; padding-bottom: 8px; }
.t10 h1 { font-size: 26px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.15; }
.t10 .tagline { font-size: 13.5px; font-weight: 500; margin-top: 2px; }
.t10 .contact { font-size: 12px; margin-top: 4px; }
.t10 h2 { background: #e8ecf1; font-size: 11.8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 8px; margin: 8px 0 4px; border-left: 4px solid #2b4a6f; }
.t10 .entry { margin-bottom: 4px; }
.t10 .kv { display: grid; grid-template-columns: 150px 1fr; gap: 2px 10px; }
.t10 .kv b { font-weight: 500; }
.t10 li { margin-top: 1.5px; }
.t10 .decl { margin-top: 6px; font-size: 11.4px; color: #333; }
.t10 .sign { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11.4px; }

/* ---------- v2 ---------- */
.u1 { --acc: #1a3a6b; font-family: "Source Serif 4", Georgia, serif; font-size: 12.4px; line-height: 1.3; padding: 38px 50px; }
.u1 header { text-align: center; }
.u1 h1 { font-size: 33px; font-weight: 700; font-variant: small-caps; letter-spacing: 0.03em; line-height: 1.05; }
.u1 .headline { font-size: 13.2px; font-style: italic; color: #2b2b2b; margin-top: 4px; }
.u1 .contact { font-size: 11.8px; margin-top: 5px; }
.u1 .contact .lnk { color: var(--acc); }
.u1 .meta { font-size: 11.4px; color: #555; margin-top: 2px; }
.u1 h2 { font-size: 14.8px; font-weight: 600; font-variant: small-caps; letter-spacing: 0.04em; border-bottom: 1.2px solid #111; padding-bottom: 1px; margin: 10px 0 5px; }
.u1 .hl { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 20px; margin-top: 4px; }
.u1 .hl b { color: var(--acc); }
.u1 .skills p { margin-bottom: 1px; }
.u1 .entry { margin-bottom: 5px; }
.u1 .ctx { font-style: italic; color: #555; font-weight: 400; }
.u1 .sub { font-style: italic; font-size: 12px; }
.u1 .stack { font-size: 11.2px; color: #555; margin-top: 1px; }
.u1 ul { margin-top: 2px; }
.u1 li { font-size: 12px; margin-top: 1px; }
.u2 { --acc: #275b8c; font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif; font-size: 12.3px; line-height: 1.28; padding: 32px 42px; color: #15181c; }
.u2 header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.u2 h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.015em; line-height: 1; }
.u2 .headline { font-size: 13.2px; color: var(--acc); margin-top: 4px; font-weight: 600; }
.u2 .contact { text-align: right; font-size: 11.6px; line-height: 1.42; color: #2a2f37; }
.u2 .contact .lnk { color: #15181c; }
.u2 .meta { font-size: 11.4px; color: #4a525e; margin-top: 6px; padding-top: 6px; border-top: 2px solid #15181c; min-height: 8px; }
.u2 .strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 7px; border: 1px solid #d3d8df; border-radius: 4px; background: #f6f8fa; }
.u2 .strip p { padding: 6px 10px; border-left: 1px solid #d3d8df; line-height: 1.2; }
.u2 .strip p:first-child { border-left: 0; }
.u2 .strip b { display: block; font-size: 17px; color: var(--acc); letter-spacing: -0.01em; }
.u2 .strip span { display: block; font-size: 10.6px; color: #4a525e; margin-top: 1px; }
.u2 h2 { font-size: 11.6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin: 10px 0 4px; display: flex; align-items: center; gap: 8px; }
.u2 h2::after { content: ""; flex: 1; height: 1px; background: #b8bec6; }
.u2 .skills { display: grid; grid-template-columns: 88px 1fr; gap: 1px 10px; }
.u2 .entry { margin-bottom: 5px; }
.u2 .d { color: #4a525e; font-size: 11.4px; font-variant-numeric: tabular-nums; }
.u2 .co { color: #3a414b; }
.u2 .stack { font-size: 10.9px; color: var(--acc); margin-top: 1px; font-weight: 600; }
.u2 li { margin-top: 1px; }
.u3 { --acc: #0b6f6a; font-family: "Inter", Arial, sans-serif; font-size: 11.7px; line-height: 1.38; padding: 38px 50px; color: #1f2328; }
.u3 h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
.u3 .headline { font-size: 13.2px; color: #424a53; margin-top: 3px; }
.u3 .contact { font-size: 11.3px; color: #57606a; margin-top: 7px; }
.u3 .contact .lnk { color: var(--acc); }
.u3 .meta { font-size: 11.3px; color: #57606a; margin-top: 1px; }
.u3 .bar { width: 44px; height: 3px; background: var(--acc); margin-top: 10px; border-radius: 2px; }
.u3 h2 { font-size: 10.2px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: #6e7781; margin: 11px 0 5px; padding-bottom: 3px; border-bottom: 1px solid #e3e6ea; }
.u3 .hl { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 20px; margin-top: 5px; }
.u3 .hl li::before { color: var(--acc); }
.u3 .hl b { color: var(--acc); }
.u3 .entry { margin-bottom: 6px; }
.u3 .role { font-weight: 600; font-size: 12.6px; }
.u3 .d { color: #6e7781; font-size: 11.2px; font-variant-numeric: tabular-nums; }
.u3 .co { color: var(--acc); font-weight: 500; }
.u3 .co span { color: #6e7781; font-weight: 400; }
.u3 .stack { font-size: 10.8px; color: #6e7781; margin-top: 1px; }
.u3 li { margin-top: 1.5px; }
.u3 li::before { color: #8c959f; }
.u3 .skills p { margin-bottom: 2px; }
.u3 .skills b { font-weight: 600; }
.u4 { --acc: #1d4f91; --tint: #f1f5fb; font-family: "Source Sans 3", Arial, sans-serif; font-size: 12.5px; line-height: 1.32; padding: 36px 48px; }
.u4 header { text-align: center; }
.u4 h1 { font-size: 32px; font-weight: 700; color: var(--acc); letter-spacing: 0.01em; line-height: 1.05; }
.u4 .headline { font-size: 13.4px; font-weight: 600; color: #2f3a48; margin-top: 4px; }
.u4 .contact { font-size: 11.8px; margin-top: 4px; color: #333; }
.u4 .contact .lnk { color: var(--acc); }
.u4 .meta { font-size: 11.4px; margin-top: 1px; color: #555; }
.u4 h2 { color: var(--acc); font-size: 15px; font-weight: 700; border-bottom: 1px solid var(--acc); padding-bottom: 1px; margin: 10px 0 5px; }
.u4 .box { background: var(--tint); border-left: 3px solid var(--acc); padding: 7px 12px; margin-top: 8px; }
.u4 .box h3 { font-size: 11.4px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--acc); margin-bottom: 2px; }
.u4 .box ul { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 18px; }
.u4 .box b { color: var(--acc); }
.u4 .entry { margin-bottom: 5px; }
.u4 .sub { font-style: italic; color: #333; }
.u4 .stack { font-size: 11.2px; color: #555; }
.u4 .stack b { font-weight: 600; color: #333; }
.u4 li { margin-top: 1px; }
.u4 li::before { color: var(--acc); }
.u4 .skills p { margin-bottom: 1px; }
.u5 { --acc: #0f6e6e; --soft: #cfe3e1; font-family: "Lato", Arial, sans-serif; font-size: 11.9px; line-height: 1.32; padding: 34px 46px; }
.u5 header { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; align-items: end; padding-bottom: 8px; border-bottom: 3px solid var(--acc); }
.u5 h1 { font-size: 33px; font-weight: 900; letter-spacing: -0.01em; color: #14181d; line-height: 1; }
.u5 .headline { grid-column: 1; color: var(--acc); font-size: 13.4px; font-weight: 700; }
.u5 .contact { grid-column: 2; grid-row: 1 / span 2; text-align: right; font-size: 11.2px; line-height: 1.45; color: #333; }
.u5 .contact .lnk { color: var(--acc); }
.u5 .meta { font-size: 11.2px; color: #555; margin-top: 5px; }
.u5 .sec { display: grid; grid-template-columns: 100px 1fr; column-gap: 18px; }
.u5 h2 { grid-column: 2; font-size: 13.8px; font-weight: 900; color: var(--acc); margin: 9px 0 4px; letter-spacing: 0.01em; }
.u5 .dt { grid-column: 1; text-align: right; color: #4a4a4a; font-size: 11px; padding: 1px 12px 0 0; }
.u5 .ct { grid-column: 2; padding-bottom: 5px; min-width: 0; }
/* Timeline line + dot drawn as backgrounds (no positioning, so the text order stays right). */
.u5 .tl .dt { font-weight: 700; color: #2b2b2b; padding-right: 17px;
  background:
    radial-gradient(circle, var(--acc) 0 3.6px, #fff 3.8px 5.6px, transparent 5.8px) right -1px top 2px / 12px 12px no-repeat,
    linear-gradient(var(--soft), var(--soft)) right 4px top 0 / 2px 100% no-repeat; }
.u5 .tl .dt small { display: block; font-weight: 400; color: #666; }
.u5 .co { color: #333; }
.u5 .co i { color: #666; }
.u5 .stack { font-size: 10.8px; color: var(--acc); font-weight: 700; }
.u5 .hl { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 18px; margin-top: 3px; }
.u5 .hl b { color: var(--acc); }
.u5 li::before { color: var(--acc); }
.u5 li { margin-top: 1px; }
.u6 { --acc: #6b4f1d; font-family: "Crimson Pro", Georgia, serif; font-size: 13.4px; line-height: 1.25; padding: 36px 52px; color: #1a1a1a; }
.u6 header { text-align: center; }
.u6 h1 { font-size: 33px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; line-height: 1.05; }
.u6 .headline { font-style: italic; font-size: 15.6px; margin-top: 3px; color: #333; }
.u6 .contact { font-size: 12.6px; margin-top: 4px; color: #333; }
.u6 .meta { font-size: 12.2px; color: #555; }
.u6 h2 { display: flex; align-items: center; gap: 12px; font-size: 12.8px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; margin: 8px 0 4px; color: var(--acc); }
.u6 h2::before, .u6 h2::after { content: ""; flex: 1; height: 1px; background: var(--acc-lt, #b9ab92); }
.u6 .summary { text-align: center; font-style: italic; padding: 0 30px; }
.u6 .hl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.u6 .hl b { color: var(--acc); }
.u6 .entry { margin-bottom: 4px; }
.u6 .sub { font-style: italic; }
.u6 .stack { font-size: 12px; color: #555; font-style: italic; }
.u6 li { margin-top: 0.5px; }
.u6 .skills p { margin-bottom: 0.5px; }
.u7 { --acc: #3b47c2; font-family: "Manrope", Arial, sans-serif; font-size: 11.6px; line-height: 1.4; padding: 40px 48px; color: #16181d; }
.u7 header { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: end; margin-bottom: 10px; }
.u7 h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.u7 .headline { font-size: 13px; color: #5b6370; font-weight: 600; margin-top: 3px; }
.u7 .contact { text-align: right; font-size: 11px; color: #5b6370; line-height: 1.5; }
.u7 .contact .lnk { color: var(--acc); }
.u7 .sec { display: grid; grid-template-columns: 96px 1fr; gap: 0 20px; padding: 8px 0; border-top: 1px solid #e3e6ea; }
.u7 h2 { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #8a919c; padding-top: 2px; }
.u7 .hl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.u7 .hl p { line-height: 1.25; }
.u7 .hl b { display: block; font-size: 18px; font-weight: 800; color: var(--acc); letter-spacing: -0.02em; }
.u7 .hl span { font-size: 10.4px; color: #5b6370; }
.u7 .entry + .entry { margin-top: 7px; }
.u7 .d { color: #8a919c; font-size: 11px; font-variant-numeric: tabular-nums; }
.u7 .co { color: #5b6370; font-weight: 500; }
.u7 .stack { font-size: 10.6px; color: #8a919c; }
.u7 li { margin-top: 1.5px; }
.u7 li::before { color: var(--acc); }
.u7 .skills p { margin-bottom: 1px; }
.u8 { --acc: #14324a; --acc2: #2d7ab8; font-family: "IBM Plex Sans", Arial, sans-serif; font-size: 11.8px; line-height: 1.34; padding: 0 0 30px; }
.u8 header { background: var(--acc); color: #fff; padding: 24px var(--mx, 46px) 0; }
.u8 h1 { font-size: 30px; font-weight: 700; line-height: 1.1; }
.u8 .headline { font-size: 13.2px; color: #c9d6e3; margin-top: 3px; }
.u8 .contact { font-size: 11.3px; color: #e6edf4; margin-top: 7px; }
.u8 .contact .lnk { color: #fff; }
.u8 .facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 12px calc(-1 * var(--mx, 46px)) 0; background: var(--acc-dk, #0e2537); }
.u8 .facts p { padding: 7px var(--mx, 46px) 8px; font-size: 11px; color: #9fb3c6; border-left: 1px solid rgba(255, 255, 255, 0.08); line-height: 1.3; }
.u8 .facts p:first-child { border-left: 0; }
.u8 .facts b { display: block; color: #fff; font-size: 13.4px; font-weight: 600; }
.u8 .facts-pad { height: 20px; }
.u8 .body { padding: 0 var(--mx, 46px); }
.u8 h2 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--acc); margin: 11px 0 5px; padding-bottom: 2px; border-bottom: 2px solid #d5dde6; }
.u8 .comp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px 14px; }
.u8 .comp li::before { content: "▪"; color: var(--acc2); }
.u8 .tools { margin-top: 4px; }
.u8 .tools b { color: var(--acc); font-weight: 600; }
.u8 .entry { margin-bottom: 5px; }
.u8 .co { color: #4a5868; }
.u8 .d { color: #4a5868; font-size: 11.2px; }
.u8 .stack { font-size: 10.8px; color: var(--acc2); font-weight: 600; }
.u8 li { margin-top: 1px; }
.u8 li::before { color: var(--acc); }
.u9 { --acc: #4b32b5; --tint: #f4f1fe; font-family: "Source Sans 3", Arial, sans-serif; font-size: 12.3px; line-height: 1.3; padding: 34px 46px; }
.u9 header { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; }
.u9 h1 { font-family: "Space Grotesk", Arial, sans-serif; font-size: 31px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.u9 .headline { font-size: 13.4px; color: var(--acc); font-weight: 600; margin-top: 4px; }
.u9 .contact { text-align: right; font-size: 11.4px; color: #444; line-height: 1.42; }
.u9 .contact .lnk { color: var(--acc); }
.u9 .meta { font-size: 11.2px; color: #555; margin-top: 5px; }
.u9 .tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.u9 .tiles p { background: var(--tint); border-radius: 6px; padding: 8px 10px; line-height: 1.2; }
.u9 .tiles b { display: block; font-family: "Space Grotesk", Arial, sans-serif; font-size: 21px; color: var(--acc); letter-spacing: -0.02em; }
.u9 .tiles span { font-size: 10.6px; color: #3d3a4c; }
.u9 h2 { font-family: "Space Grotesk", Arial, sans-serif; font-size: 13.4px; font-weight: 700; margin: 10px 0 5px; display: flex; align-items: center; gap: 8px; }
.u9 h2::before { content: ""; width: 14px; height: 3px; background: var(--acc); border-radius: 2px; }
.u9 .proj { border-left: 3px solid var(--acc); padding-left: 11px; margin-bottom: 6px; }
.u9 .proj .tech { color: #555; font-style: italic; }
.u9 .entry { margin-bottom: 5px; }
.u9 .sub { color: #444; }
.u9 .stack { font-size: 10.9px; color: #666; }
.u9 strong.m { color: var(--acc); }
.u9 li { margin-top: 1px; }
.u9 .skills p { margin-bottom: 1px; }
.u10 { --acc: #1f4b7a; font-family: "Roboto", Arial, sans-serif; font-size: 11.4px; line-height: 1.32; padding: 28px 40px; color: #1d1f22; }
.u10 header { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; border-bottom: 2px solid var(--acc); padding-bottom: 7px; }
.u10 h1 { font-size: 25px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.1; color: var(--acc); }
.u10 .headline { font-size: 12.6px; font-weight: 500; margin-top: 2px; }
.u10 .contact { text-align: right; font-size: 11px; line-height: 1.45; }
.u10 .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; background: #f1f4f8; border: 1px solid #dde3ea; padding: 6px 10px; margin-top: 8px; }
.u10 .facts p b { font-weight: 500; color: #555; display: inline-block; min-width: 108px; }
.u10 h2 { background: #e8edf3; font-size: 11.4px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 8px; margin: 8px 0 4px; border-left: 4px solid var(--acc); color: var(--acc); }
.u10 .ks { line-height: 1.5; }
.u10 .ks b { font-weight: 500; }
.u10 .entry { margin-bottom: 4px; }
.u10 .eh { background: #fafbfc; border-bottom: 1px solid #e6eaef; padding: 1px 0 2px; }
.u10 .eh .co { color: #555; }
.u10 .stack { font-size: 10.8px; color: #555; margin-top: 1px; }
.u10 .stack b { color: #333; font-weight: 500; }
.u10 .kv { display: grid; grid-template-columns: 130px 1fr; gap: 1px 10px; }
.u10 .kv b { font-weight: 500; color: #444; }
.u10 li { margin-top: 1px; }
.u10 li::before { color: var(--acc); }
.u10 .decl { margin-top: 5px; font-size: 10.9px; color: #333; }
.u10 .sign { display: flex; justify-content: space-between; margin-top: 4px; font-size: 10.9px; }

/* ---------- Style options (Style tab) — classes / variables set by RT.render ---------- */
.paper.cf, .paper.cf * { font-family: var(--cf) !important; }
/* zoom scales the content but not the page: margins and the A4 width stay put */
.paper.fz > :not(.pb) { zoom: var(--fz); }
.paper.lh p, .paper.lh li, .paper.lh .entry, .paper.lh .proj, .paper.lh .row { line-height: var(--lh) !important; }
.paper.m-narrow { --mx: 32px; --my: 26px; }
.paper.m-wide { --mx: 64px; --my: 52px; }
.paper.m-narrow:not(.t8):not(.u8), .paper.m-wide:not(.t8):not(.u8) { padding: var(--my) var(--mx) !important; }
.paper.t8.m-narrow, .paper.t8.m-wide, .paper.u8.m-narrow, .paper.u8.m-wide { padding: 0 0 var(--my) !important; }

/* =================================================================================================
   Builder UI
   ================================================================================================= */
.rb-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; padding: 18px 0 12px; }
.rb-hero-text { flex: 1 1 320px; min-width: 0; }
.rb-hero-text h1 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 750; }
.rb-hero-text p { margin: 4px 0 0; color: var(--text-3); font-size: 13.5px; }
.rb-hero-side { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(122, 162, 255, 0.09), rgba(167, 139, 250, 0.04) 45%, transparent 80%), var(--surface); }
.rb-hero-side .ring { --ring-a: #34d399; --ring-b: #7aa2ff; }
.rb-hero-side { flex-wrap: wrap; }
.rb-score { flex: 1 1 130px; min-width: 0; }
.rb-score b { display: block; font-size: 14px; }
.rb-score span { font-size: 12px; color: var(--text-3); }
.rb-hero-actions { display: flex; gap: 6px; margin-left: auto; }
@media (max-width: 1023.98px) { .rb-hero-side { width: 100%; } }

.rb-sub { position: sticky; top: var(--hdr); z-index: 30; display: flex; gap: 4px; padding: 8px var(--gutter); margin: 0 calc(-1 * var(--gutter)) 12px;
  background: rgba(10, 14, 22, 0.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.rb-sub button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; border: 1px solid transparent; border-radius: 11px;
  background: transparent; color: var(--text-3); font: 650 13.5px var(--font); cursor: pointer; transition: background 0.18s, color 0.18s, border-color 0.18s; }
.rb-sub button .ic { width: 17px; height: 17px; }
.rb-sub button[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: #dbe6ff; }

.rb-grid { display: block; }
.rb-panel[hidden] { display: none !important; }

@media (min-width: 1024px) {
  .rb-sub { position: static; margin: 0 0 14px; padding: 4px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
  .rb-sub .rb-sub-preview { display: none; }
  .rb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 28px; align-items: start; }
  .rb-right.rb-panel, .rb-right.rb-panel[hidden] { position: sticky; top: calc(var(--hdr) + 12px); display: block !important; }
}

/* Sections (accordion cards) */
.rb-sec { margin-bottom: 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.rb-sec-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.rb-sec-head:hover { background: rgba(255, 255, 255, 0.025); }
.rb-sec-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.rb-sec-ic .ic { width: 18px; height: 18px; }
.rb-sec-title { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 700; font-size: 15px; line-height: 1.3; }
.rb-sec-title small { font-weight: 500; font-size: 12.3px; color: var(--text-3); }
.rb-sec-state { flex: none; font: 650 11.5px var(--mono); padding: 3px 8px; border-radius: 99px; background: var(--surface-2); color: var(--text-3); }
.rb-sec-state.ok { background: var(--green-soft); color: var(--green); }
.rb-sec-head .chev { color: var(--text-3); transition: transform 0.25s var(--ease); }
.rb-sec:not(.open) .chev { transform: rotate(-90deg); }
.rb-sec-body { padding: 4px 14px 16px; border-top: 1px solid var(--border); }
.rb-sec:not(.open) .rb-sec-body { display: none; }

.rb-tip { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 4px; padding: 9px 11px; border-radius: 11px; background: rgba(122, 162, 255, 0.07);
  border: 1px solid rgba(122, 162, 255, 0.2); color: var(--text-2); font-size: 12.8px; line-height: 1.5; }
.rb-tip .ic { width: 16px; height: 16px; margin-top: 2px; color: var(--accent); }
.rb-tip b { color: var(--text); }

.rb-fields { display: grid; grid-template-columns: 1fr; gap: 10px 12px; margin-top: 10px; }
@media (min-width: 560px) { .rb-fields { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) and (max-width: 1180px) { .rb-fields { grid-template-columns: 1fr; } }
.rb-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rb-f.full { grid-column: 1 / -1; }
.rb-f > span { font: 650 12.5px var(--font); color: var(--text-2); }
.rb-f > span small { font-weight: 500; color: var(--text-3); }
.rb-f input, .rb-f textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--bg-2); color: var(--text);
  font: 15px/1.45 var(--font); outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.rb-f textarea { resize: vertical; min-height: 92px; }
.rb-f input:focus, .rb-f textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.rb-f input::placeholder, .rb-f textarea::placeholder { color: #5f6a80; }
.rb-check { display: flex; align-items: center; gap: 9px; min-height: 42px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.rb-check input { width: 18px; height: 18px; accent-color: var(--accent); }
@media (max-width: 1023.98px) { .rb-f input, .rb-f textarea { font-size: 16px; } }

.rb-item { margin-top: 12px; padding: 12px; border-radius: 13px; border: 1px solid var(--border-2); background: rgba(255, 255, 255, 0.015); }
.rb-item-head { display: flex; align-items: center; gap: 8px; }
.rb-item-head b { flex: 1; min-width: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-item-head b small { font-weight: 500; color: var(--text-3); }
.rb-item .rb-fields { margin-top: 8px; }
.rb-mini { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); cursor: pointer; }
.rb-mini:hover { color: var(--text); border-color: var(--border-2); }
.rb-mini:disabled { opacity: 0.35; cursor: default; }
.rb-mini.del:hover { color: #fca5a5; border-color: var(--red-line); }
.rb-mini .ic { width: 16px; height: 16px; }
.rb-add { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 42px; margin-top: 12px; border-radius: 11px; border: 1px dashed var(--accent-line);
  background: rgba(122, 162, 255, 0.04); color: var(--accent); font: 650 13.5px var(--font); cursor: pointer; }
.rb-add:hover { background: var(--accent-soft); }
.rb-add:disabled { opacity: 0.4; cursor: default; }
.rb-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; align-items: center; }
.rb-sugg > span { font-size: 12.5px; color: var(--text-3); margin-right: 2px; }
.rb-sugg button { height: 30px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text-2); font: 600 12.5px var(--font); cursor: pointer; }
.rb-sugg button:hover { border-color: var(--accent-line); color: var(--text); }

/* Welcome card */
.rb-welcome { display: grid; gap: 12px; padding: 18px; margin-bottom: 12px; border-radius: var(--radius); border: 1px solid var(--accent-line);
  background: linear-gradient(140deg, rgba(122, 162, 255, 0.14), rgba(167, 139, 250, 0.08)); }
.rb-welcome h2 { margin: 0; font-size: 17px; }
.rb-welcome p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.rb-welcome .btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Template panel */
.rb-variant { display: grid; gap: 8px; margin-bottom: 14px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.rb-variant .seg { width: 100%; }
.rb-variant .seg button { flex: 1; height: 38px; }
.rb-variant p { margin: 0; font-size: 13px; color: var(--text-3); line-height: 1.5; }
.rb-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
@media (min-width: 640px) { .rb-gallery { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } }
.rb-tcard { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  text-align: left; cursor: pointer; font: inherit; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.rb-tcard:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.rb-tcard[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 12px 26px -14px rgba(122, 162, 255, 0.7); }
.rb-thumb { display: block; border-radius: 6px; overflow: hidden; background: #fff; position: relative; }
.rb-tcard[aria-pressed="true"] .rb-thumb::after { content: "✓ Selected"; position: absolute; bottom: 6px; right: 6px; padding: 3px 7px; border-radius: 6px; background: var(--accent);
  color: var(--accent-ink); font: 800 10px/1.2 var(--font); letter-spacing: 0.04em; }
.rb-tname { display: block; font-size: 13px; font-weight: 700; line-height: 1.3; }
.rb-tname i { font-style: normal; color: var(--accent); font-family: var(--mono); font-size: 12px; margin-right: 4px; }
.rb-tmeta { display: flex; flex-wrap: wrap; gap: 4px; }
.rb-tmeta span { font-size: 10.5px; font-weight: 650; padding: 2px 7px; border-radius: 99px; background: var(--surface-2); color: var(--text-3); }
.rb-tmeta .ex { background: var(--green-soft); color: var(--green); }
.rb-tmeta .vg { background: var(--accent-soft); color: var(--accent); }

/* Scaled A4 frames */
.rb-frame { display: block; position: relative; width: 100%; overflow: hidden; aspect-ratio: 794 / 1123; }
.rb-frame.sized { aspect-ratio: auto; }
.rb-frame > .paper { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.rb-frame a { pointer-events: none; }

/* Preview */
.rb-pv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 12px; }
.rb-pv-name { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.rb-pv-name small { color: var(--text-3); font-size: 12px; font-weight: 600; }
.rb-pv-name b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-pv-bar .seg button { height: 32px; padding: 0 11px; }
.rb-pages { font: 650 12px var(--font); padding: 5px 10px; border-radius: 99px; background: var(--green-soft); color: var(--green); white-space: nowrap; }
.rb-pages.two { background: var(--amber-soft); color: var(--amber); }
.rb-dl { flex: none; }
.rb-sheet { border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.rb-note { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--amber-soft); color: #fcd34d; font-size: 13px; font-weight: 600; }
.rb-note .ic { width: 16px; height: 16px; }
.rb-pdf-tip { margin: 10px 2px 0; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
/* Phone: Download PDF + version switch live in a dock at the bottom, always within thumb reach. */
.rb-dock { display: none; }
@media (max-width: 1023.98px) {
  .rb-dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; align-items: center; gap: 10px;
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: rgba(10, 14, 22, 0.96); border-top: 1px solid var(--border);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  }
  .rb-dock .seg button { height: 40px; padding: 0 12px; }
  .rb-dock .btn { flex: 1; height: 46px; }
  .rb-pv-bar .seg, .rb-pv-bar .rb-dl { display: none; }
  body[data-tab="resume"] #toasts { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
.pdf-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.pdf-steps b { color: var(--text); }
.rb-dock .rb-dock-style { flex: none; width: 46px; padding: 0; }
@media (max-width: 420px) {
  .rb-sub { gap: 2px; }
  .rb-sub button { gap: 5px; font-size: 12.6px; }
  .rb-sub button .ic { width: 15px; height: 15px; }
}
@media (max-width: 350px) { .rb-sub button .ic { display: none; } }

/* ---------- Upload an existing resume ---------- */
.rb-upload-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border-radius: 14px; border: 1.5px dashed var(--accent-line);
  background: rgba(10, 14, 22, 0.35); color: var(--text); text-align: left; cursor: pointer; font: inherit; transition: background 0.15s, border-color 0.15s, transform 0.15s; }
.rb-upload-card:hover { background: var(--accent-soft); border-color: var(--accent); transform: translateY(-1px); }
.rb-upload-ic { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--accent); color: var(--accent-ink); }
.rb-upload-ic .ic { width: 22px; height: 22px; }
.rb-upload-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rb-upload-t b { font-size: 15.5px; }
.rb-upload-t small { font-size: 12.5px; color: var(--text-3); line-height: 1.4; }
.rb-imported { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; padding: 11px 8px 11px 13px; border-radius: 13px; border: 1px solid var(--green-line, rgba(52, 211, 153, 0.35));
  background: var(--green-soft); }
.rb-imported > .ic { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--green); }
.rb-imported > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rb-imported b { font-size: 14px; overflow-wrap: anywhere; }
.rb-imported span { font-size: 12.8px; color: var(--text-2); line-height: 1.45; }
.rb-imported .icon-btn { flex: none; width: 34px; height: 34px; }
.rb-drop-hint { display: none; }
.rb.rb-dragging, .rb-dragging .rb { position: relative; }
.rb-dragging .rb-drop-hint { position: fixed; inset: 12px; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: 22px; border: 2px dashed var(--accent); background: rgba(10, 14, 22, 0.86); color: var(--text); pointer-events: none;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.rb-drop-hint .ic { width: 40px; height: 40px; color: var(--accent); }
.rb-drop-hint b { font-size: 18px; }
.rb-drop-hint span { color: var(--text-3); font-size: 13.5px; }

/* review sheet */
@media (min-width: 640px) { .sheet-import .sheet { max-width: 620px; } }
.ri-reading { display: flex; align-items: center; gap: 14px; padding: 26px 4px; }
.ri-reading div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ri-reading b { font-size: 15px; overflow-wrap: anywhere; }
.ri-reading span:not(.ri-spin) { font-size: 13px; color: var(--text-3); }
.ri-spin { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: riSpin 0.8s linear infinite; }
@keyframes riSpin { to { transform: rotate(360deg); } }
.ri-error { display: flex; gap: 12px; padding: 14px; margin-top: 4px; border-radius: 13px; background: var(--red-soft); border: 1px solid var(--red-line); }
.ri-error > .ic { flex: none; width: 22px; height: 22px; color: #fca5a5; }
.ri-error b { font-size: 14.5px; overflow-wrap: anywhere; }
.ri-error p { margin: 4px 0 0; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.ri-help { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13px; color: var(--text-3); line-height: 1.5; }
.ri-intro { display: flex; gap: 10px; align-items: flex-start; margin: 2px 0 12px; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.ri-intro .ic { flex: none; width: 20px; height: 20px; color: var(--green); margin-top: 1px; }
.ri-intro b { color: var(--text); overflow-wrap: anywhere; }
.ri-warn { display: flex; gap: 10px; padding: 10px 12px; margin-bottom: 12px; border-radius: 11px; background: var(--amber-soft); border: 1px solid var(--amber-line); }
.ri-warn .ic { flex: none; width: 18px; height: 18px; color: var(--amber); margin-top: 1px; }
.ri-warn p { margin: 0; font-size: 13px; color: #fde68a; line-height: 1.45; }
.ri-rows { display: grid; gap: 8px; }
.ri-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.ri-row:has(input:checked) { border-color: var(--accent-line); background: rgba(122, 162, 255, 0.06); }
.ri-row.off { opacity: 0.55; cursor: default; }
.ri-row input { flex: none; width: 19px; height: 19px; margin: 8px 0 0; accent-color: var(--accent); }
.ri-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.ri-ic .ic { width: 17px; height: 17px; }
.ri-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-top: 1px; }
.ri-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ri-top b { font-size: 14.5px; }
.ri-top em { font-style: normal; font: 650 11.5px var(--mono); padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--text-3); }
.ri-top em.ok { background: var(--green-soft); color: var(--green); }
.ri-show { font-size: 12.8px; color: var(--text-3); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ri-list { margin: 2px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.ri-list li { font-size: 13px; color: var(--text-2); line-height: 1.4; overflow-wrap: anywhere; }
.ri-list li small { display: block; font-size: 12px; color: var(--text-3); }
.ri-mode { display: grid; gap: 8px; margin-top: 14px; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.ri-mode b { font-size: 13.5px; }
.ri-mode .seg { width: 100%; }
.ri-mode .seg button { flex: 1; height: 38px; padding: 0 8px; font-size: 12.8px; }
.ri-raw { margin-top: 14px; }
.ri-raw summary { cursor: pointer; font-size: 13px; color: var(--text-3); font-weight: 600; padding: 4px 0; }
.ri-raw pre { margin: 8px 0 0; max-height: 240px; overflow: auto; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border);
  font: 12px/1.5 var(--mono); color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Style tab ---------- */
.rb-style { display: grid; gap: 12px; }
.rb-card { padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.rb-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14.5px; font-weight: 700; }
.rb-card h3 .ic { width: 17px; height: 17px; color: var(--accent); }
.rb-card h3 em { margin-left: auto; font: 650 12px var(--mono); font-style: normal; color: var(--text-3); }
.rb-card-2 { display: grid; gap: 14px; }
@media (min-width: 560px) { .rb-card-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) and (max-width: 1180px) { .rb-card-2 { grid-template-columns: 1fr; } }
.rb-seg { display: flex; width: 100%; }
.rb-seg button { flex: 1; min-width: 0; height: 38px; padding: 0 6px; font-size: 12.8px; }
.rb-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 128px), 1fr)); gap: 8px; }
.rb-fonts button { display: flex; align-items: center; gap: 9px; height: 46px; padding: 0 10px; border-radius: 11px; border: 1px solid var(--border-2); background: var(--bg-2);
  color: var(--text-2); font-size: 13.5px; cursor: pointer; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: border-color 0.15s, background 0.15s; }
.rb-fonts button span { flex: none; font-size: 19px; font-weight: 600; color: var(--text); }
.rb-fonts button:first-child { font-family: var(--font); }
.rb-fonts button:hover { border-color: var(--accent-line); }
.rb-fonts button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }
.rb-swatches { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.rb-swatches .sw { width: 38px; height: 38px; border-radius: 50%; border: 2px solid transparent; background: var(--sw); cursor: pointer; padding: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset; transition: transform 0.15s; position: relative; }
.rb-swatches .sw:hover:not(:disabled) { transform: scale(1.08); }
.rb-swatches .sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.rb-swatches .sw[aria-pressed="true"]:not(.sw-def)::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 800 15px var(--font); }
.rb-swatches .sw-def { width: auto; padding: 0 12px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); font: 650 12.5px var(--font); border: 1px solid var(--border-2); }
.rb-swatches .sw-pick { display: grid; place-items: center; background: conic-gradient(#f43f5e, #f59e0b, #22c55e, #06b6d4, #6366f1, #d946ef, #f43f5e); color: #fff; overflow: hidden; }
.rb-swatches .sw-pick .ic { width: 18px; height: 18px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6)); pointer-events: none; }
.rb-swatches .sw-pick input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.rb-swatches.off { opacity: 0.4; }
.rb-swatches.off .sw, .rb-swatches.off .sw-pick input { cursor: not-allowed; }
.rb-note-s { margin: 10px 0 0; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.rb-toggles { display: grid; grid-template-columns: 1fr; gap: 2px; }
@media (min-width: 560px) { .rb-toggles { grid-template-columns: 1fr 1fr; gap: 2px 14px; } }
@media (min-width: 1024px) and (max-width: 1180px) { .rb-toggles { grid-template-columns: 1fr; } }
.rb-toggle { display: flex; align-items: center; gap: 10px; min-height: 42px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.rb-toggle small { color: var(--text-3); font: 650 10.5px var(--mono); padding: 1px 6px; border-radius: 99px; background: var(--surface-2); }
.rb-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rb-toggle .tg { flex: none; position: relative; width: 38px; height: 22px; border-radius: 99px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-2); transition: background 0.18s; }
.rb-toggle .tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #c7cfdd; transition: transform 0.18s var(--ease), background 0.18s; }
.rb-toggle input:checked + .tg { background: var(--accent); box-shadow: none; }
.rb-toggle input:checked + .tg::after { transform: translateX(16px); background: #fff; }
.rb-toggle input:focus-visible + .tg { outline: 2px solid var(--accent); outline-offset: 2px; }
.rb-style-foot { display: grid; gap: 10px; justify-items: start; }
.rb-style-foot .rb-tip { margin: 0; }
/* phone: a small live page next to the controls */
.rb-mini-pv { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.rb-mini-sheet { flex: none; width: 112px; border-radius: 4px; overflow: hidden; background: #fff; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.9); }
.rb-mini-info { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.rb-mini-info small { color: var(--text-3); font-size: 12px; font-weight: 600; }
.rb-mini-info b { font-size: 14.5px; line-height: 1.25; }
@media (min-width: 1024px) { .rb-mini-pv { display: none; } }

/* =================================================================================================
   Print → PDF: only the resume sheet, A4, no app chrome
   ================================================================================================= */
#print-root { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; }
  body::before { display: none !important; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  #print-root .paper { width: 210mm; min-height: 0; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  .paper .entry, .paper .proj, .paper li, .paper .box, .paper .tiles, .paper .strip, .paper .facts, .paper .row { break-inside: avoid; }
  .paper h2, .paper h3 { break-after: avoid; }
}
