/* ==========================================================================
   Case study pages
   ========================================================================== */

/* ---------- Hero ---------- */
.cs-hero { padding: 110px 0 clamp(48px, 6vw, 80px); }
.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(32px, 5vw, 56px);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color .2s ease;
}
.cs-back svg { width: 14px; height: 14px; transition: transform .25s ease; }
.cs-back:hover { color: var(--ink); }
.cs-back:hover svg { transform: translateX(-4px); }

.cs-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 32px clamp(32px, 5vw, 80px);
  align-items: end;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.cs-hero .section-head { margin-bottom: 24px; }
.cs-hero h1 {
  font-size: clamp(42px, 5.6vw, 84px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  max-width: 14ch;
}
.cs-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.cs-tags li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.cs-lede { font-family: var(--font-alt); font-size: 20px; line-height: 1.5; color: var(--ink-soft); }

.cs-cover {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.cs-cover-img {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px rgba(0,0,0,.12);
}
.cs-cover-img img { display: block; width: 100%; height: auto; }
.cs-meta { margin: 0; display: flex; flex-direction: column; }
.cs-meta div { padding: 18px 0; border-top: 1px solid var(--line); }
.cs-meta div:last-child { border-bottom: 1px solid var(--line); }
.cs-meta dt {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.cs-meta dd { margin: 0; font-family: var(--font-alt); font-size: 18px; color: var(--ink); line-height: 1.4; }

/* ---------- Sticky section tabs ---------- */
.cs-tabs {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.cs-tabs .container {
  display: flex;
  gap: clamp(16px, 3vw, 40px);
  overflow-x: auto;
  scrollbar-width: none;
}
.cs-tabs .container::-webkit-scrollbar { display: none; }
.cs-tabs a {
  position: relative;
  flex: none;
  padding: 18px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
  transition: color .2s ease;
}
.cs-tabs a span { margin-left: 6px; color: inherit; }
.cs-tabs a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.cs-tabs a:hover,
.cs-tabs a.is-active { color: var(--ink); }
.cs-tabs a.is-active::after { transform: scaleX(1); }

/* ---------- Sections ---------- */
.cs-section { padding: clamp(72px, 9vw, 128px) 0 0; scroll-margin-top: 56px; }
.cs-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px clamp(32px, 5vw, 80px);
}
.cs-split + .cs-split,
.cs-split--tight { margin-top: clamp(40px, 5vw, 64px); }
/* a text block that follows a full-width visual needs more air */
.cs-section > .container:not(.cs-split) + .cs-split:not(.cs-split--tight) { margin-top: clamp(64px, 8vw, 112px); }
.cs-label { position: sticky; top: 90px; align-self: start; }
.cs-label .num { display: block; font-size: 26px; font-weight: 600; color: var(--ink-muted); margin-bottom: 8px; }
.cs-label h2 { font-size: clamp(28px, 2.8vw, 40px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }

.cs-body { max-width: 760px; }
.cs-body > * + * { margin-top: 20px; }
.cs-body p,
.cs-body li { font-family: var(--font-alt); font-size: 19px; line-height: 1.6; color: var(--ink-soft); }
.cs-body strong { color: var(--ink); font-weight: 600; }
.cs-big {
  font-family: var(--font) !important;
  font-size: clamp(22px, 2.2vw, 30px) !important;
  font-weight: 400;
  line-height: 1.35 !important;
  letter-spacing: -0.015em;
  color: var(--ink) !important;
}
.cs-body h3 {
  margin-top: 44px;
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.cs-mini {
  font-family: var(--font) !important;
  font-size: 13px !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted) !important;
}

/* Team */
.cs-team { margin-top: 40px !important; padding: 28px; background: var(--surface); border-radius: 6px; }
.cs-team dl { margin: 16px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 32px; }
.cs-team dt { font-size: 14px; font-weight: 600; color: var(--ink-muted); margin-bottom: 4px; }
.cs-team dd { margin: 0; font-family: var(--font-alt); font-size: 18px; color: var(--ink); }

/* Numbered manual steps */
.cs-steps { counter-reset: step; list-style: none; padding: 0; margin: 28px 0 0; border-top: 1px solid var(--line); }
.cs-steps li {
  counter-increment: step;
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink) !important;
}
.cs-steps li::before {
  content: counter(step, decimal-leading-zero);
  flex: none;
  width: 32px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-muted);
  padding-top: 4px;
}
.cs-callout { margin-top: 32px !important; padding: 28px; border-left: 3px solid var(--ink); background: var(--surface); border-radius: 0 6px 6px 0; }
.cs-callout p + p { margin-top: 10px; }

/* Chips */
.cs-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.cs-chips li {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px !important;
  line-height: 1.3 !important;
  color: var(--ink) !important;
}
.cs-chips--quiet li { background: transparent; border: 1px solid var(--line); color: var(--ink-soft) !important; }
.cs-flow-title { margin-top: 40px !important; }

/* Core workflow pipeline */
.cs-pipeline {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: pipe;
}
.cs-pipeline li {
  counter-increment: pipe;
  position: relative;
  padding: 24px 20px 22px;
  background: var(--surface);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}
.cs-pipeline li::before {
  content: counter(pipe, decimal-leading-zero);
  display: block;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--ink-muted);
}
.cs-pipeline li + li { border-left: 1px solid var(--line); }
.cs-pipeline li:first-child { border-radius: 6px 0 0 6px; }
.cs-pipeline li:last-child { border-radius: 0 6px 6px 0; background: var(--accent); color: var(--on-accent); }
.cs-pipeline li:last-child::before { color: inherit; opacity: .6; }
/* small arrow between steps */
.cs-pipeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  z-index: 1;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--ink-muted);
  border-right: 1px solid var(--ink-muted);
  background: var(--surface);
  transform: translateY(-50%) rotate(45deg);
}

/* ---------- Workflow architecture (rebuilt diagram) ---------- */
.cs-arch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3.2fr) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin-top: 8px;
}
.arch-node {
  position: relative;
  padding: 22px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.arch-node h4 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 10px 0 6px; color: var(--ink); }
.arch-node p { font-family: var(--font-alt); font-size: 15px; line-height: 1.45; color: var(--ink-soft); }
.arch-num {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.arch-input, .arch-output { background: var(--surface); }
.arch-input .arch-num, .arch-output .arch-num { background: var(--bg); }
.arch-output { border-color: var(--ink); }
.arch-flow {
  position: relative;
  padding: 44px 22px 22px;
  border: 1px dashed var(--ink-faint);
  border-radius: 10px;
  background: var(--surface);
}
.arch-flow-label {
  position: absolute;
  top: 14px;
  left: 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.arch-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.arch-pair { display: grid; gap: 16px; }
.arch-ai { border-color: var(--ink-muted); }
/* connectors between the outer nodes and the n8n box */
.cs-arch > .arch-input::after,
.cs-arch > .arch-flow::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -20px;
  width: 20px;
  height: 1px;
  background: var(--ink-muted);
}

/* ---------- Feature cards ---------- */
.cs-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: clamp(40px, 5vw, 64px);
}
.cs-features article { padding: 28px; border-radius: 6px; background: var(--surface); }
.cs-features h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 12px; }
.cs-features p { font-family: var(--font-alt); font-size: 17px; line-height: 1.55; color: var(--ink-soft); }
.cs-toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.cs-toast svg { flex: none; width: 18px; height: 18px; color: #3f9a5a; }

/* ---------- Moodboards & prompt ---------- */
.cs-moodboards { display: grid; grid-template-columns: repeat(2, minmax(0, 448px)); gap: 20px; margin-top: 28px; }
.cs-moodboards figure { margin: 0; }
.cs-moodboards a { display: block; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); transition: transform .3s ease, box-shadow .3s ease; }
.cs-moodboards a:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line), 0 20px 40px rgba(0,0,0,.12); }
.cs-moodboards img { display: block; width: 100%; height: auto; }
.cs-moodboards figcaption { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--ink-muted); }

.cs-prompt { margin-top: 28px; max-width: 916px; border: 1px solid var(--line); border-radius: 6px; }
.cs-prompt summary {
  cursor: pointer;
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cs-prompt summary::-webkit-details-marker { display: none; }
.cs-prompt summary::after { content: "+"; font-size: 22px; font-weight: 400; transition: transform .25s ease; }
.cs-prompt[open] summary::after { transform: rotate(45deg); }
.cs-prompt pre {
  margin: 0;
  padding: 22px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* ---------- V1.1 updates ---------- */
.cs-update {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(40px, 5vw, 64px) 0;
  border-bottom: 1px solid var(--line);
}
.cs-update:last-child { border-bottom: 0; }
.cs-update--flip .cs-update-text { order: 2; }
.cs-update-num {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cs-update h3 { margin: 16px 0 12px; font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.cs-update p,
.cs-list li { font-family: var(--font-alt); font-size: 18px; line-height: 1.6; color: var(--ink-soft); }
.cs-list { margin: 16px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.cs-list strong, .cs-list em { color: var(--ink); font-style: normal; font-weight: 600; }
kbd {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.cs-update-media figure {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px rgba(0,0,0,.1);
}
.cs-update-media img { display: block; width: 100%; height: auto; }
.cs-update-media--stack { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: start; }
.cs-update-media--stack figure:last-child { margin-top: 48px; }

/* ---------- Results ---------- */
.cs-impact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cs-impact > div { padding: 32px 32px 32px 0; }
.cs-impact > div + div { padding-left: 32px; border-left: 1px solid var(--line); }
.cs-impact-value {
  font-size: clamp(40px, 4.4vw, 64px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}
.cs-impact p:not(.cs-impact-value) { font-family: var(--font-alt); font-size: 18px; color: var(--ink-soft); }
.cs-outcomes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.cs-outcomes li { padding: 26px; background: var(--bg); }
.cs-outcomes h4 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.cs-outcomes p { font-family: var(--font-alt); font-size: 17px; line-height: 1.5; color: var(--ink-soft); }

.cs-quote {
  margin: 32px 0 !important;
  padding: 0 0 0 24px;
  border-left: 3px solid var(--ink);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* ---------- Next ---------- */
.cs-next { padding: clamp(80px, 10vw, 140px) 0 clamp(40px, 5vw, 64px); }
.cs-next-link {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(32px, 4vw, 56px);
  border-radius: 6px;
  background: var(--surface);
  transition: background-color .3s ease;
}
.cs-next-link:hover { background: var(--surface-2); }
.cs-next-title {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: clamp(30px, 4vw, 56px);
  font-weight: 600;
  letter-spacing: -0.035em;
}
.cs-next-title svg { width: .7em; height: .7em; transition: transform .3s ease; }
.cs-next-link:hover .cs-next-title svg { transform: translateX(8px); }

.site-footer { padding-bottom: 110px; }

/* ---------- Dark theme tweaks ---------- */
:root[data-theme="dark"] .cs-cover-img,
:root[data-theme="dark"] .cs-update-media figure { box-shadow: 0 0 0 1px var(--line), 0 30px 60px rgba(0,0,0,.45); }
:root[data-theme="dark"] .cs-toast svg { color: #8fcf9d; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cs-cover { grid-template-columns: 1fr; }
  .cs-meta { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 32px; }
  .cs-meta div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .cs-pipeline { grid-template-columns: repeat(4, 1fr); }
  .cs-pipeline li:nth-child(4) { border-radius: 0 6px 6px 0; }
  .cs-pipeline li:nth-child(5) { border-left: 0; border-radius: 6px 0 0 6px; }
  .cs-pipeline li:nth-child(4)::after { display: none; }
  .cs-pipeline { row-gap: 12px; }
  .cs-arch { grid-template-columns: 1fr; }
  .cs-arch > .arch-input::after,
  .cs-arch > .arch-flow::after { top: auto; bottom: -20px; right: auto; left: 50%; width: 1px; height: 20px; }
  .cs-features { grid-template-columns: repeat(2, 1fr); }
  .cs-outcomes { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .cs-hero { padding-top: 96px; }
  .cs-hero-grid { grid-template-columns: 1fr; }
  .cs-meta { grid-template-columns: 1fr; }
  .cs-split { grid-template-columns: 1fr; }
  .cs-split--tight > div:first-child { display: none; }
  .cs-label { position: static; }
  .cs-team dl { grid-template-columns: 1fr; }
  .cs-pipeline { grid-template-columns: 1fr 1fr; }
  .cs-pipeline li { border-radius: 0 !important; border-left: 0 !important; }
  .cs-pipeline li::after { display: none; }
  .arch-grid { grid-template-columns: 1fr; }
  .cs-features { grid-template-columns: 1fr; }
  .cs-moodboards { grid-template-columns: 1fr; }
  .cs-update { grid-template-columns: 1fr; }
  .cs-update--flip .cs-update-text { order: 0; }
  .cs-update-media--stack { grid-template-columns: 1fr; }
  .cs-update-media--stack figure:last-child { margin-top: 0; }
  .cs-impact { grid-template-columns: 1fr; }
  .cs-impact > div,
  .cs-impact > div + div { padding: 24px 0; border-left: 0; }
  .cs-impact > div + div { border-top: 1px solid var(--line); }
  .cs-outcomes { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Website showcase — one carousel of page screenshots per site
   ========================================================================== */
.site-block { padding-top: clamp(64px, 8vw, 112px); }
.site-block + .site-block .container { padding-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--line); }
.site-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
  gap: 16px clamp(24px, 3vw, 48px);
  align-items: start;
  margin-bottom: clamp(24px, 3vw, 40px);
}
.site-head .num { font-size: 26px; font-weight: 600; color: var(--ink-muted); line-height: 1.2; }
.site-title h2 { font-size: clamp(26px, 2.8vw, 40px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.site-meta {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.site-desc { font-family: var(--font-alt); font-size: 18px; line-height: 1.55; color: var(--ink-soft); }
.site-visit { white-space: nowrap; padding-top: 6px; }
.site-visit .i-out { width: 12px; height: 12px; }
.site-visit:hover .i-out { transform: translate(2px, -2px); }

/* Carousel */
.carousel { position: relative; }
.carousel-track {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0 0 4px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; border-radius: 6px; }
.carousel-track.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.carousel-track.is-dragging img { pointer-events: none; }
.site-slide { flex: 0 0 min(78%, 980px); scroll-snap-align: start; }
.site-slide figure { margin: 0; }
.site-slide img,
.site-shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border-radius: 0 0 6px 6px;
  background: var(--surface);
  user-select: none;
  -webkit-user-drag: none;
}
.site-shot--empty {
  display: grid;
  place-items: center;
  border: 1px dashed var(--ink-faint);
  border-top: 0;
  color: var(--ink-muted);
  font-size: 15px;
  font-weight: 600;
}
.site-frame {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 34px;
  padding: 0 14px;
  border-radius: 6px 6px 0 0;
  background: var(--surface-2);
}
.site-dots { display: flex; gap: 6px; }
.site-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-faint); }
.site-url {
  flex: 1;
  max-width: 320px;
  margin: 0 auto;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 12px;
  color: var(--ink-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-slide figure { box-shadow: 0 0 0 1px var(--line), 0 18px 40px rgba(0,0,0,.08); border-radius: 6px; transition: transform .4s ease, opacity .4s ease; }
.site-slide figcaption {
  display: flex;
  gap: 10px;
  padding: 14px 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.site-slide figcaption span { color: var(--ink-muted); }
.site-slide:not(.is-current) figure { opacity: .55; }
.site-slide figure { position: relative; }
.site-slide figcaption { position: absolute; left: 0; right: 0; top: 100%; }
.site-slide { padding-bottom: 46px; }

.carousel-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 6px;
}
.carousel-dots { display: flex; gap: 8px; flex: 1; }
.carousel-dot {
  width: 28px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--ink-faint);
  cursor: pointer;
  transition: width .3s ease, background-color .3s ease;
}
.carousel-dot[aria-selected="true"] { width: 52px; background: var(--ink); }
.carousel-dot:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.carousel-count { font-size: 14px; font-weight: 700; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.carousel-arrows { display: flex; gap: 8px; }
.carousel-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}
.carousel-btn svg { width: 16px; height: 16px; }
.carousel-btn:hover:not(:disabled) { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.carousel-btn:disabled { opacity: .35; cursor: default; }
.carousel-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

:root[data-theme="dark"] .site-slide figure { box-shadow: 0 0 0 1px var(--line), 0 18px 40px rgba(0,0,0,.4); }

@media (prefers-reduced-motion: reduce) {
  .carousel-track { scroll-behavior: auto; }
}
@media (max-width: 1024px) {
  .site-head { grid-template-columns: auto 1fr auto; }
  .site-desc { grid-column: 2 / -1; grid-row: 2; }
}
@media (max-width: 760px) {
  .site-head { grid-template-columns: auto 1fr; }
  .site-desc { grid-column: 1 / -1; }
  .site-visit { grid-column: 1 / -1; padding-top: 0; }
  .site-slide { flex-basis: 88%; }
  .carousel-count { display: none; }
  .carousel-dot { width: 18px; }
  .carousel-dot[aria-selected="true"] { width: 36px; }
}
.site-badge {
  align-self: start;
  margin-top: 4px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}
@media (max-width: 760px) {
  .site-badge { grid-column: 1 / -1; justify-self: start; }
}
