/* Convertino - stiluri */

/* Fonturi locale (Inter variabil, Poppins 600 și 700), cu subsetul latin-ext doar pentru ă â î ș ț. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0102-0103, U+015E-015F, U+0162-0163, U+0218-021B; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0102-0103, U+015E-015F, U+0162-0163, U+0218-021B; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0102-0103, U+015E-015F, U+0162-0163, U+0218-021B; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
    /* Tema grafit și chihlimbar */
    --dark: #111827;
    --dark-2: #1F2937;
    --brand: #F59E0B;
    --brand-hover: #D97706;
    --on-brand: #111827;
    --accent: #FBBF24;
    --link: #B45309;
    --soft-2: #FEF3C7;
    --soft: #FFFBEB;
    --bg: #FAFAF9;
    --surface: #FFFFFF;
    --text: #111827;
    --muted: #374151;
    --muted-2: #4B5563;
    --border: #E7E5E4;
    --border-2: #D6D3D1;
    --on-dark: #E5E7EB;
    --success: #15803D;
    --success-soft: #E7F6EC;
    --error: #B91C1C;
    --error-soft: #FDECEC;
    --info-soft: #F5F5F4;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-head: "Poppins", "Inter", system-ui, sans-serif;
    --maxw: 1200px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--link); }
a:hover { color: var(--dark-2); }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 0.5rem; letter-spacing: -0.02em; }
h1 { font-size: 2.2rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1rem; }

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 16px;
}

/* Logo */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #FFFFFF;
    border-radius: 6px;
}
.logo:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.logo-img { display: block; height: 32px; width: auto; max-width: 100%; }
@media (max-width: 600px) {
    .logo-img { height: 26px; }
}

/* Antet fix: rămâne sus la derulare. Ancorele se opresc sub el (--header-h vine din site.js). */
html { scroll-padding-top: calc(var(--header-h, 72px) + 12px); }
.site-header {
    background: var(--dark);
    color: #FFFFFF;
    position: sticky;
    top: 0;
    z-index: 50;
    transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(17, 24, 39, 0.25); }

/* Buton înapoi sus */
.to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 40;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: var(--on-brand);
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.25);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s, background 0.2s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--brand-hover); }
.to-top:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
.site-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
    padding-top: 14px;
    padding-bottom: 14px;
}
.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav a {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 500;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.12); }

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

/* Căutare și meniu burger în antet. Pe desktop lupa stă imediat după ultimul link. */
.site-nav { margin-left: auto; }
.site-nav ul { align-items: center; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: -18px; }
.search-btn, .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    cursor: pointer;
}
.search-btn:hover, .search-btn[aria-expanded="true"],
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--brand); color: var(--on-brand); }
.search-btn:focus-visible, .menu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.menu-btn { display: none; }
.menu-btn .i-close { display: none; }
.site-header.nav-open .menu-btn .i-open { display: none; }
.site-header.nav-open .menu-btn .i-close { display: block; }

/* Telefon și tabletă: logo în stânga, lupa și burgerul în dreapta, meniul pliat sub ele. */
@media (max-width: 860px) {
    .site-header-inner { flex-wrap: wrap; gap: 0 12px; padding-top: 10px; padding-bottom: 10px; }
    .logo { min-width: 0; }
    .header-actions { margin-left: auto; }
    .menu-btn { display: inline-flex; width: 40px; height: 40px; }
    .search-btn { width: 40px; height: 40px; }
    .site-nav { display: none; order: 3; flex: 0 0 100%; margin-left: 0; }
    .site-header.nav-open .site-nav { display: block; }
    .site-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        margin-top: 10px;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }
    .site-nav a { display: block; padding: 12px 14px; font-size: 1.05rem; }
}
@media (max-width: 360px) {
    .logo-img { height: 22px; }
    .header-actions { gap: 6px; }
}
.search-panel { background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: 0 12px 30px rgba(17, 24, 39, 0.18); }
.search-panel[hidden] { display: none; }
.search-form { position: relative; padding: 14px 0 16px; }
.search-form input[type="search"] {
    width: 100%;
    padding: 12px 44px 12px 16px;
    font: inherit;
    font-size: 1.05rem;
    color: var(--text);
    border: 2px solid var(--border-2);
    border-radius: var(--radius-sm);
    background: var(--surface);
    -webkit-appearance: none;
    appearance: none;
}
.search-form input[type="search"]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--soft-2); }
.search-form input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-form .search-close { position: absolute; right: 8px; top: 20px; width: 34px; height: 34px; border: 0; background: none; color: var(--muted-2); border-radius: 8px; cursor: pointer; }
.search-form .search-close:hover { background: var(--bg); color: var(--text); }
.search-results { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; max-height: min(60vh, 520px); overflow: auto; overscroll-behavior: contain; }
.search-results:empty { display: none; }
.search-results li a {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 4px 12px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
}
.search-results li a:hover, .search-results li.is-active a { background: var(--soft); }
.search-results .badge { font-size: 0.75rem; }
.search-results strong { font-weight: 600; }
.search-results small { grid-column: 2; color: var(--muted-2); }
.search-results mark { background: var(--soft-2); color: inherit; border-radius: 2px; padding: 0 1px; }
.search-hint { grid-column: 1 / -1; padding: 10px 12px; color: var(--muted-2); font-size: 0.92rem; }
.search-results .search-hint { display: block; }

/* Conținut principal */
main.container { padding: 24px 16px 56px; }
main.is-home { padding-bottom: 0; }

.lead { font-size: 1.1rem; color: var(--muted); max-width: 760px; }
.page-head { margin-bottom: 24px; }
.section-title { font-size: 2rem; color: var(--dark-2); margin-bottom: 1.5rem; }

/* Hero (prima pagină) */
.hero { background: var(--dark); color: #FFFFFF; padding: 40px 0 72px; }
.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
}
.hero h1 { font-size: 3rem; line-height: 1.12; margin-bottom: 20px; }
.hero .accent { color: var(--accent); }
.hero-lead { font-size: 1.15rem; color: var(--on-dark); max-width: 560px; margin-bottom: 24px; }
.chips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.chips li {
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--dark-2);
    color: var(--on-dark);
}
.hero-panel {
    background: var(--surface);
    color: var(--text);
    border-radius: 24px;
    padding: 28px;
}
.hero-panel h2 { font-size: 1.3rem; margin-bottom: 16px; }
.hero-links {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.hero-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    min-height: 44px;
}
.hero-links a:hover { border-color: var(--brand); background: var(--soft); }

/* Secțiuni listă instrumente */
.tools-section { padding: 64px 0 32px; }
.category-block { margin-bottom: 40px; }
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.section-head h3 { font-size: 1.4rem; margin: 0; }
.section-head h3 a { color: var(--text); text-decoration: none; }
.section-head h3 a:hover { color: var(--link); }
.section-link { font-size: 0.95rem; font-weight: 500; }
/* Categoriile mici, una lângă alta, câte o coloană.
   Varianta de bază: cardurile stau unul sub altul în fiecare coloană. */
.category-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 0 24px;
    margin-bottom: 40px;
}
.category-row .category-block { margin-bottom: 0; }
.category-row .cards { grid-template-columns: 1fr; }

/* Unde browserul știe subgrid și pagina spune câte carduri are coloana cea mai lungă
   (clasa cards-N), titlurile și cardurile stau pe rânduri comune, cu aceeași înălțime. */
@supports (grid-template-rows: subgrid) {
    .category-row.cards-1,
    .category-row.cards-2,
    .category-row.cards-3 { row-gap: 16px; }
    .category-row.cards-1 { grid-template-rows: auto 1fr; }
    .category-row.cards-2 { grid-template-rows: auto repeat(2, 1fr); }
    .category-row.cards-3 { grid-template-rows: auto repeat(3, 1fr); }
    .category-row.cards-1 .category-block { grid-row: span 2; }
    .category-row.cards-2 .category-block { grid-row: span 3; }
    .category-row.cards-3 .category-block { grid-row: span 4; }
    .category-row.cards-1 .cards { grid-row: span 1; }
    .category-row.cards-2 .cards { grid-row: span 2; }
    .category-row.cards-3 .cards { grid-row: span 3; }
    .category-row.cards-1 .category-block,
    .category-row.cards-2 .category-block,
    .category-row.cards-3 .category-block,
    .category-row.cards-1 .cards,
    .category-row.cards-2 .cards,
    .category-row.cards-3 .cards { display: grid; grid-template-rows: subgrid; }
    .category-row.cards-1 .section-head,
    .category-row.cards-2 .section-head,
    .category-row.cards-3 .section-head { margin-bottom: 0; align-self: end; }
}

@media (max-width: 860px) {
    .category-row,
    .category-row[class*="cards-"] { display: block; margin-bottom: 0; }
    .category-row .category-block,
    .category-row[class*="cards-"] .category-block { display: block; margin-bottom: 40px; }
    .category-row .section-head,
    .category-row[class*="cards-"] .section-head { margin-bottom: 14px; }
    .category-row .cards,
    .category-row[class*="cards-"] .cards { display: grid; grid-template-rows: none; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
}

/* Carduri */
.cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}
.card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--brand); transform: translateY(-2px); color: inherit; }
.card h2, .card h3, .card h4 { font-size: 1.15rem; font-weight: 600; color: var(--text); margin: 0; }
.card p { margin: 0; color: var(--muted-2); font-size: 0.93rem; }
.card-badges { display: flex; align-items: center; gap: 8px; }
.badge {
    display: inline-block;
    font-weight: 700;
    font-size: 0.8rem;
    line-height: 1;
    padding: 7px 11px;
    border-radius: 8px;
    white-space: nowrap;
}
.badge-from { background: var(--soft-2); color: var(--dark); }
.badge-to { background: var(--dark); color: #FFFFFF; }
.badge-arrow { color: var(--muted); flex: 0 0 auto; }

/* Cum funcționează */
.how { background: var(--surface); padding: 64px 0; margin-top: 24px; }
.how-steps {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
}
.how-steps li { display: flex; flex-direction: column; gap: 10px; }
.how-cta { margin-top: 40px; }
.how-cta .btn { min-width: min(320px, 100%); min-height: 52px; font-family: "Poppins", sans-serif; font-weight: 700; }
.how-steps h3 { font-size: 1.3rem; margin: 0; }
.how-steps p { margin: 0; color: var(--muted); }
.step-num {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: var(--dark);
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.35rem;
}
.step-num-accent { background: var(--brand); color: var(--on-brand); }


/* Breadcrumb */
.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 14px;
    padding: 0;
    font-size: 0.9rem;
    color: var(--muted-2);
}
.breadcrumb li + li::before { content: "/"; margin: 0 6px 0 2px; color: var(--border-2); }
.breadcrumb a { color: var(--muted-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--link); }

/* Aplicația instrumentului */
.tool-app {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 40px;
}

.dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 36px 20px;
    text-align: center;
    border: 2px dashed var(--accent);
    border-radius: 18px;
    background: var(--soft);
    color: var(--dark-2);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.is-dragover {
    border-color: var(--brand);
    background: var(--soft-2);
    outline: none;
}
.dropzone input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}
.dropzone-icon { color: var(--dark-2); }
.dropzone-title { font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; margin: 0; color: var(--dark); }
.dropzone-hint { color: var(--muted); font-size: 0.95rem; margin: 0; max-width: 520px; }
.dropzone-btn { margin-top: 6px; }

.file-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    gap: 6px;
}
.file-list:empty { display: none; }
.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
}
.file-index {
    flex: 0 0 auto;
    min-width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: var(--soft-2);
    color: var(--dark);
    font-size: 0.8rem;
    font-weight: 700;
}
.file-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
    font-weight: 500;
}
.file-size { flex: 0 0 auto; color: var(--muted-2); font-size: 0.85rem; }
.file-actions { flex: 0 0 auto; display: flex; gap: 2px; }
.icon-btn {
    width: 32px;
    height: 32px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--muted-2);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}
.icon-btn:hover { background: var(--surface); border-color: var(--border); color: var(--text); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn-remove:hover { color: var(--error); }

/* Opțiuni */
.tool-options {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px 20px;
}
.tool-options[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field > label, .field > .field-label { font-weight: 600; font-size: 0.9rem; color: var(--muted); }
.field input[type="text"],
.field input[type="number"],
.field select,
.field textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    font: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: 2px solid var(--link);
    outline-offset: 1px;
    border-color: var(--brand);
}
.field textarea { min-height: 180px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.9rem; }
.field input[type="range"] { width: 100%; accent-color: var(--brand); }
.field input[type="color"] { width: 52px; height: 40px; padding: 2px; border: 1px solid var(--border-2); border-radius: var(--radius-sm); background: var(--surface); }
.field .help { margin: 0; font-size: 0.85rem; color: var(--muted-2); }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-value { min-width: 3.5ch; text-align: right; font-variant-numeric: tabular-nums; font-size: 0.92rem; font-weight: 600; }
.choice-list { display: grid; gap: 8px; }
.choice { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 400; min-height: 28px; }
.choice input { margin: 0; accent-color: var(--brand); width: 18px; height: 18px; }
.inline-row { display: flex; align-items: center; gap: 8px; }
.inline-row input[type="number"] { max-width: 130px; }

/* Butoane */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    min-height: 48px;
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-2); font-weight: 600; }
.btn-secondary:hover { background: var(--bg); }
.btn-outline { background: var(--surface); color: var(--dark); border-color: var(--dark); }
.btn-outline:hover { background: var(--dark); color: #FFFFFF; }
.btn-small { padding: 6px 14px; min-height: 38px; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn.is-busy::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid rgba(17, 24, 39, 0.35);
    border-top-color: var(--on-brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.tool-actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.tool-actions[hidden] { display: none; }
.tool-actions .btn-primary { min-width: 240px; min-height: 54px; font-size: 1.1rem; }

/* Stare și rezultat */
.tool-status { margin: 16px 0 0; padding: 0; font-size: 0.95rem; }
.tool-status:empty { display: none; }
.tool-status.is-error, .tool-status.is-success, .tool-status.is-info {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
}
.tool-status.is-error { background: var(--error-soft); color: var(--error); }
.tool-status.is-success { background: var(--success-soft); color: var(--success); }
.tool-status.is-info { background: var(--info-soft); color: var(--muted); }

.tool-result {
    margin-top: 16px;
    padding: 20px;
    border: 1px solid #BFE3CB;
    border-radius: var(--radius);
    background: var(--success-soft);
}
.tool-result[hidden] { display: none; }
.result-info { margin: 0 0 12px; font-weight: 600; word-break: break-word; }
.result-info small { display: block; font-weight: 400; color: var(--muted-2); margin-top: 2px; }
.result-preview:empty { display: none; }
.result-preview { margin-bottom: 14px; }
.result-preview textarea {
    width: 100%;
    min-height: 180px;
    padding: 10px 12px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    resize: vertical;
}
.result-preview img {
    display: block;
    max-width: 100%;
    max-height: 260px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Diacritice: previzualizare cu cuvinte marcate și alegere dintr-un clic */
.dia-wrap { position: relative; }
.dia-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.dia-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.85rem; color: var(--muted-2); }
.dia-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dia-legend i { width: 14px; height: 14px; border-radius: 4px; }
.dia-legend .l-ch { background: #DCFCE7; border: 1px solid #86EFAC; }
.dia-legend .l-un { background: #FEF3C7; border: 1px solid #FCD34D; }
.dia-legend .l-pk { background: #DBEAFE; border: 1px solid #93C5FD; }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: 0.9rem; }
.dia-rich {
    min-height: 180px;
    max-height: 420px;
    overflow: auto;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.7;
    font-size: 1rem;
}
.dia-rich .w { border-radius: 4px; padding: 0 2px; cursor: pointer; }
.dia-rich .w.ch { background: #DCFCE7; color: #166534; }
.dia-rich .w.unsure { background: #FEF3C7; color: #92400E; box-shadow: inset 0 -2px 0 #F59E0B; }
.dia-rich .w.picked { background: #DBEAFE; color: #1E3A8A; }
.dia-rich .w.focus, .dia-rich .w:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.dia-pop {
    position: absolute;
    z-index: 20;
    min-width: 180px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.18);
}
.dia-pop small { display: block; padding: 4px 8px 6px; color: var(--muted-2); font-size: 0.78rem; }
.dia-pop button {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.dia-pop button:hover, .dia-pop button:focus-visible { background: var(--bg); outline: none; }
.dia-pop button.cur { font-weight: 600; }
.dia-pop button em { font-style: normal; font-size: 0.78rem; color: var(--muted-2); }

.privacy-note { margin: 18px 0 0; font-size: 0.88rem; color: var(--muted-2); }

/* Anunț AdSense: fără spațiu rezervat cât timp nu se încarcă nimic */
.ad-slot { margin: 24px 0; text-align: center; overflow: hidden; }
.ad-slot:empty { display: none; }
.is-home .ad-slot-display { margin: 32px 0 8px; }
.is-home .ad-slot-feed { margin: 8px 0 40px; }
.ad-slot-feed { margin: 0 0 40px; }

/* Secțiuni text pe pagina instrumentului */
.steps, .faq, .related { margin-bottom: 40px; }
.related { margin-top: 56px; }
.notice + .related { margin-top: 32px; }
.steps h2, .faq h2, .related h2 { font-size: 1.5rem; color: var(--dark-2); margin-bottom: 1rem; }
.steps ol { padding-left: 1.4rem; margin: 0; }
.steps li { margin-bottom: 8px; }

.faq details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 16px;
    margin-bottom: 8px;
}
.faq summary { padding: 14px 0; font-weight: 600; cursor: pointer; }
.faq details p { margin: 0 0 14px; color: var(--muted); }

.notice {
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 28px;
}
.notice p { margin: 0; }

.page-content { max-width: 760px; }
.page-content h2 { margin-top: 1.8rem; font-size: 1.35rem; }
.page-content .page-updated { color: var(--muted-2); font-size: 0.92rem; }
.page-content ul { padding-left: 1.3rem; margin: 0 0 1rem; }
.page-content li { margin-bottom: 4px; }
.not-found .cards { margin-top: 20px; }

/* Subsol, 4 coloane: logo, insigne ANPC, confidențialitate, meniu */
.site-footer { background: var(--dark); color: var(--on-dark); padding: 48px 0 28px; font-size: 0.93rem; }
.footer-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px minmax(0, 1.5fr) auto;
    gap: 32px 48px;
    align-items: start;
}
.footer-brand .logo-img { height: 30px; }
.site-footer ul.footer-badges {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}
.footer-badges a { display: block; line-height: 0; border-radius: 10px; }
.footer-badges a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.footer-badges img { display: block; width: 250px; max-width: 100%; height: auto; }
.footer-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 1.1rem;
    color: #FFFFFF;
}
.footer-title svg { flex: 0 0 auto; color: var(--accent); }
.footer-privacy p { margin: 0; line-height: 1.65; }
.footer-menu ul,
.footer-legal ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-brand { display: grid; gap: 22px; align-content: start; }
.footer-brand .logo { justify-self: start; }
.site-footer a { color: var(--on-dark); text-decoration: none; font-weight: 500; }
.site-footer a:hover { color: var(--accent); }
.copyright {
    margin: 36px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--dark-2);
    font-size: 0.88rem;
}

@media (max-width: 1000px) {
    .footer-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .footer-cols { grid-template-columns: 1fr; gap: 28px; }
    .footer-badges img { width: 220px; }
}

/* Ecrane medii și mici */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; gap: 32px; }
    .hero h1 { font-size: 2.3rem; }
}

@media (max-width: 600px) {
    h1 { font-size: 1.7rem; }
    .hero { padding: 28px 0 44px; }
    .hero h1 { font-size: 1.9rem; }
    .hero-lead { font-size: 1.02rem; }
    .hero-panel { padding: 20px; }
    .hero-links { grid-template-columns: 1fr; }
    .section-title { font-size: 1.5rem; }
    .lead { font-size: 1rem; }
    .tool-app { padding: 16px; border-radius: 18px; }
    .dropzone { padding: 28px 14px; }
    .file-size { display: none; }
    .tool-options { grid-template-columns: 1fr; }
    .btn, .tool-actions .btn-primary { width: 100%; }
    .search-results { max-height: calc(100vh - 210px); }
    .search-results li a { grid-template-columns: 1fr; }
    .search-results .badge { justify-self: start; }
    .search-results small { grid-column: 1; }
    .to-top { right: 14px; bottom: 14px; width: 44px; height: 44px; }
}
