/* Stories (pages/stories.mjs). Loaded only on /stories pages; uses the site.css tokens.
   This file loads BEFORE site.css (layout() puts `head` first), so rules that override site.css need a higher specificity. */

/* Label: "Illustrative example. Not a real user." Must stay visible and readable. */
.story-label { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; padding: 8px 14px; border-radius: 999px; background: #fff4d9; border: 1px solid #f1d58c; color: #4b3716; font-size: .9375rem; font-weight: 600; line-height: 1.35; }
.story-label svg { flex: 0 0 auto; }
.story-label--real { background: var(--lav-100); border-color: var(--lav-200); color: var(--ink); }

/* Hub */
.story-filter[hidden] { display: none; }
.story-filter .chip { cursor: pointer; font: inherit; font-size: .9375rem; font-weight: 500; }
.story-group-head { max-width: 760px; margin-bottom: clamp(20px, 3vw, 32px); }
.story-group-head h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); letter-spacing: -.025em; margin-bottom: 8px; }
.story-group-head p { margin: 0; color: var(--ink-2); }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); margin: 0; padding: 0; list-style: none; }
.story-card-wrap { min-width: 0; display: flex; }
.story-card-wrap[hidden] { display: none; }
.story-grid .story-card { display: flex; flex-direction: column; width: 100%; padding: 0 0 24px; overflow: hidden; }
.story-grid .story-card > :not(.story-card-img) { margin-left: 22px; margin-right: 22px; }
.story-card-img { position: relative; margin: 0 0 16px; aspect-ratio: 3 / 2; background: var(--lav-50); }
.story-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-card-tag { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.story-card-label { align-self: flex-start; margin-bottom: 10px; padding: 3px 10px; border-radius: 999px; background: #fff4d9; color: #4b3716; font-size: .8125rem; font-weight: 600; }
.story-card-label--real { background: var(--lav-100); color: var(--ink); }
.story-card-name { color: var(--ink-3); font-size: .9375rem; font-weight: 500; margin-bottom: 4px; }
.story-grid .story-card .story-stat { margin-top: 4px; margin-bottom: 8px; color: var(--purple-strong); font-weight: 700; font-size: 1.05rem; line-height: 1.35; }
.story-card .text-link { margin-top: auto; padding-top: 8px; color: var(--purple-strong); }
.story-empty { padding: clamp(24px, 4vw, 40px); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); text-align: center; }
.story-empty h3 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); margin-bottom: 8px; }
.story-empty p { margin: 0 auto 16px; max-width: 56ch; color: var(--ink-2); }
.story-empty p:last-child { margin-bottom: 0; }
.story-none { margin: 20px 0 0; color: var(--ink-2); }

/* Journey page */
.story-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: clamp(28px, 4vw, 56px); align-items: center; }
.story-hero-grid--text { grid-template-columns: minmax(0, 1fr); }
.story-hero h1 { margin-top: 10px; }
.story-who { margin: 14px 0 0; font-size: 1.125rem; font-weight: 600; color: var(--ink); }
.story-who span { color: var(--ink-3); font-weight: 400; font-size: .9375rem; }
.story-stat-box { margin-top: 20px; padding: 16px 20px; border-radius: var(--radius-md); background: #fff; border: 1px solid var(--lav-200); box-shadow: var(--shadow-soft); max-width: 460px; }
.story-stat-kicker { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.story-stat-box strong { font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); color: var(--purple-strong); line-height: 1.3; }
.story-hero-photo { margin: 0; }
.story-hero-photo img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.story-hero-photo figcaption { margin-top: 8px; font-size: .8125rem; color: var(--ink-3); }
.story-help { display: grid; gap: 14px; }
.story-help-item { padding: 18px 20px; border-radius: var(--radius-md); background: var(--lav-50); border: 1px solid var(--lav-200); }
.prose .story-help-item h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--ink); }
.story-help-item p { margin: 0; }
.prose .story-day { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--lav-200); }
.prose .story-day li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; margin: 0; padding: 10px 0 10px 18px; position: relative; }
.story-day li::before { content: ""; position: absolute; left: -6px; top: 17px; width: 10px; height: 10px; border-radius: 50%; background: var(--purple); }
.story-time { font-weight: 700; color: var(--ink); }
.prose .story-features { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.prose .story-features li { margin: 0; }
.story-features a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; border-radius: var(--radius-md); border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink-2); font-size: .9375rem; }
.story-features a:hover { border-color: var(--lav-200); box-shadow: var(--shadow-soft); }
.story-features strong { color: var(--purple-strong); font-size: 1rem; }
.prose .story-related { padding: 0; }
.prose .story-related li { margin: 0; }

/* Share form */
.story-form { max-width: 760px; margin: 0 auto; }
.story-form .field input, .story-form textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; font: inherit; font-size: 1rem; color: var(--ink); }
.story-form textarea { resize: vertical; min-height: 110px; margin-top: 6px; line-height: 1.5; }
.story-form .field input:focus, .story-form textarea:focus, .story-check input:focus-visible { outline: 3px solid var(--purple); outline-offset: 1px; border-color: var(--purple); }
.story-form .field--wide, .story-form .story-checks, .story-form .story-form-status, .story-form .muted { grid-column: 1 / -1; }
.story-checks { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; }
.story-checks legend { font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.story-check { display: flex; gap: 10px; align-items: flex-start; font-size: .9875rem; color: var(--ink-2); cursor: pointer; }
.story-check input { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--purple); }
.story-form-status { margin: 0; min-height: 1em; color: #a3261b; font-weight: 500; }
.story-form-status:empty { display: none; }
.story-form .muted { margin: 0; }
.story-form + .prose { margin-top: clamp(40px, 6vw, 64px); }

@media (max-width: 1000px) { .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .story-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .story-hero-photo { order: -1; }
}
@media (max-width: 640px) {
  .story-grid { grid-template-columns: minmax(0, 1fr); }
  .story-form { grid-template-columns: minmax(0, 1fr); }
  .story-form > .field { grid-column: 1 / -1; }
}
