/* Long-form essay composition: seven numbered chapters, pull quotes that break the measure,
   one dark band for the turning point, and a staircase for the skill ladder. */

.page-story { background: var(--paper); }
.on-dark { background: var(--navy-deep); color: #eef3f5; }

/* masthead */
.mast { border-bottom: 1px solid var(--line); background: var(--paper); }
.mast-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; }
.mast-name { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; }
.mast-nav { display: flex; gap: 22px; font: 500 13px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.mast-nav a { text-decoration: none; color: var(--teal); }
.mast-nav a:hover { text-decoration: underline; }

/* opening */
.opening { padding: 72px 0 40px; }
.opening-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.opening h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); letter-spacing: -0.045em; max-width: 14ch; }
.opening h1 span { color: var(--ember); display: block; }
.opening-lede { font-size: 1.2rem; max-width: 52ch; margin: 22px 0 0; }
.opening-lede + .opening-lede { margin-top: 12px; color: var(--muted); }
.portrait-frame { margin: 0; position: relative; justify-self: center; width: min(340px, 100%); }
.portrait-frame::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 2px solid var(--navy); border-radius: var(--radius); }
.portrait-frame img { position: relative; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); filter: saturate(0.95); }
.chapters-nav { margin-top: 56px; border-top: 2px solid var(--navy); padding-top: 14px; }
.chapters-nav ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 26px; }
.chapters-nav a { text-decoration: none; font-weight: 600; font-size: 15px; display: inline-flex; gap: 8px; align-items: baseline; }
.chapters-nav a span { font: 500 12px var(--mono); color: var(--ember); letter-spacing: 0.06em; }
.chapters-nav a:hover { color: var(--teal); }

/* chapters */
.chapter { padding: 72px 0; border-top: 1px solid var(--line); scroll-margin-top: 8px; }
.chapter-grid { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 32px; }
.ch-num { font: 700 4.6rem/0.9 var(--display); letter-spacing: -0.05em; color: var(--tan); -webkit-text-stroke: 1.5px var(--ember); margin: 0; position: sticky; top: 24px; align-self: start; }
.ch-body { max-width: 66ch; }
.ch-body h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -0.035em; margin-bottom: 22px; }
.ch-body p { font-size: 1.1rem; line-height: 1.7; }
.ch-body a { color: var(--teal); font-weight: 600; }
.drop::first-letter { float: left; font: 700 4.2rem/0.82 var(--display); color: var(--ember); margin: 6px 10px 0 0; }
.aside-line { font-family: var(--display); font-weight: 700; font-size: 1.3rem !important; letter-spacing: -0.02em; border-left: 4px solid var(--teal); padding-left: 16px; }
.last-line { font-family: var(--display); font-weight: 500; font-size: 1.5rem !important; line-height: 1.35 !important; letter-spacing: -0.02em; margin-top: 28px; }

/* pull quotes break the measure */
.pull { margin: 34px 0; padding: 0; width: min(78ch, calc(100vw - 32px)); }
.pull p { font: 700 clamp(1.5rem, 3.2vw, 2.2rem)/1.2 var(--display) !important; letter-spacing: -0.03em; margin: 0; }
.pull p::before { content: ""; display: block; width: 56px; height: 4px; background: var(--ember); margin-bottom: 16px; }
.pull.big p { font-size: clamp(1.8rem, 4.4vw, 3rem) !important; color: #fff; }

/* the turning point */
.truck { background: radial-gradient(120% 120% at 100% 0%, var(--navy-2), var(--navy-deep) 60%); border-top: 0; }
.truck .ch-num { color: var(--navy-deep); -webkit-text-stroke-color: var(--teal-bright); }
.truck .ch-body p { color: #d7e6ea; }
.truck strong { color: #fff; }

/* one counted fact */
.fact { margin: 28px 0; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-hard); max-width: 560px; }
.fact p { margin: 0; }
.fact-num { font: 700 2.4rem/1 var(--display) !important; letter-spacing: -0.04em; }
.fact-what { font-weight: 600; margin-top: 6px !important; font-size: 1rem !important; }
.fact-how { font-size: 14.5px !important; color: var(--muted); margin-top: 8px !important; line-height: 1.55 !important; }

/* a testimonial sitting inside the story */
.inline-voice { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; align-items: center; margin: 32px 0 0; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.inline-voice .player { max-height: 320px; }
.inline-voice blockquote { font-size: 1.2rem; }

/* the skill ladder, drawn as a staircase */
.ladder-band { background: var(--tan); padding: 72px 0; }
.ladder-band h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -0.03em; }
.stair { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); align-items: end; gap: 6px; min-height: 300px; }
.stair li { background: var(--paper); border: 1.5px solid var(--navy); border-bottom-width: 4px; border-radius: var(--radius) var(--radius) 0 0; padding: 10px 8px; font: 500 12.5px/1.3 var(--body); display: flex; align-items: flex-start; }
.stair li:nth-child(1) { height: 70px; } .stair li:nth-child(2) { height: 90px; } .stair li:nth-child(3) { height: 110px; }
.stair li:nth-child(4) { height: 130px; } .stair li:nth-child(5) { height: 150px; } .stair li:nth-child(6) { height: 170px; }
.stair li:nth-child(7) { height: 190px; } .stair li:nth-child(8) { height: 210px; } .stair li:nth-child(9) { height: 230px; }
.stair li:nth-child(10) { height: 250px; } .stair li:nth-child(11) { height: 280px; }
.stair li.top { background: var(--ember); border-color: var(--ember); color: var(--ember-ink); font-weight: 600; }
.stair-note { margin: 22px 0 0; font-size: 1.05rem; max-width: 60ch; }

/* ending */
.ending { background: radial-gradient(120% 160% at 90% 0%, var(--navy-2), var(--navy-deep) 65%); padding: 64px 0; }
.ending-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; }
.ending h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); max-width: 28ch; }
.ending-mail { font: 500 15px var(--mono); color: var(--teal-bright); margin: 14px 0 0; }
.foot { padding: 22px 0; font-size: 14px; color: var(--muted-dark); border-top: 1px solid var(--line-dark); }
.foot .wrap { display: flex; justify-content: space-between; gap: 12px; }
.foot a { color: #d7e6ea; }

@media (max-width: 900px) {
  .opening-grid, .ending-inner { grid-template-columns: 1fr; }
  .portrait-frame { justify-self: start; width: min(260px, 80%); }
  .stair { grid-template-columns: 1fr; min-height: 0; align-items: stretch; }
  .stair li, .stair li:nth-child(n) { height: auto; border-radius: var(--radius); border-bottom-width: 1.5px; border-left-width: 4px; padding: 10px 14px; font-size: 15px; }
  .stair li:nth-child(2) { margin-left: 4%; } .stair li:nth-child(3) { margin-left: 8%; } .stair li:nth-child(4) { margin-left: 12%; }
  .stair li:nth-child(5) { margin-left: 16%; } .stair li:nth-child(6) { margin-left: 20%; } .stair li:nth-child(7) { margin-left: 24%; }
  .stair li:nth-child(8) { margin-left: 28%; } .stair li:nth-child(9) { margin-left: 32%; } .stair li:nth-child(10) { margin-left: 36%; }
  .stair li:nth-child(11) { margin-left: 40%; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .opening { padding: 44px 0 28px; }
  .chapter { padding: 52px 0; }
  .chapter-grid { grid-template-columns: 1fr; gap: 4px; }
  .ch-num { position: static; font-size: 3rem; }
  .ch-body p { font-size: 1.04rem; }
  .pull { width: auto; }
  .inline-voice { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; }
  .inline-voice blockquote { font-size: 1.02rem; }
  .inline-voice .play-badge { left: 6px; bottom: 6px; padding: 6px 9px 6px 7px; font-size: 12px; gap: 4px; }
  .inline-voice .play-badge svg { width: 14px; height: 14px; }
  .stair li:nth-child(n) { margin-left: 0; }
  .mast-nav { gap: 14px; }
}
@media print { .mast-nav, .ending .btn, .player { display: none; } .truck, .ending, .foot { background: #fff; color: #000; } }

/* floated photos stop at the end of a chapter */
.ch-body::after { content: ""; display: block; clear: both; }
.fact, .pull, .inline-voice, .loop { clear: both; }

/* the learning loop */
.loop { margin: 36px 0 0; background: var(--cream); border: 1.5px solid var(--navy); border-radius: var(--radius); box-shadow: var(--shadow-hard); padding: 22px 24px; }
.loop-h { font: 500 12px var(--mono) !important; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); margin-bottom: 14px !important; }
.loop-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: none; }
.loop-steps li { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 12px 46px; font-size: 15px; line-height: 1.45; }
.loop-steps li span { position: absolute; left: 12px; top: 11px; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font: 700 12px/24px var(--mono); text-align: center; }
.loop-steps li.last { border-color: var(--ember); }
.loop-steps li.last span { background: var(--ember); }
.loop-note { font-size: 15px !important; color: var(--muted); margin: 14px 0 0 !important; line-height: 1.55 !important; }
@media (max-width: 900px) { .loop-steps { grid-template-columns: 1fr; } }
