/* ===========================================================
   The Cadi Ceiling — article template
   One layout for every article; the blocks below are drop-ins.
   Spec: design/pages/07-ceiling-article.md
   =========================================================== */

.progress { position: fixed; left: 0; top: 0; height: 4px; width: 0; background: var(--yellow); z-index: 70; }

/* Header */
.a-head { padding: 40px 20px 48px; }
@media (min-width: 900px) { .a-head { padding: 72px 64px 80px; } }
.a-head .inner { max-width: 880px; }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--on-navy-muted); }
.crumb a { color: var(--yellow); text-decoration: none; }
.crumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.a-head h1 { font-size: clamp(36px, 5.2vw, 56px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; margin: 20px 0 0; color: var(--white); }
.standfirst { font-size: clamp(18px, 2vw, 21px); line-height: 1.55; color: var(--on-navy-body); margin: 18px 0 0; max-width: 720px; }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 26px; font-size: 14px; line-height: 1.4; color: var(--on-navy-muted); }
.byline img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: center 20%; }
.byline b { color: var(--white); font-weight: 700; }

/* Hero photo with the ceiling line */
.a-hero { position: relative; max-width: 1312px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 900px) { .a-hero { padding: 0 64px; } }
.a-hero .photo { aspect-ratio: 16 / 9; border-radius: var(--r-lg); margin-top: -28px; }
@media (max-width: 720px) { .a-hero .photo { aspect-ratio: 4 / 3; } }
.a-hero .ceiling-line { top: 22%; left: 0; right: 0; color: var(--yellow); }
.a-hero .ceiling-line span { background: var(--yellow); color: var(--navy); padding: 4px 10px; border-radius: var(--r-pill); }

/* Body column */
.a-body { max-width: 680px; margin: 0 auto; padding: 48px 20px 24px; color: #2E3566; }
@media (min-width: 900px) { .a-body { padding: 72px 0 32px; } }
.a-body p { font-size: 18px; line-height: 1.7; margin: 0 0 22px; }
.a-body .lead { font-size: 21px; line-height: 1.6; font-weight: 600; color: var(--navy); }
.a-body h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; color: var(--navy); margin: 44px 0 16px; scroll-margin-top: 90px; }
.a-body strong { color: var(--navy); }
.a-body .sign { font-weight: 800; color: var(--navy); margin-top: 32px; }

/* Block 1 — In this piece */
.toc { background: var(--paper); border-radius: var(--r-md); padding: 20px 22px; margin: 0 0 32px; }
.toc ol { list-style: none; margin: 10px 0 0; padding: 0; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: flex; gap: 12px; padding: 7px 0; color: var(--navy); font-weight: 700; font-size: 16px; text-decoration: none; }
.toc a::before { content: counter(t, decimal-leading-zero); color: var(--orange-deep); font-weight: 800; min-width: 24px; }
.toc a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Block 2 — Pull quote */
.pull { border-top: 2px solid var(--navy); border-bottom: 2px solid var(--navy); padding: 24px 0; margin: 36px 0; }
.pull p { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.02em; line-height: 1.25; color: var(--navy); margin: 0; }

/* Block 3 — Checklist */
.checklist { background: var(--paper); border-radius: var(--r-md); padding: 22px; margin: 8px 0 32px; }
.checklist ul { list-style: none; margin: 12px 0 0; padding: 0; }
.checklist li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 17px; line-height: 1.55; }
.checklist li:first-child { border-top: 0; }
.checklist li::before { content: ''; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--navy); margin-top: 3px; }
.checklist b { color: var(--navy); }

/* Block 4 — Callout */
.callout-navy { background: var(--navy); color: var(--on-navy-body); border-radius: var(--r-md); padding: 22px 24px; margin: 8px 0 32px; }
.callout-navy .label { color: var(--yellow); }
.callout-navy p { color: var(--on-navy-body); margin: 10px 0 0; font-size: 17px; }

/* Block 6 — Timeline */
.a-timeline { list-style: none; margin: 8px 0 32px; padding: 0; position: relative; }
.a-timeline::before { content: ''; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--blue-tint); }
.a-timeline li { position: relative; padding: 0 0 18px 38px; font-size: 17px; line-height: 1.55; }
.a-timeline li:last-child { padding-bottom: 0; }
.a-timeline li::before { content: ''; position: absolute; left: 1px; top: 5px; width: 19px; height: 19px; border-radius: 50%; background: var(--dot, var(--navy)); box-shadow: 0 0 0 4px var(--white); }

/* Block 7 — Ceiling closer */
.closer { position: relative; margin: 44px 0 12px; padding-top: 28px; }
.closer::before { content: 'THE CEILING'; position: absolute; top: -8px; left: 0; background: var(--white); padding-right: 10px; font-size: 10px; font-weight: 700; letter-spacing: .16em; color: var(--navy); z-index: 1; }
.closer::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--yellow); }
.closer p { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; letter-spacing: -.02em; line-height: 1.3; color: var(--navy); margin: 0; }

/* The one link */
.one-link { max-width: 880px; margin: 32px auto 0; padding: 0 20px; }
.one-link > div { background: var(--navy); color: var(--white); border-radius: var(--r-lg); padding: 28px 24px; }
@media (min-width: 900px) { .one-link > div { padding: 40px; } }
.one-link .label { color: var(--yellow); }
.one-link h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 12px 0 0; color: var(--white); }
.one-link p { color: var(--on-navy-body); font-size: 17px; line-height: 1.6; margin: 12px 0 0; }
.one-link .btn-row { margin-top: 22px; }

/* Author box */
.author { max-width: 680px; margin: 48px auto 0; padding: 0 20px; }
.author > div { display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: start; padding: 24px 0; border-top: 1.5px solid rgba(26,33,80,.14); border-bottom: 1.5px solid rgba(26,33,80,.14); }
.author img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: center 20%; }
.author p { margin: 6px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-body); }
.author b { color: var(--navy); font-size: 17px; }

/* Subscribe band */
.sub-band { margin-top: 64px; background: var(--yellow); padding: 48px 20px; }
@media (min-width: 900px) { .sub-band { padding: 72px 64px; } }
.sub-band .inner { max-width: 880px; }
.sub-band h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.025em; margin: 0 0 18px; color: var(--navy); }
.sub-band label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; color: var(--navy); }
.sub-band .field { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 721px) { .sub-band .field { flex-direction: row; } }
.sub-band input { flex: 1; min-height: 56px; padding: 0 20px; border-radius: var(--r-pill); border: 2px solid transparent; background: var(--white); font: 600 17px var(--font); color: var(--navy); }
.sub-band input:focus { outline: none; border-color: var(--navy); }
.sub-band [data-msg] { min-height: 22px; margin: 10px 0 0; font-size: 15px; font-weight: 700; color: var(--navy); }
.sub-band .note { margin: 4px 0 0; font-size: 14px; color: var(--navy); opacity: .8; }

/* Read next */
.read-next { padding: 56px 20px 72px; }
@media (min-width: 900px) { .read-next { padding: 88px 64px; } }
.rn-card { display: grid; border-radius: var(--r-lg); overflow: hidden; background: var(--paper); text-decoration: none; color: var(--navy); margin-top: 20px; }
@media (min-width: 900px) { .rn-card { grid-template-columns: 5fr 7fr; } }
.rn-card .photo { border-radius: 0; aspect-ratio: 16 / 10; }
.rn-card .txt { padding: 24px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
@media (min-width: 900px) { .rn-card .txt { padding: 36px; } }
.rn-card h3 { margin: 0; font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.rn-card:hover h3 { text-decoration: underline; text-underline-offset: 5px; }
.rn-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 13px; font-weight: 600; color: var(--ink-muted); }

/* Block — worked figures table */
.figs { background: var(--paper); border-radius: var(--r-md); padding: 20px 22px; margin: 8px 0 28px; }
.figs table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 17px; }
.figs td { padding: 10px 0; border-top: 1px solid var(--line); }
.figs tr:first-child td { border-top: 0; }
.figs td:last-child { text-align: right; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.figs tr.total td { border-top: 2px solid var(--navy); font-weight: 800; color: var(--green-deep); }
.step { display: block; margin-bottom: 10px !important; font-weight: 700; color: var(--navy); }
.step b { color: var(--green-deep); font-weight: 800; }
.running { display: inline-block; background: var(--green-tint); color: var(--green-deep); font-weight: 800; border-radius: var(--r-pill); padding: 2px 10px; }

/* Block — audit item with a "score yourself" prompt */
.audit { border-top: 1.5px solid rgba(26,33,80,.14); padding-top: 22px; margin-top: 28px; }
.audit h3 { display: flex; gap: 12px; font-size: 21px; font-weight: 800; letter-spacing: -.015em; line-height: 1.3; color: var(--navy); margin: 0 0 12px; }
.audit h3 span { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--green-tint); color: var(--green-deep); display: grid; place-items: center; font-size: 14px; font-weight: 800; }
.you-score { display: block; margin: 0 0 8px !important; padding: 12px 16px; border-left: 4px solid var(--green); background: var(--paper); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 16px !important; }
.you-score b { color: var(--green-deep); }
.bands { display: grid; gap: 10px; margin: 8px 0 28px; }
.bands div { border-radius: var(--r-md); padding: 16px 18px; font-size: 17px; line-height: 1.55; }
.bands b { display: block; font-size: 20px; font-weight: 800; }

/* Generic multi-column table, subheads, lists and the red-flag line */
.tbl { margin: 8px 0 28px; overflow-x: auto; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.tbl th { text-align: left; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); padding: 10px 12px 10px 0; border-bottom: 2px solid var(--navy); vertical-align: bottom; }
.tbl td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: #2E3566; }
.tbl tr.total td { font-weight: 800; color: var(--green-deep); border-bottom: 2px solid var(--navy); }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.a-body h3 { font-size: 21px; font-weight: 800; letter-spacing: -.015em; line-height: 1.3; color: var(--navy); margin: 36px 0 12px; }
.a-body ul.plain, .a-body ol.plain { margin: 0 0 22px; padding-left: 22px; font-size: 18px; line-height: 1.7; }
.a-body ul.plain li, .a-body ol.plain li { margin-bottom: 8px; }
.redflag { background: var(--pink-tint); color: var(--pink-deep); border-radius: var(--r-sm); padding: 14px 16px; font-size: 16px !important; line-height: 1.55 !important; }
.redflag b { color: var(--pink-deep); }
/* Wide tables become stacked cards on phones */
@media (max-width: 720px) {
  .tbl.wide thead { display: none; }
  .tbl.wide table, .tbl.wide tbody, .tbl.wide tr, .tbl.wide td { display: block; width: 100%; }
  .tbl.wide tr { background: var(--paper); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 10px; }
  .tbl.wide td { border: 0; padding: 4px 0; }
  .tbl.wide td::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
  .tbl.wide td:first-child::before { display: none; }
  .tbl.wide td:first-child { font-size: 18px; color: var(--navy); padding-bottom: 6px; }
}
