/* Kinsley Deals: plum ink, mist background, nova-pink actions, gold coupon stubs. */
:root {
  --ink: #261a2e;
  --ink-soft: #5e5266;
  --bg: #f4f1f6;
  --surface: #ffffff;
  --line: #e2dbe6;
  --nova: #ef4e7b;
  --nova-hover: #f76d94;
  --gold-tint: #fff0c2;
  --gold-ink: #7a4b00;
  --gold-line: #ecd48f;
  --sage: #2f6b57;
  --focus: #6b3fd1;

  --font-display: "Gloock", Georgia, serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;

  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(38, 26, 46, 0.06), 0 8px 24px rgba(38, 26, 46, 0.08);
  --wrap: 1180px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--ink);
  color: #fff;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
}
.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
}
.main-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.main-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  color: #e6dcec;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.header-search {
  margin-left: auto;
  flex: 0 1 300px;
}

.search {
  position: relative;
  display: block;
}
.search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  pointer-events: none;
  color: var(--ink-soft);
}
.search input {
  width: 100%;
  min-height: 46px;
  padding: 10px 16px 10px 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
}
.site-header .search input { border-color: transparent; }

@media (max-width: 760px) {
  .header-search { flex: 1 1 100%; margin-left: 0; }
  .main-nav { order: 3; width: 100%; }
  .main-nav ul { gap: 0; }
  .main-nav a { padding: 10px 8px; font-size: 0.9375rem; }
  /* About and the disclosure are also in the footer; dropping them keeps the menu on one line. */
  .main-nav .nav-about,
  .main-nav .nav-disclaimer { display: none; }
}

/* ---------- Home hero ---------- */

.hero {
  padding: 64px 0 56px;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7.5vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.hero p {
  font-size: 1.1875rem;
  color: var(--ink-soft);
  max-width: 40ch;
  margin: 0 0 28px;
}
.hero .search { max-width: 480px; }
.hero .search input {
  min-height: 58px;
  font-size: 1.0625rem;
  border: 2px solid var(--ink);
}

@media (max-width: 900px) {
  .hero { padding: 40px 0 32px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
}

/* The fanned coupon tickets: the one bold moment on the page */
.ticket-fan {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 12px 0 24px;
}
.ticket {
  --notch: 12px;
  position: relative;
  display: block;
  width: min(270px, 46%);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 220ms ease-out;
}
.ticket:first-child {
  transform: rotate(-5deg) translateY(10px);
  margin-right: -6px;
  z-index: 1;
}
.ticket:last-child { transform: rotate(4deg) translateY(-6px); }
.ticket:hover { transform: rotate(0) translateY(-4px); z-index: 2; }
.ticket-img {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.ticket img {
  width: 100%;
  aspect-ratio: 4 / 3.4;
  object-fit: cover;
}

/* Cover photos can carry --zoom (set from data.js) to crop a built-in border. */
.ticket img,
.cover img { transform: scale(var(--zoom, 1)); }
.ticket .tear {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 22px 20px;
  border-top: 2px dashed var(--gold-line);
  background: var(--gold-tint);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  color: var(--gold-ink);
}
.ticket .tear::before,
.ticket .tear::after {
  content: "";
  position: absolute;
  top: calc(var(--notch) * -1 - 1px);
  width: calc(var(--notch) * 2);
  height: calc(var(--notch) * 2);
  border-radius: 50%;
  background: var(--bg);
}
.ticket .tear::before { left: calc(var(--notch) * -1); }
.ticket .tear::after { right: calc(var(--notch) * -1); }
/* The first ticket overlaps the second one's left edge, so its text starts further in. */
.ticket:last-child .tear { padding-left: 34px; }
.ticket .store { font-weight: 700; color: var(--ink); }
.ticket .amt {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .hero .wrap { gap: 24px; }
  .ticket img { aspect-ratio: 1; }
  .ticket:first-child { margin-right: 12px; transform: rotate(-3deg) translateY(8px); }
  .ticket:last-child { transform: rotate(3deg); }
  .ticket .tear { padding: 12px 16px 14px; gap: 2px; }
  .ticket:last-child .tear { padding-left: 16px; }
  .ticket .store { font-size: 0.875rem; }
  .ticket .amt { font-size: 1.625rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .ticket { animation: deal-in 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .ticket:last-child { animation-delay: 120ms; }
}
@keyframes deal-in {
  from { opacity: 0; translate: 0 40px; }
  to { opacity: 1; translate: 0 0; }
}

/* ---------- Sections ---------- */

.section { padding: 24px 0 64px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  line-height: 1.1;
  margin: 0;
}
.section-head p { margin: 0; color: var(--ink-soft); }
.result-note { color: var(--ink-soft); margin: -8px 0 20px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}
.chips a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
  font-weight: 600;
}
.chips a:hover { border-color: var(--ink); }
.chips a[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.chips .count {
  margin-left: 8px;
  min-width: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-soft);
  font-size: 0.8125rem;
  text-align: center;
}
.chips a[aria-current="page"] .count { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* ---------- Category tiles (home) ---------- */

.cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cat-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}
.cat-img {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--line);
}
.cat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transform: scale(var(--zoom, 1));
  transition: transform 300ms ease-out;
}
.cat-card:hover .cat-img img { transform: scale(calc(var(--zoom, 1) * 1.04)); }
.cat-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  padding: 14px 16px 16px;
}
.cat-name {
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1.15;
}
.cat-meta { color: var(--ink-soft); font-size: 0.9375rem; }
.cat-logos { display: flex; gap: 6px; margin-top: auto; padding-top: 10px; }
.cat-logos .logo { width: 30px; height: 30px; border-radius: 8px; font-size: 0.6875rem; }
.page-head .cat-stat { margin-top: 8px; font-size: 1rem; font-weight: 600; color: var(--ink); }

@media (max-width: 560px) {
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cat-body { padding: 12px; }
  .cat-name { font-size: 1.125rem; }
  .cat-meta { font-size: 0.875rem; }
}

/* ---------- Deal cards (home and categories) ---------- */

/* Compact ticket: store, offer and button on the left, gold stub on the right. Three across on wide
   screens so the list stays short as stores are added. */
.deals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.deal {
  --notch: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  height: 100%;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.deal-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  min-width: 0;
}
.deal-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.2;
  margin: 2px 0 0;
}
.deal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.deal-meta .meta { margin: 0; font-size: 0.875rem; }
.deal-body .action { margin-top: auto; padding-top: 4px; }
.deal .reveal { width: 100%; min-width: 0; min-height: 44px; }
.deal .btn { width: 100%; min-height: 44px; }
.deal .stub { padding: 12px 6px; }
.deal .stub .amt { font-size: 1.75rem; }
.deal .stub .amt.long { font-size: 1.0625rem; }
.deal .stub .unit { font-size: 0.875rem; }
.who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
}
.who:hover { color: var(--ink); }

/* A store or product with no photo yet: its colour and initials. */
.product .img.blank {
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: 2.5rem;
}

/* "Show more" under a long list. */
.more { display: flex; justify-content: center; margin-top: 24px; }
.more[hidden] { display: none; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }

@media (max-width: 560px) {
  .deal { grid-template-columns: minmax(0, 1fr) 76px; }
  .deal-body { padding: 12px 14px; gap: 6px; }
  .deal-body h3 { font-size: 1.125rem; }
  .deal .stub .amt { font-size: 1.5rem; }
}

/* Gold perforated stub, shared by deal cards and store coupons */
.stub {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  border-left: 2px dashed var(--gold-line);
  background: var(--gold-tint);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  color: var(--gold-ink);
  text-align: center;
}
.stub::before,
.stub::after {
  content: "";
  position: absolute;
  left: calc(var(--notch) * -1 - 1px);
  width: calc(var(--notch) * 2);
  height: calc(var(--notch) * 2);
  border-radius: 50%;
  background: var(--bg);
}
.stub::before { top: calc(var(--notch) * -1); }
.stub::after { bottom: calc(var(--notch) * -1); }
.stub .amt {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
}
.stub .amt.long { font-size: 1.25rem; line-height: 1.1; }
.stub .unit { font-weight: 700; font-size: 0.9375rem; margin-top: 4px; }

.logo {
  position: relative;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  color: #fff;
  font-weight: 800;
}
.logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 3px;
  object-fit: contain;
  background: #fff;
}
.logo.lg {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  font-size: 1.75rem;
}

/* ---------- Product grid ---------- */

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 165px), 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.product {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.product .img {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #fff;
}
.product .badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
}
.product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease-out;
}
.product:hover img { transform: scale(1.04); }
.product .info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px 12px;
  flex: 1;
}
/* Long product names stop after two lines so every card in a row lines up. */
.product .name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
}
.product .from { font-size: 0.875rem; color: var(--ink-soft); }
.tag {
  align-self: flex-start;
  margin-top: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--gold-tint);
  color: var(--gold-ink);
  font-size: 0.8125rem;
  font-weight: 700;
}

@media (max-width: 560px) {
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product .info { padding: 10px; }
  .product .name { font-size: 0.875rem; }
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
}
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--nova);
  margin-bottom: 12px;
}
.steps h3 { font-size: 1.125rem; font-weight: 700; margin: 0 0 6px; }
.steps p { margin: 0; color: var(--ink-soft); }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Store page ---------- */

.store-hero { padding: 40px 0 32px; }
.store-hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 40px;
  align-items: center;
}
.store-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.05;
  margin: 16px 0 12px;
}
.store-hero p {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 1.125rem;
  max-width: 48ch;
}
.store-hero .cover {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.store-hero .cover img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
}
.crumbs {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.crumbs a { color: var(--ink-soft); }

@media (max-width: 860px) {
  .store-hero { padding: 28px 0 20px; }
  .store-hero .wrap { grid-template-columns: 1fr; gap: 24px; }
  /* On phones the codes come straight after the title, so the big photo steps aside. */
  .store-hero .cover { display: none; }
}

.store-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
  padding-bottom: 48px;
}
@media (max-width: 900px) {
  .store-layout { grid-template-columns: 1fr; }
}

.coupons {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.coupon {
  --notch: 12px;
  display: grid;
  grid-template-columns: 128px 1fr;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.coupon .stub {
  order: -1;
  border-left: 0;
  border-right: 2px dashed var(--gold-line);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.coupon .stub::before,
.coupon .stub::after {
  left: auto;
  right: calc(var(--notch) * -1 - 1px);
}
.coupon .main {
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.coupon h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 6px;
}

@media (max-width: 560px) {
  .coupon { grid-template-columns: 92px 1fr; }
  .coupon .stub .amt { font-size: 1.75rem; }
  .coupon .main { padding: 16px; }
  .coupon .action { width: 100%; }
  .coupon .btn, .coupon .code-box { width: 100%; }
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.meta .ok {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--sage);
  font-weight: 700;
}
.meta .ok svg { width: 16px; height: 16px; }

/* ---------- Buttons and revealed codes ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--nova);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease-out;
}
.btn:hover { background: var(--nova-hover); }
.btn.secondary { background: var(--ink); color: #fff; }
.btn.secondary:hover { background: #3d2b48; }

.code-box {
  display: flex;
  align-items: stretch;
  min-height: 48px;
  border: 2px dashed var(--gold-ink);
  border-radius: 999px;
  overflow: hidden;
  background: var(--gold-tint);
  animation: reveal 220ms ease-out;
}
.code-box .code {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: 0.08em;
  color: var(--gold-ink);
  user-select: all;
}
.code-box button {
  border: 0;
  padding: 0 20px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  min-width: 92px;
}
@keyframes reveal {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: none; }
}

.panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.panel h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  margin: 0 0 10px;
}
.panel p { margin: 0 0 16px; color: var(--ink-soft); }
.panel ol { margin: 0; padding-left: 20px; color: var(--ink-soft); }
.panel ol li + li { margin-top: 6px; }
.panel + .panel { margin-top: 16px; }

/* ---------- Show code button: the code's last characters peek out from under it ---------- */

.reveal {
  position: relative;
  display: inline-flex;
  min-width: 200px;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}
.reveal-peek {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 14px;
  border: 2px dashed var(--gold-ink);
  border-radius: 999px;
  background: var(--gold-tint);
  color: var(--gold-ink);
  font-weight: 800;
  letter-spacing: 0.08em;
}
.reveal-label {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 50px;
  padding: 0 26px 0 22px;
  border-radius: 999px 0 0 999px;
  background: var(--nova);
  color: var(--ink);
  font-weight: 800;
  /* The slanted right edge reads as a sticker being peeled back. */
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
  transition: background-color 150ms ease-out, margin-right 200ms ease-out;
}
.reveal:hover .reveal-label { background: var(--nova-hover); margin-right: 58px; }
.reveal:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 999px; }

@media (max-width: 560px) {
  .reveal { width: 100%; }
}

/* ---------- Offer labels and terms ---------- */

.labels { display: flex; flex-wrap: wrap; gap: 6px; }
.label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 800;
}
.label.ok { background: #e3f1ea; color: var(--sage); }
.label svg { width: 14px; height: 14px; }

.coupon .text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.terms summary {
  cursor: pointer;
  color: var(--focus);
  font-size: 0.9375rem;
  font-weight: 700;
}
.terms p { margin: 6px 0 0; color: var(--ink-soft); font-size: 0.9375rem; max-width: 52ch; }

.list-title {
  font-family: var(--font-display);
  font-size: 1.625rem;
  line-height: 1.2;
  margin: 0 0 16px;
}

/* ---------- Code highlights panel ---------- */

.panel.highlights { background: var(--ink); color: #fff; }
.highlights dl { margin: 0; }
.highlights dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.highlights dt { color: #d9cfe0; }
.highlights dd { margin: 0; font-weight: 800; }
.highlights dl div:first-child dd { color: var(--nova); }

/* ---------- Code dialog ---------- */

body.modal-open { overflow: hidden; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(38, 26, 46, 0.55);
  animation: fade 160ms ease-out;
}
.modal-card {
  position: relative;
  width: min(100%, 460px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 32px 28px 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
  box-shadow: 0 24px 64px rgba(38, 26, 46, 0.3);
  animation: pop 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.modal-card .logo { margin: 0 auto 16px; }
.modal-card h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.15;
  margin: 0 0 8px;
}
.modal-sub { margin: 0 0 20px; color: var(--ink-soft); }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}
.modal-close svg { width: 18px; height: 18px; }
.code-box.big { min-height: 60px; margin-bottom: 14px; }
.code-box.big .code { justify-content: center; font-size: 1.5rem; }
.code-box button.done { background: var(--sage); }
.btn.wide { width: 100%; }
.modal-details {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: left;
}
.modal-details h3 { font-size: 0.9375rem; font-weight: 800; margin: 0 0 4px; }
.modal-details p { margin: 0; color: var(--ink-soft); font-size: 0.9375rem; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* ---------- Simple pages ---------- */

.page-head { padding: 48px 0 24px; }
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.05;
  margin: 0 0 12px;
}
.page-head p {
  font-size: 1.125rem;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0;
}

/* Cap line length on the children so the column stays left-aligned with the page heading. */
.prose { padding-bottom: 72px; }
.prose > * { max-width: 68ch; }
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.625rem;
  margin: 32px 0 8px;
}
.prose p, .prose li { color: var(--ink-soft); }
.prose a { color: var(--focus); }

.loading { color: var(--ink-soft); padding-top: 48px; padding-bottom: 48px; }

.empty {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 560px;
}
.empty h1, .empty h2 { font-family: var(--font-display); margin-top: 0; }

/* ---------- Blog cards ---------- */

.section-link { font-weight: 700; color: var(--ink); }
.posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}
.post-card-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #fff; }
.post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transition: transform 300ms ease-out;
}
.post-card:hover .post-card-img img { transform: scale(1.04); }
.post-card-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 18px 20px 20px; }
.post-card-tag {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold-tint);
  color: var(--gold-ink);
  font-size: 0.8125rem;
  font-weight: 700;
}
.post-card-title { font-family: var(--font-display); font-size: 1.375rem; line-height: 1.2; }
.post-card-excerpt { color: var(--ink-soft); font-size: 0.9375rem; }
.post-card-meta {
  display: flex;
  gap: 16px;
  margin-top: auto;
  padding-top: 6px;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

/* ---------- Blog post ---------- */

.post { padding: 40px 16px 24px; }
.post-head,
.post-body { max-width: 720px; margin: 0 auto; }
.post-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2.125rem, 5vw, 3.25rem);
  line-height: 1.08;
  margin: 8px 0 16px;
}
.post-lede { font-size: 1.1875rem; line-height: 1.6; color: var(--ink-soft); margin: 0 0 16px; }
.post-meta { display: flex; gap: 16px; margin: 0; color: var(--ink-soft); font-size: 0.9375rem; font-weight: 600; }
.post-hero { max-width: 1000px; margin: 28px auto 32px; }
.post-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 40%;
  border-radius: var(--radius-lg);
  background: #fff;
}
.post-body { font-size: 1.0625rem; line-height: 1.7; }
.post-body h2 {
  clear: both;
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 3.5vw, 2rem);
  line-height: 1.15;
  margin: 44px 0 14px;
}
.post-body p, .post-body ul, .post-body ol { margin: 0 0 18px; }
.post-body li + li { margin-top: 8px; }
.post-body a { color: var(--focus); }
.post-note {
  padding: 14px 16px;
  border-left: 4px solid var(--gold-line);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}
.post-small { color: var(--ink-soft); font-size: 0.875rem; }
.post-figure { float: right; width: 220px; margin: 4px 0 16px 28px; }
.post-figure img { width: 100%; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.post-figure.wide { float: none; width: auto; max-width: 380px; margin: 8px auto 24px; }
.post-figure figcaption { margin-top: 8px; color: var(--ink-soft); font-size: 0.875rem; text-align: center; }
.post-table-wrap { overflow-x: auto; margin: 0 0 18px; }
.post-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 0.9375rem;
}
.post-table th, .post-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.post-table th { background: var(--ink); color: #fff; font-weight: 700; }
.post-table tr:last-child td { border-bottom: 0; }
.post-steps li::marker { font-weight: 800; color: var(--nova); }
.post-offer { clear: both; margin: 32px 0; }
.post-offer > p {
  padding: 18px 20px;
  background: var(--gold-tint);
  border: 1px dashed var(--gold-line);
  border-radius: var(--radius-lg);
}
.post-offer .who { margin-bottom: 12px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 10px 0 0; color: var(--ink-soft); }

@media (max-width: 600px) {
  .post { padding-top: 28px; }
  .post-figure { float: none; width: 100%; max-width: 240px; margin: 4px auto 20px; }
  .post-hero { margin: 20px auto 24px; }
  .post-table { font-size: 0.875rem; }
  .post-table th, .post-table td { padding: 10px 8px; }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: #d9cfe0;
  padding: 40px 0 48px;
  font-size: 0.9375rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer .brand { color: #fff; margin-bottom: 10px; }
.site-footer p { margin: 0; max-width: 52ch; }
.site-footer a { color: #fff; }
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease-out, transform 180ms ease-out;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
