/* =========================================================================
   PORCHLYTE EXPERIENCE BUILDER — STYLES
   -------------------------------------------------------------------------
   The shared base below is the same cohesive design system used across the
   PorchLyte form-tool suite (Listing Launchpad, Email Drip Campaign, Open
   House Marketing Kit). Tool-specific rules for the Experience Builder live in
   the clearly marked block at the bottom and only build on the tokens above;
   they never change them.

   Palette: white + cream surfaces, dark brown type, rust as an accent only.
   Type:    Chapza (display, falls back to Playfair Display) + Inter (body/UI).
   ========================================================================= */

:root {
  /* Brand palette */
  --cream: #efeae3;      /* page + section backgrounds */
  --white: #ffffff;      /* cards, tool surfaces, form fields */
  --tan: #d7c8ba;        /* secondary panels, hover, dividers, pills */
  --brown: #2b1f1b;      /* body text + headings, dark modules */
  --rust: #80441e;       /* accent only: buttons, active state, underlines */

  --text: var(--brown);
  --text-soft: #6f6157;  /* muted brown for sub text */
  --border: #e4dacd;     /* soft warm border */
  --error: #80441e;

  --font-display: "Chapza", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(43, 31, 27, 0.04), 0 6px 20px rgba(43, 31, 27, 0.05);

  --content-width: 760px;
  --library-width: 1080px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }

/* The hidden attribute must always win, even over display rules like flex/grid. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 40px 24px 96px;
}
.app.wide { max-width: var(--library-width); }

.screen { display: none; }
.screen.active {
  display: block;
  animation: fadein 0.35s var(--ease);
}
@keyframes fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== TOOL HEADER (reusable shell — same on every form) ===== */
.tool-header {
  text-align: center;
  margin: 0 0 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.tool-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--brown);
  margin: 0 0 12px;
}
.tool-tagline {
  margin: 0 auto;
  max-width: 540px;
  color: var(--text-soft);
  font-size: 16px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--rust);
  color: #fff;
  border: 1px solid var(--rust);
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.01em;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
  box-shadow: 0 2px 8px rgba(128, 68, 30, 0.18);
}
.btn-primary:hover {
  background: #6c3818;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(128, 68, 30, 0.24);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--brown);
  color: #fff;
  border: 1px solid var(--brown);
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.2s var(--ease);
}
.btn-secondary:hover { background: #1c1512; transform: translateY(-1px); }

/* Quiet Copy button — tan pill */
.btn-copy {
  background: var(--tan);
  color: var(--brown);
  border: 1px solid transparent;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.btn-copy:hover { background: #cbb9a8; }
.btn-copy.is-copied { background: var(--rust); color: #fff; }

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* ===== FORM ===== */
#form, #loading, #results {
  margin: 0 auto;
}
.form-note {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--rust);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin: 0 0 28px;
  color: var(--text-soft);
  font-size: 14.5px;
}
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.form-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  scroll-margin-top: 96px;
}
.form-section-title {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--rust);
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.field-row {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field.span-2 { grid-column: span 2; }
.field > span,
.field > legend {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-soft);
  text-align: left;
  padding-left: 2px;
}
.field > span em {
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--tan);
  margin-left: 6px;
}
.field input,
.field select,
.field textarea {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  font: inherit;
  color: inherit;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(128, 68, 30, 0.15);
}

.form-actions {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 4px;
}
.form-actions .microcopy { text-align: center; }
.microcopy {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0;
}
.form-error {
  color: var(--error);
  font-size: 14px;
  margin: 8px 0 0;
  font-weight: 500;
  background: #fbf1ea;
  border: 1px solid #e7c9b6;
  border-left: 3px solid var(--rust);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

/* ===== SCREEN HEADERS (used on the results screen) ===== */
.screen-header {
  text-align: left;
  margin: 8px 0 28px;
}
.screen-header.center { text-align: center; }
.screen-header h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.05;
  color: var(--brown);
  margin: 0 0 12px;
}
.screen-header.center h2.underline { display: inline-block; }
.screen-header.center h2.underline::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  background: var(--rust);
  border-radius: 2px;
  margin: 14px auto 0;
}
.screen-sub {
  margin: 0;
  color: var(--text-soft);
  font-size: 16px;
}

/* ===== LOADING ===== */
.loader {
  text-align: center;
  padding: 64px 0;
}
.loader h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3.5vw, 32px);
  color: var(--brown);
  margin: 0 0 8px;
}

/* ===== RESULTS ===== */
.result-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.result-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--brown);
  color: #fff;
  padding: 12px 22px;
}
.result-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--tan);
}
.result-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: #fff;
}
.result-body { padding: 22px 22px 8px; }
.content-body {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--brown);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.result-card .card-actions { padding: 0 22px 20px; }

.results-again {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* Loading shimmer shown in each card until its content returns */
.shimmer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0 10px;
}
.shimmer span {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--cream) 25%, #e7ddd0 37%, var(--cream) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
.shimmer span:nth-child(1) { width: 100%; }
.shimmer span:nth-child(2) { width: 92%; }
.shimmer span:nth-child(3) { width: 70%; }
@keyframes shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .shimmer span { animation: none; }
}

.card-error-msg {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
}

.results-writing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 0;
  color: var(--text-soft);
  font-size: 14px;
}
.writing-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rust);
  animation: writing-pulse 1s ease-in-out infinite;
}
@keyframes writing-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50%      { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .writing-dot { animation: none; }
}

.result-card.just-arrived { animation: card-in 0.35s var(--ease); }
@keyframes card-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== FOOTER ===== */
.site-footer {
  margin-top: 56px;
  padding: 26px 0 12px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-disclaimer {
  font-size: 12px;
  color: var(--text-soft);
  margin: 0 auto;
  max-width: 640px;
  opacity: 0.9;
  line-height: 1.55;
}

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

/* ===== RESPONSIVE (shared) ===== */
@media (max-width: 520px) {
  .app { padding: 28px 18px 80px; }
  .result-bar { padding: 11px 18px; }
  .result-body { padding: 18px 18px 6px; }
  .result-card .card-actions { padding: 0 18px 18px; }
  .field.span-2 { grid-column: auto; }
}

/* ---- Header badges + supporting copy (shared shell) ---- */
.tool-badge-cat {
  display: inline-block;
  background: var(--brown);
  color: var(--tan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}
.tool-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--rust);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(128, 68, 30, 0.22);
}
.tool-subhead {
  margin: 0 auto;
  max-width: 600px;
  color: var(--rust);
  font-size: clamp(16px, 2.4vw, 19px);
  font-weight: 600;
}
.tool-support {
  margin: 12px auto 0;
  max-width: 600px;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.6;
}
.tool-support em { font-style: italic; }
.tool-header-cta { margin-top: 22px; }
@media (max-width: 520px) {
  .tool-badge { position: static; display: inline-block; margin: 0 8px 0 0; }
}

/* ---- Sticky progress summary (shared) ---- */
.progress-rail {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(239, 234, 227, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin: 0 0 28px;
  box-shadow: 0 4px 14px rgba(43, 31, 27, 0.05);
}
.progress-track {
  height: 5px;
  background: var(--tan);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 9px;
}
.progress-fill {
  display: block;
  height: 100%;
  width: 12%;
  background: var(--rust);
  border-radius: var(--radius-pill);
  transition: width 0.35s var(--ease);
}
.progress-current {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  padding: 2px 4px;
  text-align: left;
}
.progress-step {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--rust);
  white-space: nowrap;
}
.progress-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--brown);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.progress-chevron { color: var(--text-soft); font-size: 12px; }
.progress-menu {
  list-style: none;
  margin: 8px 0 2px;
  padding: 6px 0 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}
.progress-menu li {
  font-size: 13px;
  color: var(--text-soft);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: center;
}
.progress-menu li:hover { background: var(--tan); color: var(--brown); }
.progress-menu li .n {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--rust);
  min-width: 18px;
}
.progress-menu li.active { background: var(--rust); color: #fff; }
.progress-menu li.active .n { color: #fff; }
@media (max-width: 520px) {
  .progress-menu { grid-template-columns: 1fr; }
}

/* ---- Pill option groups (shared) ---- */
.pill-group {
  border: 0; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 14.5px;
  color: var(--brown);
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease), box-shadow 0.16s var(--ease);
  user-select: none;
}
.pill:hover { border-color: var(--tan); background: #faf7f2; }
.pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.pill:has(input:focus-visible) {
  border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(128, 68, 30, 0.15);
}
.pill:has(input:checked) {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
  box-shadow: 0 2px 8px rgba(128, 68, 30, 0.2);
}

/* ---- Conditional reveal blocks (shared) ---- */
.conditional {
  margin-top: 4px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--rust);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadein 0.3s var(--ease);
}
.help-text {
  font-size: 13.5px;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.55;
}
.help-text.warn {
  border-left: 3px solid var(--tan);
  padding-left: 12px;
}

textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
textarea.tall { min-height: 150px; }

/* ---- Options actions (shared) ---- */
.options-actions {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.btn-mini {
  background: var(--tan); color: var(--brown);
  border: 1px solid transparent; padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-family: inherit; font-size: 12px; font-weight: 600;
  letter-spacing: 0.03em; cursor: pointer;
  transition: background 0.18s var(--ease);
}
.btn-mini:hover { background: #cbb9a8; }
.btn-mini.ghost { background: transparent; border-color: var(--border); color: var(--text-soft); }
.btn-mini.ghost:hover { background: var(--white); }
.options-count { font-size: 13px; color: var(--text-soft); margin-left: auto; }
.option-cat { margin-top: 18px; }
.option-cat-label {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 600; color: var(--text-soft); margin: 0 0 10px;
}
.option-list { display: flex; flex-wrap: wrap; gap: 8px; }
.option-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  cursor: pointer; font-size: 13.5px; color: var(--brown);
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease), box-shadow 0.16s var(--ease);
  user-select: none;
}
.option-chip:hover { border-color: var(--tan); background: #faf7f2; }
.option-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.option-chip:has(input:checked) {
  background: var(--rust); border-color: var(--rust); color: #fff;
  box-shadow: 0 2px 8px rgba(128, 68, 30, 0.2);
}
.option-chip .rec-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--rust);
}
.option-chip:has(input:checked) .rec-dot { background: #fff; }

/* ---- Results toolbar (shared) ---- */
.results-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin: 0 0 26px; padding-bottom: 22px; border-bottom: 1px solid var(--border);
}

/* ---- Overview card (shared) ---- */
.overview-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  overflow: hidden; margin-bottom: 22px;
}
.overview-top {
  background: var(--brown); color: #fff; padding: 14px 24px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
}
.overview-body { padding: 24px; }
.overview-lead { margin: 0 0 20px; font-size: 16px; line-height: 1.6; color: var(--brown); }
.overview-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 22px;
}
.overview-stat {
  background: var(--cream); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 16px;
}
.overview-stat .label {
  display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 600; color: var(--rust); margin-bottom: 6px;
}
.overview-stat .value { font-size: 15px; color: var(--brown); font-weight: 500; line-height: 1.4; }
.overview-strategy { border-top: 1px solid var(--border); padding-top: 18px; }
.overview-strategy + .overview-strategy { margin-top: 18px; }
.overview-strategy h4 {
  margin: 0 0 8px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 600; color: var(--rust);
}
.overview-strategy p { margin: 0; color: var(--brown); line-height: 1.65; font-size: 15.5px; }

/* ---- Section title row (shared) ---- */
.section-title-row {
  display: flex; align-items: center; gap: 12px; margin: 34px 0 14px;
}
.section-title-row h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(20px, 3vw, 26px); color: var(--brown); margin: 0;
}
.section-title-row .rule { flex: 1; height: 1px; background: var(--border); }

/* ---- Follow-up plan (shared) ---- */
.followup-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  overflow: hidden; margin-bottom: 22px;
}
.followup-top {
  background: var(--brown); color: #fff; padding: 14px 24px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
}
.followup-body { padding: 8px 24px 20px; }
.followup-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.followup-item:last-child { border-bottom: none; }
.followup-aud { font-weight: 600; color: var(--brown); margin: 0 0 6px; font-size: 15.5px; }
.followup-line { margin: 0 0 4px; font-size: 14px; color: var(--text-soft); line-height: 1.5; }
.followup-line b { color: var(--rust); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 0.08em; margin-right: 6px; }

/* ---- Result groups by category (shared) ---- */
.result-group { margin-bottom: 8px; }
#results-groups { display: block; }
.group-cards { display: flex; flex-direction: column; gap: 16px; margin-top: 4px; }
.group-copy-all { margin-left: auto; }

/* Piece card inner fields (shared shapes) */
.piece-timing {
  margin-left: auto; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 600; color: var(--tan);
}
.piece-field { padding: 16px 0; border-top: 1px solid var(--border); }
.piece-field:first-child { border-top: none; padding-top: 4px; }
.piece-field-label {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 600; color: var(--rust); margin: 0 0 8px;
}
.piece-strong { margin: 0; font-size: 16.5px; font-weight: 600; color: var(--brown); line-height: 1.4; }
.piece-italic { margin: 0; font-size: 14.5px; color: var(--text-soft); font-style: italic; }
.piece-cta {
  margin: 0; padding: 12px 16px; background: var(--cream);
  border-radius: var(--radius-md); border-left: 3px solid var(--rust);
  font-size: 15px; color: var(--brown);
}
.piece-alt { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.piece-alt li { font-size: 14.5px; color: var(--text-soft); padding-left: 16px; position: relative; }
.piece-alt li::before {
  content: ""; position: absolute; left: 0; top: 10px; width: 5px; height: 5px;
  border-radius: 50%; background: var(--tan);
}
.piece-bullets { margin: 0; padding-left: 20px; }
.piece-bullets li { margin: 0 0 6px; font-size: 15px; color: var(--brown); line-height: 1.5; }
.hashtags { margin: 4px 0 0; font-size: 14px; color: var(--rust); word-spacing: 4px; }
.piece-meta-line { margin: 0; font-size: 13.5px; color: var(--text-soft); line-height: 1.55; }

/* slide / shot rows (shared) */
.slide-row { padding: 12px 0; border-top: 1px solid var(--border); }
.slide-row:first-child { border-top: none; padding-top: 2px; }
.slide-tag {
  display: inline-block; background: var(--tan); color: var(--brown);
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: var(--radius-pill); margin-bottom: 8px;
}
.slide-text { margin: 0 0 4px; font-size: 15.5px; color: var(--brown); line-height: 1.5; }
.slide-media { margin: 0; font-size: 13px; color: var(--text-soft); }
.slide-media b { color: var(--rust); font-weight: 600; text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.06em; margin-right: 5px; }

/* list-kind blocks (shared) */
.list-block { padding: 14px 0; border-top: 1px solid var(--border); }
.list-block:first-child { border-top: none; padding-top: 2px; }
.list-block h5 {
  margin: 0 0 8px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 600; color: var(--rust);
}
.list-block ul { margin: 0; padding-left: 20px; }
.list-block li { margin: 0 0 6px; font-size: 15px; color: var(--brown); line-height: 1.55; }

/* =========================================================================
   EXPERIENCE BUILDER — TOOL-SPECIFIC ADDITIONS
   Builds on the shared system above and reuses its tokens.
   ========================================================================= */

/* ---- Library controls: search + filters ---- */
.library-controls { margin: 0 0 26px; }
.library-search {
  position: relative;
  max-width: 460px;
  margin: 0 auto 20px;
}
.library-search input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--white);
  font: inherit;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.library-search input:focus {
  outline: none; border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(128, 68, 30, 0.15);
}
.library-search .search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-soft); pointer-events: none;
}

.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.filter-pill {
  background: var(--white); color: var(--brown);
  border: 1px solid var(--border);
  padding: 8px 15px; border-radius: var(--radius-pill);
  font-family: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; user-select: none;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease), color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.filter-pill:hover { border-color: var(--tan); background: #faf7f2; }
.filter-pill.active {
  background: var(--rust); border-color: var(--rust); color: #fff;
  box-shadow: 0 2px 8px rgba(128, 68, 30, 0.2);
}
.filter-pill.clear {
  background: transparent; border-color: transparent; color: var(--text-soft);
  text-decoration: underline; text-underline-offset: 3px;
}
.filter-pill.clear:hover { color: var(--rust); background: transparent; }

.library-count {
  text-align: center; color: var(--text-soft);
  font-size: 13.5px; margin: 18px 0 0;
}

/* ---- Library shelves + cards ---- */
.shelf { margin: 34px 0 0; }
.shelf-head { margin: 0 0 4px; }
.shelf-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(22px, 3vw, 28px); color: var(--brown); margin: 0;
}
.shelf-blurb { margin: 4px 0 0; color: var(--text-soft); font-size: 14.5px; }

.card-grid {
  display: grid; gap: 18px; margin-top: 18px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.exp-card {
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), border-color 0.16s var(--ease);
}
.exp-card:hover {
  transform: translateY(-3px); border-color: var(--tan);
  box-shadow: 0 4px 10px rgba(43,31,27,0.06), 0 14px 34px rgba(43,31,27,0.09);
}
.exp-illus {
  position: relative;
  height: 128px;
  background: linear-gradient(150deg, #f4efe8 0%, var(--tan) 130%);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border);
}
.exp-illus svg { width: 62px; height: 62px; color: var(--rust); margin-top: 30px; }
.exp-cat-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(43,31,27,0.82); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--radius-pill);
}
.exp-new-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--rust); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(128,68,30,0.25);
}
.exp-body { padding: 18px 18px 8px; flex: 1; display: flex; flex-direction: column; }
.exp-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 20px; line-height: 1.15; color: var(--brown); margin: 0 0 8px;
}
.exp-outcome { margin: 0 0 14px; color: var(--text-soft); font-size: 14px; line-height: 1.5; }
.exp-desc { margin: 0 0 14px; color: var(--brown); font-size: 13.5px; line-height: 1.55; }
.exp-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px;
  margin: 0 0 16px; padding-top: 14px; border-top: 1px solid var(--border);
}
.exp-meta div { display: flex; flex-direction: column; gap: 2px; }
.exp-meta .m-label {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 600; color: var(--rust);
}
.exp-meta .m-value { font-size: 13px; color: var(--brown); font-weight: 500; line-height: 1.3; }
.exp-foot { padding: 0 18px 18px; margin-top: auto; }
.exp-foot .btn-build {
  width: 100%;
  background: var(--brown); color: #fff; border: 1px solid var(--brown);
  padding: 12px 18px; font-size: 14px; font-weight: 600; font-family: inherit;
  border-radius: var(--radius-md); cursor: pointer;
  transition: background 0.18s var(--ease), transform 0.12s var(--ease);
}
.exp-foot .btn-build:hover { background: var(--rust); border-color: var(--rust); transform: translateY(-1px); }

.library-empty {
  text-align: center; padding: 60px 20px; color: var(--text-soft);
}
.library-empty h3 {
  font-family: var(--font-display); font-weight: 600; color: var(--brown);
  font-size: 22px; margin: 0 0 8px;
}

/* ---- Selected-experience banner at top of the form ---- */
.exp-banner {
  display: flex; align-items: center; gap: 16px;
  background: var(--white); border: 1px solid var(--border);
  border-left: 3px solid var(--rust);
  border-radius: var(--radius-md); padding: 16px 18px; margin: 0 0 22px;
}
.exp-banner .banner-illus {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: var(--radius-md);
  background: linear-gradient(150deg, #f4efe8, var(--tan));
  display: flex; align-items: center; justify-content: center;
}
.exp-banner .banner-illus svg { width: 28px; height: 28px; color: var(--rust); }
.exp-banner .banner-text { flex: 1; min-width: 0; }
.exp-banner .banner-label {
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700; color: var(--rust); margin: 0 0 3px;
}
.exp-banner .banner-title {
  font-family: var(--font-display); font-weight: 600; font-size: 20px;
  color: var(--brown); margin: 0 0 2px; line-height: 1.15;
}
.exp-banner .banner-desc { margin: 0; font-size: 13px; color: var(--text-soft); line-height: 1.45; }
.exp-banner .banner-change {
  flex-shrink: 0; background: var(--tan); color: var(--brown); border: 0;
  padding: 8px 14px; border-radius: var(--radius-pill);
  font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background 0.18s var(--ease);
}
.exp-banner .banner-change:hover { background: #cbb9a8; }
@media (max-width: 520px) {
  .exp-banner { flex-wrap: wrap; }
  .exp-banner .banner-change { margin-left: 66px; }
}

/* ---- Recommendation repeater ---- */
.rec-list { display: flex; flex-direction: column; gap: 16px; }
.rec-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px; position: relative;
  display: flex; flex-direction: column; gap: 14px;
}
.rec-item-head {
  display: flex; align-items: center; justify-content: space-between;
}
.rec-item-head .n {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 700; color: var(--rust);
}
.rec-remove {
  background: none; border: 0; color: var(--text-soft); cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 600; padding: 2px 4px;
}
.rec-remove:hover { color: var(--rust); }

/* ---- Upload previews (agent logo/headshot, client-side only) ---- */
.upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.upload-tile {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; background: var(--white);
}
.upload-tile img { display: block; width: 100%; height: 90px; object-fit: contain; background: var(--cream); }
.upload-tile .u-cap {
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 600; color: var(--text-soft); padding: 6px 8px 2px;
}
.upload-tile button {
  background: none; border: 0; cursor: pointer; font-family: inherit;
  font-size: 11px; font-weight: 600; color: var(--text-soft); padding: 2px 8px 8px;
}
.upload-tile button:hover { color: var(--rust); }

/* ---- Itinerary / step-by-step plan ---- */
.plan-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  overflow: hidden; margin-bottom: 22px;
}
.plan-top {
  background: var(--tan); color: var(--brown); padding: 14px 24px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
}
.plan-body { padding: 8px 24px 18px; }
.plan-step {
  display: grid; grid-template-columns: 118px 1fr; gap: 18px;
  padding: 18px 0; border-bottom: 1px solid var(--border);
}
.plan-step:last-child { border-bottom: none; }
.plan-step-when { }
.plan-step-time {
  font-weight: 600; color: var(--rust); font-size: 14px; line-height: 1.35;
}
.plan-step-loc {
  display: block; font-size: 12px; color: var(--text-soft); margin-top: 4px; line-height: 1.4;
}
.plan-step-title { font-weight: 600; color: var(--brown); margin: 0 0 6px; font-size: 16px; }
.plan-step-desc { margin: 0 0 8px; color: var(--brown); font-size: 15px; line-height: 1.55; }
.plan-meta { margin: 0 0 5px; color: var(--text-soft); font-size: 13.5px; line-height: 1.5; }
.plan-meta b { color: var(--rust); font-weight: 600; text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.06em; margin-right: 6px; }
.plan-client {
  margin: 8px 0 0; padding: 10px 14px; background: var(--cream);
  border-radius: var(--radius-md); border-left: 3px solid var(--tan);
  font-size: 14px; color: var(--brown); font-style: italic; line-height: 1.5;
}
@media (max-width: 520px) {
  .plan-body { padding: 6px 18px 14px; }
  .plan-step { grid-template-columns: 1fr; gap: 8px; }
}

/* ---- Agent action plan (timing phases) ---- */
.action-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  overflow: hidden; margin-bottom: 22px;
}
.action-top {
  background: var(--brown); color: #fff; padding: 14px 24px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
}
.action-body { padding: 8px 24px 18px; }
.action-phase { padding: 16px 0; border-bottom: 1px solid var(--border); }
.action-phase:last-child { border-bottom: none; }
.action-phase-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; }
.action-phase-name { font-weight: 600; color: var(--brown); font-size: 15.5px; }
.action-phase-when { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; color: var(--text-soft); }
.action-tasks { margin: 0; padding-left: 20px; }
.action-tasks li { margin: 0 0 6px; font-size: 15px; color: var(--brown); line-height: 1.5; }

/* ---- Guide + note + invitation piece bodies ---- */
.guide-section { padding: 14px 0; border-top: 1px solid var(--border); }
.guide-section:first-child { border-top: none; padding-top: 4px; }
.guide-section h5 {
  margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--brown);
}
.note-body { white-space: pre-wrap; font-size: 15.5px; line-height: 1.65; color: var(--brown); margin: 0; }
.note-signoff { margin: 12px 0 0; font-size: 15px; color: var(--brown); font-style: italic; }

/* ---- This form's primary generate button is black (suite variant) ---- */
#btn-generate {
  background: var(--brown); border-color: var(--brown);
  box-shadow: 0 2px 8px rgba(43, 31, 27, 0.18);
}
#btn-generate:hover { background: #1c1512; box-shadow: 0 5px 14px rgba(43, 31, 27, 0.24); }

/* =========================================================================
   EXPERIENCE LOADER SCENE
   A small home, a path with pins and stops, and a welcome light at the door.
   ========================================================================= */
.xp-loader { display: flex; justify-content: center; margin: 0 auto 30px; }
.xp-svg { width: 300px; height: auto; overflow: visible; }

.xp-ground { stroke: var(--tan); stroke-width: 2; stroke-linecap: round; }
.xp-roof, .xp-body, .xp-chimney {
  fill: var(--white); stroke: var(--brown); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round;
}
.xp-door { fill: var(--tan); stroke: var(--brown); stroke-width: 2; stroke-linejoin: round; }
.xp-heart { fill: var(--rust); opacity: 0; }
.xp-path {
  fill: none; stroke: var(--rust); stroke-width: 2.4; stroke-linecap: round;
  stroke-dasharray: 260; stroke-dashoffset: 260;
}
.xp-pin { transform-box: fill-box; transform-origin: center bottom; opacity: 0; }
.xp-pin .pin-drop { fill: var(--brown); stroke: var(--brown); stroke-width: 1.5; }
.xp-pin .pin-dot { fill: var(--white); }
.xp-stop { transform-box: fill-box; transform-origin: center bottom; opacity: 0; }
.xp-stop .cup, .xp-stop .shop, .xp-stop .gift, .xp-stop .tree {
  stroke: var(--brown); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round;
}
.xp-stop .fill-tan { fill: var(--tan); }
.xp-stop .fill-white { fill: var(--white); }
.xp-stop .fill-rust { fill: var(--rust); }
.xp-stop .fill-none { fill: none; }

/* --- Animated sequence (loops gently over ~7s) --- */
.xp-house { transform-box: fill-box; transform-origin: 52px 150px; animation: xp-pop 7s ease-in-out infinite; }
@keyframes xp-pop {
  0%   { opacity: 0; transform: translateY(8px) scale(0.96); }
  8%   { opacity: 1; transform: translateY(0) scale(1); }
  96%  { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(8px) scale(0.96); }
}
.xp-path { animation: xp-draw 7s ease-in-out infinite; }
@keyframes xp-draw {
  0%, 10% { stroke-dashoffset: 260; }
  46%     { stroke-dashoffset: 0; }
  96%     { stroke-dashoffset: 0; }
  100%    { stroke-dashoffset: 260; }
}
.xp-pin-1 { animation: xp-pin-in 7s ease-in-out infinite; animation-delay: 0s; }
.xp-pin-2 { animation: xp-pin-in 7s ease-in-out infinite; animation-delay: 0s; }
.xp-pin-3 { animation: xp-pin-in 7s ease-in-out infinite; animation-delay: 0s; }
.xp-pin-1 { --pin-at: 22%; }
.xp-pin-2 { --pin-at: 34%; }
.xp-pin-3 { --pin-at: 46%; }
@keyframes xp-pin-in {
  0%, 20%  { opacity: 0; transform: translateY(-6px) scale(0.7); }
  26%      { opacity: 1; transform: translateY(0) scale(1); }
  96%      { opacity: 1; transform: translateY(0) scale(1); }
  100%     { opacity: 0; transform: translateY(-6px) scale(0.7); }
}
.xp-stop-1 { animation: xp-stop-in 7s ease-in-out infinite; }
.xp-stop-2 { animation: xp-stop-in 7s ease-in-out infinite; }
.xp-stop-3 { animation: xp-stop-in 7s ease-in-out infinite; }
@keyframes xp-stop-in {
  0%, 30%  { opacity: 0; transform: translateY(6px) scale(0.8); }
  40%      { opacity: 1; transform: translateY(0) scale(1); }
  96%      { opacity: 1; transform: translateY(0) scale(1); }
  100%     { opacity: 0; transform: translateY(6px) scale(0.8); }
}
.xp-heart { animation: xp-heart-in 7s ease-in-out infinite; }
@keyframes xp-heart-in {
  0%, 66% { opacity: 0; transform: scale(0.6); }
  74%     { opacity: 1; transform: scale(1); }
  82%     { transform: scale(1.12); }
  90%, 96% { opacity: 1; transform: scale(1); }
  100%    { opacity: 0; transform: scale(0.6); }
}
.xp-heart { transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: reduce) {
  .xp-house, .xp-path, .xp-pin, .xp-stop, .xp-heart {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* =========================================================================
   PRINT / SAVE AS PDF
   ========================================================================= */
@media print {
  .tool-header-cta, .progress-rail, .results-toolbar, .results-again,
  .results-writing, #form, #loading, #library, .card-actions, .group-copy-all,
  .exp-banner .banner-change, .site-footer .footer-disclaimer { display: none !important; }
  body { background: #fff; }
  .app, .app.wide { padding: 0; max-width: 100%; }
  .result-card, .overview-card, .plan-card, .action-card, .followup-card {
    box-shadow: none; break-inside: avoid; page-break-inside: avoid;
  }
  .result-bar, .overview-top, .action-top, .followup-top {
    background: #2b1f1b !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .screen { display: block !important; }
  #form, #loading, #library { display: none !important; }
}
