/* =========================================================================
   Margarita Creative - templates.css
   Reusable visual template kit: icons, patterns, story frames, hero frames,
   carousel, card, person card. Inherits brand tokens from site.css.
   Sharp corners throughout (border-radius: 0 on all kit components).
   Load this file AFTER site.css on pages that use the kit.
   ========================================================================= */

/* ---------- Icon ---------- */
/* Pixel-art sprite (assets/icons/retro/sprite.svg, 16x16 grid) — crispEdges
   keeps every square hard-edged instead of anti-aliased at non-integer
   scale factors (e.g. a 16-unit grid rendered at 40px). */
.tpl-ico {
  display: inline-block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: currentColor;
  vertical-align: middle;
  shape-rendering: crispEdges;
}

/* ---------- Patterns ---------- */
.tpl-pattern {
  display: block;
  width: 100%;
  height: 100%;
}
.tpl-pattern--hatch {
  background-image: repeating-linear-gradient(
    45deg,
    rgba(55, 64, 44, 0.08) 0px,
    rgba(55, 64, 44, 0.08) 1px,
    transparent 1px,
    transparent 8px
  );
}
.tpl-pattern--grid {
  background-image:
    linear-gradient(rgba(55, 64, 44, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 64, 44, 0.08) 1px, transparent 1px);
  background-size: 8px 8px;
}
.tpl-pattern--rule {
  width: 3px;
  height: 100%;
  background: var(--terracotta);
  display: block;
  flex-shrink: 0;
}

/* ---------- Story frames (9:16 portrait) ---------- */
.tpl-story {
  aspect-ratio: 9 / 16;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.5rem;
  width: 100%;
  max-width: 320px;
}

/* Field variant: olive bg, cream type */
.tpl-story--field {
  background: var(--olive);
  color: var(--cream);
}
.tpl-story--field .tpl-story__ico {
  color: var(--terracotta);
  margin-bottom: auto;
}
.tpl-story--field .tpl-story__kicker {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-muted);
  margin-bottom: 0.75rem;
}
.tpl-story--field .tpl-story__headline {
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: var(--cream);
  margin: 0 0 auto;
  text-wrap: balance;
}
.tpl-story--field .tpl-story__name {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cream-muted);
  margin-top: 1.5rem;
}

/* Quote variant: alabaster bg, terracotta rule, quote text */
.tpl-story--quote {
  background: var(--alabaster);
  color: var(--ink);
  flex-direction: row;
  gap: 1.25rem;
  padding: 2rem 1.5rem;
}
.tpl-story--quote .tpl-pattern--rule {
  align-self: stretch;
}
.tpl-story--quote .tpl-story__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tpl-story--quote .tpl-story__text {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.38;
  letter-spacing: -0.012em;
  color: var(--olive);
  margin: 0 0 1rem;
  font-style: italic;
  text-wrap: pretty;
}
.tpl-story--quote .tpl-story__attr {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

/* Split variant: olive block top + copy bottom */
.tpl-story--split {
  background: var(--alabaster);
  color: var(--ink);
  padding: 0;
  flex-direction: column;
}
.tpl-story--split .tpl-story__block {
  background: var(--olive);
  flex: 0 0 45%;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem 1.5rem;
}
.tpl-story--split .tpl-story__block-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-muted);
}
.tpl-story--split .tpl-story__copy {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.tpl-story--split .tpl-story__title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--olive);
  margin: 0 0 0.75rem;
  text-wrap: balance;
}
.tpl-story--split .tpl-story__body {
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  text-wrap: pretty;
}

/* ---------- Hero frames ---------- */
.tpl-hero {
  width: 100%;
  padding: 4.5rem 0;
  position: relative;
}
@media (min-width: 860px) {
  .tpl-hero { padding: 8rem 0; }
}

/* Hero split: two equal columns */
.tpl-hero--split .tpl-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 720px) {
  .tpl-hero--split .tpl-hero__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
.tpl-hero--split .tpl-hero__visual {
  background: var(--olive);
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}

/* Hero center: centered content */
.tpl-hero--center .tpl-hero__inner {
  text-align: center;
  max-width: 52rem;
  margin: 0 auto;
}
.tpl-hero--center .tpl-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* Hero rail: icon rail left + display + optional person card */
.tpl-hero--rail .tpl-hero__inner {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 720px) {
  .tpl-hero--rail .tpl-hero__inner {
    grid-template-columns: 1fr;
  }
}
.tpl-hero--rail .tpl-hero__rail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.25rem;
}
@media (max-width: 720px) {
  .tpl-hero--rail .tpl-hero__rail {
    flex-direction: row;
  }
}
.tpl-hero--rail .tpl-hero__rail-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--line);
  color: var(--olive);
}
.tpl-hero--rail .tpl-hero__body { min-width: 0; }
.tpl-hero--rail .tpl-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
@media (max-width: 480px) {
  .tpl-hero--rail .tpl-hero__actions {
    flex-direction: column;
    gap: 1.5rem;
  }
  .tpl-hero--rail .tpl-hero__actions .btn {
    width: 100%;
    justify-content: space-between;
  }
}

/* Shared hero text styles */
.tpl-hero__eyebrow { margin-bottom: 1rem; }
.tpl-hero__headline {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--olive);
  margin: 0 0 1.2rem;
  text-wrap: balance;
}
.tpl-hero__lede {
  font-size: 1.15rem;
  line-height: 1.62;
  color: var(--ink-soft);
  margin: 0;
  max-width: 38rem;
  text-wrap: pretty;
}
.band-olive .tpl-hero__headline { color: var(--cream); }
.band-olive .tpl-hero__lede { color: var(--cream-muted); }

/* ---------- Carousel ---------- */
.tpl-carousel {
  position: relative;
  overflow: hidden;
}
.tpl-carousel__track-wrap {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tpl-carousel__track-wrap::-webkit-scrollbar { display: none; }
.tpl-carousel__track {
  display: flex;
  gap: 1.5rem;
  padding: 0 0 1rem;
}
.tpl-carousel__slide {
  flex: 0 0 calc((100% - 3rem) / 3);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
@media (max-width: 860px) {
  .tpl-carousel__slide {
    flex: 0 0 calc((100% - 1.5rem) / 2);
  }
}
@media (max-width: 560px) {
  .tpl-carousel__slide {
    flex: 0 0 88%;
  }
}

/* Carousel controls */
.tpl-carousel__controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.tpl-carousel__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1.5px solid var(--line);
  cursor: pointer;
  color: var(--olive);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
  border-radius: 0;
}
.tpl-carousel__btn:hover {
  background: var(--olive);
  border-color: var(--olive);
  color: var(--cream);
}
.tpl-carousel__btn:active { transform: scale(0.98); }
.tpl-carousel__btn:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.tpl-carousel__btn svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .tpl-carousel__track-wrap { scroll-snap-type: none; }
}

/* ---------- Card (case / blog) ---------- */
.tpl-card {
  display: flex;
  flex-direction: column;
  background: var(--alabaster-soft);
  border: 1px solid var(--line-soft);
  border-radius: 0;
  overflow: hidden;
  height: 100%;
}
.tpl-card__thumb {
  background: var(--olive);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream-muted);
  position: relative;
  overflow: hidden;
}
.tpl-card__thumb--terracotta { background: var(--terracotta); }
.tpl-card__thumb--soft { background: var(--alabaster-dim); color: var(--ink-faint); }
.tpl-card__thumb .tpl-ico { width: 40px; height: 40px; opacity: 1; filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.3)); }
.tpl-card__tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
  background: rgba(28, 29, 24, 0.55);
  padding: 0.25rem 0.6rem;
}
.tpl-card__body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.tpl-card__meta {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.5rem;
}
.tpl-card__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--olive);
  margin: 0 0 0.75rem;
  text-wrap: balance;
}
.tpl-card__body p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
  text-wrap: pretty;
}
.tpl-card__result {
  font-size: 0.875rem;
  color: var(--ink-faint);
  font-style: italic;
  margin: auto 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line-soft);
}
.tpl-card__cta {
  margin-top: 1.25rem;
  padding-top: 0;
}

/* Blog / Note card variant */
.tpl-card--note .tpl-card__thumb {
  background: var(--alabaster-dim);
  aspect-ratio: 16 / 7;
}
.tpl-card--note .tpl-card__date {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin: 0 0 0.5rem;
  font-weight: 600;
}
.tpl-card--note .tpl-card__title {
  font-size: 1.1rem;
}

/* ---------- Person card (.tpl-person) ---------- */
.tpl-person {
  background: var(--olive);
  color: var(--cream);
  border-radius: 0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.tpl-person__top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.tpl-person__initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--terracotta);
  color: var(--cream);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  border-radius: 0;
  flex-shrink: 0;
}
.tpl-person__info { flex: 1; min-width: 0; }
.tpl-person__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--cream);
  margin: 0 0 0.2rem;
  line-height: 1.2;
}
.tpl-person__role {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--cream-muted);
  margin: 0;
  line-height: 1.4;
}
.tpl-person__email {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--cream-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.15s ease;
}
.tpl-person__email:hover { color: var(--cream); }
.tpl-person__email .tpl-ico { opacity: 0.7; }
.tpl-person__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--terracotta);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  border-radius: 0;
  min-height: 44px;
  transition: background 0.15s ease, transform 0.12s ease;
  width: fit-content;
}
.tpl-person__cta:hover { background: var(--terracotta-deep); color: var(--cream); }
.tpl-person__cta:active { transform: scale(0.98); }

/* ---------- Icon strip (showcase utility row) ---------- */
.tpl-icon-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  align-items: center;
}
.tpl-icon-strip__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-soft);
}
.tpl-icon-strip__item .tpl-ico {
  width: 28px;
  height: 28px;
}
.tpl-icon-strip__label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- Pattern swatch strip (showcase) ---------- */
.tpl-swatch-strip {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.tpl-swatch {
  flex: 1;
  min-width: 120px;
  height: 80px;
  border: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.tpl-swatch__inner {
  width: 100%;
  height: 100%;
}

/* ---------- Story frame row (showcase) ---------- */
.tpl-story-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
}
.tpl-story-row .tpl-story {
  flex: 0 0 220px;
}
@media (max-width: 560px) {
  .tpl-story-row .tpl-story {
    flex: 0 0 calc(50% - 0.75rem);
  }
}

/* ---------- Section header utility ---------- */
.tpl-section-head {
  margin-bottom: 3rem;
}
.tpl-section-head .eyebrow { display: block; margin-bottom: 0.75rem; }
.tpl-section-head h2 { margin-bottom: 0.5rem; }
.tpl-section-head p { max-width: 38rem; }

/* ---------- Active state feedback ---------- */
.tpl-carousel__btn:active,
.tpl-person__cta:active {
  transform: scale(0.98);
  transition-duration: 0.08s;
}

/* ---------- Breathing room between stacked kit CTAs ---------- */
.tpl-hero__actions > * + * { margin-top: 0; }
.tpl-hero--center .tpl-hero__actions > .btn + .btn { margin-left: 0; }

/* Reduced motion: disable carousel scroll animation */
@media (prefers-reduced-motion: reduce) {
  .tpl-carousel__track-wrap {
    scroll-behavior: auto;
  }
  .tpl-person__cta,
  .tpl-carousel__btn {
    transition: none;
  }
}

/* ---------- Newsletter form ---------- */
.nl-strip {
  background: var(--olive);
  color: var(--cream);
  padding: 3rem 0;
}
.nl-strip h2 { color: var(--cream); margin-bottom: 0.5rem; text-wrap: balance; }
.nl-strip p { color: var(--cream-muted); }

.nl-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 720px) {
  .nl-block { grid-template-columns: 1fr; gap: 1.5rem; }
}

.nl-form { display: flex; flex-direction: column; gap: 0.75rem; }
.nl-fields { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.nl-fields input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  height: 52px;
  padding: 0 1rem;
  border: 1.5px solid rgba(244, 240, 230, 0.25);
  background: rgba(244, 240, 230, 0.08);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 1rem;
  border-radius: 0;
  outline: none;
  transition: border-color 0.15s ease;
}
.nl-fields input[type="email"]::placeholder { color: var(--cream-faint); }
.nl-fields input[type="email"]:focus { border-color: rgba(244, 240, 230, 0.6); }

.nl-thanks {
  background: var(--terracotta);
  color: var(--cream);
  padding: 1rem 1.25rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Compact newsletter form (aside / resource pages, light bg) */
.nl-compact {
  background: var(--alabaster-soft);
  border: 1px solid var(--line-soft);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.nl-compact h3 { font-size: 1.05rem; margin: 0 0 0.4rem; }
.nl-compact p { font-size: 0.875rem; color: var(--ink-soft); margin: 0 0 1rem; }
.nl-compact .nl-fields { flex-direction: column; gap: 0.6rem; }
.nl-compact .nl-fields input[type="email"] {
  background: var(--alabaster);
  border-color: var(--line);
  color: var(--ink);
  flex: none;
  width: 100%;
}
.nl-compact .nl-fields input[type="email"]::placeholder { color: var(--ink-faint); }
.nl-compact .nl-fields input[type="email"]:focus { border-color: var(--terracotta); }
.nl-compact .btn { width: 100%; justify-content: space-between; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* =========================================================================
   Cart: launcher (inside .pill-nav__row) + slide-out drawer
   Store pages only (skills.html + skills/<slug>.html) — cart.js injects
   both, so no other page's nav markup changes to support this.
   ========================================================================= */
.cart-launch {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: none; border: 0; padding: 0;
  color: rgba(244,240,230,.8);
  cursor: pointer;
  transition: color .15s ease, transform .16s var(--ease-out);
}
@media (hover: hover) { .cart-launch:hover { color: #F4F0E6; } }
.cart-launch:active { transform: scale(0.9); }
.cart-launch__count {
  position: absolute; top: -4px; right: -6px;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 0.65rem; font-weight: 700; line-height: 1;
  background: var(--terracotta); color: var(--cream);
  border-radius: var(--r-pill);
}
/* Same trap as .cart-drawer / .form: a display rule here would otherwise
   override the [hidden] attribute's UA-stylesheet display: none. */
.cart-launch__count[hidden] { display: none; }

.cart-drawer { position: fixed; inset: 0; z-index: 400; }
/* Same trap as .form/.audit-popup__form: a display rule on this selector
   would otherwise override the [hidden] attribute's UA-stylesheet display:
   none, so it's restated explicitly here. */
.cart-drawer[hidden] { display: none; }
.cart-drawer__backdrop {
  position: absolute; inset: 0;
  background: rgba(28,29,24,0.45);
  opacity: 0;
  transition: opacity .28s var(--ease-drawer);
}
.cart-drawer.open .cart-drawer__backdrop { opacity: 1; }
.cart-drawer__panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(420px, 92vw);
  background: var(--alabaster);
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s var(--ease-drawer);
}
.cart-drawer.open .cart-drawer__panel { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
  .cart-drawer__backdrop, .cart-drawer__panel { transition: none; }
}

.cart-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 1.5rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.cart-drawer__head h2 { margin: 0; font-size: 1.1rem; }
.cart-drawer__close {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; font-size: 1.4rem; line-height: 1;
  color: var(--ink-faint); cursor: pointer;
  transition: color .15s ease, transform .16s var(--ease-out);
}
@media (hover: hover) { .cart-drawer__close:hover { color: var(--ink); } }
.cart-drawer__close:active { transform: scale(0.9); }

.cart-drawer__body { flex: 1; overflow-y: auto; padding: 1.5rem; }
.cart-drawer__empty { margin: 0; color: var(--ink-faint); font-size: 0.95rem; }

.cart-line {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.cart-line:first-child { padding-top: 0; }
.cart-line__info { min-width: 0; }
.cart-line__name { margin: 0 0 0.2rem; font-family: var(--serif); font-weight: 600; font-size: 1rem; color: var(--olive); }
.cart-line__price { margin: 0; font-size: 0.82rem; color: var(--ink-faint); }
.cart-line__qty { flex: none; display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.cart-line__qty button {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--alabaster-soft);
  color: var(--olive); cursor: pointer; font-size: 1rem; line-height: 1;
  transition: border-color .15s ease, background .15s ease, transform .16s var(--ease-out);
}
@media (hover: hover) { .cart-line__qty button:hover { border-color: var(--olive); background: var(--alabaster); } }
.cart-line__qty button:active { transform: scale(0.9); }
.cart-line__remove {
  flex: none;
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--ink-faint); font-size: 1.2rem; cursor: pointer;
  transition: color .15s ease, transform .16s var(--ease-out);
}
@media (hover: hover) { .cart-line__remove:hover { color: var(--terracotta); } }
.cart-line__remove:active { transform: scale(0.85); }

.cart-drawer__msg {
  margin: 0; padding: 0.85rem 1.5rem;
  background: var(--terracotta-tint); color: var(--terracotta-deep);
  font-size: 0.85rem; line-height: 1.5;
}
.cart-drawer__msg[hidden] { display: none; }

.cart-drawer__foot { padding: 1.25rem 1.5rem 1.5rem; border-top: 1px solid var(--line); }
.cart-drawer__subtotal { display: flex; justify-content: space-between; font-family: var(--serif); font-size: 1.15rem; color: var(--olive); margin: 0 0 1rem; }
.cart-drawer__foot .btn { width: 100%; justify-content: center; }
.cart-drawer__note { margin: 0.85rem 0 0; font-size: 0.78rem; color: var(--ink-faint); }

/* =========================================================================
   Skills directory (search + category filter + ranked row list)
   ========================================================================= */
.skill-search {
  display: block;
  width: 100%;
  max-width: 32rem;
  margin: 2rem auto 0;
  padding: 0.9rem 1.25rem;
  background: rgba(244,240,230,0.08);
  border: 1px solid rgba(244,240,230,0.2);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 1rem;
  border-radius: 0;
}
.skill-search::placeholder { color: var(--cream-muted); }
.skill-search:focus { outline: none; border-color: var(--terracotta); background: rgba(244,240,230,0.12); }
.skill-count { margin: 0.85rem 0 0; font-size: 0.85rem; color: var(--cream-muted); }

.skill-directory { display: grid; gap: 2rem; }
@media (min-width: 900px) {
  .skill-directory { grid-template-columns: 15rem 1fr; gap: 3rem; align-items: start; }
}
.skill-directory__aside { display: flex; flex-direction: column; gap: 1.5rem; }
.skill-directory__aside .filters { flex-direction: column; margin-bottom: 0; }
.skill-directory__summary { font-size: 0.875rem; color: var(--ink-faint); line-height: 1.6; padding-top: 1.5rem; border-top: 1px solid var(--line); }

.skill-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.skill-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  background: var(--alabaster);
  padding: 1.25rem 1.5rem;
  transition: background .15s ease;
}
.skill-row.is-hidden { display: none; }
@media (hover: hover) { .skill-row:hover { background: var(--alabaster-soft); } }
.skill-row__lead { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.skill-row__rank { flex: none; width: 1.6rem; font-family: var(--serif); font-style: italic; color: var(--ink-faint); font-size: 0.95rem; }
.skill-row__icon {
  flex: none; width: 2.5rem; height: 2.5rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--olive); color: var(--cream);
}
.skill-row__icon .tpl-ico { width: 20px; height: 20px; }
.skill-row__body { min-width: 0; }
.skill-row__name { margin: 0 0 0.2rem; font-family: var(--serif); font-weight: 600; font-size: 1.02rem; }
.skill-row__name a { color: var(--olive); }
.skill-row__name a:hover { color: var(--terracotta); }
.skill-row__desc { margin: 0; font-size: 0.88rem; color: var(--ink-faint); max-width: 52ch; }
.skill-row__meta { margin: 0.35rem 0 0; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
.skill-row__trail { flex: none; display: flex; align-items: center; gap: 1.25rem; }
.skill-row__price { font-family: var(--serif); font-size: 1.05rem; color: var(--olive); white-space: nowrap; }
.skill-row__price--free { color: var(--terracotta); font-style: italic; }
.skill-directory__empty { display: none; padding: 2.5rem 1.5rem; text-align: center; color: var(--ink-faint); background: var(--alabaster); border: 1px solid var(--line); }
.skill-directory__empty.is-visible { display: block; }

@media (max-width: 640px) {
  .skill-row { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .skill-row__trail { width: 100%; justify-content: space-between; }
}

/* ---------- Site search results (404.html) ---------- */
.results-group { margin-top: 0; }
.results-group + .results-group { margin-top: 2rem; }
.results-group.is-hidden { display: none; }
.results-group__label { font-family: var(--sans); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 0.75rem; }
.results-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.results-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--alabaster); padding: 0.9rem 1.1rem; text-decoration: none; color: inherit; }
.results-row.is-hidden { display: none; }
@media (hover: hover) { .results-row:hover { background: var(--alabaster-soft); } }
.results-row__title { font-family: var(--serif); font-weight: 600; font-size: 0.98rem; color: var(--olive); }
.results-row__desc { font-size: 0.82rem; color: var(--ink-faint); margin-top: 0.15rem; }
.results-row__cat { flex-shrink: 0; font-family: var(--sans); font-weight: 600; font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--terracotta-deep); }

/* ---------- Notes & Guides directory (blog.html) ---------- */
.content-empty { display: none; padding: 2.5rem 1.5rem; text-align: center; color: var(--ink-faint); background: var(--alabaster); border: 1px solid var(--line); }
.content-empty.is-visible { display: block; }
.tpl-card--note.is-hidden { display: none; }
@media (hover: hover) {
  .tpl-card--note { transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out); }
  .tpl-card--note:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
}
.nl-compact .nl-thanks { background: var(--olive); margin-bottom: 0.75rem; font-size: 0.875rem; }
