/* ==========================================================================
   THEATRUM ANIMI — components
   Ported verbatim from mockup/assets/css/components.css: buttons, call-to-
   action links, tags and chips, forms, notices, error summary, article head,
   byline, avatar, article layout and aside, author box, comment gate, empty
   state, icons, utilities, support list, pending destinations
   (docs/wp-contract.md, section 16).
   Sections owned by core-block slices, ta/* blocks, header.css and
   footer.css live there. WordPress-only rules at the end.
   ========================================================================== */

/* --- buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: 3rem;
  min-width: 44px;
  padding: 0.75rem var(--space-md);
  border: var(--border-default) solid transparent;
  border-radius: var(--radius-none);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--motion-fast) var(--ease),
              color var(--motion-fast) var(--ease),
              border-color var(--motion-fast) var(--ease);
}
.btn svg { width: 1.25em; height: 1.25em; flex: none; }

.btn--primary { background: var(--color-rasa); color: var(--color-crepito); border-color: var(--color-rasa); }
.btn--primary:hover { background: var(--color-ink-hover); border-color: var(--color-ink-hover); }
.btn--primary:active { background: var(--color-ink-active); }

.btn--secondary { color: var(--color-ink-primary); border-color: var(--color-rasa); }
.btn--secondary:hover { background: var(--color-rasa); color: var(--color-crepito); }

.btn--ghost { padding-inline: var(--space-2xs); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.3em; }
.btn--ghost:hover { text-decoration-thickness: 3px; }

.btn--inverse { background: var(--color-crepito); color: var(--color-rasa); border-color: var(--color-crepito); }
.btn--inverse:hover { background: var(--color-surface-white); }

.btn--inverse-secondary { color: var(--color-crepito); border-color: var(--color-crepito); }
.btn--inverse-secondary:hover { background: var(--color-crepito); color: var(--color-rasa); }

.btn--lg { min-height: 3.5rem; padding-inline: var(--space-lg); }
.btn--sm { min-height: 2.75rem; padding: 0.5rem var(--space-sm); font-size: 0.875rem; }
.btn--block { width: 100%; }

.btn[aria-disabled="true"],
.btn:disabled {
  background: var(--color-border-default);
  border-color: var(--color-border-default);
  color: var(--color-ink-muted);
  cursor: not-allowed;
}

/* standalone text link with an arrow — the accessible name always names its target */
.cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}
.cta:hover { text-decoration-thickness: 3px; }
.cta svg { width: 1.15em; height: 1.15em; transition: transform var(--motion-fast) var(--ease); }
.cta:hover svg { transform: translateX(3px); }

/* --- tags ----------------------------------------------------------------- */

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.15rem var(--space-xs);
  border: var(--border-hairline) solid var(--color-border-strong);
  border-radius: var(--radius-xs);
  font-family: var(--font-display);
  font-size: var(--type-caption);
  line-height: 1.3;
  text-decoration: none;
}
.tag--solid { background: var(--color-rasa); color: var(--color-crepito); border-color: var(--color-rasa); font-weight: 600; }
.tag--eyebrow { text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; background: var(--color-crepito); border-color: var(--color-crepito); }

.chips { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: var(--space-2xs); scrollbar-width: thin; }

/* --- forms ---------------------------------------------------------------- */

.field { display: block; margin-bottom: var(--space-md); }
.field__label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--space-3xs);
}
.field__optional { font-weight: 400; color: var(--color-ink-secondary); }
.field__hint { display: block; font-family: var(--font-display); font-size: var(--type-caption); color: var(--color-ink-secondary); margin-bottom: var(--space-2xs); }

.input,
.textarea,
.select {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem var(--space-sm);
  background: var(--color-surface-raised);
  /* set explicitly: on an inverse band the field would otherwise inherit
     Crepito and render typed text invisible on its own white background */
  color: var(--color-ink-primary);
  border: var(--border-hairline) solid var(--color-border-strong);
  border-radius: var(--radius-xs);
  font-family: var(--font-body);
  font-size: var(--type-body-sm);
}
.textarea { min-height: 9rem; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236e6868'%3E%3Cpath d='M12 15.6 5.7 9.3 7.4 7.6 12 12.2l4.6-4.6 1.7 1.7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-sm) center;
  background-size: 1.25rem;
  padding-right: 3rem;
}
.input:hover, .textarea:hover, .select:hover { border-color: var(--color-rasa); }
.input::placeholder, .textarea::placeholder { color: var(--color-ink-secondary); }

.field--error .input,
.field--error .textarea,
.field--error .select { border-width: var(--border-default); border-color: var(--color-error); }

.field__error {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2xs);
  margin-top: var(--space-2xs);
  font-family: var(--font-display);
  font-size: var(--type-caption);
  color: var(--color-error);
}
.field__error svg { width: 1.15em; height: 1.15em; flex: none; margin-top: 0.15em; }

.choice { display: flex; align-items: flex-start; gap: var(--space-xs); margin-bottom: var(--space-sm); }
.choice input { width: 1.5rem; height: 1.5rem; flex: none; margin: 0.15rem 0 0; accent-color: var(--color-rasa); }
.choice label { font-size: var(--type-body-sm); }

.consent { padding: var(--space-md); background: var(--color-surface-sunken); border: var(--border-hairline) solid var(--color-border-subtle); }
.consent .choice:last-child { margin-bottom: 0; }
.consent__lead { font-size: var(--type-body-sm); margin: 0 0 var(--space-sm); }
.consent__hint { margin: calc(var(--space-2xs) - var(--space-sm)) 0 0 calc(1.5rem + var(--space-xs)); }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md); margin-top: var(--space-lg); }

/* --- notices -------------------------------------------------------------- */

.notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border: var(--border-hairline) solid;
  font-size: var(--type-body-sm);
}
.notice svg { width: 1.375rem; height: 1.375rem; flex: none; margin-top: 0.1em; }
.notice--info { background: var(--color-info-surface); border-color: var(--color-info); color: var(--color-info); }
.notice--success { background: var(--color-success-surface); border-color: var(--color-success); color: var(--color-success); }
.notice--warning { background: var(--color-warning-surface); border-color: var(--color-warning); color: var(--color-warning); }
.notice--error { background: var(--color-error-surface); border-color: var(--color-error); color: var(--color-error); }

.error-summary { padding: var(--space-md); border: var(--border-default) solid var(--color-error); background: var(--color-error-surface); color: var(--color-error); }
.error-summary ul { margin-top: var(--space-2xs); padding-left: 1.25em; }
.error-summary a { color: inherit; }

/* --- article -------------------------------------------------------------- */

.article-head { padding-block: var(--space-2xl) var(--space-lg); }
.article-head h1 { margin-top: var(--space-md); }
.article-head .lead { margin-top: var(--space-md); }

.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  padding-block: var(--space-md);
  border-top: var(--border-hairline) solid var(--color-border-subtle);
  border-bottom: var(--border-hairline) solid var(--color-border-subtle);
}
.avatar {
  display: grid;
  place-items: center;
  width: 2.75rem; height: 2.75rem;
  flex: none;
  border-radius: 50%;
  background: var(--color-surface-sunken);
  border: var(--border-hairline) solid var(--color-border-default);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
}
.byline__meta { display: flex; flex-direction: column; }

.article-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); gap: var(--space-2xl) var(--space-3xl); align-items: start; }
@media (max-width: 63.99em) { .article-layout { grid-template-columns: 1fr; } }
.article-aside { position: sticky; top: calc(var(--header-height) + var(--space-md)); }

.author-box { display: flex; gap: var(--space-md); padding: var(--space-md); background: var(--color-surface-sunken); border: var(--border-hairline) solid var(--color-border-subtle); }
.author-box .avatar { width: 3.5rem; height: 3.5rem; background: var(--color-surface-raised); }

/* --- comment gate (from the comments section) -------------------------- */

.comment-gate { display: flex; gap: var(--space-sm); padding: var(--space-md); background: var(--color-surface-sunken); border: var(--border-hairline) solid var(--color-border-default); }
.comment-gate svg { width: 1.5rem; height: 1.5rem; flex: none; margin-top: 0.15em; }
.comment-gate__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-md); }

/* --- empty state ---------------------------------------------------------- */

.empty-state { padding: var(--space-xl); background: var(--color-surface-sunken); border: var(--border-hairline) solid var(--color-border-subtle); max-width: 34rem; }
.empty-state svg { width: 1.75rem; height: 1.75rem; color: var(--color-ink-muted); }

/* --- icons ---------------------------------------------------------------- */

.icon { width: 1.25rem; height: 1.25rem; fill: currentcolor; flex: none; }

/* --- utilities -------------------------------------------------------------
   Small, named classes so page markup carries no inline styling. Everything a
   template needs is here; nothing in the HTML sets font-family or spacing. */

.title-lg,
.title-md,
.title-sm {
  font-family: var(--font-display);
  text-transform: none;
  letter-spacing: 0;
}
.title-lg { font-size: var(--type-h3); font-weight: 700; }
.title-md { font-size: var(--type-h4); font-weight: 700; }
.title-sm { font-size: var(--type-h5); font-weight: 600; line-height: var(--lh-tight); }

.name { font-family: var(--font-display); font-size: 0.9375rem; font-weight: 700; }

.stack-xs > * + * { margin-top: var(--space-2xs); }
.stack-sm > * + * { margin-top: var(--space-sm); }
.stack   > * + * { margin-top: var(--space-md); }
.stack-lg > * + * { margin-top: var(--space-lg); }

.mt-2xs { margin-top: var(--space-2xs); }
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mt-3xl { margin-top: var(--space-3xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.plain { text-decoration: none; }
.muted { color: var(--color-ink-secondary); }
.icon-row { display: flex; align-items: flex-start; gap: var(--space-2xs); }
.measure-block { max-width: calc(var(--measure) + var(--page-margin) * 2); margin-inline: 0; }
.rule { margin-block: var(--space-lg); border: 0; border-top: var(--border-hairline) solid var(--color-border-subtle); }
.list-decimal { list-style: decimal; }
.panel { padding: var(--space-md); background: var(--color-surface-sunken); border: var(--border-hairline) solid var(--color-border-subtle); }
.panel--raised { background: var(--color-surface-raised); border-color: var(--color-border-default); }
.panel--inverse { padding: var(--space-lg); background: var(--color-surface-inverse); color: var(--color-ink-inverse); }
.success-mark { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; background: var(--color-success); color: var(--color-crepito); }
.col-start-5 { grid-column: 5 / span 8; }
.col-start-6 { grid-column: 6 / span 7; }
@media (max-width: 63.99em) { .col-start-5, .col-start-6 { grid-column: 1 / -1; } }
.auth-panel { padding: var(--space-4xl) var(--page-margin); max-width: 34rem; }
.search-input { flex: 1 1 24rem; }
.measure-short { max-width: 22ch; }
.filter-label { margin: 0; font-weight: 600; }
.split-flush { gap: 0; align-items: stretch; }
.meta-rule { padding-top: var(--space-md); border-top: var(--border-hairline) solid var(--color-border-subtle); }
.bullets { list-style: disc; padding-left: 1.1em; }
.bare-list { list-style: none; margin: 0; padding: 0; }
.stack-list { display: grid; gap: var(--space-xs); }
.form-row { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.row-wrap { display: flex; flex-wrap: wrap; gap: var(--space-md); align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: var(--space-md); align-items: center; justify-content: space-between; }
.rule-top { border-top: var(--border-hairline) solid var(--color-border-default); padding-top: var(--space-md); }
.mt-2xl { margin-top: var(--space-2xl); }
.pad-inline { padding-inline: var(--page-margin); }

/* A programmatically focused container (the error summary takes focus on submit)
   needs a visible ring too: :focus-visible alone never matches tabindex="-1". */
[tabindex="-1"]:focus {
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* --- support signposting ---------------------------------------------------
   A mental-health project that says "help is here" has to actually put it
   there. Rows stay visible as explicit placeholders until a partner confirms
   the real service, so the gap is obvious rather than silently broken. */
.support-list { display: grid; gap: var(--space-2xs); max-width: 46rem; }
.support-list li {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-md);
  padding-block: var(--space-sm);
  border-bottom: var(--border-hairline) solid var(--color-border-inverse);
}
.support-list strong { font-family: var(--font-display); font-size: 0.9375rem; min-width: 9rem; }
.support-list .muted { color: var(--color-ink-inverse-secondary); font-size: var(--type-body-sm); }

/* --- pending destinations --------------------------------------------------
   A link nobody has a destination for yet: the label as plain text plus a
   dashed "Link to come" marker, never a link and never focusable, so nothing
   pretends to go anywhere. A group (filter chips, share options) carries one
   marker; inside running text the marker follows the words it belongs to. */
.pending-link {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3xs) var(--space-2xs);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
}
.pending-link__tag {
  display: inline-block;
  padding: 0.05rem var(--space-2xs);
  border: var(--border-hairline) dashed currentcolor;
  font-family: var(--font-display);
  font-size: var(--type-caption);
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.site-footer .pending-link,
.cookie-banner .pending-link { font-size: var(--type-meta); font-weight: 400; }
.site-footer__bottom .pending-link { font-size: var(--type-caption); }
.chips--scroll .pending-link { flex: none; flex-wrap: nowrap; }
:is(h2, h3) > .pending-link { font: inherit; }

/* ==========================================================================
   WordPress: rules that map the mockup components onto core block markup.
   Nothing here restyles the mockup; each rule gives a core block the look
   of the mockup class it stands for (docs/wp-contract.md, section 10).
   ========================================================================== */

/* --- icons -------------------------------------------------------------------
   The mockup draws its icons as inline SVG from partials.ICONS. Core blocks
   cannot hold an SVG, so the same paths are CSS masks painted in the current
   colour, chosen with a has-icon-{name} class. Decorative, like the mockup's:
   the adjacent text always names the action. */
:root {
  --ta-icon-arrow-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M13.4 3.8 21.6 12l-8.2 8.2-1.7-1.7 5.3-5.3H2.4v-2.4h14.6l-5.3-5.3z'/%3E%3C/svg%3E");
  --ta-icon-arrow-left: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M10.6 3.8 2.4 12l8.2 8.2 1.7-1.7L7 13.2h14.6v-2.4H7l5.3-5.3z'/%3E%3C/svg%3E");
  --ta-icon-download: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M10.8 2.6h2.4v9.3l3.5-3.5 1.7 1.7-6.4 6.4-6.4-6.4 1.7-1.7 3.5 3.5zM3.6 18.4h16.8v3H3.6z'/%3E%3C/svg%3E");
  --ta-icon-external: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M13.6 2.6h7.8v7.8H19V6.7l-7.8 7.8-1.7-1.7L17.3 5h-3.7zM3 5.6h7v2.4H5.4v10.6H16V14h2.4v7H3z'/%3E%3C/svg%3E");
  --ta-icon-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M2 5h20v14H2V5zm2.5 2.4v.7l7.5 4.9 7.5-4.9v-.7z'/%3E%3C/svg%3E");
  --ta-icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M10.5 2a8.5 8.5 0 1 0 5.1 15.3l4.6 4.6 1.7-1.7-4.6-4.6A8.5 8.5 0 0 0 10.5 2zm0 2.4a6.1 6.1 0 1 1 0 12.2 6.1 6.1 0 0 1 0-12.2z'/%3E%3C/svg%3E");
  --ta-icon-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2a7.2 7.2 0 0 0-7.2 7.2C4.8 14.6 12 22 12 22s7.2-7.4 7.2-12.8A7.2 7.2 0 0 0 12 2zm0 9.8a2.6 2.6 0 1 1 0-5.2 2.6 2.6 0 0 1 0 5.2z'/%3E%3C/svg%3E");
  --ta-icon-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 12.2a4.6 4.6 0 1 0 0-9.2 4.6 4.6 0 0 0 0 9.2zm0 2.1c-4.5 0-8.1 2.3-8.1 5.2V21h16.2v-1.5c0-2.9-3.6-5.2-8.1-5.2z'/%3E%3C/svg%3E");
  --ta-icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M6.6 2.6 3 6.2C3 14.4 9.6 21 17.8 21l3.6-3.6-4.5-3-2.6 2.1a13 13 0 0 1-5.8-5.8l2.1-2.6z'/%3E%3C/svg%3E");
  --ta-icon-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1.2 4.8v2.4h-2.4V6.8zm0 4v6.6h-2.4v-6.6z'/%3E%3C/svg%3E");
  --ta-icon-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2 .8 21.4h22.4zm1.2 14.2h-2.4v2.6h2.4zm0-7h-2.4v5.4h2.4z'/%3E%3C/svg%3E");
  --ta-icon-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2a5 5 0 0 0-5 5v3H5.4v12h13.2V10H17V7a5 5 0 0 0-5-5zm0 2.4A2.6 2.6 0 0 1 14.6 7v3H9.4V7A2.6 2.6 0 0 1 12 4.4zm0 8.6a1.9 1.9 0 0 1 1 3.5V18h-2v-1.5a1.9 1.9 0 0 1 1-3.5z'/%3E%3C/svg%3E");
  --ta-icon-calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M7 1.8v2H3.6v18.4h16.8V3.8H17v-2h-2.4v2H9.4v-2zm-1 7.4h12v2H6z'/%3E%3C/svg%3E");
  --ta-icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M9.4 17.6 3.6 11.8l1.7-1.7 4.1 4.1L18.7 5l1.7 1.7z'/%3E%3C/svg%3E");
  --ta-icon-menu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M3 5.4h18v2.4H3zM3 10.8h18v2.4H3zM3 16.2h18v2.4H3z'/%3E%3C/svg%3E");
  --ta-icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M5.6 3.9 12 10.3l6.4-6.4 1.7 1.7L13.7 12l6.4 6.4-1.7 1.7-6.4-6.4-6.4 6.4-1.7-1.7L10.3 12 3.9 5.6z'/%3E%3C/svg%3E");
}
.has-icon-arrow-right { --ta-icon: var(--ta-icon-arrow-right); }
.has-icon-arrow-left { --ta-icon: var(--ta-icon-arrow-left); }
.has-icon-download { --ta-icon: var(--ta-icon-download); }
.has-icon-external { --ta-icon: var(--ta-icon-external); }
.has-icon-mail { --ta-icon: var(--ta-icon-mail); }
.has-icon-search { --ta-icon: var(--ta-icon-search); }
.has-icon-pin { --ta-icon: var(--ta-icon-pin); }
.has-icon-user { --ta-icon: var(--ta-icon-user); }
.has-icon-phone { --ta-icon: var(--ta-icon-phone); }
.has-icon-info { --ta-icon: var(--ta-icon-info); }
.has-icon-alert { --ta-icon: var(--ta-icon-alert); }
.has-icon-lock { --ta-icon: var(--ta-icon-lock); }
.has-icon-calendar { --ta-icon: var(--ta-icon-calendar); }
.has-icon-check { --ta-icon: var(--ta-icon-check); }

[class*="has-icon-"]:not(.wp-block-button)::before,
.wp-block-button[class*="has-icon-"] > .wp-block-button__link::after,
.wp-block-button.has-icon-arrow-left > .wp-block-button__link::before {
  content: "";
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  background-color: currentcolor;
  -webkit-mask: var(--ta-icon) center / contain no-repeat;
          mask: var(--ta-icon) center / contain no-repeat;
}
/* Buttons carry the icon after the label, except the backwards arrow. */
.wp-block-button[class*="has-icon-"] > .wp-block-button__link::after { width: 1.25em; height: 1.25em; }
.wp-block-button.has-icon-arrow-left > .wp-block-button__link::after { content: none; }
.wp-block-button.has-icon-arrow-left > .wp-block-button__link::before { width: 1.25em; height: 1.25em; }
.icon-row[class*="has-icon-"]::before { display: block; }

/* --- block styles ------------------------------------------------------------
   The editor's style picker writes is-style-{name}; each takes the rules of
   the mockup class of the same name, including the inverse-band variants. */

.is-style-lead {
  font-size: var(--type-lead);
  line-height: 1.55;
  color: var(--color-ink-secondary);
  max-width: var(--measure);
}
.is-style-meta {
  font-family: var(--font-display);
  font-size: var(--type-meta);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--color-ink-secondary);
}
.is-style-caption {
  font-family: var(--font-display);
  font-size: var(--type-caption);
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-ink-secondary);
}
.is-style-muted { color: var(--color-ink-secondary); }
.is-style-lead.body-lg { font-size: var(--type-body-lg); }
.band__header .is-style-lead,
.article-head .is-style-lead { margin-top: var(--space-md); }
.is-inverse .is-style-meta,
.is-inverse .is-style-caption,
.is-inverse .is-style-lead { color: var(--color-ink-inverse-secondary); }

.is-style-marginalia-underline,
.is-style-marginalia-ellipse {
  font-family: var(--font-hand);
  font-size: var(--type-marginalia);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-ink-primary);
  max-width: 16rem;
  overflow-wrap: break-word;
}
.is-style-marginalia-underline::after {
  content: "";
  display: block;
  width: 78%;
  height: 2px;
  margin-top: var(--space-2xs);
  background: currentcolor;
  transform: rotate(-1.2deg);
  transform-origin: left center;
}
.is-style-marginalia-ellipse {
  display: inline-block;
  padding: 0.6em 1.2em;
  border: 2px solid currentcolor;
  border-radius: 50%;
  transform: rotate(-3deg);
}
.is-inverse .is-style-marginalia-underline,
.is-inverse .is-style-marginalia-ellipse { color: var(--color-crepito); }

.is-style-title-lg,
.is-style-title-md,
.is-style-title-sm {
  font-family: var(--font-display);
  text-transform: none;
  letter-spacing: 0;
}
.is-style-title-lg { font-size: var(--type-h3); font-weight: 700; }
.is-style-title-md { font-size: var(--type-h4); font-weight: 700; }
.is-style-title-sm { font-size: var(--type-h5); font-weight: 600; line-height: var(--lh-tight); }

.is-style-panel { padding: var(--space-md); background: var(--color-surface-sunken); border: var(--border-hairline) solid var(--color-border-subtle); }
.is-style-panel-raised { padding: var(--space-md); background: var(--color-surface-raised); border: var(--border-hairline) solid var(--color-border-default); }
.is-style-panel-inverse { padding: var(--space-lg); background: var(--color-surface-inverse); color: var(--color-ink-inverse); }

/* The mockup's ul[class] reset outranks .bullets, so its bulleted list shows
   no markers; the same specificity keeps the port identical. */
.is-style-bullets { list-style: disc; padding-left: 1.1em; }
.is-style-stack-list { display: grid; gap: var(--space-xs); }

/* Notices: the mockup lays the icon and a text wrapper side by side with
   flex. Core paragraphs and groups hold their text directly, so the icon is
   placed in the padding instead; the result is the same box. */
.is-style-notice-info,
.is-style-notice-warning {
  position: relative;
  padding: var(--space-sm) var(--space-md) var(--space-sm) calc(var(--space-md) + 1.375rem + var(--space-sm));
  border: var(--border-hairline) solid;
  font-size: var(--type-body-sm);
}
.is-style-notice-info { --ta-icon: var(--ta-icon-info); background: var(--color-info-surface); border-color: var(--color-info); color: var(--color-info); }
.is-style-notice-warning { --ta-icon: var(--ta-icon-alert); background: var(--color-warning-surface); border-color: var(--color-warning); color: var(--color-warning); }
.is-style-notice-info::before,
.is-style-notice-warning::before {
  content: "";
  position: absolute;
  top: calc(var(--space-sm) + 0.1em);
  left: var(--space-md);
  width: 1.375rem;
  height: 1.375rem;
  background-color: currentcolor;
  -webkit-mask: var(--ta-icon) center / contain no-repeat;
          mask: var(--ta-icon) center / contain no-repeat;
}
.is-style-notice-info .link,
.is-style-notice-warning .link { color: inherit; }

/* --- buttons that are not core/button --------------------------------------
   core/loginout prints a div around its link; the div takes the .btn classes
   and the link fills it, so the whole button is the target. */
.wp-block-loginout.btn { padding: 0; }
.wp-block-loginout.btn > a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 0.75rem var(--space-md);
  color: inherit;
  text-decoration: none;
}
.wp-block-loginout.btn--sm > a { padding: 0.5rem var(--space-sm); }

/* --- forms -------------------------------------------------------------------
   The register form's fieldset reset and the search empty-state paragraph
   were inline styles in the mockup. */
.wp-block-ta-register-form fieldset { border: 0; padding: 0; margin: 0; }
.empty-state__text { margin-top: var(--space-2xs); color: var(--color-ink-secondary); }

/* --- empty state, success mark, comment gate: their icon ------------------- */
.empty-state[class*="has-icon-"]::before { display: block; width: 1.75rem; height: 1.75rem; background-color: var(--color-ink-muted); }
.success-mark[class*="has-icon-"]::before { width: 1.25rem; height: 1.25rem; }
.comment-gate[class*="has-icon-"]::before { width: 1.5rem; height: 1.5rem; margin-top: 0.15em; }
.comment-gate__actions { gap: var(--space-sm); }

/* --- article -------------------------------------------------------------- */

/* Byline and meta rows hold several core blocks; the mockup wrote them as one
   line with middle dots, which these rows draw between their items. The
   mockup's " &nbsp;·&nbsp; " is two spaces wide on each side of the dot, and
   " &nbsp; " after a type tag three. */
.meta-dots { display: flex; flex-wrap: wrap; align-items: center; }
.meta-dots > * + *::before { content: "\00a0\00a0·\00a0\00a0"; }
.meta-dots > .wp-block-post-terms + *::before { content: "\00a0\00a0\00a0"; }
.byline .meta-dots > * + *::before { content: "\0020·\0020"; white-space: pre; }
/* A bound value can be empty (an author without a job title, an item without
   a type); its element and the separator after it then disappear. */
.meta-dots > :empty { display: none; }
.meta-dots > :empty:first-child + *::before { content: none; }
/* The featured article's row is long enough to wrap on a phone, where the
   mockup's one-line paragraph breaks between words ("· 7" / "min read")
   rather than before a whole item. Its items flow as inline text: the
   space core leaves between the blocks plus these separators make the
   mockup's " &nbsp;·&nbsp; " and " &nbsp; ". */
.featured__meta { display: block; }
.featured__meta > * { display: inline; }
.meta-dots.featured__meta > .wp-block-post-terms { display: inline-flex; }
.featured__meta > * + *::before { content: "\00a0·\00a0\0020"; }
.featured__meta > .wp-block-post-terms + *::before { content: "\00a0\0020"; }
p.tag:empty { display: none; }

/* The mockup's avatar is an empty circle holding a dash, hidden from
   assistive technology; core blocks cannot print it, so CSS does. */
.avatar::before { content: "—"; content: "—" / ""; }
.author-box .wp-block-post-author-name { font-family: var(--font-display); }

/* The article topic chips had inline padding in the mockup. */
.topic-chips { padding-block: var(--space-md); }
/* An article without topics has no chips row; the author box keeps the
   distance from the text that the row's padding gives. */
.measure-block > .author-box:first-child { margin-top: var(--space-md); }

/* --- chips from core/post-terms ------------------------------------------- */
/* Each linked term is a mockup .tag; core's separators give way to the gap. */
.wp-block-post-terms.is-style-chips,
.wp-block-post-terms.is-style-chips-solid { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.wp-block-post-terms.is-style-chips .wp-block-post-terms__separator,
.wp-block-post-terms.is-style-chips-solid .wp-block-post-terms__separator { display: none; }
.wp-block-post-terms.is-style-chips a,
.wp-block-post-terms.is-style-chips-solid a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.15rem var(--space-xs);
  border: var(--border-hairline) solid var(--color-border-strong);
  border-radius: var(--radius-xs);
  font-family: var(--font-display);
  font-size: var(--type-caption);
  line-height: 1.3;
  text-decoration: none;
}
.wp-block-post-terms.is-style-chips-solid a { background: var(--color-rasa); color: var(--color-crepito); border-color: var(--color-rasa); font-weight: 600; }

/* --- pending destinations on core/button ----------------------------------
   A core/button without an address renders the pending marker inside its
   wrapper (plugin, inc/pending-links.php). The button look belongs to the
   link alone, so the marker reads as the mockup's plain label; the row keeps
   the button's height so a card's call to action stays aligned. */
.wp-block-button.is-pending { display: inline-flex; align-items: center; min-height: 44px; }
