/* Optimum Finanse: blog post layout, design board version 12 (OPTIMUM-182). Loaded on single posts only
   (mu-plugins/optimum-finanse-article.php). Source of the look and sizes: the board's project/article.css.
   ONE GRID: Kadence's .content-container (the site container) in 12 columns, 24 px gutters. Article = #main in
   columns 1-8; side column (.of-rail) in 9-12 behind a column rule, sticky. Then one band "Czytaj także" on the same
   container, then the theme footer. Phone (below 1024 px): one column, 16 px gutters, side column hidden, boxes and
   photo run to the screen edge. No text-wrap rule on body paragraphs (design check). */
body.of-article {
  --of-brand: #22539c; --of-brand-hover: #1159af; --of-brand-wash: #f4f6fa; --of-brand-soft: #e8edf5; --of-on-brand: #fff;
  --of-accounting: #e97c2c; --of-accounting-strong: #ac5b20; --of-credit: #00a2da; --of-credit-strong: #0079a3;
  --of-insurance: #00af79; --of-insurance-strong: #008159;
  --of-ink: #1a202c; --of-ink-2: #2d3748; --of-text: #4a5568; --of-line: #edf2f7; --of-surface-alt: #f7fafc; --of-surface: #fff;
  --of-radius-sm: 6px; --of-radius-md: 16px; --of-radius-pill: 100px;
  --of-shadow-lift: 0 1px 2px #1a202c0a, 0 6px 18px #22539c14;
  --of-focus-ring: 0 0 0 2px #fff, 0 0 0 4px #22539c;
  --of-gutter: 24px; --of-edge: 24px;
  --of-svc: var(--of-brand); --of-svc-strong: var(--of-brand);
  background: var(--of-surface);
}
body.of-svc-accounting { --of-svc: var(--of-accounting); --of-svc-strong: var(--of-accounting-strong); }
body.of-svc-credit { --of-svc: var(--of-credit); --of-svc-strong: var(--of-credit-strong); }
body.of-svc-insurance { --of-svc: var(--of-insurance); --of-svc-strong: var(--of-insurance-strong); }

/* Ground: white page, no boxed card around the post */
.of-article #inner-wrap, .of-article .content-area { background: var(--of-surface); }
.of-article .content-area { margin-top: 0; margin-bottom: 0; }
.of-article .entry.single-entry { background: transparent; box-shadow: none; border-radius: 0; margin-left: 0; margin-right: 0; }
.of-article .entry.single-entry > .entry-content-wrap { padding: 0; }
.of-article .entry-footer { display: none; }

/* The grid every band shares */
.of-article .content-container.site-container,
.of-article .of-endband-in {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--of-gutter);
  max-width: var(--global-content-width, 1320px); margin-left: auto; margin-right: auto;
  padding-left: var(--of-edge); padding-right: var(--of-edge); box-sizing: border-box;
}
.of-article #main.site-main { grid-column: 1 / span 8; min-width: 0; padding-bottom: 80px; }
.of-article .of-rail { grid-column: 9 / span 4; min-width: 0; position: relative; padding: 40px 0 80px 32px; }
.of-article .of-rail::before { content: ""; position: absolute; top: 40px; bottom: 80px; left: 0; border-left: 1px solid var(--of-line); }
/* Pinned below the sticky site header with 24 px of air (--of-sticky-top, set by article.js) and never taller than the
   screen: when the contents list and the call box do not fit, the list scrolls inside and the call box stays visible. */
.of-article .of-rail-in {
  position: sticky; top: var(--of-sticky-top, 24px); display: flex; flex-direction: column; gap: 32px;
  max-height: calc(100vh - var(--of-sticky-top, 24px) - 24px);
}
.of-article .of-toc-nav { display: flex; flex-direction: column; min-height: 0; flex: 0 1 auto; }
.of-article .of-toc { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.of-article .of-rail .of-callbox { flex: none; }

/* Links in the article and the side column */
.of-article .entry-content a:not(.wp-block-button__link),
.of-article .of-standfirst a {
  color: var(--of-brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.of-article .entry-content a:not(.wp-block-button__link):hover { color: var(--of-brand-hover); text-decoration-thickness: 2px; }
.of-article .entry-content a:focus-visible, .of-article .of-rail a:focus-visible, .of-article .of-rel:focus-visible {
  outline: 2px solid transparent; box-shadow: var(--of-focus-ring); border-radius: 2px;
}

/* Article header: breadcrumb with the category as kicker, headline 48/56/800, standfirst 24/34, byline */
.of-article .entry-header { padding-top: 40px; margin-bottom: 0; }
.of-article .kadence-breadcrumbs { margin: 0; font-size: 14px; line-height: 20px; color: var(--of-text); }
.of-article .kadence-breadcrumb-container { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.of-article .kadence-breadcrumbs a { color: var(--of-text); text-decoration: none; }
.of-article .kadence-breadcrumbs a:hover { color: var(--of-brand); }
.of-article .kadence-breadcrumb-container > .kadence-bread-current,
.of-article .kadence-breadcrumb-container > .bc-delimiter:nth-last-child(2) { display: none; }
.of-article .kadence-breadcrumb-container > span:nth-last-child(3) a { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--of-svc-strong); }
.of-article .kadence-breadcrumb-container > span:nth-last-child(3) a::before { content: ""; width: 16px; height: 4px; border-radius: var(--of-radius-pill); background: var(--of-svc); }
.of-article .entry-header .entry-taxonomies,
.of-article .entry-header .entry-meta { display: none; }
.of-article .entry-header .entry-title {
  margin: 16px 0 0; font-size: 48px; line-height: 56px; font-weight: 800; letter-spacing: -0.015em; color: var(--of-ink); text-wrap: balance;
}
.of-article .of-standfirst { margin: 24px 0 0; font-size: 24px; line-height: 34px; font-weight: 400; color: var(--of-ink); }
.of-article .of-byline { display: flex; gap: 16px; align-items: center; margin-top: 32px; padding: 16px 0; border-top: 1px solid var(--of-line); border-bottom: 1px solid var(--of-line); }
.of-article .of-seal { flex: none; width: 48px; height: 48px; border-radius: 200px; background: var(--of-brand); color: var(--of-on-brand); display: inline-flex; align-items: center; justify-content: center; }
.of-article .of-by-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.of-article .of-by-text p { margin: 0; }
.of-article .of-by-who { font-size: 16px; line-height: 24px; color: var(--of-ink-2); }
.of-article .of-by-who b { font-weight: 700; color: var(--of-ink); }
.of-article .of-by-who .of-cert { display: block; font-size: 14px; line-height: 20px; color: var(--of-text); }
.of-article .of-by-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 14px; line-height: 20px; color: var(--of-text); }
.of-article .of-legal { display: inline-flex; align-items: center; gap: 6px; color: var(--of-brand); font-weight: 700; }
.of-article .of-legal .of-icon { flex: none; }

/* Featured photo: 16:9, the column's width */
.of-article .article-post-thumbnail { margin: 32px 0 0; padding-bottom: 56.25%; border-radius: var(--of-radius-md); }
/* The theme sets the ratio it was configured with (1:2) through .wp-site-blocks .post-thumbnail.kadence-thumbnail-ratio-*: outrank it. */
.of-article .wp-site-blocks .post-thumbnail.article-post-thumbnail { padding-bottom: 56.25%; }
.of-article .article-post-thumbnail img { border-radius: var(--of-radius-md); }
.of-article .of-photo-credit { margin: 8px 0 0; font-size: 13px; line-height: 20px; color: var(--of-text); }

/* Body: 20/32, blocks 24 apart, sections 56 */
.of-article .entry-content.single-content { margin: 32px 0 0; color: var(--of-text); }
.of-article .single-content > * { margin-top: 0; margin-bottom: 0; }
.of-article .single-content > * + * { margin-top: 24px; }
.of-article .single-content > p,
.of-article .single-content > ul > li,
.of-article .single-content > ol > li { font-size: 20px; line-height: 32px; color: var(--of-text); }
.of-article .single-content h2 { margin: 56px 0 0; font-size: 30px; line-height: 38px; font-weight: 700; letter-spacing: -0.01em; color: var(--of-ink); scroll-margin-top: var(--of-anchor, 112px); /* header row + 28 px, set by article.js */ }
.of-article .single-content > h2 + * { margin-top: 16px; }
.of-article .single-content h3 { margin: 32px 0 0; font-size: 22px; line-height: 30px; font-weight: 700; color: var(--of-ink); }
.of-article .single-content > h3 + * { margin-top: 12px; }
.of-article .single-content > ul:not(.of-checklist) { padding-left: 24px; }
.of-article .single-content > ol { padding-left: 32px; }
.of-article .single-content > ul:not(.of-checklist) li + li, .of-article .single-content > ol li + li { margin-top: 8px; }
.of-article .single-content > ul:not(.of-checklist) li::marker, .of-article .single-content > ol li::marker { color: var(--of-brand); }
.of-article .single-content strong { color: var(--of-ink); font-weight: 700; }
.of-article .single-content h2 strong { color: inherit; font-weight: inherit; }
.of-article .single-content > p:has(> em:only-child) { font-size: 16px; line-height: 26px; }
.of-article .single-content figure.wp-block-image img { border-radius: var(--of-radius-md); height: auto; }
.of-article .single-content figure.wp-block-image figcaption { margin-top: 8px; font-size: 13px; line-height: 20px; color: var(--of-text); }

/* Tables */
.of-article .single-content .wp-block-table { overflow-x: auto; }
.of-article .single-content .wp-block-table table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 24px; font-variant-numeric: tabular-nums; }
.of-article .single-content .wp-block-table th,
.of-article .single-content .wp-block-table td { padding: 12px 16px 12px 0; border: 0; border-bottom: 1px solid var(--of-line); text-align: left; vertical-align: top; word-break: normal; overflow-wrap: normal; }
.of-article .single-content .wp-block-table thead th { border-bottom: 2px solid var(--of-ink); font-size: 14px; line-height: 20px; font-weight: 700; color: var(--of-ink); }

/* Quotes */
.of-article .single-content .wp-block-quote { margin-left: 0; margin-right: 0; padding: 0 0 0 24px; border-left: 4px solid var(--of-brand); background: none; }
.of-article .single-content .wp-block-quote p { font-size: 20px; line-height: 32px; color: var(--of-ink-2); }
.of-article .single-content .wp-block-quote p.has-background { background: none !important; padding: 0; }

/* ONE BOX LANGUAGE: "W skrócie", "Wyliczenie", the contact block and the side column's call box.
   brand-wash fill, radius 16, no border, no shadow, 32 px padding (24 in the side column), a 14/20/700 label. */
.of-article .single-content .of-box,
.of-article .of-rail .of-box { background-color: var(--of-brand-wash) !important; border-radius: var(--of-radius-md); padding: 32px; border: 0; box-shadow: none; }
.of-article .single-content .of-box > .wp-block-group__inner-container > * { margin-top: 0; margin-bottom: 0; }
.of-article .single-content .of-box > .wp-block-group__inner-container > * + * { margin-top: 12px; }
.of-article .of-lbl { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; line-height: 20px; font-weight: 700; color: var(--of-ink); }
.of-article .of-lbl strong { font-weight: 700; color: inherit; }
.of-article .of-lbl .of-icon { flex: none; color: var(--of-brand); }
.of-article .single-content .of-box p:not(.of-lbl),
.of-article .single-content .of-box li { font-size: 18px; line-height: 30px; color: var(--of-ink-2); }
.of-article .single-content .of-box ul { margin: 0; padding-left: 22px; }
.of-article .single-content .of-box li + li { margin-top: 6px; }
.of-article .single-content .of-box li::marker { color: var(--of-brand); }
.of-article .single-content .of-box:not(.of-cta) h2 { margin: 0; font-size: 20px; line-height: 28px; letter-spacing: 0; }

/* The contact block at the end */
.of-article .single-content > .of-cta { margin-top: 56px; }
.of-article .single-content .of-cta > * { margin-top: 0; margin-bottom: 0; }
.of-article .single-content .of-cta > h2 { margin: 0; font-size: 30px; line-height: 38px; }
.of-article .single-content .of-cta > * + * { margin-top: 16px; }
.of-article .of-cta > p { font-size: 18px; line-height: 30px; color: var(--of-text); }
.of-article .single-content .of-cta > .wp-block-buttons { margin-top: 24px; }
.of-article .of-cta .wp-block-quote { padding-left: 16px; }
.of-article .of-cta .wp-block-quote p { font-size: 18px; line-height: 30px; }

/* Checklist: a list, not a box */
.of-article .single-content > .of-checklist { list-style: none; margin-bottom: 0; padding: 0; border-top: 1px solid var(--of-line); }
.of-article .single-content > .of-checklist > li { position: relative; margin: 0; padding: 12px 0 12px 40px; border-bottom: 1px solid var(--of-line); font-size: 18px; line-height: 30px; color: var(--of-text); }
.of-article .single-content > .of-checklist > li::before { content: ""; position: absolute; left: 0; top: 16px; width: 22px; height: 22px; box-sizing: border-box; border-radius: var(--of-radius-sm); border: 2px solid var(--of-brand); background: var(--of-surface); }

/* FAQ: the details blocks in a row */
.of-article .single-content > details.wp-block-details { margin-top: 0; padding: 0; border: 0; border-bottom: 1px solid var(--of-line); border-radius: 0; background: none; box-shadow: none; }
.of-article .single-content > :not(details) + details.wp-block-details { margin-top: 16px; border-top: 1px solid var(--of-line); }
.of-article .single-content > details + :not(details) { margin-top: 32px; }
.of-article .single-content details > summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 24px; box-sizing: border-box; min-height: 72px; padding: 16px 0;
  font-size: 20px; line-height: 28px; font-weight: 700; color: var(--of-ink); cursor: pointer;
}
.of-article .single-content details > summary::-webkit-details-marker { display: none; }
.of-article .single-content details > summary::after {
  content: ""; flex: none; width: 32px; height: 32px; border-radius: 200px; background-color: var(--of-brand-wash);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2322539c' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.of-article .single-content details[open] > summary::after {
  background-color: var(--of-brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
}
.of-article .single-content details > summary:focus-visible { outline: 2px solid transparent; box-shadow: var(--of-focus-ring); border-radius: 2px; }
.of-article .single-content details > :not(summary) { margin: 0; padding: 0 0 24px; font-size: 18px; line-height: 30px; color: var(--of-text); }

/* Buttons (the post's own button block and the call box button): one pill style */
.of-article .single-content .wp-block-button__link,
.of-article .of-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 28px; box-sizing: border-box;
  border-radius: var(--of-radius-pill); background: var(--of-brand); color: var(--of-on-brand); font-size: 16px; line-height: 24px; font-weight: 700; text-decoration: none;
}
.of-article .single-content .wp-block-button__link:hover, .of-article .of-btn:hover { background: var(--of-brand-hover); color: var(--of-on-brand); }

/* Side column: contents, then the call box */
.of-article .of-toc-h { margin: 0; padding-bottom: 12px; border-bottom: 2px solid var(--of-ink); font-size: 14px; line-height: 20px; font-weight: 700; color: var(--of-ink); }
.of-article .of-toc { list-style: none; margin: 0; padding: 0; }
.of-article .of-toc li { margin: 0; border-bottom: 1px solid var(--of-line); }
.of-article .of-toc a { display: block; padding: 10px 0; font-size: 14px; line-height: 20px; color: var(--of-ink-2); text-decoration: none; }
.of-article .of-toc a:hover { color: var(--of-brand); }
.of-article .of-toc a.is-current { color: var(--of-brand); font-weight: 700; box-shadow: inset 3px 0 0 var(--of-brand); padding-left: 12px; }
.of-article .of-rail .of-box { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.of-article .of-callbox p { margin: 0; }
.of-article .of-tel { font-size: 24px; line-height: 32px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.of-article .of-tel a { color: var(--of-ink); text-decoration: none; }
.of-article .of-tel a:hover { color: var(--of-brand); }
.of-article .of-sub { margin-top: -12px !important; font-size: 14px; line-height: 20px; color: var(--of-text); }
.of-article .of-callbox .of-btn { width: 100%; padding-left: 16px; padding-right: 16px; }

/* End of page: one band on the same 12 columns, three cards of 4 columns */
.of-article .of-endband { background: var(--of-surface-alt); border-top: 1px solid var(--of-line); }
.of-article .of-endband-in { padding-top: 56px; padding-bottom: 80px; row-gap: var(--of-gutter); }
.of-article .of-endband-h { grid-column: 1 / -1; margin: 0; padding-bottom: 12px; border-bottom: 2px solid var(--of-ink); font-size: 14px; line-height: 20px; font-weight: 700; color: var(--of-ink); }
.of-article .of-rel { grid-column: span 4; display: flex; flex-direction: column; gap: 12px; padding: 24px; background: var(--of-surface); border-radius: var(--of-radius-md); box-shadow: var(--of-shadow-lift); text-decoration: none; }
.of-article .of-rel-k { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 700; color: var(--of-brand); }
.of-article .of-rel-k::before { content: ""; width: 16px; height: 4px; border-radius: var(--of-radius-pill); background: var(--of-brand); }
.of-article .of-rel-k.of-k-accounting { color: var(--of-accounting-strong); } .of-article .of-rel-k.of-k-accounting::before { background: var(--of-accounting); }
.of-article .of-rel-k.of-k-credit { color: var(--of-credit-strong); } .of-article .of-rel-k.of-k-credit::before { background: var(--of-credit); }
.of-article .of-rel-k.of-k-insurance { color: var(--of-insurance-strong); } .of-article .of-rel-k.of-k-insurance::before { background: var(--of-insurance); }
.of-article .of-rel-t { font-size: 20px; line-height: 28px; font-weight: 700; color: var(--of-ink); }
.of-article .of-rel:hover .of-rel-t { color: var(--of-brand); }
.of-article .of-rel-d { margin-top: auto; padding-top: 8px; font-size: 14px; line-height: 20px; color: var(--of-text); }

/* Phone and tablet (Kadence's desktop breakpoint is 1024 px) */
@media (max-width: 1023px) {
  body.of-article { --of-edge: 16px; }
  .of-article .content-container.site-container { display: block; }
  .of-article .of-rail { display: none; }
  .of-article #main.site-main { padding-bottom: 56px; }
  .of-article .entry-header { padding-top: 24px; }
  .of-article .entry-header .entry-title { margin-top: 12px; font-size: 30px; line-height: 36px; }
  .of-article .of-standfirst { margin-top: 16px; font-size: 20px; line-height: 30px; }
  .of-article .of-byline { margin-top: 24px; align-items: flex-start; gap: 12px; }
  .of-article .of-seal { width: 40px; height: 40px; }
  .of-article .article-post-thumbnail { margin: 24px calc(-1 * var(--of-edge)) 0; border-radius: 0; }
  /* Edge to edge: the box is wider than its container by two gutters, and a percentage padding counts from the container. */
  .of-article .wp-site-blocks .post-thumbnail.article-post-thumbnail { padding-bottom: calc((100% + 2 * var(--of-edge)) * 0.5625); }
  .of-article .article-post-thumbnail img { border-radius: 0; }
  .of-article .single-content > p, .of-article .single-content > ul > li, .of-article .single-content > ol > li { font-size: 17px; line-height: 28px; }
  .of-article .single-content h2 { margin-top: 40px; font-size: 24px; line-height: 30px; }
  .of-article .single-content > h2 + * { margin-top: 12px; }
  .of-article .single-content .of-box { margin-left: calc(-1 * var(--of-edge)); margin-right: calc(-1 * var(--of-edge)); border-radius: 0; padding: 24px var(--of-edge); }
  .of-article .single-content .of-box p:not(.of-lbl), .of-article .single-content .of-box li,
  .of-article .single-content > .of-checklist > li, .of-article .single-content details > :not(summary),
  .of-article .of-cta > p, .of-article .single-content .wp-block-quote p { font-size: 16px; line-height: 26px; }
  .of-article .single-content > .of-checklist > li { padding-left: 34px; }
  .of-article .single-content > .of-checklist > li::before { top: 15px; width: 20px; height: 20px; }
  .of-article .single-content details > summary { font-size: 17px; line-height: 24px; min-height: 64px; }
  .of-article .single-content > .of-cta { margin-top: 40px; }
  .of-article .single-content .of-cta > h2 { font-size: 24px; line-height: 30px; }
  .of-article .of-cta .wp-block-buttons, .of-article .of-cta .wp-block-button { width: 100%; }
  .of-article .of-cta .wp-block-button__link { width: 100%; }
  .of-article .single-content .wp-block-table table { font-size: 14px; line-height: 20px; }
  /* Four or more columns do not fit a phone without breaking words: the table keeps a readable width and scrolls sideways inside its box. */
  .of-article .single-content .wp-block-table table:has(tr > :nth-child(4)) { min-width: 560px; table-layout: auto; }
  .of-article .of-endband-in { display: flex; flex-direction: column; gap: 16px; padding-top: 40px; padding-bottom: 56px; }
  .of-article .of-endband-h { margin-bottom: 8px; }
  .of-article .of-rel { padding: 16px; }
  .of-article .of-rel-t { font-size: 18px; line-height: 26px; }
  /* Design check: the footer's last line ("© 2026 Optimum Finanse. Wszelkie prawa zastrzeżone", 323 px at 13 px)
     stays on one line on a 390 px phone; narrower phones may still wrap it (no nowrap, so never a sideways scroll). */
  .of-article .footer-html-inner p { font-size: 13px; line-height: 20px; }
}
