/* ══════════════════════════════════════════════════════════════════════
   Basic SME Studio — editorial guided wizard (/sme-home/basic-sme-studio/)
   and its results page (/sme-home/basic-sme-studio/results/).

   Warm paper + sage palette with a serif display face. Scoped to
   body.sme-ed and loaded after sme_styles.html. Light tokens are the
   default look; the SME nav's theme toggle removes .light-mode, which
   switches to the dark tokens below.
   ══════════════════════════════════════════════════════════════════════ */

body.sme-ed,
body.sme-ed.light-mode {
  --ed-bg: #f6f3ef;
  --ed-panel: #ece7e1;
  --ed-paper: #fbf9f6;
  --ed-ink: #1f1b17;
  --ed-ink2: #4a443e;
  --ed-muted: #6e665e;
  --ed-line: #dcd5cc;
  --ed-line2: #c9c0b5;
  --ed-sage: #5e7a76;
  --ed-sage-hover: #4f6b67;
  --ed-sage-text: #4f6b67;
  --ed-sage-soft: rgba(94, 122, 118, .12);
  --ed-on-sage: #ffffff;
  --ed-mark: #e9d8cf;
  --ed-glass: rgba(251, 249, 246, .88);
  --ed-glass-ink: #1f1b17;
  --ed-danger: #a1442f;
  --ed-warn-bg: #f6ead9;
  --ed-warn-ink: #7a5520;
  --ed-shadow: 0 40px 90px -50px rgba(60, 45, 30, .45);
  --ed-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236e665e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --ed-serif: 'Gilda Display', Georgia, 'Times New Roman', serif;
  --ed-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--ed-bg);
  color: var(--ed-ink);
}

body.sme-ed:not(.light-mode) {
  --ed-bg: #141210;
  --ed-panel: #1e1b18;
  --ed-paper: #252220;
  --ed-ink: #f2ede6;
  --ed-ink2: #cfc6bb;
  --ed-muted: #a89e92;
  --ed-line: #3a342e;
  --ed-line2: #4d463f;
  --ed-sage: #a9c2be;
  --ed-sage-hover: #bfd4d0;
  --ed-sage-text: #a9c2be;
  --ed-sage-soft: rgba(169, 194, 190, .12);
  --ed-on-sage: #14201e;
  --ed-mark: rgba(169, 194, 190, .28);
  --ed-glass: rgba(30, 27, 24, .86);
  --ed-glass-ink: #f2ede6;
  --ed-danger: #f0a08a;
  --ed-warn-bg: rgba(240, 180, 90, .12);
  --ed-warn-ink: #f3cf96;
  --ed-shadow: 0 40px 90px -50px rgba(0, 0, 0, .9);
  --ed-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23a89e92' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

body.sme-ed ::selection { background: var(--ed-mark); color: var(--ed-ink); }
body.sme-ed [hidden] { display: none !important; }

/* Nav sits on paper instead of white in the light look */
body.sme-ed.light-mode .sme-nav { background: rgba(246, 243, 239, .82); }
body.sme-ed.light-mode .sme-nav.scrolled {
  background: rgba(246, 243, 239, .96);
  border-bottom-color: var(--ed-line);
}

/* ── Shared atoms ─────────────────────────────────────────────────────── */
.ed-eyebrow {
  margin: 0 0 14px;
  font: 600 .72rem/1.4 var(--ed-sans);
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ed-sage-text);
}
.ed-serif { font-family: var(--ed-serif); font-weight: 400; }
.ed-mark {
  font-style: normal;
  background: linear-gradient(transparent 62%, var(--ed-mark) 62%);
  padding: 0 .06em;
}

.sw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--ed-sage); color: var(--ed-on-sage);
  border: 1px solid var(--ed-sage); border-radius: 2px;
  padding: 17px 30px;
  font: 600 .76rem/1 var(--ed-sans); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.sw-btn:hover { background: var(--ed-sage-hover); border-color: var(--ed-sage-hover); color: var(--ed-on-sage); }
.sw-btn:active { transform: translateY(1px); }
.sw-btn:focus-visible { outline: 2px solid var(--ed-ink); outline-offset: 3px; }
.sw-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.sw-btn .fa-arrow-right { transition: transform .2s ease; }
.sw-btn:hover:not(:disabled) .fa-arrow-right { transform: translateX(3px); }
.sw-btn-lg { padding: 20px 36px; font-size: .8rem; }
.sw-btn-ghost { background: transparent; color: var(--ed-sage-text); }
.sw-btn-ghost:hover { background: var(--ed-sage-soft); color: var(--ed-sage-text); }
.sw-btn-ghost.is-on { background: var(--ed-sage); color: var(--ed-on-sage); }

.sw-link {
  display: inline-flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 8px 0;
  font: 600 .74rem/1 var(--ed-sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ed-ink2); text-decoration: none; cursor: pointer;
  transition: color .2s ease;
}
.sw-link:hover { color: var(--ed-ink); }
.sw-link:focus-visible { outline: 2px solid var(--ed-sage); outline-offset: 4px; }
.sw-link-inline {
  background: none; border: 0; padding: 0;
  font: 600 .88rem/1.5 var(--ed-sans); color: var(--ed-sage-text);
  text-decoration: underline; text-decoration-color: var(--ed-line2);
  text-underline-offset: 4px; cursor: pointer;
}
.sw-link-inline:hover { text-decoration-color: currentColor; color: var(--ed-sage-text); }

.sw-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: sw-spin .7s linear infinite; display: inline-block;
}
@keyframes sw-spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════════════
   STUDIO WIZARD
   ══════════════════════════════════════════════════════════════════════ */
.sw-page { padding: 104px 0 80px; }
.sw-container { max-width: 1200px; }

.sw-intro {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 56px; align-items: end; margin-bottom: 32px;
  animation: sw-fade 1.1s ease both;
}
.sw-title {
  margin: 0;
  font-family: var(--ed-serif); font-weight: 400;
  font-size: clamp(2.3rem, 4.2vw, 3.4rem); line-height: 1.06; letter-spacing: -.01em;
  color: var(--ed-ink);
}
.sw-lede { margin: 0 0 16px; color: var(--ed-ink2); font-size: 1rem; line-height: 1.75; }
.sw-ticks {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  font-size: .82rem; color: var(--ed-muted);
}
.sw-ticks li { display: inline-flex; align-items: center; gap: 8px; }
.sw-ticks li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ed-sage);
}

/* ── The card: photo panel + paper panel ── */
.sw-card {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: 620px;
  background: var(--ed-panel);
  border-radius: 4px; overflow: hidden;
  box-shadow: var(--ed-shadow);
  animation: sw-fade 1.2s .15s ease both;
}

.sw-visual { position: relative; overflow: hidden; background: #cfc6bb; min-height: 100%; }
.sw-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
  opacity: 0; transform: scale(1.05);
  transition: opacity .8s ease, transform 7s ease-out;
}
.sw-photo.is-active { opacity: 1; transform: scale(1); }
.sw-photo-studio { object-position: 40% 50%; }
.sw-photo-workshop { object-position: 60% 50%; }
.sw-photo-whiteboard { object-position: 46% 50%; }
.sw-photo-city { object-position: 58% 50%; }
.sw-visual-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 16, 12, 0) 40%, rgba(20, 16, 12, .5) 100%);
}
/* the soft paper edge the inspiration layout has where photo meets panel */
.sw-visual::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 34px;
  background: linear-gradient(90deg, rgba(236, 231, 225, 0), rgba(236, 231, 225, .35));
  pointer-events: none;
}

.sw-brief {
  position: absolute; left: 24px; right: 24px; bottom: 24px;
  padding: 18px 20px 14px;
  background: var(--ed-glass); color: var(--ed-glass-ink);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-radius: 3px;
}
.sw-brief { transition: opacity .4s ease, transform .4s ease; }
/* the review step lists the same answers — let the photo breathe there */
.sw-card.is-review .sw-brief { opacity: 0; transform: translateY(12px); pointer-events: none; }
.sw-brief-label {
  margin: 0 0 10px;
  font: 600 .66rem/1 var(--ed-sans); letter-spacing: .18em; text-transform: uppercase;
  color: var(--ed-muted);
}
.sw-brief-list { margin: 0; }
.sw-brief-row {
  display: grid; grid-template-columns: 18px 82px minmax(0, 1fr); align-items: baseline;
  gap: 6px; padding: 7px 0; border-top: 1px solid var(--ed-line);
  font-size: .84rem;
}
.sw-brief-row:first-child { border-top: 0; }
.sw-brief-row::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  border: 1.5px solid var(--ed-line2); align-self: center;
  transition: background .3s ease, border-color .3s ease;
}
.sw-brief-row.is-filled::before { background: var(--ed-sage); border-color: var(--ed-sage); }
.sw-brief-row dt { font-weight: 500; color: var(--ed-muted); }
.sw-brief-row dd {
  margin: 0; font-weight: 600; color: var(--ed-glass-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sw-brief-row:not(.is-filled) dd { color: var(--ed-muted); font-weight: 400; }

/* ── Paper panel ── */
.sw-panel { display: flex; flex-direction: column; min-width: 0; padding: 36px 56px 44px; }
.sw-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 18px;
}
.sw-panel-brand {
  font: 600 .68rem/1 var(--ed-sans); letter-spacing: .18em; text-transform: uppercase;
  color: var(--ed-muted);
}
.sw-panel-brand i { color: var(--ed-sage-text); margin-right: 6px; }

.sw-progress {
  list-style: none; margin: 0 0 36px; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px;
}
.sw-progress-btn {
  display: flex; flex-direction: column; gap: 10px; width: 100%;
  background: none; border: 0; padding: 0; text-align: left;
  font: 600 .66rem/1.2 var(--ed-sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ed-muted); cursor: pointer;
}
.sw-progress-btn::before {
  content: ""; height: 2px; border-radius: 2px; background: var(--ed-line);
  transition: background .4s ease;
}
.sw-progress-btn:disabled { cursor: default; opacity: .75; }
.sw-progress-btn:focus-visible { outline: 2px solid var(--ed-sage); outline-offset: 4px; }
.sw-progress-item.is-done .sw-progress-btn { color: var(--ed-ink2); }
.sw-progress-item.is-done .sw-progress-btn::before { background: var(--ed-sage); }
.sw-progress-item.is-done .sw-progress-btn:hover { color: var(--ed-ink); }
.sw-progress-item.is-current .sw-progress-btn { color: var(--ed-ink); opacity: 1; }
.sw-progress-item.is-current .sw-progress-btn::before {
  background: linear-gradient(90deg, var(--ed-sage) 0 55%, var(--ed-line) 55% 100%);
}
.sw-progress-num { font-family: var(--ed-serif); font-size: .95rem; letter-spacing: 0; margin-right: 6px; }

.sw-form { display: flex; flex-direction: column; flex: 1; }
.sw-step { display: flex; flex-direction: column; flex: 1; }
.sw-step-title {
  margin: 0 0 14px;
  font-family: var(--ed-serif); font-weight: 400;
  font-size: clamp(1.95rem, 3vw, 2.7rem); line-height: 1.14;
  color: var(--ed-ink); outline: none;
}
.sw-step-copy {
  margin: 0 0 26px; max-width: 54ch;
  color: var(--ed-ink2); font-size: .96rem; line-height: 1.75;
}
.sw-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 34px;
}
.sw-actions-end { justify-content: flex-end; }
.sw-error {
  display: flex; gap: 8px; align-items: baseline;
  margin: 14px 0 0; color: var(--ed-danger); font-size: .86rem; font-weight: 500;
}
.sw-note { margin: 12px 0 0; color: var(--ed-muted); font-size: .8rem; line-height: 1.6; }

/* ── Reveal: step 1 eases in slowly; later steps appear at once with a
      quick cascade so "Next" feels instant ── */
@keyframes sw-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sw-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.sw-step.is-entering > * { animation: sw-rise .42s cubic-bezier(.2, .7, .2, 1) both; }
.sw-step.is-entering > :nth-child(2) { animation-delay: .03s; }
.sw-step.is-entering > :nth-child(3) { animation-delay: .06s; }
.sw-step.is-entering > :nth-child(4) { animation-delay: .09s; }
.sw-step.is-entering > :nth-child(5) { animation-delay: .12s; }
.sw-step.is-entering > :nth-child(n+6) { animation-delay: .15s; }
.sw-step.is-slow > * { animation-duration: 1.1s; animation-timing-function: cubic-bezier(.16, .8, .24, 1); }
.sw-step.is-slow > :nth-child(1) { animation-delay: .55s; }
.sw-step.is-slow > :nth-child(2) { animation-delay: .8s; }
.sw-step.is-slow > :nth-child(3) { animation-delay: 1.05s; }
.sw-step.is-slow > :nth-child(4) { animation-delay: 1.3s; }
.sw-step.is-slow > :nth-child(5) { animation-delay: 1.55s; }
.sw-step.is-slow > :nth-child(n+6) { animation-delay: 1.8s; }

/* ── Fields ── */
.sw-fields { display: grid; gap: 14px; }
.sw-fields-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sw-field { display: flex; flex-direction: column; gap: 9px; margin: 0; min-width: 0; }
.sw-label {
  font: 600 .66rem/1.2 var(--ed-sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ed-muted);
}
.sw-label small { font-size: .66rem; font-weight: 500; letter-spacing: .04em; text-transform: none; }
.sw-input, .sw-select, .sw-textarea {
  width: 100%;
  background-color: var(--ed-paper); color: var(--ed-ink);
  border: 1px solid var(--ed-line); border-radius: 2px;
  padding: 15px 16px;
  font: 400 .95rem/1.4 var(--ed-sans);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.sw-select {
  -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer;
  background-image: var(--ed-chevron); background-repeat: no-repeat;
  background-position: right 15px center; background-size: 12px 8px;
}
.sw-select option { background: var(--ed-paper); color: var(--ed-ink); }
.sw-input::placeholder, .sw-textarea::placeholder { color: var(--ed-muted); opacity: .85; }
.sw-input:focus, .sw-select:focus, .sw-textarea:focus {
  outline: none; border-color: var(--ed-sage); box-shadow: 0 0 0 3px var(--ed-sage-soft);
}
.sw-select:disabled { opacity: .55; cursor: not-allowed; }
.sw-field.is-invalid .sw-select,
.sw-field.is-invalid .sw-input,
.sw-field.is-invalid .sw-textarea { border-color: var(--ed-danger); }

/* ── Step 2: budget ── */
.sw-budget {
  background: var(--ed-paper); border: 1px solid var(--ed-line); border-radius: 2px;
  padding: 26px 28px 18px;
}
.sw-budget-top {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 18px;
  flex-wrap: wrap; margin-bottom: 22px;
}
.sw-budget-value {
  display: block;
  font-family: var(--ed-serif); font-size: clamp(2.1rem, 3.6vw, 3rem); line-height: 1;
  color: var(--ed-ink);
}
.sw-budget-usd { display: block; margin-top: 8px; color: var(--ed-muted); font-size: .84rem; }
.sw-budget-tier {
  padding: 8px 13px; border-radius: 999px;
  background: var(--ed-sage-soft); color: var(--ed-sage-text);
  font: 600 .66rem/1 var(--ed-sans); letter-spacing: .14em; text-transform: uppercase;
}
.sw-range {
  --fill: 34%;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; margin: 10px 0; border-radius: 4px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--ed-sage) 0 var(--fill), var(--ed-line) var(--fill) 100%);
}
.sw-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--ed-paper); border: 2px solid var(--ed-sage);
  box-shadow: 0 4px 14px rgba(40, 30, 20, .18); cursor: grab;
}
.sw-range::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ed-paper); border: 2px solid var(--ed-sage); cursor: grab;
}
.sw-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px var(--ed-sage-soft); }
.sw-range-scale {
  display: flex; justify-content: space-between;
  color: var(--ed-muted); font-size: .74rem; margin-top: 4px;
}
.sw-presets {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px;
}
.sw-preset {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  background: transparent; border: 1px solid var(--ed-line); border-radius: 2px;
  padding: 13px 14px; cursor: pointer; color: var(--ed-ink);
  transition: border-color .2s ease, background .2s ease;
}
.sw-preset strong { font-size: .84rem; font-weight: 600; }
.sw-preset span { font-size: .76rem; color: var(--ed-muted); }
.sw-preset:hover { border-color: var(--ed-line2); background: var(--ed-paper); }
.sw-preset.is-active { border-color: var(--ed-sage); background: var(--ed-sage-soft); }
.sw-preset:focus-visible { outline: 2px solid var(--ed-sage); outline-offset: 2px; }

/* ── Radio cards (niche + idea count) ── */
.sw-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sw-choice-wrap { position: relative; display: block; margin: 0; cursor: pointer; }
.sw-choice-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.sw-choice {
  display: flex; align-items: center; gap: 13px; height: 100%;
  padding: 13px 40px 13px 14px;
  background: var(--ed-paper); border: 1px solid var(--ed-line); border-radius: 2px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
  position: relative;
}
.sw-choice::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 16px; height: 16px;
  margin-top: -8px; border-radius: 50%; border: 1.5px solid var(--ed-line2);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.sw-choice-wrap:hover .sw-choice { border-color: var(--ed-line2); }
.sw-choice-input:checked + .sw-choice {
  border-color: var(--ed-sage); background: var(--ed-sage-soft);
  box-shadow: inset 0 0 0 1px var(--ed-sage);
}
.sw-choice-input:checked + .sw-choice::after {
  border-color: var(--ed-sage); background: var(--ed-sage);
  box-shadow: inset 0 0 0 3px var(--ed-paper);
}
.sw-choice-input:focus-visible + .sw-choice { outline: 2px solid var(--ed-sage); outline-offset: 2px; }
.sw-choice-icon {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ed-sage-soft); color: var(--ed-sage-text); font-size: .9rem;
}
.sw-choice-text { display: flex; flex-direction: column; min-width: 0; }
.sw-choice-text strong { font-size: .88rem; font-weight: 600; color: var(--ed-ink); line-height: 1.3; }
.sw-choice-text small { font-size: .76rem; color: var(--ed-muted); line-height: 1.4; }

.sw-or {
  display: flex; align-items: center; gap: 16px; margin: 26px 0 18px;
  font-family: var(--ed-serif); font-size: 1.05rem; color: var(--ed-muted);
}
.sw-or::before, .sw-or::after { content: ""; flex: 1; height: 1px; background: var(--ed-line); }

.sw-keyword-hint { margin: 10px 0 0; color: var(--ed-muted); font-size: .8rem; line-height: 1.6; }
.sw-own { margin-top: 14px; }

/* ── Step 4: brief ── */
.sw-textarea-wrap { position: relative; }
.sw-textarea { min-height: 230px; resize: vertical; line-height: 1.75; padding: 18px 18px 34px; }
.sw-count {
  position: absolute; right: 14px; bottom: 10px;
  font-size: .72rem; color: var(--ed-muted); pointer-events: none;
}
.sw-count.is-short { color: var(--ed-danger); }
.sw-crafting {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: color-mix(in srgb, var(--ed-paper) 86%, transparent);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  color: var(--ed-ink2); font-weight: 600; font-size: .9rem; border-radius: 2px;
}
.sw-crafting .sw-spinner { color: var(--ed-sage); width: 20px; height: 20px; }
.sw-brief-tools {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-top: 12px;
}
.sw-starters { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-starter {
  background: transparent; border: 1px dashed var(--ed-line2); border-radius: 999px;
  padding: 6px 12px; font-size: .76rem; font-weight: 500; color: var(--ed-ink2); cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.sw-starter:hover { border-color: var(--ed-sage); border-style: solid; color: var(--ed-sage-text); }
.sw-starter:focus-visible { outline: 2px solid var(--ed-sage); outline-offset: 2px; }

/* ── Step 5: review + count ── */
.sw-summary { margin: 0 0 22px; border-top: 1px solid var(--ed-line); }
.sw-summary-row {
  display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 16px; align-items: baseline;
  padding: 11px 0; border-bottom: 1px solid var(--ed-line);
}
.sw-summary-row dt {
  font: 600 .66rem/1.4 var(--ed-sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ed-muted);
}
.sw-summary-row dd { margin: 0; color: var(--ed-ink); font-size: .92rem; font-weight: 500; min-width: 0; }
.sw-summary-brief {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  color: var(--ed-ink2); font-weight: 400; line-height: 1.6;
}
.sw-summary-edit {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: 600 .7rem/1 var(--ed-sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--ed-sage-text);
}
.sw-summary-edit:hover { text-decoration: underline; text-underline-offset: 4px; }

.sw-count-label { margin-bottom: 10px; }
.sw-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sw-counts .sw-choice { flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; }
.sw-counts .sw-choice::after { top: 18px; margin-top: 0; }
.sw-count-num { font-family: var(--ed-serif); font-size: 1.9rem; line-height: 1; color: var(--ed-ink); }
.sw-count-name { font-size: .84rem; font-weight: 600; color: var(--ed-ink); margin-top: 6px; }
.sw-count-desc { font-size: .74rem; color: var(--ed-muted); }
.sw-tag {
  display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 999px;
  background: var(--ed-sage-soft); color: var(--ed-sage-text);
  font-size: .6rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; vertical-align: middle;
}

/* ── Free runs left (anonymous visitors) ── */
.sw-ticks li.sw-runs-tick { color: var(--ed-ink2); }
.sw-ticks li.sw-runs-tick strong { color: var(--ed-sage-text); }
.sw-runs-note {
  display: flex; gap: 10px; align-items: baseline;
  margin: 14px 0 0; padding: 11px 14px; border-radius: 3px;
  background: var(--ed-sage-soft); color: var(--ed-ink2);
  font-size: .84rem; line-height: 1.55;
}
.sw-runs-note i { color: var(--ed-sage-text); }
.sw-runs-note strong { color: var(--ed-ink); }
.sw-runs-note a { color: var(--ed-sage-text); font-weight: 600; text-underline-offset: 3px; }
.sw-runs-note--last, .sw-runs-note--none { background: var(--ed-warn-bg); color: var(--ed-warn-ink); }
.sw-runs-note--last i, .sw-runs-note--none i,
.sw-runs-note--last strong, .sw-runs-note--none strong { color: var(--ed-warn-ink); }

/* ── History block below the card (signed-in users) ── */
body.sme-ed .history-section { padding-top: 8px; }
body.sme-ed .history-header h3 { font-family: var(--ed-serif); font-weight: 400; font-size: 1.6rem; }
body.sme-ed .history-header h3 i { color: var(--ed-sage-text); margin-right: 10px; font-size: 1.1rem; }
body.sme-ed .history-header span { font-size: .78rem; color: var(--ed-muted); }
body.sme-ed .history-item { background: var(--ed-panel); border-color: var(--ed-line); border-radius: 3px; }

/* ══════════════════════════════════════════════════════════════════════
   RESULTS PAGE
   ══════════════════════════════════════════════════════════════════════ */
.sr-wrap { padding: 116px 0 96px; min-height: 78vh; }
.sr-container { max-width: 980px; }
body.has-pickbar .sr-wrap { padding-bottom: 160px; }

.sr-head { margin-bottom: 30px; animation: sw-fade .9s ease both; }
.sr-title {
  margin: 0 0 12px;
  font-family: var(--ed-serif); font-weight: 400;
  font-size: clamp(2.2rem, 4.2vw, 3.3rem); line-height: 1.08; color: var(--ed-ink);
}
.sr-sub { margin: 0; max-width: 62ch; color: var(--ed-ink2); font-size: 1rem; line-height: 1.7; }
.sr-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.sr-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 13px; border-radius: 999px;
  background: var(--ed-paper); border: 1px solid var(--ed-line);
  font-size: .8rem; color: var(--ed-ink2);
}
.sr-chip i { color: var(--ed-sage-text); font-size: .78rem; }
.sr-edit { margin-left: 6px; }

/* Free runs left (anonymous visitors) */
.sr-runs {
  display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0;
  padding: 7px 13px; border-radius: 999px;
  background: var(--ed-sage-soft); color: var(--ed-sage-text);
  font-size: .82rem; font-weight: 600;
}
.sr-runs.is-last, .sr-runs.is-none { background: var(--ed-warn-bg); color: var(--ed-warn-ink); }
.sr-runs-banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 8px 0 0; padding: 20px 24px; border-radius: 4px;
  background: var(--ed-warn-bg); color: var(--ed-warn-ink);
}
.sr-runs-banner__icon { font-size: 1.2rem; }
.sr-runs-banner__text { flex: 1 1 280px; display: flex; flex-direction: column; gap: 2px; font-size: .92rem; }
.sr-runs-banner__text strong { font-family: var(--ed-serif); font-weight: 400; font-size: 1.25rem; }
.sr-runs-banner__actions { display: flex; align-items: center; gap: 18px; }
.sr-runs-banner__actions .sw-link { color: var(--ed-warn-ink); }

/* Loading */
.sr-loading {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px;
  background: var(--ed-panel); border-radius: 4px; padding: 44px 48px;
  box-shadow: var(--ed-shadow);
}
.sr-loading-status {
  margin: 0 0 6px;
  font-family: var(--ed-serif); font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.2; color: var(--ed-ink);
}
.sr-loading-sub { margin: 0; color: var(--ed-muted); font-size: .86rem; }
.sr-track { height: 3px; margin: 28px 0 0; background: var(--ed-line); border-radius: 3px; overflow: hidden; }
.sr-fill { height: 100%; width: 0; background: var(--ed-sage); border-radius: 3px; transition: width .5s ease; }
.sr-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.sr-steps li {
  display: flex; align-items: center; gap: 12px;
  font-size: .9rem; color: var(--ed-muted); transition: color .3s ease;
}
.sr-steps li::before {
  content: ""; flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--ed-line2); transition: all .3s ease;
}
.sr-steps li.is-active { color: var(--ed-ink); font-weight: 600; }
.sr-steps li.is-active::before {
  border-color: var(--ed-sage); box-shadow: inset 0 0 0 4px var(--ed-panel);
  background: var(--ed-sage); animation: sr-pulse 1.4s ease-in-out infinite;
}
.sr-steps li.is-done { color: var(--ed-ink2); }
.sr-steps li.is-done::before {
  border-color: var(--ed-sage); background: var(--ed-sage);
  box-shadow: inset 0 0 0 4px var(--ed-sage);
}
@keyframes sr-pulse { 50% { box-shadow: inset 0 0 0 4px var(--ed-panel), 0 0 0 5px var(--ed-sage-soft); } }

/* Brief recap + notices */
.sr-brief {
  margin: 0 0 22px; background: var(--ed-paper); border: 1px solid var(--ed-line); border-radius: 3px;
}
.sr-brief summary {
  list-style: none; cursor: pointer; padding: 15px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font: 600 .7rem/1 var(--ed-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ed-muted);
}
.sr-brief summary::-webkit-details-marker { display: none; }
.sr-brief summary i { transition: transform .2s ease; }
.sr-brief[open] summary i { transform: rotate(180deg); }
.sr-brief-text {
  margin: 0; padding: 0 20px 18px; white-space: pre-wrap;
  color: var(--ed-ink2); font-size: .9rem; line-height: 1.7;
}
.sr-notice {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 0 0 22px; padding: 14px 18px; border-radius: 3px;
  background: var(--ed-warn-bg); color: var(--ed-warn-ink); font-size: .9rem;
}
.sr-notice i { margin-top: 3px; }
.sr-notice small { display: block; font-size: .84rem; opacity: .9; }
.sr-pick-hint {
  display: flex; align-items: center; gap: 12px; margin: 0 0 18px;
  color: var(--ed-ink2); font-size: .95rem;
}
.sr-pick-hint i { color: var(--ed-sage-text); }

/* Idea cards (.ci* names are what the page script binds to) */
.ci {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 4px 20px;
  margin-bottom: 18px; padding: 32px 36px 28px 28px;
  background: var(--ed-panel); border: 1px solid transparent; border-radius: 4px;
  cursor: pointer; position: relative;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  animation: sw-rise .6s cubic-bezier(.2, .7, .2, 1) both;
}
.ci:hover { border-color: var(--ed-line2); }
.ci.is-selected { border-color: var(--ed-sage); box-shadow: 0 0 0 3px var(--ed-sage-soft), var(--ed-shadow); }
.ci-num {
  grid-row: 1 / span 6;
  font-family: var(--ed-serif); font-size: 2.6rem; line-height: 1; color: var(--ed-sage-text);
}
.ci-body { min-width: 0; }
.ci-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ci-title {
  margin: 0; font-family: var(--ed-serif); font-weight: 400;
  font-size: clamp(1.4rem, 2.4vw, 1.75rem); line-height: 1.2; color: var(--ed-ink);
}
.ci-tagline { margin: 8px 0 0; color: var(--ed-sage-text); font-weight: 600; font-size: .95rem; }
.ci-desc { margin: 14px 0 0; color: var(--ed-ink2); line-height: 1.75; font-size: .95rem; }
.ci-metrics {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 22px 0 0; border-top: 1px solid var(--ed-line); border-bottom: 1px solid var(--ed-line);
}
.ci-metric { padding: 14px 14px 14px 0; }
.ci-metric + .ci-metric { padding-left: 16px; border-left: 1px solid var(--ed-line); }
.ci-metric .k {
  font: 600 .62rem/1.3 var(--ed-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ed-muted);
}
.ci-metric .v { margin-top: 6px; font-size: .9rem; font-weight: 600; color: var(--ed-ink); line-height: 1.35; }
.badge-diff { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.diff-easy { background: rgba(94, 122, 118, .16); color: var(--ed-sage-text); }
.diff-medium { background: rgba(196, 140, 60, .16); color: #9a6a24; }
.diff-hard { background: rgba(161, 68, 47, .14); color: var(--ed-danger); }
body.sme-ed:not(.light-mode) .diff-medium { color: #f3cf96; }
.ci-sub-label {
  margin: 18px 0 8px;
  font: 600 .62rem/1.3 var(--ed-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ed-muted);
}
.ci-risks { display: flex; flex-wrap: wrap; gap: 6px; }
.ci-risk {
  padding: 5px 11px; border-radius: 999px; font-size: .78rem;
  background: var(--ed-paper); border: 1px solid var(--ed-line); color: var(--ed-ink2);
}
.ci-why {
  margin: 18px 0 0; padding: 2px 0 2px 16px; border-left: 2px solid var(--ed-sage);
  color: var(--ed-ink2); font-size: .9rem; line-height: 1.7;
}
.ci-why strong { color: var(--ed-ink); }
.ci-actions { display: flex; justify-content: flex-end; margin-top: 22px; }

.ci-select { flex-shrink: 0; cursor: pointer; display: inline-flex; margin-top: 4px; }
.ci-select input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ci-select-dot {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--ed-line2); background: var(--ed-paper);
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .2s ease;
}
.ci-select-dot::after {
  content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--ed-sage);
  transform: scale(0); transition: transform .2s ease;
}
.ci-select:hover .ci-select-dot { border-color: var(--ed-sage); }
.ci-select input:checked + .ci-select-dot { border-color: var(--ed-sage); }
.ci-select input:checked + .ci-select-dot::after { transform: scale(1); }
.ci-select input:focus-visible + .ci-select-dot { outline: 2px solid var(--ed-sage); outline-offset: 2px; }

.sr-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px; margin-top: 30px; }

.sr-message {
  max-width: 640px; margin: 10px auto 0; padding: 40px 36px; text-align: center;
  background: var(--ed-panel); border-radius: 4px; color: var(--ed-ink2);
}
.sr-message-icon { font-size: 1.6rem; color: var(--ed-danger); margin-bottom: 12px; }
.sr-message-title { margin: 0 0 6px; font-family: var(--ed-serif); font-size: 1.6rem; color: var(--ed-ink); }
.sr-message p { margin: 0 0 22px; }

/* Sticky pick bar → Business Plan Builder */
.idea-pickbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
  background: var(--ed-glass); border-top: 1px solid var(--ed-line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 -20px 40px -24px rgba(40, 30, 20, .35);
  animation: sr-pickbar-in .4s ease-out both;
}
.idea-pickbar__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 980px;
}
.idea-pickbar__text { display: flex; flex-direction: column; min-width: 0; }
.idea-pickbar__label {
  font: 600 .64rem/1.3 var(--ed-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ed-muted);
}
.idea-pickbar__title {
  font-family: var(--ed-serif); font-size: 1.2rem; color: var(--ed-glass-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.idea-pickbar__go { flex-shrink: 0; }
@keyframes sr-pickbar-in { from { transform: translateY(100%); } to { transform: none; } }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .sw-page, .sr-wrap { padding-top: 96px; }
  .sw-intro { grid-template-columns: 1fr; gap: 14px; margin-bottom: 28px; }
  .sw-card { grid-template-columns: 1fr; min-height: 0; }
  .sw-visual { height: 230px; min-height: 0; }
  .sw-visual::after { display: none; }
  .sw-brief { display: none; }
  .sw-panel { padding: 28px 26px 32px; }
  .sw-progress { margin-bottom: 32px; gap: 6px; }
  .sw-progress-name { display: none; }   /* the step eyebrow names the current step */
  .sr-loading { grid-template-columns: 1fr; padding: 32px 26px; gap: 28px; }
}
@media (max-width: 575.98px) {
  .sw-visual { height: 180px; }
  .sw-panel { padding: 24px 18px 26px; }
  .sw-fields-3 { grid-template-columns: 1fr; }
  .sw-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sw-choices { grid-template-columns: 1fr; }
  .sw-counts .sw-choice { padding: 12px; }
  .sw-count-desc { display: none; }
  .sw-budget { padding: 20px 18px 14px; }
  .sw-summary-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .sw-summary-row dt { grid-column: 1 / -1; }
  .sw-actions .sw-btn { flex: 1; padding-left: 18px; padding-right: 18px; }
  .ci { grid-template-columns: 1fr; padding: 24px 20px 22px; }
  .ci-num { grid-row: auto; font-size: 1.8rem; }
  .ci-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ci-metric:nth-child(3) { padding-left: 0; border-left: 0; }
  .ci-metric:nth-child(n+3) { border-top: 1px solid var(--ed-line); }
  .ci-actions .sw-btn { width: 100%; }
  .idea-pickbar__inner { flex-direction: column; align-items: stretch; gap: 10px; }
  .idea-pickbar__go { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .sw-intro, .sw-card, .sr-head, .ci, .idea-pickbar,
  .sw-step.is-entering > *, .sw-step.is-slow > * { animation: none !important; }
  .sw-photo { transition: opacity .2s ease; transform: none; }
  .sr-steps li.is-active::before { animation: none; }
}
