/* ==========================================================================
   Auto Deduct — blog styles: single posts (single.php) and every post listing (archive.php)
   Scoped under .deduct-post (a post), .deduct-archive (a listing) and .deduct-content (the
   post body) so nothing leaks into the rest of the site. Self-contained: does not rely on
   the theme's compiled Tailwind classes.
   Keep the deduct- prefix: ad blockers hide class names like .ad-content and
   .ad-hero (EasyList), which blanked these posts for ad-blocker users in 1.0.1.
   Headings use Overpass (enqueued in functions.php). To make headings match the
   rest of the site instead, change --deduct-display below to inherit the body font.
   ========================================================================== */

.deduct-post,
.deduct-archive {
  --deduct-brand: #2563eb;
  --deduct-brand-deep: #1d4ed8;
  --deduct-ink: #111111;
  --deduct-mint: #a0ffb0;
  --deduct-copy: #3d4757;
  --deduct-muted: #5f6b7a;
  --deduct-line: #e3e8ef;
  --deduct-rule: #d3dae4;
  --deduct-mist: #f5f7fa;
  --deduct-leaf: #1f932f;
  --deduct-dusk: #12306e;
  --deduct-night: #111827;
  --deduct-night-line: #1f2937;

  --deduct-display: Overpass, ui-sans-serif, system-ui, sans-serif;
  --deduct-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --deduct-glide: cubic-bezier(0.22, 1, 0.36, 1);

  --deduct-shadow-elevated: 0 1px 2px rgb(17 38 89 / 0.05), 0 4px 14px -4px rgb(37 99 235 / 0.10);
  --deduct-shadow-floating: 0 2px 4px rgb(17 38 89 / 0.04), 0 14px 32px -10px rgb(17 38 89 / 0.16), 0 36px 80px -28px rgb(37 99 235 / 0.30);

  --deduct-max: 80rem;   /* matches the site's max-w-7xl container */

  --deduct-icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
  --deduct-icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --deduct-icon-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E");
  --deduct-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  color: var(--deduct-copy);
}

/* The site's Customizer "Additional CSS" sets overflow-x: hidden on html and body, which makes
   body a scroll container and silently disables position: sticky. overflow-x: clip hides sideways
   overflow just the same without that side effect, so the sidebar can stick. The :root / body.single
   selectors outrank the Customizer rule, which WordPress prints after theme stylesheets. This file
   only loads on blog pages, so no other page changes. */
:root,
body.single { overflow-x: clip; }

:is(.deduct-post, .deduct-archive) *,
:is(.deduct-post, .deduct-archive) *::before,
:is(.deduct-post, .deduct-archive) *::after { box-sizing: border-box; }

:is(.deduct-post, .deduct-archive) ::selection { background: var(--deduct-mint); color: var(--deduct-ink); }

.deduct-wrap { max-width: var(--deduct-max); margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .deduct-wrap { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .deduct-wrap { padding-inline: 2rem; } }

/* ---------------------------------------------------------------- Hero --- */
.deduct-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--deduct-night) center / cover no-repeat;
  color: #fff;
}
.deduct-hero > span { position: absolute; inset: 0; z-index: -1; pointer-events: none; display: block; }
.deduct-hero__tint { background: var(--deduct-dusk); mix-blend-mode: multiply; opacity: .45; }
.deduct-hero__fade { background: linear-gradient(to top, rgb(0 0 0 / .6), transparent); }
.deduct-hero__side { background: linear-gradient(to right, rgb(0 0 0 / .55), rgb(0 0 0 / .25) 50%, transparent); }
.deduct-hero__glow { background: radial-gradient(55% 75% at 88% 15%, rgb(37 99 235 / .34), transparent 62%), radial-gradient(45% 60% at 0% 100%, rgb(160 255 176 / .09), transparent 70%); }
.deduct-hero__grain { background-image: var(--deduct-grain); background-size: 160px; mix-blend-mode: overlay; opacity: .2; }

.deduct-hero__inner {
  max-width: var(--deduct-max);
  margin-inline: auto;
  padding: 3.5rem 1rem;
}
@media (min-width: 640px) { .deduct-hero__inner { padding: 5rem 1.5rem 4rem; } }
@media (min-width: 1024px) { .deduct-hero__inner { padding: 7rem 2rem 6rem; } }

.deduct-crumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; margin: 0; padding: 0; list-style: none; font-size: .875rem; color: rgb(255 255 255 / .75); }
.deduct-crumb li { display: flex; align-items: center; gap: .5rem; }
.deduct-crumb li:not(:last-child)::after { content: ''; width: .85rem; height: .85rem; background: currentColor; opacity: .5; -webkit-mask: var(--deduct-icon-chevron) center / contain no-repeat; mask: var(--deduct-icon-chevron) center / contain no-repeat; transform: rotate(-90deg); }
.deduct-crumb a { color: inherit; text-decoration: none; border-radius: 2px; }
.deduct-crumb a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.deduct-crumb a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.deduct-hero__title {
  margin: 1.5rem 0 0;
  max-width: 56rem;
  font-family: var(--deduct-display);
  font-weight: 800;
  font-size: clamp(2.375rem, 1.4rem + 3.4vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
  color: #fff;
}
.deduct-hero__lede { margin: 1.5rem 0 0; max-width: 42rem; font-size: clamp(1.125rem, 1rem + .4vw, 1.25rem); line-height: 1.7; color: rgb(255 255 255 / .85); }

.deduct-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 2.5rem; font-size: .875rem; color: rgb(255 255 255 / .8); }
.deduct-meta__item { display: flex; align-items: center; gap: .5rem; }
.deduct-meta__item svg { width: 1rem; height: 1rem; color: rgb(255 255 255 / .6); }

/* -------------------------------------------------------------- Layout --- */
.deduct-wrap.deduct-wrap,
.deduct-post .deduct-wrap { }
.deduct-post > .deduct-wrap { padding-top: 2.5rem; padding-bottom: 4rem; }
@media (min-width: 640px) { .deduct-post > .deduct-wrap { padding-top: 3.5rem; } }
@media (min-width: 1024px) { .deduct-post > .deduct-wrap { padding-top: 4rem; padding-bottom: 6rem; } }

.deduct-grid { display: grid; gap: 2rem; }
/* Below desktop the sidebar is hidden: phones and tablets get the collapsible
   "On this page" above the article and the call-to-action banner at the end. */
.deduct-side { display: none; }
@media (min-width: 1024px) {
  .deduct-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2rem; }
  .deduct-main { grid-column: span 7 / span 7; min-width: 0; }
  .deduct-side { display: block; grid-column: 9 / span 4; }
}

/* ------------------------------------------------------- On this page --- */
.deduct-toc-m { max-width: 42rem; margin-bottom: 2.5rem; border: 1px solid var(--deduct-line); border-radius: .75rem; background: #fff; box-shadow: var(--deduct-shadow-elevated); }
@media (min-width: 1024px) { .deduct-toc-m { display: none; } }
.deduct-toc-m > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; font-family: var(--deduct-display); font-size: 1.0625rem; font-weight: 700; color: var(--deduct-ink); cursor: pointer; list-style: none; border-radius: .75rem; }
.deduct-toc-m > summary::-webkit-details-marker { display: none; }
.deduct-toc-m > summary::after { content: ''; flex: none; width: 1.25rem; height: 1.25rem; background: var(--deduct-muted); -webkit-mask: var(--deduct-icon-chevron) center / contain no-repeat; mask: var(--deduct-icon-chevron) center / contain no-repeat; transition: transform 400ms var(--deduct-spring); }
.deduct-toc-m[open] > summary::after { transform: rotate(180deg); }
.deduct-toc-m > summary:hover { color: var(--deduct-brand); }
.deduct-toc-m > summary:hover::after { background: var(--deduct-brand); }
.deduct-toc-m > summary:focus-visible { outline: 2px solid var(--deduct-brand); outline-offset: 2px; }
.deduct-toc-m__body { margin: 0 1.25rem 1rem; border-left: 1px solid var(--deduct-line); }

.deduct-side__sticky { position: sticky; top: 6rem; display: flex; flex-direction: column; gap: 2.5rem; }
.deduct-toc__title { margin: 0 0 1rem; font-family: var(--deduct-display); font-size: 1.125rem; font-weight: 700; letter-spacing: -0.02em; color: var(--deduct-ink); }
.deduct-toc > div { border-left: 1px solid var(--deduct-line); }

.deduct-toc ul, .deduct-toc-m__body ul { margin: 0; padding: 0; list-style: none; }
.deduct-toc__link {
  display: block;
  margin-left: -1px;
  padding: .4rem 0 .4rem 1rem;
  border-left: 2px solid transparent;
  font-size: .9375rem;
  line-height: 1.45;
  color: var(--deduct-muted);
  text-decoration: none;
}
.deduct-toc__link:hover { color: var(--deduct-ink); border-left-color: var(--deduct-rule); }
.deduct-toc__link:focus-visible { outline: 2px solid var(--deduct-brand); outline-offset: 2px; border-radius: 2px; }
.deduct-toc__link[aria-current="true"] { color: var(--deduct-brand); border-left-color: var(--deduct-brand); font-weight: 600; }

/* ---------------------------------------------------- Sidebar promo --- */
.deduct-promo { position: relative; isolation: isolate; overflow: hidden; border-radius: 1rem; padding: 2rem; background: var(--deduct-brand); color: #fff; box-shadow: var(--deduct-shadow-floating); }
.deduct-promo__glow { position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 85% at 100% 0%, rgb(255 255 255 / .22), transparent 55%), radial-gradient(90% 70% at 0% 100%, rgb(18 48 110 / .55), transparent 65%); }
.deduct-promo__grain { position: absolute; inset: 0; z-index: -1; background-image: var(--deduct-grain); background-size: 160px; mix-blend-mode: overlay; opacity: .2; }
.deduct-promo__title { margin: 0; font-family: var(--deduct-display); font-size: 1.5rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; }
.deduct-promo__text { margin: .75rem 0 0; font-size: .9375rem; line-height: 1.7; color: rgb(255 255 255 / .85); }
.deduct-promo__call { margin: 1rem 0 0; text-align: center; font-size: .875rem; color: rgb(255 255 255 / .8); }

/* ------------------------------------------------------- Buttons/links --- */
.deduct-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; margin-top: 1.5rem; padding: .75rem 1.5rem; border-radius: .5rem; font-size: 1rem; font-weight: 600; line-height: 1.5rem; text-align: center; text-decoration: none; transition: transform 350ms var(--deduct-spring); }
.deduct-btn:active { transform: scale(.97); }
.deduct-btn--light { background: #fff; color: var(--deduct-brand); }
.deduct-btn--light:hover { background: #e8effd; color: var(--deduct-brand-deep); }
.deduct-btn--light:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.deduct-link { color: var(--deduct-brand); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgb(37 99 235 / .35); border-radius: 2px; }
.deduct-link:hover { color: var(--deduct-brand-deep); text-decoration-color: currentColor; }
.deduct-link:focus-visible { outline: 2px solid var(--deduct-brand); outline-offset: 2px; }
.deduct-link-inv { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgb(255 255 255 / .45); border-radius: 2px; }
.deduct-link-inv:hover { text-decoration-color: #fff; }
.deduct-link-inv:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.deduct-disclaimer { max-width: 42rem; margin: 3.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--deduct-line); font-size: .875rem; line-height: 1.7; color: var(--deduct-muted); }

/* ----------------------------------------------------------- Related --- */
.deduct-related { margin-top: 1rem; padding: 4rem 0; background: var(--deduct-mist); }
@media (min-width: 1024px) { .deduct-related { padding: 6rem 0; } }
.deduct-related__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem 1.5rem; }
.deduct-related__head h2 { margin: 0; font-family: var(--deduct-display); font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); font-weight: 700; letter-spacing: -0.03em; color: var(--deduct-ink); }
.deduct-cards { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
@media (min-width: 640px) { .deduct-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .deduct-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; } }

.deduct-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--deduct-line); border-radius: 1rem; background: #fff; box-shadow: var(--deduct-shadow-elevated); transition: transform 350ms var(--deduct-spring); }
.deduct-card:active { transform: scale(.985); }
.deduct-card:has(.deduct-card__link:focus-visible) { outline: 2px solid var(--deduct-brand); outline-offset: 3px; }
.deduct-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.deduct-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 700ms var(--deduct-glide); }
.deduct-card:hover .deduct-card__media img { transform: scale(1.04); }
.deduct-card__tint { position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / .6), transparent 60%); }
.deduct-card__tag { position: absolute; left: 1.25rem; bottom: 1rem; font-size: .875rem; font-weight: 600; color: #fff; }
.deduct-card__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 1.5rem; }
.deduct-card__title { margin: 0; font-family: var(--deduct-display); font-size: 1.25rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; color: var(--deduct-ink); }
.deduct-card__link { color: inherit; text-decoration: none; }
.deduct-card__link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.deduct-card:hover .deduct-card__link { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--deduct-brand); }
.deduct-card__excerpt { margin: .75rem 0 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: .9375rem; line-height: 1.7; color: var(--deduct-copy); }
.deduct-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; margin: auto 0 0; padding-top: 1.5rem; font-size: .875rem; color: var(--deduct-muted); }
.deduct-card__time { display: inline-flex; align-items: center; gap: .5rem; }
.deduct-card__meta svg { width: 1rem; height: 1rem; }

/* A card left alone on the last row of a grid spans the row and lays out side by side,
   so listings never end on a single stranded card */
@media (min-width: 640px) and (max-width: 1023px) {
  .deduct-cards > .deduct-card:last-child:nth-child(2n+1) { grid-column: 1 / -1; flex-direction: row; }
  .deduct-cards > .deduct-card:last-child:nth-child(2n+1) .deduct-card__media { flex: 0 0 55%; aspect-ratio: auto; min-height: 16rem; }
  .deduct-cards > .deduct-card:last-child:nth-child(2n+1) .deduct-card__body { justify-content: center; }
  .deduct-cards > .deduct-card:last-child:nth-child(2n+1) .deduct-card__meta { margin-top: 0; }
}
@media (min-width: 1024px) {
  .deduct-cards > .deduct-card:last-child:nth-child(3n+1) { grid-column: 1 / -1; flex-direction: row; }
  .deduct-cards > .deduct-card:last-child:nth-child(3n+1) .deduct-card__media { flex: 0 0 58.333%; aspect-ratio: auto; min-height: 18rem; }
  .deduct-cards > .deduct-card:last-child:nth-child(3n+1) .deduct-card__body { justify-content: center; padding: 2.5rem; }
  .deduct-cards > .deduct-card:last-child:nth-child(3n+1) .deduct-card__meta { margin-top: 0; }
  .deduct-cards > .deduct-card:last-child:nth-child(3n+1) .deduct-card__title { font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.03em; }
}

/* --------------------------------------------------------------- CTA --- */
.deduct-cta { position: relative; isolation: isolate; overflow: hidden; background: var(--deduct-night) center / cover no-repeat; color: #fff; }
.deduct-cta > span { position: absolute; inset: 0; z-index: -1; display: block; pointer-events: none; }
.deduct-cta__tint { background: var(--deduct-dusk); mix-blend-mode: multiply; opacity: .45; }
.deduct-cta__fade { background: linear-gradient(to top, rgb(0 0 0 / .6), transparent); }
.deduct-cta__side { background: linear-gradient(to right, rgb(0 0 0 / .75), rgb(0 0 0 / .45) 50%, transparent); }
.deduct-cta__grain { background-image: var(--deduct-grain); background-size: 160px; mix-blend-mode: overlay; opacity: .2; }
.deduct-cta__inner { max-width: 36rem; padding: 5rem 0; }
@media (min-width: 1024px) { .deduct-cta__inner { padding: 7rem 0; } }
.deduct-cta__inner h2 { margin: 0; font-family: var(--deduct-display); font-size: clamp(2rem, 1.5rem + 1.8vw, 2.75rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
.deduct-cta__text { margin: 1.25rem 0 0; font-size: 1.125rem; line-height: 1.7; color: rgb(255 255 255 / .85); }
.deduct-cta__list { margin: 1.75rem 0 0; padding: 0; list-style: none; display: grid; gap: .75rem; }
.deduct-cta__list li { position: relative; padding-left: 2rem; }
.deduct-cta__list li::before { content: ''; position: absolute; left: 0; top: .15em; width: 1.25rem; height: 1.25rem; background: var(--deduct-mint); -webkit-mask: var(--deduct-icon-check) center / contain no-repeat; mask: var(--deduct-icon-check) center / contain no-repeat; }
.deduct-cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2.25rem; }
.deduct-cta__actions .deduct-btn { width: auto; margin-top: 0; }

/* ======================================================================
   Post body — styles the markup the block editor already outputs, so
   writers never add classes by hand. Block styles (Payslip / Checklist /
   Quick answer / Callout) are registered in functions.php.
   ====================================================================== */
.deduct-content { font-size: 1.0625rem; line-height: 1.7; color: var(--deduct-copy); }
.deduct-content > * { margin-block: 0; }
.deduct-content > * + * { margin-top: 1.25em; }
.deduct-content > :where(figure, blockquote, .wp-block-group) { margin-top: 2.25rem; }
.deduct-content > :where(figure, blockquote, .wp-block-group) + * { margin-top: 2.25rem; }
.deduct-content > .wp-block-details + .wp-block-details { margin-top: .75rem; }
.deduct-content > * + h2 { margin-top: 3.5rem; }
.deduct-content > * + h3 { margin-top: 2.5rem; }
.deduct-content > :is(h2, h3) + * { margin-top: 1rem; }
.deduct-content > :first-child { margin-top: 0; }
@media (min-width: 640px) { .deduct-content { font-size: 1.125rem; } .deduct-content > * + h2 { margin-top: 4rem; } }

.deduct-content :is(h2, h3) { font-family: var(--deduct-display); color: var(--deduct-ink); text-wrap: balance; scroll-margin-top: 6rem; }
.deduct-content h2 { font-size: clamp(1.625rem, 1.2rem + 1.3vw, 2.25rem); font-weight: 700; line-height: 1.12; letter-spacing: -0.03em; }
.deduct-content h3 { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; }
.deduct-content strong { font-weight: 600; color: var(--deduct-ink); }

.deduct-content a { color: var(--deduct-brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgb(37 99 235 / .4); border-radius: 2px; }
.deduct-content a:hover { color: var(--deduct-brand-deep); text-decoration-color: currentColor; }
.deduct-content a:focus-visible { outline: 2px solid var(--deduct-brand); outline-offset: 2px; }

.deduct-content :is(ul, ol) { padding-left: 1.25em; }
.deduct-content ul > li { list-style: disc; }
.deduct-content ol > li { list-style: decimal; }
.deduct-content li { padding-left: .375em; }
.deduct-content li + li { margin-top: .625em; }
.deduct-content li::marker { color: var(--deduct-brand); }

/* List block style: "Checklist" */
.deduct-content ul.is-style-checklist { padding-left: 0; }
.deduct-content ul.is-style-checklist > li { position: relative; list-style: none; padding-left: 2rem; }
.deduct-content ul.is-style-checklist > li::before { content: ''; position: absolute; left: 0; top: calc((1.7em - 1.25rem) / 2); width: 1.25rem; height: 1.25rem; background: var(--deduct-leaf); -webkit-mask: var(--deduct-icon-check) center / contain no-repeat; mask: var(--deduct-icon-check) center / contain no-repeat; }

/* Group blocks: themes without a theme.json (like this one) get an extra
   .wp-block-group__inner-container wrapper from WordPress, so each rule
   below targets both the direct children and the wrapper's children. */

/* Group block style: "Quick answer" */
.deduct-content .is-style-summary { padding: 1.5rem; border: 1px solid var(--deduct-line); border-radius: 1rem; background: var(--deduct-mist); }
.deduct-content .is-style-summary > *,
.deduct-content .is-style-summary > .wp-block-group__inner-container > * { margin: 0; }
.deduct-content .is-style-summary > * + *,
.deduct-content .is-style-summary > .wp-block-group__inner-container > * + * { margin-top: 1rem; }
.deduct-content .is-style-summary > :is(p, h2, h3):first-child,
.deduct-content .is-style-summary > .wp-block-group__inner-container > :is(p, h2, h3):first-child { font-family: var(--deduct-display); font-size: 1.25rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; color: var(--deduct-ink); }
@media (min-width: 640px) { .deduct-content .is-style-summary { padding: 1.75rem 2rem 2rem; } }

/* Group block style: "Callout" */
.deduct-content .is-style-callout { position: relative; padding: 1.125rem 1.25rem 1.25rem 3.5rem; border: 1px solid rgb(37 99 235 / .18); border-radius: .75rem; background: rgb(37 99 235 / .05); font-size: 1rem; line-height: 1.65; }
.deduct-content .is-style-callout::before { content: ''; position: absolute; left: 1.25rem; top: 1.25rem; width: 1.375rem; height: 1.375rem; background: var(--deduct-brand); -webkit-mask: var(--deduct-icon-info) center / contain no-repeat; mask: var(--deduct-icon-info) center / contain no-repeat; }
.deduct-content .is-style-callout > *,
.deduct-content .is-style-callout > .wp-block-group__inner-container > * { margin: 0; }
.deduct-content .is-style-callout > * + *,
.deduct-content .is-style-callout > .wp-block-group__inner-container > * + * { margin-top: .375rem; }

/* Quote block */
.deduct-content .wp-block-quote { margin-inline: 0; padding: .25rem 0 .25rem 1.5rem; border-left: 3px solid var(--deduct-brand); }
.deduct-content .wp-block-quote p { font-family: var(--deduct-display); font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); font-weight: 600; line-height: 1.4; letter-spacing: -0.015em; color: var(--deduct-ink); }
.deduct-content .wp-block-quote cite { display: block; margin-top: 1rem; font-size: .9375rem; font-style: normal; color: var(--deduct-muted); }

/* Image block: colour treatment + gradient, caption over the photo */
.deduct-content .wp-block-image { position: relative; isolation: isolate; overflow: hidden; margin-inline: 0; border-radius: 1rem; box-shadow: var(--deduct-shadow-elevated); }
.deduct-content .wp-block-image img { display: block; width: 100%; height: auto; }
.deduct-content .wp-block-image::before, .deduct-content .wp-block-image::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.deduct-content .wp-block-image::before { background: var(--deduct-dusk); mix-blend-mode: multiply; opacity: .2; }
.deduct-content .wp-block-image::after { background: linear-gradient(to top, rgb(0 0 0 / .6), transparent 55%); }
.deduct-content .wp-block-image figcaption { position: absolute; inset: auto 0 0; z-index: 2; margin: 0; padding: 1.25rem 1.5rem; font-size: .9375rem; line-height: 1.5; color: #fff; text-wrap: balance; }
.deduct-content .wp-block-image figcaption a { color: #fff; }

/* Details block: FAQ rows */
.deduct-content .wp-block-details { border: 1px solid var(--deduct-line); border-radius: .75rem; background: #fff; box-shadow: var(--deduct-shadow-elevated); }
.deduct-content .wp-block-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.125rem 1.25rem; font-size: 1.0625rem; font-weight: 600; line-height: 1.45; color: var(--deduct-ink); cursor: pointer; list-style: none; border-radius: .75rem; }
.deduct-content .wp-block-details > summary::-webkit-details-marker { display: none; }
.deduct-content .wp-block-details > summary::after { content: ''; flex: none; width: 1.25rem; height: 1.25rem; background: var(--deduct-muted); -webkit-mask: var(--deduct-icon-chevron) center / contain no-repeat; mask: var(--deduct-icon-chevron) center / contain no-repeat; transition: transform 400ms var(--deduct-spring); }
.deduct-content .wp-block-details[open] > summary::after { transform: rotate(180deg); }
.deduct-content .wp-block-details > summary:hover { color: var(--deduct-brand); }
.deduct-content .wp-block-details > summary:hover::after { background: var(--deduct-brand); }
.deduct-content .wp-block-details > summary:focus-visible { outline: 2px solid var(--deduct-brand); outline-offset: 2px; }
.deduct-content .wp-block-details > :not(summary) { margin: 0; padding: 0 1.25rem 1.25rem; font-size: 1rem; line-height: 1.7; }

/* Table block style: "Payslip comparison" */
.deduct-content .is-style-payslip { padding: 1rem; border: 1px solid var(--deduct-line); border-radius: 1rem; background: #fff; box-shadow: var(--deduct-shadow-floating); }
/* table-layout: auto overrides the editor's "Fixed width table cells" toggle, which is on by default */
.deduct-content .is-style-payslip table { width: 100%; table-layout: auto; border-collapse: separate; border-spacing: 0; font-size: .875rem; line-height: 1.45; font-variant-numeric: tabular-nums; }
/* WordPress's own table CSS borders every cell and the head/foot rows; clear that first */
.deduct-content .is-style-payslip :is(thead, tbody, tfoot) { border: 0; }
.deduct-content .is-style-payslip :is(th, td) { padding: .75rem .5rem; border: 0; text-align: right; vertical-align: baseline; white-space: nowrap; }
.deduct-content .is-style-payslip :is(th, td):first-child { width: 46%; padding-left: 0; text-align: left; white-space: normal; }
.deduct-content .is-style-payslip :is(th, td):last-child { padding-inline: .75rem; background: rgb(37 99 235 / .06); }
.deduct-content .is-style-payslip thead th { padding-bottom: .875rem; border-bottom: 1px solid var(--deduct-rule); vertical-align: bottom; white-space: normal; font-size: .8125rem; font-weight: 600; line-height: 1.3; color: var(--deduct-muted); }
.deduct-content .is-style-payslip thead th:last-child { padding-top: .875rem; border-radius: .625rem .625rem 0 0; color: var(--deduct-brand); }
.deduct-content .is-style-payslip tbody td { color: var(--deduct-ink); }
.deduct-content .is-style-payslip tbody td:first-child { color: var(--deduct-copy); }
.deduct-content .is-style-payslip tbody tr + tr td { border-top: 1px dashed var(--deduct-rule); }
.deduct-content .is-style-payslip tfoot td { padding-block: 1rem; border-top: 3px double var(--deduct-ink); font-family: var(--deduct-display); font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; color: var(--deduct-ink); }
.deduct-content .is-style-payslip tfoot td:first-child { font-size: .9375rem; }
.deduct-content .is-style-payslip tfoot td:last-child { border-radius: 0 0 .625rem .625rem; }
/* The editor's Highlight tool writes an inline colour on <mark>; !important keeps the payslip marker brand mint whatever colour the writer picks */
.deduct-content .is-style-payslip mark { position: relative; isolation: isolate; padding: 0 .125em; background: none !important; color: inherit !important; }
.deduct-content .is-style-payslip mark::before { content: ''; position: absolute; inset: .12em -.18em .02em; z-index: -1; border-radius: .25em .4em .3em .2em; background: var(--deduct-mint); transform-origin: left center; transition: transform 900ms var(--deduct-glide) 200ms; }
.deduct-content .is-style-payslip:not(.is-revealed) mark::before { transform: scaleX(0); }
.deduct-content .is-style-payslip figcaption { margin-top: 1rem; font-size: .875rem; line-height: 1.6; color: var(--deduct-muted); }
@media (min-width: 640px) {
  .deduct-content .is-style-payslip { padding: 1.75rem 2rem 1.5rem; }
  .deduct-content .is-style-payslip table { font-size: 1rem; }
  .deduct-content .is-style-payslip :is(th, td) { padding-inline: 1rem; }
  .deduct-content .is-style-payslip :is(th, td):first-child { width: auto; }
  .deduct-content .is-style-payslip thead th { font-size: .875rem; }
  .deduct-content .is-style-payslip tfoot td { font-size: 1.375rem; }
  .deduct-content .is-style-payslip tfoot td:first-child { font-size: 1.0625rem; }
}

.deduct-pagelinks { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: .5rem; font-weight: 600; }
.deduct-pagelinks a, .deduct-pagelinks > span { padding: .4rem .75rem; border: 1px solid var(--deduct-line); border-radius: .5rem; text-decoration: none; color: var(--deduct-brand); }
.deduct-pagelinks a:hover { background: var(--deduct-mist); }

/* ======================================================================
   Post listings (archive.php): the Posts page, categories, tags, authors
   ====================================================================== */

/* WordPress adds visually hidden headings (e.g. "Posts navigation"); this theme never styled them */
.deduct-archive .screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Shorter version of the post hero */
.deduct-hero--archive .deduct-hero__inner { padding: 3.5rem 1rem; }
@media (min-width: 640px) { .deduct-hero--archive .deduct-hero__inner { padding: 4rem 1.5rem; } }
@media (min-width: 1024px) { .deduct-hero--archive .deduct-hero__inner { padding: 6rem 2rem 5rem; } }
.deduct-hero--archive .deduct-hero__title { max-width: 48rem; font-size: clamp(2.375rem, 1.5rem + 2.8vw, 3.5rem); }
.deduct-hero--archive .deduct-hero__lede { margin-top: 1.25rem; }
.deduct-crumb [aria-current="page"] { color: #fff; }

/* Section headings shared by the listing sections */
.deduct-section-title { margin: 0; font-family: var(--deduct-display); font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; color: var(--deduct-ink); }
.deduct-section-intro { margin: .75rem 0 0; max-width: 42rem; font-size: 1.125rem; line-height: 1.7; }

/* Topic pills: one per category, the current one filled */
.deduct-topics-bar { border-bottom: 1px solid var(--deduct-line); background: #fff; }
.deduct-topics-bar > nav { padding-block: 1.25rem; }
.deduct-topics { display: flex; gap: .5rem; margin: -.25rem; padding: .25rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; list-style: none; }
.deduct-topics::-webkit-scrollbar { display: none; }
.deduct-topics > li { flex: none; scroll-snap-align: start; }
.deduct-topic { display: block; padding: .5rem 1rem; border: 1px solid var(--deduct-line); border-radius: 9999px; background: #fff; font-size: .9375rem; font-weight: 500; line-height: 1.25rem; white-space: nowrap; color: var(--deduct-copy); text-decoration: none; }
.deduct-topic:hover { border-color: var(--deduct-brand); color: var(--deduct-brand); }
.deduct-topic:active { opacity: .7; }
.deduct-topic:focus-visible { outline: 2px solid var(--deduct-brand); outline-offset: 2px; }
.deduct-topic[aria-current="page"] { border-color: var(--deduct-brand); background: var(--deduct-brand); color: #fff; }
/* Phones: the row runs to the screen edges so it's clear it scrolls sideways */
@media (max-width: 639px) { .deduct-topics { margin-inline: -1rem; padding-inline: 1rem; scroll-padding-inline: 1rem; } }

/* Newest post, shown large on the first page of the blog */
.deduct-lead { padding: 2.5rem 0 4rem; }
@media (min-width: 640px) { .deduct-lead { padding-top: 3.5rem; } }
@media (min-width: 1024px) { .deduct-lead { padding-bottom: 5rem; } }
.deduct-lead-card { position: relative; display: grid; overflow: hidden; border: 1px solid var(--deduct-line); border-radius: 1rem; background: #fff; box-shadow: var(--deduct-shadow-floating); transition: transform 350ms var(--deduct-spring); }
.deduct-lead-card:active { transform: scale(.99); }
.deduct-lead-card:has(.deduct-card__link:focus-visible) { outline: 2px solid var(--deduct-brand); outline-offset: 3px; }
.deduct-lead-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.deduct-lead-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--deduct-glide); }
.deduct-lead-card:hover .deduct-lead-card__media img { transform: scale(1.04); }
.deduct-lead-card .deduct-card__tag { left: 1.5rem; bottom: 1.25rem; }
.deduct-lead-card__body { display: flex; flex-direction: column; padding: 1.5rem; }
@media (min-width: 640px) { .deduct-lead-card__body { padding: 2rem; } }
.deduct-lead-card__title { margin: 0; font-family: var(--deduct-display); font-size: clamp(1.75rem, 1.5rem + .6vw, 2rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; text-wrap: balance; color: var(--deduct-ink); }
.deduct-lead-card:hover .deduct-card__link { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--deduct-brand); }
.deduct-lead-card__excerpt { margin: 1rem 0 0; font-size: 1rem; line-height: 1.7; }
@media (min-width: 640px) { .deduct-lead-card__excerpt { font-size: 1.0625rem; } }
.deduct-lead-card__cue { margin-top: 1.25rem; font-weight: 600; color: var(--deduct-brand); }
.deduct-lead-card:hover .deduct-lead-card__cue { text-decoration: underline; text-underline-offset: 4px; }
.deduct-lead-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-top: 2rem; font-size: .875rem; color: var(--deduct-muted); }
.deduct-lead-card__item { display: flex; align-items: center; gap: .5rem; }
.deduct-lead-card__item svg { width: 1rem; height: 1rem; }
@media (min-width: 1024px) {
  .deduct-lead-card { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .deduct-lead-card__media { grid-column: span 7 / span 7; aspect-ratio: auto; min-height: 26rem; }
  .deduct-lead-card__body { grid-column: span 5 / span 5; padding: 2.5rem; }
  .deduct-lead-card__meta { margin-top: auto; padding-top: 2rem; }
}

/* "Start here": reading-order guides joined like a road's centre line */
.deduct-start { padding: 4rem 0; background: var(--deduct-mist); }
@media (min-width: 1024px) { .deduct-start { padding: 6rem 0; } }
.deduct-route { display: grid; gap: 1.5rem; margin: 2.5rem 0 0; padding: 0; list-style: none; }
.deduct-route > li { position: relative; display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: 1rem; }
.deduct-route__marker { position: relative; z-index: 1; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: .75rem; background: var(--deduct-mint); box-shadow: 0 0 0 6px var(--deduct-mist); font-family: var(--deduct-display); font-size: 1.125rem; font-weight: 800; line-height: 1; color: var(--deduct-ink); }
.deduct-route > li:not(:last-child)::before { content: ''; position: absolute; left: calc(1.375rem - 1.5px); top: 2.75rem; bottom: -1.5rem; width: 3px; background: repeating-linear-gradient(180deg, var(--deduct-rule) 0 14px, transparent 14px 26px); }
.deduct-route__card { position: relative; display: flex; flex-direction: column; padding: 1.5rem; border: 1px solid var(--deduct-line); border-radius: 1rem; background: #fff; box-shadow: var(--deduct-shadow-elevated); transition: transform 350ms var(--deduct-spring); }
@media (min-width: 640px) { .deduct-route__card { padding: 1.75rem; } }
.deduct-route__card:active { transform: scale(.985); }
.deduct-route__card:has(.deduct-card__link:focus-visible) { outline: 2px solid var(--deduct-brand); outline-offset: 3px; }
.deduct-route__card:hover .deduct-card__link { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--deduct-brand); }
.deduct-route__title { margin: 0; font-family: var(--deduct-display); font-size: 1.25rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; color: var(--deduct-ink); }
.deduct-route__text { margin: .75rem 0 0; font-size: 1rem; line-height: 1.7; }
.deduct-route__card .deduct-card__meta { padding-top: 1.25rem; }
@media (min-width: 1024px) {
  .deduct-route { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: 3rem; }
  /* Marker row, then the card fills the rest, so the cards line up and match in height */
  .deduct-route > li { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 1.25rem; }
  .deduct-route > li:not(:last-child)::before { left: 2.75rem; right: -2rem; top: calc(1.375rem - 1.5px); bottom: auto; width: auto; height: 3px; background: repeating-linear-gradient(90deg, var(--deduct-rule) 0 14px, transparent 14px 26px); }
}

/* The card grid */
.deduct-list { padding: 4rem 0; }
@media (min-width: 1024px) { .deduct-list { padding: 6rem 0; } }
.deduct-list--plain { padding-top: 2.5rem; }
@media (min-width: 640px) { .deduct-list--plain { padding-top: 3.5rem; } }
.deduct-lead + .deduct-list { padding-top: 0; } /* no "Start here" between them */
.deduct-list .deduct-section-title + .deduct-cards { margin-top: 2.5rem; }
.deduct-list--plain .deduct-cards { margin-top: 0; }

/* Page numbers: the markup the_posts_pagination() outputs */
.deduct-archive .pagination { margin-top: 3.5rem; }
.deduct-archive .pagination .nav-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; }
.deduct-archive .pagination .page-numbers { display: inline-grid; place-items: center; min-width: 2.75rem; height: 2.75rem; padding: 0 .875rem; border: 1px solid var(--deduct-line); border-radius: .5rem; background: #fff; font-weight: 600; color: var(--deduct-copy); text-decoration: none; transition: transform 300ms var(--deduct-spring); }
.deduct-archive .pagination a.page-numbers:hover { border-color: var(--deduct-brand); color: var(--deduct-brand); }
.deduct-archive .pagination a.page-numbers:active { transform: scale(.95); }
.deduct-archive .pagination a.page-numbers:focus-visible { outline: 2px solid var(--deduct-brand); outline-offset: 2px; }
.deduct-archive .pagination .page-numbers.current { border-color: var(--deduct-brand); background: var(--deduct-brand); color: #fff; }
.deduct-archive .pagination .page-numbers.dots { border-color: transparent; background: none; }

/* Nothing to list */
.deduct-empty { max-width: 36rem; padding: 2rem 0; }
.deduct-empty p { margin: .75rem 0 0; font-size: 1.125rem; line-height: 1.7; }

/* ----------------------------------------------------- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  :is(.deduct-post, .deduct-archive) *, :is(.deduct-post, .deduct-archive) *::before, :is(.deduct-post, .deduct-archive) *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .deduct-content .is-style-payslip mark::before { transition: none; transform: none; }
}
