/* ─────────────────────────────────────────────────────
   Components — editorial primitives
   Accent picks up the active plan via [data-plan]
   ──────────────────────────────────────────────────── */

/* Card surface ----------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.card-pad { padding: 20px; }

/* Chips (quiet, in-flow) ------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem; font-weight: 600;
  color: var(--ink-2);
}

/* Pull quote (Amiri serif) ----------------------------- */
.pullquote {
  font-family: var(--font-serif);
  font-size: 1.25rem; line-height: 1.6;
  color: var(--ink);
  border-inline-start: 2px solid var(--p-accent, var(--brand));
  padding: 4px 18px;
  margin: 14px 0 22px;
  max-width: 42ch;
}

/* Fact list (in-section) — editorial label · value -------- */
.fact-list {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 18px;
  margin: 10px 0 14px;
  font-size: 0.93rem;
}
.fact-list .fl-label { color: var(--muted); font-weight: 600; }
.fact-list .fl-value { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Stars ------------------------------------------------ */
.stars {
  display: inline-flex; gap: 2px; direction: ltr;
}
.stars button {
  background: transparent; border: 0; padding: 4px 5px;
  font-size: 1.8rem; line-height: 1;
  color: #d4cebf;
  transition: transform 0.1s ease, color 0.1s ease;
}
.stars button.is-on { color: #c08a1e; }
.stars button:active { transform: scale(0.92); }
.stars-row {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
}
.stars-meta { font-size: 0.82rem; color: var(--muted); }
.stars-meta .avg { color: var(--ink); font-weight: 700; }

/* Vote button ------------------------------------------ */
.vote-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  transition: all 0.15s;
  min-height: 44px;
}
.vote-btn:hover { border-color: var(--p-accent, var(--ink)); }
.vote-btn.is-mine {
  background: var(--p-accent, var(--ink)); color: #fff;
  border-color: var(--p-accent, var(--ink));
}

/* Pill button ------------------------------------------ */
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: var(--bg);
  border: 0; border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700; font-size: 0.95rem;
  min-height: 48px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s;
}
.pill-btn:active { transform: scale(0.97); }
.pill-btn.is-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }

/* Timeline (itinerary) --------------------------------- */
.timeline-controls {
  display: flex; justify-content: space-between; align-items: center;
  margin: 0 0 8px;
}
.timeline-controls .timeline-title {
  font-family: var(--font-serif);
  font-weight: 700; color: var(--ink); font-size: 1.02rem;
}
.timeline-controls .timeline-toggle {
  background: transparent; border: 0; color: var(--p-accent, var(--muted));
  font-size: 0.85rem; font-weight: 700;
}
.timeline-controls .timeline-toggle:hover { color: var(--ink); }

.city-block { margin: 24px 0 14px; }
.city-block:first-of-type { margin-top: 6px; }
.city-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.city-head .city-name {
  font-family: var(--font-serif);
  font-weight: 700; font-size: 1.1rem; color: var(--ink);
}
.city-head .city-meta { color: var(--muted); font-size: 0.84rem; }

.block-intro {
  font-family: var(--font-serif);
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.7;
  margin: 8px 0 14px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-inline-start: 2px solid var(--p-accent, var(--line-strong));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.day {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin: 8px 0;
  overflow: hidden;
}
.day > summary {
  list-style: none;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  cursor: pointer; user-select: none;
}
.day > summary::-webkit-details-marker { display: none; }
.day-info {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px;
}
.day-num {
  color: var(--p-accent, var(--ink));
  font-family: var(--font-serif);
  font-weight: 700; font-size: 1rem;
}
.day-date { color: var(--muted); font-size: 0.86rem; }
.day-chevron { color: var(--muted); transition: transform 0.2s; }
.day[open] .day-chevron { transform: rotate(180deg); }
.day-body {
  padding: 0 14px 14px 14px;
  border-top: 1px dashed var(--line);
}
.day-text {
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* Cost --------------------------------------------------- */
.cost-bar {
  display: flex; width: 100%; height: 8px;
  border-radius: 999px; overflow: hidden;
  background: var(--surface-2);
  margin: 6px 0 16px;
}
.cost-bar > span {
  display: block; height: 100%;
  transition: flex 0.3s;
}
.cost-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--ink-2);
}
.cost-legend .lg-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 999px;
  vertical-align: middle;
  margin-inline-end: 6px;
}
.cost-legend span { display: inline-flex; align-items: center; gap: 0; color: var(--ink-2); }

.cost-list { list-style: none; padding: 0; margin: 12px 0 0; }
.cost-item {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.cost-item:last-child { border-bottom: 0; }
.cost-item .ci-icon { display: none; }
.cost-item .ci-label { color: var(--ink); font-weight: 600; }
.cost-item .ci-note { color: var(--muted); font-size: 0.82rem; grid-column: 1 / -1; line-height: 1.55; }
.cost-item .ci-amount { font-weight: 700; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }

.cost-total {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--p-accent, var(--ink)); color: #fff;
  display: flex; justify-content: space-between; align-items: center;
}
.cost-total .ct-label { font-weight: 700; }
.cost-total .ct-value { font-weight: 700; font-size: 1.2rem; font-variant-numeric: tabular-nums; font-family: var(--font-serif); }

/* Practical cards --------------------------------------- */
.practical-grid {
  display: grid; grid-template-columns: 1fr; gap: 0;
  margin-top: 10px;
}
@media (min-width: 560px) { .practical-grid { grid-template-columns: 1fr 1fr; gap: 0 24px; } }
.pcard {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 14px 0;
}
.pcard:last-child { border-bottom: 0; }
@media (min-width: 560px) {
  .pcard { border-bottom: 1px solid var(--line); }
  .practical-grid > .pcard:nth-last-child(-n+2) { border-bottom: 0; }
}
.pcard-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.pcard-icon { display: none; }
.pcard-title {
  font-family: var(--font-serif);
  font-weight: 700; color: var(--ink); font-size: 1.02rem;
}
.pcard-title::before {
  content: "—"; color: var(--p-accent, var(--muted));
  margin-inline-end: 6px; font-weight: 400;
}
.pcard-text { color: var(--ink-2); font-size: 0.93rem; line-height: 1.7; margin: 0; }

/* The Catch -------------------------------------------- */
.catch {
  border-inline-start: 2px solid var(--p-accent, var(--gold));
  background: transparent;
  border-radius: 0;
  padding: 6px 18px;
  margin: 14px 0;
}
.catch-eyebrow {
  font-weight: 700; color: var(--p-accent, var(--gold));
  font-size: 0.74rem; letter-spacing: 1.5px;
  margin-bottom: 4px;
}
.catch-body {
  font-family: var(--font-serif);
  color: var(--ink); margin: 0;
  font-size: 1.1rem; line-height: 1.6;
}

/* Comments --------------------------------------------- */
.comments h3 {
  font-family: var(--font-serif);
  margin: 0 0 12px; font-size: 1.1rem;
}
.comment-form textarea {
  width: 100%; resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  font-size: 0.95rem; min-height: 80px;
  outline: none; transition: border-color 0.15s;
  font-family: var(--font-body);
}
.comment-form textarea:focus { border-color: var(--p-accent, var(--ink)); }
.comment-controls {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; margin-top: 8px; flex-wrap: wrap;
}
.private-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.88rem; color: var(--ink-2); cursor: pointer;
}
.private-toggle input { width: 18px; height: 18px; accent-color: var(--p-accent, var(--ink)); }
.submit-comment {
  background: var(--p-accent, var(--ink)); color: #fff;
  border: 0; border-radius: 999px;
  padding: 9px 18px; font-weight: 700;
  min-height: 40px;
}

.comment-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.comment {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.comment.is-private {
  border-color: var(--rose);
  background: color-mix(in srgb, var(--rose) 4%, var(--surface));
}
.comment-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 4px;
}
.comment-author { font-weight: 700; color: var(--ink); font-size: 0.92rem; }
.comment-time { color: var(--muted); font-size: 0.78rem; margin-inline-start: 6px; font-weight: 400; }
.comment-private-tag {
  background: var(--rose); color: #fff;
  padding: 2px 8px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700;
}
.comment-body { white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.comment-delete {
  background: transparent; color: var(--muted); border: 0;
  font-size: 0.8rem; padding: 4px 8px;
}
.comment-delete:hover { color: #b91c1c; }
.no-comments { color: var(--muted); font-style: italic; text-align: center; padding: 10px 0; }

/* Bottom action bar ------------------------------------ */
.actionbar {
  position: fixed; z-index: 70;
  left: 0; right: 0; bottom: 0;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-top: 1px solid var(--line);
}
.actionbar-inner {
  max-width: var(--container); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
}
.actionbar .ab-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 8px;
  font-weight: 700; font-size: 0.9rem;
  min-height: 44px;
}
.actionbar .ab-btn:active { transform: scale(0.97); }
.actionbar .ab-btn.is-active {
  background: var(--p-accent, var(--ink)); color: #fff; border-color: var(--p-accent, var(--ink));
}
.actionbar .ab-icon { font-size: 1.05rem; }
.actionbar .ab-label { font-size: 0.85rem; }

/* Bottom sheet ----------------------------------------- */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  opacity: 0; transition: opacity 0.2s;
}
.sheet-backdrop.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 110;
  background: var(--surface);
  border-top-left-radius: var(--radius); border-top-right-radius: var(--radius);
  padding: 8px 0 calc(20px + env(safe-area-inset-bottom));
  max-height: 90vh; overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: var(--shadow-lg);
}
.sheet.show { transform: translateY(0); }
.sheet-handle {
  width: 40px; height: 4px; border-radius: 999px;
  background: var(--line-strong);
  margin: 6px auto 14px;
}
.sheet-title {
  font-family: var(--font-serif);
  text-align: center; font-weight: 700; font-size: 1.1rem; color: var(--ink);
  margin: 0 0 14px;
}
.sheet-body { padding: 0 18px; }
.sheet-close {
  position: absolute; top: 10px; inset-inline-end: 14px;
  background: transparent; border: 0;
  font-size: 1.4rem; color: var(--muted);
  padding: 4px 10px;
}
@media (prefers-reduced-motion: reduce) {
  .sheet { transition: none; }
  .sheet-backdrop { transition: none; }
}

/* Decision wizard styles ------------------------------- */
.wizard-step { padding: 4px 4px 12px; }
.wizard-q {
  font-family: var(--font-serif);
  font-weight: 700; color: var(--ink); margin: 0 0 14px; font-size: 1.1rem;
}
.wizard-options { display: grid; gap: 8px; }
.wizard-opt {
  background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 14px 16px;
  font-weight: 600; text-align: start;
  transition: all 0.15s;
}
.wizard-opt:hover { border-color: var(--ink); }
.wizard-opt.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.wizard-result {
  margin-top: 14px; padding: 18px 20px;
  background: var(--surface-2); border-radius: var(--radius-sm);
}
.wizard-result .wr-eyebrow { color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 1.2px; }
.wizard-result .wr-title { font-family: var(--font-serif); font-weight: 700; font-size: 1.25rem; margin: 4px 0 8px; }
.wizard-result .wr-why { color: var(--ink-2); margin: 0 0 12px; line-height: 1.6; }
.wizard-progress { display: flex; gap: 4px; margin-bottom: 16px; }
.wizard-progress > span {
  flex: 1; height: 3px; background: var(--line); border-radius: 999px;
}
.wizard-progress > span.is-on { background: var(--p-accent, var(--ink)); }

/* Owner breakdown -------------------------------------- */
.owner-breakdown summary {
  cursor: pointer; user-select: none; padding: 12px 0;
  font-weight: 700; color: var(--ink);
  font-family: var(--font-serif);
}
.owner-breakdown summary::-webkit-details-marker { display: none; }
.owner-breakdown summary::before {
  content: "↘ ";
  color: var(--p-accent, var(--muted));
}
.owner-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-top: 6px; }
.owner-table th, .owner-table td {
  padding: 9px 10px; border-bottom: 1px solid var(--line);
  text-align: start;
}
.owner-table th { color: var(--muted); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.5px; }
