/* =========================================================
   BUBIXO CV BUILDER
   Main Stylesheet
   ========================================================= */


/* =========================================================
   RESET & ROOT
   ========================================================= */

:root {
    --bg-main: #f5f7fb;
    --bg-soft: #eef2ff;
    --surface: #ffffff;
    --surface-dark: #0f172a;

    --text-main: #0f172a;
    --text-soft: #64748b;
    --text-light: #94a3b8;

    --border: #e2e8f0;
    --border-dark: #334155;

    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-soft: #eef2ff;

    --purple: #7c3aed;
    --pink: #db2777;
    --blue: #2563eb;
    --cyan: #0891b2;

    --green: #059669;
    --green-soft: #ecfdf5;

    --orange: #ea580c;

    --danger: #dc2626;

    --shadow-sm:
        0 4px 15px rgba(15, 23, 42, 0.06);

    --shadow-md:
        0 15px 40px rgba(15, 23, 42, 0.10);

    --shadow-lg:
        0 25px 70px rgba(15, 23, 42, 0.16);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 30px;
}


* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;
    min-height: 100vh;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    background:
        radial-gradient(
            circle at 5% 5%,
            rgba(79, 70, 229, 0.08),
            transparent 25%
        ),
        radial-gradient(
            circle at 95% 20%,
            rgba(219, 39, 119, 0.06),
            transparent 25%
        ),
        var(--bg-main);

    color: var(--text-main);
}


button,
input,
textarea,
select {
    font: inherit;
}


button {
    cursor: pointer;
}


img {
    max-width: 100%;
}


a {
    color: inherit;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    width: 100%;

    background: rgba(255, 255, 255, 0.92);

    border-bottom: 1px solid var(--border);

    position: sticky;
    top: 0;
    z-index: 100;

    backdrop-filter: blur(14px);
}


.header-inner {
    max-width: 1500px;
    margin: 0 auto;

    padding: 15px 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


.brand {
    text-decoration: none;

    font-size: 28px;
    font-weight: 900;

    letter-spacing: -1px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--purple),
            var(--pink)
        );

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}


.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}


.language-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
}


.language-box label {
    font-size: 11px;
    font-weight: 800;

    color: var(--text-soft);

    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.language-box select {
    min-width: 155px;

    padding: 10px 35px 10px 12px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: #ffffff;

    color: var(--text-main);

    outline: none;
}


.language-box select:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(79, 70, 229, 0.10);
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    padding: 65px 25px 45px;
}


.hero-content {
    max-width: 950px;
    margin: 0 auto;

    text-align: center;
}


.hero-badge {
    display: inline-flex;

    padding: 8px 14px;

    border-radius: 999px;

    background: var(--primary-soft);
    color: var(--primary);

    font-size: 13px;
    font-weight: 800;

    margin-bottom: 18px;
}


.hero h1 {
    margin: 0;

    font-size: clamp(38px, 6vw, 68px);

    line-height: 1.04;

    letter-spacing: -3px;

    color: var(--text-main);
}


.hero p {
    max-width: 780px;

    margin: 22px auto 0;

    color: var(--text-soft);

    font-size: 18px;
    line-height: 1.7;
}


.hero-features {
    margin-top: 25px;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 10px;
}


.hero-features span {
    padding: 8px 13px;

    border-radius: 999px;

    background: #ffffff;
    border: 1px solid var(--border);

    color: #334155;

    font-size: 13px;
    font-weight: 700;

    box-shadow: var(--shadow-sm);
}


/* =========================================================
   BUILDER TOOLBAR
   ========================================================= */

.builder-toolbar {
    padding: 0 25px 20px;
}


.toolbar-inner {
    max-width: 1500px;
    margin: 0 auto;

    padding: 16px 18px;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: 18px;

    box-shadow: var(--shadow-sm);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


.template-selector {
    display: flex;
    align-items: center;

    gap: 15px;
}


.template-selector > label {
    font-size: 13px;
    font-weight: 800;

    color: var(--text-soft);
}


.template-buttons {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;
}


.template-btn {
    border: 1px solid var(--border);

    background: #ffffff;
    color: #475569;

    padding: 9px 13px;

    border-radius: 10px;

    font-size: 13px;
    font-weight: 750;

    transition: 0.2s ease;
}


.template-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}


.template-btn.active {
    background: var(--primary);
    border-color: var(--primary);

    color: #ffffff;
}


.toolbar-buttons {
    display: flex;
    gap: 10px;
}


.secondary-btn,
.download-btn {
    padding: 11px 17px;

    border-radius: 11px;

    font-weight: 800;

    transition: 0.2s ease;
}


.secondary-btn {
    border: 1px solid var(--border);

    background: #ffffff;
    color: #334155;
}


.secondary-btn:hover {
    background: #f8fafc;
}


.download-btn {
    border: 0;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--purple)
        );

    color: #ffffff;

    box-shadow:
        0 8px 20px rgba(79, 70, 229, 0.22);
}


.download-btn:hover {
    transform: translateY(-1px);

    box-shadow:
        0 12px 25px rgba(79, 70, 229, 0.28);
}


/* =========================================================
   MAIN BUILDER LAYOUT
   ========================================================= */

.builder-layout {
    max-width: 1500px;

    margin: 0 auto;

    padding: 0 25px 70px;

    display: grid;

    grid-template-columns:
        minmax(520px, 0.95fr)
        minmax(620px, 1.05fr);

    gap: 24px;

    align-items: start;
}


/* =========================================================
   FORM PANEL
   ========================================================= */

.form-panel {
    display: flex;
    flex-direction: column;

    gap: 18px;
}


.form-section {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    padding: 24px;

    box-shadow: var(--shadow-sm);
}


.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 22px;
}


.section-header > div {
    display: flex;
    align-items: center;

    gap: 11px;
}


.section-number {
    width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: var(--primary-soft);
    color: var(--primary);

    font-size: 12px;
    font-weight: 900;
}


.section-header h2 {
    margin: 0;

    font-size: 21px;

    letter-spacing: -0.4px;
}


.form-grid {
    display: grid;

    gap: 16px;
}


.two-columns {
    grid-template-columns: 1fr 1fr;
}


.full-width {
    grid-column: 1 / -1;
}


.field {
    display: flex;
    flex-direction: column;

    gap: 7px;
}


.field label {
    font-size: 13px;
    font-weight: 750;

    color: #475569;
}


.field input,
.field textarea {
    width: 100%;

    border: 1px solid var(--border);

    background: #ffffff;

    color: var(--text-main);

    border-radius: 12px;

    padding: 13px 14px;

    outline: none;

    transition: 0.2s ease;
}


.field textarea {
    resize: vertical;

    min-height: 110px;

    line-height: 1.55;
}


.field input:focus,
.field textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(79, 70, 229, 0.09);
}


.field input::placeholder,
.field textarea::placeholder {
    color: #a8b1c1;
}


.field-tip {
    color: var(--text-light);

    font-size: 12px;
    line-height: 1.5;
}


.ai-small-btn {
    border: 1px solid rgba(124, 58, 237, 0.22);

    background:
        linear-gradient(
            135deg,
            #f5f3ff,
            #fdf2f8
        );

    color: var(--purple);

    padding: 9px 12px;

    border-radius: 10px;

    font-size: 12px;
    font-weight: 800;
}


.ai-small-btn:hover {
    border-color: var(--purple);

    transform: translateY(-1px);
}


/* =========================================================
   REPEATABLE CARDS
   ========================================================= */

.repeat-card {
    padding: 18px;

    border: 1px solid var(--border);

    border-radius: 16px;

    background: #f8fafc;

    margin-bottom: 14px;
}


.repeat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 16px;
}


.repeat-card-header strong {
    font-size: 14px;

    color: #334155;
}


.remove-item-btn {
    border: 0;

    background: #fee2e2;
    color: var(--danger);

    border-radius: 8px;

    padding: 7px 10px;

    font-size: 12px;
    font-weight: 800;
}


.remove-item-btn:hover {
    background: #fecaca;
}


.add-btn {
    width: 100%;

    padding: 12px;

    border-radius: 12px;

    border: 1px dashed #a5b4fc;

    background: #f5f3ff;

    color: var(--primary);

    font-weight: 800;

    transition: 0.2s ease;
}


.add-btn:hover {
    background: #eef2ff;

    border-color: var(--primary);
}


/* =========================================================
   PREVIEW PANEL
   ========================================================= */

.preview-panel {
    position: sticky;

    top: 90px;

    background: #e8edf5;

    border: 1px solid #d7deea;

    border-radius: 24px;

    padding: 18px;

    box-shadow: var(--shadow-md);

    max-height: calc(100vh - 110px);

    overflow-y: auto;
}


.preview-panel::-webkit-scrollbar {
    width: 8px;
}


.preview-panel::-webkit-scrollbar-track {
    background: transparent;
}


.preview-panel::-webkit-scrollbar-thumb {
    background: #cbd5e1;

    border-radius: 10px;
}


.preview-top {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 14px;

    color: #334155;

    font-size: 13px;
}


.preview-status {
    color: var(--green);

    margin-right: 4px;
}


.ats-badge {
    padding: 6px 10px;

    background: var(--green-soft);
    color: var(--green);

    border-radius: 999px;

    font-size: 11px;
    font-weight: 900;
}


/* =========================================================
   CV PAPER BASE
   ========================================================= */

.cv-paper {
    width: 100%;
    max-width: 794px;

    min-height: 1123px;

    margin: 0 auto;

    background: #ffffff;

    color: #111827;

    padding: 50px 54px;

    box-shadow:
        0 15px 45px rgba(15, 23, 42, 0.15);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    line-height: 1.45;

    transition: 0.25s ease;
}


.cv-header {
    padding-bottom: 18px;

    border-bottom: 2px solid #111827;
}


.cv-header h1 {
    margin: 0;

    font-size: 34px;
    line-height: 1.1;

    letter-spacing: -1px;
}


.cv-job-title {
    margin-top: 6px;

    font-size: 17px;
    font-weight: 700;

    color: #475569;
}


.cv-contact,
.cv-links {
    display: flex;
    flex-wrap: wrap;

    gap: 7px 15px;

    margin-top: 12px;

    font-size: 11px;

    color: #475569;

    word-break: break-word;
}


.cv-links {
    margin-top: 6px;
}


.cv-contact span:not(:empty)::after,
.cv-links span:not(:empty)::after {
    content: "";
}


.cv-section {
    margin-top: 24px;
}


.cv-section h2 {
    margin: 0 0 10px;

    padding-bottom: 5px;

    border-bottom: 1px solid #cbd5e1;

    font-size: 14px;

    text-transform: uppercase;

    letter-spacing: 1px;
}


.cv-section p {
    margin: 0;

    font-size: 12px;

    line-height: 1.6;

    white-space: pre-line;
}


.cv-empty-text {
    color: #94a3b8;

    font-size: 12px;

    font-style: italic;
}


.cv-entry {
    margin-bottom: 15px;
}


.cv-entry:last-child {
    margin-bottom: 0;
}


.cv-entry-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 15px;
}


.cv-entry-title {
    font-size: 13px;
    font-weight: 800;
}


.cv-entry-company {
    margin-top: 2px;

    color: #475569;

    font-size: 12px;
    font-weight: 700;
}


.cv-entry-date {
    white-space: nowrap;

    color: #64748b;

    font-size: 10px;
}


.cv-entry-description {
    margin-top: 7px;

    font-size: 11px;

    line-height: 1.55;

    white-space: pre-line;
}


.skill-list {
    display: flex;
    flex-wrap: wrap;

    gap: 6px;
}


.skill-item {
    padding: 5px 8px;

    background: #f1f5f9;

    border: 1px solid #e2e8f0;

    border-radius: 5px;

    font-size: 10px;
    font-weight: 700;
}


/* =========================================================
   CLASSIC TEMPLATE
   ========================================================= */

.template-classic .cv-header {
    border-bottom-color: #111827;
}


.template-classic .cv-section h2 {
    color: #111827;
}


/* =========================================================
   MODERN TEMPLATE
   ========================================================= */

.template-modern {
    border-top: 10px solid var(--primary);

    padding-top: 42px;
}


.template-modern .cv-header {
    border-bottom: 0;

    padding: 20px;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            #eef2ff,
            #f8fafc
        );
}


.template-modern .cv-header h1 {
    color: var(--primary-dark);
}


.template-modern .cv-section h2 {
    color: var(--primary);

    border-bottom: 2px solid #c7d2fe;
}


.template-modern .skill-item {
    background: #eef2ff;

    border-color: #c7d2fe;

    color: var(--primary-dark);

    border-radius: 999px;
}


/* =========================================================
   PROFESSIONAL TEMPLATE
   ========================================================= */

.template-professional {
    border-left: 12px solid #0f172a;

    padding-left: 48px;
}


.template-professional .cv-header {
    border-bottom: 3px solid #0f172a;
}


.template-professional .cv-header h1 {
    font-family: Georgia, "Times New Roman", serif;

    font-weight: 700;
}


.template-professional .cv-job-title {
    color: #334155;

    letter-spacing: 0.5px;
}


.template-professional .cv-section h2 {
    font-family: Georgia, "Times New Roman", serif;

    text-transform: none;

    letter-spacing: 0;

    font-size: 16px;

    border-bottom-color: #94a3b8;
}


/* =========================================================
   PRICING SECTION
   ========================================================= */

.pricing-section {
    padding: 85px 25px;

    background:
        linear-gradient(
            180deg,
            rgba(238, 242, 255, 0.5),
            #ffffff
        );

    border-top: 1px solid var(--border);
}


.pricing-heading {
    max-width: 760px;

    margin: 0 auto 45px;

    text-align: center;
}


.pricing-eyebrow {
    display: inline-block;

    margin-bottom: 10px;

    color: var(--primary);

    font-size: 13px;
    font-weight: 900;

    text-transform: uppercase;

    letter-spacing: 1px;
}


.pricing-heading h2 {
    margin: 0;

    font-size: clamp(32px, 5vw, 48px);

    letter-spacing: -1.8px;

    line-height: 1.1;
}


.pricing-heading p {
    margin: 18px auto 0;

    color: var(--text-soft);

    font-size: 17px;

    line-height: 1.7;
}


.pricing-grid {
    max-width: 1000px;

    margin: 0 auto;

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 22px;

    align-items: stretch;
}


.price-card {
    position: relative;

    padding: 30px;

    border-radius: 26px;

    background: #ffffff;

    border: 1px solid var(--border);

    box-shadow: var(--shadow-md);

    display: flex;
    flex-direction: column;
}


.ai-card {
    border: 2px solid var(--purple);

    box-shadow:
        0 25px 60px rgba(124, 58, 237, 0.16);
}


.recommended-badge {
    position: absolute;

    top: -14px;
    left: 50%;

    transform: translateX(-50%);

    white-space: nowrap;

    padding: 7px 13px;

    border-radius: 999px;

    background:
        linear-gradient(
            135deg,
            var(--purple),
            var(--pink)
        );

    color: #ffffff;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 0.7px;
}


.plan-badge {
    display: inline-block;

    padding: 6px 10px;

    border-radius: 999px;

    background: #f1f5f9;

    color: #475569;

    font-size: 11px;
    font-weight: 900;

    letter-spacing: 0.5px;
}


.ai-plan-badge {
    background: #f5f3ff;

    color: var(--purple);
}


.plan-top h3 {
    margin: 16px 0 10px;

    font-size: 25px;

    letter-spacing: -0.6px;
}


.price {
    margin: 8px 0;

    font-size: 42px;
    font-weight: 900;

    letter-spacing: -1.5px;
}


.price small {
    display: block;

    margin-top: 2px;

    color: var(--text-soft);

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 0;
}


.plan-top p {
    min-height: 52px;

    color: var(--text-soft);

    line-height: 1.6;

    font-size: 14px;
}


.feature-list {
    list-style: none;

    margin: 20px 0 28px;
    padding: 0;

    display: flex;
    flex-direction: column;

    gap: 12px;

    flex-grow: 1;
}


.feature-list li {
    color: #334155;

    font-size: 14px;

    line-height: 1.45;
}


.feature-list .not-included {
    color: #94a3b8;
}


.free-plan-btn,
.ai-plan-btn {
    width: 100%;

    padding: 14px;

    border-radius: 13px;

    font-weight: 900;
}


.free-plan-btn {
    border: 1px solid var(--border-dark);

    background: #ffffff;

    color: var(--text-main);
}


.free-plan-btn:hover {
    background: #f8fafc;
}


.ai-plan-btn {
    border: 0;

    background:
        linear-gradient(
            135deg,
            var(--purple),
            var(--pink)
        );

    color: #ffffff;

    box-shadow:
        0 12px 30px rgba(124, 58, 237, 0.25);
}


.ai-plan-btn:hover {
    transform: translateY(-1px);

    box-shadow:
        0 15px 35px rgba(124, 58, 237, 0.32);
}


/* =========================================================
   CAREER FLOW
   ========================================================= */

.career-flow-section {
    padding: 85px 25px;

    background: #0f172a;

    color: #ffffff;
}


.career-flow-inner {
    max-width: 1200px;

    margin: 0 auto;
}


.career-flow-heading {
    max-width: 720px;

    margin-bottom: 40px;
}


.career-flow-heading > span {
    color: #a5b4fc;

    font-size: 13px;
    font-weight: 900;

    text-transform: uppercase;

    letter-spacing: 1px;
}


.career-flow-heading h2 {
    margin: 10px 0 14px;

    font-size: clamp(32px, 5vw, 48px);

    letter-spacing: -1.7px;
}


.career-flow-heading p {
    margin: 0;

    color: #cbd5e1;

    line-height: 1.7;

    font-size: 16px;
}


.flow-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 15px;
}


.flow-card {
    padding: 24px;

    min-height: 180px;

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.08),
            rgba(255, 255, 255, 0.03)
        );

    border:
        1px solid rgba(255, 255, 255, 0.10);
}


.flow-number {
    display: inline-flex;

    width: 35px;
    height: 35px;

    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: rgba(129, 140, 248, 0.16);

    color: #c7d2fe;

    font-size: 11px;
    font-weight: 900;
}


.flow-card h3 {
    margin: 18px 0 8px;

    font-size: 20px;
}


.flow-card p {
    margin: 0;

    color: #cbd5e1;

    font-size: 14px;

    line-height: 1.6;
}


/* =========================================================
   PRIVACY SECTION
   ========================================================= */

.privacy-section {
    padding: 60px 25px;

    background: #ffffff;
}


.privacy-box {
    max-width: 1000px;

    margin: 0 auto;

    padding: 26px;

    border-radius: 20px;

    background: #f8fafc;

    border: 1px solid var(--border);

    display: flex;

    gap: 18px;

    align-items: flex-start;
}


.privacy-icon {
    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ecfdf5;

    border-radius: 13px;

    font-size: 23px;
}


.privacy-box h2 {
    margin: 0 0 8px;

    font-size: 20px;
}


.privacy-box p {
    margin: 0;

    color: var(--text-soft);

    line-height: 1.7;

    font-size: 14px;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    padding: 28px 25px;

    background: #020617;

    color: #94a3b8;
}


.footer-inner {
    max-width: 1200px;

    margin: 0 auto;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;
}


.footer-inner strong {
    color: #ffffff;

    font-size: 20px;
}


/* =========================================================
   MODAL
   ========================================================= */

.modal-overlay {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(2, 6, 23, 0.70);

    backdrop-filter: blur(6px);
}


.modal-overlay.show {
    display: flex;
}


.modal-card {
    position: relative;

    width: 100%;
    max-width: 460px;

    padding: 35px;

    border-radius: 25px;

    background: #ffffff;

    text-align: center;

    box-shadow: var(--shadow-lg);

    animation: modalIn 0.25s ease;
}


@keyframes modalIn {

    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}


.modal-close {
    position: absolute;

    top: 12px;
    right: 15px;

    border: 0;

    background: transparent;

    color: #64748b;

    font-size: 28px;
}


.modal-icon {
    font-size: 45px;

    margin-bottom: 12px;
}


.modal-card h2 {
    margin: 0 0 10px;

    font-size: 28px;
}


.modal-card p {
    color: var(--text-soft);

    line-height: 1.7;
}


.modal-action {
    width: 100%;

    margin-top: 12px;

    padding: 14px;

    border: 0;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--purple)
        );

    color: #ffffff;

    font-weight: 900;
}


/* =========================================================
   RTL SUPPORT
   Arabic Interface / CV
   ========================================================= */

html[dir="rtl"] body {
    direction: rtl;
}


html[dir="rtl"] .header-inner,
html[dir="rtl"] .toolbar-inner,
html[dir="rtl"] .section-header,
html[dir="rtl"] .footer-inner,
html[dir="rtl"] .preview-top,
html[dir="rtl"] .privacy-box {
    direction: rtl;
}


.cv-paper.cv-rtl {
    direction: rtl;

    text-align: right;
}


.cv-paper.cv-rtl .cv-contact,
.cv-paper.cv-rtl .cv-links,
.cv-paper.cv-rtl .skill-list {
    justify-content: flex-start;
}


.cv-paper.cv-rtl .cv-entry-top {
    direction: rtl;
}


/* =========================================================
   EAST ASIAN FONT SUPPORT
   ========================================================= */

html[lang="zh"] body,
html[lang="ja"] body,
html[lang="ko"] body {
    font-family:
        "Noto Sans CJK",
        "Noto Sans",
        Arial,
        sans-serif;
}


.cv-paper.cv-lang-zh,
.cv-paper.cv-lang-ja,
.cv-paper.cv-lang-ko {
    font-family:
        "Noto Sans CJK",
        "Noto Sans",
        Arial,
        sans-serif;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1250px) {

    .builder-layout {
        grid-template-columns: 1fr;
    }


    .preview-panel {
        position: relative;

        top: auto;

        max-height: none;
    }


    .cv-paper {
        max-width: 850px;
    }

}


@media (max-width: 900px) {

    .header-inner {
        align-items: flex-start;

        flex-direction: column;
    }


    .header-actions {
        width: 100%;

        display: grid;

        grid-template-columns: 1fr 1fr;
    }


    .language-box select {
        width: 100%;
    }


    .toolbar-inner {
        align-items: flex-start;

        flex-direction: column;
    }


    .template-selector {
        width: 100%;

        align-items: flex-start;

        flex-direction: column;
    }


    .toolbar-buttons {
        width: 100%;
    }


    .toolbar-buttons button {
        flex: 1;
    }


    .pricing-grid {
        grid-template-columns: 1fr;

        max-width: 620px;
    }


    .flow-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}


@media (max-width: 700px) {

    .hero {
        padding-top: 45px;
    }


    .hero h1 {
        letter-spacing: -1.8px;
    }


    .hero p {
        font-size: 16px;
    }


    .builder-layout,
    .builder-toolbar {
        padding-left: 14px;
        padding-right: 14px;
    }


    .form-section {
        padding: 19px;
    }


    .two-columns {
        grid-template-columns: 1fr;
    }


    .full-width {
        grid-column: auto;
    }


    .section-header {
        align-items: flex-start;

        flex-direction: column;
    }


    .cv-paper {
        min-height: auto;

        padding: 35px 28px;
    }


    .cv-header h1 {
        font-size: 28px;
    }


    .cv-entry-top {
        flex-direction: column;

        gap: 4px;
    }


    .pricing-section,
    .career-flow-section {
        padding-top: 65px;
        padding-bottom: 65px;
    }


    .flow-grid {
        grid-template-columns: 1fr;
    }


    .privacy-box {
        flex-direction: column;
    }


    .footer-inner {
        align-items: flex-start;

        flex-direction: column;
    }

}


@media (max-width: 520px) {

    .header-inner {
        padding-left: 16px;
        padding-right: 16px;
    }


    .header-actions {
        grid-template-columns: 1fr;
    }


    .hero-features {
        align-items: stretch;

        flex-direction: column;
    }


    .template-buttons {
        width: 100%;
    }


    .template-btn {
        flex: 1;
    }


    .toolbar-buttons {
        flex-direction: column;
    }


    .preview-panel {
        padding: 8px;

        border-radius: 15px;
    }


    .preview-top {
        padding: 5px;
    }


    .cv-paper {
        padding: 28px 20px;
    }


    .price-card {
        padding: 25px 20px;
    }


    .recommended-badge {
        font-size: 9px;
    }

}


/* =========================================================
   PRINT / PDF SUPPORT
   ========================================================= */

@media print {

    body {
        background: #ffffff;
    }


    body * {
        visibility: hidden;
    }


    #cvPreview,
    #cvPreview * {
        visibility: visible;
    }


    #cvPreview {
        position: absolute;

        left: 0;
        top: 0;

        width: 210mm;
        min-height: 297mm;

        margin: 0;

        padding: 15mm;

        box-shadow: none;

        border: 0;
    }


    .template-professional {
        border-left-width: 8px;
    }

}


/* =========================================================
   SMALL UI ANIMATIONS
   ========================================================= */

.form-section,
.price-card,
.flow-card {
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}


.form-section:hover {
    border-color: #cbd5e1;
}


.flow-card:hover {
    transform: translateY(-3px);

    border-color: rgba(165, 180, 252, 0.30);
}


/* =========================================================
   UTILITY STATES
   ========================================================= */

.hidden {
    display: none !important;
}


.no-scroll {
    overflow: hidden;
}


button:disabled {
    opacity: 0.55;

    cursor: not-allowed;
}


input.error-field,
textarea.error-field {
    border-color: var(--danger);

    box-shadow:
        0 0 0 3px rgba(220, 38, 38, 0.08);
}

/* =========================================================
   FIX: FORM LEFT / LIVE PREVIEW RIGHT ON DESKTOP
   Add this block to the very bottom of style.css
   ========================================================= */

@media (min-width: 1001px) {

    .builder-layout {
        max-width: 1700px !important;
        margin: 0 auto !important;
        padding: 0 25px 70px !important;
        display: grid !important;
        grid-template-columns: minmax(480px, 0.9fr) minmax(560px, 1.1fr) !important;
        gap: 24px !important;
        align-items: start !important;
    }

    .form-panel {
        grid-column: 1 !important;
    }

    .preview-panel {
        grid-column: 2 !important;
        position: sticky !important;
        top: 90px !important;
        max-height: calc(100vh - 110px) !important;
        overflow-y: auto !important;
    }
}

@media (max-width: 1000px) {

    .builder-layout {
        grid-template-columns: 1fr !important;
    }

    .preview-panel {
        position: relative !important;
        top: auto !important;
        max-height: none !important;
    }
}


/* =========================================================
   PROFILE PHOTO SUPPORT
   ========================================================= */

.cv-header {
    position: relative;
    padding-right: 112px;
    min-height: 92px;
}

.cv-photo {
    display: none;
    position: absolute;
    top: 0;
    right: 0;

    width: 86px;
    height: 86px;

    object-fit: cover;
    border-radius: 50%;

    border: 3px solid #e2e8f0;
    background: #f8fafc;
}

.cv-photo.show {
    display: block;
}

/* In Classic ATS template, keep the photo clean and simple */
.template-classic .cv-photo {
    border-radius: 50%;
}

/* Modern template photo */
.template-modern .cv-photo {
    top: 20px;
    right: 20px;
    border-radius: 18px;
    border-color: #c7d2fe;
}

/* Professional template photo */
.template-professional .cv-photo {
    border-radius: 8px;
    border-color: #94a3b8;
}

/* RTL photo support */
.cv-paper.cv-rtl .cv-header {
    padding-right: 0;
    padding-left: 112px;
}

.cv-paper.cv-rtl .cv-photo {
    right: auto;
    left: 0;
}

.cv-paper.cv-rtl.template-modern .cv-photo {
    right: auto;
    left: 20px;
}

/* Mobile CV photo adjustment */
@media (max-width: 700px) {

    .cv-header {
        padding-right: 0;
        padding-top: 96px;
    }

    .cv-photo {
        left: 0;
        right: auto;
        top: 0;
    }

    .template-modern .cv-photo {
        left: 20px;
        right: auto;
        top: 20px;
    }

    .cv-paper.cv-rtl .cv-header {
        padding-left: 0;
        padding-top: 96px;
    }

    .cv-paper.cv-rtl .cv-photo {
        right: 0;
        left: auto;
    }
}

@media print {

    .cv-photo.show {
        display: block !important;
    }

    .cv-header {
        padding-right: 105px !important;
    }

    .cv-paper.cv-rtl .cv-header {
        padding-right: 0 !important;
        padding-left: 105px !important;
    }
}


/* =========================================================
   FINAL PROFILE PHOTO SIZE FIX
   ========================================================= */

#cvPreview .cv-header {
    position: relative !important;
    padding-right: 125px !important;
    min-height: 120px !important;
}

#cvPreview #previewPhoto.cv-photo {
    display: none;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;

    width: 96px !important;
    height: 118px !important;
    max-width: 96px !important;
    max-height: 118px !important;

    object-fit: cover !important;
    object-position: center top !important;

    border-radius: 8px !important;
    border: 2px solid #dbe3ef !important;
    background: #f8fafc !important;

    margin: 0 !important;
    padding: 0 !important;
}

#cvPreview #previewPhoto.cv-photo[src] {
    display: block !important;
}

#cvPreview.cv-rtl .cv-header {
    padding-right: 0 !important;
    padding-left: 125px !important;
}

#cvPreview.cv-rtl #previewPhoto.cv-photo {
    right: auto !important;
    left: 0 !important;
}

@media (max-width: 700px) {
    #cvPreview .cv-header {
        padding-right: 105px !important;
        padding-top: 0 !important;
        min-height: 105px !important;
    }

    #cvPreview #previewPhoto.cv-photo {
        width: 82px !important;
        height: 102px !important;
        max-width: 82px !important;
        max-height: 102px !important;
        top: 0 !important;
        right: 0 !important;
        left: auto !important;
    }
}

@media print {
    #cvPreview #previewPhoto.cv-photo[src] {
        display: block !important;
        width: 96px !important;
        height: 118px !important;
        max-width: 96px !important;
        max-height: 118px !important;
    }
}



/* =========================================================
   HARD FIX: CV PHOTO BOX
   ========================================================= */

#cvPreview .cv-header {
    position: relative !important;
    padding-right: 118px !important;
    min-height: 122px !important;
}

#cvPreview img#previewPhoto {
    display: none;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;

    width: 92px !important;
    height: 112px !important;
    min-width: 92px !important;
    min-height: 112px !important;
    max-width: 92px !important;
    max-height: 112px !important;

    object-fit: cover !important;
    object-position: center top !important;

    border-radius: 7px !important;
    border: 2px solid #dbe3ef !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* =========================================================
   AI LAYER
   Appended 2026-08-04. Everything below styles the free AI
   controls injected by assets/ai.js, plus two fixes the
   printed CV needed: empty sections and page breaks.
   ========================================================= */


/* --- hero note (replaced the paid CTA) ------------------ */

.hero-ai-note {
    margin-top: 26px;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;

    font-size: 14px;
    color: var(--text-soft);
    font-weight: 600;
}


.hero-ai-badge {
    display: inline-block;

    padding: 6px 12px;

    border-radius: 999px;

    background: var(--primary-soft);
    color: var(--primary-dark);

    font-size: 13px;
    font-weight: 800;
}


/* --- shared host + buttons ------------------------------ */

.ai-host {
    margin-top: 12px;

    display: flex;
    flex-direction: column;
    gap: 10px;
}


.ai-btn {
    align-self: flex-start;

    padding: 9px 14px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: var(--surface);
    color: var(--text-main);

    font-size: 13px;
    font-weight: 700;
    font-family: inherit;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        opacity 0.15s ease;
}


.ai-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: var(--primary-soft);
}


.ai-btn-primary {
    border-color: transparent;

    background: var(--primary);
    color: #ffffff;
}


.ai-btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    border-color: transparent;
}


.ai-btn-ghost {
    background: transparent;
    color: var(--text-soft);
}


/* A request is in flight: the control is unusable on purpose so a second
   click cannot start a second paid call. */
.ai-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


.ai-btn.is-loading::before {
    content: "";

    display: inline-block;

    width: 11px;
    height: 11px;

    margin-right: 7px;

    vertical-align: -1px;

    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;

    animation: ai-spin 0.7s linear infinite;
}


@keyframes ai-spin {
    to { transform: rotate(360deg); }
}


/* --- inputs the summary generator asks for -------------- */

.ai-inputs {
    padding: 14px;

    border: 1px dashed var(--border);
    border-radius: 12px;

    background: var(--bg-soft);
}


.ai-inputs-title {
    margin-bottom: 10px;

    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
}


.ai-inputs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}


.ai-input-field.full {
    grid-column: 1 / -1;
}


.ai-input-field label {
    display: block;

    margin-bottom: 4px;

    font-size: 12px;
    font-weight: 700;
    color: var(--text-soft);
}


.ai-input-field input,
.ai-input-field textarea {
    width: 100%;

    padding: 8px 10px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: var(--surface);
    color: var(--text-main);

    font-size: 13px;
    font-family: inherit;
}


/* --- rewrite bar ---------------------------------------- */

.ai-rewrite-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}


.ai-action-select {
    padding: 8px 10px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: var(--surface);
    color: var(--text-main);

    font-size: 13px;
    font-family: inherit;

    /* Keeps a long option label from pushing the row off a phone screen. */
    max-width: 100%;
}


/* --- review panel --------------------------------------- */

.ai-panel {
    padding: 14px;

    border: 1px solid var(--primary);
    border-radius: 12px;

    background: var(--primary-soft);

    display: flex;
    flex-direction: column;
    gap: 10px;
}


.ai-panel-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary-dark);
}


.ai-panel-text {
    width: 100%;

    padding: 10px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: var(--surface);
    color: var(--text-main);

    font-size: 13px;
    line-height: 1.6;
    font-family: inherit;

    resize: vertical;
}


.ai-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


/* --- skill chooser -------------------------------------- */

.ai-skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


.ai-skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 7px 11px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: var(--surface);

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}


.ai-skill-chip:has(input:checked) {
    border-color: var(--primary);
    background: #ffffff;
}


.ai-skill-chip input {
    /* Comfortably tappable on a phone. */
    width: 16px;
    height: 16px;

    margin: 0;

    accent-color: var(--primary);

    cursor: pointer;
}


.ai-bullet-list {
    margin: 0;
    padding-left: 18px;

    font-size: 13px;
    line-height: 1.7;
    color: var(--text-main);
}


/* Gaps are advisory only and never written into the CV. */
.ai-gap-list {
    color: var(--orange);
}


/* --- messages ------------------------------------------- */

.ai-error {
    padding: 10px 12px;

    border: 1px solid #fecaca;
    border-radius: 10px;

    background: #fef2f2;
    color: var(--danger);

    font-size: 13px;
    font-weight: 600;
}


.ai-privacy {
    margin: 0;

    font-size: 11px;
    line-height: 1.5;
    color: var(--text-soft);
}


.ai-unavailable {
    margin-bottom: 18px;
    padding: 12px 14px;

    border: 1px solid #fed7aa;
    border-radius: 12px;

    background: #fff7ed;
    color: #9a3412;

    font-size: 13px;
    font-weight: 700;
}


/* The API is down: hide the AI controls, leave every manual field alone. */
.ai-off {
    display: none;
}


/* --- tailor section ------------------------------------- */

.ai-tailor-section .section-number {
    background: var(--primary);
    color: #ffffff;
}


.ai-section-text {
    margin: 0 0 14px;

    font-size: 13px;
    line-height: 1.6;
    color: var(--text-soft);
}


/* --- preview: hide sections with nothing in them -------- */

/* Empty sections stay visible ON SCREEN: the placeholders ("Your work
   experience will appear here") are useful guidance while editing. They are
   removed only from the printed CV -- see the print block below. */


/* --- mobile --------------------------------------------- */

@media (max-width: 700px) {

    .ai-inputs-grid {
        grid-template-columns: 1fr;
    }

    .ai-btn,
    .ai-action-select {
        width: 100%;
        text-align: center;

        /* 44px is the usual minimum comfortable touch target; the desktop
           padding alone left these at 35px on a phone. */
        min-height: 44px;
    }


    .ai-skill-chip {
        min-height: 40px;
    }

    .ai-rewrite-bar,
    .ai-panel-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-ai-note {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

}


/* --- print ---------------------------------------------- */

@media print {

    /* ---------------------------------------------------------------
       PDF FIX.

       The earlier print rules hid the page with `visibility: hidden` and
       pulled #cvPreview out with `position: absolute`. Hidden elements still
       occupy space, so the document stayed ~5000px tall: printing produced a
       7-8 page PDF that was blank apart from the CV stranded on a late page.
       Verified against the live site on 2026-08-04 -- it fails there too.

       The fix is to actually remove the non-CV branches from the layout and
       put the CV back in normal flow, so it paginates like ordinary content.
       The ancestor chain is shallow and stable:
           body > main.builder-layout > aside.preview-panel > #cvPreview
       --------------------------------------------------------------- */

    body > *:not(.builder-layout) {
        display: none !important;
    }

    .builder-layout > *:not(.preview-panel) {
        display: none !important;
    }

    .preview-panel > *:not(#cvPreview) {
        display: none !important;
    }

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;

        background: #ffffff !important;
    }

    .builder-layout,
    .preview-panel {
        display: block !important;
        position: static !important;

        width: auto !important;
        max-width: none !important;

        margin: 0 !important;
        padding: 0 !important;

        gap: 0 !important;

        background: none !important;
    }

    /* Back into normal flow: this is what makes long CVs paginate instead of
       being clipped to a single absolutely-positioned box. */
    #cvPreview {
        position: static !important;
        visibility: visible !important;

        width: auto !important;
        min-height: 0 !important;

        margin: 0 !important;
        /* Page margin comes from @page below, so the paper padding goes. */
        padding: 0 !important;

        border: 0 !important;
        box-shadow: none !important;
    }


    /* Guidance placeholders belong on screen, never in the finished CV. */
    .cv-section.is-empty,
    .cv-empty-text {
        display: none !important;
    }


    /* Redundant next to the branch removal above, but harmless and explicit:
       no AI control may ever appear in a printed CV. */
    .ai-host,
    .ai-panel,
    .ai-inputs,
    .ai-rewrite-bar,
    .ai-tailor-section,
    .ai-unavailable,
    .hero-ai-note {
        display: none !important;
    }


    /* A job entry split across two pages is the main thing that made the old
       print output look broken. Keep each entry, and its heading, together. */
    .cv-entry {
        break-inside: avoid;
        page-break-inside: avoid;
    }


    .cv-section h2 {
        break-after: avoid;
        page-break-after: avoid;
    }


    /* Never strand one line of a paragraph on its own page. */
    .cv-section p,
    .cv-entry-description {
        orphans: 3;
        widows: 3;
    }


    @page {
        margin: 12mm;
    }

}


/* =========================================================
   PHASE 1: APPROVAL DIFF, TARGET JOB, ATS
   Appended 2026-08-04.
   ========================================================= */


/* --- approval panel: original vs suggestion ------------- */

.ai-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}


/* When the field was empty there is no "before" column to show. */
.ai-compare:has(.ai-compare-col:only-child) {
    grid-template-columns: 1fr;
}


.ai-compare-col {
    display: flex;
    flex-direction: column;
    gap: 6px;

    min-width: 0;
}


.ai-compare-text {
    padding: 10px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: #ffffff;

    font-size: 13px;
    line-height: 1.6;

    white-space: pre-wrap;
    overflow-wrap: anywhere;

    max-height: 220px;
    overflow-y: auto;
}


.ai-before {
    color: var(--text-soft);
}


/* Read-only until "Edit" is pressed, so a stray keystroke cannot change the
   suggestion without the user meaning to. */
.ai-panel-text[readonly] {
    background: #fbfcff;
    cursor: default;
}


.ai-alts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}


.ai-alts-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary-dark);
}


.ai-alt-btn {
    padding: 6px 12px;

    font-size: 12px;

    border-radius: 999px;
}


.ai-alt-btn.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}


.ai-note {
    margin: 0;

    font-size: 12px;
    line-height: 1.5;

    color: var(--text-soft);
}


.ai-questions {
    padding: 12px;

    border: 1px solid #fed7aa;
    border-radius: 10px;

    background: #fff7ed;
}


.ai-inline-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-soft);
}


/* --- job + ATS sections --------------------------------- */

.ai-job-section .section-number,
.ai-ats-section .section-number {
    background: var(--primary);
    color: #ffffff;

    font-size: 11px;
    letter-spacing: 0.5px;
}


.ai-results {
    margin-top: 14px;

    display: flex;
    flex-direction: column;
    gap: 14px;
}


.ai-sub-title {
    margin-top: 6px;

    font-size: 12px;
    font-weight: 800;

    color: var(--text-main);

    text-transform: uppercase;
    letter-spacing: 0.4px;
}


.ai-fact {
    font-size: 13px;
    line-height: 1.6;
}


.ai-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}


.ai-chip {
    padding: 5px 10px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: #ffffff;

    font-size: 12px;
    font-weight: 650;

    overflow-wrap: anywhere;
}


.chip-match {
    border-color: #a7f3d0;
    background: var(--green-soft);
    color: #065f46;
}


/* Missing keywords are informational. They are never added automatically, so
   they are styled as a warning, not as an action. */
.chip-missing {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}


.chip-req {
    border-color: #c7d2fe;
    background: var(--primary-soft);
    color: var(--primary-dark);
}


/* --- scores --------------------------------------------- */

.ai-score-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}


.ai-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 96px;
    height: 96px;

    border-radius: 50%;

    border: 6px solid var(--border);

    background: #ffffff;

    flex: 0 0 auto;
}


.ai-score.band-strong { border-color: #34d399; }
.ai-score.band-good   { border-color: #60a5fa; }
.ai-score.band-partial{ border-color: #fbbf24; }
.ai-score.band-weak   { border-color: #f87171; }


.ai-score-value {
    font-size: 30px;
    font-weight: 900;
    line-height: 1;

    color: var(--text-main);
}


.ai-score-label {
    margin-top: 4px;
    padding: 0 6px;

    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;

    text-align: center;
    color: var(--text-soft);
}


.ai-score-band {
    font-size: 15px;
    font-weight: 800;

    color: var(--text-main);
}


.ai-meters {
    display: flex;
    flex-direction: column;
    gap: 7px;
}


.ai-meter {
    display: grid;
    grid-template-columns: minmax(120px, 190px) 1fr 42px;
    align-items: center;
    gap: 10px;

    font-size: 12px;
}


.ai-meter-label {
    color: var(--text-soft);
    font-weight: 650;
}


.ai-meter-track {
    height: 8px;

    border-radius: 999px;

    background: var(--border);

    overflow: hidden;
}


.ai-meter-fill {
    display: block;
    height: 100%;

    border-radius: 999px;

    background: var(--primary);

    transition: width 0.3s ease;
}


.ai-meter-fill.good { background: #10b981; }
.ai-meter-fill.mid  { background: #f59e0b; }
.ai-meter-fill.low  { background: #ef4444; }


.ai-meter-value {
    text-align: right;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}


.ai-meter.is-unscored .ai-meter-value {
    font-size: 10px;
    font-weight: 650;
    color: var(--text-light);
}


/* --- issues --------------------------------------------- */

.ai-issue-list {
    margin: 0;
    padding-left: 0;

    list-style: none;

    display: flex;
    flex-direction: column;
    gap: 7px;
}


.ai-issue-list li {
    font-size: 13px;
    line-height: 1.55;
}


.ai-sev {
    display: inline-block;

    margin-right: 6px;
    padding: 2px 8px;

    border-radius: 999px;

    font-size: 10px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 0.4px;

    vertical-align: 1px;
}


.sev-high  .ai-sev { background: #fee2e2; color: #991b1b; }
.sev-medium .ai-sev { background: #fef3c7; color: #92400e; }
.sev-low   .ai-sev { background: #e2e8f0; color: #475569; }


/* The honesty note under any ATS number. Not decorative -- it must stay
   readable, so it is never smaller than the other body copy. */
.ai-disclaimer {
    padding-top: 8px;

    border-top: 1px dashed var(--border);

    font-size: 12px;
    font-style: italic;
}


.ai-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    font-size: 13px;
    font-weight: 650;

    color: var(--text-soft);

    cursor: pointer;
}


.ai-checkbox input {
    width: 16px;
    height: 16px;

    accent-color: var(--primary);

    cursor: pointer;
}


.ai-mode-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}


.ai-skill-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}


.ai-skill-group-title {
    font-size: 11px;
    font-weight: 800;

    color: var(--primary-dark);

    text-transform: uppercase;
    letter-spacing: 0.4px;
}


/* --- mobile --------------------------------------------- */

@media (max-width: 700px) {

    /* Two columns of text on a phone would be unreadable; stack them. */
    .ai-compare {
        grid-template-columns: 1fr;
    }

    .ai-meter {
        grid-template-columns: 1fr 58px;
        grid-template-areas:
            "label value"
            "track track";
        row-gap: 4px;
    }

    .ai-meter-label { grid-area: label; }
    .ai-meter-value { grid-area: value; }
    .ai-meter-track { grid-area: track; }

    .ai-score {
        width: 84px;
        height: 84px;
    }

    .ai-alt-btn {
        min-height: 40px;
    }

    .ai-checkbox {
        min-height: 44px;
    }

}


/* --- print ---------------------------------------------- */

@media print {

    /* These live inside .form-panel, which the print rules already remove.
       Listed anyway so no analysis panel can ever reach a printed CV. */
    .ai-job-section,
    .ai-ats-section,
    .ai-results,
    .ai-compare,
    .ai-questions {
        display: none !important;
    }

}


/* =========================================================
   INLINE AI SUGGESTION
   Appended 2026-08-04. The AI result now appears IN the field
   being worked on, with a compact bar directly beneath it.
   Replaces the large comparison panel, which rendered below
   the summary input grid / experience mode bar and was
   therefore off screen.
   ========================================================= */

.ai-inline {
    /* Sits immediately after the textarea, so it can never be pushed down by
       the other AI controls in .ai-host. */
    margin-top: 8px;

    display: flex;
    flex-direction: column;
    gap: 8px;
}


/* The field currently holds an unaccepted suggestion. Tinted so it is obvious
   at a glance that this text is not yet part of the CV. */
.ai-field-suggested {
    border-color: var(--primary) !important;
    background: #fbfcff !important;

    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.10);
}


.ai-inline-status {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 13px;
    font-weight: 700;

    color: var(--primary-dark);
}


.ai-inline-spinner {
    display: inline-block;

    width: 13px;
    height: 13px;

    border: 2px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;

    animation: ai-spin 0.7s linear infinite;

    flex: 0 0 auto;
}


.ai-inline-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}


.ai-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}


/* Compact on desktop: this bar appears inside a form, not as a dialog. */
.ai-inline-actions .ai-btn {
    padding: 7px 12px;
    font-size: 12.5px;
}


.ai-inline .ai-privacy {
    margin: 0;
}


.ai-inline .ai-questions {
    padding: 10px 12px;
}


/* --- mobile ---------------------------------------------- */

@media (max-width: 700px) {

    /* Full width, stacked, and still a comfortable touch target. Buttons must
       never overflow the card on a narrow screen. */
    .ai-inline-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ai-inline-actions .ai-btn {
        width: 100%;
        min-height: 44px;

        font-size: 14px;
        text-align: center;
    }

    .ai-inline-tabs .ai-alt-btn {
        flex: 1 1 auto;
        min-height: 40px;
    }

}


/* --- print ------------------------------------------------ */

@media print {

    /* Lives inside .form-panel, which print already removes. Listed anyway so
       an unaccepted suggestion can never reach a printed CV. */
    .ai-inline {
        display: none !important;
    }

}
