/*
Theme Name: Zelena Ninja
Version: 1.3.10
Text Domain: zelena-ninja
Description: Тема за ZELENA.NINJA с редактируеми блокове на WordPress.
*/

@font-face {
  font-family: Manrope;
  src: url(assets/manrope-bg.woff2) format("woff2");
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Manrope;
  src: url(assets/manrope-latin.woff2) format("woff2");
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --canvas: #f6f1e9;
  --header: #faf6ef;
  --surface: #fffaf3;
  --surface-raised: #eee6f0;
  --text: #2a2934;
  --heading: #274c70;
  --muted: #514e5d;
  --accent: #a9cab9;
  --accent-strong: #b7d5c6;
  --sage: #628a78;
  --link: #315a4c;
  --orchid: #864f78;
  --line: #d5cad8;
  --black-green: #172923;
  --gutter: clamp(1.05rem, 5vw, 5rem);
  --section: clamp(3.5rem, 8vw, 8rem);
  --measure: 46rem;
  font-family: Manrope, system-ui, sans-serif;
  color: var(--text);
  background: var(--canvas);
  line-height: 1.58;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
html { scroll-padding-top: 6rem; }
a { color: var(--link); text-underline-offset: .21em; }
a:hover { color: var(--orchid); }
button, summary { font: inherit; }
:focus-visible { outline: 2px solid var(--orchid); outline-offset: 4px; }
[hidden] { display: none !important; }
img { display: block; min-width: 0; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { color: var(--heading); line-height: 1.05; letter-spacing: -.05em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.8vw, 7.3rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4.65vw, 4.55rem); font-weight: 800; }
h3 { font-size: clamp(1.28rem, 2.45vw, 2rem); font-weight: 780; }
p { font-size: 1.03rem; }
.shell { width: min(100%, 100rem); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: fixed; z-index: 20; top: .7rem; left: 1rem; padding: .6rem 1rem; border-radius: .2rem; background: var(--accent); color: var(--black-green); transform: translateY(-180%); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; z-index: 10; inset-block-start: 0; border-bottom: 1px solid var(--line); background: var(--header); }
.header-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; align-items: center; column-gap: clamp(.55rem, 2.6vw, 2.4rem); min-height: clamp(4.1rem, 6.8vw, 6rem); }
.header-actions { display: contents; }
.wordmark { display: inline-flex; width: fit-content; align-items: center; gap: .6rem; color: #216a5a; font-size: clamp(.9rem, 2vw, 1.45rem); font-weight: 800; line-height: 1; text-decoration: none; white-space: nowrap; letter-spacing: -.045em; }
.wordmark:hover { color: var(--link); }
.wordmark-dot, .wordmark-ninja { color: var(--orchid); }
.mark { position: relative; display: block; flex: 0 0 auto; width: clamp(1.85rem, 3.4vw, 2.9rem); aspect-ratio: 1.11; clip-path: polygon(50% 0, 81% 12%, 100% 50%, 91% 80%, 53% 100%, 14% 82%, 0 54%, 17% 15%); background: var(--sage); }
.mark::before, .mark::after { position: absolute; inset-block-start: 39%; width: 32%; height: 22%; background: #f8f2eb; content: ""; }
.mark::before { left: 15%; clip-path: polygon(0 0, 100% 38%, 81% 100%, 14% 86%); }
.mark::after { right: 15%; clip-path: polygon(0 38%, 100% 0, 84% 86%, 19% 100%); }
.header-phone, .footer-phone { color: var(--text); font-size: clamp(.83rem, 1.4vw, 1.02rem); font-weight: 780; white-space: nowrap; text-decoration-thickness: .075em; }
.header-phone { justify-self: center; }
.site-menu { position: relative; }
.site-menu summary { display: flex; align-items: center; gap: .7rem; min-height: 2.9rem; border: 1px solid var(--line); border-radius: .35rem; padding: .4rem .8rem .4rem 1rem; color: var(--text); background: var(--surface); font-size: .9rem; font-weight: 800; letter-spacing: .06em; cursor: pointer; list-style: none; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu[open] summary, .site-menu summary:hover { border-color: var(--sage); color: var(--link); }
.menu-icon, .menu-icon::after { display: block; width: 15px; height: 2px; background: currentColor; }
.menu-icon { position: relative; margin-bottom: 5px; }
.menu-icon::after { position: absolute; transform: translateY(5px); content: ""; }
.site-nav { position: absolute; top: calc(100% + .65rem); right: 0; width: min(19rem, calc(100vw - 2 * var(--gutter))); max-height: 70dvh; overflow-y: auto; padding: .4rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--surface); box-shadow: 0 15px 32px rgb(48 38 58 / 19%); }
.site-nav ul, .footer-nav ul { margin: 0; padding: 0; list-style: none; }
.site-nav a { display: flex; min-height: 2.9rem; align-items: center; border-radius: .35rem; padding: .5rem .85rem; color: var(--text); text-decoration: none; text-transform: uppercase; font-weight: 800; letter-spacing: .065em; }
.site-nav a:is(:hover, :focus-visible) { background: var(--surface-raised); color: var(--link); }

.home-content > * + * { margin-block-start: var(--section); }
.intro-panel { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, .98fr) minmax(0, 1.02fr); min-height: clamp(35rem, 48vw, 49rem); align-items: center; padding-block: clamp(2.5rem, 4vw, 4.65rem); }
:is(.intro-panel,.service-grid,.work-grid,.guide-callout) > .wp-block-group__inner-container, .intro-copy > .wp-block-group__inner-container { display: contents; }
.intro-panel::before { position: absolute; z-index: -1; inset: 5% 1% 3% 45%; border-radius: 62% 38% 41% 59% / 49% 53% 47% 51%; background: radial-gradient(ellipse at 38% 41%, #fbf3ee 15%, #e8d7e9 73%); transform: rotate(-8deg) scale(.9); pointer-events: none; content: ""; }
.intro-panel::after { display: block; align-self: stretch; grid-column: 2; grid-row: 1; width: 100%; min-height: 28rem; background-image: url("assets/ninja-mask-desktop.webp"); background-repeat: no-repeat; background-size: contain; background-position: center; pointer-events: none; content: ""; }
.intro-copy { position: relative; z-index: 1; display: grid; align-content: center; gap: clamp(1.05rem, 2.35vw, 2rem); grid-column: 1; grid-row: 1; min-width: 0; max-width: 48rem; }
.intro-copy h1 { max-width: 12ch; letter-spacing: -.065em; }
.intro-copy h1::after { display: block; width: clamp(3rem, 6vw, 6rem); height: .23rem; margin-block-start: .23em; transform: skewX(-38deg); transform-origin: left center; background: var(--sage); content: ""; }
.intro-copy p { max-width: 40ch; color: var(--muted); font-size: clamp(1.04rem, 1.72vw, 1.27rem); }
.intro-copy p a { font-weight: 700; }
.intro-copy .wp-block-buttons { justify-content: center; width: min(100%, 28rem); }
.wp-block-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.wp-block-button a { display: inline-flex; justify-content: center; align-items: center; min-height: 3.15rem; padding: .65rem 1.16rem; border: 1px solid var(--accent); border-radius: .3rem; background: var(--accent); color: var(--black-green); font-size: .95rem; font-weight: 800; letter-spacing: .03em; text-align: center; text-transform: uppercase; text-decoration: none; }
.wp-block-button a:hover { background: var(--accent-strong); color: var(--black-green); }

#uslugi { scroll-margin-block-start: 1rem; }
.intro-panel + .main-services { margin-block-start: clamp(1.5rem, 4vw, 4.5rem); }
.main-services h2, .work-panel h2 { margin-block-end: 1.2rem; }
.main-services h2::after { display: inline-block; vertical-align: middle; width: .32em; height: .32em; margin-inline-start: .25em; background: var(--sage); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); content: ""; }
.services-slider { position: relative; }
.services-rail { --rail-inset: .25rem; display: flex; gap: clamp(.7rem, 1.45vw, 1.45rem); overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--rail-inset); padding: .3rem var(--rail-inset) .75rem; scrollbar-width: thin; scrollbar-color: var(--line) var(--canvas); }
.service-grid { display: contents; }
.service-card { position: relative; isolation: isolate; display: flex; flex: 0 0 calc((100% - 3 * clamp(.7rem, 1.45vw, 1.45rem)) / 3.2); flex-direction: column; justify-content: flex-end; min-width: 0; min-height: clamp(19rem, 31vw, 31rem); overflow: clip; border: 1px solid #6b6773; border-radius: .65rem; background: #282636; scroll-snap-align: start; color: #f5f0f3; }
.service-card > .wp-block-group__inner-container { display: contents; }
.service-card figure { position: absolute; z-index: -2; inset: 0; }
.service-card figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease; }
.service-card:hover figure img { transform: scale(1.04); }
.service-card::after { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, transparent 12%, rgb(28 25 36 / 16%) 38%, #221f2f 88%); content: ""; }
.service-card:not(:has(figure))::before { position: absolute; z-index: -2; inset: 0; background: repeating-linear-gradient(139deg, transparent 0 13%, #a48cab59 13.1% 13.5%, transparent 13.6% 23%), radial-gradient(ellipse at 75% 20%, #a38aaa, #49384f 70%); content: ""; }
.service-card:last-of-type:not(:has(figure))::before { background: repeating-linear-gradient(31deg, transparent 0 14%, #acc6b155 14.1% 14.5%, transparent 14.6% 24%), radial-gradient(ellipse at 70% 22%, #91b2a1, #344449 66%); }
.service-card h3 { padding: clamp(1.05rem, 2.3vw, 1.75rem) clamp(1rem, 2vw, 1.6rem) .5rem; color: #e2effd; }
.service-card h3 a { color: inherit; text-decoration: none; }
.service-card h3 a::after { position: absolute; inset: 0; content: ""; }
.service-card:focus-within { outline: 2px solid var(--orchid); outline-offset: 1px; }
.service-card:is(:hover,:focus-within) h3 a { color: var(--accent); }
.service-card p { margin: 0; padding: 0 clamp(1rem, 2vw, 1.6rem) clamp(1rem, 2.4vw, 1.7rem); color: #ede6ec; font-size: clamp(.91rem, 1.48vw, 1.06rem); }
.services-controls { display: flex; justify-content: flex-end; gap: .55rem; margin-block-start: .65rem; }
.services-controls button { display: grid; width: 3rem; aspect-ratio: 1; place-items: center; padding: 0 0 .11rem; border: 1px solid var(--accent); border-radius: .35rem; background: var(--accent); color: var(--black-green); font-size: 1.55rem; font-weight: 800; cursor: pointer; }
.services-controls button:hover { background: var(--accent-strong); }
.services-controls button:is(:disabled, [aria-disabled="true"]) { border-color: var(--line); background: var(--surface); color: var(--muted); cursor: default; }
.work-panel { padding: clamp(1.3rem, 4.55vw, 4rem); border: 1px solid var(--line); border-radius: .7rem; background: var(--surface); }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(.8rem, 2vw, 2rem); }
.work-step { padding: clamp(.8rem, 2vw, 1.5rem) 0 0; border-top: 1px solid var(--sage); }
.work-step p { margin-top: .55rem; color: var(--muted); }
.guide-callout { position: relative; display: grid; grid-template-columns: 1fr minmax(12rem,.55fr); align-items: center; gap: 1rem; padding: clamp(1.4rem, 5vw, 4.2rem); border: 1px solid var(--line); border-radius: .65rem; background: linear-gradient(126deg, #f8edf7, #e8ddea); }
.guide-callout::after { position: absolute; top: .65rem; right: .75rem; width: 1.3rem; aspect-ratio: 1; background: var(--orchid); clip-path: polygon(50% 0, 64% 36%, 100% 50%, 64% 64%, 50% 100%, 36% 64%, 0 50%, 36% 36%); content: ""; }
.guide-callout a { font-weight: 800; }

.entry, .listing { padding-block-start: clamp(1.6rem, 5vw, 5.3rem); }
.entry-top { padding: clamp(1.35rem, 5.2vw, 5rem); border: 1px solid var(--line); border-radius: .7rem; background: linear-gradient(120deg, #fff9f0, #eee4ef); }
.entry-top h1, .listing h1 { max-width: 22ch; font-size: clamp(2.1rem, 5.15vw, 5.35rem); }
.entry.has-picture .entry-intro { display: grid; grid-template-columns: minmax(0,.98fr) minmax(0,1.02fr); align-items: center; gap: clamp(1.25rem, 4.7vw, 5rem); }
.entry-intro img { width: 100%; aspect-ratio: 1.48; border-radius: .45rem; object-fit: cover; }
.entry-body { display: grid; grid-template-columns: minmax(0,var(--measure)) minmax(14rem,1fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: start; margin-block-start: clamp(1.5rem, 5vw, 4rem); }
.entry-body.single-column { grid-template-columns: minmax(0,var(--measure)); }
.entry-text { display: flow-root; overflow-wrap: break-word; }
.entry-city-navigation { margin-block-start: 1rem; }
.entry-city-navigation a { display: inline-flex; align-items: center; min-block-size: 2.75rem; font-weight: 750; }
.entry-text p { color: var(--muted); }
.entry-text h2 { margin: 1.75em 0 .55em; font-size: clamp(1.47rem, 3vw, 2.18rem); letter-spacing: -.033em; }
.entry-text p + p { margin-top: 1em; }
.entry-text > p:first-child + .wp-block-image { margin-block: .875rem; }
.entry-text details { padding: .8rem 1rem; border: 1px solid var(--line); border-radius: .45rem; background: var(--surface); }
.entry-text details + details { margin-top: .55rem; }
.entry-text summary { cursor: pointer; font-weight: 760; }
.entry-text summary::marker { color: var(--link); }
.entry-text details p { margin-block-start: .6rem; }
.entry-ending { margin-block-start: 1.55rem; padding: 1rem 1.25rem; border-inline-start: .24rem solid var(--accent); border-radius: .3rem; background: var(--surface-raised); }
.entry-aside { width: min(100%, 25rem); max-width: 100%; padding: 1.3rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--surface); }
.entry-aside h2 { font-size: 1.55rem; }
.entry-aside ul { margin: .9rem 0 0; padding-inline-start: 1.1rem; }
.entry-aside li + li { margin-top: .45rem; }
.guide-preview { max-width: var(--measure); margin-top: 1rem; padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: .55rem; background: var(--surface); }
.guide-preview h2 { margin-bottom: .6rem; font-size: clamp(1.35rem, 3vw, 2.15rem); }
.guide-preview h2 a { color: inherit; }
.guide-preview h2 a:hover { color: var(--orchid); }
.listing > p { margin-top: 1rem; }

.site-footer { position: relative; margin-block-start: var(--section); padding-block: clamp(2.5rem, 6vw, 6rem); border-top: 1px solid var(--line); background: #302939; }
.site-footer::before { position: absolute; inset: 0 auto 0 0; width: .32rem; background: var(--accent); content: ""; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr auto; align-items: start; gap: clamp(1.4rem, 4vw, 3rem); }
.site-footer .wordmark { color: #b7e5c4; font-size: clamp(1.1rem, 3vw, 2.1rem); }
.site-footer .wordmark-dot, .site-footer .wordmark-ninja { color: #e9c7ec; }
.footer-phone { color: var(--accent); }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: .6rem 1.35rem; }
.footer-nav a { color: #f8f2f3; font-weight: 700; }
.site-footer a:focus-visible { outline-color: var(--accent); }

@media (max-width: 970px) {
  .service-card { flex-basis: calc((100% - 2 * clamp(.7rem, 1.45vw, 1.45rem)) / 2.3); }
}
@media (max-width: 745px) {
  :root {
    --canvas: #f7f7f0;
    --header: #fcfcf7;
    --surface: #fffefa;
    --surface-raised: #efebf5;
    --heading: #243f67;
    --muted: #404b55;
    --accent: #cfe9d5;
    --accent-strong: #bbdfc6;
    --sage: #427a60;
    --link: #235d46;
    --orchid: #76557f;
    --line: #d7ddd5;
    --ink: #20384b;
    --gutter: clamp(.85rem, 4vw, 1.75rem);
    --section: clamp(2.4rem, 8vw, 3.75rem);
    --spark: polygon(50% 0, 60% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
    --arrow: polygon(0 41%, 70% 41%, 47% 20%, 58% 7%, 100% 50%, 58% 93%, 47% 80%, 70% 59%, 0 59%);
  }

  html { scroll-padding-top: 5rem; }
  h1, h2, h3 { letter-spacing: -.038em; line-height: 1.12; }
  h2 { font-size: clamp(1.7rem, 6.7vw, 2.45rem); }
  h3 { font-size: clamp(1.18rem, 4.85vw, 1.5rem); }

  .site-header { border-color: #e2e8de; }
  .header-grid { min-height: 4.15rem; column-gap: .45rem; }
  .site-header .wordmark { gap: .35rem; font-size: clamp(.84rem, 3.5vw, 1.05rem); }
  .site-header .mark { width: clamp(1.6rem, 6.8vw, 2.25rem); }
  .mark { background: #327159; }
  .header-phone { display: flex; align-items: center; min-height: 2.75rem; color: var(--heading); font-size: clamp(.77rem, 3.25vw, 1rem); }
  .site-menu summary { gap: .4rem; min-height: 2.75rem; padding-inline: .62rem; border-color: #c8d7ce; border-radius: .72rem; color: var(--link); background: #ecf5eb; font-size: .79rem; letter-spacing: .04em; }
  .menu-icon, .menu-icon::after { width: .82rem; }
  .site-nav { padding: .5rem; border-radius: 1rem; box-shadow: 0 14px 36px #263e4926; }
  .site-nav a { min-height: 3rem; padding-inline: .8rem; border-radius: .65rem; color: var(--heading); font-size: .95rem; }

  .intro-panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "portrait" "intro" "action";
    gap: .72rem;
    min-height: 0;
    margin-block-start: .8rem;
    padding: clamp(1rem, 5vw, 2rem) clamp(.9rem, 5vw, 2rem) 1.3rem;
    overflow: clip;
    border: 1px solid #d3e2d6;
    border-radius: 1.65rem 1.65rem 2.9rem 1.65rem;
    background: linear-gradient(155deg, #f3faee 0%, #e5f1e7 56%, #f8faf1 100%);
  }
  .intro-copy { display: contents; }
  .intro-copy h1 {
    grid-area: title;
    justify-self: center;
    max-width: 15ch;
    font-size: clamp(1.96rem, 8.55vw, 3.65rem);
    letter-spacing: -.046em;
    text-align: center;
  }
  .intro-copy h1::after { content: none; }
  .intro-panel::before {
    position: relative;
    inset: auto;
    grid-area: portrait;
    justify-self: center;
    width: min(105%, 28rem);
    aspect-ratio: 1.35;
    border-radius: 48% 52% 38% 62% / 49% 53% 47% 51%;
    transform: rotate(-9deg);
    background:
      repeating-linear-gradient(150deg, transparent 0 1.68rem, #faf9fa7a 1.7rem 1.75rem, transparent 1.78rem 2.8rem),
      linear-gradient(135deg, #dfd4ee 0%, #f0e5f3 60%, #cbe8d6 100%);
  }
  .intro-panel::after {
    grid-area: portrait;
    justify-self: center;
    width: min(105%, 28rem);
    min-height: 0;
    aspect-ratio: 1.35;
    background: url("assets/ninja-mask-mobile.webp") center bottom / contain no-repeat;
  }
  .intro-copy p { grid-area: intro; justify-self: center; max-width: 41ch; font-size: clamp(.94rem, 3.85vw, 1.1rem); line-height: 1.52; text-align: center; }
  .intro-copy .wp-block-buttons { grid-area: action; justify-self: center; }
  .wp-block-button a { min-height: 2.85rem; border: 0; border-radius: .85rem .85rem 1.25rem .85rem; background: var(--ink); color: #f7fff6; font-size: .84rem; letter-spacing: .025em; }
  .wp-block-button a:hover { background: #31624e; color: #fff; }
  .intro-copy .wp-block-button a::after { margin-inline-start: .65rem; color: #c9ead4; content: '↓' / ''; }

  .intro-panel + .main-services { margin-block-start: 1.75rem; }
  .main-services h2, .work-panel h2 { margin-block-end: .85rem; }
  .main-services h2::after { width: .65em; height: .65em; margin-inline-start: .34em; background: #a78bb1; clip-path: var(--spark); }
  .services-rail { --rail-inset: .1rem; column-gap: .65rem; padding-block: .12rem .5rem; scrollbar-width: none; }
  .service-card {
    flex-basis: 85%;
    justify-content: flex-start;
    min-height: 0;
    border-color: #d4dfd6;
    border-radius: 1.15rem .95rem 1.85rem .95rem;
    background: var(--surface);
    color: var(--heading);
    box-shadow: 0 2px 6px #243f670d;
  }
  .service-card figure { position: static; aspect-ratio: 1.56; overflow: hidden; background: #e4eee6; }
  .service-card figure img, .service-card:hover figure img { transform: none; }
  .service-card::after, .service-card:not(:has(figure))::before { content: none; }
  .service-card h3 {
    display: flow-root;
    padding: .86rem .85rem .37rem;
    background: radial-gradient(circle closest-side, #deeee0 97%, transparent) right .85rem top .86rem / 1.65rem 1.65rem no-repeat;
    color: var(--heading);
    text-wrap: pretty;
  }
  .service-card h3 a::before {
    float: inline-end;
    width: 1.65rem;
    aspect-ratio: 1;
    margin-inline-start: .45rem;
    transform: rotate(-45deg) scale(.49);
    clip-path: var(--arrow);
    background: var(--link);
    content: '';
  }
  .service-card:is(:hover, :focus-within) h3 a { color: var(--link); }
  .service-card p { padding: 0 .85rem .9rem; color: var(--muted); font-size: .93rem; line-height: 1.47; }
  .services-controls { justify-content: center; gap: .75rem; margin-block-start: .55rem; }
  .services-controls button {
    position: relative;
    width: clamp(4.65rem, 24vw, 6.5rem);
    min-height: 2.85rem;
    aspect-ratio: auto;
    padding: 0;
    border-color: #b6d7cd;
    border-radius: .9rem;
    background: #cde9df;
    color: #155347;
    font-size: 0;
  }
  .services-controls button::before {
    position: absolute;
    inset: 0;
    width: 1.6rem;
    height: 1.28rem;
    margin: auto;
    clip-path: var(--arrow);
    background: currentColor;
    content: '';
  }
  .services-controls button[data-direction="-1"]::before { transform: scaleX(-1); }
  .services-controls button:not(:disabled, [aria-disabled="true"]):hover { background: #b8ded3; }
  .services-controls button:is(:disabled, [aria-disabled="true"]) { color: #526358; }

  .work-panel, .guide-callout, .entry-top, .entry-aside, .guide-preview { border-color: #d6e0d7; border-radius: 1.35rem 1.35rem 2.15rem 1.35rem; }
  .work-panel { background: #ebf4eb; }
  .work-grid, .guide-callout { grid-template-columns: 1fr; }
  .work-grid { gap: .88rem; }
  .work-step { position: relative; padding: .82rem .8rem .85rem 1.75rem; border: 0; border-radius: .85rem; background: var(--surface); }
  .work-step::before { position: absolute; inset: 1.13rem auto auto .68rem; width: .68rem; aspect-ratio: 1; background: var(--sage); clip-path: var(--spark); content: ''; }
  .work-step p { margin-block-start: .3rem; font-size: .96rem; }
  .guide-callout { gap: .62rem; background: #eee7f5; }
  .guide-callout::after { inset: .72rem .8rem auto auto; width: 1rem; clip-path: var(--spark); }
  .guide-callout h2 { padding-inline-end: 1rem; }

  .entry, .listing { padding-block-start: .85rem; }
  .entry-top { position: relative; padding: clamp(1.05rem, 4.5vw, 2rem); background: linear-gradient(150deg, #ecf6ec 10%, #f0ebf5 100%); }
  .entry-top::after { position: absolute; inset: .85rem .9rem auto auto; width: .8rem; aspect-ratio: 1; background: #a48ab3; clip-path: var(--spark); content: ''; }
  .entry-top h1, .listing h1 { font-size: clamp(1.9rem, 7.8vw, 3rem); }
  .entry-top h1 { margin-inline: auto; padding-inline: .24rem; text-align: center; }
  .entry.has-picture .entry-intro { grid-template-columns: minmax(0, 1fr); gap: 1.35rem; }
  .entry-intro img { aspect-ratio: 1.56; border-radius: .85rem .85rem 1.45rem .85rem; }
  .entry-body { grid-template-columns: minmax(0, 1fr); margin-block-start: 1.25rem; }
  .entry-text h2 { margin-top: 1.4em; font-size: clamp(1.38rem, 5.65vw, 1.85rem); }
  .entry-text details { border-radius: .8rem; }
  .entry-ending { border-inline-start-color: #9dc9aa; border-radius: .7rem; }
  .entry-aside { width: 100%; background: #edf4ed; }
  .entry-aside ul { display: grid; gap: .33rem; padding-inline-start: 0; list-style: none; }
  .entry-aside li + li { margin: 0; }
  .entry-aside a { display: flex; align-items: center; min-height: 2.75rem; padding: .35rem .7rem; border-radius: .65rem; background: var(--surface); font-size: .94rem; }
  .listing h1 { padding-block: .85rem; }

  .site-footer { margin-block-start: var(--section); padding-block: 2rem 1.45rem; border: 0; border-radius: 1.9rem 1.9rem 0 0; background: var(--ink); }
  .site-footer::before { inset: .65rem 1.05rem auto auto; width: 1rem; aspect-ratio: 1; background: #c7b1d5; clip-path: var(--spark); }
  .footer-grid { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem .45rem; }
  .site-footer .wordmark { color: #b7e5c4; font-size: clamp(.94rem, 4.3vw, 1.3rem); }
  .site-footer .wordmark-ninja, .site-footer .wordmark-dot { color: #e4cbe9; }
  .site-footer .mark { background: #518469; }
  .footer-phone { padding-block: .5rem; }
  .footer-nav { grid-row: 2; grid-column: 1/-1; padding-block-start: .55rem; border-top: 1px solid #ffffff36; }
  .footer-nav ul { gap: .05rem .74rem; }
  .footer-nav a { display: flex; align-items: center; min-height: 2.75rem; font-size: .84rem; }
}
@media (min-width: 541px) and (max-width: 745px) {
  .service-card { flex-basis: 47%; }
}
@media (max-width: 370px) {
  .header-grid { padding-inline: .55rem; gap: .35rem; }
  .site-menu summary { padding-inline: .5rem; }
  .site-header .wordmark { gap: .28rem; }
}
@media (prefers-reduced-motion: reduce) {
  .service-card figure img { transition: none; }
}


.entry-publisher { margin-block-start: 1rem; color: var(--muted); font-size: .92rem; text-align: center; }
.listing-editorial { max-width: 62ch; margin-block: 1.75rem 2rem; }
.listing-editorial h2 { font-size: clamp(1.25rem, 3.5vw, 1.65rem); margin-block-end: .5rem; }
.listing-editorial p + p { margin-block-start: .55rem; }

/* Reflow the header when the visitor enlarges the default text size. */
.site-header { container: site-header / inline-size; }

@container site-header (max-width: 19.5rem) {
  .header-grid {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas: "brand menu" "phone phone";
    row-gap: 0;
    padding-block: .2rem;
  }

  .header-grid .wordmark {
    grid-area: brand;
    max-inline-size: 100%;
    white-space: normal;
  }

  .header-grid .wordmark > span:last-child {
    min-inline-size: 0;
    overflow-wrap: anywhere;
  }

  .site-menu { grid-area: menu; }

  .site-nav {
    inline-size: min(19rem, calc(100cqi - 1.1rem));
    padding: .35rem;
  }

  .site-nav a {
    padding-inline: .35rem;
    letter-spacing: .025em;
    overflow-wrap: anywhere;
  }

  .header-phone {
    grid-area: phone;
    min-block-size: max(44px, 2rem);
    justify-self: center;
  }
}

@container site-header (max-width: 13rem) {
  .header-grid .wordmark { gap: .25rem; }
  .site-header .mark { inline-size: 1.25rem; }
  .header-grid .wordmark-ninja { display: block; }
  .site-menu .menu-icon { display: none; }
}

.skip-link { max-inline-size: calc(100% - 2rem); overflow-wrap: anywhere; }
h1, h2, h3 { overflow-wrap: anywhere; }

@media (max-width: 745px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .work-step p { overflow-wrap: anywhere; }
}
