/* Explain: Styles for UI components, including buttons, form fields, and CV elements. */
/* ---------- Buttons ---------- */
.btn-gold,
.btn-navy,
.btn-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.btn-gold {
    background: var(--accent-color);
    color: #1a1503;
    box-shadow: 0 14px 28px -16px rgba(201, 162, 39, 0.95);
}

.btn-gold:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-navy {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: var(--shadow-card);
}

.btn-navy:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-line {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--border-color);
}

.btn-line:hover {
    background: var(--accent-soft);
    border-color: var(--accent-color);
}

.btn-sm {
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
}

.btn-gold:disabled,
.btn-navy:disabled,
.btn-line:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---------- Form fields ---------- */
.s-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.s-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.18);
}

.s-input::placeholder {
    color: #9aa6b5;
}

.s-input-auto {
    width: auto;
}

.s-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-color);
}

.hint {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---------- Surfaces ---------- */
.card-soft {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border-radius: 9999px;
    background: var(--accent-soft);
    color: #6b5310;
    font-size: 0.78rem;
    font-weight: 700;
}

/* ---------- Photo picker ---------- */
.photo-preview {
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px dashed var(--border-color);
    border-radius: 9999px;
    background-color: var(--accent-soft);
    background-position: center;
    background-size: cover;
    color: var(--accent-hover);
    font-size: 1.35rem;
}

.photo-preview.has-photo {
    border-style: solid;
    border-color: var(--accent-color);
}

.photo-preview.has-photo i {
    opacity: 0;
}

/* ---------- Navigation ---------- */
.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.6rem;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-color);
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
    background: var(--accent-soft);
    color: var(--primary-color);
}

.nav-link[aria-current="page"] {
    background: var(--accent-soft);
    color: var(--primary-color);
}

.nav-link--block {
    display: flex;
    width: 100%;
}

.step-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: start;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.step-link:hover {
    background: var(--accent-soft);
    color: var(--primary-color);
}

.step-link .step-num {
    display: grid;
    place-items: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 9999px;
    background: var(--accent-soft);
    color: #6b5310;
    font-size: 0.75rem;
    font-weight: 800;
}

.step-link.is-active {
    background: var(--primary-color);
    color: #ffffff;
}

.step-link.is-active .step-num {
    background: var(--accent-color);
    color: #1a1503;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1rem;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-chip:hover {
    border-color: var(--accent-color);
    color: var(--primary-color);
}

.filter-chip.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

/* ---------- Hero CV mock ---------- */
.cv-mock {
    position: relative;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--surface-color);
    box-shadow: 0 35px 60px -35px rgba(15, 37, 71, 0.55);
}

.cv-mock--back {
    position: absolute;
    inset: 0;
    z-index: -1;
    border: none;
    background: var(--primary-color);
    transform: rotate(-6deg) translate(-14px, 14px);
    opacity: 0.95;
}

.cv-mock-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cv-mock-avatar {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background: var(--primary-color);
    color: var(--accent-color);
    font-size: 1.05rem;
    font-weight: 800;
}

.cv-mock-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-color);
}

.cv-mock-role {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.cv-mock-rule {
    height: 3px;
    width: 4.5rem;
    margin: 0.9rem 0;
    border-radius: 9999px;
    background: var(--accent-color);
}

.cv-mock-line {
    display: block;
    height: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 9999px;
    background: #eceade;
}

.cv-mock-badge {
    position: absolute;
    inset-inline-end: -0.75rem;
    bottom: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.8rem;
    border-radius: 9999px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: var(--shadow-card);
}

/* ---------- Template thumbnails ---------- */
.mini-cv {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    height: 12.5rem;
    padding: 0.85rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface-color);
}

.mini-head {
    display: flex;
    align-items: flex-end;
    height: 2.6rem;
    padding: 0.4rem;
    border-radius: 8px;
    background: var(--primary-color);
}

.mini-name {
    display: block;
    width: 60%;
    height: 0.4rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.85);
}

.mini-lines {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.mini-line {
    display: block;
    height: 0.35rem;
    border-radius: 9999px;
    background: #e8e5da;
}

.mini-cv[data-template="executive"] {
    border-top: 4px solid var(--accent-color);
}

.mini-cv[data-template="executive"] .mini-head {
    background: #f2efe4;
    justify-content: center;
}

.mini-cv[data-template="executive"] .mini-name {
    width: 50%;
    background: var(--primary-color);
}

.mini-cv[data-template="modern"] .mini-head {
    border-inline-start: 6px solid var(--accent-color);
}

.mini-cv[data-template="royal"] {
    border: 2px solid var(--accent-color);
}

.mini-cv[data-template="royal"] .mini-name {
    background: var(--accent-color);
}

.mini-cv[data-template="minimal"] .mini-head {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
}

.mini-cv[data-template="minimal"] .mini-name {
    background: var(--primary-color);
}

.mini-cv[data-template="creative"] .mini-head {
    background: linear-gradient(135deg, #f6ecc9, var(--accent-color));
}

.mini-cv[data-template="creative"] .mini-name {
    background: var(--primary-color);
}

.mini-cv[data-template="ats"] {
    border-color: #d7d7d7;
    background: #ffffff;
}

.mini-cv[data-template="ats"] .mini-head {
    align-items: flex-end;
    height: 2rem;
    padding: 0;
    border-bottom: 1px solid #1a1a1a;
    border-radius: 0;
    background: transparent;
}

.mini-cv[data-template="ats"] .mini-name {
    width: 46%;
    height: 0.34rem;
    background: #1a1a1a;
}

.mini-cv[data-template="ats"] .mini-line {
    background: #dcdcdc;
}

.ats-flag {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    background: #eef4e8;
    color: #2f6b3d;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.7;
}

.ats-flag > i {
    flex-shrink: 0;
    font-size: 0.68rem;
}

/* ---------- Printable CV sheet ---------- */
.cv-wrap {
    max-width: 52rem;
    margin-inline: auto;
}

.cv-sheet {
    max-width: 52rem;
    margin-inline: auto;
    padding: 2rem 1.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #ffffff;
    color: #16202e;
    font-size: 0.9rem;
    line-height: 1.85;
    box-shadow: 0 30px 60px -40px rgba(15, 37, 71, 0.6);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.cv-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--accent-color);
}

.cv-name {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--primary-color);
}

.cv-role {
    margin: 0.15rem 0 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.cv-head-main {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.cv-head-main .cv-ident {
    min-width: 0;
}

.cv-photo {
    width: 5rem;
    height: 5rem;
    flex-shrink: 0;
    border: 3px solid var(--accent-color);
    border-radius: 9999px;
    background: #ffffff;
    object-fit: cover;
}

.cv-sheet[data-template="executive"] .cv-head-main {
    flex-direction: column;
    text-align: center;
}

.cv-sheet[data-template="royal"] .cv-photo {
    border-color: #ffffff;
}

.cv-contact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cv-contact li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    overflow-wrap: anywhere;
}

.cv-contact i {
    font-size: 0.75rem;
    color: var(--accent-color);
}

.cv-block {
    margin-bottom: 1.1rem;
}

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

.cv-block-title {
    margin: 0 0 0.55rem;
    padding-inline-start: 0.55rem;
    border-inline-start: 4px solid var(--accent-color);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.5;
    color: var(--primary-color);
}

.cv-text {
    margin: 0;
}

.cv-item {
    margin-bottom: 0.7rem;
}

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

.cv-item-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem 0.75rem;
}

.cv-item-title {
    font-weight: 700;
}

.cv-item-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.cv-item-date {
    align-self: flex-start;
    padding: 0.05rem 0.5rem;
    border-radius: 9999px;
    background: var(--accent-soft);
    color: #8a6d12;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.cv-item-desc {
    margin: 0.3rem 0 0;
    font-size: 0.85rem;
    color: #3b4757;
    white-space: pre-line;
}

.cv-item-link {
    max-width: 100%;
    direction: ltr;
    white-space: normal;
    overflow-wrap: anywhere;
}

.cv-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cv-tags li {
    padding: 0.15rem 0.6rem;
    border-radius: 9999px;
    background: #f1efe6;
    font-size: 0.78rem;
    color: #33404f;
}

.cv-langs {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.85rem;
}

.cv-lang {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cv-lang-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem 0.6rem;
}

.cv-lang-name {
    font-size: 0.85rem;
    font-weight: 700;
}

.cv-lang-bar {
    display: block;
    height: 0.32rem;
    overflow: hidden;
    border-radius: 9999px;
    background: #f1efe6;
}

.cv-lang-fill {
    display: block;
    height: 100%;
    border-radius: 9999px;
    background: var(--accent-color);
}

.cv-lang-level {
    padding: 0.05rem 0.45rem;
    border-radius: 9999px;
    background: var(--accent-soft);
    color: #8a6d12;
    font-size: 0.72rem;
    font-weight: 700;
}

/* Template variants */
.cv-sheet[data-template="classic"] .cv-head {
    padding: 1.25rem;
    border-bottom: 4px solid var(--accent-color);
    border-radius: 6px;
    background: var(--primary-color);
}

.cv-sheet[data-template="classic"] .cv-name {
    color: #ffffff;
}

.cv-sheet[data-template="classic"] .cv-role {
    color: var(--accent-color);
}

.cv-sheet[data-template="classic"] .cv-contact {
    color: #dbe4ef;
}

.cv-sheet[data-template="executive"] {
    border-top: 6px solid var(--primary-color);
}

.cv-sheet[data-template="executive"] .cv-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
}

.cv-sheet[data-template="executive"] .cv-contact {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1rem;
}

.cv-sheet[data-template="executive"] .cv-block-title {
    padding-inline-start: 0;
    padding-bottom: 0.25rem;
    border-inline-start: 0;
    border-bottom: 2px solid var(--accent-color);
}

.cv-sheet[data-template="modern"] .cv-head {
    padding-inline-start: 1rem;
    border-bottom: 0;
    border-inline-start: 6px solid var(--accent-color);
}

.cv-sheet[data-template="modern"] .cv-name {
    font-size: 1.8rem;
}

.cv-sheet[data-template="modern"] .cv-block-title {
    position: relative;
    padding-inline-start: 1rem;
    border-inline-start: 0;
}

.cv-sheet[data-template="modern"] .cv-block-title::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0.6rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: var(--accent-color);
}

.cv-sheet[data-template="royal"] {
    padding: 1.5rem;
    border: 2px solid var(--accent-color);
}

.cv-sheet[data-template="royal"] .cv-head {
    padding: 1.25rem;
    border-bottom: 3px solid var(--accent-color);
    background: var(--primary-color);
}

.cv-sheet[data-template="royal"] .cv-name {
    color: var(--accent-color);
}

.cv-sheet[data-template="royal"] .cv-role {
    color: #e7ecf3;
}

.cv-sheet[data-template="royal"] .cv-contact {
    color: #dfe6ef;
}

.cv-sheet[data-template="royal"] .cv-block-title {
    padding-inline-start: 0;
    padding-bottom: 0.2rem;
    border-inline-start: 0;
    border-bottom: 1px solid var(--accent-color);
}

.cv-sheet[data-template="minimal"] {
    border: 1px solid #e2e0d6;
    box-shadow: none;
}

.cv-sheet[data-template="minimal"] .cv-head {
    border-bottom: 1px solid #ddd9cc;
}

.cv-sheet[data-template="minimal"] .cv-name {
    color: #101418;
    font-weight: 700;
}

.cv-sheet[data-template="minimal"] .cv-block-title {
    padding-inline-start: 0;
    border-inline-start: 0;
    color: #101418;
}

.cv-sheet[data-template="minimal"] .cv-item-date {
    padding: 0;
    background: transparent;
    color: #6a7381;
}

.cv-sheet[data-template="creative"] .cv-head {
    padding: 1.25rem;
    border-bottom: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #fbf3d8, #f0dfa5);
}

.cv-sheet[data-template="creative"] .cv-block-title {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-inline-start: 0;
    border-radius: 9999px;
    background: var(--accent-soft);
}

/* ATS sheet — one plain column, standard headings, no ornament and no images */
.cv-sheet[data-template="ats"] {
    padding: 2rem 1.9rem;
    border: 1px solid #d8d8d8;
    border-radius: 0;
    background: #ffffff;
    color: #000000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.92rem;
    line-height: 1.7;
    box-shadow: none;
}

.cv-sheet[data-template="ats"] .cv-head {
    display: block;
    margin-bottom: 1rem;
    padding: 0 0 0.6rem;
    border-bottom: 1px solid #000000;
}

.cv-sheet[data-template="ats"] .cv-head-main {
    display: block;
}

.cv-sheet[data-template="ats"] .cv-photo {
    display: none;
}

.cv-sheet[data-template="ats"] .cv-name {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.4;
    color: #000000;
}

.cv-sheet[data-template="ats"] .cv-role {
    margin-top: 0.1rem;
    font-size: 0.95rem;
    color: #000000;
}

.cv-sheet[data-template="ats"] .cv-contact {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.85rem;
    color: #000000;
}

.cv-sheet[data-template="ats"] .cv-contact li {
    display: block;
    margin-bottom: 0.1rem;
}

.cv-sheet[data-template="ats"] .cv-contact i {
    display: none;
}

.cv-sheet[data-template="ats"] .cv-block {
    margin-bottom: 1rem;
}

.cv-sheet[data-template="ats"] .cv-block-title {
    margin: 0 0 0.45rem;
    padding: 0 0 0.2rem;
    border: 0;
    border-bottom: 1px solid #000000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.5;
    color: #000000;
}

.cv-sheet[data-template="ats"] .cv-item-title {
    font-weight: 700;
    color: #000000;
}

.cv-sheet[data-template="ats"] .cv-item-sub,
.cv-sheet[data-template="ats"] .cv-item-desc {
    font-size: 0.88rem;
    color: #000000;
}

.cv-sheet[data-template="ats"] .cv-item-date {
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #000000;
    font-weight: 700;
}

.cv-sheet[data-template="ats"] .cv-tags {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cv-sheet[data-template="ats"] .cv-tags li {
    display: list-item;
    margin-inline-start: 1.1rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #000000;
    list-style: disc;
}

.cv-sheet[data-template="ats"] .cv-lang-bar {
    display: none;
}

.cv-sheet[data-template="ats"] .cv-lang-level {
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #000000;
}

/* ---------- Language switch ---------- */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2.4rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    background: var(--surface-color);
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.lang-switch:hover {
    background: var(--accent-soft);
    border-color: var(--accent-color);
}

/* ---------- Print ---------- */
@media print {
    .no-print {
        display: none !important;
    }

    html,
    body {
        background: #ffffff !important;
    }

    .cv-wrap {
        max-width: 100% !important;
        padding: 0;
    }

    .cv-sheet {
        max-width: 100% !important;
        margin: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    @page {
        size: A4;
        margin: 12mm;
    }
}

/* ---------- Saved CV versions ---------- */
.version-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.version-item.is-active {
    background: var(--accent-soft);
    border-color: var(--accent-color);
}

.version-name {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 2.4rem;
    padding: 0.35rem 0.5rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: start;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.version-name:hover {
    background: var(--accent-soft);
    color: var(--primary-color);
}

.version-item.is-active .version-name {
    color: var(--primary-color);
}

.version-name i {
    flex-shrink: 0;
    color: var(--accent-hover);
    font-size: 0.8rem;
}

.version-delete {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 2.1rem;
    height: 2.1rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #9b2c2c;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.version-delete:hover {
    background: #fdf2f2;
}

.version-confirm {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.35rem 0.5rem;
}

.version-confirm-text {
    flex: 1 1 8rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #9b2c2c;
}

.version-mini {
    padding: 0.3rem 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-color);
    color: var(--primary-color);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.version-mini:hover {
    background: var(--accent-soft);
    border-color: var(--accent-color);
}

.version-mini--danger {
    border-color: #e2bcbc;
    color: #9b2c2c;
}

.version-mini--danger:hover {
    background: #fdf2f2;
    border-color: #d89c9c;
}

/* ---------- Step guide links ---------- */
.guide-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.75rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    background: var(--accent-soft);
    color: #6b5310;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.guide-link:hover {
    background: var(--surface-color);
    border-color: var(--accent-color);
    color: var(--primary-color);
}

.guide-link i {
    color: var(--accent-hover);
}

/* ---------- CV guide page ---------- */
.guide-toc-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.6rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    background: var(--surface-color);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.5;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.guide-toc-link:hover {
    background: var(--accent-soft);
    border-color: var(--accent-color);
}

.guide-num {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    border-radius: 9999px;
    background: var(--primary-color);
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 800;
}

.example-box {
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--background-color);
    font-size: 0.85rem;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.example-box.is-good {
    border-color: #bcd9bd;
    background: #f4faf4;
}

.example-box.is-weak {
    border-color: #e2bcbc;
    background: #fdf2f2;
}

.example-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.example-box.is-good .example-label {
    color: #2f6b3d;
}

.example-box.is-weak .example-label {
    color: #9b2c2c;
}

/* ---------- CV score ---------- */
.score-ring {
    --score-color: var(--accent-color);
    position: relative;
    display: grid;
    place-items: center;
    width: 5.25rem;
    height: 5.25rem;
    flex-shrink: 0;
    border-radius: 9999px;
    background: conic-gradient(var(--score-color) 0deg, var(--accent-soft) 0deg);
}

.score-ring::after {
    content: "";
    position: absolute;
    inset: 0.42rem;
    border-radius: 9999px;
    background: var(--surface-color);
}

.score-ring[data-level="low"] {
    --score-color: #c2703a;
}

.score-ring[data-level="high"] {
    --score-color: #3f7a4a;
}

.score-value {
    position: relative;
    z-index: 1;
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
    color: var(--primary-color);
}

.score-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface-color);
}

.score-item-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    overflow-wrap: anywhere;
}

.score-num {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--accent-hover);
}

.score-bar {
    display: block;
    height: 0.34rem;
    overflow: hidden;
    border-radius: 9999px;
    background: var(--accent-soft);
}

.score-fill {
    display: block;
    height: 100%;
    border-radius: 9999px;
    background: var(--accent-color);
    transition: width 0.4s ease;
}

.score-fill[data-level="low"] {
    background: #c2703a;
}

.score-fill[data-level="high"] {
    background: #3f7a4a;
}

.score-note {
    font-size: 0.76rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.score-empty {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-muted);
}

.score-item-line {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.84rem;
    line-height: 1.75;
    color: var(--text-color);
}

.score-item-line > i {
    flex-shrink: 0;
    margin-top: 0.42rem;
    font-size: 0.68rem;
    color: var(--accent-hover);
}

/* ---------- Tips and FAQ accordion ---------- */
.faq-item {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-color);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item:hover {
    border-color: var(--accent-color);
}

.faq-item > summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    list-style: none;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.65;
    color: var(--primary-color);
    cursor: pointer;
}

.faq-item > summary::-webkit-details-marker {
    display: none;
}

.faq-item[open] > summary {
    background: var(--accent-soft);
}

.faq-icon {
    flex-shrink: 0;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--accent-hover);
    transition: transform 0.25s ease;
}

.faq-item[open] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0.85rem 1rem 1rem;
    font-size: 0.88rem;
    line-height: 1.95;
    color: var(--text-color);
}

.faq-answer p {
    margin: 0;
}

/* ---------- Ready-made phrasing examples ---------- */
.examples-panel {
    margin-top: 0.75rem;
    padding: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--background-color);
}

.examples-hint {
    margin: 0 0 0.7rem;
    font-size: 0.78rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.examples-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
    .examples-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.example-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--surface-color);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.example-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-card);
}

.example-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.example-title {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1.6;
    color: var(--primary-color);
    overflow-wrap: anywhere;
}

.example-text {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.9;
    color: var(--text-color);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.example-card .btn-navy {
    align-self: flex-start;
    margin-top: auto;
}

.examples-note {
    margin: 0.7rem 0 0;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.7;
    color: var(--accent-hover);
}

/* ---------- Pre-export CV check ---------- */
.check-card {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--surface-color);
    box-shadow: var(--shadow-card);
}

.check-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.check-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.5;
    color: var(--primary-color);
}

.check-status {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    line-height: 1.75;
    color: var(--text-muted);
}

.check-meter {
    display: inline-flex;
    flex-shrink: 0;
    align-items: baseline;
    gap: 0.1rem;
    padding: 0.35rem 0.8rem;
    border-radius: 9999px;
    background: #fdf2f2;
    color: #9b2c2c;
}

.check-meter[data-level="mid"] {
    background: #fdf2e5;
    color: #8a5220;
}

.check-meter[data-level="high"] {
    background: #f3faf4;
    color: #2f6b3d;
}

.check-value {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
}

.check-sign {
    font-size: 0.8rem;
    font-weight: 800;
}

.check-bar {
    display: block;
    height: 0.45rem;
    margin-top: 0.7rem;
    overflow: hidden;
    border-radius: 9999px;
    background: var(--accent-soft);
}

.check-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 9999px;
    background: #c2703a;
    transition: width 0.4s ease, background 0.4s ease;
}

.check-fill[data-level="mid"] {
    background: var(--accent-color);
}

.check-fill[data-level="high"] {
    background: #3f7a4a;
}

.check-list {
    display: grid;
    gap: 0.5rem;
    margin: 0.85rem 0 0;
    padding: 0;
    list-style: none;
}

.check-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.35rem 0.6rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--background-color);
}

.check-item > i {
    flex-shrink: 0;
    margin-top: 0.42rem;
    font-size: 0.75rem;
    color: var(--accent-hover);
}

.check-item[data-level="high"] > i {
    color: #9b2c2c;
}

.check-text {
    flex: 1 1 12rem;
    min-width: 0;
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.85;
    color: var(--text-color);
    overflow-wrap: anywhere;
}

.check-link {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    align-self: center;
    min-height: 2.1rem;
    margin-inline-start: auto;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    background: var(--surface-color);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.check-link:hover {
    background: var(--accent-soft);
    border-color: var(--accent-color);
}

.check-ok {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid #bcd9bd;
    border-radius: 12px;
    background: #f4faf4;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.85;
    color: #2f6b3d;
}

.check-ok > i {
    flex-shrink: 0;
}

/* ---------- Phrase library ---------- */
.phrases-panel {
    margin-top: 0.75rem;
    padding: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--background-color);
}

.phrases-hint {
    margin: 0 0 0.6rem;
    font-size: 0.78rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.phrases-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.phrases-label {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

.phrases-target {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.6rem;
}

.phrases-target .phrases-hint {
    flex: 1 1 12rem;
    min-width: 0;
    margin-bottom: 0;
}

.phrases-target select {
    max-width: 100%;
    min-height: 2.4rem;
    font-size: 0.82rem;
}

.phrases-tips {
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface-color);
}

.phrases-tips-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--accent-hover);
}

.phrases-tips ul {
    display: grid;
    gap: 0.25rem;
    margin: 0.4rem 0 0;
    padding: 0;
    list-style: none;
}

.phrases-tips li {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.78rem;
    line-height: 1.8;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.phrases-tips li::before {
    content: "•";
    flex-shrink: 0;
    color: var(--accent-color);
    font-weight: 800;
}

.phrases-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.7rem;
}

.phrase-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface-color);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.phrase-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-card);
}

.phrase-text {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.9;
    color: var(--text-color);
    overflow-wrap: anywhere;
}

.phrase-card .btn-line {
    align-self: flex-start;
    margin-top: auto;
}

.phrases-note {
    margin: 0.65rem 0 0;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.7;
    color: var(--accent-hover);
    overflow-wrap: anywhere;
}

/* ---------- Job application tracker ---------- */
.app-summary {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .app-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .app-summary {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.app-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--background-color);
}

.app-stat-icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.25rem;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent-hover);
    font-size: 0.8rem;
}

.app-stat-value {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--primary-color);
}

.app-stat-label {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text-muted);
}

.app-stat--review .app-stat-icon {
    background: #fdf2e5;
    color: #8a5220;
}

.app-stat--interview .app-stat-icon {
    background: #eef4fb;
    color: #1f4d7a;
}

.app-stat--accepted .app-stat-icon {
    background: #f3faf4;
    color: #2f6b3d;
}

.app-stat--rejected .app-stat-icon {
    background: #fdf2f2;
    color: #9b2c2c;
}

.app-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--surface-color);
    box-shadow: var(--shadow-card);
    overflow-wrap: anywhere;
}

.app-card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.app-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.6;
    color: var(--primary-color);
}

.app-card-company {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.15rem 0 0;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.6;
    color: var(--text-muted);
}

.app-card-company i {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--accent-hover);
}

.app-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px dashed var(--border-color);
}

.app-date {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.6;
    color: var(--text-muted);
}

.app-date i {
    color: var(--accent-hover);
}

.app-tools {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-inline-start: auto;
}

.app-status-select {
    max-width: 100%;
    min-height: 2.4rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--surface-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.app-status-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.18);
}

.app-delete {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--surface-color);
    color: #9b2c2c;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.app-delete:hover {
    background: #fdf2f2;
    border-color: #e2bcbc;
}

.app-edit {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--surface-color);
    color: var(--primary-color);
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.app-edit:hover {
    background: var(--accent-soft);
    border-color: var(--accent-color);
}

.app-confirm {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.6rem;
    border: 1px solid #e2bcbc;
    border-radius: 12px;
    background: #fdf2f2;
}

.app-confirm-text {
    flex: 1 1 8rem;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.6;
    color: #9b2c2c;
}

.app-action {
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-color);
    color: var(--primary-color);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.app-action:hover {
    background: var(--accent-soft);
    border-color: var(--accent-color);
}

.app-action--danger {
    border-color: #e2bcbc;
    color: #9b2c2c;
}

.app-action--danger:hover {
    background: #ffffff;
    border-color: #d89c9c;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0.25rem 0.7rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.6;
}

.status-pill--review {
    background: #fdf2e5;
    color: #8a5220;
}

.status-pill--interview {
    background: #eef4fb;
    color: #1f4d7a;
}

.status-pill--accepted {
    background: #f3faf4;
    color: #2f6b3d;
}

.status-pill--rejected {
    background: #fdf2f2;
    color: #9b2c2c;
}

.app-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 2rem 1rem;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--surface-color);
    text-align: center;
}

.app-empty > i {
    font-size: 1.4rem;
    color: var(--accent-color);
}

.app-empty-title {
    margin: 0.3rem 0 0;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.7;
    color: var(--primary-color);
    overflow-wrap: anywhere;
}

.app-empty-hint {
    max-width: 30rem;
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.9;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.app-empty-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.app-feedback {
    color: #2f6b3d;
    overflow-wrap: anywhere;
}

.app-feedback.is-error {
    color: #9b2c2c;
}

/* ---------- Editing an application in place ---------- */
.app-card--editing {
    border-color: var(--accent-color);
}

.app-edit-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.7;
    color: var(--primary-color);
}

.app-edit-title i {
    color: var(--accent-hover);
}

.app-edit-grid {
    display: grid;
    gap: 0.6rem;
}

@media (min-width: 640px) {
    .app-edit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.app-field {
    display: block;
    min-width: 0;
}

.app-field .s-input {
    min-width: 0;
}

.app-edit-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ---------- Header account menu ---------- */
.account-hide {
    display: none !important;
}

/* ---------- Sign-in code field ---------- */
.code-input {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.45em;
    direction: ltr;
}

.code-input::placeholder {
    letter-spacing: 0.3em;
}

/* ---------- Job match keywords and gaps ---------- */
.job-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.job-keyword {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    background: var(--background-color);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.job-keyword > i {
    flex-shrink: 0;
    font-size: 0.62rem;
}

.job-keyword.is-found {
    border-color: var(--accent-color);
    background: var(--accent-soft);
    color: #6b5310;
}

.job-gap {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--background-color);
}

.job-gap-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.4rem;
}

.job-gap-title {
    flex: 1 1 10rem;
    min-width: 0;
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.75;
    color: var(--primary-color);
    overflow-wrap: anywhere;
}

.job-kind {
    flex-shrink: 0;
    padding: 0.1rem 0.5rem;
    border-radius: 9999px;
    background: var(--accent-soft);
    color: #6b5310;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.7;
    white-space: nowrap;
}

.job-gap-label {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

.job-gap-suggestion {
    margin: 0;
    padding: 0.5rem 0.65rem;
    border-inline-start: 3px solid var(--accent-color);
    border-radius: 8px;
    background: var(--surface-color);
    font-size: 0.82rem;
    line-height: 1.9;
    color: var(--text-color);
    overflow-wrap: anywhere;
}

.job-gap-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

/* ---------- Certificate and experience gap plan ---------- */
.gap-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--background-color);
    overflow-wrap: anywhere;
}

.gap-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.4rem;
}

.gap-badge {
    flex-shrink: 0;
    padding: 0.1rem 0.55rem;
    border-radius: 9999px;
    background: var(--accent-soft);
    color: #6b5310;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.7;
    white-space: nowrap;
}

.gap-badge--experience {
    background: #eef4fb;
    color: #1f4d7a;
}

.gap-card-title {
    flex: 1 1 12rem;
    min-width: 0;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1.75;
    color: var(--primary-color);
}

.gap-card-tip {
    margin: 0;
    padding: 0.5rem 0.65rem;
    border-inline-start: 3px solid var(--accent-color);
    border-radius: 8px;
    background: var(--surface-color);
    font-size: 0.82rem;
    line-height: 1.9;
    color: var(--text-color);
}

.gap-card-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.gap-plan-empty {
    padding: 0.6rem 0.75rem;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    background: var(--background-color);
    font-size: 0.8rem;
    line-height: 1.85;
    color: var(--text-muted);
}

.gap-dir-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface-color);
}

.gap-dir-name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.7;
    color: var(--primary-color);
}

.gap-dir-name > i {
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--accent-hover);
}

.gap-dir-desc {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.8;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.gap-dir-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    align-self: flex-start;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.6;
    color: var(--accent-hover);
    direction: ltr;
    overflow-wrap: anywhere;
}

.gap-dir-link:hover {
    text-decoration: underline;
}

/* ---------- Imported documents ---------- */
.doc-list {
    display: grid;
    gap: 0.5rem;
    padding: 0;
    list-style: none;
}

.doc-list[hidden] {
    display: none;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--background-color);
}

.doc-thumb {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 2.4rem;
    height: 2.4rem;
    overflow: hidden;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent-hover);
    font-size: 0.9rem;
}

.doc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doc-body {
    flex: 1 1 auto;
    min-width: 0;
}

.doc-name {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.6;
    color: var(--primary-color);
    overflow-wrap: anywhere;
}

.doc-meta {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.6;
    color: var(--text-muted);
}

.doc-remove {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 2.1rem;
    height: 2.1rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #9b2c2c;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.doc-remove:hover {
    background: #fdf2f2;
}

/* ---------- Voice dictation ---------- */
.voice-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.35rem;
}

.voice-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.2rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    background: var(--surface-color);
    color: var(--primary-color);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.voice-btn > i {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--accent-hover);
}

.voice-btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent-color);
}

.voice-btn:disabled {
    opacity: 0.55;
    cursor: progress;
}

.voice-btn.is-recording {
    border-color: #d89c9c;
    background: #fdf2f2;
    color: #9b2c2c;
}

.voice-btn.is-recording > i {
    color: #9b2c2c;
    animation: voice-pulse 1.1s ease-in-out infinite;
}

@keyframes voice-pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.45;
        transform: scale(0.82);
    }
}

.voice-cancel {
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.voice-cancel[hidden] {
    display: none;
}

.voice-cancel:hover {
    background: var(--accent-soft);
    color: var(--primary-color);
}

.voice-status {
    flex: 1 1 12rem;
    min-width: 0;
    margin: 0;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.7;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.voice-status[hidden] {
    display: none;
}

.voice-status.is-ok {
    color: #2f6b3d;
}

.voice-status.is-error {
    color: #9b2c2c;
}

@media print {
    .voice-tools {
        display: none !important;
    }
}