/* Blog and help (/blog, /blog/…, /pomoc, /pomoc/…): the dark band, the featured card, the topic filter, article cards, the one-column article with its
   table of contents, the help search and the help side menu. Shared blocks (gs-*) come from sections.css; the article bodies keep their old markup
   (stat cards, info boxes, step lists, feature cards) and get the new look from the .res-prose rules below. */

.res-page {
  --res-guide-fg: #047857; --res-guide-bg: #ecfdf5;
  --res-security-fg: #b91c1c; --res-security-bg: #fee2e4;
  --res-compare-fg: #1a3a5c; --res-compare-bg: #e8eef5;
  --res-stats-fg: #92400e; --res-stats-bg: #fef3c7;
  --res-soon-fg: #78350f; --res-soon-bg: #fef3c7; --res-soon-bd: #fcd34d;
  --res-nav-top: 88px; /* below the sticky header */
}
body.dark-theme .res-page {
  --res-guide-fg: #6ee7b7; --res-guide-bg: rgba(52, 211, 153, 0.12);
  --res-security-fg: #fca5a5; --res-security-bg: rgba(248, 113, 113, 0.14);
  --res-compare-fg: #93c5fd; --res-compare-bg: rgba(147, 197, 253, 0.14);
  --res-stats-fg: #fcd34d; --res-stats-bg: rgba(252, 211, 77, 0.12);
  --res-soon-fg: #fcd34d; --res-soon-bg: rgba(252, 211, 77, 0.12); --res-soon-bd: rgba(252, 211, 77, 0.35);
}
.res-page [hidden] { display: none !important; }
.res-page a:focus-visible, .res-page button:focus-visible, .res-page summary:focus-visible, .res-page input:focus-visible { outline: 3px solid var(--gs-link); outline-offset: 2px; }
.res-hero a:focus-visible, .res-cta a:focus-visible, .res-hero input:focus-visible { outline-color: var(--gs-sky); }

/* ── Dark band ──────────────────────────────────────────────────────────────── */
.res-hero { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 14px; padding: 56px 0; }
.res-label { font-family: var(--mono); font-size: 13px; color: var(--gs-sky); }
.res-hero .gs-hero-lead { max-width: 640px; }
.res-popular { margin: 0; font-size: 14px; line-height: 1.6; color: #cbd5e1; }
.res-popular a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.res-popular a:hover { color: #ffffff; }

/* ── Tags and meta ──────────────────────────────────────────────────────────── */
.res-tag { align-self: flex-start; font-size: 12px; font-weight: 600; line-height: 1.5; border-radius: 999px; padding: 3px 10px; }
.res-tag-guide { color: var(--res-guide-fg); background: var(--res-guide-bg); }
.res-tag-security { color: var(--res-security-fg); background: var(--res-security-bg); }
.res-tag-compare { color: var(--res-compare-fg); background: var(--res-compare-bg); }
.res-tag-stats { color: var(--res-stats-fg); background: var(--res-stats-bg); }
.res-meta { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.res-badge { margin-left: 8px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; vertical-align: middle; }
.res-badge-soon { color: var(--res-soon-fg); background: var(--res-soon-bg); }
.res-more { font-size: 16px; font-weight: 600; color: var(--gs-link); text-decoration: none; }

/* ── Index: featured card, filter, card grid ────────────────────────────────── */
.res-index { display: flex; flex-direction: column; gap: 28px; padding: 40px 0 64px; }
.res-featured { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px; color: var(--text); text-decoration: none; }
.res-featured:hover, .res-card:hover { border-color: var(--gs-link); }
.res-featured-title { margin: 0; font-size: clamp(1.5rem, 3.2vw, 1.875rem); line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.res-featured-lead { font-size: 17px; line-height: 1.55; color: var(--text-muted); max-width: 760px; }
.res-filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.res-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.res-chip { min-height: 38px; padding: 0 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--gs-link); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; }
.res-chip:hover { border-color: var(--gs-link); }
.res-chip[aria-pressed="true"] { color: #ffffff; background: var(--gs-navy-2); border-color: var(--gs-navy-2); }
.res-pdf { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--gs-link); }
.res-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.res-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.res-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px; color: var(--text); text-decoration: none; }
.res-card-title { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }

/* ── Newsletter band (the form itself is styled in style.css) ───────────────── */
.res-page .newsletter-blog { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 4px 24px; align-items: center; margin: 0; padding: 22px 26px; color: #ffffff; background: var(--gs-navy); border: 0; border-radius: 12px; }
.res-page .newsletter-blog-heading { margin: 0; font-size: 18px; color: #ffffff; }
.res-page .newsletter-blog-subheading { margin: 0; font-size: 15px; color: #cbd5e1; }
.res-page .newsletter-blog .newsletter-form { grid-column: 2; grid-row: 1 / span 2; }
.res-page .newsletter-blog .newsletter-privacy, .res-page .newsletter-blog .newsletter-status { color: #cbd5e1; }

/* ── Article ────────────────────────────────────────────────────────────────── */
.res-art { display: flex; flex-direction: column; gap: 40px; padding: 40px 0 64px; }
.res-art-head { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.res-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--text-muted); }
.res-crumbs li + li::before { content: "›"; margin-right: 8px; }
.res-crumbs a { color: var(--text-muted); text-decoration: none; }
.res-crumbs a:hover { color: var(--gs-link); text-decoration: underline; }
.res-h1 { margin: 0; max-width: 820px; font-size: clamp(2rem, 5vw, 2.875rem); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; color: var(--text); overflow-wrap: anywhere; }
.res-h1-help { font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.15; }
.res-art-lead { margin: 0; max-width: 760px; font-size: clamp(1.0625rem, 2vw, 1.25rem); line-height: 1.5; color: var(--text-muted); }
.res-art-body { display: flex; flex-direction: column; gap: 24px; }

/* Table of contents: a collapsible block above the text on a phone, a sticky column at the side from 1024 px */
.res-toc-m { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.res-toc-m summary { padding: 12px 16px; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; }
.res-toc-m .res-toc-list { padding: 0 16px 14px; }
.res-toc-d { display: none; }
.res-toc-label { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
.res-toc-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.res-toc-list a { color: var(--text-muted); text-decoration: none; line-height: 1.35; overflow-wrap: anywhere; }
.res-toc-list a:hover { color: var(--text); }
.res-toc-list a.on { margin-left: -12px; padding-left: 10px; font-weight: 600; color: var(--text); border-left: 2px solid var(--accent); }
@media (min-width: 1024px) {
  .res-art-body { display: grid; grid-template-columns: minmax(0, 720px) 220px; gap: 56px; align-items: start; }
  .res-toc-m { display: none; }
  .res-toc-d { display: flex; flex-direction: column; gap: 8px; position: sticky; top: var(--res-nav-top); padding-left: 12px; }
}

/* The article body: the old markup in the new style, one column, no alternating section backgrounds */
.res-prose { min-width: 0; max-width: 720px; font-size: 1.0625rem; line-height: 1.7; color: var(--text); overflow-wrap: anywhere; }
.res-prose .section, .res-prose .section-alt { margin: 0; padding: 0; background: none; border: 0; border-image: none; }
.res-prose .section-alt + .section:not(.section-alt), .res-prose .section:not(.section-alt) + .section-alt { padding-top: 0; }
.res-prose .section + .section { margin-top: 8px; }
.res-h2 { margin: 40px 0 12px; font-size: clamp(1.5rem, 3.4vw, 1.75rem); line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; color: var(--text); scroll-margin-top: var(--res-nav-top); }
.res-prose .section:first-child > .res-h2 { margin-top: 0; }
.res-prose p { margin: 0 0 12px; }
.res-prose a:not([class]) { color: var(--gs-link); text-decoration: underline; text-underline-offset: 3px; }
.res-prose ul, .res-prose ol { margin: 0 0 12px; padding-left: 1.4em; }
.res-prose .feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 0 0 16px; }
.res-prose .feature-card { gap: 6px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: none; }
.res-prose .feature-card:hover { border-color: var(--border); box-shadow: none; }
.res-prose .feature-icon svg { width: 24px; height: 24px; }
.res-prose .feature-name { font-size: 1.0625rem; font-weight: 700; color: var(--text); }
.res-prose .feature-desc { font-size: 1rem; line-height: 1.6; color: var(--text); }
.res-prose .stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 8px; }
.res-prose .stat-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.res-prose .stat-card:hover { border-color: var(--border); }
.res-prose .stat-num, .res-prose .stat-number { margin: 0; font-family: var(--body); font-size: 1.375rem; font-weight: 700; line-height: 1.2; color: var(--text); overflow-wrap: normal; word-break: normal; hyphens: manual; }
@media (max-width: 520px) { .res-prose .stat-grid { grid-template-columns: 1fr; } }
.res-prose .stat-label { font-size: 14px; line-height: 1.45; color: var(--text-muted); }
.res-prose .info-box { margin: 16px 0; padding: 14px 18px 16px; font-size: 1rem; line-height: 1.6; color: var(--text); background: var(--surface2); border: 0; border-left: 4px solid var(--gs-link); border-radius: 0 10px 10px 0; }
.res-prose .info-box::before { content: none; }
.res-prose .info-box p:last-child { margin-bottom: 0; }
.res-prose .info-box.tip { border-left-color: var(--green); }
.res-prose .info-box.warning { border-left-color: var(--accent); background: var(--res-security-bg); }
.res-prose .step-list { margin: 8px 0 16px; counter-reset: steps; }
.res-prose .step-list li { position: relative; padding: 14px 0 14px 42px; font-size: 1.0625rem; line-height: 1.6; border-bottom: 1px solid var(--border); }
.res-prose .step-list li::before { left: 0; top: 14px; width: 28px; height: 28px; font-size: 14px; color: #ffffff; background: var(--gs-navy-2); }
.res-prose .table-wrap { margin: 16px 0; }
.res-prose-help .res-h2 { font-size: clamp(1.375rem, 3vw, 1.5rem); margin-top: 32px; }

/* End of the article: call to action (by topic), share row, author, related articles */
.res-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 36px 0 0; padding: 24px; color: #ffffff; background: var(--gs-navy); border-radius: 12px; }
.res-cta-text { display: flex; flex: 1 1 300px; flex-direction: column; gap: 4px; min-width: 0; }
.res-cta-text strong { font-size: 18px; line-height: 1.3; }
.res-cta-text span { font-size: 15px; line-height: 1.5; color: #cbd5e1; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 32px 0 0; padding-top: 20px; border-top: 1px solid var(--border); }
.share-row-title { font-size: 14px; font-weight: 700; color: var(--text-muted); }
.share-row-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--gs-link); text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.share-btn:hover, .share-btn.copied { border-color: var(--gs-link); }
.share-btn svg { flex: none; }
.author-bio { display: flex; flex-direction: column; gap: 4px; margin: 24px 0 0; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.author-bio-label { font-family: var(--mono); font-size: 12px; color: var(--text-muted); }
.author-bio-name { font-size: 1rem; font-weight: 700; }
.author-bio-text { font-size: 15px; line-height: 1.5; color: var(--text-muted); }
.author-bio-link { font-size: 15px; font-weight: 600; color: var(--gs-link); }
.res-related { display: flex; flex-direction: column; gap: 14px; }
.res-related-title { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 700; color: var(--text); }

/* ── Help ───────────────────────────────────────────────────────────────────── */
.res-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.res-cat { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; scroll-margin-top: var(--res-nav-top); }
.res-cat-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; color: var(--text); }
.res-cat-title .res-badge { margin-left: 0; }
.res-cat-sub { margin: 6px 0 0; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.res-cat-skrinjar .res-cat-title::before, .res-cat-kljucar .res-cat-title::before, .res-cat-geslar .res-cat-title::before { content: ""; flex: none; width: 26px; height: 26px; background: center / contain no-repeat; }
.res-cat-skrinjar .res-cat-title::before { background-image: url("skrinjar-znak.svg"); }
body.dark-theme .res-cat-skrinjar .res-cat-title::before { background-image: url("skrinjar-znak-bijeli.svg"); }
.res-cat-geslar .res-cat-title::before { background-image: url("geslar-znak-svijetla-pozadina.svg"); }
body.dark-theme .res-cat-geslar .res-cat-title::before { background-image: url("geslar-znak-tamna-pozadina.svg"); }
.res-cat-kljucar .res-cat-title::before { background-image: url("kljucar-znak.png"); }
.res-cat-generator .res-cat-title::before { content: "***"; font-family: var(--mono); font-size: 18px; }
.res-cat ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.res-cat a { font-size: 15px; color: var(--gs-link); text-decoration: none; }
.res-cat a:hover { text-decoration: underline; }
.res-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.res-contact-text { flex: 1 1 260px; min-width: 0; }
.res-contact-title { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; color: var(--text); }
.res-contact-text p { margin: 4px 0 0; font-size: 15px; color: var(--text-muted); }

/* Search: a field plus the results under it (the field is shown by JavaScript only) */
.res-search { position: relative; width: 100%; max-width: 640px; }
.res-search-input { display: block; width: 100%; height: 40px; padding: 0 12px; font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 9px; }
.res-search-input::placeholder { color: #94a3b8; }
.res-hero .res-search-input { height: 56px; padding: 0 18px; font-size: 17px; color: #0F2044; background: #ffffff; border: 0; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
.res-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20; max-height: min(60vh, 420px); margin: 0; padding: 6px; overflow: auto; list-style: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 32, 68, 0.2); }
.res-results a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; color: var(--text); text-decoration: none; border-radius: 8px; }
.res-results a:hover, .res-results a:focus-visible { background: var(--gs-pill-bg); }
.res-result-title { font-size: 15px; font-weight: 600; }
.res-result-sub { font-size: 13px; line-height: 1.4; color: var(--text-muted); }
.res-results .res-none { padding: 10px 12px; font-size: 14px; color: var(--text-muted); }

/* Article page: side menu + text */
.res-help { display: flex; flex-direction: column; gap: 24px; padding: 32px 0 64px; }
.res-help-main { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0; }
.res-help-main > .res-prose { width: 100%; }
.res-help-main > .res-meta { margin-bottom: 8px; }
.res-side-m { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.res-side-m summary { padding: 12px 16px; font-size: 15px; font-weight: 600; cursor: pointer; }
.res-side-m .res-search, .res-side-m .res-nav { margin: 0 16px 14px; width: auto; }
.res-side-d { display: none; }
.res-nav { display: flex; flex-direction: column; font-size: 14px; }
.res-nav-label { margin: 16px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.res-nav-group:first-child .res-nav-label { margin-top: 0; }
.res-nav ul { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.res-nav a { display: block; padding: 5px 10px; color: var(--text-muted); text-decoration: none; border-radius: 7px; }
.res-nav a:hover { color: var(--text); }
.res-nav a.on { font-weight: 600; color: var(--text); background: var(--gs-pill-bg); }
.res-nav .res-badge { margin-left: 6px; font-size: 10px; letter-spacing: 0; text-transform: none; }
.res-banner { align-self: stretch; margin: 0; padding: 12px 16px; font-size: 15px; line-height: 1.5; border-radius: 10px; }
.res-banner-soon { color: var(--res-soon-fg); background: var(--res-soon-bg); border: 1px solid var(--res-soon-bd); }
.res-help-related { align-self: stretch; padding-top: 20px; margin-top: 12px; border-top: 1px solid var(--border); }
.res-help-ask { margin: 0; font-size: 14px; color: var(--text-muted); }
.res-help-ask a { color: var(--gs-link); font-weight: 600; }
@media (min-width: 1024px) {
  .res-help { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: 48px; align-items: start; }
  .res-side-m { display: none; }
  .res-side-d { display: flex; flex-direction: column; gap: 16px; position: sticky; top: var(--res-nav-top); max-height: calc(100vh - var(--res-nav-top) - 24px); overflow: auto; }
}

@media (max-width: 900px) {
  .res-grid, .res-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .res-page .newsletter-blog { grid-template-columns: minmax(0, 1fr); }
  .res-page .newsletter-blog .newsletter-form { grid-column: 1; grid-row: auto; margin-top: 12px; }
}
@media (max-width: 600px) {
  .res-hero { padding: 40px 0; }
  .res-index { padding: 28px 0 48px; }
  .res-art { gap: 28px; padding: 28px 0 48px; }
  .res-grid, .res-grid-2, .res-cats { grid-template-columns: minmax(0, 1fr); }
  .res-featured { padding: 22px; }
  .res-pdf { margin-left: 0; }
  .res-cta { padding: 20px; }
  .res-cta .gs-btn { width: 100%; }
}
.res-prose img { display: block; max-width: 100%; height: auto; margin: 4px 0 12px; border: 1px solid var(--border); border-radius: 8px; }
