/*
Theme Name: Sozee
Theme URI: https://sozee.ai/
Author: Sozee
Author URI: https://sozee.ai/
Description: Custom block theme for the Sozee Resources blog. Editorial layout, no page builder. Design tokens live in theme.json; this file carries only what theme.json cannot express.
Requires at least: 6.9
Tested up to: 7.0
Requires PHP: 8.2
Version: 0.1.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sozee
Tags: blog, block-theme, editorial
*/

/* =========================================================
   Sozee blog — custom layer
   Source of truth for tokens is theme.json. Everything here
   is layout, article prose, and the composed editorial
   components that block markup alone cannot express.
   ========================================================= */

/* ---------- single: article + sidebar ---------- */
.sz-article-shell {
  /* The design sets maxWidth 1140 on a content-box div with 56px padding
     outside it, giving a 1140px grid and a full 720px measure. WordPress
     resets everything to border-box, so the gutters are added back here —
     without this the article column compresses to 656px. */
  max-width: calc(1140px + (2 * 56px));
  margin-inline: auto;
  padding: 132px var(--wp--custom--layout--gutter) 40px;
  display: grid;
  grid-template-columns: minmax(0, 720px) var(--wp--custom--layout--sidebar);
  /* Masthead and body stack in the left column; the sidebar spans both rows so
     it can still stick. Needed because the masthead is a sibling of the
     article, not a child — see single.html. */
  grid-template-areas:
    "masthead sidebar"
    "article  sidebar";
  gap: 0 56px;
  align-items: start;
}
.sz-article__masthead { grid-area: masthead; }
.sz-article { grid-area: article; }
.sz-sidebar { grid-area: sidebar; }
.sz-sidebar {
  position: sticky; top: 92px; align-self: start;
  display: flex; flex-direction: column; gap: 24px;
}

/* ---------- article masthead ---------- */
.sz-article__masthead {
  padding-bottom: 34px; margin-bottom: 34px;
  border-bottom: 1px solid rgba(28, 27, 27, 0.10);
}

.sz-crumbs { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; }
.sz-crumbs a { font-size: 11.5px; font-weight: 600; color: rgba(28, 27, 27, 0.5); text-decoration: none; }
.sz-crumbs a:hover { color: var(--wp--preset--color--ink); }
.sz-crumbs__sep { font-size: 11px; color: rgba(28, 27, 27, 0.3); }
.sz-kicker {
  border-radius: var(--wp--custom--radius--pill); padding: 4px 11px;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: var(--wp--custom--tracking--label);
  text-transform: uppercase;
  color: var(--wp--preset--color--purple-700);
  background: var(--wp--preset--color--purple-50);
  box-shadow: inset 0 0 0 1px var(--wp--preset--color--purple-200);
}

/* 18px top is the design's `h1 { margin: 0 0 18px }`. It has to be declared
   here rather than left to the block gap: the shorthand below would otherwise
   zero the margin-block-start that WordPress's flow layout supplies, closing
   the headline and standfirst up to nothing. */
.sz-dek { max-width: 640px; margin: 18px 0 26px; text-wrap: pretty; }

.sz-byline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sz-byline__who { display: inline-flex; align-items: center; gap: 9px; }
.sz-byline__avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; padding: 4px; box-sizing: border-box;
  background: var(--wp--preset--color--surface);
  box-shadow: inset 0 0 0 1px rgba(28, 27, 27, 0.1);
}
.sz-byline__avatar img { width: 100%; height: 100%; object-fit: contain; }
.sz-byline__author { font-size: 13px; font-weight: 700; color: var(--wp--preset--color--ink); }
.sz-byline__rule { width: 1px; height: 14px; background: rgba(28, 27, 27, 0.14); }
.sz-byline__meta { font-size: 13px; color: var(--wp--preset--color--text-tertiary); }

.sz-share { margin-left: auto; display: flex; gap: 6px; }
.sz-share__btn {
  width: 30px; height: 30px; border-radius: 50%; border: 0; padding: 0;
  display: grid; place-items: center; cursor: pointer;
  background: var(--wp--preset--color--surface);
  box-shadow: inset 0 0 0 1px rgba(28, 27, 27, 0.1);
  color: var(--wp--preset--color--ink);
  transition: all var(--wp--custom--duration--quick) var(--wp--custom--ease--editorial);
}
.sz-share__btn:hover {
  color: var(--wp--preset--color--purple-700);
  box-shadow: inset 0 0 0 1px var(--wp--preset--color--purple-200);
}
.sz-share__btn.is-copied { background: var(--wp--preset--color--purple-50); color: var(--wp--preset--color--purple-700); }

/* ---------- article prose ---------- */
.sz-article :where(h2) { margin: 54px 0 16px; scroll-margin-top: 110px; text-wrap: balance; }
.sz-article :where(h3) { margin: 34px 0 12px; }
.sz-article :where(p)  { margin: 0 0 18px; line-height: 1.72; text-wrap: pretty; }
.sz-article :where(p) strong { font-weight: 700; color: var(--wp--preset--color--ink); }

.sz-article :where(a) {
  font-weight: 600;
  color: var(--wp--preset--color--purple-700);
  text-decoration: underline;
  text-decoration-color: var(--wp--preset--color--purple-200);
  text-underline-offset: 3px;
}

/* bulleted lists — purple dot, not a native marker */
.sz-article :where(ul):not(.sz-plain) {
  list-style: none; margin: 0 0 22px; padding: 0;
  display: flex; flex-direction: column; gap: 9px;
}
.sz-article :where(ul):not(.sz-plain) > li {
  position: relative; padding-left: 16px;
  font-size: 16px; line-height: 1.6;
  color: var(--wp--preset--color--text-secondary);
}
.sz-article :where(ul):not(.sz-plain) > li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--wp--preset--color--purple-400);
}

/* ---------- key takeaways ---------- */
/* Composed in PHP from the existing `<h2 id="key-takeaways"> + <ul>` pair
   that every migrated post already contains. See mu-plugins/sozee-core.php. */
.sz-takeaways {
  border-radius: 18px;
  background: var(--wp--preset--color--canvas);
  box-shadow: inset 0 0 0 1px rgba(28, 27, 27, 0.09);
  /* Top padding is 12 rather than 24; the summary carries the other 12 as its
     own padding so the whole row is tappable. Visual spacing is unchanged. */
  padding: 12px 26px 26px;
  margin: 0 0 34px;
}
summary.sz-takeaways__label {
  display: flex; align-items: center; gap: 8px;
  /* 12 + 20 + 12 = 44px hit area. The label text alone is 20px tall, which is
     far too small a target on a phone. */
  padding-block: 12px;
  font-size: 11px; font-weight: 800;
  letter-spacing: var(--wp--custom--tracking--eyebrow);
  text-transform: uppercase;
  color: var(--wp--preset--color--purple-700);
  cursor: pointer; list-style: none;
}
summary.sz-takeaways__label::-webkit-details-marker { display: none; }
.sz-takeaways__label::before {
  content: ""; flex-shrink: 0;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--wp--preset--color--purple-500);
}
/* Toggle affordance, matching the mobile contents card. */
.sz-takeaways__label::after {
  content: "+"; margin-left: auto; flex-shrink: 0;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wp--preset--color--surface);
  box-shadow: inset 0 0 0 1px rgba(28, 27, 27, 0.1);
  color: var(--wp--preset--color--ink);
  font-size: 12px; font-weight: 700; letter-spacing: 0;
}
.sz-takeaways[open] .sz-takeaways__label {
  /* 2 here + the summary's own 12px padding = the original 14px gap. */
  margin-bottom: 2px;
}
.sz-takeaways[open] .sz-takeaways__label::after {
  content: "−";
  background: var(--wp--preset--gradient--pulse);
  color: var(--wp--preset--color--on-primary);
  box-shadow: none;
}
.sz-takeaways:not([open]) { padding-bottom: 12px; }
/* Selectors are scoped under .sz-article so they outrank the generic prose
   list rule above, which would otherwise win and stamp a 5px purple dot. */
.sz-article .sz-takeaways ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.sz-article .sz-takeaways li {
  position: relative; padding-left: 26px;
  font-size: 16px; line-height: 1.6;
  color: var(--wp--preset--color--text-secondary);
}
/* checkmark, drawn rather than shipped as an asset */
.sz-article .sz-takeaways li::before {
  content: ""; position: absolute; left: 0; top: 5px;
  width: 15px; height: 15px; border-radius: 0;
  background: var(--wp--preset--color--purple-600);
  -webkit-mask: var(--sz-check) center / contain no-repeat;
  mask: var(--sz-check) center / contain no-repeat;
}
.sz-takeaways__cta { margin-top: 8px; }

:root {
  --sz-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8.4l3.2 3.2L13.5 4' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- tables ---------- */
/* 77% of migrated posts carry a table, 4–7 columns wide. The wrapper (added in
   mu-plugins/sozee-core.php) absorbs the overflow so a 7-column table never
   makes the page scroll sideways. Tonal layering rather than a grid of rules,
   per the design system. */
.sz-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  margin: 10px 0 30px;
  border-radius: var(--wp--custom--radius--card);
  background: var(--wp--preset--color--surface);
  box-shadow: var(--wp--custom--shadow--card-ring);
}
.sz-table:focus-visible {
  outline: 2px solid var(--wp--preset--color--purple-500);
  outline-offset: 2px;
}

.sz-article table {
  /* Fill the measure and let cells wrap. `max-content` here would stop every
     cell wrapping and blow a 5-column table out to ~2300px. The per-cell
     min-width below is what decides when scrolling actually kicks in. */
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.sz-article thead th {
  background: var(--wp--preset--color--surface-low);
  font-size: 11px; font-weight: 800;
  letter-spacing: var(--wp--custom--tracking--label);
  text-transform: uppercase;
  color: var(--wp--preset--color--text-tertiary);
  text-align: left; padding: 13px 16px; white-space: nowrap;
  border-bottom: 1px solid var(--wp--custom--border--hairline);
}

.sz-article tbody td {
  padding: 14px 16px; vertical-align: top; min-width: 150px;
  line-height: 1.55;
  color: var(--wp--preset--color--text-secondary);
  border-top: 1px solid var(--wp--custom--border--hairline);
}
.sz-article tbody tr:first-child td { border-top: 0; }

/* The leading column is a label, not data — give it the ink weight. */
.sz-article tbody td:first-child {
  color: var(--wp--preset--color--ink); font-weight: 600;
}

.sz-article tbody tr:hover td { background: rgba(28, 27, 27, 0.02); }

/* Prose links are underlined for scanning; inside a dense table that reads as
   noise, so lighten the treatment without losing the affordance. */
.sz-article table a {
  font-weight: 500;
  text-decoration-color: var(--wp--preset--color--purple-200);
}

@media (max-width: 720px) {
  .sz-article thead th { padding: 11px 13px; }
  .sz-article tbody td { padding: 12px 13px; min-width: 132px; }
}

/* ---------- inline CTA band ---------- */
.sz-cta {
  border-radius: 18px;
  background: var(--wp--preset--gradient--cta-tint);
  box-shadow: inset 0 0 0 1px var(--wp--preset--color--purple-200);
  padding: 24px 26px;
  margin: 12px 0 32px;
  display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: center;
}
.sz-cta__title {
  font-size: 19px; font-weight: 700; line-height: 1.3;
  letter-spacing: var(--wp--custom--tracking--h3);
  color: var(--wp--preset--color--ink); margin-bottom: 5px;
}
.sz-cta__sub { font-size: 13.5px; line-height: 1.5; color: var(--wp--preset--color--text-secondary); }

/* ---------- pill button ---------- */
.sz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 48px; padding: 0 22px; border-radius: var(--wp--custom--radius--pill);
  background: var(--wp--preset--gradient--pulse);
  color: var(--wp--preset--color--on-primary);
  font-size: 12.5px; font-weight: 800;
  letter-spacing: var(--wp--custom--tracking--button);
  text-transform: uppercase; text-decoration: none;
  box-shadow: var(--wp--custom--shadow--pulse-cta);
  white-space: nowrap;
  transition: transform var(--wp--custom--duration--quick) var(--wp--custom--ease--editorial);
}
/* border-box, or `width: 100%` on the sidebar variant adds its 36px of
   horizontal padding on top and the button breaks out of the card. */
.sz-btn { box-sizing: border-box; }
.sz-btn:hover {
  transform: translateY(-1px);
  color: var(--wp--preset--color--ink);
}
.sz-btn--sm { height: 40px; padding: 0 18px; font-size: 11px; }

/* ---------- dark panel (newsletter / end-of-post CTA) ---------- */
.sz-panel {
  /* border-box, or the 44px padding lands outside the 1140px cap and the panel
     renders 1228px — 88px wider than every other block on the page. */
  box-sizing: border-box;
  border-radius: 22px;
  background: var(--wp--preset--color--ink-panel);
  color: var(--wp--preset--color--on-primary);
  padding: 38px 40px 40px;
}
.sz-panel__eyebrow {
  font-size: 11px; font-weight: 800;
  letter-spacing: var(--wp--custom--tracking--eyebrow);
  text-transform: uppercase;
  color: var(--wp--preset--color--purple-300);
  margin-bottom: 12px;
}
.sz-panel__title {
  font-size: 32px; font-weight: 800; line-height: 1.1;
  letter-spacing: -0.025em; margin-bottom: 12px;
}
.sz-panel__body {
  font-size: 14.5px; line-height: 1.6;
  color: rgba(255, 255, 255, 0.66);
  margin-bottom: 22px; max-width: 460px;
}

/* ---------- sidebar: table of contents ---------- */
.sz-card__label {
  font-size: 10px; font-weight: 800;
  letter-spacing: var(--wp--custom--tracking--eyebrow);
  text-transform: uppercase;
  color: var(--wp--preset--color--purple-700);
  margin-bottom: 12px;
}

/* Contents list — collapsed at every width, expandable. */
summary.sz-toc__label {
  display: flex; align-items: center; gap: 9px;
  /* 12 + 20 + 12 = 44px hit area; the label text alone is only 20px tall. */
  padding-block: 12px;
  font-size: 10px; font-weight: 800;
  letter-spacing: var(--wp--custom--tracking--eyebrow);
  text-transform: uppercase;
  color: var(--wp--preset--color--purple-700);
  cursor: pointer; list-style: none;
}
summary.sz-toc__label::-webkit-details-marker { display: none; }
.sz-toc__label::after {
  content: "+"; margin-left: auto; flex-shrink: 0;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wp--preset--color--surface);
  box-shadow: inset 0 0 0 1px rgba(28, 27, 27, 0.1);
  color: var(--wp--preset--color--ink);
  font-size: 12px; font-weight: 700; letter-spacing: 0;
}
.sz-toc[open] .sz-toc__label { margin-bottom: 2px; }
.sz-toc[open] .sz-toc__label::after {
  content: "−";
  background: var(--wp--preset--gradient--pulse);
  color: var(--wp--preset--color--on-primary);
  box-shadow: none;
}
.sz-toc__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.sz-toc__list a {
  display: flex; gap: 9px; align-items: stretch;
  padding: 6px 0; font-size: 13px; line-height: 1.4; font-weight: 500;
  color: var(--wp--preset--color--text-tertiary);
  text-decoration: none;
  transition: color var(--wp--custom--duration--base) var(--wp--custom--ease--editorial);
}
.sz-toc__list a::before {
  content: ""; width: 2px; border-radius: 2px; flex-shrink: 0;
  background: rgba(28, 27, 27, 0.12);
}
.sz-toc__list a:is(:hover, .is-active) { color: var(--wp--preset--color--ink); font-weight: 700; }
.sz-toc__list a.is-active::before { background: var(--wp--preset--gradient--pulse); }

.sz-card {
  border-radius: 18px;
  background: var(--wp--preset--color--surface);
  box-shadow: var(--wp--custom--shadow--card-ring);
  padding: 20px;
}

/* Titles are ink, not link-purple. Only inline prose links carry the brand
   colour — theme.json's elements.link applies globally, so linked headings and
   card wrappers have to opt back out. */
.sz-card-post h3 a,
.sz-card-post a,
.sz-crumbs a,
.sz-toc__list a,
.sz-nav a:not(.sz-btn) {
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
}
.sz-card-post h3 a:hover { color: var(--wp--preset--color--purple-700); }

/* =========================================================
   SITE NAV — the floating liquid-glass bar from site/nav.jsx
   Logo puck · menu pill · CTA, centred and overlaying the page.
   Both the index (148px) and the article (132px) reserve top
   space for it.
   ========================================================= */
:root {
  --sz-glass-bg: linear-gradient(150deg, rgba(252,248,248,0.66), rgba(243,235,252,0.54));
  --sz-glass-border: 1px solid rgba(255,255,255,0.6);
  --sz-glass-shadow: 0 14px 40px rgba(28,27,27,0.14), inset 0 1px 0 rgba(255,255,255,0.7);
  --sz-glass-blur: blur(24px) saturate(1.7);
}

.sz-nav {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 70; width: max-content; max-width: calc(100vw - 24px);
  display: flex; align-items: flex-start; gap: 10px;
}

.sz-nav__logo,
.sz-nav__pill,
.sz-nav__panel,
.sz-nav__burger {
  background: var(--sz-glass-bg);
  backdrop-filter: var(--sz-glass-blur);
  -webkit-backdrop-filter: var(--sz-glass-blur);
  border: var(--sz-glass-border);
  box-shadow: var(--sz-glass-shadow);
}

.sz-nav__logo {
  width: 48px; height: 48px; border-radius: var(--wp--custom--radius--pill);
  display: grid; place-items: center; flex-shrink: 0; overflow: hidden;
}
.sz-logo__img { width: 22px; height: 22px; object-fit: contain; display: block; }
.sz-logo__img--invert { filter: brightness(0) invert(1); height: 22px; width: auto; }
.sz-logo__word { font-size: 15px; font-weight: 800; letter-spacing: -0.03em; }

.sz-nav__wrap { position: relative; }

.sz-nav__pill {
  border-radius: var(--wp--custom--radius--pill);
  padding: 6px; display: flex; align-items: center; gap: 2px;
}

.sz-nav__tab {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 16px; box-sizing: border-box;
  border: 0; background: transparent; cursor: pointer;
  border-radius: var(--wp--custom--radius--pill);
  font-family: inherit; font-size: 13px; font-weight: 500;
  color: rgba(28, 27, 27, 0.62); white-space: nowrap; text-decoration: none;
  transition: all 0.28s var(--wp--custom--ease--editorial);
}
.sz-nav__tab:hover { color: var(--wp--preset--color--ink); }
.sz-nav__tab.is-open {
  background: rgba(255, 255, 255, 0.85);
  color: var(--wp--preset--color--ink); font-weight: 700;
  box-shadow: 0 2px 8px rgba(28, 27, 27, 0.08);
}
.sz-nav__tab svg { transition: transform 0.3s var(--wp--custom--ease--editorial); }
.sz-nav__tab.is-open svg { transform: rotate(180deg); }

.sz-nav__panel {
  position: absolute; top: 100%; margin-top: 10px;
  border-radius: 20px; overflow: hidden; transform-origin: top center;
  opacity: 0; transform: translateY(-8px) scale(0.97);
  transition: opacity 0.28s var(--wp--custom--ease--editorial),
              transform 0.34s var(--wp--custom--ease--editorial);
}
.sz-nav__panel.is-open { opacity: 1; transform: none; }

.sz-nav__grid {
  padding: 14px 14px 16px; display: grid;
  grid-template-columns: minmax(236px, 1fr); gap: 2px 14px;
  box-sizing: border-box; width: max-content;
}
.sz-nav__grid--2 { grid-template-columns: repeat(2, minmax(236px, 1fr)); }

.sz-nav__item {
  display: block; width: 236px; box-sizing: border-box;
  border-radius: var(--wp--custom--radius--md); padding: 9px 11px;
  text-decoration: none; transition: background 0.18s;
}
.sz-nav__item:hover { background: rgba(255, 255, 255, 0.72); }
.sz-nav__item-head { display: flex; align-items: center; gap: 7px; margin-bottom: 2px; }
.sz-nav__item-title { font-size: 13px; font-weight: 700; color: var(--wp--preset--color--ink); }
.sz-nav__item-desc { display: block; font-size: 11.5px; line-height: 1.4; color: rgba(28, 27, 27, 0.58); }

.sz-tag {
  flex-shrink: 0; border-radius: var(--wp--custom--radius--pill);
  padding: 2px 7px; font-size: 8.5px; font-weight: 800;
  letter-spacing: var(--wp--custom--tracking--button);
  text-transform: uppercase; white-space: nowrap;
  color: rgba(28, 27, 27, 0.5); background: rgba(28, 27, 27, 0.05);
  box-shadow: inset 0 0 0 1px rgba(28, 27, 27, 0.08);
}
.sz-tag--beta {
  color: var(--wp--preset--color--purple-700);
  background: var(--wp--preset--color--purple-50);
  box-shadow: inset 0 0 0 1px var(--wp--preset--color--purple-200);
}

.sz-nav__cta { flex-shrink: 0; box-shadow: 0 12px 30px -6px rgba(104, 19, 212, 0.55); }

.sz-nav__burger {
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  display: none; place-items: center; flex-shrink: 0; padding: 0;
  color: var(--wp--preset--color--ink);
}
.sz-nav__burger-bars { display: flex; flex-direction: column; gap: 5px; }
.sz-nav__burger-bars span { width: 18px; height: 2px; border-radius: 2px; background: currentColor; }

/* ---------- mobile sheet ---------- */
/* Right-docked drawer. The design's prototype positioned this with
   left:50%/translateX(-50%) because its mobile pages lived in a centred 430px
   frame — on a real tablet that floated the sheet mid-screen with the page
   showing either side. Docking right behaves identically on phones (the sheet
   is viewport-width there) and correctly everywhere else. */
.sz-sheet {
  position: fixed; top: 0; bottom: 0; right: 0; z-index: 90;
  width: min(430px, 100vw); box-sizing: border-box;
  transform: translateX(100%); opacity: 0;
  transition: transform 0.5s var(--wp--custom--ease--editorial),
              opacity 0.35s var(--wp--custom--ease--editorial),
              box-shadow 0.35s var(--wp--custom--ease--editorial);
  background: linear-gradient(160deg, rgba(252,248,248,0.72), rgba(243,235,252,0.6));
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border-left: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: -20px 0 60px rgba(28, 27, 27, 0.18),
              inset 0 1px 0 rgba(255, 255, 255, 0.6),
              0 0 0 100vmax rgba(28, 27, 27, 0);
  display: flex; flex-direction: column; padding: 18px 26px 30px;
}
.sz-sheet.is-open {
  transform: translateX(0); opacity: 1;
  /* The spread-shadow is the backdrop: dims everything the drawer doesn't cover. */
  box-shadow: -20px 0 60px rgba(28, 27, 27, 0.18),
              inset 0 1px 0 rgba(255, 255, 255, 0.6),
              0 0 0 100vmax rgba(28, 27, 27, 0.32);
}
.sz-sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; flex-shrink: 0; }
.sz-sheet__brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.sz-sheet__brand .sz-logo__word { font-size: 17px; color: var(--wp--preset--color--ink); }
.sz-sheet__nav {
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto; flex: 1; min-height: 0;
  /* Centre the sections in the space between the brand row and the footer.
     `safe` matters: with a plain `center`, a list taller than the sheet gets
     clipped at the top and the first item becomes unreachable by scrolling. */
  justify-content: center;
  justify-content: safe center;
  /* The design hides this scrollbar (its .m-nosb helper) — a visible track
     cuts through the glass panel. */
  scrollbar-width: none; -ms-overflow-style: none;
}
.sz-sheet__nav::-webkit-scrollbar { display: none; }
.sz-sheet__sec + .sz-sheet__sec { border-top: 1px solid rgba(255, 255, 255, 0.55); }
.sz-sheet__title {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  /* border-box matters: <button> gets it from the UA stylesheet but <a> does
     not, so the "Resources" row was 100% + 16px of padding and its icon fell
     off the right edge. */
  width: 100%; box-sizing: border-box;
  background: transparent; border: 0; cursor: pointer;
  padding: 13px 8px; text-align: left; text-decoration: none;
  font-family: inherit; font-size: 25px; font-weight: 800; line-height: 1.16;
  letter-spacing: -0.03em; color: var(--wp--preset--color--ink);
}
.sz-sheet__title.is-open { color: var(--wp--preset--color--purple-700); }
.sz-sheet__title svg { flex-shrink: 0; transition: transform 0.3s var(--wp--custom--ease--editorial); }
.sz-sheet__title.is-open svg { transform: rotate(90deg); }
.sz-sheet__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--wp--custom--ease--editorial); }
.sz-sheet__body.is-open { grid-template-rows: 1fr; }
/* min-height:0 is required — grid items default to min-height:auto, which
   stopped the 0fr row collapsing fully and leaked a strip of the first card. */
.sz-sheet__body > * { overflow: hidden; min-height: 0; }
/* No padding while collapsed: it is the element the 0fr row clips, and its own
   16px of vertical padding kept the section 16px tall instead of 0. */
.sz-sheet__items { display: flex; flex-direction: column; gap: 6px; padding: 0; }
.sz-sheet__body.is-open .sz-sheet__items { padding: 2px 0 14px; }
.sz-sheet__item {
  display: block; border-radius: 14px; padding: 11px 13px; text-decoration: none;
  background: linear-gradient(150deg, rgba(255,255,255,0.62), rgba(255,255,255,0.34));
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 14px rgba(28, 27, 27, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.sz-sheet__foot {
  margin-top: 16px; padding-top: 16px; flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  display: flex; flex-direction: column; gap: 12px;
}
.sz-btn--block { width: 100%; height: 52px; }

/* =========================================================
   FINAL SECTION — closing CTA + footer, from site/s-final.jsx
   ========================================================= */
.sz-final {
  background: var(--wp--preset--color--ink-night);
  padding: 80px var(--wp--custom--layout--gutter) 0;
}
.sz-final__inner { max-width: 1140px; margin-inline: auto; }

.sz-final__cta { padding: 60px 0 90px; text-align: center; }
.sz-final__title {
  font-size: clamp(48px, 8vw, 92px); font-weight: 800; line-height: 0.95;
  letter-spacing: -0.04em; color: #fff; margin: 0 0 30px;
}
.sz-grad--dark { background-image: linear-gradient(135deg, #C9A8FF, #A675FF); }
.sz-final__sub {
  font-size: 17px; line-height: 1.55; color: rgba(255, 255, 255, 0.75);
  max-width: 460px; margin: 0 auto 34px;
}
.sz-btn--lg { height: 58px; padding: 0 32px; font-size: 14px; }

.sz-final__cols {
  border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 44px 0 40px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 40px; flex-wrap: wrap;
}
.sz-final__lockup { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.sz-final__lockup .sz-logo__word { font-size: 19px; color: #fff; }
.sz-final__tag { display: block; font-size: 12px; color: rgba(255, 255, 255, 0.45); }
.sz-final__support { display: block; font-size: 12px; color: rgba(255, 255, 255, 0.55); margin-top: 10px; }
.sz-final__support a { color: rgba(255, 255, 255, 0.8); font-weight: 600; text-decoration: none; }

.sz-final__links { display: flex; gap: 44px; flex-wrap: wrap; }
.sz-final__col { display: flex; flex-direction: column; gap: 9px; }
.sz-final__colhead {
  font-size: 11px; font-weight: 700; letter-spacing: var(--wp--custom--tracking--eyebrow);
  text-transform: uppercase; color: rgba(255, 255, 255, 0.45); margin-bottom: 3px;
}
.sz-final__col a { font-size: 13px; color: rgba(255, 255, 255, 0.75); white-space: nowrap; text-decoration: none; }
.sz-final__col a:hover { color: #fff; }

.sz-final__legal { padding: 0 0 26px; font-size: 11.5px; color: rgba(255, 255, 255, 0.35); }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- index (home.html) ---------- */
/* Section rhythm is lifted straight from res-page.jsx: 148 / 44 / 72 / 76+96,
   all against a 1140px measure with 56px gutters. */
.sz-index-header-wrap { padding: 148px var(--wp--custom--layout--gutter) 0; }

.sz-index-header {
  max-width: 1140px; margin-inline: auto;
  padding-bottom: 36px; border-bottom: 1px solid rgba(28, 27, 27, 0.12);
  /* The design's 400px dek column wraps the standfirst to four lines. Measured
     against real Inter: the standfirst needs 580px for two lines and the
     headline needs 430px, out of 1084px of track. 600/484 clears both with
     room, rather than starving the headline.
     (Measured at 640 before the webfont landed — Inter is narrower than the
     system fallback, so every type-metric-derived number shifted.) */
  display: grid; grid-template-columns: minmax(0, 1fr) 600px; gap: 56px; align-items: end;
}
.sz-index-header h1 {
  font-size: var(--wp--preset--font-size--index-title);
  font-weight: 800; line-height: 1;
  letter-spacing: var(--wp--custom--tracking--tight);
  text-wrap: balance; margin: 0;
}
.sz-index-header p { margin: 0 0 4px; }


/* index grid */
.sz-index { padding: 72px var(--wp--custom--layout--gutter) 0; max-width: none; }
.sz-index > * { max-width: 1140px; margin-inline: auto; }

/* newsletter band */
.sz-newsletter-wrap { padding: 76px var(--wp--custom--layout--gutter) 96px; max-width: none; }
.sz-newsletter-wrap > * { max-width: 1140px; margin-inline: auto; }
.sz-panel--wide {
  display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center;
  border-radius: var(--wp--custom--radius--media); padding: 40px 44px;
}
.sz-panel--wide .sz-panel__eyebrow { color: rgba(255, 255, 255, 0.45); }
.sz-panel--wide .sz-panel__title { font-size: 34px; letter-spacing: -0.03em; }
.sz-panel--wide .sz-panel__body { margin-bottom: 0; max-width: 430px; }
.sz-panel--side .sz-panel__title { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; }
.sz-panel--side { padding: 22px 22px 24px; border-radius: 18px; }
.sz-panel--side .sz-btn { width: 100%; }

/* gradient-clipped words — the design's GradText */
.sz-grad {
  background: var(--wp--preset--gradient--pulse);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* The masthead and featured piece belong to page 1. On /resources/page/2/ and
   beyond the reader is browsing the archive, not being introduced to it. */
body.paged .sz-index-header-wrap { display: none; }

.sz-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 26px; align-items: start; }

/* The post template still carries WordPress's flow layout, whose
   `> :not(:first-child) { margin-block-start: <blockGap> }` rule pushes every
   card except the first down by 18px — so row one sits proud of the rest.
   Gaps are the grid's job here. The doubled class outranks core's 0,1,0
   selector without needing !important. */
.sz-grid.wp-block-post-template > * { margin-block-start: 0; margin-block-end: 0; }

/* Same fix for the card's own internals: the meta row, title and dek are
   flow-laid-out children and pick up the same stray margin. */
.sz-card-post > * { margin-block-start: 0; }

.sz-card-post img {
  aspect-ratio: 4 / 3; width: 100%; height: auto; object-fit: cover;
  border-radius: var(--wp--custom--radius--lg);
  box-shadow: var(--wp--custom--shadow--inset);
  transition: transform 0.5s var(--wp--custom--ease--editorial);
}
.sz-card-post:hover img { transform: scale(1.04); }
.sz-card-post__meta {
  display: flex; align-items: center; gap: 9px;
  font-size: 11.5px; color: var(--wp--preset--color--text-tertiary);
  margin: 14px 0 7px;
}
.sz-card-post__meta > * + *::before {
  content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%;
  background: rgba(28, 27, 27, 0.22); margin-right: 9px; vertical-align: middle;
}
.sz-card-post h3 {
  font-size: 19px; font-weight: 700; line-height: 1.26;
  letter-spacing: var(--wp--custom--tracking--card);
  margin: 0 0 7px; text-wrap: pretty;
}
.sz-card-post p { font-size: 13.5px; line-height: 1.55; color: var(--wp--preset--color--text-secondary); margin: 0; }

/* ---------- pagination ---------- */
/* Truncated pager: first, last, and a window around current.
   8,586 posts at 12/page = 716 pages — the design's full numbered
   run is not viable at this scale. Windowing is done in PHP. */
/* The design sets the pager off from the grid with a rule and real space. */
.sz-pager {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
  margin-top: 48px; padding-top: 26px;
  border-top: 1px solid rgba(28, 27, 27, 0.10);
}

/* Core wraps the numbers in a plain block div, which stacks the pills into a
   column. Lay it out inline. */
.sz-pager .wp-block-query-pagination-numbers {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

/* Pill styling is applied to the controls by name, not to every descendant
   a/span — the chevron inside Prev/Next is a <span> and was being rendered as
   a second pill inside the first. */
.sz-pager .page-numbers,
.sz-pager .wp-block-query-pagination-previous,
.sz-pager .wp-block-query-pagination-next {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; box-sizing: border-box;
  border-radius: var(--wp--custom--radius--pill);
  font-size: 13.5px; font-weight: 600;
  color: var(--wp--preset--color--ink);
  background: var(--wp--preset--color--surface);
  box-shadow: inset 0 0 0 1px rgba(28, 27, 27, 0.10);
  text-decoration: none;
  transition: all var(--wp--custom--duration--quick) var(--wp--custom--ease--editorial);
}

/* Numbers are square; only prev/next carry horizontal padding. */
.sz-pager .page-numbers { min-width: 42px; padding: 0; }
.sz-pager .wp-block-query-pagination-previous,
.sz-pager .wp-block-query-pagination-next { padding: 0 14px; }

.sz-pager a.page-numbers:hover,
.sz-pager .wp-block-query-pagination-previous:hover,
.sz-pager .wp-block-query-pagination-next:hover {
  box-shadow: inset 0 0 0 1px rgba(28, 27, 27, 0.25);
}

.sz-pager .page-numbers.current {
  background: var(--wp--preset--color--ink);
  color: var(--wp--preset--color--on-primary);
  font-weight: 700; box-shadow: none;
}
.sz-pager .page-numbers.dots {
  background: none; box-shadow: none; min-width: 0; padding: 0 2px;
  color: var(--wp--preset--color--text-tertiary);
}

/* The chevron is a glyph inside the control, not a control itself. */
.sz-pager .wp-block-query-pagination-previous-arrow,
.sz-pager .wp-block-query-pagination-next-arrow {
  display: inline; height: auto; min-width: 0; padding: 0; margin: 0;
  background: none; box-shadow: none; border-radius: 0;
  font-size: 15px; line-height: 1;
}

@media (max-width: 720px) {
  /* 44px minimum touch target, per the design's mobile pager. */
  .sz-pager .page-numbers,
  .sz-pager .wp-block-query-pagination-previous,
  .sz-pager .wp-block-query-pagination-next { height: 44px; }
  .sz-pager .page-numbers { min-width: 44px; }
}

/* ---------- figures ---------- */
.sz-article figure { margin: 10px 0 30px; }
.sz-article figure img {
  width: 100%; height: auto; border-radius: 18px;
  box-shadow: var(--wp--custom--shadow--media);
}
.sz-article figcaption {
  margin-top: 10px; font-size: 12.5px; line-height: 1.5;
  color: var(--wp--preset--color--text-tertiary);
}

/* ---------- responsive ---------- */
/* The two-column masthead needs 1140 of content width to hold its line counts.
   Below the full measure it stacks rather than squeezing the headline. */
@media (max-width: 1260px) {
  .sz-index-header { grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
  .sz-index-header p { max-width: 640px; }
}

@media (max-width: 1080px) {
  /* `display: contents` dissolves the aside so its two cards can be ordered
     independently: the contents list belongs above the article, the CTA below
     it. Ordering the aside as a whole would drag the CTA up with it and push
     the article most of a screen down. */
  /* Grid, not flex. In a column flex container `min-width: 0` constrains the
     main axis (height) — the cross axis still floors at the content's
     min-content width, so the 790px table dragged the whole page sideways.
     `minmax(0, 1fr)` caps the track explicitly and `order` works the same. */
  .sz-article-shell {
    display: grid; grid-template-columns: minmax(0, 1fr);
    grid-template-areas: none;
    gap: 22px; padding-top: 104px;
    /* Stacked, the column must still respect the 720px reading measure —
       at 1024 (landscape tablet) an uncapped column runs ~110 chars/line.
       720 content + 2×56 gutters; border-box, so padding counts. */
    max-width: 832px;
  }
  .sz-sidebar { display: contents; }
  /* Header → contents → body → CTA, matching blog-mobile.jsx's MBlogPage. */
  .sz-article__masthead { grid-area: auto; order: -2; }
  .sz-toc { grid-area: auto; order: -1; }
  .sz-article { grid-area: auto; order: 0; min-width: 0; }
  .sz-panel--side { order: 1; }

  .sz-grid { grid-template-columns: repeat(2, 1fr); }

}

/* Phone only: collapse it into a card, per the design's MBlogTOC. A laptop at
   ~1000px stacks the layout but has plenty of room for the list open. */
@media (max-width: 720px) {
  .sz-toc {
    border-radius: 14px;
    background: var(--wp--preset--color--surface);
    box-shadow: inset 0 0 0 1px rgba(28, 27, 27, 0.09);
    overflow: hidden;
  }
  /* Card treatment on phones; the toggle itself comes from the base rules. */
  .sz-toc__label { padding: 12px 14px; }
  .sz-toc[open] .sz-toc__label { margin-bottom: 0; }
  .sz-toc__list { padding: 0 14px 13px; gap: 8px; }
  .sz-toc__list a { font-size: 12.5px; font-weight: 600; }
  .sz-toc__list a::before { display: none; }
}
/* Below the pill's comfortable width, swap to the burger + sheet. */
@media (max-width: 900px) {
  /* Both pucks were bunched at the right edge. Span the width instead so it
     reads as a normal app bar: brand left (a home affordance the article pages
     otherwise lack), menu right. */
  .sz-nav {
    left: 0; right: 0; top: 12px; transform: none;
    width: auto; max-width: none; padding-inline: 16px;
    align-items: center; justify-content: space-between;
  }
  .sz-nav__wrap, .sz-nav__cta { display: none; }
  .sz-nav__burger { display: grid; }
}
@media (min-width: 901px) {
  .sz-sheet { display: none; }
}

@media (max-width: 900px) {
  /* Section gutters come down from the desktop 56px — at 390px those left only
     278px of usable width. 22px matches the article measure. Top padding drops
     with them: 148px was clearing a nav that is much shorter on mobile. */
  .sz-index-header-wrap { padding: 96px 22px 0; }
  .sz-index           { padding: 48px 22px 0; }
  .sz-newsletter-wrap { padding: 56px 22px 72px; }
  main.sz-index, .sz-404 { padding-top: 96px; }
  .sz-404 { padding-inline: 22px; }

  /* Two-column newsletter panel stacks instead of shrinking into slivers. */
  .sz-panel--wide     { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .sz-panel--wide .sz-btn { justify-self: start; }

  .sz-final { padding: 56px 24px 0; }
  .sz-final__cta { padding: 32px 0 56px; }

  /* Footer centres on mobile: brand block text-centred, and the link-column
     group sits on the centre axis with equal space either side instead of
     hugging the left edge. Text inside each column stays left-aligned — the
     columns centre as a block. */
  .sz-final__cols { flex-direction: column; align-items: center; gap: 32px; }
  .sz-final__brand { text-align: center; }
  .sz-final__lockup { justify-content: center; }
  /* A grid rather than wrapped flex: flex centres each row independently, so
     Creators and Brands got different left edges. Two auto-sized tracks give
     every column a shared edge across rows, and centring the tracks keeps the
     equal side padding. */
  .sz-final__links {
    display: grid; grid-template-columns: repeat(2, auto);
    justify-content: center; width: 100%; gap: 28px 40px;
  }
  .sz-final__legal { text-align: center; }
}

/* ---------- sticky mobile CTA ---------- */
.sz-stickycta { display: none; }

/* Phone only — on a stacked laptop layout the sidebar CTA card is still
   perfectly usable and a fixed bottom bar just eats vertical space. */
@media (max-width: 720px) {
  .sz-stickycta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 65;
    padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--wp--preset--color--canvas) 90%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--wp--custom--border--hairline);
  }
  .sz-stickycta__inner {
    max-width: 430px; margin-inline: auto;
    display: flex; align-items: center; gap: 12px;
  }
  .sz-stickycta__copy { flex: 1; min-width: 0; }
  .sz-stickycta__title {
    display: block; font-size: 12.5px; font-weight: 700;
    color: var(--wp--preset--color--ink);
  }
  .sz-stickycta__sub {
    display: block; font-size: 10.5px;
    color: var(--wp--preset--color--text-tertiary);
  }
  /* Clear the bar so it never covers the footer's last line. */
  .sz-final { padding-bottom: 84px; }
}

/* =========================================================
   ARCHIVE — centred on phones only
   Single column throughout, so a centred axis reads as
   deliberate. Desktop stays left-aligned per the design.
   ========================================================= */
@media (max-width: 720px) {
  .sz-index-header,
  .sz-card-post,
  .sz-panel--wide { text-align: center; }

  /* Flex rows need their own centring — text-align does not reach them. */
  .sz-card-post .sz-card-post__meta { justify-content: center; }

  /* Constrained text blocks are centred by margin, not just aligned. */
  .sz-panel--wide .sz-panel__body { margin-inline: auto; }

  .sz-panel--wide { justify-items: center; }
  .sz-panel--wide .sz-btn { justify-self: center; }
}

@media (max-width: 720px) {
  /* 22px gutter, matching blog-mobile.jsx. */
  .sz-article-shell { padding: 88px 22px 32px; }
  .sz-grid { grid-template-columns: 1fr; gap: 32px; }
  .sz-cta { grid-template-columns: 1fr; gap: 16px; padding: 20px 20px 22px; }
  .sz-panel { padding: 26px 22px 28px; border-radius: 20px; }
  .sz-panel__title { font-size: 25px; }
  .sz-article :where(h2) { margin-top: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
