:root {
    /* Kolory marki RejestracjaDomen.pl */
    --navy: #1d253d;
    --navy-2: #2b3654;
    --blue: #38b0e4;
    --blue-dark: #1f93c9;
    --blue-soft: #eef8fd;
    --canvas: #f7f9fc;
    --ink: #24303f;
    --muted: #6b7280;
    --line: rgba(29, 37, 61, .22);
    --line-2: rgba(29, 37, 61, .12);
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(29, 37, 61, .07);
    --wrap: 1240px;
    --font-body: "Cabin", Arial, sans-serif;
    --font-head: "Montserrat", "Cabin", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--canvas);
    color: var(--ink);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- Utility bar ---------- */
.utilitybar { background: #f3f6fa; border-bottom: 1px solid var(--line); }
.utilitybar-inner { display: flex; justify-content: flex-end; gap: 24px; padding: 8px 0; }
.utilitybar a { color: var(--navy); text-decoration: none; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.utilitybar a:hover { color: var(--blue-dark); }

/* ---------- Site header + nav ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; position: relative; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { display: block; height: 42px; width: auto; }

.mainnav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.mainnav > a, .navitem > a {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--navy); text-decoration: none; font-weight: 700; font-size: 14px;
    padding: 8px 9px; border-radius: 8px; white-space: nowrap;
    transition: color .15s ease, background .15s ease;
}
.mainnav > a:hover, .navitem > a:hover { color: var(--blue-dark); background: var(--blue-soft); }
.mainnav .nav-hl { color: var(--blue-dark); }
.caret { width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -3px 0 0 2px; }

.navitem { position: relative; }
.submenu {
    position: absolute; top: 100%; left: 0;
    background: #fff; border: 1px solid var(--line-2); border-radius: 12px;
    box-shadow: 0 16px 34px rgba(29, 37, 61, .16);
    padding: 8px; min-width: 240px; display: none; z-index: 60;
}
.navitem:hover .submenu, .navitem:focus-within .submenu { display: block; }
.submenu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--navy); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.submenu a:hover { background: var(--blue-soft); color: var(--blue-dark); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 25px; height: 2.5px; background: var(--navy); border-radius: 2px; margin: 5px 0; }

@media (max-width: 1024px) {
    .nav-toggle { display: block; }
    .mainnav {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-bottom: 1px solid var(--line);
        padding: 8px 16px 16px; box-shadow: 0 16px 30px rgba(29, 37, 61, .12); z-index: 55;
    }
    .mainnav.open { display: flex; }
    .mainnav > a, .navitem > a { padding: 12px 8px; font-size: 15.5px; }
    .submenu { position: static; display: block; box-shadow: none; border: 0; border-left: 3px solid var(--blue-soft); border-radius: 0; margin: 0 0 6px 12px; padding: 0; min-width: 0; }
    .submenu a { padding: 8px 10px; }
    .caret { display: none; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 520px;
    background: var(--navy) url("hero-generator-regulaminy.png?v=20260708-video") center / cover no-repeat;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    padding: 70px 0 58px;
    color: #fff;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -3;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: var(--navy) url("hero-generator-regulaminy.png?v=20260708-video") center / cover no-repeat;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(12, 20, 38, .96) 0%, rgba(20, 31, 55, .92) 32%, rgba(29, 37, 61, .62) 56%, rgba(29, 37, 61, .24) 78%, rgba(29, 37, 61, .08) 100%);
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(29, 37, 61, .16) 0%, rgba(29, 37, 61, .08) 48%, rgba(29, 37, 61, .34) 100%);
}
.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    align-items: center;
    gap: 34px;
}
.hero-copy {
    min-width: 0;
    max-width: 720px;
}
.kicker {
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, .34);
    background: rgba(255, 255, 255, .13);
    color: #f6fbff;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 999px;
    margin: 0 0 14px;
    box-shadow: 0 12px 26px rgba(8, 14, 28, .18);
    backdrop-filter: blur(10px);
}
.hero h1 {
    margin: 0 0 14px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(28px, 4.4vw, 44px);
    color: #fff;
    letter-spacing: 0;
    line-height: 1.08;
    text-shadow: 0 3px 18px rgba(0, 0, 0, .28);
}
.hero .lead { max-width: 680px; margin: 0; color: rgba(255, 255, 255, .88); font-size: 17px; text-shadow: 0 2px 12px rgba(0, 0, 0, .26); }
.hero .lead--accent {
    max-width: 760px;
    margin-bottom: 9px;
    background: linear-gradient(90deg, #ffffff, #bdeeff 46%, var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.38;
}
.hero-badges {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px 14px;
}
.hero-badges li {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .3);
    color: #fff;
    font-weight: 700;
    font-size: 13.5px;
    padding: 8px 15px 8px 34px;
    border-radius: 999px;
    position: relative;
    box-shadow: 0 10px 22px rgba(8, 14, 28, .14);
    backdrop-filter: blur(10px);
}
.hero-badges li::before {
    content: "✓";
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: #93e1ff;
    font-weight: 900;
}
.hero-visual {
    position: relative;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, .12);
    box-shadow: 0 22px 54px rgba(7, 13, 27, .36);
}
.hero-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(29, 37, 61, .14));
}
.hero-svg {
    display: block;
    width: 100%;
    height: auto;
    padding: 8px 4px 0;
}
.hero-window-image,
.hero-visual img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 290px;
    height: auto;
    object-fit: cover;
    object-position: center;
}

/* ---------- Main ---------- */
.main { padding: 34px 20px 20px; }

.tool-workspace {
    display: grid;
    grid-template-columns: minmax(340px, 460px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.builder-column {
    min-width: 0;
}

.preview-panel {
    --preview-panel-height: 720px;
    position: sticky;
    top: 18px;
    height: var(--preview-panel-height);
    max-height: calc(100vh - 36px);
    border: 1px solid var(--line);
    border-left: 4px solid var(--navy);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: rgba(29, 37, 61, .38) #eef3f8;
    scrollbar-width: thin;
}
.preview-panel::-webkit-scrollbar {
    width: 10px;
}
.preview-panel::-webkit-scrollbar-track {
    background: #eef3f8;
}
.preview-panel::-webkit-scrollbar-thumb {
    background: rgba(29, 37, 61, .38);
    border-radius: 999px;
    border: 2px solid #eef3f8;
}

.preview-empty {
    padding: 26px;
}

.preview-empty p,
.preview-empty li {
    color: var(--muted);
    font-size: 15px;
}

.preview-empty ul {
    margin: 18px 0 0;
    padding-left: 20px;
}

.preview-message {
    margin: 22px;
}

.section-heading {
    position: relative;
    padding-left: 18px;
    margin: 0 0 16px;
}
.section-heading::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--blue), var(--navy));
}
.section-heading--list {
    margin: 34px 0 16px;
}
.section-heading--content {
    margin: 0 0 18px;
}
.section-heading--preview {
    margin: 0 0 16px;
}
.section-heading h2 {
    margin: 0;
    color: var(--navy);
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.22;
}
.section-heading .section-kicker {
    margin: 0 0 4px;
    color: var(--blue-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* ---------- Card / company ---------- */
.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px;
}
.company { border-left: 4px solid var(--navy); }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.req { color: var(--blue-dark); }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.builder-column .fields { grid-template-columns: 1fr; }
label { display: block; font-weight: 700; font-size: 13.5px; color: #38445a; margin: 0; }
input, select, textarea {
    width: 100%;
    margin-top: 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 13px;
    font: inherit;
    background: #fff;
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(56, 176, 228, .22);
}
select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%);
    background-position: calc(100% - 20px) center, calc(100% - 15px) center;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 38px;
}

/* checkboxes as pills */
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; }
.checks label {
    display: flex; align-items: center; gap: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 13px;
    font-weight: 600; font-size: 14px; color: #33405c;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.checks label:hover { border-color: var(--blue); }
.checks input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); cursor: pointer; }

/* ---------- Accordion generators ---------- */
.generators { display: flex; flex-direction: column; gap: 12px; }
.gen {
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 4px solid var(--navy);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.gen[open] { border-color: var(--navy); box-shadow: 0 10px 24px rgba(29, 37, 61, .10); }
.gen > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px 20px;
    user-select: none;
}
.gen > summary::-webkit-details-marker { display: none; }
.gen > summary::after {
    content: "";
    flex: 0 0 auto;
    margin-left: auto;
    width: 11px; height: 11px;
    border-right: 2.5px solid var(--navy);
    border-bottom: 2.5px solid var(--navy);
    transform: rotate(45deg);
    transition: transform .2s ease;
}
.gen[open] > summary::after { transform: rotate(-135deg); border-color: var(--blue-dark); }
.gen[open] > summary { background: #fff; }
.gen-ico {
    flex: 0 0 auto;
    width: 40px; height: 40px;
    display: grid; place-items: center;
    background: #f3f7fb;
    color: var(--blue-dark);
    border-radius: 10px;
    font-weight: 800; font-size: 20px;
}
.gen[open] .gen-ico { background: var(--navy); color: #fff; }
.gen-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gen-name { font-weight: 700; color: var(--navy); font-size: 16px; line-height: 1.28; }
.gen-desc { color: var(--muted); font-size: 14px; line-height: 1.45; }

.gen-inner { padding: 20px; border-top: 1px solid var(--line); }
.gen-inner .fields { margin-bottom: 14px; }
.gen-inner .checks { margin-bottom: 16px; }

.btn-gen {
    border: 0;
    border-radius: 999px;
    padding: 13px 30px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    background: var(--blue);
    color: #fff;
    box-shadow: 0 8px 18px rgba(56, 176, 228, .32);
    transition: background .15s ease, transform .15s ease;
}
.btn-gen:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-gen:disabled { opacity: .7; cursor: default; transform: none; }

/* ---------- Result / document ---------- */
.msg { border-radius: 10px; padding: 13px 15px; font-size: 14.5px; }
.msg.err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.doc-out { min-height: 100%; background: #fff; }
.doc-out-bar {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    color: var(--navy);
    padding: 14px 18px;
}
.doc-out-title { font-weight: 800; font-size: 15.5px; }
.doc-out-actions { flex: 0 0 auto; white-space: nowrap; }
.mini {
    background: #fff;
    color: var(--navy);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 14px;
    font-weight: 700; font-size: 13px;
    cursor: pointer; margin-left: 8px;
    transition: background .15s ease, border-color .15s ease;
}
.mini:hover { background: var(--blue-soft); border-color: var(--blue); }
.doc-out-body { padding: 10px 30px 30px; background: #fff; }
.doc-out-body h1 { font-size: 23px; color: var(--navy); margin: 20px 0 10px; }
.doc-out-body h2 { font-size: 18px; color: var(--navy); margin-top: 22px; }
.doc-out-body h3 { color: var(--navy-2); margin-top: 16px; }
.doc-out-body ul { padding-left: 20px; }
.doc-out-body li { margin: 7px 0; line-height: 1.6; }
.doc-out-body ol.ust { padding-left: 22px; }
.doc-out-body ol.pkt { list-style: lower-alpha; padding-left: 22px; margin-top: 6px; }
.doc-out-body table.doc-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.doc-out-body table.doc-table th,
.doc-out-body table.doc-table td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; vertical-align: top; }
.doc-out-body table.doc-table th { background: #f0f5fb; }
.doc-out-body .doc-meta { color: #64748b; font-style: italic; font-size: 13px; }
.doc-out-body .code-wrap { position: relative; margin: 12px 0; }
.doc-out-body .code-wrap pre { background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 40px 16px 14px; overflow-x: auto; font-size: 12px; line-height: 1.55; margin: 0; }
.doc-out-body .code-wrap code { font-family: Consolas, Menlo, "Courier New", monospace; }
.doc-out-body .code-copy {
    position: absolute; top: 8px; right: 8px;
    background: #1e2a44; color: #e2e8f0;
    border: 1px solid #334155; border-radius: 999px;
    padding: 5px 13px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.doc-out-body .code-copy:hover { background: #2b3a5c; }
.doc-out-body .copy-text { background: #f7faff; border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; }

/* ---------- Treść SEO ---------- */
.seo {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px 32px;
    margin: 36px 0 0;
}
.seo h2 { color: var(--navy); font-size: 24px; margin: 0 0 14px; letter-spacing: 0; }
.seo h3 { color: var(--navy); font-size: 18px; margin: 26px 0 10px; }
.seo p { color: #46505f; font-size: 15.5px; margin: 0 0 12px; }
.seo a { color: var(--blue-dark); font-weight: 700; text-decoration: none; }
.seo a:hover { text-decoration: underline; }
.seo .section-heading h2,
.faq-section .section-heading h2,
.preview-empty .section-heading h2 {
    margin: 0;
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.22;
}
.accent-subtitle {
    position: relative;
    padding-left: 18px;
    color: var(--navy);
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 700;
    margin: 26px 0 10px;
    line-height: 1.25;
}
.accent-subtitle::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--blue), var(--navy));
}
.seo-list, .seo-steps { margin: 0 0 6px; padding-left: 22px; }
.seo-list li, .seo-steps li { color: #46505f; font-size: 15px; margin: 9px 0; line-height: 1.6; }
.seo-list li strong, .seo-steps li strong { color: var(--navy); }
.seo-note { font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; }

/* ---------- FAQ ---------- */
.faq-section { margin: 40px 0 10px; }
.faq-section .section-heading {
    margin-bottom: 16px;
}
.faq {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
}
.faq > summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 20px;
    font-weight: 700;
    color: var(--navy);
    display: flex; align-items: center;
}
.faq > summary::-webkit-details-marker { display: none; }
.faq > summary::after {
    content: "+";
    margin-left: auto;
    font-size: 22px; font-weight: 400;
    color: var(--blue-dark);
    line-height: 1;
}
.faq[open] > summary::after { content: "−"; }
.faq-a { padding: 0 20px 18px; color: #46505f; font-size: 15px; }

/* ---------- Site footer ---------- */
.site-footer { background: var(--navy); color: #c7d0e2; margin-top: 50px; }
.footer-cols {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    gap: 26px;
    padding: 42px 20px 34px;
}
.fcol h3 { color: #fff; font-size: 15px; margin: 0 0 14px; }
.fcol a { display: block; color: #b9c3d8; text-decoration: none; font-size: 14px; padding: 5px 0; }
.fcol a:hover { color: #fff; }
.fcol-brand p { margin: 4px 0; font-size: 14px; color: #b9c3d8; }
.fcol-brand a { display: inline; color: #fff; font-weight: 700; padding: 0; }
.fcol-brand a:hover { color: var(--blue); }
.fbrand-h { color: #fff; font-weight: 800; margin-top: 16px !important; }
.footer-logo { display: inline-block; background: #fff; padding: 9px 13px; border-radius: 10px; margin-bottom: 6px; }
.footer-logo img { display: block; height: 34px; width: auto; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 20px; flex-wrap: wrap; }
.footer-bottom p { margin: 0; font-size: 13px; color: #9aa5bd; }
.footer-bottom .fdisclaimer { color: #7f8aa3; }

@media (max-width: 900px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-cols { grid-template-columns: 1fr; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .hero {
        min-height: auto;
        padding: 54px 0 44px;
    }

    .hero::before {
        background: linear-gradient(90deg, rgba(12, 20, 38, .96) 0%, rgba(20, 31, 55, .9) 55%, rgba(29, 37, 61, .58) 100%);
    }

    .hero-grid,
    .tool-workspace {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        max-width: 620px;
    }

    .hero-window-image,
    .hero-visual img {
        min-height: 260px;
    }

    .preview-panel {
        position: static;
        height: auto;
        max-height: none;
        min-height: 420px;
        overflow: visible;
    }
}

@media (max-width: 720px) {
    .fields, .checks { grid-template-columns: 1fr; }
    .gen-desc { display: none; }
    .gen > summary { padding: 15px 16px; }
    .doc-out-actions { display: flex; }
    .mini { margin-left: 6px; }
}
@media (max-width: 420px) {
    .doc-out-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
}
