:root {
    --bg: #edf6f3;
    --bg-soft: #f5fbf8;
    --card: #ffffff;
    --ink: #102b28;
    --muted: #5f7470;
    --line: #dbe8e3;
    --accent: #087968;
    --accent-dark: #055f53;
    --accent-soft: #dff1ec;
    --warm: #f7e6bb;
    --peach: #f6d6ca;
    --shadow: 0 18px 45px rgba(16, 43, 40, 0.08);
    --radius: 24px;
    --radius-small: 14px;
    --max: 1120px;
    --bg: #E8F4F2;
    --bg-alt: #DFF0EE;
    --surface: #F4FAFA;
    --surface-2: #FFFFFF;
    --accent: #1A7A6E;
    --no: #bb1313;
    --accent-mid: #2A9D8F;
    --accent-light: #5BBFB5;
    --accent-ghost: rgba(26, 122, 110, 0.08);
    --accent-border: rgba(26, 122, 110, 0.15);
    --text-1: #0D1E1C;
    --text-2: #3A5C58;
    --text-3: #6B8C88;
    --border: rgba(13, 30, 28, 0.08);
    --shadow-sm: 0 2px 12px rgba(13, 30, 28, 0.06);
    --shadow-md: 0 8px 32px rgba(13, 30, 28, 0.10);
    --shadow-lg: 0 24px 64px rgba(13, 30, 28, 0.13);
    --silk: cubic-bezier(0.16, 1, 0.3, 1);
    --silk-dur: 0.8s;
    --radius: 16px;
    --radius-lg: 24px;
}

* {
    box-sizing: border-box;
}
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap');


body {
    margin: 0;
    font-family: 'DM Sans', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(207, 235, 225, 0.9), transparent 40%),
        var(--bg);
    color: var(--ink);
}

div#updateStatus {
    margin-top: 15px;
}

.iconheader h4 {
    margin: 0;
}

.iconheader .note-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
    /* gap: 8px; */
}

.iconheader {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
    max-height: fit-content;
}

body::selection {
    background: var(--accent-soft);
}

a {
    color: inherit;
}

button,
textarea {
    font: inherit;
}

.site-header {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.04em;
    font-size: 1.4rem;
}

.brand span {
    color: var(--accent);
}

.top-nav {
    display: none;
    gap: 32px;
    font-size: 0.95rem;
    color: var(--muted);
}

.top-nav a {
    text-decoration: none;
}

.header-button,
.primary-button {
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    padding: 0.85rem 1.25rem;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(8, 121, 104, 0.18);
}

.header-button {
    display: none;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
}

.primary-button:hover,
.header-button:hover {
    background: var(--accent-dark);
}

main {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 80px;
}

.input-section,
.results-hero {
    display: grid;
    gap: 28px;
    align-items: start;
}

.hero-copy {
    max-width: 620px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--accent-border);
    border-radius: 100px;
    padding: 6px 16px 6px 8px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}

.hero-badge-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
}

.hero-badge span {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-2);
}

.hero-badge strong {
    color: var(--accent);
}

.eyebrow,
.mini-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin: 18px 0 23px;
    font-size: clamp(2.4rem, 7vw, 3.8rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
}

h1 em {
    font-family: 'Playfair Display', serif;
    color: var(--accent);
    font-weight: 500;
    letter-spacing: -0.04em;
}

.hero-copy p,
.results-hero p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.input-card,
.loading-card,
.evidence-card,
.story-card,
.questions-list,
.followup-card,
.followup-prompts,
.extra-card,
.stop-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(219, 232, 227, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    /* background: var(--surface-2); */
    /* border: 1px solid var(--accent-border); */
}

.input-card,
.loading-card {
    padding: 24px;
}

label {
    display: block;
    margin: 0 0 8px;
    color: var(--ink);
    font-weight: 800;
}

textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 15px 16px;
    margin-bottom: 18px;
    min-height: 150px;
    background: #fbfefd;
    color: var(--ink);
}

textarea:focus {
    outline: 3px solid rgba(8, 121, 104, 0.14);
    border-color: var(--accent);
}

.small-note {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.loading-section {
    min-height: 55vh;
    display: grid;
    place-items: center;
}

.loading-card {
    max-width: 620px;
}

.loading-prep-card {
  width: min(680px, 100%);
  padding: 28px;
  overflow: hidden;
  position: relative;
}

.loading-prep-card::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(223, 241, 236, 0.95), transparent 68%);
  pointer-events: none;
}

.loading-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.loading-orb {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  position: relative;
}

.loading-orb::before,
.loading-orb::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid rgba(26, 122, 110, 0.18);
}

.loading-orb::after {
  inset: 2px;
  border-top-color: var(--accent);
  animation: loadingSpin 1.35s linear infinite;
}

.loading-orb span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(26, 122, 110, 0.09);
}

.loading-prep-card h2 {
  margin: 0 0 12px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.8rem, 5vw, 1.8rem);
  line-height: 1;
  letter-spacing: -0.03em;
  position: relative;
  z-index: 1;
}

.loading-prep-card > p {
  color: var(--muted);
  line-height: 1.6;
  max-width: 560px;
  position: relative;
  z-index: 1;
}

.loading-progress {
  height: 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  overflow: hidden;
  margin: 26px 0 22px;
  position: relative;
  z-index: 1;
}

.loading-progress-bar {
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transition: width 900ms ease;
}

.loading-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.loading-steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  line-height: 1.4;
  font-weight: 650;
}

.loading-steps li::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}

.loading-steps li.is-active {
  color: var(--ink);
}

.loading-steps li.is-active::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(26, 122, 110, 0.2);
}

.loading-steps li.is-complete::before {
  content: "✓";
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-color: rgba(26, 122, 110, 0.18);
  font-weight: 900;
}

.loading-note {
  margin-top: 22px;
}

@keyframes loadingSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 560px) {
  .loading-prep-card {
    padding: 22px;
  }

  .loading-steps li {
    grid-template-columns: 30px 1fr;
  }

  .loading-steps li::before {
    width: 30px;
    height: 30px;
  }
}

.results-section {
    display: grid;
    gap: 48px;
}

.results-hero {
    margin-top: 18px;
}

.evidence-card {
    padding: 22px;
}

.evidence-card h2 {
    margin-bottom: 18px;
    font-size: 1.1rem;
}

.evidence-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    align-items: center;
}

.evidence-item:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.evidence-item p {
    margin: 0;
    line-height: 1.45;
    color: var(--muted);
}

.icon-dot,
.note-icon {
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 900;
    font-size: 1.3rem;
}
.icon-dot-small {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 900;
    font-size: 1.3rem;
}
span.note-icon {}

.numbered-section {
    display: grid;
    gap: 18px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    letter-spacing: -0.01em;
    font-family: "Instrument Serif", Georgia, serif;
    font-weight: 600;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.stories-list {
    display: grid;
    gap: 20px;
}

.story-card {
    padding: 20px;
    display: grid;
    gap: 30px;
}

.story-main h3 {
    margin: 16px 0 0;
    font-size: clamp(1.25rem, 4vw, 1.2rem);
    line-height: 1.3;
    letter-spacing: -0.05em;
}

.story-meta {
    display: grid;
    gap: 40px;
}

.meta-label {
    display: block;
    margin-bottom: 25px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.story-meta p {
    margin: 0;
    line-height: 1.45;
}

.confidence-pill,
.tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 0.42rem 0.72rem;
    font-size: 0.82rem;
    font-weight: 750;
}

.confidence-strong {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.confidence-usable {
    background: var(--warm);
    color: #654c12;
}

.confidence-detail {
    background: var(--peach);
    color: #78422f;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: #edf4f1;
    color: var(--muted);
}

.story-notes {
    border-top: 1px solid var(--line);
    padding-top: 18px;
    display: grid;
    gap: 55px;
}

.note-block {
    display: flex;
    gap: 20px;
    align-items: center;
}

.note-block h4,
.story-detail-grid h4 {
    margin: 0 0 4px;
    color: var(--accent-dark);
    /* font-size: 0.9rem; */
}

.note-block p,
.story-detail-grid p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
    /* font-size: 0.95rem; */
    /* font-weight: 500; */
}

.story-details {
    /* border-top: 1px solid var(--line); */
    /* padding-top: 14px; */
}

.story-details summary {
    list-style: none;
    cursor: pointer;
    color: var(--accent-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 200px;
    border-radius: 15px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    padding: 0.5rem 1rem;
    transition: background 180ms ease, border-color 180ms ease;
    font-size: 0.9rem;
}

.story-details summary::-webkit-details-marker {
    display: none;
}

.story-details summary:hover {
    /* background: var(--accent-soft); */
    border-color: rgba(8, 121, 104, 0.2);
}

.summary-chevron {
    /* width: 28px; */
    /* height: 28px; */
    /* display: grid; */
    place-items: center;
    border-radius: 50%;
    /* background: white; */
    color: var(--accent);
    font-size: 1rem;
    line-height: 1;
    transition: transform 180ms ease;
}

.story-details[open] .summary-chevron {
    transform: rotate(180deg);
}

.story-detail-grid {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.detail-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    /* font-size: 0.9rem; */
    /* font-weight: 500; */
}

.detail-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 900;
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.detail-problem .detail-icon {
    background: var(--peach);
    color: #78422f;
}

.detail-action .detail-icon {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.detail-result .detail-icon {
    background: var(--accent-soft);
    /* color: #654c12; */
}

.detail-card h4 {
    margin: 0 0 5px;
    color: var(--accent-dark);
    font-size: 0.88rem;
    font-weight: 850;
}

.detail-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.questions-list {
    overflow: hidden;
}

.question-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    padding: 20px;
    border-top: 1px solid var(--line);
}

.question-row:first-child {
    border-top: 0;
}

.checkbox-icon {
    width: 24px;
    height: 24px;
    /* border: 2px solid var(--accent); */
    color: var(--accent);
    display: grid;
    place-items: center;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-top: 2px;
    font-weight: 700;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 900;
    font-size: 1.3rem;
}

.question-text h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 600;
}

.question-text p {
    margin: 4px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.followup-grid {
    display: grid;
    gap: 18px;
}

.full-width {
    grid-column: 1 / -1;
}

.followup-prompts {
    padding: 20px;
    display: grid;
    gap: 10px;
}

.readiness-card {
  background: transparent;
  display: grid;
  gap: 18px;
  min-height: 100%;
  align-content: top;
}

.readiness-main {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.readiness-main h3 {
  margin: 4px 0 8px;
  font-size: 1.2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.readiness-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.readiness-icon {
  margin-top: 4px;
}

.readiness-next-prompts {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: grid;
  gap: 8px;
}

.readiness-next-prompts h4 {
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 850;
}

.prompt-chip-compact {
  padding-top: 10px;
  padding-bottom: 10px;
}

.update-loading-card {
  position: relative;
}

.update-loading-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.update-loading-heading h4 {
  margin: 0;
}

.update-loading-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: loadingSpin 900ms linear infinite;
  flex: 0 0 auto;
}

.review-stories-button {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--accent-dark);
  padding: 0.65rem 1rem;
  font-weight: 800;
  cursor: pointer;
}

.review-stories-button:hover {
  background: var(--accent-soft);
  border-color: rgba(26, 122, 110, 0.22);
}

.story-memory-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.story-memory-note summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 850;
}

.story-memory-note ul {
  margin-top: 12px;
}

.story-memory-note li span {
  display: block;
  margin-top: 3px;
}

.prompt-chip {
    border: 0;
    text-align: left;
    background: transparent;
    border-bottom: 1px solid var(--line);
    padding: 12px 4px;
    color: var(--ink);
    cursor: pointer;
    line-height: 1.45;
    display: flex;
    gap: 20px;
    align-items: center;
}

span.prompt-icon {
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 900;
    font-size: 1.3rem;
}

.prompt-chip:last-child {
    border-bottom: 0;
}

.prompt-chip:hover {
    color: var(--accent);
}

.followup-card {
    padding: 18px;
}

.followup-card textarea {
    min-height: 130px;
}

.extra-card {
    padding: 0;
    overflow: hidden;
}

.extra-prep-section {
  display: grid;
  gap: 20px;
}

.extra-section-heading {
  display: grid;
  gap: 16px;
  align-items: center;
}

.extra-preview-grid {
  display: grid;
  gap: 16px;
  align-items: stretch;
}

.extra-preview-card {
  height: 100%;
  min-height: 190px;
  display: flex;
  flex-direction: column;
}

.extra-preview-card summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  gap: 20px;
  align-items: center;
  height: 100%;
}

.extra-preview-card summary::-webkit-details-marker {
  display: none;
}

.extra-preview-copy {
  display: block;
}

.extra-preview-details {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.extra-preview-details p,
.extra-preview-details li {
  line-height: 1.5;
}

.extra-preview-details ul {
  margin: 0;
  padding-left: 1.2rem;
}

.extra-preview-card[open] summary {
  height: auto;
}

.extra-toggle-button[aria-expanded="true"] .extra-toggle-chevron {
  transform: rotate(180deg);
}
.extra-preview-grid {
  display: grid;
  gap: 16px;
  align-items: stretch;
}

.extra-prep-card {
  height: 100%;
  min-height: 190px;
  display: flex;
  flex-direction: column;
}

.extra-prep-card summary {
  flex: 1;
}
/* Extra prep expand-all button */
.extra-toggle-button {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--bg-soft);
  color: var(--accent-dark);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 200px;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.extra-toggle-button:hover {
  border-color: rgba(8, 121, 104, 0.2);
  background: var(--accent-soft);
}

.extra-toggle-button[aria-expanded="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.extra-toggle-chevron {
  display: inline-block;
  line-height: 1;
  color: currentColor;
  transition: transform 180ms ease;
}

.extra-toggle-button[aria-expanded="true"] .extra-toggle-chevron {
  transform: rotate(180deg);
}

@media (max-width: 560px) {
  .extra-toggle-button {
    width: fit-content;
  }
}

@media (min-width: 760px) {
  .extra-section-heading {
    grid-template-columns: 1fr auto;
  }

  .extra-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .extra-preview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Fix extra prep open-card spacing */
#extraPrepCards.extra-preview-grid {
  align-items: stretch;
}

#extraPrepCards .extra-prep-card {
  height: 100%;
  min-height: 0;
  display: block;
}

#extraPrepCards .extra-prep-card summary {
  flex: none;
  height: auto;
  display: block;
  flex: none;
  height: auto;
  min-height: 135px;
  display: block;
  padding: 22px;
}

#extraPrepCards .extra-prep-card[open] summary {
  min-height: 0;
}

#extraPrepCards .extra-card-details {
  margin-top: 0;
}
.stop-card {
  display: grid;
  gap: 24px;
  background:
    radial-gradient(circle at top left, rgba(223, 241, 236, 0.95), transparent 42%),
    rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(8, 121, 104, 0.22);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  overflow: hidden;
}

.stop-illustration {
  display: none;
}

.stop-content h3 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.3rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.stop-content p {
  margin: 4px 0 0;
  font-weight: 750;
  color: var(--ink);
}

.stop-steps {
  counter-reset: stop-step;
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.stop-steps li {
  counter-increment: stop-step;
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
  color: var(--ink);
  font-weight: 750;
  line-height: 1.35;
}

.stop-steps li::before {
  content: counter(stop-step);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(16, 43, 40, 0.08);
  display: grid;
  place-items: center;
  font-weight: 850;
  color: var(--ink);
  z-index: 1;
}

.stop-steps li::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 42px;
  bottom: -18px;
  border-left: 2px dotted rgba(8, 121, 104, 0.22);
}

.stop-steps li:last-child::after {
  display: none;
}

@media (min-width: 760px) {
  .stop-card {
    grid-template-columns: 180px 1fr;
    align-items: center;
    padding: 32px;
  }

  .stop-illustration {
    display: block;
    /* width: 160px; */
    /* height: 120px; */
    /* border-radius: 50%; */
    /* background:
      radial-gradient(circle, rgba(8, 121, 104, 0.55) 0 8%, transparent 9%),
      repeating-radial-gradient(circle, rgba(8, 121, 104, 0.18) 0 12px, rgba(255, 255, 255, 0.55) 12px 26px); */
    /* opacity: 0.95; */
  }

  .stop-illustration img {
    width: 100%;
    height: auto;
    display: block;
  }

  .stop-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    margin-top: 34px;
  }

  .stop-steps li {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 12px;
    padding: 0 10px;
    font-size: 0.92rem;
  }

  .stop-steps li::before {
    width: 48px;
    height: 48px;
  }

  .stop-steps li::after {
    left: calc(50% + 24px);
    top: 24px;
    bottom: auto;
    width: calc(100% - 48px);
    border-left: 0;
    border-top: 2px dotted rgba(8, 121, 104, 0.22);
  }

  .stop-steps li:last-child::after {
    display: none;
  }
}

[hidden] {
    display: none !important;
}

@media (min-width: 760px) {
    .header-button {
        display: inline-flex;
    }

    .input-section,
    .results-hero {
        grid-template-columns: 1fr 1fr;
    }

    .followup-grid {
        grid-template-columns: 0.9fr 1.1fr;
    }

      .story-meta {
        grid-template-columns: repeat(3, 1fr);
    }

    .story-notes {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 980px) {
    .top-nav {
        display: flex;
    }

    .story-card {
        grid-template-columns: minmax(220px, 1fr) 3fr;
        align-items: start;
    }

    .story-main {
        grid-row: auto;
    }

    .story-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: start;
    }

    .story-notes {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .story-notes {
        /* background: var(--bg-soft); */
        /* border-radius: 18px; */
        /* padding: 16px; */
    }

    .story-details {
        grid-column: 1 / -1;
    }

    .story-detail-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .question-row {
        grid-template-columns: auto 1fr;
    }

    .question-text {
        display: grid;
        grid-template-columns: 1.4fr 0.8fr 1.2fr;
        gap: 60px;
        align-items: start;
    }

    .question-text h3,
    .question-text p {
        margin: 0;
    }

}
/*improve*/
.prompt-chip-copy {
  display: grid;
  gap: 4px;
}

.prompt-chip-label {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 850;
}

/* Extra prep cards: generated from the actual prep pack and expanded in place */
.extra-prep-section {
  display: grid;
  gap: 18px;
}

.extra-preview-grid {
  display: grid;
  gap: 16px;
  align-items: start;
}

.extra-prep-card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(219, 232, 227, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.extra-prep-card summary {
  list-style: none;
  cursor: pointer;
  /* display: grid; */
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
}

.extra-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.extra-prep-card summary::-webkit-details-marker {
  display: none;
}

.extra-prep-card .note-icon {
  width: 50px;
  height: 50px;
}

.extra-card-copy {
  display: grid;
  gap: 8px;
}

.extra-card-title {
  font-weight: 850;
  color: var(--ink);
  line-height: 1.15;
}

.extra-card-summary {
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.95rem;
}

.extra-card-details {
  border-top: 1px solid var(--line);
  padding: 20px;
}

.extra-card-details ul {
  margin: 0;
  padding-left: 1.1rem;
}

.extra-card-details li,
.extra-card-details p {
  color: var(--muted);
  line-height: 1.5;
}

.extra-card-details li + li {
  margin-top: 10px;
}

.extra-card-details p {
  margin: 0;
}

.weak-area-block + .weak-area-block {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.extra-prep-card[open] .summary-chevron {
  transform: rotate(180deg);
}

@media (min-width: 760px) {
  .extra-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .extra-preview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .extra-prep-card summary {
    grid-template-columns: auto 1fr;
    gap: 14px;
  }

  .extra-prep-card .summary-chevron {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .extra-card-details {
    padding: 18px 18px 20px 18px;
  }
}

/* Make show/hide detail controls feel more clickable */
.extra-toggle-button,
.story-details summary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 10px 24px rgba(8, 121, 104, 0.16);
}

.extra-toggle-button:hover,
.story-details summary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: white;
}

.extra-toggle-button[aria-expanded="true"],
.story-details[open] summary {
  background: var(--bg-soft);
  color: var(--accent-dark);
  color: var(--accent-dark);
}

.story-details summary .summary-chevron,
.extra-toggle-chevron {
  color: currentColor;
}

.save-pack-actions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
}

.save-pack-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.save-pack-button {
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: white;
  padding: 0.72rem 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(8, 121, 104, 0.14);
}

.save-pack-button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.save-pack-button-secondary {
  background: var(--bg-soft);
  color: var(--accent-dark);
  border-color: var(--line);
  box-shadow: none;
}

.save-pack-button-secondary:hover {
  background: var(--accent-soft);
  border-color: rgba(8, 121, 104, 0.22);
  color: var(--accent-dark);
}

.save-pack-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* ── Calm reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 700ms var(--silk, cubic-bezier(0.16, 1, 0.3, 1)),
    transform 700ms var(--silk, cubic-bezier(0.16, 1, 0.3, 1));
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 90ms;
}

.reveal-delay-2 {
  transition-delay: 180ms;
}

.reveal-delay-3 {
  transition-delay: 270ms;
}

.reveal-delay-4 {
  transition-delay: 360ms;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

