/* Kiki's Reset Room — story reading experience
   Scoped to generated story pages so shared site styles remain untouched. */

.story-page .story-hero {
  padding-block: var(--krr-section-pad-compact);
}

.story-page .story-hero__inner {
  margin: 0 auto;
}

.story-page .story-hero h1 {
  width: 100%;
  max-width: none;
  font-size: clamp(48px, 5vw, 72px);
  line-height: 1.01;
  letter-spacing: -0.04em;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: wrap;
}

.story-page .story-subtitle {
  max-width: 880px;
  margin: 22px 0 18px;
  font-size: clamp(24px, 2.45vw, 32px);
  line-height: 1.38;
}

.story-page .story-quick-reset {
  position: relative;
  width: min(calc(100% - 48px), 920px);
  margin: clamp(34px, 5vw, 56px) auto 0;
  padding: clamp(24px, 4vw, 38px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 4px solid var(--rose);
  border-radius: 0 0 22px 22px;
  background: var(--surface-warm);
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--rose) 16%, transparent), transparent 35%),
    linear-gradient(135deg, var(--surface-glow), var(--surface-warm));
  box-shadow: 0 18px 40px rgba(62, 22, 29, 0.10);
}

.story-page .story-quick-reset__kicker {
  margin: 0 0 8px;
  color: var(--deep-rose);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.story-page .story-quick-reset h2 {
  margin: 0;
  color: var(--cocoa);
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.story-page .story-quick-reset__answer {
  max-width: 72ch;
  margin: 12px 0 22px;
  color: var(--text);
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.62;
  text-wrap: pretty;
}

.story-page .story-quick-reset__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
}

.story-page .story-quick-reset__steps li {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border: 1px solid color-mix(in srgb, var(--rose) 38%, var(--line));
  border-radius: 13px;
  background: var(--surface-glow);
  background: color-mix(in srgb, var(--surface-glow) 88%, transparent);
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(14px, 1vw, 16px);
  font-weight: 600;
  list-style-position: inside;
  line-height: 1.5;
}

.story-page .story-quick-reset__steps li::marker {
  color: var(--deep-rose);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
}

.story-page .story-layout {
  width: min(calc(100% - 48px), 820px);
  margin: clamp(30px, 4vw, 44px) auto clamp(48px, 6vw, 72px);
}

.story-page .story-body {
  font-size: clamp(20px, 1.35vw, 23px);
  line-height: 1.72;
}

.story-page .story-body p {
  margin: 0 0 1.32em;
  text-wrap: pretty;
}

.story-page .story-body a:not(.button) {
  color: var(--deep-rose);
  font-weight: 700;
  text-decoration-line: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.story-page .story-body a:not(.button):hover,
.story-page .story-body a:not(.button):focus-visible {
  color: var(--cocoa);
  text-decoration-thickness: 2px;
}

.story-page .story-body h2 {
  letter-spacing: -0.025em;
}

.story-page .story-body h3 {
  letter-spacing: -0.02em;
}

.story-page .story-body :is(h2, h3, h4) + p {
  margin-top: 0;
}

.story-page .story-body blockquote {
  margin: 1.65em 0;
  padding: clamp(18px, 3vw, 26px);
}

.story-page .story-body blockquote p {
  font-size: clamp(22px, 2.25vw, 28px);
  line-height: 1.45;
}

/* Reset Shelf recommendations are owned exclusively by reset-shelf.css.
   Keeping the component out of this general story stylesheet prevents
   cascade conflicts during broad stylesheet cleanups. */

.story-page .story-body ul,
.story-page .story-body ol {
  margin: 0 0 1.25em;
}

.story-page .story-body li {
  margin-bottom: 0.42em;
}

.story-page .story-body hr {
  margin: 2.35em auto;
}

.story-page .story-body img,
.story-page .story-body figure {
  margin-top: 1.8em;
  margin-bottom: 1.8em;
}

.story-page .story-body figure img {
  margin: 0;
}

.story-page .story-signoff {
  margin-top: 44px;
  padding-top: 24px;
}

.story-page .story-author-note {
  margin-top: 30px;
  padding: clamp(18px, 3vw, 24px);
  background: linear-gradient(105deg, var(--surface-glow), var(--surface-warm));
  border: 1px solid var(--line);
  border-left: 4px solid var(--rose);
  border-radius: 0 16px 16px 0;
}

.story-page .story-author-note p:last-child {
  margin: 0;
  color: var(--text);
  font-size: clamp(16px, 1vw, 17px);
  line-height: 1.65;
}

@media (max-width: 980px) {
  .story-page .story-hero {
    padding-inline: clamp(20px, 4vw, 36px);
  }

  .story-page .story-layout {
    width: min(calc(100% - 40px), 820px);
  }
}

/* On story pages, the current title is already the H1 directly below the trail.
   Hiding that redundant fourth crumb on small screens prevents long titles from
   collapsing into a one-character-wide column. */
@media (max-width: 900px) {
  body[data-content-slug] .breadcrumbs ol {
    width: max-content;
    min-width: 100%;
  }

  body[data-content-slug] .breadcrumbs li:last-child {
    display: none;
  }
}

@media (max-width: 620px) {

  .story-page .story-hero h1 {
    font-size: clamp(40px, 11vw, 54px);
    line-height: 1.04;
    letter-spacing: -0.035em;
    text-wrap: wrap;
  }

  .story-page .story-subtitle {
    margin-top: 18px;
    font-size: clamp(22px, 6.5vw, 28px);
  }

  .story-page .story-quick-reset {
    width: min(calc(100% - 36px), 920px);
    margin-top: 30px;
    padding: 22px 18px;
    border-radius: 0 0 18px 18px;
  }

  .story-page .story-quick-reset__answer {
    margin-bottom: 18px;
    font-size: 18px;
  }

  .story-page .story-quick-reset__steps {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .story-page .story-layout {
    width: min(calc(100% - 36px), 820px);
    margin-top: 38px;
  }

  .story-page .story-body {
    font-size: 19px;
    line-height: 1.7;
  }

  .story-page .story-body p {
    margin-bottom: 1.22em;
  }

}

/* Approved Reading Room story responsive layout.
   This file is the single page-specific authority for desktop and mobile. */

.story-page .story-hero {
  padding-inline: clamp(20px, 3vw, 48px);
}

.story-page .story-hero__inner {
  width: min(100%, 1500px);
  max-width: none;
  margin-inline: auto;
}

.story-page .story-hero h1.story-title {
  width: 100%;
  max-width: none;
  margin: 0;
  line-height: 1.02;
  letter-spacing: -0.035em;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: wrap;
}

/* The title scale is assigned automatically during the site build. */
.story-page .story-hero h1.story-title--short {
  font-size: clamp(46px, 4.15vw, 58px);
}

.story-page .story-hero h1.story-title--medium {
  font-size: clamp(44px, 3.9vw, 54px);
}

.story-page .story-hero h1.story-title--long {
  font-size: clamp(42px, 3.6vw, 50px);
}

.story-page .story-hero h1.story-title--xlong {
  font-size: clamp(40px, 3.3vw, 46px);
}

/* Article section headings should read like a continuous editorial story,
   not like a stack of separate landing-page sections. */
.story-page .story-body h2,
.story-page .story-body h3,
.story-page .story-body h4 {
  width: 100%;
  max-width: none;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: wrap;
}

.story-page .story-body h2 {
  margin: 1.5em 0 0.4em;
  font-size: clamp(31px, 2.6vw, 38px);
  line-height: 1.14;
}

.story-page .story-body h3 {
  margin: 1.4em 0 0.36em;
  font-size: clamp(26px, 2.2vw, 31px);
  line-height: 1.18;
}

.story-page .story-body h4 {
  margin: 1.32em 0 0.34em;
  font-size: clamp(22px, 1.9vw, 27px);
  line-height: 1.22;
}

@media (max-width: 980px) {
  .story-page .story-hero h1.story-title--short {
    font-size: clamp(44px, 6.2vw, 56px);
  }

  .story-page .story-hero h1.story-title--medium {
    font-size: clamp(42px, 5.8vw, 52px);
  }

  .story-page .story-hero h1.story-title--long {
    font-size: clamp(40px, 5.4vw, 48px);
  }

  .story-page .story-hero h1.story-title--xlong {
    font-size: clamp(38px, 5vw, 44px);
  }
}

@media (max-width: 620px) {
  .story-page .story-hero {
    padding: 40px 18px 34px;
  }

  .story-page .story-hero h1.story-title,
  .story-page .story-hero h1.story-title--short,
  .story-page .story-hero h1.story-title--medium,
  .story-page .story-hero h1.story-title--long,
  .story-page .story-hero h1.story-title--xlong {
    font-size: clamp(38px, 10.5vw, 48px);
    line-height: 1.04;
    letter-spacing: -0.03em;
  }

  .story-page .story-body h2 {
    margin-top: 1.45em;
    font-size: clamp(29px, 8vw, 35px);
  }

  .story-page .story-body h3 {
    margin-top: 1.36em;
    font-size: clamp(25px, 7vw, 30px);
  }

  .story-page .story-body h4 {
    font-size: clamp(22px, 6.2vw, 26px);
  }
}
