/* ============================================================
   LegalnyMedyk — wspólny system podstron informacyjnych (.subpage)
   Te same tokeny i język co /sposoby-korzystania/: sky-blue #27A3DC,
   Montserrat (z base), navy ink, złoto tylko subtelnie. Samodzielny —
   NIE ładuje landing.css. Reużywany przez:
     /jak-korzystac-z-zasobow/, /jak-dodawac-posty/, /zostan-autorem-2/
   Per-stronowe szczegóły (podglądy UI, formularz) w osobnych plikach.
   ============================================================ */

.subpage {
    --u-primary: #27A3DC;
    --u-primary-dark: #1A86B8;
    --u-primary-tint: #D9F0FB;
    --u-primary-tint-2: #EAF6FC;
    --u-accent: #F4BD37;
    --u-accent-dark: #C99820;
    --u-ink: #0B1F3A;
    --u-ink-2: #1F3658;
    --u-ink-3: #4A5C7A;
    --u-ink-muted: #7A8AA5;
    --u-border: #E2E8F0;
    --u-bg: #F1F5F9;
    --u-paper: #FFFFFF;
    --u-green: #2E7D32;
    --u-green-bg: #EAF6EC;
    --u-green-border: #CDE9D2;
    --u-radius: 18px;
    --u-radius-sm: 12px;
    --u-shadow: 0 1px 2px rgba(11, 31, 58, .04), 0 6px 22px rgba(11, 31, 58, .06);

    background: var(--u-paper);
    color: var(--u-ink-2);
}
.subpage [id] { scroll-margin-top: 86px; }
@media (prefers-reduced-motion: no-preference) {
    html:has(.subpage) { scroll-behavior: smooth; }
}

.subpage .skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    padding: 10px 16px; background: var(--u-primary); color: #fff;
    border-radius: 0 0 8px 0; text-decoration: none;
}
.subpage .skip-link:focus { left: 0; }

/* honeypot */
.subpage .lm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------- LAYOUT (toc + main) ---------------- */
.sub-layout {
    max-width: 1200px; margin: 0 auto; padding: 30px 24px 84px;
    display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 44px;
    align-items: start;
}
.sub-layout--wide { max-width: 1240px; }
.sub-layout--nofold { grid-template-columns: 1fr; }

/* pełnoszeroki, wyśrodkowany wariant (how-to bez SPISU TREŚCI) */
.sub-wrap { max-width: 1080px; margin: 0 auto; padding: 30px 24px 84px; }
.sub-wrap > .sub-main { gap: 28px; }

.sub-toc { position: sticky; top: 92px; align-self: start; }
.sub-toc__label {
    margin: 0 0 16px; font-size: .72rem; font-weight: 800; letter-spacing: .1em;
    text-transform: uppercase; color: var(--u-ink-muted);
}
.sub-toc__nav { display: flex; flex-direction: column; gap: 15px; border-left: 1.5px solid var(--u-border); }
.sub-toc__link {
    position: relative; padding: 1px 0 1px 22px; font-size: .88rem; line-height: 1.35;
    color: var(--u-ink-muted); text-decoration: none; transition: color .15s ease;
}
.sub-toc__link::before {
    content: ""; position: absolute; left: -5px; top: .5em; width: 8px; height: 8px;
    border-radius: 50%; background: #fff; border: 2px solid var(--u-border);
    transition: background .15s ease, border-color .15s ease;
}
.sub-toc__link:hover { color: var(--u-ink-2); }
.sub-toc__link.is-active { color: var(--u-primary-dark); font-weight: 700; }
.sub-toc__link.is-active::before {
    background: var(--u-primary); border-color: var(--u-primary);
    box-shadow: 0 0 0 3px rgba(39, 163, 220, .16);
}

.sub-main { display: flex; flex-direction: column; gap: 26px; min-width: 0; }

/* ---------------- HERO ---------------- */
.sub-hero {
    display: grid; grid-template-columns: 1fr .86fr; align-items: stretch;
    background: radial-gradient(120% 140% at 0% 0%, #F6FBFE 0%, #EAF4FB 70%);
    border: 1px solid var(--u-border); border-radius: var(--u-radius); overflow: hidden;
}
.sub-hero--photo { align-items: stretch; }
.sub-hero__copy { align-self: center; padding: 50px 46px; }
.sub-breadcrumb {
    display: flex; align-items: center; gap: 8px; font-size: .84rem;
    color: var(--u-ink-muted); margin-bottom: 20px;
}
.sub-breadcrumb a { color: var(--u-ink-muted); text-decoration: none; }
.sub-breadcrumb a:hover { color: var(--u-primary); }
.sub-breadcrumb [aria-current="page"] { color: var(--u-primary-dark); font-weight: 600; }
.sub-eyebrow {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
    font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--u-primary-dark);
}
.sub-eyebrow i { color: var(--u-accent); }
.sub-hero__title {
    margin: 0 0 18px; font-size: clamp(1.9rem, 3.6vw, 2.85rem); font-weight: 800;
    line-height: 1.1; letter-spacing: -0.02em; color: var(--u-ink);
}
.sub-brand { color: var(--u-primary); }
.sub-hero__lead { margin: 0 0 26px; max-width: 34em; font-size: 1rem; line-height: 1.65; color: var(--u-ink-3); }
.sub-hero__lead:last-child { margin-bottom: 0; }
.sub-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.sub-hero__media { position: relative; min-height: 320px; }
.sub-hero__media > img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center 25%;
}

/* laptop / device frame */
.sub-hero__device {
    align-self: center; justify-self: center; width: 92%; max-width: 460px;
    margin: 28px; border-radius: 14px; background: #1f2937;
    padding: 10px 10px 16px; box-shadow: 0 30px 60px rgba(11, 31, 58, .22);
}
.sub-hero__device::after {
    content: ""; display: block; height: 8px; width: 60px; margin: 10px auto 0;
    border-radius: 999px; background: #374151;
}
.sub-hero__device-screen {
    background: #fff; border-radius: 6px; overflow: hidden; aspect-ratio: 16 / 10;
}

/* ---------------- SECTION ---------------- */
.sub-section { background: var(--u-paper); }
.sub-section__head { margin-bottom: 26px; }
.sub-section__title { margin: 0 0 10px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; color: var(--u-ink); line-height: 1.2; }
.sub-section__title .sub-brand { color: var(--u-primary); }
.sub-section__lead { margin: 0; max-width: 46em; font-size: 1rem; line-height: 1.6; color: var(--u-ink-3); }

/* ---------------- BUTTONS ---------------- */
.sub-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px;
    border-radius: 10px; font-size: .92rem; font-weight: 700; text-decoration: none;
    cursor: pointer; border: 1px solid transparent;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.sub-btn:hover { transform: translateY(-1px); }
.sub-btn--primary { background: var(--u-primary); color: #fff; border-color: var(--u-primary); }
.sub-btn--primary:hover { background: var(--u-primary-dark); border-color: var(--u-primary-dark); }
.sub-btn--ghost { background: #fff; color: var(--u-primary-dark); border-color: var(--u-primary); }
.sub-btn--ghost:hover { background: var(--u-primary-tint); }
.sub-btn--white { background: #fff; color: var(--u-primary-dark); border-color: #fff; }
.sub-btn--white:hover { background: var(--u-accent); color: var(--u-ink); border-color: var(--u-accent); }
.sub-btn--lg { padding: 14px 26px; font-size: 1rem; }

/* ---------------- CHECKS ---------------- */
.sub-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sub-checks li { display: flex; align-items: flex-start; gap: 11px; color: var(--u-ink-2); font-size: .94rem; line-height: 1.5; }
.sub-checks li > i { flex: none; margin-top: 1px; font-size: 1.05rem; color: var(--u-primary); }
.sub-checks li strong { color: var(--u-ink); font-weight: 700; }

/* ---------------- NOTE boxes ---------------- */
.sub-note {
    display: flex; align-items: flex-start; gap: 14px; padding: 18px 22px;
    border-radius: var(--u-radius-sm); font-size: .92rem; line-height: 1.55;
}
.sub-note p { margin: 0; }
.sub-note__title { display: block; font-weight: 800; margin-bottom: 4px; }
.sub-note > i { flex: none; margin-top: 2px; font-size: 1.2rem; }
.sub-note--green { background: var(--u-green-bg); border: 1px solid var(--u-green-border); color: #2C5132; }
.sub-note--green > i { color: var(--u-green); }
.sub-note--blue { background: var(--u-primary-tint-2); border: 1px solid #CDE7F6; color: var(--u-ink-2); }
.sub-note--blue > i { color: var(--u-primary); }
.sub-note--blue .sub-note__title { color: var(--u-primary-dark); }

/* ---------------- STEP cards (numbered how-to) ---------------- */
.sub-step {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px 36px;
    background: var(--u-paper); border: 1px solid var(--u-border);
    border-radius: var(--u-radius); box-shadow: var(--u-shadow); padding: 34px 38px;
    align-items: start;
}
.sub-step__body { min-width: 0; }
.sub-step__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.sub-step__num {
    flex: none; width: 38px; height: 38px; border-radius: 10px;
    background: var(--u-primary); color: #fff; font-weight: 800; font-size: 1.05rem;
    display: flex; align-items: center; justify-content: center;
}
.sub-step__title { margin: 0; font-size: 1.25rem; font-weight: 800; color: var(--u-ink); line-height: 1.25; }
.sub-step__desc { margin: 0 0 14px; color: var(--u-ink-3); line-height: 1.6; font-size: .95rem; }
.sub-step__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.sub-step__list li { position: relative; padding-left: 18px; color: var(--u-ink-2); font-size: .93rem; line-height: 1.5; }
.sub-step__list li::before {
    content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px;
    border-radius: 50%; background: var(--u-primary);
}
.sub-step__media { min-width: 0; }

/* generic preview frame for fake-UI illustrations */
.sub-prev {
    background: #fff; border: 1px solid var(--u-border); border-radius: var(--u-radius-sm);
    box-shadow: 0 6px 18px rgba(11, 31, 58, .06); overflow: hidden;
}
.sub-prev--plain { box-shadow: none; background: #F8FAFC; }

/* ---------------- FINAL CTA ---------------- */
.sub-final {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 30px;
    margin-top: 8px; padding: 32px 38px; border-radius: var(--u-radius);
    background: linear-gradient(135deg, #EAF4FB 0%, #F3F9FD 100%); border: 1px solid #D6E8F4;
}
.sub-final--solid {
    background: linear-gradient(135deg, #4FBEEC 0%, #27A3DC 55%, #1A86B8 100%);
    border-color: transparent; color: #fff;
}
.sub-final__icon {
    flex: none; width: 58px; height: 58px; border-radius: 14px; background: #fff;
    color: var(--u-primary); display: flex; align-items: center; justify-content: center;
    font-size: 1.45rem; box-shadow: var(--u-shadow);
}
.sub-final--solid .sub-final__icon { background: rgba(255, 255, 255, .18); color: #fff; box-shadow: none; }
.sub-final__title { margin: 0 0 6px; font-size: clamp(1.2rem, 2.2vw, 1.5rem); font-weight: 800; color: var(--u-ink); line-height: 1.25; }
.sub-final--solid .sub-final__title { color: #fff; }
.sub-final__text { margin: 0; max-width: 48em; color: var(--u-ink-3); font-size: .94rem; line-height: 1.55; }
.sub-final--solid .sub-final__text { color: rgba(255, 255, 255, .92); }
.sub-final__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.sub-final__link { color: #fff; font-size: .88rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; opacity: .92; }
.sub-final__link:hover { opacity: 1; color: var(--u-accent); }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 992px) {
    .sub-layout { grid-template-columns: 1fr; gap: 0; }
    .sub-toc { display: none; }
}
@media (max-width: 860px) {
    .sub-hero { grid-template-columns: 1fr; }
    .sub-hero__copy { padding: 36px 28px; order: 2; }
    .sub-hero__media { min-height: 220px; order: 1; }
    .sub-hero__device { order: 1; margin: 22px auto; }
    .sub-step { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .sub-step { padding: 26px 22px; gap: 20px; }
    .sub-btn { width: 100%; justify-content: center; }
    .sub-hero__actions .sub-btn { width: auto; }
    .sub-final { grid-template-columns: 1fr; text-align: center; gap: 20px; padding: 30px 24px; }
    .sub-final__icon { justify-self: center; }
    .sub-final__text { margin-inline: auto; }
    .sub-final__actions { align-items: stretch; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .sub-btn:hover { transform: none; }
}
