/* Site95 Resume Builder — teal theme, self-hosted */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
.hidden { display: none !important; }

.container {
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.page-main { padding: 1.5rem 0 3rem; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Header (shared pattern) */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    color: #0f172a;
    font-size: 1.05rem;
}
.logo-icon { width: 1.5rem; height: 1.5rem; color: #0f766e; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 0.55rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.82rem; }
.btn-teal { background: #0f766e; color: #fff; }
.btn-teal:hover { background: #0d9488; }
.btn-neutral { background: #e2e8f0; color: #334155; }
.btn-neutral:hover { background: #cbd5e1; }

.tool-page-title {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.4rem;
}
.tool-page-desc { color: #64748b; margin-bottom: 0.75rem; font-size: 1.05rem; }
.seo-intro {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    color: #134e4a;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.rb-hero { margin-bottom: 0.5rem; }

/* Toolbar */
.rb-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    position: sticky;
    top: 3.5rem;
    z-index: 40;
}
.rb-toolbar-left, .rb-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.rb-field-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}
.rb-save-status {
    font-size: 0.78rem;
    color: #64748b;
    padding: 0.2rem 0.5rem;
    background: #f1f5f9;
    border-radius: 999px;
}
.rb-save-status.is-saved { color: #0f766e; background: #ccfbf1; }
.rb-save-status.is-error { color: #b91c1c; background: #fee2e2; }

.rb-restore-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
    border-radius: 0.75rem;
    padding: 0.65rem 0.9rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}
.rb-restore-banner i { color: #0f766e; }
.rb-restore-banner.hidden { display: none !important; }

.rb-save-help {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    margin: 0.5rem 0 1.25rem;
    font-size: 0.88rem;
    color: #134e4a;
}
.rb-save-help p { margin: 0 0 0.45rem; }
.rb-save-help p:last-child { margin-bottom: 0; }
.rb-save-help i { color: #0f766e; margin-right: 0.25rem; }

.rb-optional {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: lowercase;
    letter-spacing: 0;
}
.rb-optional-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f766e;
    margin: 1rem 0 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.rb-card-optional {
    border-style: dashed;
    border-color: #99f6e4;
    background: #f8fffd;
}
.rb-hint {
    font-size: 0.82rem;
    color: #64748b;
    margin: -0.35rem 0 0.65rem;
    font-weight: 400;
}
.rb-empty-hint {
    color: #94a3b8;
    font-size: 0.88rem;
    margin: 0;
}
.resume-sheet .rs-inline-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    font-size: 0.85rem;
}
.resume-sheet .rs-inline-list li { color: #1e293b; }

/* Layout */
.rb-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 960px) {
    .rb-layout { grid-template-columns: 1fr; }
    .rb-preview-wrap { order: -1; }
    .rb-toolbar { top: 3.25rem; }
}

/* Editor cards */
.rb-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    padding: 1rem 1.1rem;
    margin-bottom: 0.85rem;
}
.rb-card h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.rb-card h2 i { color: #0f766e; }
.rb-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.rb-card-head h2 { margin-bottom: 0; }

.rb-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}
@media (max-width: 560px) {
    .rb-grid-2 { grid-template-columns: 1fr; }
}

.rb-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}
.rb-input {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 400;
    color: #0f172a;
    background: #fff;
    font-family: inherit;
}
.rb-input:focus {
    outline: 2px solid #5eead4;
    outline-offset: 1px;
    border-color: #14b8a6;
}
.rb-textarea { resize: vertical; min-height: 5rem; line-height: 1.5; }

.rb-entry {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    padding: 0.75rem;
    margin-bottom: 0.65rem;
    background: #f8fafc;
}
.rb-entry-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.rb-entry-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
}
.rb-remove {
    color: #dc2626;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.45rem;
    border-radius: 0.35rem;
}
.rb-remove:hover { background: #fee2e2; }
.rb-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    margin-top: 0.35rem;
}

.privacy-note-inline {
    font-size: 0.85rem;
    color: #64748b;
    text-align: center;
    margin: 0.75rem 0 1.5rem;
}
.privacy-note-inline i { color: #0f766e; margin-right: 0.35rem; }

/* Preview pane */
.rb-preview-wrap {
    position: sticky;
    top: 7.5rem;
    background: #e2e8f0;
    border-radius: 0.9rem;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
}
#rb-preview-scale {
    overflow: auto;
    max-height: calc(100vh - 10rem);
    border-radius: 0.35rem;
}

/* Resume sheet — A4-ish */
.resume-sheet {
    background: #fff;
    color: #0f172a;
    width: 100%;
    max-width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 14mm 14mm;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
    font-size: 10.5pt;
    line-height: 1.4;
    font-family: 'Inter', Georgia, 'Times New Roman', serif;
}

.resume-sheet .rs-name {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #0f172a;
}
.resume-sheet .rs-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f766e;
    margin-top: 0.2rem;
}
.resume-sheet .rs-contact {
    margin-top: 0.45rem;
    font-size: 0.78rem;
    color: #475569;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.65rem;
}
.resume-sheet .rs-section {
    margin-top: 0.85rem;
}
.resume-sheet .rs-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0f766e;
    border-bottom: 1.5px solid #99f6e4;
    padding-bottom: 0.2rem;
    margin-bottom: 0.45rem;
}
.resume-sheet .rs-summary {
    font-size: 0.88rem;
    color: #334155;
}
.resume-sheet .rs-job {
    margin-bottom: 0.55rem;
}
.resume-sheet .rs-job-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem 0.75rem;
}
.resume-sheet .rs-role {
    font-weight: 700;
    font-size: 0.9rem;
}
.resume-sheet .rs-company {
    font-weight: 600;
    color: #334155;
    font-size: 0.85rem;
}
.resume-sheet .rs-dates {
    font-size: 0.78rem;
    color: #64748b;
    white-space: nowrap;
}
.resume-sheet .rs-bullets {
    margin: 0.25rem 0 0 1.1rem;
    list-style: disc;
}
.resume-sheet .rs-bullets li {
    margin-bottom: 0.15rem;
    font-size: 0.85rem;
    color: #1e293b;
}
.resume-sheet .rs-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.resume-sheet .rs-skill {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    color: #115e59;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}
.resume-sheet .rs-empty {
    color: #94a3b8;
    font-style: italic;
    font-size: 0.9rem;
}

/* Standard = default clean look (also alias .tpl-classic for old drafts) */
.resume-sheet.tpl-standard,
.resume-sheet.tpl-classic {
    font-family: 'Inter', Georgia, 'Times New Roman', serif;
}

/* Modern template accents */
.resume-sheet.tpl-modern {
    font-family: 'Inter', system-ui, sans-serif;
    border-top: 6px solid #0f766e;
}
.resume-sheet.tpl-modern .rs-name { color: #134e4a; }
.resume-sheet.tpl-modern .rs-section-title {
    background: #f0fdfa;
    border-bottom: none;
    padding: 0.25rem 0.45rem;
    border-radius: 0.25rem;
}

/* How-to steps */
.rb-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin: 0 0 1.25rem;
    padding: 0;
}
@media (max-width: 900px) {
    .rb-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
    .rb-steps { grid-template-columns: 1fr; }
}
.rb-step {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.75rem 0.85rem;
}
.rb-step-num {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background: #0f766e;
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rb-step strong {
    display: block;
    font-size: 0.9rem;
    color: #0f172a;
    margin-bottom: 0.15rem;
}
.rb-step p {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}
.rb-step em { font-style: normal; font-weight: 700; color: #0f766e; }

/* Template picker cards */
.rb-template-picker {
    border: 1px solid #99f6e4;
    background: #f0fdfa;
    border-radius: 0.9rem;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
}
.rb-template-picker legend {
    font-weight: 800;
    font-size: 1rem;
    color: #0f172a;
    padding: 0 0.25rem;
}
.rb-template-help {
    margin: 0.25rem 0 0.75rem;
    font-size: 0.9rem;
    color: #134e4a;
}
.rb-template-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
@media (max-width: 640px) {
    .rb-template-cards { grid-template-columns: 1fr; }
}
.rb-template-card {
    position: relative;
    display: block;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.9rem 1rem;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.rb-template-card:hover { border-color: #5eead4; }
.rb-template-card.is-selected {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}
.rb-template-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.rb-template-card strong {
    display: block;
    font-size: 1.05rem;
    color: #0f172a;
    margin-bottom: 0.35rem;
}
.rb-template-desc {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.45;
    font-weight: 400;
}
.rb-template-badge {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #0f766e;
    color: #fff;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
}
.rb-toolbar-hint {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 600;
}
.rb-toolbar-hint i { color: #0f766e; margin-right: 0.25rem; }
.rb-editor-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f766e;
    margin: 0 0 0.65rem;
}
.rb-preview-label {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #334155;
    margin-bottom: 0.5rem;
    text-align: left;
}
.rb-preview-sub {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    text-transform: none;
    letter-spacing: 0;
}

/* Content sections below builder */
.tool-section { margin-top: 2.5rem; }
.tool-section h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #0f172a;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
@media (max-width: 720px) {
    .grid-3 { grid-template-columns: 1fr; }
}
.info-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 1.15rem;
}
.step-num {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: #0f766e;
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}
.info-card h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.info-card p { color: #64748b; font-size: 0.9rem; }

.faq-list { display: flex; flex-direction: column; gap: 0.5rem; }
.faq-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    padding: 0.75rem 1rem;
}
.faq-item summary {
    font-weight: 600;
    cursor: pointer;
    color: #0f172a;
}
.faq-item p {
    margin-top: 0.5rem;
    color: #475569;
    font-size: 0.95rem;
}

.seo-content {
    margin-top: 2rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    padding: 1.25rem 1.35rem;
}
.seo-content h2 { font-size: 1.25rem; margin-bottom: 0.65rem; }
.seo-content h3 { font-size: 1.05rem; margin: 1rem 0 0.4rem; }
.seo-content p { color: #475569; margin-bottom: 0.65rem; }
.seo-content a { color: #0f766e; text-decoration: underline; }
.seo-content ul {
    list-style: disc;
    margin: 0.5rem 0 0 1.25rem;
    color: #475569;
}
.seo-content li { margin-bottom: 0.3rem; }

.breadcrumbs {
    padding: 0.75rem 1.25rem 0;
    font-size: 0.85rem;
    color: #64748b;
}
.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
}
.breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin-left: 0.35rem;
    color: #cbd5e1;
}
.breadcrumbs a { color: #0f766e; }

.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 2rem 0 1.5rem;
    margin-top: 2rem;
}
.footer-bottom {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #1e293b;
    text-align: center;
    font-size: 0.85rem;
}
.footer-bottom a { color: #5eead4; }

.ads-slot { min-height: 0; margin: 0.5rem auto; }

/* Print / PDF capture */
@media print {
    body * { visibility: hidden; }
    .site-header, .site-footer, .rb-toolbar, .rb-editor,
    .tool-section, .seo-content, .breadcrumbs, .ads-slot, .rb-hero, .rb-preview-label {
        display: none !important;
    }
    .rb-preview-wrap, .rb-preview-wrap *, #resume-preview, #resume-preview * {
        visibility: visible;
    }
    .rb-preview-wrap {
        position: static;
        background: none;
        border: none;
        padding: 0;
        box-shadow: none;
        max-height: none;
    }
    #rb-preview-scale { max-height: none; overflow: visible; }
    .resume-sheet {
        box-shadow: none;
        max-width: none;
        width: 100%;
        min-height: auto;
        padding: 0;
    }
    .page-main { padding: 0; }
}

/* Mobile polish — resume builder */
@media (max-width: 640px) {
    .page-main { padding: 0.85rem 0 2rem; }
    .container { padding: 0 0.85rem; }
    .rb-toolbar {
        position: static; /* sticky bar is cramped on phones */
        flex-direction: column;
        align-items: stretch;
        gap: 0.55rem;
        padding: 0.65rem 0.75rem;
    }
    .rb-toolbar-left,
    .rb-toolbar-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .rb-toolbar-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
    }
    .rb-toolbar-actions .btn {
        width: 100%;
        min-height: 2.6rem;
        justify-content: center;
        font-size: 0.8rem;
        padding: 0.45rem 0.5rem;
    }
    .rb-toolbar-actions #rb-download {
        grid-column: 1 / -1;
    }
    .rb-input,
    .rb-textarea,
    select.rb-input {
        font-size: 16px; /* prevent iOS zoom */
    }
    .resume-sheet {
        min-height: 0;
        padding: 10mm 8mm;
        font-size: 9.5pt;
    }
    .rb-preview-wrap {
        position: static;
        padding: 0.55rem;
    }
    #rb-preview-scale {
        max-height: none;
    }
    .rb-template-picker { padding: 0.85rem; }
    .rb-steps { margin-bottom: 0.9rem; }
    .rb-card { padding: 0.85rem 0.9rem; }
    .rb-editor-label { font-size: 0.9rem; }
    .tool-page-title { font-size: 1.4rem; }
    .rb-toolbar-hint { display: none; } /* save space */
}
