:root {
  --page-bg: #fcfcff;
  --surface: #ffffff;
  --surface-soft: #f7f8ff;
  --surface-blue: #f1f8ff;
  --surface-mint: #f1fbfb;
  --surface-violet: #f6f4ff;
  --text-primary: #111c44;
  --text-secondary: #68728f;
  --text-muted: #9aa3ba;
  --brand: #4b3df2;
  --brand-2: #7769ff;
  --brand-hover: #3d30d5;
  --brand-light: #edebff;
  --brand-border: #8179ff;
  --mint: #3abda3;
  --border: #e9ebf4;
  --border-strong: #dde0f0;
  --shadow-card: 0 8px 22px rgba(40, 47, 102, .06);
  --shadow-upload: 0 16px 36px rgba(66, 57, 198, .12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --container: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; overflow-x: hidden; font-family: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text-primary); background: var(--page-bg); -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img, canvas, video { max-width: 100%; height: auto; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.container { width: min(var(--container), calc(100% - 80px)); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.hidden { display: none !important; }

/* Header */
.site-header { position: sticky; z-index: 50; top: 0; border-bottom: 1px solid rgba(233, 235, 244, .72); background: rgba(252, 252, 255, .86); backdrop-filter: blur(18px); }
.header__inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand__mark { width: 30px; height: 30px; position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; transform: rotate(-24deg); }
.brand__mark i { display: block; border-radius: 8px 4px 8px 4px; background: linear-gradient(145deg, #2e26da, #7d72ff); box-shadow: 0 4px 9px rgba(76, 61, 242, .19); }
.brand__mark i:nth-child(2) { opacity: .75; transform: translateY(3px); }
.brand__mark i:nth-child(3) { opacity: .85; transform: translateY(-3px); }
.brand__mark i:nth-child(4) { opacity: .58; }
.brand__name { font-size: 21px; font-weight: 750; letter-spacing: -.035em; }
.desktop-nav { display: flex; align-items: center; justify-content: center; gap: 24px; margin-left: auto; margin-right: auto; }
.nav-link { color: #2a3351; border: 0; background: transparent; padding: 8px 2px; font-size: 13px; font-weight: 600; transition: color .18s ease; }
.nav-link:hover { color: var(--brand); }
.nav-link svg { width: 14px; height: 14px; margin-left: 3px; vertical-align: -2px; }
.nav-drop { position: relative; }
.nav-drop__menu { position: absolute; top: calc(100% + 11px); left: 50%; min-width: 185px; padding: 8px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255, 255, 255, .97); box-shadow: 0 16px 35px rgba(26, 30, 87, .12); opacity: 0; visibility: hidden; transform: translate(-50%, -6px); transition: opacity .18s ease, visibility .18s ease, transform .18s ease; }
.nav-drop:hover .nav-drop__menu, .nav-drop:focus-within .nav-drop__menu, .nav-drop.is-open .nav-drop__menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav-drop__menu a { display: block; border-radius: 9px; padding: 9px 10px; color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.nav-drop__menu a:hover { color: var(--brand); background: var(--brand-light); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-button, .menu-button { min-height: 40px; border: 1px solid var(--border); background: rgba(255, 255, 255, .82); color: var(--text-primary); box-shadow: 0 3px 12px rgba(45, 48, 107, .045); transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.icon-button:hover, .menu-button:hover { border-color: #cfd1ea; transform: translateY(-1px); background: #fff; }
.icon-button { width: 40px; border-radius: 50%; display: grid; place-items: center; }
.icon-button svg { width: 17px; height: 17px; }
.menu-button { border-radius: 12px; display: none; gap: 9px; align-items: center; justify-content: center; padding: 0 13px 0 16px; font-size: 13px; font-weight: 650; }
.menu-button svg { width: 18px; height: 18px; }
.mobile-nav { display: none; }
.mobile-nav a.active { color: var(--brand); background: var(--brand-light); }

/* Hero */
.hero { padding: 44px 0 38px; overflow: hidden; }
.hero__content { display: flex; flex-direction: column; align-items: center; text-align: center; }
.privacy-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 100px; background: #f4f7ff; color: #657092; font-size: 11px; font-weight: 650; }
.privacy-pill svg { width: 14px; height: 14px; color: #6b82ab; }
.privacy-pill__info { opacity: .7; }
.hero h1 { margin: 22px 0 0; color: var(--text-primary); font-size: clamp(42px, 5.05vw, 67px); font-weight: 800; line-height: 1.045; letter-spacing: -.055em; }
.hero h1 span { display: inline-block; background: linear-gradient(90deg, #3c35f0 0%, #4f45f7 47%, #8177ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { max-width: 720px; margin: 19px 0 0; color: var(--text-secondary); font-size: 16px; font-weight: 500; line-height: 1.55; }
.upload-card { width: min(965px, 100%); min-height: 241px; margin-top: 30px; padding: 9px; border: 2px dashed var(--brand-border); border-radius: 24px; background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(248,247,255,.95)); box-shadow: var(--shadow-upload), inset 0 0 0 1px rgba(255,255,255,.8); cursor: pointer; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.upload-card:hover, .upload-card.is-dragging { border-color: var(--brand); background: #fbfbff; transform: translateY(-2px); box-shadow: 0 18px 42px rgba(66, 57, 198, .16); }
.upload-card--selected { border-style: solid; border-color: #5e5af6; }
.upload-card__content { height: 100%; min-height: 218px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.upload-card__icon { width: 47px; height: 47px; display: grid; place-items: center; color: var(--brand); }
.upload-card__icon svg { width: 42px; height: 42px; stroke-width: 1.65; }
.upload-card strong { margin-top: 10px; font-size: 16px; font-weight: 750; letter-spacing: -.025em; }
.upload-card__content > span { margin-top: 6px; color: #77819e; font-size: 13px; font-weight: 500; }
.select-file-button { display: inline-flex; align-items: center; gap: 9px; height: 46px; margin-top: 16px; padding: 0 11px 0 15px; border: 0; border-radius: 10px; color: #fff; background: linear-gradient(100deg, #4938f4 0%, #6d5eff 100%); box-shadow: 0 9px 18px rgba(75, 61, 242, .25); font-size: 13px; font-weight: 700; transition: transform .18s ease, box-shadow .18s ease; }
.select-file-button:hover { transform: translateY(-2px); box-shadow: 0 12px 22px rgba(75, 61, 242, .32); }
.select-file-button svg { width: 17px; height: 17px; stroke-width: 1.7; }
.select-file-button i { width: 1px; height: 21px; background: rgba(255,255,255,.35); }
.select-file-button__chevron { width: 15px !important; height: 15px !important; }
.upload-card small { margin-top: 10px; color: #919ab4; font-size: 11px; }
.format-row { display: flex; align-items: center; justify-content: center; gap: 7px; flex-wrap: wrap; margin-top: 18px; color: #8b94ad; font-size: 11px; font-weight: 500; }
.format-row b { padding: 4px 9px; border: 1px solid #edf0f7; border-radius: 100px; background: #fff; color: #68728f; font-size: 10px; font-weight: 700; }
.format-row em { font-style: normal; color: #8b94ad; }
.home-converter { width: min(965px, 100%); margin: 18px auto 0; text-align: left; }
.home-converter .settings { border-top: 0; padding-top: 0; }
.home-converter .file-list { margin-bottom: 18px; }
.home-converter .result-state { margin-top: 18px; }
.home-converter .processing { margin-top: 18px; }

/* Sections */
.section { padding: 34px 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.section-heading h2, .tool-panel h2, .newsletter-card h2 { margin: 0; color: var(--text-primary); letter-spacing: -.04em; }
.section-heading h2 { font-size: 21px; font-weight: 760; }
.counter { display: inline-grid; width: 22px; height: 22px; margin-left: 4px; place-items: center; vertical-align: 2px; border-radius: 50%; color: var(--brand); background: var(--brand-light); font-size: 11px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--brand); font-size: 13px; font-weight: 700; }
.text-link svg { width: 17px; height: 17px; }
.popular-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 15px; margin-top: 22px; }
.task-card { position: relative; display: flex; flex-direction: column; min-height: 192px; overflow: hidden; padding: 18px 17px 15px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 3px 11px rgba(31, 40, 102, .025); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.task-card:hover { border-color: #d4d1ff; box-shadow: var(--shadow-card); transform: translateY(-3px); }
.task-card__art { height: 46px; display: flex; align-items: center; justify-content: center; gap: 5px; margin-bottom: 13px; }
.task-card__art > svg { width: 17px; height: 17px; color: #b3b9d1; }
.mini-file { display: inline-flex; position: relative; width: 27px; height: 33px; align-items: flex-end; justify-content: center; overflow: hidden; padding-bottom: 4px; border: 1.4px solid currentColor; border-radius: 4px; color: #7f91aa; background: #fff; font-size: 6px; font-weight: 800; }
.mini-file::after { content: ""; position: absolute; top: 0; right: 0; width: 8px; height: 8px; border-left: 1.4px solid currentColor; border-bottom: 1.4px solid currentColor; background: #fff; }
.mini-file--blank { color: #c4cadb; }
.mini-file--heic { color: #35a693; background: #f0fbf8; }
.mini-file--jpg { color: #f0aa1c; background: #fff8e9; }
.mini-file--webp { color: #5e66db; background: #f4f4ff; }
.mini-file--png { color: #7c6bf2; background: #f7f5ff; }
.mini-file--pdf { color: #f05c73; background: #fff3f5; align-items: center; padding: 0; }
.mini-file--pdf svg { width: 18px; height: 18px; }
.mini-file--pdf small { position: absolute; z-index: 2; bottom: 3px; font-size: 5px; font-weight: 800; }
.mini-file--pdf.second { margin-left: -7px; color: #f47a8a; opacity: .85; transform: translateY(4px); }
.mini-file--pdf.teal { color: #25abc2; background: #f0fbfd; }
.compress-icon { display: inline-grid; width: 34px; height: 34px; place-items: center; border: 1.5px solid #a6d7f1; border-radius: 50%; color: #46a9e0; }
.compress-icon svg { width: 19px; height: 19px; }
.task-card h3 { margin: 0; font-size: 15px; font-weight: 760; letter-spacing: -.035em; }
.task-card p { margin: 8px 0 0; color: #7d86a0; font-size: 11px; font-weight: 500; line-height: 1.45; }
.card-arrow { display: inline-grid; width: 23px; height: 23px; margin-top: auto; margin-left: auto; place-items: center; color: var(--brand); }
.card-arrow svg { width: 17px; height: 17px; }

/* Tool panels */
.tool-panels { padding-top: 2px; }
.tool-panels__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 21px; }
.tool-panel { position: relative; min-height: 405px; overflow: hidden; border: 1px solid var(--border); border-radius: 21px; }
.tool-panel--photo { background: linear-gradient(135deg, #f0fbfc 0%, #f7fffe 70%); }
.tool-panel--pdf { background: linear-gradient(135deg, #f7f5ff 0%, #fbfaff 80%); }
.tool-panel__content { position: relative; z-index: 1; padding: 27px 29px; }
.tool-panel h2 { font-size: 21px; font-weight: 780; }
.tool-panel--pdf h2 span { color: var(--brand); }
.tool-panel h2 + p { margin: 8px 0 0; color: #68728f; font-size: 12px; line-height: 1.55; }
.tool-panel__decor { position: absolute; pointer-events: none; }
.tool-panel__decor--sun { width: 43px; height: 43px; top: 38px; right: 97px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffd1ad, #f4ab80); box-shadow: 0 12px 18px rgba(244, 171, 128, .2); }
.tool-panel__decor--mountains { display: flex; align-items: end; gap: 0; right: -20px; bottom: -5px; width: 205px; height: 185px; opacity: .52; }
.tool-panel__decor--mountains span { display: block; width: 115px; height: 135px; margin-right: -62px; transform: rotate(45deg); border-radius: 12px; background: linear-gradient(135deg, rgba(142, 218, 213, .2), rgba(108, 180, 199, .45)); }
.tool-panel__decor--mountains span:nth-child(2) { height: 100px; background: linear-gradient(135deg, rgba(205, 234, 227, .2), rgba(153, 218, 207, .48)); }
.tool-panel__decor--mountains span:nth-child(3) { height: 80px; background: linear-gradient(135deg, rgba(143, 214, 203, .15), rgba(107, 180, 181, .45)); }
.tool-panel__decor--orb { right: -32px; top: 5px; width: 206px; height: 206px; border-radius: 50%; background: radial-gradient(circle at 38% 42%, rgba(219, 211, 255, .67), rgba(246, 244, 255, 0) 68%); }
.format-icons { display: flex; align-items: end; gap: 6px; margin-top: 17px; }
.format-icon { display: inline-grid; width: 35px; height: 40px; place-items: end center; padding-bottom: 5px; border: 1px solid rgba(198, 219, 230, .72); border-radius: 6px; background: rgba(255,255,255,.92); color: #7a91a6; font-size: 7px; font-weight: 800; }
.format-icon::before { content: ""; width: 14px; height: 13px; margin-bottom: 2px; border: 1.2px solid currentColor; border-radius: 3px; }
.format-icon--heic { color: #34a996; }.format-icon--jpg { color: #2fb1c3; }.format-icon--png { color: #667699; }.format-icon--webp { color: #4e63d7; }.format-icon--avif { color: #6d80a1; }.format-icon--svg { color: #399aba; }
.benefit-list { display: grid; gap: 13px; margin: 21px 0 18px; padding: 0; list-style: none; }
.benefit-list li { display: flex; gap: 10px; align-items: flex-start; }
.benefit-list li > svg { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; color: #37b4a1; }
.benefit-list b { display: block; color: #2e5761; font-size: 11px; font-weight: 750; }
.benefit-list small { display: block; margin-top: 3px; color: #74939a; font-size: 10px; font-weight: 500; }
.panel-button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border: 1px solid; border-radius: 9px; font-size: 11px; font-weight: 700; transition: transform .18s ease, background .18s ease; }
.panel-button:hover { transform: translateY(-1px); }
.panel-button svg { width: 15px; height: 15px; }
.panel-button--mint { border-color: #a9dad9; color: #2a858d; background: rgba(255,255,255,.67); }.panel-button--mint:hover { background: #fff; }
.panel-button--violet { border-color: #c9c5ff; color: var(--brand); background: rgba(255,255,255,.64); }.panel-button--violet:hover { background: #fff; }
.pdf-tile-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 20px 0; }
.pdf-tile { display: flex; min-height: 84px; padding: 10px 6px; align-items: center; justify-content: center; gap: 6px; flex-direction: column; border: 1px solid rgba(233, 235, 244, .95); border-radius: 10px; background: rgba(255,255,255,.89); color: #354266; font-size: 10px; font-weight: 700; text-align: center; transition: transform .18s ease, box-shadow .18s ease; }
.pdf-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 14px rgba(77, 67, 181, .08); }
.pdf-tile svg { width: 22px; height: 22px; color: #665afb; }
.pdf-tile:nth-child(1) svg { color: #ef7183; }.pdf-tile:nth-child(2) svg { color: #7772fb; }.pdf-tile:nth-child(3) svg { color: #27b5bb; }.pdf-tile:nth-child(4) svg { color: #f06279; }.pdf-tile:nth-child(5) svg { color: #6e9eea; }.pdf-tile:nth-child(6) svg { color: #7c68e9; }

/* Trust */
.trust-strip { padding-top: 26px; padding-bottom: 25px; }
.trust-strip__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.trust-item { display: flex; align-items: flex-start; gap: 11px; }
.trust-item__icon { display: grid; flex: 0 0 auto; width: 32px; height: 32px; place-items: center; border: 1.5px solid #8981ff; border-radius: 11px; color: var(--brand); }
.trust-item__icon svg { width: 18px; height: 18px; }
.trust-item h3 { margin: 1px 0 4px; color: #253052; font-size: 12px; font-weight: 760; letter-spacing: -.02em; }
.trust-item p { margin: 0; color: #7a84a0; font-size: 10px; font-weight: 500; line-height: 1.45; }

/* Newsletter */
.newsletter-section { padding-top: 19px; padding-bottom: 36px; }
.newsletter-card { position: relative; display: flex; align-items: center; min-height: 181px; overflow: hidden; padding: 30px 32px; border: 1px solid #e8eaff; border-radius: 20px; background: linear-gradient(104deg, #f5f9ff 0%, #f9f8ff 64%, #f0eeff 100%); }
.newsletter-card__copy { position: relative; z-index: 2; }
.newsletter-card h2 { font-size: 19px; font-weight: 760; }
.newsletter-card p { margin: 8px 0 15px; color: #6d7793; font-size: 12px; line-height: 1.55; }
.newsletter-form { display: flex; gap: 7px; width: min(100%, 322px); }
.newsletter-form input { min-width: 0; width: 100%; height: 40px; padding: 0 12px; border: 1px solid #e1e5f2; border-radius: 9px; outline: 0; background: #fff; color: var(--text-primary); font-size: 12px; transition: border-color .18s ease, box-shadow .18s ease; }
.newsletter-form input:focus { border-color: #9d96ff; box-shadow: 0 0 0 3px rgba(75,61,242,.1); }
.newsletter-form button { flex: 0 0 auto; height: 40px; padding: 0 14px; border: 0; border-radius: 9px; color: #fff; background: linear-gradient(100deg, #4938f4, #6d5eff); font-size: 12px; font-weight: 700; box-shadow: 0 7px 14px rgba(75,61,242,.18); }
.form-status { margin: 10px 0 0; color: var(--mint); font-size: 12px; font-weight: 700; }
.form-status.is-error { color: #e74d65; }
.envelope-art { position: absolute; right: 105px; bottom: 21px; width: 146px; height: 105px; border-radius: 10px 10px 16px 16px; background: linear-gradient(142deg, #766bf0, #9a91ff); box-shadow: 0 16px 25px rgba(90, 79, 228, .2); transform: rotate(1.5deg); }
.envelope-art::before, .envelope-art::after { content: ""; position: absolute; left: 0; width: 100%; height: 56px; background: #8a80fa; clip-path: polygon(0 0, 50% 78%, 100% 0, 100% 100%, 0 100%); }
.envelope-art::before { top: 0; }.envelope-art::after { bottom: 0; transform: rotate(180deg); background: #8076f2; }
.envelope-art__paper { position: absolute; z-index: -1; top: -41px; left: 32px; width: 80px; height: 76px; border-radius: 6px; background: #fffdf7; box-shadow: 0 8px 15px rgba(59, 56, 134, .13); }
.envelope-art__paper::after { content: ""; position: absolute; top: 17px; left: 18px; width: 43px; height: 4px; border-radius: 5px; background: #f1d5b0; box-shadow: 0 14px 0 #e9e9f4, 0 28px 0 #e9e9f4; }
.envelope-art__flap { position: absolute; z-index: 2; top: 0; left: 0; width: 100%; height: 67px; background: #a39bff; clip-path: polygon(0 0, 50% 72%, 100% 0); }
.envelope-art__spark { position: absolute; width: 8px; height: 8px; border-radius: 2px; background: #ffad6f; transform: rotate(45deg); }
.envelope-art__spark--one { top: -27px; right: -24px; }.envelope-art__spark--two { bottom: 12px; left: -35px; width: 6px; height: 6px; background: #9b91ff; }

/* Footer */
.site-footer { padding: 31px 0 38px; border-top: 1px solid #eef0f7; background: rgba(255,255,255,.73); }
.footer__grid { display: grid; grid-template-columns: 1.34fr 1fr 1fr 1.16fr 1fr; gap: 22px; align-items: start; }
.footer-brand p { margin: 28px 0 0; color: #9aa3ba; font-size: 10px; }
.footer-links { display: grid; gap: 8px; }
.footer-links h3 { margin: 0 0 2px; color: #293253; font-size: 11px; font-weight: 780; }
.footer-links a { color: #65708d; font-size: 10px; font-weight: 500; transition: color .18s ease; }
.footer-links a:hover { color: var(--brand); }
.footer-social { display: grid; justify-items: end; gap: 18px; }
.footer-social > div { display: flex; gap: 9px; }
.footer-social a { display: grid; width: 37px; height: 37px; place-items: center; border: 1.3px solid #68a8ff; border-radius: 50%; color: #2385ee; transition: transform .18s ease, background .18s ease; }
.footer-social a:hover { background: #eff7ff; transform: translateY(-2px); }.footer-social svg { width: 18px; height: 18px; }
.footer-social p { margin: 0; color: #79839f; font-size: 10px; font-weight: 500; white-space: nowrap; }.footer-social p span { color: #f15c82; }

/* Accessible focus */
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid rgba(75, 61, 242, .28); outline-offset: 3px; }

/* Optional dark toggle */
.theme-night { --page-bg: #121428; --surface: #1b1e38; --surface-soft: #202440; --surface-blue: #19263e; --surface-mint: #162c31; --surface-violet: #252142; --text-primary: #f5f6ff; --text-secondary: #b5bdd4; --text-muted: #919ab2; --border: #2f3452; --border-strong: #42486d; --brand-light: rgba(117, 105, 255, .17); }
.theme-night .site-header { background: rgba(18, 20, 40, .86); }.theme-night .task-card, .theme-night .pdf-tile, .theme-night .format-row b, .theme-night .icon-button, .theme-night .menu-button, .theme-night .newsletter-form input { background: var(--surface); }.theme-night .upload-card { background: linear-gradient(135deg, rgba(35, 39, 69, .98), rgba(27, 30, 56, .98)); }.theme-night .site-footer { background: #171a31; }.theme-night .nav-link { color: var(--text-secondary); }.theme-night .tool-panel--photo { background: linear-gradient(135deg, #162e35, #17272d); }.theme-night .tool-panel--pdf { background: linear-gradient(135deg, #292344, #201d36); }.theme-night .newsletter-card { background: linear-gradient(104deg, #202841, #2b2748); }.theme-night .task-card h3, .theme-night .trust-item h3, .theme-night .footer-links h3, .theme-night .benefit-list b { color: var(--text-primary); }
.theme-night .theme-toggle svg use { href: "#i-sun"; }

@media (max-width: 1120px) {
  .container { width: min(var(--container), calc(100% - 48px)); }
  .desktop-nav { gap: 17px; }
  .popular-grid { grid-template-columns: repeat(3, 1fr); }
  .task-card { min-height: 174px; }
  .footer__grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; }.footer-social { grid-column: 1 / -1; justify-items: start; display: flex; align-items: center; }.footer-social p { margin-left: 6px; }
}

@media (max-width: 850px) {
  .desktop-nav { display: none; }.mobile-nav { display: grid; position: fixed; z-index: 49; top: 78px; left: 0; right: 0; gap: 7px; padding: 14px 24px 21px; border-bottom: 1px solid var(--border); background: rgba(252,252,255,.98); box-shadow: 0 18px 30px rgba(39, 43, 100, .08); transform: translateY(-125%); opacity: 0; pointer-events: none; transition: transform .24s ease, opacity .24s ease; }.mobile-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }.mobile-nav a { padding: 10px 12px; border-radius: 10px; color: var(--text-secondary); font-size: 14px; font-weight: 700; }.mobile-nav a:hover { color: var(--brand); background: var(--brand-light); }
  .tool-panels__grid { grid-template-columns: 1fr; }.tool-panel { min-height: auto; }.trust-strip__grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }.footer__grid { grid-template-columns: 1.5fr 1fr 1fr; }.footer-brand { grid-column: 1 / -1; }.footer-brand p { margin-top: 12px; }
}

@media (max-width: 650px) {
  .container { width: min(var(--container), calc(100% - 32px)); }
  .header__inner { min-height: 70px; }.brand__mark { width: 27px; height: 27px; }.brand__name { font-size: 19px; }.icon-button { display: none; }.menu-button { height: 39px; padding: 0 11px 0 13px; }.mobile-nav { top: 70px; padding-left: 16px; padding-right: 16px; }
  .hero { padding-top: 34px; padding-bottom: 22px; }.hero h1 { margin-top: 18px; font-size: clamp(35px, 11vw, 46px); line-height: 1.08; }.hero__lead { margin-top: 15px; font-size: 14px; }.upload-card { min-height: 238px; margin-top: 24px; border-radius: 20px; }.upload-card__content { min-height: 216px; }.select-file-button { width: min(250px, 94%); justify-content: center; }.format-row { margin-top: 16px; }.format-row > span { width: 100%; }.format-row em { display: none; }
  .section { padding: 25px 0; }.section-heading h2 { font-size: 19px; }.text-link { font-size: 12px; }.popular-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 17px; }.task-card { min-height: 177px; padding: 15px 13px 12px; border-radius: 14px; }.task-card h3 { font-size: 13px; }.task-card p { font-size: 10px; }.task-card__art { margin-bottom: 8px; transform: scale(.9); transform-origin: left center; }.card-arrow { margin-right: 0; }
  .tool-panel { border-radius: 18px; }.tool-panel__content { padding: 23px 20px; }.tool-panel h2 { font-size: 20px; }.pdf-tile-grid { gap: 7px; }.pdf-tile { min-height: 80px; font-size: 9px; }.trust-strip__grid { grid-template-columns: 1fr; gap: 17px; }.trust-item__icon { width: 30px; height: 30px; }.trust-item h3 { font-size: 12px; }.newsletter-card { min-height: 244px; padding: 24px 19px 135px; border-radius: 18px; }.newsletter-card h2 { font-size: 18px; }.newsletter-card p { font-size: 11px; }.newsletter-form { width: 100%; }.newsletter-form button { padding: 0 11px; }.envelope-art { right: 23px; bottom: 15px; transform: scale(.72) rotate(1.5deg); transform-origin: bottom right; }.footer__grid { grid-template-columns: 1fr 1fr; gap: 24px 16px; }.footer-brand, .footer-social { grid-column: 1 / -1; }.footer-links { gap: 7px; }.footer-social { display: flex; justify-content: space-between; }.footer-social p { margin-left: auto; }
}

@media (max-width: 390px) { .popular-grid { grid-template-columns: 1fr; }.task-card { min-height: 154px; }.task-card p br { display: none; } .task-card__art { height: 39px; } .task-card h3 { margin-top: 0; }.footer__grid { grid-template-columns: 1fr; }.footer-brand, .footer-social { grid-column: auto; }.footer-social { justify-content: flex-start; gap: 9px; flex-wrap: wrap; }.footer-social p { margin-left: 5px; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

/* ===== Tool page styles (workspace) ===== */
.tool-hero { padding: 46px 0 32px; text-align: center; position: relative; overflow: hidden; }
.tool-hero::before { content: ""; position: absolute; z-index: -1; width: 600px; height: 310px; border-radius: 50%; background: radial-gradient(circle, rgba(94,80,255,.10), rgba(94,80,255,0) 70%); left: 50%; top: -160px; transform: translateX(-50%); }
.breadcrumbs { display: flex; justify-content: flex-start; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; margin-top: 14px; margin-bottom: 22px; }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs svg { width: 14px; height: 14px; }
.tool-kicker { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; color: #5a6380; background: var(--brand-light); font-size: 12px; font-weight: 700; }
.tool-kicker--server { color: #6e567c; background: #f8f2ff; }
.tool-kicker svg { color: var(--brand); width: 14px; height: 14px; }
.tool-title { margin: 14px auto 10px; max-width: 820px; font-size: clamp(34px,5vw,58px); line-height: 1.06; letter-spacing: -.055em; font-weight: 800; }
.tool-title em { color: var(--brand); font-style: normal; }
.tool-description { max-width: 660px; margin: 0 auto; color: var(--text-secondary); font-size: 17px; line-height: 1.55; }

.workspace { padding: 10px 0 86px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: 24px; align-items: start; }
.main-panel { min-width: 0; }
.tool-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 28px; box-shadow: var(--shadow-card); overflow: hidden; }
.tool-card::after { content: ""; pointer-events: none; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(150deg, rgba(255,255,255,0) 30%, rgba(112,99,255,.035)); }
.process-heading { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.process-heading h2 { margin: 0; letter-spacing: -.03em; font-size: 20px; font-weight: 760; }
.step-row { display: inline-flex; align-items: center; gap: 7px; color: var(--text-muted); font-size: 13px; font-weight: 600; }
.step { width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border-strong); background: var(--surface); font-size: 11px; font-weight: 700; }
.step.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.step-line { width: 22px; height: 1px; background: var(--border-strong); }

.upload-zone { position: relative; z-index: 1; min-height: 266px; border: 2px dashed var(--brand-border); border-radius: 20px; background: linear-gradient(135deg, rgba(244,243,255,.88), rgba(250,252,255,.9)); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; transition: .2s ease; }
.upload-zone:hover, .upload-zone.is-dragover, .upload-zone.dragover { border-color: var(--brand); background: #f5f4ff; box-shadow: inset 0 0 0 4px rgba(75,61,242,.04); }
.upload-icon { width: 54px; height: 54px; border-radius: 18px; background: var(--brand-light); display: grid; place-items: center; color: var(--brand); margin-bottom: 12px; }
.upload-icon svg { width: 28px; height: 28px; stroke-width: 1.65; }
.upload-title { font-size: 18px; margin: 0 0 4px; letter-spacing: -.02em; font-weight: 750; }
.upload-copy { margin: 0 0 15px; color: var(--text-secondary); font-size: 14px; }
.upload-button { display: inline-flex; align-items: center; gap: 9px; border: 0; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 11px 20px rgba(75,61,242,.2); border-radius: 12px; padding: 13px 18px; font-size: 14px; font-weight: 700; }
.upload-button:hover { transform: translateY(-1px); box-shadow: 0 14px 24px rgba(75,61,242,.25); }
.upload-limit { margin: 12px 0 0; color: var(--text-muted); font-size: 12px; }
.file-input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }

.file-state { position: relative; z-index: 2; display: none; }
.file-state.is-visible { display: block; }
.upload-zone.has-file { display: none; }
.file-list { display: grid; gap: 10px; margin-bottom: 20px; }
.file-item { display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--border); background: #fff; border-radius: 14px; }
.file-icon { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--brand); background: var(--brand-light); }
.file-icon.pdf { color: #e0576e; background: #fff1f3; }
.file-meta { min-width: 0; flex: 1; }
.file-name { display: block; color: var(--text-primary); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-info { display: block; color: var(--text-muted); font-size: 12px; margin-top: 3px; }
.file-remove { width: 34px; height: 34px; border: 0; background: transparent; color: var(--text-muted); border-radius: 10px; display: grid; place-items: center; transition: color .18s ease, background .18s ease; }
.file-remove:hover { color: #e74d65; background: #fff0f2; }

.settings { border-top: 1px solid var(--border); padding-top: 30px; }
.settings-title { font-size: 17px; letter-spacing: -.02em; margin: 0 0 18px; font-weight: 800; color: var(--text-primary); }
.setting-grid, .settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.field { padding: 18px 18px; border: 1px solid var(--border); background: #fbfcff; border-radius: 14px; }
.field.field-full { grid-column: 1 / -1; }
.field-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-primary); font-size: 13px; font-weight: 750; letter-spacing: .01em; margin-bottom: 12px; }
.field-value { color: var(--brand); }
.select, .text-input { width: 100%; border: 1px solid var(--border); background: #fff; border-radius: 10px; color: var(--text-primary); padding: 10px 11px; outline: none; transition: border-color .18s ease, box-shadow .18s ease; }
.select:focus, .text-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(75,61,242,.1); }
.range { width: 100%; accent-color: var(--brand); }
.choice-row { display: flex; gap: 7px; flex-wrap: wrap; }
.choice { border: 1px solid var(--border); background: #fff; border-radius: 9px; padding: 7px 10px; color: var(--text-secondary); font-size: 12px; font-weight: 700; transition: all .18s ease; }
.choice.is-selected, .choice:hover { border-color: #a49eff; color: var(--brand); background: var(--brand-light); }
.toggle { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.toggle input { appearance: none; width: 38px; height: 21px; background: #cfd5e4; border-radius: 99px; position: relative; transition: .2s; flex-shrink: 0; }
.toggle input::before { content: ""; position: absolute; width: 15px; height: 15px; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.12); transition: .2s; }
.toggle input:checked { background: var(--brand); }
.toggle input:checked::before { transform: translateX(17px); }

.tool-actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; }
.convert-button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; border: 0; border-radius: 13px; color: #fff; background: linear-gradient(135deg,var(--brand),var(--brand-2)); font-weight: 800; font-size: 15px; box-shadow: 0 12px 23px rgba(75,61,242,.22); transition: transform .18s ease, box-shadow .18s ease; }
.convert-button:hover { transform: translateY(-1px); box-shadow: 0 15px 27px rgba(75,61,242,.27); }
.add-more { width: 50px; height: 50px; border: 1px solid var(--border); background: #fff; color: var(--brand); display: grid; place-items: center; border-radius: 13px; transition: all .18s ease; }
.add-more:hover { border-color: #aaa4ff; background: var(--brand-light); }
.add-more svg { width: 20px; height: 20px; }
.btn-outline { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--brand); padding: 9px 13px; font-size: 13px; font-weight: 700; transition: border-color .18s ease, background .18s ease; }
.btn-outline:hover { border-color: var(--brand-border); background: var(--brand-light); }
.clear-button { flex: 0 0 auto; min-height: 50px; border: 1px solid var(--border); border-radius: 13px; padding: 0 16px; background: #fff; color: var(--text-secondary); font-weight: 750; transition: border-color .18s ease, color .18s ease, background .18s ease; }
.clear-button:hover { border-color: var(--brand-border); color: var(--brand); background: var(--brand-light); }
.logo-upload-zone { margin-top: 8px; display: grid; gap: 10px; }
.logo-upload-zone img { max-width: 90px; max-height: 54px; object-fit: contain; border: 1px solid var(--border); border-radius: 8px; padding: 6px; background: #fff; }
.processing { display: none; margin-top: 16px; border-radius: 13px; padding: 13px; color: var(--text-secondary); background: var(--surface-soft); font-size: 13px; align-items: center; gap: 10px; }
.processing.is-visible { display: flex; }
.processing i { width: 18px; height: 18px; border: 2px solid #d7d3ff; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
.progress-track, .progress-track-pdf { width: 100%; height: 8px; overflow: hidden; border-radius: 999px; background: #e9e8ff; }
.progress-fill, .progress-fill-pdf { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(135deg, var(--brand), var(--brand-2)); transition: width .2s ease; }
.progress-text { margin: 0; color: var(--text-secondary); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

.result-state { display: none; position: relative; z-index: 2; text-align: center; padding: 4px 0 2px; }
.result-state.is-visible { display: block; }
.result-icon { width: 58px; height: 58px; margin: 4px auto 10px; border-radius: 20px; color: var(--mint); background: rgba(59,185,163,.1); display: grid; place-items: center; }
.result-icon svg { width: 28px; height: 28px; stroke-width: 2; }
.result-title { font-size: 20px; letter-spacing: -.025em; margin: 0 0 5px; font-weight: 760; }
.result-copy { color: var(--text-secondary); font-size: 14px; margin: 0 0 18px; }
.result-summary { max-width: 500px; margin: 0 auto 18px; display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; }
.result-summary span { display: block; padding: 11px 8px; color: var(--text-muted); font-size: 11px; border-right: 1px solid var(--border); text-align: center; }
.result-summary span:last-child { border-right: 0; }
.result-summary strong { display: block; color: var(--text-primary); font-size: 13px; margin-top: 2px; font-weight: 700; }
.download-button { display: inline-flex; align-items: center; gap: 9px; border: 0; border-radius: 12px; padding: 13px 18px; color: #fff; background: var(--brand); font-weight: 800; box-shadow: 0 8px 16px rgba(75,61,242,.18); transition: all .18s ease; }
.download-button:hover { background: var(--brand-hover); transform: translateY(-1px); }
.download-button svg { width: 18px; height: 18px; }
.start-over { display: block; border: 0; background: transparent; color: var(--brand); margin: 11px auto 0; font-size: 13px; font-weight: 700; transition: opacity .18s ease; }
.start-over:hover { opacity: .8; }
.result-card { display: grid; gap: 8px; padding: 13px; border: 1px solid var(--border); border-radius: 14px; background: #fff; text-align: left; }
.result-card img { width: 100%; max-height: 180px; object-fit: contain; border-radius: 10px; background: var(--surface-soft); }
.result-card__name { color: var(--text-primary); font-weight: 700; overflow-wrap: anywhere; }
.result-card__size { color: var(--text-muted); font-size: 12px; }
.result-state .file-list { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 0 0 18px; }

.resize-inputs, .toggle-row, .watermark-grid { display: grid; gap: 10px; }
.resize-inputs { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; }
.resize-separator { color: var(--text-muted); font-weight: 800; }
.toggle-row { grid-template-columns: auto 1fr; align-items: center; color: var(--text-secondary); font-size: 13px; }
.toggle-row .toggle { width: 38px; height: 21px; }
.toggle-label { color: var(--text-primary); font-size: 14px; font-weight: 600; }
.sub-label { color: var(--text-secondary); font-size: 13px; }
.watermark-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sub-control { margin-top: 6px; }
.bg-color-picker { width: 46px; height: 38px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.info-callout { margin-top: 10px; padding: 11px 12px; border: 1px solid #dfe7ff; border-radius: 12px; background: #f7f9ff; color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.seo-list { margin: 14px 0 0; padding-left: 20px; color: var(--text-secondary); line-height: 1.65; }
.seo-list li + li { margin-top: 6px; }
.comparison-table { width: 100%; margin-top: 14px; border-collapse: collapse; overflow: hidden; border-radius: 14px; font-size: 13px; }
.comparison-table th, .comparison-table td { padding: 11px 12px; border: 1px solid var(--border); text-align: left; }
.comparison-table th { background: var(--surface-soft); color: var(--text-primary); }

.pdf-file-item { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.pdf-file-item__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #fff1f3; color: #e0576e; }
.pdf-file-item__info { min-width: 0; }
.pdf-file-item__name { overflow: hidden; color: var(--text-primary); font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.pdf-file-item__size { margin-top: 3px; color: var(--text-muted); font-size: 12px; }
.page-preview-grid { margin-top: 18px; }
.pages-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.page-thumb { position: relative; min-height: 164px; padding: 8px; border: 2px solid var(--border); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.page-thumb.selected { border-color: var(--brand-border); box-shadow: 0 8px 20px rgba(75,61,242,.12); }
.page-thumb:hover { transform: translateY(-2px); }
.page-thumb canvas { display: block; width: 100%; border-radius: 8px; background: var(--surface-soft); }
.page-thumb__label, .page-thumb__rotate-badge { position: absolute; left: 8px; bottom: 8px; display: grid; min-width: 24px; height: 24px; place-items: center; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; }
.page-thumb__rotate-badge { left: auto; right: 8px; background: var(--mint); }
.page-thumb__controls { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity .18s ease; }
.page-thumb:hover .page-thumb__controls { opacity: 1; }
.page-thumb__btn { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--brand); font-weight: 800; }
.page-thumb__btn.delete { color: #e74d65; }
.result-box { display: grid; justify-items: center; gap: 12px; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-soft); }
.result-box__title { margin: 0; color: var(--text-primary); font-weight: 800; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 15px; border-radius: 12px; font-weight: 800; }
.btn--primary { color: #fff; background: var(--brand); }
.btn--ghost { color: var(--text-primary); background: var(--surface-soft); border: 1px solid var(--border-strong); cursor: pointer; }
.btn--ghost:hover { border-color: var(--brand-border); color: var(--brand-2); background: var(--surface); }
.btn--yandex { color: #fff; background: #1a1a1a; border: 1px solid #2a2a2a; }
.btn--yandex:hover { background: #000; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
/* Личный кабинет */
.account-card { max-width: 640px; margin: 0 auto; }
.account-signin, .account-upsell { border: 1px solid var(--border); border-radius: var(--radius-xl,18px); background: var(--surface,#fff); padding: 28px; box-shadow: var(--shadow-card); }
.account-signin h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.03em; }
.account-signin p, .account-upsell p { color: var(--text-secondary); line-height: 1.6; margin: 0 0 16px; }
.account-note { font-size: 13px; color: var(--text-muted); margin: 12px 0 0 !important; }
.account-profile { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: var(--radius-xl,18px); background: var(--surface,#fff); padding: 22px 24px; box-shadow: var(--shadow-card); }
.account-ava { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.account-ava--ph { display: inline-flex; align-items: center; justify-content: center; background: var(--brand-light); color: var(--brand); font-weight: 800; font-size: 26px; }
.account-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.account-id b { font-size: 18px; color: var(--text-primary); }
.account-id span { color: var(--text-secondary); font-size: 14px; }
.account-plan { align-self: flex-start; margin-top: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 750; }
.account-plan--free { background: var(--brand-light); color: var(--brand); }
.account-plan--pro { background: #fff3d6; color: #9a6b00; }
.account-logout { margin-left: auto; }
.account-upsell { margin-top: 16px; }
.account-upsell h3 { margin: 0 0 8px; font-size: 18px; }
@media (max-width:560px){ .account-logout { margin-left: 0; } }
.btn--large { min-height: 50px; padding: 0 20px; }
/* Mermaid diagram tool */
.mmd-preview { width: 100%; max-width: 100%; min-height: 160px; max-height: 72vh; display: flex; align-items: center; justify-content: center; overflow: auto; background: radial-gradient(circle at 1px 1px, rgba(15,15,20,.06) 1px, #fff 1px) 0 0 / 22px 22px, #fff; border: 1px solid var(--border-strong); border-radius: 18px; padding: 28px; box-shadow: 0 10px 30px -16px rgba(0,0,0,.45); }
.mmd-preview svg { width: 100% !important; max-width: 620px !important; height: auto; display: block; margin: 0 auto; }
.mmd-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; }
.mmd-actions .btn { min-width: 180px; }

/* Content pages */
.content-hero { padding: 54px 0 24px; text-align: center; }
.content-kicker { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; color: #5a6380; background: var(--brand-light); font-size: 12px; font-weight: 700; }
.content-title { max-width: 820px; margin: 15px auto 10px; font-size: clamp(34px,5vw,58px); line-height: 1.06; letter-spacing: -.055em; font-weight: 800; }
.content-title em { color: var(--brand); font-style: normal; }
.content-lead { max-width: 700px; margin: 0 auto; color: var(--text-secondary); font-size: 17px; line-height: 1.6; }
.content-page { padding: 18px 0 82px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.content-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 28px; box-shadow: var(--shadow-card); }
.content-card + .content-card { margin-top: 18px; }
.content-card h2 { margin: 0 0 12px; font-size: 24px; letter-spacing: -.035em; }
.content-card h3 { margin: 20px 0 8px; font-size: 17px; letter-spacing: -.02em; }
.content-card p, .content-card li { color: var(--text-secondary); line-height: 1.65; }
.content-card ul, .content-card ol { margin: 12px 0 0; padding-left: 20px; }
.form-grid { display: grid; gap: 12px; }
.form-grid .field { display: block; }
.text-area { width: 100%; min-height: 132px; resize: vertical; border: 1px solid var(--border); background: #fff; border-radius: 10px; color: var(--text-primary); padding: 10px 11px; outline: none; transition: border-color .18s ease, box-shadow .18s ease; }
.text-area:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(75,61,242,.1); }
.content-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.directory-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 24px auto 0; }
.directory-tabs a { display: inline-flex; min-height: 36px; align-items: center; border: 1px solid var(--border); border-radius: 999px; padding: 0 13px; color: var(--text-secondary); background: #fff; font-size: 12px; font-weight: 750; }
.directory-tabs a:hover { border-color: var(--brand-border); color: var(--brand); background: var(--brand-light); }
/* Catalog filter bar (search + categories) */
.tools-filterbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 16px; margin: 26px auto 0; max-width: 760px; }
.tools-search { flex: 1 1 280px; min-width: 240px; }
.tools-search input { width: 100%; height: 44px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--text-primary); font-size: 14px; font-family: inherit; transition: border-color .18s ease, box-shadow .18s ease; }
.tools-search input::placeholder { color: var(--text-muted); }
.tools-search input:focus { outline: none; border-color: var(--brand-border); box-shadow: 0 0 0 3px var(--brand-light); }
.tools-cats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tools-cat { display: inline-flex; min-height: 36px; align-items: center; border: 1px solid var(--border); border-radius: 999px; padding: 0 14px; color: var(--text-secondary); background: #fff; font-size: 12px; font-weight: 750; font-family: inherit; cursor: pointer; transition: border-color .18s ease, color .18s ease, background .18s ease; }
.tools-cat:hover { border-color: var(--brand-border); color: var(--brand); }
.tools-cat.is-active { border-color: var(--brand); color: #fff; background: var(--brand); }
.tools-empty { margin: 8px 0 0; padding: 28px 16px; text-align: center; color: var(--text-secondary); font-size: 15px; }
.tool-directory { display: grid; gap: 18px; }
.tool-section-title { margin: 0 0 14px; font-size: 22px; letter-spacing: -.035em; }
.tool-directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tool-link-card { display: grid; gap: 7px; min-height: 126px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: #fff; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.tool-link-card:hover { transform: translateY(-2px); border-color: #d4d1ff; box-shadow: var(--shadow-card); }
.tool-link-card b { color: var(--text-primary); font-size: 15px; }
.tool-link-card span { color: var(--text-secondary); font-size: 12px; line-height: 1.45; }
.tool-link-card i { margin-top: auto; color: var(--brand); font-style: normal; font-size: 12px; font-weight: 800; }

/* PDF catalog */
.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.tools-grid .tool-card { display: grid; gap: 10px; color: var(--text-primary); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.tools-grid .tool-card:hover { transform: translateY(-2px); border-color: #d4d1ff; box-shadow: var(--shadow-upload); }
.tool-card--highlight { border-color: #c9c5ff; background: linear-gradient(135deg, #fff, #f7f5ff); }
.tool-card__icon-wrap { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--brand-light); color: var(--brand); }
.tool-card__arrow { justify-self: end; color: var(--brand); font-weight: 800; }

/* Sidebar */
.sidebar { display: grid; gap: 14px; position: sticky; top: 96px; }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; box-shadow: 0 6px 18px rgba(38,48,112,.035); }
.side-card h3 { margin: 0 0 12px; font-size: 15px; letter-spacing: -.02em; font-weight: 750; }
.side-links { display: grid; gap: 4px; }
.side-links a { padding: 8px 9px; border-radius: 9px; color: var(--text-secondary); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 8px; transition: all .18s ease; }
.side-links a:hover { color: var(--brand); background: var(--brand-light); }
.side-links svg { width: 14px; height: 14px; flex-shrink: 0; }
.side-card--safe { background: linear-gradient(135deg,#f1fbf9,#f8fffd); border-color: #d6f3ea; }
.safe-line { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0; color: #4c6b6a; font-size: 12px; line-height: 1.45; }
.safe-line svg { color: var(--mint); width: 14px; height: 14px; margin-top: 2px; flex-shrink: 0; }
.sidebar-note { color: var(--text-muted); font-size: 12px; line-height: 1.5; }

/* Trust row for tool pages */
.trust-row { padding: 0 0 72px; }
.trust-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.trust-item { display: flex; gap: 12px; align-items: flex-start; }
.trust-icon { width: 39px; height: 39px; flex: 0 0 39px; display: grid; place-items: center; border-radius: 12px; color: var(--brand); background: var(--brand-light); }
.trust-icon svg { width: 18px; height: 18px; }
.trust-item h3 { margin: 1px 0 3px; font-size: 14px; letter-spacing: -.02em; font-weight: 750; color: var(--text-primary); }
.trust-item p { margin: 0; color: var(--text-secondary); font-size: 12px; line-height: 1.45; }

/* Info section / FAQ */
.info-section { padding: 58px 0 76px; border-top: 1px solid var(--border); background: #fff; }
.info-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: start; }
.info-section h2 { font-size: clamp(24px,3vw,32px); letter-spacing: -.04em; margin: 0 0 14px; font-weight: 780; color: var(--text-primary); }
.info-section p { color: var(--text-secondary); line-height: 1.65; margin-bottom: 12px; }
.faq { display: grid; gap: 8px; }
.faq details { border: 1px solid var(--border); border-radius: 12px; padding: 0 15px; background: #fff; transition: border-color .18s ease; }
.faq details[open] { border-color: #cfd1ea; }
.faq summary { padding: 14px 0; color: var(--text-primary); font-weight: 700; cursor: pointer; list-style: none; font-size: 14px; transition: color .18s ease; }
.faq summary:hover { color: var(--brand); }
.faq summary::-webkit-details-marker { display: none; }
.faq p { padding-bottom: 14px; margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-secondary); }

/* Dark theme for tool pages */
.theme-night .tool-card { background: var(--surface); }
.theme-night .upload-zone { background: linear-gradient(135deg, rgba(35,39,69,.88), rgba(27,30,56,.9)); border-color: #4a42c4; }
.theme-night .upload-zone:hover { background: #1e2040; }
.theme-night .file-item { background: var(--surface); }
.theme-night .select, .theme-night .text-input { background: var(--surface); color: var(--text-primary); border-color: var(--border); }
.theme-night .choice { background: var(--surface); color: var(--text-secondary); border-color: var(--border); }
.theme-night .side-card { background: var(--surface); border-color: var(--border); }
.theme-night .info-section { background: var(--surface-soft); }
.theme-night .faq details { background: var(--surface); border-color: var(--border); }
.theme-night .result-summary { background: var(--surface); }
.theme-night .process-heading h2, .theme-night .settings-title, .theme-night .upload-title, .theme-night .result-title, .theme-night .side-card h3, .theme-night .trust-item h3, .theme-night .faq summary, .theme-night .info-section h2 { color: var(--text-primary); }
.theme-night .site-footer { background: #171a31; border-color: var(--border); }
.theme-night .footer-links h3 { color: var(--text-primary); }

@media (max-width: 1040px) {
  .desktop-nav { display: none; }
  .header-actions { margin-left: auto; }
  .menu-button { display: inline-flex; }
  .mobile-nav { display: grid; position: fixed; z-index: 49; top: 78px; left: 0; right: 0; gap: 7px; padding: 14px 24px 21px; border-bottom: 1px solid var(--border); background: rgba(252,252,255,.98); box-shadow: 0 18px 30px rgba(39, 43, 100, .08); transform: translateY(-125%); opacity: 0; pointer-events: none; transition: transform .24s ease, opacity .24s ease; }
  .theme-night .mobile-nav { background: rgba(18,20,40,.98); }
  .mobile-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .mobile-nav a { padding: 10px 12px; border-radius: 10px; color: var(--text-secondary); font-size: 14px; font-weight: 700; }
  .mobile-nav a:hover { color: var(--brand); background: var(--brand-light); }
  .workspace-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .trust-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 720px) {
  .container { width: min(100% - 32px, var(--container)); }
  .header__inner { min-height: 66px; }
  .brand__name { font-size: 20px; }
  .header-actions .icon-button { display: none; }
  .menu-button { display: inline-flex; }
  .mobile-nav { top: 66px; }
  .tool-hero { padding: 32px 0 23px; }
  .tool-description { font-size: 15px; }
  .tool-card { padding: 16px; border-radius: 20px; }
  .process-heading { align-items: flex-start; }
  .step-row { display: none; }
  .upload-zone { min-height: 245px; padding: 24px 15px; }
  .upload-button { width: 100%; justify-content: center; }
  .setting-grid, .settings-grid { grid-template-columns: 1fr; }
  .field.field-full { grid-column: auto; }
  .tool-actions { flex-wrap: wrap; }
  .convert-button { width: 100%; flex: auto; }
  .add-more { order: -1; width: 100%; display: flex; justify-content: center; gap: 8px; }
  .add-more::after { content: "Добавить файлы"; font-size: 13px; font-weight: 700; }
  .sidebar { grid-template-columns: 1fr; }
  .result-summary { grid-template-columns: 1fr; }
  .result-summary span { border-right: 0; border-bottom: 1px solid var(--border); }
  .result-summary span:last-child { border-bottom: 0; }
  .trust-grid { grid-template-columns: 1fr; gap: 2px; }
  .trust-row { padding-bottom: 46px; }
  .info-grid, .footer__grid { grid-template-columns: 1fr; gap: 25px; }
  .content-grid { grid-template-columns: 1fr; }
  .tool-directory-grid { grid-template-columns: 1fr 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .watermark-grid { grid-template-columns: 1fr; }
  .info-section { padding: 44px 0; }
  .footer-social { display: flex; justify-content: space-between; }
  .footer-brand, .footer-social { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .tool-directory-grid { grid-template-columns: 1fr; }
  .content-card { padding: 18px; border-radius: 20px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form button { width: 100%; }
}

/* ===== Per-page uniqueness: accent themes (data-accent) ===== */
body[data-accent="emerald"]{--brand:#0f9d6e;--brand-2:#1cc08a;--brand-hover:#0c7d57;--brand-light:#e3f7ef;--brand-border:#4fcfa3;}
body[data-accent="amber"]  {--brand:#d9820a;--brand-2:#f0a02e;--brand-hover:#b56a06;--brand-light:#fdf0db;--brand-border:#f0b964;}
body[data-accent="rose"]   {--brand:#e0436b;--brand-2:#f56a8c;--brand-hover:#c12f56;--brand-light:#fde7ed;--brand-border:#f58aa3;}
body[data-accent="cyan"]   {--brand:#0e9fc4;--brand-2:#2cc0e0;--brand-hover:#0b7e9c;--brand-light:#e0f5fb;--brand-border:#5fcde6;}
body[data-accent="violet"] {--brand:#7b3ff2;--brand-2:#9a6bff;--brand-hover:#6325d5;--brand-light:#f0eaff;--brand-border:#a98aff;}
body[data-accent="teal"]   {--brand:#0d9488;--brand-2:#19b3a4;--brand-hover:#0a766c;--brand-light:#e0f5f2;--brand-border:#4fc8bb;}
body[data-accent="orange"] {--brand:#e2580c;--brand-2:#f57a33;--brand-hover:#bd4708;--brand-light:#fdeae0;--brand-border:#f59a6a;}
/* indigo = default (:root) */

/* ===== Hero layout variants (data-hero) ===== */
body[data-hero="hero-centered"] .tool-hero .container{text-align:center;}
body[data-hero="hero-centered"] .tool-hero .breadcrumbs{justify-content:flex-start;}
body[data-hero="hero-centered"] .tool-hero .tool-description{margin-left:auto;margin-right:auto;max-width:640px;}
body[data-hero="hero-stacked"] .tool-hero{padding-top:48px;}
body[data-hero="hero-stacked"] .tool-hero .tool-kicker{display:inline-flex;}
body[data-hero="hero-stacked"] .tool-hero .tool-title{font-size:clamp(30px,5vw,46px);}

/* ===== FAQ accordion (initFAQ: .faq-question toggles .faq-item.open) ===== */
.faq-list{display:flex;flex-direction:column;gap:12px;margin-top:20px;}
.faq-item{border:1px solid var(--border);border-radius:var(--radius-md,14px);background:var(--surface,#fff);overflow:hidden;}
.faq-question{width:100%;text-align:left;background:none;border:0;padding:16px 18px;font-size:16px;font-weight:600;color:var(--text-primary);cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:12px;}
.faq-question::after{content:"+";font-size:22px;color:var(--brand);transition:transform .2s;}
.faq-item.open .faq-question::after{content:"–";}
.faq-answer{max-height:0;overflow:hidden;transition:max-height .25s ease;padding:0 18px;color:var(--text-secondary);}
.faq-item.open .faq-answer{max-height:600px;padding:0 18px 18px;}

/* ===== Generated content sections ===== */
.content-section{margin-top:18px;}
.content-section h2{font-size:clamp(22px,3vw,28px);margin:28px 0 10px;}
.content-section p{color:var(--text-secondary);line-height:1.8;margin:16px 0;}
.howto-steps{counter-reset:step;list-style:none;padding:0;margin:16px 0;display:flex;flex-direction:column;gap:12px;}
.howto-steps li{counter-increment:step;position:relative;padding-left:46px;color:var(--text-secondary);line-height:1.6;}
.howto-steps li::before{content:counter(step);position:absolute;left:0;top:-2px;width:32px;height:32px;border-radius:50%;background:var(--brand-light);color:var(--brand-hover);font-weight:700;display:flex;align-items:center;justify-content:center;}

/* ===== New tools: controls ===== */
.tool-controls{margin:16px 0;padding:16px;border:1px solid var(--border);border-radius:var(--radius-md,14px);background:var(--surface-soft,#f7f7fb);display:flex;flex-wrap:wrap;gap:12px;align-items:center;}
.tool-controls .field-label{font-weight:600;margin-right:8px;}
.main-panel [data-role="result"]{margin-top:16px;}
.upload-hint{color:var(--text-secondary);font-size:14px;margin-top:8px;}

/* ===== Blog ===== */
.article{max-width:760px;margin:0 auto;padding:40px 16px 72px;}
.article h1{font-size:clamp(28px,4vw,40px);margin:12px 0 20px;line-height:1.2;}
.article-lead{font-size:19px;color:var(--text-primary);font-weight:500;line-height:1.65;margin-bottom:26px;}
.article-body h2{font-size:clamp(21px,3vw,27px);margin:54px 0 16px;}
.article-body p{color:var(--text-secondary);line-height:1.8;margin:18px 0;}
.article-list{margin:16px 0 16px 4px;padding-left:22px;color:var(--text-secondary);line-height:1.8;}
.article-list li{margin:9px 0;}
.article-cta{margin:36px 0;padding:20px;background:var(--brand-light);border-radius:var(--radius-lg,18px);text-align:center;}
.article-takeaway{margin-top:48px;padding:18px 20px;border-left:4px solid var(--brand);background:var(--surface-soft,#f7f7fb);border-radius:0 12px 12px 0;font-weight:500;color:var(--text-primary);}
.blog-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px;margin:24px 0;}
.blog-card{display:flex;flex-direction:column;gap:8px;padding:20px;border:1px solid var(--border);border-radius:var(--radius-lg,18px);background:var(--surface,#fff);text-decoration:none;transition:border-color .15s,transform .15s;}
.blog-card:hover{border-color:var(--brand-border);transform:translateY(-2px);}
.blog-card b{font-size:17px;color:var(--text-primary);line-height:1.35;}
.blog-card span{font-size:14px;color:var(--text-secondary);line-height:1.5;}
/* Comparison tables + pros-cons (Mistral-обогащение контента) */
.md-table-wrap{overflow-x:auto;margin:22px 0;border:1px solid var(--border-strong);border-radius:14px;box-shadow:0 6px 22px -14px rgba(0,0,0,.5);}
.md-table{width:100%;border-collapse:collapse;font-size:15px;}
.md-table caption{caption-side:top;text-align:left;padding:16px 18px;color:var(--text-primary);font-size:15px;font-weight:650;line-height:1.45;letter-spacing:-.01em;border-bottom:1px solid var(--border);background:linear-gradient(180deg,var(--surface-soft),var(--surface));}
.md-table th,.md-table td{padding:14px 16px;text-align:left;border-bottom:1px solid var(--border);color:var(--text-secondary);line-height:1.5;vertical-align:top;}
.md-table thead th{padding-top:16px;padding-bottom:16px;background:var(--surface-soft,#f7f7fb);color:var(--brand-2);font-weight:800;font-size:13px;letter-spacing:.03em;text-transform:uppercase;border-bottom:2px solid var(--brand-border);}
.md-table tbody tr:nth-child(even) td{background:rgba(255,255,255,.022);}
.md-table tbody tr:hover td{background:var(--brand-light);}
.md-table tbody tr:last-child td{border-bottom:0;}
.md-table tbody td:first-child{color:var(--text-primary);font-weight:700;box-shadow:inset 3px 0 0 transparent;}
.md-table tbody tr:hover td:first-child{box-shadow:inset 3px 0 0 var(--brand-2);}
.proscons{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:22px 0;}
.proscons__col{border:1px solid var(--border-strong);border-radius:14px;padding:16px 18px 18px;background:var(--surface,#fff);}
.proscons__col--pro{border-color:rgba(34,197,94,.38);background:linear-gradient(180deg,rgba(34,197,94,.07),transparent 60%);}
.proscons__col--con{border-color:rgba(210,59,59,.38);background:linear-gradient(180deg,rgba(210,59,59,.07),transparent 60%);}
.proscons__col b{display:block;margin-bottom:12px;font-size:15px;font-weight:750;}
.proscons__col--pro b{color:#22c55e;}
.proscons__col--con b{color:#ff5b5b;}
.proscons__col ul{margin:0;padding:0;list-style:none;}
.proscons__col li{position:relative;margin:9px 0;padding-left:24px;color:var(--text-secondary);line-height:1.55;}
.proscons__col li::before{content:"";position:absolute;left:4px;top:.55em;width:8px;height:8px;border-radius:50%;}
.proscons__col--pro li::before{background:linear-gradient(135deg,#22c55e,#16a34a);box-shadow:0 0 8px -1px rgba(34,197,94,.7);}
.proscons__col--con li::before{background:linear-gradient(135deg,#ff5b5b,#d23b3b);box-shadow:0 0 8px -1px rgba(210,59,59,.6);}
@media (max-width:640px){.proscons{grid-template-columns:1fr;}}

/* ============================================================
   THEME v2 — айдентика 5на5: бумага · чернила · Unbounded · lime-spark
   ============================================================ */
:root{
  --paper:#f5f1e8; --ink:#1a1a22; --spark:#b6f23a;
  --page-bg:#f5f1e8;
  --surface:#fffdf8;
  --surface-soft:#efeadd;
  --surface-blue:#eaf1ff; --surface-mint:#e6f5ee; --surface-violet:#f0eaff;
  --text-primary:#1a1a22;
  --text-secondary:#5c594f;
  --text-muted:#8b8778;
  --border:#e6dfce;
  --border-strong:#d4ccb4;
  --brand:#0e8c63; --brand-2:#16a877; --brand-hover:#0b7150; --brand-light:#e2f3ec; --brand-border:#5cc49e;
  --shadow-card:0 1px 0 #e6dfce, 0 14px 34px -20px rgba(26,26,34,.28);
}
/* honour indigo accent explicitly (default :root is now jade) */
body[data-accent="indigo"]{--brand:#4b3df2;--brand-2:#7769ff;--brand-hover:#3d30d5;--brand-light:#edebff;--brand-border:#8179ff;}
body{background:var(--paper);color:var(--text-primary);}
/* display font */
.brand__name,#hero-title,.hero h1,.tool-title,h1{font-family:'Unbounded','Onest',system-ui,sans-serif;letter-spacing:-.02em;font-weight:800;}
.hero h2,.popular h2,.tool-panels h2,section.section>h2{font-family:'Unbounded','Onest',sans-serif;letter-spacing:-.01em;}
/* brand mark: ink chip with 5×5 dot grid + lime spark */
.brand__mark{position:relative;width:30px;height:30px;border-radius:9px;background:var(--ink);
  background-image:radial-gradient(rgba(245,241,232,.9) 1.05px,transparent 1.25px);
  background-size:6px 6px;background-position:4px 4px;box-shadow:0 5px 14px -5px rgba(26,26,34,.55);}
.brand__mark i{display:none!important;}
.brand__mark::after{content:"";position:absolute;right:5px;bottom:5px;width:6px;height:6px;border-radius:2px;background:var(--spark);}
.brand__name{font-size:19px;letter-spacing:-.03em;}
/* header glass on paper */
.site-header{background:rgba(245,241,232,.82);backdrop-filter:saturate(1.3) blur(10px);border-bottom:1px solid var(--border);}
/* hero atmosphere: faded dot grid */
.hero::before,.tool-hero::before{content:"";position:absolute;inset:0;pointer-events:none;z-index:0;
  background-image:radial-gradient(var(--border-strong) 1px,transparent 1.4px);background-size:24px 24px;
  -webkit-mask-image:linear-gradient(180deg,#000,transparent 72%);mask-image:linear-gradient(180deg,#000,transparent 72%);opacity:.45;}
.hero,.tool-hero{position:relative;}
.hero>.container,.tool-hero>.container{position:relative;z-index:1;}
/* buttons */
.btn--primary,.convert-button{border-radius:12px;font-weight:700;box-shadow:0 8px 20px -10px var(--brand);}
.btn--primary:hover,.convert-button:hover{transform:translateY(-1px);}
/* spark details */
::selection{background:var(--spark);color:var(--ink);}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:2.5px solid var(--spark);outline-offset:2px;border-radius:4px;}

/* ===== Smart tool search (homepage) ===== */
.tool-search{position:relative;max-width:580px;margin:20px auto 4px;}
.tool-search__field{display:flex;align-items:center;gap:11px;background:var(--surface);border:1.5px solid var(--border-strong);border-radius:15px;padding:0 16px;box-shadow:var(--shadow-card);transition:border-color .15s;}
.tool-search__field:focus-within{border-color:var(--brand-border);box-shadow:var(--shadow-card),0 0 0 3px var(--brand-light);transition:border-color .15s,box-shadow .15s;}
.tool-search input:focus,.tool-search input:focus-visible{outline:none;}
.tool-search__field>svg{width:20px;height:20px;color:var(--text-secondary);flex:none;}
.tool-search input{flex:1;border:0;background:none;padding:16px 0;font-size:16px;color:var(--ink);outline:none;font-family:inherit;}
.ts-results{position:absolute;left:0;right:0;top:calc(100% + 8px);background:var(--surface);border:1px solid var(--border);border-radius:15px;box-shadow:0 24px 56px -22px rgba(26,26,34,.45);overflow:hidden;display:none;z-index:40;text-align:left;}
.ts-results.is-open{display:block;}
.ts-item{display:block;padding:12px 16px;border-bottom:1px solid var(--border);text-decoration:none;}
.ts-item:last-child{border-bottom:0;}
.ts-item:hover{background:var(--brand-light);}
.ts-item b{display:block;color:var(--ink);font-size:15px;font-weight:600;}
.ts-item span{display:block;color:var(--text-secondary);font-size:13px;margin-top:2px;}
.ts-empty{padding:16px;color:var(--text-secondary);font-size:14px;}

/* override inherited hardcoded indigo gradients -> brand (identity) */
.hero h1 span{background:linear-gradient(120deg,var(--brand),var(--brand-2)) !important;-webkit-background-clip:text;background-clip:text;color:transparent;}
.select-file-button{background:linear-gradient(120deg,var(--brand),var(--brand-2)) !important;box-shadow:0 10px 20px -8px var(--brand) !important;}

/* ===== Blog v2 ===== */
.article-meta{color:var(--text-muted);font-size:14px;margin:4px 0 2px;}
.article-toc{margin:44px 0;padding:20px 22px;background:var(--surface-soft,#efeadd);border-radius:var(--radius-md,14px);border:1px solid var(--border);}
.article-toc b{font-size:14px;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted);}
.article-toc ul{margin:8px 0 0;padding-left:18px;}
.article-toc a{color:var(--brand-hover);text-decoration:none;line-height:1.9;}
.article-toc a:hover{text-decoration:underline;}
.article-share{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:44px 0;padding:18px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border);}
.article-share span{font-weight:600;}
.article-share a,.article-share .copy-link{font-size:14px;color:var(--brand-hover);background:var(--brand-light);border:0;border-radius:9px;padding:7px 13px;text-decoration:none;cursor:pointer;font-family:inherit;}
.article-share a:hover,.article-share .copy-link:hover{background:var(--brand-border);color:#fff;}
.article-related{margin-top:60px;}
.article-related h2{font-size:22px;margin-bottom:14px;}

/* ===== Blog v2: автор + структура ссылок ===== */
.article-cat{display:inline-block;background:var(--brand-light);color:var(--brand-hover);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;padding:3px 9px;border-radius:7px;margin-right:8px;}
.author-avatar{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:50%;background:var(--ink,#1a1a22);color:var(--spark,#b6f23a);font-weight:800;font-size:15px;flex:none;font-family:'Unbounded',sans-serif;}
.author-avatar.lg{width:56px;height:56px;font-size:19px;}
.author-avatar.xl{width:84px;height:84px;font-size:28px;border-radius:22px;}
.article-byline{display:flex;align-items:center;gap:12px;margin:30px 0 44px;}
.article-byline .author-name{font-weight:700;color:var(--text-primary);text-decoration:none;display:block;}
.article-byline span{font-size:13px;color:var(--text-muted);}
.author-name:hover{color:var(--brand-hover);}
.author-card{display:flex;gap:16px;align-items:flex-start;margin:52px 0;padding:24px;background:var(--surface-soft,#efeadd);border:1px solid var(--border);border-radius:var(--radius-lg,18px);}
.author-card .author-name{font-size:17px;font-weight:700;color:var(--text-primary);text-decoration:none;}
.author-card p{margin:6px 0 8px;color:var(--text-secondary);line-height:1.6;font-size:15px;}
.author-more{font-size:14px;color:var(--brand-hover);text-decoration:none;font-weight:600;}
.author-hero{display:flex;gap:22px;align-items:center;flex-wrap:wrap;margin-top:8px;}
.author-role{color:var(--brand-hover);font-weight:600;margin:2px 0 8px;}
.article-nav{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:44px 0;}
.article-nav a{display:flex;flex-direction:column;gap:4px;padding:16px;border:1px solid var(--border);border-radius:var(--radius-md,14px);text-decoration:none;background:var(--surface);}
.article-nav a:hover{border-color:var(--brand-border);}
.article-nav a.next{text-align:right;}
.article-nav span{font-size:13px;color:var(--text-muted);}
.article-nav b{color:var(--text-primary);font-size:15px;line-height:1.35;}
.blog-back{margin-top:40px;}
.blog-back a{color:var(--brand-hover);text-decoration:none;font-weight:600;}
@media(max-width:560px){.article-nav{grid-template-columns:1fr;}.article-nav a.next{text-align:left;}}

/* ============================================================
   THEME v3 — FERRARI DARK (реф dev.5na5.ru): #cc0000 / #ff2800, glow, Inter + JetBrains Mono
   ============================================================ */
:root{
  --paper:#0e0e11; --ink:#f0f0f2; --spark:#ff2800;
  --page-bg:#0e0e11;
  --surface:#17171b;
  --surface-soft:#1d1d22;
  --surface-blue:#161a22; --surface-mint:#14201c; --surface-violet:#1c1622;
  --text-primary:#ececef;
  --text-secondary:#a6a6ad;
  --text-muted:#74747c;
  --border:#2a2a31;
  --border-strong:#3a3a43;
  --brand:#cc0000; --brand-2:#ff2800; --brand-hover:#ff3b2a; --brand-light:rgba(204,0,0,.15); --brand-border:rgba(255,40,0,.55);
  --ferrari-glow:rgba(204,0,0,.42);
  --shadow-card:0 1px 0 rgba(255,255,255,.03), 0 18px 40px -22px rgba(0,0,0,.8);
}
/* unify all per-page accents to Ferrari */
body[data-accent]{--brand:#cc0000;--brand-2:#ff2800;--brand-hover:#ff3b2a;--brand-light:rgba(204,0,0,.15);--brand-border:rgba(255,40,0,.55);}
body{background:var(--page-bg);color:var(--text-primary);}

/* fonts: Inter body + JetBrains Mono accents/display */
body,.hero__lead,.tool-description,p,input,textarea,button,.select,.btn{font-family:'Inter','Onest',system-ui,-apple-system,sans-serif;}
.brand__name,#hero-title,.hero h1,.tool-title,h1,h2,.tool-kicker,.article-cat,.author-avatar,.section-eyebrow{font-family:'JetBrains Mono','Inter',ui-monospace,monospace;letter-spacing:-.01em;}
h1,.tool-title,#hero-title,.hero h1{font-weight:800;letter-spacing:-.02em;}

/* surfaces -> dark (hardcoded-light components) */
.site-header{background:rgba(14,14,17,.82)!important;backdrop-filter:saturate(1.2) blur(12px);border-bottom:1px solid var(--border);}
.upload-card,.home-converter,.tool-card,.main-panel,.side-card,.result-box,.result-state,.info-section,.faq-item,.trust-item,
.nav-drop__menu,.mobile-nav,.tool-search__field,.ts-results,.ts-item,.file-list,.pdf-file-item,.choice,.blog-card,.author-card,
.article-toc,.tool-controls,.tool-link-card,.article-nav a,.upload-zone,.workspace .container>div,.popular .card,.tool-panels .card,
.field{
  background:var(--surface)!important;border-color:var(--border)!important;color:var(--text-primary);}
.select,.text-input,.range,input[type=text],input[type=search],input[type=email],textarea,.bg-color-picker{
  background:var(--surface-soft)!important;border-color:var(--border-strong)!important;color:var(--text-primary)!important;}
.upload-zone,.dropzone,#dropZone,[data-role="drop"]{border:2px dashed var(--border-strong)!important;background:var(--surface-soft)!important;}
.ts-item:hover,.tool-link-card:hover,.blog-card:hover,.faq-item:hover{background:#202026!important;}
.site-footer{background:#0b0b0d!important;border-top:1px solid var(--border);color:var(--text-secondary);}
.trust-item h3,.faq-question,.result-box__title,.pdf-file-item__name,.tool-link-card b,.blog-card b,.author-name{color:var(--text-primary)!important;}
/* kill stray light section gradients */
.hero,.popular,.tool-panels,.trust-strip,.workspace,.tool-hero,.info-section,section[class*="section"]{background:transparent!important;}

/* buttons: Ferrari red gradient + glow */
.btn--primary,.convert-button,.select-file-button,.faq-question::after{color:#fff;}
.btn--primary,.convert-button,.select-file-button{
  background:linear-gradient(135deg,#ff2800,#cc0000)!important;
  box-shadow:0 8px 24px -6px var(--ferrari-glow),0 0 0 1px rgba(255,40,0,.25)!important;border:0!important;}
.btn--primary:hover,.convert-button:hover,.select-file-button:hover{box-shadow:0 10px 30px -4px var(--ferrari-glow),0 0 22px var(--ferrari-glow)!important;transform:translateY(-1px);}
.btn-outline,.choice{color:var(--text-primary)!important;}
a{color:var(--brand-hover);}
.nav-link,.brand__name{color:var(--text-primary);}
.nav-link:hover{color:var(--brand-hover);}

/* brand mark: dark chip, red grid + glow */
.brand__mark{background:#1a1a1f!important;background-image:radial-gradient(rgba(255,40,0,.85) 1.1px,transparent 1.25px)!important;
  box-shadow:0 0 16px -2px var(--ferrari-glow),inset 0 0 0 1px rgba(255,40,0,.25)!important;}
.brand__mark::after{background:var(--spark)!important;box-shadow:0 0 8px var(--spark);}
::selection{background:var(--spark);color:#fff;}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--spark);}

/* hero atmosphere -> red radial glow + grid */
.hero::before,.tool-hero::before{background-image:radial-gradient(rgba(255,255,255,.05) 1px,transparent 1.4px)!important;opacity:.6;}

/* Theme v3 — fixes for remaining light components (homepage cards/chips/hero) */
.task-card,.panel-button,.pdf-tile,.tool-panel,.tool-panel__content,.upload-card__content,.choice,.tool-kicker{
  background:var(--surface)!important;border-color:var(--border)!important;color:var(--text-primary)!important;}
.task-card:hover,.pdf-tile:hover,.panel-button:hover{border-color:var(--brand-border)!important;box-shadow:0 12px 34px -14px var(--ferrari-glow)!important;transform:translateY(-2px);}
.task-card h3,.task-card b,.task-card strong,.pdf-tile b,.panel-button b,.panel-button strong{color:var(--text-primary)!important;}
.task-card p,.task-card span,.pdf-tile span,.panel-button span,.panel-button p{color:var(--text-secondary)!important;}
.task-card .task-card__icon,.task-card figure,.pdf-tile__icon,.format-thumb,.thumb,.mini-tile{background:var(--surface-soft)!important;border-color:var(--border)!important;}
.format-row b{background:var(--surface-soft)!important;border:1px solid var(--border)!important;color:var(--text-primary)!important;}
.format-row span,.format-row em{color:var(--text-secondary)!important;}
.tool-kicker{background:var(--surface)!important;border:1px solid var(--border)!important;color:var(--text-secondary)!important;}
.tool-kicker svg{color:var(--brand-2)!important;}
/* hero accent line: solid Ferrari red text + glow (not a block) */
.hero h1 span{background:none!important;-webkit-text-fill-color:#ff2800!important;color:#ff2800!important;text-shadow:0 0 34px var(--ferrari-glow);}
.section-heading h2,.popular h2,.tool-panels h2{color:var(--text-primary)!important;}

/* ===== Pricing / Тарифы (Ferrari) ===== */
.pricing-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px;max-width:840px;margin:28px auto;}
.price-card{background:var(--surface);border:1px solid var(--border);border-radius:22px;padding:30px 26px;display:flex;flex-direction:column;}
.price-card--pro{border:1.5px solid var(--brand-border);box-shadow:0 0 40px -10px var(--ferrari-glow);position:relative;}
.price-card__badge{position:absolute;top:-12px;left:26px;background:linear-gradient(135deg,#ff2800,#cc0000);color:#fff;font-family:'JetBrains Mono',monospace;font-size:12px;font-weight:700;padding:5px 12px;border-radius:8px;box-shadow:0 6px 16px -4px var(--ferrari-glow);}
.price-card h2{font-size:22px;margin:0 0 4px;}
.price-card__price{font-family:'JetBrains Mono',monospace;font-size:34px;font-weight:800;color:var(--text-primary);margin:8px 0 2px;}
.price-card__price small{font-size:15px;color:var(--text-muted);font-weight:500;}
.price-card__note{color:var(--text-secondary);font-size:14px;margin-bottom:16px;}
.price-card ul{list-style:none;padding:0;margin:0 0 22px;display:flex;flex-direction:column;gap:10px;}
.price-card li{color:var(--text-secondary);padding-left:26px;position:relative;line-height:1.5;}
.price-card li::before{content:"✓";position:absolute;left:0;color:var(--brand-2);font-weight:800;}
.price-card .btn{margin-top:auto;text-align:center;}
.cmp-table{width:100%;max-width:840px;margin:24px auto;border-collapse:collapse;}
.cmp-table th,.cmp-table td{padding:13px 16px;border-bottom:1px solid var(--border);text-align:left;color:var(--text-secondary);}
.cmp-table th{color:var(--text-primary);font-family:'JetBrains Mono',monospace;}
.cmp-table td:not(:first-child){text-align:center;}
.cmp-table .yes{color:var(--brand-2);font-weight:700;}
@media(max-width:680px){.pricing-grid{grid-template-columns:1fr;}}
.pro-form{max-width:480px;margin:24px auto;display:flex;gap:10px;flex-wrap:wrap;}
.pro-form input{flex:1;min-width:200px;}
.faq-page .faq-list{max-width:760px;margin:24px auto;}

/* ===== Homepage layout v2: full-width search ===== */
.tool-search{position:relative;width:100%;max-width:none!important;margin:26px auto 12px;}
.tool-search__field{padding:0 20px;border-radius:16px;}
.tool-search__field>svg{width:22px;height:22px;}
.tool-search input{padding:19px 0;font-size:17px;}
.hero .tool-search{max-width:965px!important;}        /* align with hero content, not edge-to-edge */
.hero__content{width:100%;}
@media(max-width:600px){
  .tool-search{margin:20px auto 10px;}
  .tool-search input{padding:15px 0;font-size:16px;}
  .tool-search__field{padding:0 14px;border-radius:14px;}
  .hero h1{font-size:clamp(30px,9vw,42px);line-height:1.1;}
  .hero__lead{font-size:15px;}
}

/* Theme v3 — newsletter block + envelope illustration -> Ferrari dark */
.newsletter-card{background:var(--surface)!important;border:1px solid var(--border)!important;}
.newsletter-card h2{color:var(--text-primary)!important;}
.newsletter-card p{color:var(--text-secondary)!important;}
.newsletter-form input{background:var(--surface-soft)!important;border:1px solid var(--border-strong)!important;color:var(--text-primary)!important;}
.newsletter-form input:focus{border-color:var(--brand-border)!important;box-shadow:0 0 0 3px var(--brand-light)!important;}
.newsletter-form button{background:linear-gradient(135deg,#ff2800,#cc0000)!important;box-shadow:0 8px 20px -6px var(--ferrari-glow)!important;color:#fff!important;}
.newsletter-form button:hover{box-shadow:0 10px 26px -4px var(--ferrari-glow),0 0 18px var(--ferrari-glow)!important;}
.envelope-art{background:linear-gradient(142deg,#cc0000,#ff2800)!important;box-shadow:0 16px 32px -6px var(--ferrari-glow)!important;}
.envelope-art__flap{background:#990000!important;}
.envelope-art__paper{background:#f0f0f2!important;}
.envelope-art__spark{background:#ff5e00!important;}
.envelope-art__spark--two{background:#ff2800!important;}

/* envelope inner/lining pseudo -> red */
.envelope-art::after{background:linear-gradient(142deg,#990000,#cc0000)!important;border-color:#cc0000!important;}
.envelope-art__paper::after{background:#e0e0e6!important;border-color:#ff5e00!important;}

/* envelope ::before lining -> red (final purple fix) */
.envelope-art::before{background:#cc0000!important;background-image:none!important;border-color:#990000!important;}

/* footer ИНН line */
.footer-inn{color:var(--text-muted);font-size:12px;margin-top:6px;line-height:1.5;}

/* markdown-generated lists (was raw "1. 2. 3." / ** **) */
.md-list{margin:12px 0 14px;padding-left:24px;color:var(--text-secondary);line-height:1.7;}
.md-list li{margin:7px 0;padding-left:4px;}
.md-list li::marker{color:var(--brand-2);font-weight:700;}
.content-section .md-list strong,.article-body .md-list strong,.faq-answer strong{color:var(--text-primary);}

/* author avatar photo */
.author-avatar{overflow:hidden;padding:0;background:#17171b;}
.author-avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block;}

/* Theme v3 — fix: header icon buttons (theme toggle, menu) were light */
.icon-button,.menu-button{background:var(--surface)!important;border:1px solid var(--border)!important;color:var(--text-primary)!important;box-shadow:none!important;}
.icon-button:hover,.menu-button:hover{background:#202026!important;border-color:var(--brand-border)!important;}
.icon-button svg,.menu-button svg{color:var(--text-primary);}

/* colored list markers (Ferrari) for md-list + article-list */
ul.md-list,.article-list{list-style:none;padding-left:6px;}
ul.md-list>li,.article-list>li{position:relative;padding-left:26px;}
ul.md-list>li::before,.article-list>li::before{content:"";position:absolute;left:7px;top:.62em;width:7px;height:7px;border-radius:50%;background:linear-gradient(135deg,#ff2800,#cc0000);box-shadow:0 0 8px -1px var(--ferrari-glow);}
ol.md-list{list-style:none;counter-reset:mdli;padding-left:4px;}
ol.md-list>li{position:relative;padding-left:34px;margin:10px 0;counter-increment:mdli;}
ol.md-list>li::before{content:counter(mdli);position:absolute;left:0;top:.02em;width:22px;height:22px;border-radius:7px;display:flex;align-items:center;justify-content:center;color:#fff;background:linear-gradient(135deg,#ff2800,#cc0000);font:800 12px/1 'JetBrains Mono',monospace;box-shadow:0 0 10px -2px var(--ferrari-glow);}

/* ===== Web tools: генератор кнопок ===== */
.btngen{display:grid;grid-template-columns:1fr;gap:18px;}
.btngen__preview{display:flex;align-items:center;justify-content:center;min-height:170px;border:1px solid var(--border);border-radius:18px;background:var(--surface-soft);background-image:radial-gradient(var(--border-strong) 1px,transparent 1.3px);background-size:18px 18px;}
.btngen__controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:15px;background:var(--surface);border:1px solid var(--border);border-radius:18px;padding:20px;}
.btngen__controls label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--text-secondary);font-weight:500;}
.btngen__controls input[type="color"]{height:38px;padding:2px;border-radius:9px;border:1px solid var(--border-strong);background:var(--surface-soft);cursor:pointer;}
.btngen__controls input[type="text"]{height:38px;padding:0 12px;border-radius:9px;border:1px solid var(--border-strong);background:var(--surface-soft);color:var(--text-primary);}
.btngen__controls input[type="range"]{accent-color:var(--brand);}
.btngen__controls label:has(input[type="checkbox"]){flex-direction:row;align-items:center;gap:8px;}
.btngen__code{background:var(--surface);border:1px solid var(--border);border-radius:18px;padding:18px;}
.btngen__tabs{display:flex;gap:8px;margin-bottom:12px;}
.btngen__tabs button{background:var(--surface-soft);border:1px solid var(--border);color:var(--text-secondary);border-radius:9px;padding:7px 16px;cursor:pointer;font-family:'JetBrains Mono',monospace;font-size:13px;}
.btngen__tabs button.active{background:linear-gradient(135deg,#ff2800,#cc0000);color:#fff;border-color:transparent;}
.btngen__code textarea{width:100%;min-height:220px;font-family:'JetBrains Mono',monospace;font-size:13px;background:var(--surface-soft);color:var(--text-primary);border:1px solid var(--border-strong);border-radius:11px;padding:14px;line-height:1.55;resize:vertical;}

/* web tools: preview sizing + json layout */
.wt-fill{width:100%;min-height:180px;border-radius:16px;}
.wt-box{width:220px;height:130px;border-radius:14px;background:var(--surface);}
.btngen__preview--glassbg{background:linear-gradient(135deg,#ff2800,#7b3ff2,#0e9fc4)!important;background-size:cover!important;padding:30px;}
.glass-card{width:240px;height:130px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-family:'JetBrains Mono',monospace;}
.json-grid{display:grid;grid-template-columns:1fr;gap:16px;}
.json-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:10px 0;}
.json-actions button{background:var(--surface-soft);border:1px solid var(--border-strong);color:var(--text-primary);border-radius:9px;padding:9px 16px;cursor:pointer;font-weight:600;}
.json-actions button:hover{border-color:var(--brand-border);}
/* Карта сайта (HTML sitemap) */
.sitemap-grid{display:flex;flex-direction:column;gap:18px;}
.sitemap-grid .content-card{margin:0;}
.sitemap-list{list-style:none;margin:14px 0 0;padding:0;column-gap:28px;column-width:240px;}
.sitemap-list li{margin:0 0 9px;break-inside:avoid;}
.sitemap-list a{color:var(--text-secondary);text-decoration:none;border-bottom:1px solid transparent;transition:color .15s,border-color .15s;}
.sitemap-list a:hover{color:var(--brand);border-bottom-color:var(--brand-border);}

/* ===== Announcement banner (динамический контент из БД) ===== */
.site-announce{font-size:14px;line-height:1.4;border-bottom:1px solid var(--border);background:var(--surface-soft);}
.site-announce--promo{background:linear-gradient(90deg,rgba(204,0,0,.18),rgba(255,40,0,.10));}
.site-announce--warn{background:rgba(217,130,10,.16);}
.site-announce__inner{display:flex;align-items:center;gap:14px;padding:10px 0;}
.site-announce__inner span{flex:1;color:var(--text-primary);}
.site-announce a{color:var(--brand-2);font-weight:700;white-space:nowrap;}
.site-announce__x{flex:none;width:28px;height:28px;border:0;background:transparent;color:var(--text-muted);font-size:20px;line-height:1;cursor:pointer;border-radius:8px;}
.site-announce__x:hover{background:rgba(255,255,255,.06);color:var(--text-primary);}

/* ===== Admin panel ===== */
.admin-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:22px;border-bottom:1px solid var(--border);padding-bottom:14px;}
.admin-tab{padding:8px 16px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--text-secondary);font-weight:700;font-size:14px;font-family:inherit;cursor:pointer;}
.admin-tab.is-active{background:var(--brand);border-color:var(--brand);color:#fff;}
.admin-err{padding:16px;border:1px solid var(--brand-border);border-radius:12px;background:var(--brand-light);color:var(--text-primary);}
.admin-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;}
.admin-stat{border:1px solid var(--border);border-radius:14px;background:var(--surface);padding:18px;text-align:center;}
.admin-stat b{display:block;font-size:30px;letter-spacing:-.04em;color:var(--text-primary);}
.admin-stat span{font-size:13px;color:var(--text-muted);}
.admin-table{width:100%;border-collapse:collapse;font-size:14px;}
.admin-table th,.admin-table td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--border);color:var(--text-secondary);}
.admin-table thead th{color:var(--text-primary);font-weight:750;background:var(--surface-soft);}
.admin-mini{padding:5px 11px;border:1px solid var(--border-strong);border-radius:8px;background:var(--surface-soft);color:var(--text-primary);font-size:12px;font-weight:700;font-family:inherit;cursor:pointer;text-decoration:none;display:inline-block;}
.admin-mini:hover{border-color:var(--brand-border);color:var(--brand-2);}
.admin-mini--danger:hover{border-color:#d23b3b;color:#ff6b6b;}
.admin-list{display:grid;gap:12px;margin-top:18px;}
.admin-card{border:1px solid var(--border);border-radius:14px;background:var(--surface);padding:16px 18px;color:var(--text-secondary);}
.admin-card.is-done,.admin-card.is-off{opacity:.55;}
.admin-card__head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px;}
.admin-card__head b{color:var(--text-primary);}
.admin-card__head span{font-size:12px;color:var(--text-muted);}
.admin-msg{margin:6px 0;padding:10px 12px;background:var(--surface-soft);border-radius:10px;color:var(--text-primary);white-space:pre-wrap;}
.admin-src{font-size:12px;color:var(--text-muted);word-break:break-all;}
.admin-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;}
.admin-badge{padding:2px 9px;border-radius:999px;font-size:11px;font-weight:750;}
.admin-badge--info{background:var(--brand-light);color:var(--brand-2);}
.admin-badge--promo{background:#fff3d6;color:#9a6b00;}
.admin-badge--warn{background:rgba(217,130,10,.2);color:#e0a93e;}
.admin-form{display:grid;gap:14px;border:1px solid var(--border);border-radius:14px;background:var(--surface);padding:20px;margin-bottom:8px;}
.admin-form label{display:grid;gap:6px;font-size:13px;font-weight:700;color:var(--text-secondary);}
.admin-form input[type=text],.admin-form textarea,.admin-form select{width:100%;padding:10px 12px;border:1px solid var(--border-strong);border-radius:10px;background:var(--surface-soft);color:var(--text-primary);font-family:inherit;font-size:14px;font-weight:400;}
.admin-form textarea{resize:vertical;min-height:70px;}
.admin-form__row{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.admin-check{display:flex !important;flex-direction:row;align-items:center;gap:8px;cursor:pointer;}
.admin-check input{width:auto;flex:none;margin:0;}
@media (max-width:680px){.admin-stats{grid-template-columns:repeat(2,1fr);}.admin-form__row{grid-template-columns:1fr;}.admin-table{font-size:12px;}.admin-table th,.admin-table td{padding:7px 6px;}}
.account-admin{margin-top:16px;}

/* ——— WP-подобный layout админки: сайдбар + рабочая область ——— */
.admin-layout{display:grid;grid-template-columns:248px 1fr;gap:24px;align-items:start;}
.admin-sidebar{position:sticky;top:90px;border:1px solid var(--border);border-radius:16px;background:var(--surface);padding:14px;display:grid;gap:14px;}
.admin-side-group{display:grid;gap:4px;}
.admin-side-group h4{margin:0;padding:6px 10px 2px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);font-weight:800;}
.admin-side-link{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:10px;color:var(--text-secondary);font-weight:700;font-size:14px;font-family:inherit;background:none;border:0;width:100%;text-align:left;cursor:pointer;text-decoration:none;}
.admin-side-link:hover{background:var(--surface-soft);color:var(--text-primary);}
.admin-side-link.is-active{background:var(--brand);color:#fff;}
.admin-side-link .ico{width:18px;height:18px;flex:0 0 auto;}
.admin-main{min-width:0;}
.admin-main__head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px;}
.admin-main__head h2{margin:0;font-size:22px;letter-spacing:-.02em;color:var(--text-primary);}
.admin-sidebar__toggle{display:none;}
@media (max-width:900px){
  .admin-layout{grid-template-columns:1fr;}
  .admin-sidebar{position:static;top:auto;}
  .admin-side-group{grid-auto-flow:column;grid-auto-columns:max-content;overflow-x:auto;gap:6px;}
  .admin-side-group h4{display:none;}
  .admin-side-link{white-space:nowrap;}
}

/* ——— Лёгкий WYSIWYG (contenteditable) ——— */
.wysiwyg{border:1px solid var(--border-strong);border-radius:10px;overflow:hidden;background:var(--surface-soft);}
.wysiwyg-toolbar{display:flex;flex-wrap:wrap;gap:2px;padding:6px;border-bottom:1px solid var(--border);background:var(--surface);}
.wysiwyg-btn{min-width:32px;height:30px;padding:0 8px;border:1px solid transparent;border-radius:7px;background:none;color:var(--text-primary);font-weight:700;font-size:13px;font-family:inherit;cursor:pointer;}
.wysiwyg-btn:hover{background:var(--surface-soft);border-color:var(--border);}
.wysiwyg-btn.is-on{background:var(--brand);color:#fff;}
.wysiwyg-sep{width:1px;align-self:stretch;margin:3px 4px;background:var(--border);}
.wysiwyg-area{min-height:280px;max-height:60vh;overflow:auto;padding:14px 16px;color:var(--text-primary);font-size:15px;line-height:1.6;outline:none;}
.wysiwyg-area:empty::before{content:attr(data-ph);color:var(--text-muted);}
.wysiwyg-area h2{font-size:1.4em;margin:.6em 0 .3em;}
.wysiwyg-area h3{font-size:1.2em;margin:.6em 0 .3em;}
.wysiwyg-area p{margin:.5em 0;}
.wysiwyg-area ul,.wysiwyg-area ol{margin:.5em 0 .5em 1.4em;}
.wysiwyg-area blockquote{margin:.6em 0;padding:.4em 1em;border-left:3px solid var(--brand);color:var(--text-secondary);}
.wysiwyg-area pre{background:var(--surface);padding:10px 12px;border-radius:8px;overflow:auto;font-family:"JetBrains Mono",monospace;font-size:13px;}
.wysiwyg-area img{max-width:100%;border-radius:8px;}
.wysiwyg-area a{color:var(--brand-2);}

/* ——— SEO-панель в редакторе ——— */
.admin-seo{border:1px solid var(--border);border-radius:14px;background:var(--surface);padding:0;margin:4px 0 8px;}
.admin-seo>summary{padding:14px 18px;font-weight:800;color:var(--text-primary);cursor:pointer;list-style:none;display:flex;align-items:center;gap:8px;}
.admin-seo>summary::-webkit-details-marker{display:none;}
.admin-seo[open]>summary{border-bottom:1px solid var(--border);}
.admin-seo__body{padding:18px;display:grid;gap:14px;}
.seo-serp{background:#fff;border-radius:10px;padding:12px 14px;max-width:600px;font-family:Arial,Helvetica,sans-serif;box-shadow:0 1px 6px rgba(0,0,0,.15);}
.seo-serp__url{color:#202124;font-size:12px;}
.seo-serp__title{color:#1a0dab;font-size:18px;line-height:1.3;margin:2px 0 3px;}
.seo-serp__desc{color:#4d5156;font-size:13px;line-height:1.5;}
.seo-count{font-size:12px;font-family:"JetBrains Mono",monospace;}
/* ——— Медиатека ——— */
.media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px;margin-top:8px;}
.media-item{border:1px solid var(--border);border-radius:10px;overflow:hidden;background:var(--surface);}
.media-item img{width:100%;height:96px;object-fit:cover;display:block;background:var(--surface-soft);}
.media-item__bar{display:flex;gap:4px;padding:6px;align-items:center;}
.media-item__bar .admin-mini{padding:4px 7px;font-size:11px;}
.media-modal{position:fixed;inset:0;background:rgba(0,0,0,.6);display:flex;align-items:center;justify-content:center;z-index:1000;padding:20px;}
.media-modal__box{background:var(--surface);border:1px solid var(--border);border-radius:16px;max-width:760px;width:100%;max-height:85vh;overflow:auto;padding:20px;}
.account-pay{display:flex;flex-wrap:wrap;gap:10px;margin:8px 0 0;}
.account-pay .btn[disabled]{opacity:.6;cursor:wait;}

/* ===== Blog tags + filter ===== */
.blog-tags{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 22px;}
.tag-btn{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 13px;border:1px solid var(--border-strong);border-radius:999px;background:var(--surface);color:var(--text-secondary);font-size:13px;font-weight:700;font-family:inherit;cursor:pointer;transition:border-color .15s,color .15s,background .15s;}
.tag-btn:hover{border-color:var(--brand-border);color:var(--brand-2);}
.tag-btn.is-active{background:var(--brand);border-color:var(--brand);color:#fff;}
.tag-btn i{font-style:normal;font-size:11px;opacity:.7;font-weight:800;}
.blog-empty{margin:8px 0 24px;padding:24px;text-align:center;color:var(--text-secondary);}
.blog-card__tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:auto;padding-top:4px;}
.tag-chip{font-size:12px;font-weight:700;color:var(--text-muted);padding:2px 8px;border:1px solid var(--border);border-radius:999px;background:var(--surface-soft);cursor:pointer;transition:color .15s,border-color .15s;}
.tag-chip:hover{color:var(--brand-2);border-color:var(--brand-border);}
a.tag-chip{text-decoration:none;}
.article-tags{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 26px;}
/* атрибут hidden должен скрывать даже flex/grid-элементы (фильтры блога/инструментов) */
[hidden]{display:none!important;}
