:root {
  --bg: #0d0c09;
  --surface: #14130e;
  --surface-2: #1c1a13;
  --border: rgba(242, 239, 227, 0.13);
  --border-strong: rgba(242, 239, 227, 0.3);
  --cream: #f2efe3;
  --text: #f2efe3;
  --text-muted: #a8a395;
  --pink: #f2a9c9;
  --pink-deep: #e57cae;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* Anchor targets clear the sticky header. Smooth scrolling is handled in JS
   (page-load hash jumps stay instant, so returning from a detail page never animates). */
.library, .how-to { scroll-margin-top: 76px; }

html { overflow-x: clip; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: 0.9em; }

.serif-i { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 66px;
  padding: 0 32px;
  background: rgba(13, 12, 9, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 10px; flex: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--cream);
  color: #14130e;
  font-weight: 800;
  font-size: 15px;
}

.brand-name { font-weight: 700; letter-spacing: -0.01em; font-size: 17px; }

.header-nav { display: flex; align-items: center; gap: 22px; font-size: 16px; color: var(--text-muted); }
.header-nav a:hover { color: var(--text); }
.header-nav a[aria-current="page"] { color: var(--text); text-shadow: 0 0 0.5px currentColor, 0 0 0.5px currentColor; }

/* Quiet mono text — the header keeps a single visual accent (the CTA button). */
.header-count {
  min-width: 8.5em;
  font-size: 14px;
  font-family: var(--mono);
  white-space: nowrap;
}

.live-num {
  position: relative;
  display: inline-block;
  padding-right: 9px;
  font-style: normal;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--pink);
}

.live-num::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #86efac;
  box-shadow:
    0 0 3px 1px #86efac,
    0 0 8px 2px rgba(134, 239, 172, 0.65);
  animation: live-num-blink 1.8s ease-in-out infinite;
}

@keyframes live-num-blink {
  0%, 100% {
    opacity: 1;
    box-shadow:
      0 0 3px 1px #86efac,
      0 0 8px 2px rgba(134, 239, 172, 0.65);
  }
  50% {
    opacity: 0.55;
    box-shadow:
      0 0 2px 0 rgba(134, 239, 172, 0.4),
      0 0 5px 1px rgba(134, 239, 172, 0.22);
  }
}

.header-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.header-actions .btn-sm { font-size: 14.5px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }

.btn-cream { background: var(--cream); color: #14130e; }
.btn-cream:hover { background: #fffdf2; }

.btn-outline { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--cream); }

.btn-ghost { background: transparent; color: var(--text-muted); padding: 9px 10px; }
.btn-ghost:hover { color: var(--text); }

.btn-sm { padding: 6px 14px; font-size: 12.5px; }

/* logged-in chip + dropdown */
.auth-area { position: relative; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s;
}

.user-chip:hover { border-color: var(--border-strong); }

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--pink);
  color: #14130e;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
}

.user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 240px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  z-index: 60;
}

.user-menu[hidden] { display: none; }

.user-menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); }
.user-menu-head strong { display: block; font-size: 13.5px; }
.user-menu-head span { display: block; font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }

.user-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.user-menu-item:hover { background: var(--surface-2); }
.user-menu-item .sub-state { font-size: 12px; color: var(--text-muted); }
.user-menu-item .sub-state.is-on { color: var(--pink); }
.user-menu-item.is-danger { color: #ff8f7a; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  max-width: 1120px;
  margin: 0 auto;
  padding: 88px 32px 64px;
  text-align: center;
}

/* Dark fine-line texture plus calm static washes, fading out toward the grid. */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(620px 320px at 16% 10%, rgba(242, 169, 201, 0.07), transparent 70%),
    radial-gradient(520px 280px at 84% 18%, rgba(74, 222, 128, 0.045), transparent 70%),
    radial-gradient(760px 360px at 50% 100%, rgba(229, 124, 174, 0.05), transparent 72%),
    repeating-linear-gradient(115deg, rgba(0, 0, 0, 0.5) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(25deg, rgba(0, 0, 0, 0.35) 0 1px, transparent 1px 26px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}

/* Plain small-caps line — no capsule, the live dot is accent enough.
   Inline flow keeps the number attached to the text when it wraps on mobile. */
.hero-eyebrow {
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.hero-eyebrow em { letter-spacing: 0; }

.hero h1 {
  margin: 26px 0 0;
  font-size: clamp(42px, 6.4vw, 78px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

/* Neon sweep: a pink highlight band glides across the serif title, then rests. */
.hero h1 .serif-i {
  font-size: 1.06em;
  background: linear-gradient(105deg, var(--cream) 42%, var(--pink) 50%, var(--cream) 58%);
  background-size: 300% 100%;
  background-position: 0 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hero-title-sweep 7s ease-in-out infinite;
}

@keyframes hero-title-sweep {
  0%, 55% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* No max-width: the subtitle stays on a single line on desktop and only
   wraps when the viewport itself is narrower than the text. */
.hero-sub {
  margin: 20px auto 0;
  color: var(--text-muted);
  font-size: 16.5px;
}

.hero-cta {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 12px;
  width: max-content;
  max-width: 100%;
  margin: 30px auto 0;
}

.hero-cta .btn {
  width: 100%;
  padding: 12px 26px;
  font-size: 14.5px;
  position: relative;
  overflow: hidden;
}

/* Diagonal sheen that sweeps across the button on hover. */
.hero-cta .btn::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -75%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-18deg);
  opacity: 0;
  pointer-events: none;
}

.hero-cta .btn:hover::after,
.hero-cta .btn:focus-visible::after {
  animation: hero-cta-shine 0.65s ease;
}

@keyframes hero-cta-shine {
  from { left: -75%; opacity: 1; }
  to { left: 130%; opacity: 1; }
}

.hero-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 44px;
}

/* Plain uppercase steps (no capsules); the light sweep moves through the text color. */
.flow-pill {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  animation: flow-pill-light 5.4s ease-in-out infinite;
}

/* Steps sit at child positions 1 / 3 / 5, separated by .flow-word spans. */
.hero-flow .flow-pill:nth-child(3) { animation-delay: 1.8s; }
.hero-flow .flow-pill:nth-child(5) { animation-delay: 3.6s; }

@keyframes flow-pill-light {
  0%, 30%, 100% {
    color: var(--text-muted);
    text-shadow: none;
  }
  8%, 20% {
    color: var(--cream);
    text-shadow: 0 0 14px rgba(242, 169, 201, 0.4);
  }
}

.flow-word { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--text-muted); }

/* ---------- solutions + search ---------- */
.section-kicker {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pink);
}

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.solution-card {
  display: flex;
  flex-direction: column;
  min-height: 176px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.solution-card:hover {
  border-color: var(--border-strong);
  background: #181711;
  transform: translateY(-2px);
}

.solution-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.solution-kicker,
.solution-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

.solution-kicker { color: var(--pink); }

.solution-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.solution-problem {
  display: block;
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.solution-copy,
.search-clear {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}

.solution-copy { padding: 6px 12px; }

.solution-copy:hover,
.search-clear:hover {
  border-color: var(--cream);
  background: var(--cream);
  color: #14130e;
}

.search-panel {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 16px;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.search-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink);
}

.search-box {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
}

.search-box:focus-within { border-color: var(--border-strong); }

.search-box input {
  width: 100%;
  min-width: 0;
  padding: 11px 14px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
}

.search-box input::placeholder { color: rgba(168, 163, 149, 0.72); }

.search-clear {
  flex: none;
  margin-right: 5px;
  padding: 5px 11px;
}

.search-clear[hidden] { display: none; }

.active-discovery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.active-discovery[hidden] { display: none; }

.active-discovery span {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
}

.discovery-chip.is-solution {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: rgba(242, 169, 201, 0.45);
  background: rgba(242, 169, 201, 0.08);
  color: var(--pink);
}

.discovery-chip.is-solution strong {
  font-weight: 600;
}

.discovery-chip-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: rgba(242, 169, 201, 0.2);
  color: var(--pink);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
}

.discovery-chip-clear:hover {
  background: rgba(242, 169, 201, 0.35);
}

/* ---------- toolbar ---------- */
.library { max-width: 1600px; margin: 0 auto; padding: 0 40px 80px; }

.toolbar {
  padding: 20px 0 14px;
}

.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; }

.pill {
  padding: 6px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.pill:hover { color: var(--text); border-color: var(--border-strong); }

.pill.is-active {
  background: var(--cream);
  border-color: var(--cream);
  color: #14130e;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0 0 18px;
}

.filter-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-right: 4px;
}

.pill--sm { padding: 5px 13px; font-size: 12.5px; }

/* ---------- grid (masonry via CSS columns) ---------- */
/* Masonry is laid out by JS (absolute cards + transforms): CSS multicol
   re-balances every column whenever any card's height changes, which made
   lazily-loading previews reflow the whole grid on scroll. */
.grid {
  position: relative;
}

.grid-sentinel { height: 1px; pointer-events: none; }

.card {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  cursor: pointer;
  perspective: 1600px;
  contain: layout;
}

.card-inner {
  position: relative;
  display: block;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.card-face {
  display: block;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.card-face-back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 14px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  transform: rotateY(180deg);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.card-back-file {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.01em;
  color: var(--pink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-back-desc {
  flex: 1;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-back-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 14px;
  padding: 0;
  list-style: none;
}

.card-back-stats li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-muted);
}

.card-back-stats li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--pink);
}

.card-back-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text);
}

.card-back-open::after {
  content: "\2192";
  color: var(--pink);
  transition: transform 0.2s;
}

/* Flip only fires on precise pointers; touch devices keep one-tap navigation. */
@media (hover: hover) and (pointer: fine) {
  .card:hover .card-inner { transform: rotateY(180deg); }
  .card:hover .card-back-open::after { transform: translateX(4px); }
}

.card-preview {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #12110d;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.card:hover .card-preview {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.card-preview iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1024px;
  height: 150px;
  border: 0;
  pointer-events: none;
  transform-origin: top left;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 2px 0;
}

.card-title { flex: 1; min-width: 0; }
.card-title h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-title p { margin: 1px 0 0; font-size: 12px; color: var(--text-muted); }

.card-copy {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.card-copy:hover { color: #14130e; border-color: var(--cream); background: var(--cream); }
.card-copy svg { width: 14px; height: 14px; }

.card-like {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  grid-auto-flow: column;
  place-items: center;
  gap: 5px;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #1a1914;
  color: var(--cream);
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, border-color 0.15s, background 0.15s, transform 0.2s;
}

.card-like.has-count { width: auto; min-width: 32px; padding: 0 11px; }

.card-like-count {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
}

.card-like-count:empty { display: none; }

.card:hover .card-like,
.card:focus-within .card-like,
.card-like.is-liked { opacity: 1; }

.card:hover .card-like,
.card:focus-within .card-like { transform: translateY(-3px); }

.card-like:hover { border-color: var(--cream); background: rgba(13, 12, 9, 0.9); }
.card-like.is-liked { color: var(--pink); border-color: rgba(242, 169, 201, 0.55); }
.card-like.is-liked svg path { fill: currentColor; }
.card-like svg {
  display: block;
  width: 16px;
  height: 16px;
  flex: none;
  transform: none;
}
.card-like.is-pop svg { animation: card-like-pop 0.35s ease; }

@keyframes card-like-pop {
  0% { transform: scale(0.5); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* No hover on touch screens: keep the heart always reachable. */
@media (hover: none) {
  .card-like { opacity: 1; }
}

.empty-hint { padding: 48px 0; text-align: center; color: var(--text-muted); }

/* ---------- how-to ---------- */
.how-to {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.how-to h2 {
  max-width: 1600px;
  margin: 0 auto;
  padding: 72px 32px 0;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

.how-to h2 .serif-i { color: var(--pink); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1280px;
  margin: 40px auto 0;
  padding: 0 32px;
  list-style: none;
}

.step {
  padding: 26px 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg);
}

.step-num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--cream);
  color: #14130e;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
}

.step h3 { margin: 16px 0 6px; font-size: 16px; font-weight: 650; }
.step p { margin: 0; font-size: 13.5px; color: var(--text-muted); }
.step code { padding: 1px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); }

.how-to-note {
  max-width: 1280px;
  margin: 36px auto 0;
  padding: 0 32px 72px;
  font-size: 13.5px;
  color: var(--text-muted);
  text-align: center;
}

/* ---------- subscribe form (footer) ---------- */
.subscribe-form {
  display: flex;
  justify-content: center;
  gap: 10px;
  max-width: 480px;
  margin: 30px auto 0;
}

.subscribe-input {
  flex: 1;
  min-width: 0;
  padding: 12px 20px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
}

.subscribe-input:focus { border-color: var(--cream); }
.subscribe-input::placeholder { color: #77725f; }

.subscribe-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 480px;
}

.subscribe-block .subscribe-form {
  margin: 0;
  max-width: none;
  width: 100%;
}

.subscribe-status {
  margin: 0;
  min-height: 1.2em;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

.subscribe-status.is-success { color: var(--pink); font-weight: 650; }
.subscribe-status.is-error { color: #e8a0a0; }

/* ---------- footer ----------
   Replo-style statement footer: giant wordmark, link columns, newsletter,
   then a hairline bottom bar. Near-black panel, one step darker than the page. */
.site-footer {
  --ink: var(--cream);
  --ink-soft: rgba(242, 239, 227, 0.6);
  --ink-faint: rgba(242, 239, 227, 0.42);
  --ink-line: rgba(242, 239, 227, 0.14);
  background: #080705;
  border-top: 1px solid var(--border);
  color: var(--ink);
  padding: 64px 32px 26px;
}

.footer-wordmark {
  font-size: clamp(52px, 10.5vw, 148px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--ink);
  user-select: none;
}

.footer-wordmark .serif-i { color: var(--pink); }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr);
  gap: 36px 28px;
  margin-top: 56px;
}

.footer-col h4 {
  margin: 0 0 14px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.footer-col a {
  display: block;
  width: fit-content;
  padding: 4px 0;
  font-size: 14px;
  color: var(--ink);
  transition: color 0.15s;
}

.footer-col a:hover { color: var(--pink); }

.footer-news p {
  margin: 0 0 16px;
  max-width: 30em;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.footer-news p .serif-i { color: var(--pink); }

.site-footer .subscribe-form { justify-content: flex-start; margin: 0; max-width: 400px; }

.site-footer .subscribe-block { max-width: 400px; }

.site-footer .subscribe-input {
  padding: 10px 18px;
  background: transparent;
  color: var(--ink);
}

.site-footer .subscribe-input::placeholder { color: var(--ink-faint); }

.site-footer .subscribe-status { color: var(--ink-faint); }
.site-footer .subscribe-status.is-success { color: var(--pink); }
.site-footer .subscribe-status.is-error { color: #e8a0a0; }

.site-footer .service-pending {
  margin: 0;
  width: auto;
  color: var(--ink-soft);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--ink-line);
  font-size: 13px;
  color: var(--ink-soft);
}

.footer-right { display: inline-flex; align-items: center; gap: 16px; }

/* language switcher (footer, bottom-right) */
.lang-toggle {
  padding: 0;
  border: none;
  background: none;
  color: var(--ink-soft, var(--text-muted));
  font-family: var(--font);
  font-size: 13px;
  line-height: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
  transition: color 0.15s;
}

.lang-toggle:hover { color: var(--ink, var(--text)); }

/* ---------- auth modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 7, 5, 0.72);
  backdrop-filter: blur(6px);
}

.modal-overlay[hidden] { display: none; }

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 34px 32px 30px;
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  text-align: center;
  position: relative;
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
}

.auth-close:hover { color: var(--text); border-color: var(--border-strong); }

.auth-card h2,
.subscribe-card h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.auth-card h2 .serif-i,
.subscribe-card h2 .serif-i { color: var(--pink); }
.auth-card .auth-sub,
.subscribe-card .auth-sub { margin: 10px 0 22px; font-size: 13.5px; color: var(--text-muted); }

/* ---------- subscribe modal ---------- */
.subscribe-card {
  width: 100%;
  max-width: 440px;
  padding: 34px 32px 30px;
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  text-align: left;
  position: relative;
}

.subscribe-modal-eyebrow {
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.subscribe-card .subscribe-form {
  justify-content: stretch;
  margin: 0;
  max-width: none;
}

.subscribe-card .subscribe-block { max-width: none; }

.subscribe-card .subscribe-input {
  background: var(--bg);
}

.subscribe-card .service-pending {
  margin: 0;
  width: auto;
  text-align: left;
}

.google-btn-slot { display: flex; justify-content: center; min-height: 44px; }

.google-signin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #fff;
  color: #202124;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.google-signin-button:hover { background: #f7f7f7; }
.google-signin-button:disabled { opacity: 0.58; cursor: not-allowed; }

.google-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #dadce0;
  border-radius: 50%;
  color: #4285f4;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.google-hint {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: left;
}

.google-hint code { padding: 1px 5px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); font-size: 11px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.auth-email-form { display: flex; flex-direction: column; gap: 10px; }

.auth-email-form input {
  padding: 11px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  outline: none;
}

.auth-email-form input:focus { border-color: var(--cream); }

.auth-note { margin: 18px 0 0; font-size: 11.5px; color: var(--text-muted); }

.service-pending {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 13px 18px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------- detail page ---------- */
.detail-page {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 40px 56px;
}

.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s;
}

.back-link:hover { color: var(--text); }
.back-link svg { width: 14px; height: 14px; }

.detail-nav { display: flex; gap: 8px; }

.detail-nav-btn {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s, border-color 0.15s;
}

.detail-nav-btn:hover { color: var(--text); border-color: var(--border-strong); }
.detail-nav-btn[hidden] { display: none; }

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: var(--surface);
}

.detail-stage {
  position: relative;
  min-height: calc(100vh - 230px);
  background: #fff;
}

.stage-preview { position: relative; width: 100%; min-height: inherit; }

.stage-preview iframe {
  display: block;
  width: 100%;
  min-height: inherit;
  border: 0;
  background: #fff;
}

.stage-preview.is-mobile { background: #12110d; }
.stage-preview.is-mobile iframe { width: 390px; height: auto; margin: 0 auto; }

.stage-code {
  margin: 0;
  height: 100%;
  overflow: auto;
  padding: 20px 24px;
  background: #0a0906;
  color: #ddd8c8;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  tab-size: 2;
}

.detail-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  padding: 24px;
  border-left: 1px solid var(--border);
  background: var(--surface);
}

.detail-title-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-title-group h2 { margin: 0; font-size: 19px; font-weight: 750; letter-spacing: -0.01em; }

.tag {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--pink);
  font-size: 12px;
}

.side-desc { margin: 0; font-size: 13.5px; color: var(--text-muted); }

.copy-btn {
  border: none;
  border-radius: 999px;
  background: var(--cream);
  color: #14130e;
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.copy-btn:hover { background: #fffdf2; }
.copy-btn:active { transform: scale(0.98); }

.copy-btn-lg { width: 100%; padding: 13px 16px; font-size: 14.5px; }

.side-controls { display: flex; flex-wrap: wrap; gap: 8px; }

.seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
}

.seg-btn {
  padding: 4px 13px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 12.5px;
  cursor: pointer;
}

.seg-btn.is-active { background: var(--cream); color: #14130e; font-weight: 650; }

.side-meta { margin: 0; }

.side-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}

.side-meta dt { color: var(--text-muted); }
.side-meta dd { margin: 0; text-align: right; font-family: var(--mono); font-size: 12px; }

.detail-discovery {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.discovery-group h3 {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.discovery-group p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.discovery-group span {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--cream);
  font-size: 11.5px;
}

.side-hint { margin: 0; font-size: 12px; color: var(--text-muted); }
.side-hint code { padding: 1px 5px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); }

/* ---------- solution detail page ---------- */
.solution-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 32px 96px;
}

.solution-page .back-link { margin-bottom: 28px; }

/* solution listing (shown on /solution when no ?solution= is given) */
.solution-listing-hero {
  padding: 44px 0 34px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.solution-listing-hero h1 {
  max-width: 820px;
  margin: 10px 0 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.solution-listing-hero h1 .serif-i { color: var(--pink); }

.solution-listing-hero > p {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: 17px;
}

#solution-listing .solutions-grid { margin-top: 0; }

.solution-hero {
  padding: 44px 0 34px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.solution-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.solution-hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 32px 0 0;
}

.solution-hero-facts > div {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.solution-hero-facts dt {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pink);
}

.solution-hero-facts dd {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.solution-section-list { padding-top: 46px; }

.solution-module-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: solution-module;
}

.solution-module {
  counter-increment: solution-module;
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.solution-module::before {
  content: counter(solution-module);
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--cream);
  color: #14130e;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
}

.solution-module-preview {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  background: #12110d;
  border-right: 1px solid var(--border);
}

.solution-module-preview iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1024px;
  border: 0;
  background: #fff;
  pointer-events: none;
  transform-origin: top left;
}

.solution-module-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
}

.solution-module-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.solution-module-file {
  display: block;
  margin-bottom: 7px;
  color: var(--pink);
  font-family: var(--mono);
  font-size: 11px;
}

.solution-module h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.solution-module-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.solution-module-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.solution-module-tags span {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 11.5px;
}

.solution-module-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.solution-copy-btn {
  padding: 10px 18px;
  font-size: 13px;
}

.solution-detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.solution-detail-link:hover {
  border-color: var(--border-strong);
}

/* ---------- static pages (guide / contact) ---------- */
.page-wrap { max-width: 920px; margin: 0 auto; padding: 72px 32px 96px; }

.page-head { text-align: center; margin-bottom: 56px; }

.page-head h1 {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.page-head h1 .serif-i { color: var(--pink); }
.page-head .page-sub { margin: 16px auto 0; max-width: 40em; color: var(--text-muted); font-size: 16px; }

/* guide */
.guide-toc {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.guide-toc a {
  display: inline-block;
  padding: 6px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s, border-color 0.15s;
}

.guide-toc a:hover { color: var(--text); border-color: var(--border-strong); }

.guide-section { margin-top: 64px; scroll-margin-top: 90px; }

.guide-section > h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.guide-section > h2 .serif-i { color: var(--pink); font-size: 1.05em; margin-right: 10px; }
.guide-section > .guide-intro { margin: 0 0 24px; color: var(--text-muted); font-size: 14.5px; }

.guide-step {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}

.guide-step:last-child { border-bottom: 1px solid var(--border); }

.guide-step-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--cream);
  color: #14130e;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
}

.guide-step-body { min-width: 0; }
.guide-step-body h3 { margin: 3px 0 6px; font-size: 16px; font-weight: 650; }
.guide-step-body p { margin: 0 0 8px; font-size: 14px; color: var(--text-muted); }
.guide-step-body p:last-child { margin-bottom: 0; }
.guide-step-body code { padding: 1px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); }

.guide-figure {
  margin: 16px 0 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}

.guide-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--surface-2);
}

.guide-figure figcaption {
  margin: 0;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.guide-figure figcaption code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.guide-path {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 8px;
  font-size: 12.5px;
}

.guide-path span {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 11.5px;
}

.guide-path em { font-style: normal; color: var(--text-muted); }

.code-block {
  margin: 10px 0 0;
  padding: 14px 18px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0a0906;
  color: #ddd8c8;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  tab-size: 2;
}

.callout {
  display: flex;
  gap: 12px;
  margin: 20px 0 0;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--pink);
  border-radius: 10px;
  background: var(--surface);
  font-size: 13.5px;
  color: var(--text-muted);
}

.callout strong { color: var(--text); }

.faq-item {
  border-top: 1px solid var(--border);
}

.faq-item:last-child { border-bottom: 1px solid var(--border); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 2px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--serif); font-size: 20px; color: var(--text-muted); }
.faq-item[open] summary::after { content: "−"; color: var(--pink); }
.faq-item .faq-a { margin: 0; padding: 0 2px 18px; font-size: 14px; color: var(--text-muted); }
.faq-item .faq-a code { padding: 1px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); }

.guide-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 72px;
  padding: 28px 32px;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: var(--surface);
}

.guide-cta h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.guide-cta p { margin: 4px 0 0; font-size: 13.5px; color: var(--text-muted); }
.guide-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: start;
}

.contact-form { display: flex; flex-direction: column; gap: 18px; }
.form-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { font-size: 13px; font-weight: 600; }

.field input,
.field select,
.field textarea {
  padding: 11px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.field textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--cream); }
.field input::placeholder, .field textarea::placeholder { color: #77725f; }
.field select { appearance: none; cursor: pointer; }

.contact-submit { align-self: flex-start; padding: 12px 30px; font-size: 14.5px; }
.contact-note { margin: -6px 0 0; font-size: 12.5px; color: var(--text-muted); }

.contact-aside { display: flex; flex-direction: column; gap: 14px; }

.info-card {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.info-card h3 { margin: 0 0 6px; font-size: 15px; font-weight: 650; }
.info-card p { margin: 0; font-size: 13px; color: var(--text-muted); }
.info-card a { color: var(--pink); }
.info-card a:hover { text-decoration: underline; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 120;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--cream);
  color: #14130e;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .solutions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-height: 820px) {
  .detail-stage { min-height: calc(100vh - 168px); }
}

@media (max-width: 960px) {
  .solution-hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .solution-module { grid-template-columns: 1fr; }
  .solution-module-preview { border-right: 0; border-bottom: 1px solid var(--border); }
  .steps { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 1fr; }
  .detail-stage { min-height: 52vh; }
  .detail-side { border-left: none; border-top: 1px solid var(--border); }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-news { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .site-header { padding: 0 16px; gap: 10px; }
  .header-nav a, .header-count { display: none; }
  .header-actions { gap: 8px; }
  .hero { padding: 56px 16px 44px; }
  .hero-cta { grid-auto-flow: row; width: 100%; }
  .solutions-grid { grid-template-columns: 1fr; }
  .solution-card { min-height: 150px; }
  .solution-page { padding: 20px 16px 64px; }
  .solution-hero { padding: 34px 0 28px; }
  .solution-hero-facts { grid-template-columns: 1fr; }
  .solution-module-preview { min-height: 240px; }
  .solution-listing-hero { padding: 32px 0 26px; margin-bottom: 22px; }
  .solution-listing-hero > p { font-size: 15px; }
  .solution-module-body { padding: 20px; }
  .solution-module-top { display: block; }
  .search-panel { grid-template-columns: 1fr; padding: 14px; }
  .library { padding: 0 16px 48px; }
  .how-to h2, .steps, .how-to-note { padding-left: 16px; padding-right: 16px; }
  .detail-page { padding: 16px 16px 40px; }
  .subscribe-form { flex-direction: column; }
  .site-footer { padding: 48px 16px 22px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 20px; margin-top: 40px; }
  .footer-news { grid-column: 1 / -1; }
  .site-footer .subscribe-form { max-width: none; }
  .footer-bottom { margin-top: 44px; }
  #viewport-seg { display: none; }
  .page-wrap { padding: 48px 16px 64px; }
  .field-row { grid-template-columns: 1fr; }
  .guide-cta { padding: 22px 20px; }
  .contact-submit { align-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .card-preview, .copy-btn, .card-copy, .card-like, .toast, .back-link,
  .detail-nav-btn, .btn, .pill, .user-chip, .card-inner, .card-back-open::after,
  .solution-card, .solution-copy, .solution-detail-link,
  .search-clear { transition: none; }
  .card-like.is-pop svg { animation: none; }
  .live-num::after { animation: none; }
  .hero h1 .serif-i { animation: none; }
  .flow-pill { animation: none; }
  .hero-cta .btn:hover::after,
  .hero-cta .btn:focus-visible::after { animation: none; }
  /* Flip is motion; keep cards face-up for reduced-motion users. */
  .card:hover .card-inner { transform: none; }
}
