/* Sleep Circular Publications. Transforma Sans: self-host it in the theme (see README). */

  .sc-pub {
    --blue:     #345aeb;   /* brand: Electric Blue */
    --green:    #34eb51;   /* brand: Neon Green */
    --ink:      #12142a;   /* dark ink, kept in the blue family */
    --ink-deep: #0a0e24;   /* near-black navy */
    --paper:    #ffffff;
    --soft:     #f2f4fa;
    --muted:    #5c6178;
    --line:     #e2e5ec;
    --title: 'Transforma Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
    --sans:  'Work Sans', system-ui, sans-serif;

    display: block;
    background: var(--paper);
    font-family: var(--sans);
    color: var(--ink);
    max-width: 1220px;
    margin: 0 auto;
    padding: clamp(48px, 7vw, 96px) clamp(20px, 4vw, 40px);
    box-sizing: border-box;
  }
  .sc-pub * { box-sizing: border-box; }

  /* ---- head ---- */
  .sc-pub .pub__head { max-width: 720px; margin: 0 0 clamp(36px, 5vw, 56px); }
  .sc-pub .pub__eyebrow {
    display: inline-block; margin-bottom: 16px;
    font-family: var(--sans);
    font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: var(--green);
  }
  .sc-pub .pub__title {
    margin: 0 0 16px; font-family: var(--title); font-weight: 900;
    font-size: clamp(1.8rem, 3.8vw, 2.8rem); line-height: 1.14; letter-spacing: -.005em;
    color: var(--ink);
  }
  .sc-pub .pub__title em { font-style: normal; color: var(--green); }
  .sc-pub .pub__lead {
    margin: 0; max-width: 58ch;
    font-family: var(--sans); font-weight: 400;
    font-size: 1.05rem; line-height: 1.6; color: var(--muted);
  }

  /* ---- controls ---- */
  .sc-pub .pub__controls {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
  }
  .sc-pub .pub__pills { display: flex; flex-wrap: wrap; gap: 8px; }
  .sc-pub .pub__pill {
    padding: 9px 16px; border-radius: 100px;
    background: var(--soft); border: 1px solid var(--line);
    font-family: var(--sans); font-size: .85rem; font-weight: 500; color: var(--muted);
    cursor: pointer; white-space: nowrap;
    transition: background .25s, border-color .25s, color .25s;
  }
  .sc-pub .pub__pill:hover { border-color: var(--blue); color: var(--ink); }
  .sc-pub .pub__pill.is-active { background: var(--ink-deep); border-color: var(--ink-deep); color: #fff; }
  .sc-pub .pub__pill .cnt { opacity: .6; font-size: .8em; margin-left: 2px; }

  .sc-pub .pub__search {
    position: relative; flex: 0 1 260px; min-width: 200px;
  }
  .sc-pub .pub__search input {
    width: 100%; padding: 10px 14px 10px 38px;
    border: 1px solid var(--line); border-radius: 100px;
    background: var(--soft);
    font-family: var(--sans); font-size: .88rem; color: var(--ink);
    outline: none;
    transition: border-color .25s, background .25s;
  }
  .sc-pub .pub__search input:focus { border-color: var(--blue); background: #fff; }
  .sc-pub .pub__search svg {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: var(--muted); pointer-events: none;
  }

  /* ---- grid ---- */
  .sc-pub .pub__grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  }
  @media (max-width: 900px) { .sc-pub .pub__grid { grid-template-columns: repeat(2, 1fr); gap: 18px; } }
  @media (max-width: 560px) { .sc-pub .pub__grid { grid-template-columns: 1fr; } }

  .sc-pub .pub__card {
    display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--line); border-radius: 16px;
    overflow: hidden;
    opacity: 0; transform: translateY(14px);
    animation: pub-in .45s cubic-bezier(.16,1,.3,1) forwards;
    transition: box-shadow .35s cubic-bezier(.16,1,.3,1), transform .35s cubic-bezier(.16,1,.3,1), border-color .35s;
  }
  .sc-pub .pub__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -20px rgba(18,20,42,.25);
    border-color: transparent;
  }
  @keyframes pub-in { to { opacity: 1; transform: translateY(0); } }

  /* thumbnail zone */
  .sc-pub .pub__thumb {
    position: relative; aspect-ratio: 16 / 9;
    background: var(--cat-bg, var(--soft));
    overflow: hidden;
  }
  .sc-pub .pub__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

  /* slide mockup (no real thumbnail), landscape like a 16:9 deck */
  .sc-pub .pub__mock { position: absolute; inset: 24% 14% 9%; }
  .sc-pub .pub__mock-page {
    position: absolute; inset: 0;
    background: #fff; border-radius: 6px;
    box-shadow: 0 10px 22px -14px rgba(18,20,42,.3);
  }
  .sc-pub .pub__mock-fold {
    position: absolute; top: 0; right: 0; width: 22px; height: 22px;
    background: var(--cat-tint, var(--soft));
    clip-path: polygon(100% 0, 0 0, 100% 100%);
  }
  .sc-pub .pub__mock-bar {
    position: absolute; left: 8%; right: 55%; top: 18%; height: 7px; border-radius: 4px;
    background: var(--cat-color, var(--green));
  }
  .sc-pub .pub__mock-lines {
    position: absolute; left: 8%; right: 48%; top: 38%; bottom: 16%;
    background-image: repeating-linear-gradient(to bottom, var(--line) 0, var(--line) 2px, transparent 2px, transparent 11px);
    opacity: .85;
  }
  .sc-pub .pub__mock-ext {
    position: absolute; right: 7%; bottom: 9%; line-height: 1;
    font-family: var(--title); font-weight: 900; font-size: clamp(1rem, 1.9vw, 1.45rem);
    color: var(--cat-color, var(--green)); opacity: .18; letter-spacing: .01em;
  }

  /* overlaid badges */
  .sc-pub .pub__cat-tag {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    padding: 5px 11px; border-radius: 100px;
    background: var(--cat-color, var(--ink-deep)); color: #fff;
    font-family: var(--sans);
    font-size: .68rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  }
  .sc-pub .pub__type-tag {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    padding: 5px 10px; border-radius: 6px;
    background: rgba(18,20,42,.85); color: #fff;
    font-family: var(--sans); font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  }

  /* body */
  .sc-pub .pub__body { display: flex; flex-direction: column; flex: 1; padding: 18px 18px 20px; }
  .sc-pub .pub__doc-title {
    margin: 0 0 8px; font-family: var(--title); font-weight: 700;
    font-size: 1.08rem; line-height: 1.3; color: var(--ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .sc-pub .pub__meta {
    margin: 0 0 10px; font-family: var(--sans);
    font-size: .78rem; color: var(--muted);
    display: flex; gap: 8px; align-items: center;
  }
  .sc-pub .pub__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); opacity: .6; }
  .sc-pub .pub__summary {
    margin: 0 0 18px; font-family: var(--sans); font-weight: 400;
    font-size: .87rem; line-height: 1.5; color: var(--muted);
    flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }

  .sc-pub .pub__dl {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 16px; border-radius: 100px;
    background: var(--ink-deep); color: #fff;
    font-family: var(--sans);
    font-size: .82rem; font-weight: 600; text-decoration: none;
    transition: background .3s, gap .3s, transform .3s;
  }
  .sc-pub .pub__dl svg { width: 14px; height: 14px; transition: transform .3s; }
  .sc-pub .pub__dl:hover { background: var(--blue); gap: 10px; transform: translateY(-1px); }
  .sc-pub .pub__dl:hover svg { transform: translateY(2px); }

  /* ---- pager (reuses the same pattern as your news grid) ---- */
  .sc-pub .pub__pager { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 40px; }
  .sc-pub .pub__pager-btn {
    min-width: 42px; height: 42px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    background: #fff; border: 1px solid var(--line); border-radius: 11px;
    font-family: var(--sans); font-size: .92rem; font-weight: 500; color: var(--ink);
    cursor: pointer; transition: all .25s; font-variant-numeric: tabular-nums;
  }
  .sc-pub .pub__pager-btn:hover:not(:disabled):not(.is-active) { border-color: var(--blue); color: var(--blue); }
  .sc-pub .pub__pager-btn.is-active { background: var(--green); border-color: var(--green); color: var(--ink); font-weight: 700; cursor: default; }
  .sc-pub .pub__pager-btn:disabled { opacity: .4; cursor: not-allowed; }
  .sc-pub .pub__pager-btn svg { width: 15px; height: 15px; }
  .sc-pub .pub__pager-ellipsis { min-width: 20px; text-align: center; color: var(--muted); font-weight: 600; }
  .sc-pub .pub__pager-meta { width: 100%; text-align: center; margin-top: 12px; font-family: var(--sans); font-size: .8rem; color: var(--muted); }

  .sc-pub .pub__empty { text-align: center; padding: 60px 20px; font-family: var(--sans); color: var(--muted); font-size: 1rem; grid-column: 1 / -1; }

  @media (prefers-reduced-motion: reduce) {
    .sc-pub .pub__card { animation: none; opacity: 1; transform: none; }
    .sc-pub .pub__card, .sc-pub .pub__dl, .sc-pub .pub__dl svg, .sc-pub .pub__pill { transition: none; }
  }

  .sc-pub .pub__app { display: block; }
  .sc-pub .pub__search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sc-pub .pub__dl:focus-visible, .sc-pub .pub__pill:focus-visible, .sc-pub .pub__pager-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

  /* keep theme / Elementor kit styles from leaking in */
  .sc-pub button, .sc-pub input { margin: 0; text-transform: none; box-shadow: none; line-height: normal; min-height: 0; }
  .sc-pub h2, .sc-pub h3, .sc-pub p { text-transform: none; }
  .sc-pub a.pub__dl, .sc-pub a.pub__dl:hover { color: #fff; text-decoration: none; }
  .sc-pub .pub__pill:hover, .sc-pub .pub__pill:focus { background: var(--soft); }
  .sc-pub .pub__pill.is-active, .sc-pub .pub__pill.is-active:hover { background: var(--ink-deep); color: #fff; }
  .sc-pub .pub__pager-btn:hover:not(:disabled):not(.is-active) { background: #fff; }
