/* Wspólne dla /licznik-znakow/ i /character-counter/ (PL i EN). */
    :root { font-family: var(--font-sans); color: #172033; background: #f4f6fb; --muted: #667085; --border: #e3e8f0; --primary: var(--brand); --primary-dark: var(--brand-dark); }
    * { box-sizing: border-box; }
    [hidden] { display: none !important; }
    html { scroll-behavior: smooth; }
    body { min-width: 320px; margin: 0; }
    button, textarea, input { font: inherit; }
    a { color: inherit; }
    .site-header { border-bottom: 1px solid #edecf2; background: #fff; }
    .header-inner { width: min(1160px, calc(100% - 48px)); min-height: 78px; display: flex; align-items: center; gap: 16px; margin: 0 auto; }
    .brand img { display: block; width: 145px; height: 64px; object-fit: cover; mix-blend-mode: multiply; }
    .back-link { margin-left: auto; color: #5e55c8; font-size: 13px; font-weight: 700; text-decoration: none; }
    @media (hover: hover) and (pointer: fine) { .back-link:hover { color: var(--brand-dark); } }
    .shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 46px 0 60px; }
    .eyebrow { margin: 0 0 10px; color: var(--primary); font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
    h1 { margin: 0; color: #202338; font-size: clamp(30px, 5vw, 42px); letter-spacing: -.045em; }
    .intro { max-width: 760px; margin: 12px 0 25px; color: var(--muted); font-size: 15px; line-height: 1.7; }
    h2, h3, p { margin-top: 0; }
    h2 { color: #292b40; font-size: 18px; letter-spacing: -.025em; }
    h3 { color: #292b40; }
    .workspace, .panel, .seo-card, .faq, .related { border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: 0 4px 18px rgb(16 24 40 / 4%); }
    .workspace { padding: 19px; }
    .panel { margin-top: 15px; padding: 19px; }
    .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
    .panel-heading h2 { margin: 0; }
    .transform-menu { position: relative; flex: 0 0 auto; }
    .transform-menu > summary { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 11px; border: 1px solid var(--border); border-radius: 9px; color: #5e55c8; background: #fff; cursor: pointer; list-style: none; font-size: 12px; font-weight: 700; white-space: nowrap; }
    .transform-menu > summary::-webkit-details-marker { display: none; }
    .transform-menu[open] > summary { border-color: #c8c8fa; background: #f8f7ff; }
@media (hover: hover) and (pointer: fine) { .transform-menu > summary:hover { border-color: #c8c8fa; background: #f8f7ff; } }
    .transform-menu summary:focus-visible { outline: 3px solid rgb(var(--brand-rgb) / 24%); outline-offset: 2px; }
    .transform-menu svg { width: 18px; height: 18px; }
    .transform-panel { position: absolute; z-index: 5; top: calc(100% + 8px); right: 0; width: min(430px, calc(100vw - 58px)); max-height: min(70vh, 560px); display: grid; gap: 10px; padding: 16px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 14px 35px rgb(16 24 40 / 15%); }
    .transform-title { margin: 0; color: #292b40; font-size: 13px; font-weight: 750; }
    .transform-panel .stat-label { margin: 0; }
    .transform-panel .transform-cleanup-label { margin-top: 4px; }
    .transform-panel .transform-grid { margin-top: -3px; }
    .editor { display: block; width: 100%; min-height: 230px; resize: vertical; padding: 14px; border: 1px solid #d7deea; border-radius: 10px; outline: none; color: #172033; background: #fbfcfe; cursor: text; font-family: var(--font-mono); font-size: 14px; line-height: 1.65; }
    .editor:focus, input:focus { border-color: #a5a6f6; box-shadow: 0 0 0 3px rgb(var(--brand-rgb) / 13%); }
    .editor::placeholder { color: #98a2b3; }
    .actions, .pills, .transform-grid { display: flex; flex-wrap: wrap; gap: 8px; }
    .actions { margin: 12px 0 0; }
    button { min-height: 38px; padding: 0 13px; border: 1px solid var(--border); border-radius: 9px; color: #344054; background: #fff; cursor: pointer; font-size: 12px; font-weight: 700; transition: background .15s var(--ease-out), border-color .15s var(--ease-out), scale .16s var(--ease-out); }
    @media (hover: hover) and (pointer: fine) { button:hover { border-color: #c8c8fa; background: #f8f7ff; } }
    button.primary { border-color: var(--primary); color: #fff; background: var(--primary); }
    @media (hover: hover) and (pointer: fine) { button.primary:hover { border-color: var(--primary-dark); background: var(--primary-dark); } }
    button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid rgb(var(--brand-rgb) / 24%); outline-offset: 2px; }
    .status { min-height: 17px; margin: 7px 0 0; color: #16835d; font-size: 12px; }
    .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
    .stat { min-width: 0; padding: 13px; border: 1px solid #eaebf1; border-radius: 11px; background: #fbfcff; }
    .stat-value { display: block; overflow-wrap: anywhere; color: #292b40; font-size: 22px; font-weight: 800; letter-spacing: -.035em; }
    .stat-label { display: block; margin-top: 4px; color: #667085; font-size: 12px; line-height: 1.45; }
    .stat-note { display: block; margin-top: 4px; color: #626777; font-size: 12px; }
    .subheading { margin: 18px 0 10px; color: #292b40; font-size: 14px; }
    .limit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .limit-card { min-width: 0; padding: 12px; border: 1px solid #eaebf1; border-radius: 10px; background: #fff; }
    .limit-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: #45485a; font-size: 12px; font-weight: 700; }
    .limit-count { color: #667085; text-align: right; }
    .limit-track { height: 7px; overflow: hidden; border-radius: 99px; background: #eef0f5; }
    .limit-fill { height: 100%; border-radius: inherit; background: #31a77d; transition: width .15s, background .15s; }
    .limit-fill.warn { background: #e8a82f; }
    .limit-fill.over { background: #e25d66; }
    .limit-message { margin: 7px 0 0; color: #667085; font-size: 12px; }
    .field { display: grid; gap: 6px; color: #45485a; font-size: 12px; font-weight: 700; }
    .field input[type="number"] { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #d7deea; border-radius: 8px; outline: none; color: #292b40; background: #fdfdff; font-size: 12px; }
    .custom-limit { max-width: 260px; margin-bottom: 11px; }
    .pills button { min-height: 31px; padding: 0 10px; border-radius: 999px; color: #5146a7; background: #f6f5ff; font-size: 12px; }
    @media (hover: hover) and (pointer: fine) { .pills button:hover { border-color: #c8c8fa; background: #eeecff; } }
    .check-option { display: inline-flex; align-items: center; gap: 7px; color: #45485a; font-size: 12px; font-weight: 650; cursor: pointer; }
    .check-option input { width: 15px; height: 15px; margin: 0; accent-color: var(--primary); }
    .keyword-list { display: grid; gap: 6px; padding: 0; margin: 10px 0 0; list-style: none; }
    .keyword-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; padding: 8px 10px; border-radius: 7px; color: #45485a; background: #f8f9fc; font-size: 12px; }
    .keyword-list li > :first-child { min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
    .keyword-list li span:last-child { color: #667085; }
    .density-status { min-height: 0; margin: 8px 0; color: #667085; font-size: 12px; line-height: 1.5; }
    .density-status:empty { display: none; }
    .density-calculate { margin: 4px 0 8px; }
    .analysis-metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
    .analysis-chip { padding: 8px 10px; border: 1px solid #eaebf1; border-radius: 8px; color: #596073; font-size: 12px; }
    .analysis-chip-longest { flex: 1 1 100%; min-width: 0; max-width: 100%; overflow: hidden; }
    .analysis-longest { display: inline-block; max-width: 100%; overflow-x: auto; vertical-align: bottom; white-space: nowrap; scrollbar-width: thin; }
    .transform-grid { margin-top: 10px; }
    .transform-grid button { min-height: 33px; padding: 0 10px; font-size: 12px; }
    .support-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 14px 16px; border: 1px solid #e5e0ff; border-radius: 12px; color: #4e477f; background: #f8f7ff; font-size: 13px; line-height: 1.5; }
    .support-banner p { margin: 0; }
    .support-banner a { min-height: 38px; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; padding: 0 14px; border-radius: 8px; color: #fff; background: var(--primary); font-size: 12px; font-weight: 700; text-decoration: none; }
    .seo-card, .faq, .related { margin-top: 16px; padding: 20px 22px; }
    .seo-card h2 { margin-bottom: 12px; font-size: 22px; line-height: 1.35; }
    .seo-card h3, .faq > h2, .related > h2 { margin: 18px 0 9px; font-size: 17px; }
    .seo-card p, .seo-card li, .faq-item p { color: #4b5565; font-size: 14px; line-height: 1.8; }
    .seo-card ul { padding-left: 22px; }
    .seo-card .wb-sources-meta { margin: 14px 0 0; color: #667085; font-size: 13px; }
    .faq > h2, .related > h2 { margin-top: 0; margin-bottom: 16px; }
    .faq-item { padding: 0 0 14px; border-bottom: 1px solid #edf0f4; }
    .faq-item + .faq-item { padding-top: 14px; }
    .faq-item:last-child { padding-bottom: 0; border-bottom: 0; }
    .faq-item summary { position: relative; padding-left: 28px; color: #292b40; font-size: 15px; font-weight: 700; line-height: 1.5; cursor: pointer; list-style: none; }
    .faq-item summary::-webkit-details-marker { display: none; }
    .faq-item summary::after { position: absolute; top: 8px; left: 7px; width: 7px; height: 7px; border-right: 2px solid #635bdf; border-bottom: 2px solid #635bdf; content: ""; transform: rotate(45deg); transition: transform .2s var(--ease-out); }
    .faq-item[open] summary::after { transform: rotate(225deg); }
    .faq-item p { margin: 10px 0 0; }
    .related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .related-card { min-height: 165px; display: flex; flex-direction: column; align-items: flex-start; padding: 16px; border: 1px solid #eaebf1; border-radius: 13px; color: #292b40; background: #fff; text-decoration: none; box-shadow: 0 3px 10px rgb(28 33 66 / 2%); transition: transform .2s var(--ease-out), border-color .2s var(--ease-out), box-shadow .2s var(--ease-out), scale .16s var(--ease-out); }
    @media (hover: hover) and (pointer: fine) { .related-card:hover { transform: translateY(-3px); border-color: #d9d3ff; box-shadow: 0 10px 24px rgb(54 45 112 / 8%); } }
    .related-icon { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 10px; border-radius: 11px; font-size: 15px; font-weight: 750; }
    .related-icon.violet { color: #695ade; background: #f0edff; }
    .related-icon.blue { color: #4384d9; background: #eaf3ff; }
    .related-icon.mint { color: #299d7b; background: #e9f8f2; }
    .related-category { margin-bottom: 7px; color: #667085; font-size: 12px; font-weight: 700; }
    .related-card strong { margin-bottom: 6px; font-size: 14px; line-height: 1.4; }
    .related-description { color: #5f6475; font-size: 13px; line-height: 1.6; }
    .back-to-tool { position: fixed; z-index: 10; right: max(20px, calc((100vw - 820px) / 2)); bottom: 22px; padding: 12px 16px; border: 1px solid var(--brand); border-radius: 999px; color: #fff; background: var(--brand); box-shadow: 0 6px 20px rgb(40 35 100 / 22%); font-size: 13px; font-weight: 700; text-decoration: none; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s var(--ease-out), transform .2s var(--ease-out), background .2s var(--ease-out), scale .16s var(--ease-out); }
    .back-to-tool.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
    @media (hover: hover) and (pointer: fine) { .back-to-tool:hover { color: #fff; background: var(--brand-dark); } }
    .site-footer { margin-top: 8px; padding: 22px 20px 26px; border-top: 1px solid #edecf2; background: #fbfbfd; }
    .footer-inner { width: min(100%, 1120px); display: grid; justify-items: center; gap: 12px; margin: 0 auto; }
    .footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
    .footer-links a { color: #777a89; font-size: 12px; font-weight: 650; text-decoration: none; }
    .legal-note { max-width: 900px; margin: 0; color: #626777; font-size: 12px; line-height: 1.6; text-align: center; }
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    @media (max-width: 700px) {
      .header-inner { width: min(100% - 30px, 560px); min-height: 68px; }
      .brand img { width: 120px; height: 54px; }
      .shell { width: min(100% - 28px, 560px); padding-top: 34px; }
      .workspace, .panel { padding: 15px; }
      .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .limit-grid { grid-template-columns: 1fr; }
      .support-banner { align-items: stretch; flex-direction: column; gap: 10px; }
      .support-banner a { align-self: flex-start; }
      .footer-links { gap: 10px 16px; }
      .related-grid { grid-template-columns: 1fr; gap: 10px; }
      .related-card { min-height: 0; display: grid; grid-template-columns: 38px 1fr; column-gap: 12px; align-items: center; }
      .related-icon { grid-row: span 3; margin: 0; }
      .related-category, .related-card strong { margin: 0; }
      .back-to-tool { right: 15px; bottom: 15px; }
    }
    @media (max-width: 380px) {
      .stats { grid-template-columns: 1fr; }
      .stat { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
      .stat-label { margin-top: 0; text-align: right; }
    }
    @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; } }
