/* ==========================================================================
   Winfrey Publishing — Component library
   ========================================================================== */

/* ---------------------------------------------------------------- Buttons */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--text-invert);
  --btn-bd: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  padding: .82em 1.6em;
  min-height: 48px;
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--sh-md); color: var(--btn-fg); }
.btn:active { transform: translateY(0); box-shadow: var(--sh-xs); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: .5; cursor: not-allowed; transform: none; box-shadow: none;
}

.btn--primary  { --btn-bg: var(--bronze-700); --btn-bd: var(--bronze-700); --btn-fg: #fff; }
.btn--primary:hover { --btn-bg: var(--ember); --btn-bd: var(--ember); }

.btn--accent   { --btn-bg: var(--lantern); --btn-bd: var(--lantern); --btn-fg: var(--ink); }
.btn--accent:hover { --btn-bg: var(--lantern-600); --btn-bd: var(--lantern-600); }

.btn--ink      { --btn-bg: var(--ink); --btn-bd: var(--ink); --btn-fg: var(--text-invert); }
.btn--ink:hover { --btn-bg: var(--ink-700); --btn-bd: var(--ink-700); }

.btn--outline  { --btn-bg: transparent; --btn-bd: var(--line-strong); --btn-fg: var(--text); }
.btn--outline:hover { --btn-bd: var(--bronze); --btn-bg: var(--bronze-50); --btn-fg: var(--ember); }
.on-dark .btn--outline { --btn-bd: rgba(255,255,255,.32); --btn-fg: var(--text-invert); }
.on-dark .btn--outline:hover { --btn-bd: var(--lantern); --btn-bg: rgba(233,161,59,.12); --btn-fg: var(--lantern-300); }

.btn--ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--text); box-shadow: none; }
.btn--ghost:hover { --btn-bg: var(--muted); box-shadow: none; }

.btn--light { --btn-bg: var(--paper); --btn-bd: var(--paper); --btn-fg: var(--ink); }
.on-dark .btn--light { --btn-bg: #fff; --btn-bd: #fff; --btn-fg: var(--ink); }

.btn--sm { padding: .6em 1.1em; min-height: 40px; font-size: var(--fs-xs); }
.btn--lg { padding: 1.02em 2.1em; min-height: 56px; font-size: var(--fs-base); }
.btn--block { display: flex; width: 100%; }
.btn--icon { padding: .7em; min-height: 44px; min-width: 44px; border-radius: var(--r-pill); }

/* Loading state applied by forms.js on submit */
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--btn-fg);
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* `.on-dark a` in base.css has specificity (0,1,1) and loads earlier, so it
   was beating `.btn` (0,1,0) and repainting every button label on a dark
   surface — an accent button ended up lantern-on-lantern at ~1.3:1 contrast.
   Buttons always own their own colour, in every state. */
.on-dark a.btn,
.on-dark a.btn:link,
.on-dark a.btn:visited,
.on-dark a.btn:hover,
.on-dark a.btn:focus,
.on-dark a.btn:active { color: var(--btn-fg); }

.btn-group { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* ----------------------------------------------------------------- Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: .35em .8em;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--bronze-50);
  color: var(--bronze-700);
  border: 1px solid var(--bronze-200);
  white-space: nowrap;
}
.badge--accent  { background: var(--lantern-100); color: var(--ember); border-color: var(--lantern-300); }
.badge--ink     { background: var(--ink); color: var(--text-invert); border-color: var(--ink); }
.badge--success { background: var(--success-bg); color: var(--success); border-color: #bcd9c8; }
.badge--muted   { background: var(--muted); color: var(--text-muted); border-color: var(--line); }
.badge--soft    { text-transform: none; letter-spacing: 0; font-weight: 500; }

.badge-recommended {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--grad-lantern);
  color: var(--ink);
  border: 0;
  box-shadow: var(--sh-sm);
  z-index: 2;
}

/* Placeholder marker for unverified/sample content */
.placeholder-note {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--warning);
  background: var(--warning-bg);
  border: 1px dashed #e0c07a;
  border-radius: var(--r-sm);
  padding: .3em .7em;
  letter-spacing: 0;
  text-transform: none;
}

/* ------------------------------------------------------------------ Cards */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease);
}
.card__body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; }
.card__media { position: relative; overflow: hidden; background: var(--parchment-200); }
.card__media img, .card__media svg { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.card__title { font-family: var(--font-display); font-size: var(--fs-lg); margin: 0; line-height: var(--lh-snug); }
.card__title a { color: inherit; text-decoration: none; }
.card__foot { margin-top: auto; padding-top: var(--sp-3); }

.card--hover:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: var(--bronze-200); }
.card--hover:hover .card__media img, .card--hover:hover .card__media svg { transform: scale(1.04); }
.card--hover:focus-within { box-shadow: var(--focus-ring), var(--sh-lg); }

.card--flat { border-radius: var(--r-md); box-shadow: none; }
.card--ink { background: var(--ink); color: var(--text-invert); border-color: rgba(255,255,255,.12); }
.card--outline { background: transparent; }
.card--pad-lg .card__body { padding: var(--sp-6); }

/* Stretched link keeps the whole card clickable without nesting anchors */
.stretch-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ------------------------------------------------------------------ Forms */
.field { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.field--inline { flex-direction: row; align-items: center; gap: var(--sp-3); }

.label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: .4em;
}
.label .req { color: var(--danger); font-weight: 700; }
.label .opt { color: var(--text-soft); font-weight: 400; font-size: var(--fs-xs); }

.input, .select, .textarea {
  width: 100%;
  padding: .78em 1em;
  min-height: 48px;
  font-family: inherit;
  font-size: var(--fs-sm);
  line-height: 1.4;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
  appearance: none;
}
.textarea { min-height: 140px; resize: vertical; line-height: var(--lh-base); }

.input::placeholder, .textarea::placeholder { color: var(--text-soft); }

.input:hover, .select:hover, .textarea:hover { border-color: var(--bronze-400); }

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--bronze-700);
  box-shadow: 0 0 0 3px rgba(185, 121, 63, .18);
}

.select {
  padding-right: 2.6em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%235f574d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1em center;
  cursor: pointer;
}

.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea {
  border-color: var(--danger);
  background: var(--danger-bg);
}
.field.has-error .input:focus { box-shadow: 0 0 0 3px rgba(163, 49, 37, .16); }

.field-error {
  display: flex;
  align-items: flex-start;
  gap: .4em;
  font-size: var(--fs-xs);
  color: var(--danger);
  font-weight: 500;
}
.field-hint { font-size: var(--fs-xs); color: var(--text-soft); }

/* Checkbox + radio */
.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-3);
  align-items: start;
  font-size: var(--fs-sm);
  line-height: 1.5;
  cursor: pointer;
}
.check input[type="checkbox"], .check input[type="radio"] {
  appearance: none;
  width: 22px; height: 22px;
  margin: 1px 0 0;
  flex: none;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-xs);
  background: var(--paper);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.check input[type="radio"] { border-radius: 50%; }

.check input:checked {
  background: var(--bronze-700);
  border-color: var(--bronze-700);
}
.check input[type="checkbox"]:checked::after {
  content: "";
  width: 11px; height: 6px;
  border: 2px solid #fff;
  border-top: 0; border-right: 0;
  transform: rotate(-45deg) translate(1px, -1px);
}
.check input[type="radio"]:checked::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
}
.check input:focus-visible { box-shadow: var(--focus-ring); }
.check.has-error input { border-color: var(--danger); }

/* Card-style radio group (format selectors, shipping, contact method) */
.choice-grid { display: grid; gap: var(--sp-3); }
.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--paper);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.choice:hover { border-color: var(--bronze-400); }
.choice:has(input:checked) {
  border-color: var(--bronze-700);
  background: var(--bronze-50);
  box-shadow: 0 0 0 1px var(--bronze-700);
}
.choice:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.choice:has(input:disabled) {
  opacity: .48;
  cursor: not-allowed;
  background: var(--muted);
  border-style: dashed;
}
.choice__label { font-weight: 600; font-size: var(--fs-sm); }
.choice__meta { font-size: var(--fs-xs); color: var(--text-muted); }
.choice__price { margin-left: auto; font-weight: 700; font-size: var(--fs-sm); white-space: nowrap; }

/* Quantity stepper */
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--paper);
}
.qty button {
  width: 42px; height: 44px;
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: background-color var(--dur-fast) var(--ease);
}
.qty button:hover { background: var(--muted); color: var(--text); }
.qty input {
  width: 48px;
  height: 44px;
  border: 0;
  border-inline: 1px solid var(--line);
  text-align: center;
  font: inherit;
  font-weight: 600;
  background: transparent;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Form shell */
.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: var(--sh-md);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--sp-4); }
.form-grid .field--full { grid-column: 1 / -1; }
@media (max-width: 639px) { .form-grid { grid-template-columns: 1fr; } }

.form-privacy {
  font-size: var(--fs-xs);
  color: var(--text-soft);
  display: flex;
  gap: .5em;
  align-items: flex-start;
  margin-top: var(--sp-4);
}
.form-privacy svg { flex: none; color: var(--success); }

/* Multi-step progress indicator */
.form-progress { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-5); list-style: none; padding: 0; }
.form-progress li {
  flex: 1;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-soft);
  padding-top: var(--sp-3);
  border-top: 3px solid var(--line);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.form-progress li.is-current { color: var(--bronze-700); border-top-color: var(--bronze-700); }
.form-progress li.is-done { color: var(--success); border-top-color: var(--success); }

/* ----------------------------------------------------------------- Alerts */
.alert {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  border: 1px solid;
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-5);
}
.alert svg { flex: none; margin-top: 2px; }
.alert p:last-child { margin-bottom: 0; }
.alert--success { background: var(--success-bg); border-color: #bcd9c8; color: #1f4d38; }
.alert--error   { background: var(--danger-bg);  border-color: #e8c0ba; color: #7d2119; }
.alert--info    { background: var(--info-bg);    border-color: #bcd3e0; color: #1f4257; }
.alert--warning { background: var(--warning-bg); border-color: #e6cd96; color: #6f4c09; }

/* Toast */
.toast-region {
  position: fixed;
  right: var(--sp-4);
  bottom: var(--sp-4);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: min(380px, calc(100vw - 2rem));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-4);
  background: var(--ink);
  color: var(--text-invert);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  font-size: var(--fs-sm);
  animation: toast-in var(--dur) var(--ease-out);
}
.toast--success { border-left: 3px solid #6dbd92; }
.toast--error { border-left: 3px solid #e58a7e; }
.toast button { background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; padding: 0; margin-left: auto; }
.toast button:hover { opacity: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* -------------------------------------------------------------- Accordion */
.accordion { border-top: 1px solid var(--line); }
.accordion__item { border-bottom: 1px solid var(--line); }
.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5) 0;
  background: none;
  border: 0;
  text-align: left;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease);
}
.accordion__trigger:hover { color: var(--bronze-700); }
.accordion__icon {
  flex: none;
  width: 24px; height: 24px;
  position: relative;
  margin-top: 3px;
}
.accordion__icon::before, .accordion__icon::after {
  content: "";
  position: absolute;
  inset: 50% 2px auto 2px;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--dur) var(--ease);
}
.accordion__icon::after { transform: rotate(90deg); }
.accordion__trigger[aria-expanded="true"] .accordion__icon::after { transform: rotate(0deg); }

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur) var(--ease);
}
.accordion__panel[data-open="true"] { grid-template-rows: 1fr; }
.accordion__panel > div { overflow: hidden; }
.accordion__panel .accordion__content { padding-bottom: var(--sp-5); max-width: 72ch; color: var(--text-muted); }

/* ------------------------------------------------------------------- Tabs */
.tabs__list {
  display: flex;
  gap: var(--sp-1);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: var(--sp-6);
}
.tabs__list::-webkit-scrollbar { display: none; }
.tabs__tab {
  flex: none;
  padding: var(--sp-3) var(--sp-4);
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.tabs__tab:hover { color: var(--text); }
.tabs__tab[aria-selected="true"] { color: var(--bronze-700); border-bottom-color: var(--bronze-700); }
.tabs__panel[hidden] { display: none; }

/* ------------------------------------------------------------------ Stars */
.stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.star {
  width: 15px; height: 15px;
  background: var(--line-strong);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.star.is-full { background: var(--lantern); }
.star.is-half { background: linear-gradient(90deg, var(--lantern) 50%, var(--line-strong) 50%); }
.stars-count { font-size: var(--fs-xs); color: var(--text-soft); margin-left: .4em; }

/* ----------------------------------------------------------------- Prices */
.price { font-weight: 700; font-size: var(--fs-lg); color: var(--ink); letter-spacing: var(--ls-snug); }
.on-dark .price { color: var(--lantern-300); }
.price--lg { font-family: var(--font-display); font-size: var(--fs-3xl); }
.price--sm { font-size: var(--fs-base); }
.price__from { font-size: var(--fs-xs); font-weight: 500; color: var(--text-soft); text-transform: uppercase; letter-spacing: var(--ls-wide); display: block; }
.price__note { font-size: var(--fs-xs); color: var(--text-soft); font-weight: 400; }
.price--was { text-decoration: line-through; color: var(--text-soft); font-weight: 500; font-size: var(--fs-sm); }

/* ------------------------------------------------------------- Book cover */
.book-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 3px 7px 7px 3px;
  overflow: hidden;
  background: var(--parchment-200);
  box-shadow: var(--sh-book);
  transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out);
}
/* Spine highlight — reads as a physical book without an image request */
.book-cover::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 9%;
  background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(0,0,0,.05) 55%, rgba(255,255,255,.16));
  z-index: 2;
  pointer-events: none;
}
.book-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 42%);
  z-index: 2;
  pointer-events: none;
}
.book-cover img, .book-cover svg { width: 100%; height: 100%; object-fit: cover; }
.book-cover--tilt { transform: perspective(900px) rotateY(-11deg); }
a:hover .book-cover, .card--hover:hover .book-cover { transform: translateY(-5px); box-shadow: var(--sh-xl); }

.cover-placeholder-note {
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--text-soft);
  text-align: center;
  margin-top: var(--sp-2);
  text-transform: uppercase;
}

/* --------------------------------------------------------------- Book card */
.book-card { display: flex; flex-direction: column; gap: var(--sp-3); position: relative; }
.book-card__cover { width: 100%; }
.book-card__title {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}
.book-card__title a { color: var(--text); text-decoration: none; }
.book-card__title a:hover { color: var(--bronze-700); }
.book-card__author { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }
.book-card__meta { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-soft); }
.book-card__actions { display: flex; gap: var(--sp-2); margin-top: auto; }
.book-card__actions form { flex: 1; }

.wish-btn {
  position: absolute;
  top: var(--sp-2); right: var(--sp-2);
  z-index: 3;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.92);
  color: var(--text-muted);
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.wish-btn:hover { color: var(--danger); transform: scale(1.08); }
.wish-btn.is-saved { color: var(--danger); background: #fff; }

/* ------------------------------------------------------------ Package card */
.package-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease);
}
.package-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.package-card--featured {
  border-color: var(--bronze);
  box-shadow: var(--sh-lg);
  background: linear-gradient(180deg, var(--bronze-50) 0%, var(--paper) 26%);
}
.package-card__name { font-family: var(--font-display); font-size: var(--fs-2xl); margin: 0 0 var(--sp-1); }
.package-card__for { font-size: var(--fs-sm); color: var(--text-muted); min-height: 3em; }
.package-card__price { margin: var(--sp-4) 0; padding-block: var(--sp-4); border-block: 1px solid var(--line); }
.package-card__list { list-style: none; padding: 0; margin: 0 0 var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.package-card__list li { display: grid; grid-template-columns: 20px 1fr; gap: var(--sp-3); font-size: var(--fs-sm); line-height: 1.45; }
.package-card__list svg { color: var(--success); margin-top: 3px; }
.package-card__list .is-absent { color: var(--text-soft); }
.package-card__list .is-absent svg { color: var(--line-strong); }
.package-card__foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--sp-3); }

/* ------------------------------------------------------------ Service card */
.service-card { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-5); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease-out); }
.service-card:hover { border-color: var(--bronze-200); box-shadow: var(--sh-md); transform: translateY(-3px); }
.service-card__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--bronze-50);
  color: var(--bronze-700);
  flex: none;
}
.service-card__title { font-family: var(--font-display); font-size: var(--fs-lg); margin: 0; }
.service-card__title a { color: inherit; text-decoration: none; }
.service-card__meta { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); font-size: var(--fs-xs); color: var(--text-soft); padding-top: var(--sp-3); border-top: 1px dashed var(--line); margin-top: auto; }
.service-card__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* ------------------------------------------------------------- Author card */
.author-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); }
.author-portrait {
  width: 132px; height: 132px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--paper);
  box-shadow: var(--sh-md);
  background: var(--parchment-200);
}
.author-portrait img, .author-portrait svg { width: 100%; height: 100%; object-fit: cover; }
.author-portrait--lg { width: 190px; height: 190px; }
.author-portrait--sm { width: 56px; height: 56px; border-width: 2px; }

/* ------------------------------------------------------------ Testimonial */
.testimonial {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  height: 100%;
}
.testimonial__quote {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  line-height: 1.5;
  color: var(--ink-700);
  margin: 0;
  position: relative;
}
.testimonial__quote::before {
  content: "\201C";
  font-size: 3.2rem;
  line-height: .6;
  color: var(--bronze-200);
  display: block;
  margin-bottom: .1em;
}
.testimonial__author { display: flex; align-items: center; gap: var(--sp-3); margin-top: auto; }
.testimonial__name { font-weight: 600; font-size: var(--fs-sm); }
.testimonial__role { font-size: var(--fs-xs); color: var(--text-soft); }

/* ---------------------------------------------------------------- Slider */
.slider { position: relative; }
.slider__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--slide-w, 280px);
  gap: var(--sp-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: var(--sp-4);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.slider__track::-webkit-scrollbar { display: none; }
.slider__track > * { scroll-snap-align: start; }
.slider__nav { display: flex; gap: var(--sp-2); }
.slider__btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--text);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.slider__btn:hover:not(:disabled) { background: var(--ink); color: var(--text-invert); border-color: var(--ink); }
.slider__btn:disabled { opacity: .35; cursor: default; }
.on-dark .slider__btn { background: transparent; border-color: rgba(255,255,255,.24); color: var(--text-invert); }
.on-dark .slider__btn:hover:not(:disabled) { background: #fff; color: var(--ink); }

/* --------------------------------------------------------------- Tooltip */
.tip { position: relative; display: inline-flex; }
.tip__btn {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--muted);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  display: grid; place-items: center;
  cursor: help;
  padding: 0;
}
/* Fixed rather than absolute: these tooltips live inside the comparison
   table's horizontal scroll container, and an absolutely positioned bubble is
   clipped by it (an element cannot have overflow-x:auto and overflow-y:visible
   at once). main.js positions the bubble against the trigger on hover/focus. */
.tip__bubble {
  position: fixed;
  width: max-content;
  max-width: 260px;
  padding: var(--sp-3) var(--sp-4);
  background: var(--ink);
  color: var(--text-invert);
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.5;
  border-radius: var(--r-sm);
  box-shadow: var(--sh-lg);
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-fast) var(--ease), visibility var(--dur-fast);
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
}
.tip:hover .tip__bubble, .tip__btn:focus-visible + .tip__bubble { opacity: 1; visibility: visible; }

/* ------------------------------------------------------------ Breadcrumbs */
.breadcrumbs { font-size: var(--fs-xs); color: var(--text-soft); }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5em; }
.breadcrumbs li { display: flex; align-items: center; gap: .5em; }
.breadcrumbs li:not(:last-child)::after { content: "/"; color: var(--line-strong); }
.breadcrumbs a { color: inherit; text-decoration: none; }
.breadcrumbs a:hover { color: var(--bronze-700); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--text); font-weight: 500; }
.on-dark .breadcrumbs { color: var(--text-invert-muted); }
.on-dark .breadcrumbs a:hover { color: var(--lantern-300); }

/* ------------------------------------------------------------- Pagination */
.pagination { display: flex; gap: var(--sp-2); align-items: center; justify-content: center; flex-wrap: wrap; margin-top: var(--sp-8); }
.pagination a, .pagination span {
  min-width: 44px; height: 44px;
  padding-inline: var(--sp-3);
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  background: var(--paper);
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.pagination a:hover { border-color: var(--bronze); background: var(--bronze-50); }
.pagination [aria-current="page"] { background: var(--ink); color: var(--text-invert); border-color: var(--ink); }
.pagination .is-disabled { opacity: .4; pointer-events: none; }

/* ----------------------------------------------------------- Empty states */
.empty-state {
  text-align: center;
  padding: var(--sp-9) var(--sp-5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-xl);
  background: var(--paper);
}
.empty-state svg { margin: 0 auto var(--sp-4); color: var(--bronze-400); }
.empty-state h3 { font-size: var(--fs-xl); }
.empty-state p { color: var(--text-muted); max-width: 46ch; margin-inline: auto; }

/* ------------------------------------------------------ Loading skeletons */
.skeleton {
  background: linear-gradient(90deg, var(--muted) 25%, var(--parchment-200) 37%, var(--muted) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skeleton--text { height: 1em; margin-bottom: .55em; }
.skeleton--text:last-child { width: 72%; }
.skeleton--cover { aspect-ratio: 2/3; border-radius: 3px 7px 7px 3px; }
.skeleton--line-sm { height: .8em; width: 40%; }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* --------------------------------------------------------------- Feature */
.feature { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-4); align-items: start; }
.feature__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--bronze-50);
  color: var(--bronze-700);
  flex: none;
}
.on-dark .feature__icon { background: rgba(233,161,59,.14); color: var(--lantern-300); }
.feature__title { font-size: var(--fs-base); font-weight: 600; margin: 0 0 var(--sp-1); font-family: var(--font-body); }
.feature__text { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }

/* ------------------------------------------------------------- Stat block */
.stat { text-align: center; }
.stat__value { font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: 600; line-height: 1; color: var(--bronze-700); }
.on-dark .stat__value { color: var(--lantern); }
.stat__label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--text-muted); margin-top: var(--sp-2); }

/* --------------------------------------------------------------- Chip/Tag */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: .4em .9em;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.chip:hover { border-color: var(--bronze); color: var(--bronze-700); }
.chip.is-active, .chip[aria-pressed="true"] {
  background: var(--ink); color: var(--text-invert); border-color: var(--ink);
}
.chip__remove { font-size: 1.1em; line-height: 1; opacity: .7; }

/* ---------------------------------------------------------------- Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--paper); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { padding: var(--sp-4); text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { background: var(--parchment-200); font-weight: 600; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--parchment); }

/* -------------------------------------------------------------- Definition */
.spec-list { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-3) var(--sp-5); margin: 0; font-size: var(--fs-sm); }
.spec-list dt { font-weight: 600; color: var(--text-muted); }
.spec-list dd { margin: 0; }

/* ------------------------------------------------------------- Disclaimer */
.disclaimer {
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: var(--text-soft);
  padding: var(--sp-4);
  border-left: 2px solid var(--line-strong);
  background: var(--muted);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.on-dark .disclaimer { background: rgba(255,255,255,.04); color: var(--text-invert-muted); }

/* ------------------------------------------------------------------ Video */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--sh-lg);
}
.video-frame img, .video-frame svg { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.video-frame__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  cursor: pointer;
  color: #fff;
}
.video-frame__play span {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: rgba(233, 161, 59, .95);
  color: var(--ink);
  display: grid; place-items: center;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  transition: transform var(--dur) var(--ease-out);
}
.video-frame__play:hover span { transform: scale(1.08); }
