/*
 * Network publications: library, product page, product block, homepage teaser
 * (seo-audit-kit publications, artboards Library and Product).
 *
 * The site sets its own palette and fonts through these properties on :root
 * or on a wrapper (defaults are the canvas values):
 *   --pub-accent        the site's accent (buttons, eyebrows, active chips)
 *   --pub-accent-ink    text on the accent (default white)
 *   --pub-ink           body text
 *   --pub-muted         secondary text
 *   --pub-line          rules and borders
 *   --pub-bg            page background of the library and the lower band
 *   --pub-card          card background
 *   --pub-sans          headings, chips, buttons (default: inherit the site's)
 *   --pub-serif         running text (default: inherit the site's)
 *   --pub-radius        corner radius of cards and buttons
 *   --pub-max           content width
 */
.pub {
  --_accent: var(--pub-accent, #0F4C5C);
  --_accent-ink: var(--pub-accent-ink, #ffffff);
  --_ink: var(--pub-ink, #16181D);
  --_muted: var(--pub-muted, #4A4F5A);
  --_line: var(--pub-line, #D5D8DE);
  --_bg: var(--pub-bg, #F6F7F9);
  --_card: var(--pub-card, #ffffff);
  --_sans: var(--pub-sans, inherit);
  --_serif: var(--pub-serif, inherit);
  --_radius: var(--pub-radius, 6px);
  --_max: var(--pub-max, 1200px);
  color: var(--_ink);
  font-family: var(--_serif);
  box-sizing: border-box;
}
.pub *, .pub *::before, .pub *::after { box-sizing: border-box; }
.pub [hidden] { display: none !important; }
.pub-wrap { width: 100%; max-width: var(--_max); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.pub-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pub-eyebrow { display: block; font-family: var(--_sans); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--_accent); }
.pub-h1 { hyphens: auto; overflow-wrap: break-word; margin: 0; font-family: var(--_sans); font-size: clamp(30px, 5vw, 44px); line-height: 1.08; font-weight: 800; letter-spacing: -0.015em; text-wrap: balance; color: var(--_ink); }
.pub-h1--product { font-size: clamp(32px, 5.4vw, 46px); }
.pub-h2 { margin: 0 0 14px 0; font-family: var(--_sans); font-size: 26px; font-weight: 800; color: var(--_ink); }
.pub-lead { margin: 0; font-size: clamp(17px, 2.2vw, 20px); line-height: 1.55; text-wrap: pretty; }
.pub-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; background: var(--_accent); color: var(--_accent-ink) !important; font-family: var(--_sans); font-size: 17px; font-weight: 800; text-decoration: none !important; border: 0; border-radius: 4px; cursor: pointer; }
.pub-btn:hover { filter: brightness(1.08); }
.pub-btn:focus-visible, .pub-chip:focus-visible, .pub-card:focus-visible, .pub-buy__input:focus-visible { outline: 3px solid var(--_accent); outline-offset: 2px; }

/* ── Library ──────────────────────────────────────────────────────────── */
.pub-library { width: 100%; max-width: var(--_max); margin: 0 auto; padding: 56px 24px 72px 24px; display: flex; flex-direction: column; gap: 28px; }
.pub-library__head { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.pub-filters { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--_card); border: 1px solid var(--_line); border-radius: var(--_radius); }
.pub-filters__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pub-filters__label { font-family: var(--_sans); font-size: 13px; font-weight: 700; color: var(--_muted); min-width: 72px; }
.pub-chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid #B9BEC7; background: var(--_card); color: var(--_ink); font-family: var(--_sans); font-size: 14px; font-weight: 600; cursor: pointer; }
.pub-chip.is-on { border-color: var(--_accent); background: var(--_accent); color: var(--_accent-ink); font-weight: 700; }
.pub-count { margin: 0; font-family: var(--_sans); font-size: 14px; color: var(--_muted); }
.pub-none { margin: 0; font-size: 16px; color: var(--_muted); }
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
.pub-card { display: flex; flex-direction: column; background: var(--_card); border: 1px solid var(--_line); border-radius: var(--_radius); overflow: hidden; text-decoration: none !important; color: var(--_ink) !important; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.pub-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(22, 24, 29, 0.10); }
.pub-card__cover { height: 150px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; color: #ffffff; background: var(--pub-item-accent, var(--_accent)); }
.pub-card__site { font-family: var(--_sans); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.9; }
.pub-card__short { font-family: var(--_sans); font-size: 22px; line-height: 1.1; font-weight: 800; hyphens: auto; overflow-wrap: break-word; }
.pub-card__body { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 20px 18px; flex-grow: 1; }
.pub-card__title { font-size: 16px; line-height: 1.45; flex-grow: 1; }
.pub-card__meta { display: flex; justify-content: space-between; align-items: center; font-family: var(--_sans); font-size: 13px; }
.pub-card__lang { padding: 3px 8px; border: 1px solid #B9BEC7; border-radius: 3px; color: #3A4152; font-weight: 600; }
.pub-card__price { font-size: 16px; font-weight: 800; }

/* ── Product page ─────────────────────────────────────────────────────── */
.pub-product { width: 100%; }
.pub-back { display: inline-block; margin-top: 32px; font-family: var(--_sans); font-size: 14px; font-weight: 600; text-decoration: none; color: var(--_accent); }
.pub-notice { max-width: var(--_max); margin: 20px auto 0 auto; padding: 14px 20px; border-radius: var(--_radius); background: #FBEFE3; color: #6B2E07; font-family: var(--_sans); font-size: 15px; font-weight: 600; width: calc(100% - 48px); }
.pub-notice.is-ok { background: #E6F2EA; color: #1F4A2C; }
.pub-product__top { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; padding-top: 32px; padding-bottom: 56px; }
.pub-cover { flex: 1 1 300px; max-width: 420px; aspect-ratio: 794 / 1123; display: flex; flex-direction: column; background: #ffffff; border: 1px solid var(--_line); border-radius: 4px; overflow: hidden; box-shadow: 0 10px 30px rgba(22, 24, 29, 0.12); }
.pub-cover__band { flex: 0 0 61%; padding: 28px 30px; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; background: var(--pub-item-accent, var(--_accent)); color: #ffffff; }
.pub-cover__site { font-family: var(--_sans); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: auto; }
.pub-cover__rule { width: 36px; height: 3px; background: #ffffff; }
.pub-cover__title { font-family: var(--_sans); font-size: clamp(24px, 3.2vw, 34px); line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; hyphens: auto; overflow-wrap: break-word; }
.pub-cover__sub { font-size: 13px; line-height: 1.35; }
.pub-cover__foot { flex-grow: 1; padding: 20px 30px; display: flex; align-items: flex-end; font-family: var(--_sans); font-size: 10px; color: var(--_muted); }
.pub-cover--small { flex: 0 0 120px; max-width: 120px; box-shadow: none; }
.pub-cover--small .pub-cover__band { flex: 1 1 auto; padding: 14px 12px; gap: 8px; }
.pub-cover--small .pub-cover__site { font-size: 6.5px; letter-spacing: 0.04em; overflow-wrap: normal; word-break: normal; hyphens: none; }
.pub-cover--small .pub-cover__title { font-size: 12.5px; hyphenate-limit-chars: 10 4 4; }
.pub-cover--small .pub-cover__rule { width: 20px; height: 2px; }
.pub-product__main { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.pub-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; padding: 20px 0 0 0; border-top: 1px solid var(--_line); }
.pub-price__amount { font-family: var(--_sans); font-size: 36px; font-weight: 800; }
.pub-price__meta { font-family: var(--_sans); font-size: 14px; color: var(--_muted); }
.pub-buy { display: flex; flex-direction: column; gap: 8px; }
.pub-buy__label { font-family: var(--_sans); font-size: 14px; font-weight: 700; }
.pub-buy__row { display: flex; flex-wrap: wrap; gap: 12px; }
.pub-buy__input { flex: 1 1 260px; min-height: 52px; padding: 0 14px; border: 1px solid #B9BEC7; border-radius: 4px; font-size: 16px; font-family: var(--_sans); background: #ffffff; color: var(--_ink); }
.pub-buy__error { margin: 0; color: #8A3B0A; font-family: var(--_sans); font-size: 14px; font-weight: 600; }
.pub-note { margin: -8px 0 0 0; font-family: var(--_sans); font-size: 13px; color: var(--_muted); padding-bottom: 20px; border-bottom: 1px solid var(--_line); }
.pub-inside { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 28px; }
.pub-inside li { position: relative; padding-left: 34px; font-size: 16px; line-height: 1.45; }
.pub-inside li::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; background: var(--_accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / contain no-repeat; }
.pub-inside strong { font-family: var(--_sans); }
.pub-band { background: var(--_bg); border-top: 1px solid var(--_line); }
.pub-product__lower { display: flex; flex-wrap: wrap; gap: 56px; padding-top: 56px; padding-bottom: 72px; }
.pub-col { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.pub-contents { list-style: none; margin: 0; padding: 0; font-size: 16px; }
.pub-contents li { padding: 10px 0; border-top: 1px solid var(--_line); }
.pub-faq strong { display: block; font-family: var(--_sans); font-size: 16px; margin-bottom: 6px; }
.pub-faq p { margin: 0; font-size: 16px; line-height: 1.55; }
.pub-btn--big { align-self: flex-start; }

/* ── Product block (topic pages) ─────────────────────────────────────── */
.pub-block { display: flex; gap: 22px; align-items: stretch; margin: 40px 0; padding: 22px; background: var(--_bg); border: 1px solid var(--_line); border-radius: var(--_radius); }
.pub-block__body { display: flex; flex-direction: column; gap: 10px; justify-content: center; min-width: 0; }
.pub-block__h { margin: 0; font-family: var(--_sans); font-size: 21px; line-height: 1.2; font-weight: 800; }
.pub-block__t { margin: 0; font-size: 16px; line-height: 1.55; }
.pub-block .pub-btn { align-self: flex-start; min-height: 46px; font-size: 16px; }

/* ── Homepage teaser ─────────────────────────────────────────────────── */
.pub-teaser { background: var(--_bg); border-top: 1px solid var(--_line); border-bottom: 1px solid var(--_line); }
.pub-teaser__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 22px; padding-bottom: 22px; }
.pub-teaser__text { margin: 0; flex: 1 1 360px; font-size: 18px; line-height: 1.45; }
.pub-teaser__text a { color: var(--_ink); text-decoration: underline; text-underline-offset: 3px; }
.pub-teaser__link { font-family: var(--_sans); font-size: 15px; font-weight: 800; color: var(--_accent); text-decoration: none; white-space: nowrap; }

@media (max-width: 640px) {
  .pub-library { padding: 36px 16px 56px 16px; }
  .pub-wrap { padding-left: 16px; padding-right: 16px; }
  .pub-notice { width: calc(100% - 32px); }
  .pub-product__top { gap: 32px; }
  .pub-cover { max-width: 260px; }
  .pub-block { flex-direction: column; }
  .pub-cover--small { display: none; }
  .pub-btn { width: 100%; }
  .pub-block .pub-btn, .pub-btn--big { width: auto; }
}
