/* Native HTML case study; shared portfolio chrome stays in shared-layout.css. */
.reading-page { margin: 0; }
.reading-page * { box-sizing: border-box; }
.rd-main { padding-top: 84px; padding-bottom: 32px; }
.rd-main { --rd-paper: #f5f3ec; --rd-green: #dce7df; --rd-ink: #263d35; --rd-muted: #506459; --rd-line: #bcc9c0; color: var(--rd-ink); }
.rd-deck { background: var(--rd-paper); border: 1px solid #e3e3dd; scroll-margin-top: 84px; }
.rd-slide { min-height: max(630px, calc(100svh - 200px)); padding: clamp(28px, 4.3vw, 64px); display: grid; align-content: center; gap: 36px; scroll-margin-top: 84px; }
.rd-slide[hidden], .rd-controls[hidden], .rd-sidebar[hidden], .rd-mobile-bar[hidden] { display: none; }
.rd-deck:not(.is-enhanced) .rd-slide + .rd-slide, .rd-deck.is-reading .rd-slide + .rd-slide { border-top: 1px solid var(--rd-line); }
.rd-split, .rd-cover { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: center; }
.rd-copy { min-width: 0; }
.rd-slide .rd-kicker, .rd-dialog .rd-kicker { margin: 0 0 24px; color: var(--rd-muted); font: 700 10px/1.5 var(--layout-ui); letter-spacing: .16em; text-transform: uppercase; }
.rd-slide h1, .rd-slide h2 { color: var(--rd-ink); margin: 0 0 24px; font: 400 clamp(36px, 3.8vw, 55px)/1.06 Georgia, 'Times New Roman', serif; letter-spacing: -.045em; }
.rd-slide h1 { font-size: clamp(42px, 4.6vw, 66px); }
.rd-slide h1 em, .rd-slide h2 em { font-weight: 400; color: #557965; }
.rd-slide h1:focus, .rd-slide h2:focus { outline: none; }
.rd-slide p { margin: 0 0 20px; color: var(--rd-muted); font: 400 15px/1.6 var(--layout-ui); }
.rd-slide .rd-lead { font-size: 17px; line-height: 1.6; max-width: 52ch; }
.rd-slide .rd-note { border-top: 1px solid var(--rd-line); padding-top: 20px; margin-top: 28px; font: 400 15px/1.6 Georgia, serif; font-style: italic; }
.rd-tag { display: inline-block; margin-top: 12px; border: 1px solid var(--rd-line); border-radius: 30px; padding: 7px 12px; font: 700 10px/1.4 var(--layout-ui); letter-spacing: .02em; }
.rd-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; border-top: 1px solid var(--rd-line); padding-top: 24px; margin: 32px 0 14px; }
.rd-meta dt { font: 700 10px/1.5 var(--layout-ui); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 7px; color: var(--rd-muted); }
.rd-meta dd { margin: 0; font: 400 13px/1.6 var(--layout-ui); }
.rd-cover { background: #e2eade; }
.rd-cover-art { display: grid; place-items: center; padding: 8px 0; }
.rd-visual { display: flex; justify-content: center; align-items: center; gap: 24px; min-width: 0; }
.rd-phone { margin: 0; min-width: 0; text-align: center; flex: 0 1 auto; }
.rd-zoom { display: block; border: 0; padding: 0; margin: 0 auto; background: none; color: inherit; cursor: zoom-in; max-width: 100%; }
.rd-phone img { display: block; width: auto; height: clamp(340px, 48vh, 460px); max-width: 100%; object-fit: contain; border-radius: 19px; box-shadow: 0 12px 24px -20px #263d35; }
.rd-cover .rd-phone img { height: 480px; }
.rd-phone figcaption { margin-top: 16px; color: var(--rd-muted); font: 400 10px/1.5 var(--layout-ui); letter-spacing: .02em; }
.rd-three { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; }
.rd-three > div { border-top: 1px solid var(--rd-line); padding-top: 20px; }
.rd-three span { font: 700 10px/1.5 var(--layout-ui); text-transform: uppercase; letter-spacing: .1em; color: var(--rd-muted); }
.rd-three h3 { font: 400 24px/1.15 Georgia, serif; letter-spacing: -.02em; margin: 20px 0 12px; }
.rd-three p { font-size: 14px; margin: 0; }
.rd-principles { background: var(--rd-green); gap: 68px; }
.rd-principles h2, .rd-closing h2, .rd-impact h2 { font-size: clamp(42px,4.8vw,66px); }
.rd-evidence { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.rd-stat strong { display: block; font: 400 clamp(52px,6.2vw,86px)/1 Georgia, serif; letter-spacing: -.065em; }
.rd-stat strong span { font-size: .6em; }
.rd-stat p { margin: 12px 0 0; font-size: 15px; }
.rd-slide small { font-size: 11px; color: var(--rd-muted); }
.rd-problem { gap: 28px; }
.rd-problem .rd-copy .rd-lead { max-width: 65ch; margin-bottom: 0; }
.rd-problem .rd-three h3 { font-size: 21px; margin: 10px 0; }
.rd-icon-study { padding: 22px 28px; background: #e0e7e8; text-align: left; }
.rd-icon-options { display: block; height: 320px; width: auto; max-width: 100%; object-fit: contain; object-position: left; }
.rd-selected-icon { display: block; width: 100%; height: auto; }
.rd-icon-study .rd-zoom { margin-inline: 0; }
.rd-icon-study .rd-small-label { text-transform: uppercase; letter-spacing: .12em; font-size: 10px; margin: 12px 0; }
.rd-list { list-style: none; counter-reset: menu; margin: 26px 0 0; padding: 0; }
.rd-list li { counter-increment: menu; position: relative; padding: 14px 0 14px 36px; border-top: 1px solid var(--rd-line); font: 400 13px/1.5 var(--layout-ui); }
.rd-list li::before { content: '0' counter(menu); position: absolute; left: 0; font-size: 10px; top: 17px; color: var(--rd-muted); }
.rd-list strong, .rd-list span { display: block; }
.rd-list span { color: var(--rd-muted); margin-top: 4px; }
.rd-type-detail { display: flex; gap: 24px; align-items: center; border-block: 1px solid var(--rd-line); padding-block: 20px; margin: 24px 0; }
.rd-type-detail > strong { font: 400 60px/1 Georgia,serif; letter-spacing: -.05em; }
.rd-type-detail strong span { font-size: 22px; }
.rd-type-detail p { margin: 0; font-size: 13px; }
.rd-impact { background: var(--rd-green); }
.rd-impact .rd-stat { padding-top: 24px; border-top: 1px solid var(--rd-line); }
.rd-impact .rd-stat strong { font-size: clamp(80px,9vw,120px); }
.rd-slide .rd-footnote { font-size: 11px; margin: 0; max-width: 75ch; }
.rd-explore { background: #eeedf5; --rd-ink: #353449; --rd-muted: #626178; --rd-line: #c8c6d8; }
.rd-adaptive { gap: 24px; }
.rd-adaptive h2 { font-size: clamp(32px,3.3vw,46px); }
.rd-adaptive .rd-copy p:last-child { margin-bottom: 0; }
.rd-adaptive .rd-phone img { height: 365px; }
.rd-adaptive .rd-visual { gap: 40px; }
.rd-closing { background: #e2eade; gap: 38px; }
.rd-end-link { color: var(--rd-ink); font: 700 12px/1.5 var(--layout-ui); text-decoration: underline; text-underline-offset: 5px; justify-self: start; }
.rd-controls { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; padding: 14px 24px; border-top: 1px solid #d7d9cf; background: #f9f8f3; }
.rd-controls button, .rd-dialog button { color: var(--rd-ink); background: transparent; border: 1px solid transparent; border-radius: 5px; min-height: 40px; padding: 8px 12px; font: 400 12px/1.3 var(--layout-ui); cursor: pointer; }
.rd-controls button:hover:not(:disabled), .rd-dialog button:hover { background: #e1e7de; }
.rd-controls button:disabled { opacity: .3; cursor: default; }
.rd-deck button:focus-visible, .rd-deck a:focus-visible { outline: 2px solid #587065; outline-offset: 4px; }
.rd-tools, .rd-pagination { display: flex; gap: 8px; align-items: center; }
.rd-pagination button { border-color: #cbd0c5; width: 40px; font-size: 18px; }
#rd-counter { min-width: 66px; text-align: center; font: 400 11px/1.5 var(--layout-ui); font-variant-numeric: tabular-nums; letter-spacing: .06em; }
#rd-fullscreen { justify-self: end; }
.rd-progress { height: 3px; background: #e5e6df; }
.rd-progress span { display: block; height: 100%; width: 0; background: #6f8d79; transition: width 180ms ease; }
.rd-dialog { color: var(--rd-ink); background: var(--rd-paper); border: 1px solid #d8dccf; padding: 32px; max-width: calc(100vw - 32px); max-height: calc(100svh - 48px); border-radius: 12px; }
.rd-dialog::backdrop { background: rgb(25 38 30 / 65%); backdrop-filter: blur(5px); }
.rd-dialog-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.rd-dialog .rd-kicker { margin-bottom: 10px; }
.rd-dialog h2 { font: 400 30px/1.1 Georgia,serif; margin: 0; }
.rd-dialog [data-close] { border: 1px solid #cbd0c5; font-size: 24px; line-height: 1; width: 40px; flex-shrink: 0; }
.rd-toc { width: 760px; }
.rd-toc .rd-dialog-head { position: sticky; top: -32px; padding-block: 12px; background: var(--rd-paper); z-index: 1; }
#rd-toc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
#rd-toc-list button { display: flex; gap: 14px; width: 100%; text-align: left; border-radius: 0; border-top: 1px solid #d8dccf; align-items: baseline; padding: 12px 0; }
#rd-toc-list button span { color: #6b7c71; font-size: 10px; }
#rd-toc-list button[aria-current="step"] { font-weight: 700; color: #244834; }
#rd-toc-list .rd-toc-chapter { grid-column: 1 / -1; margin: 22px 0 8px; font: 700 10px/1.5 var(--layout-ui); letter-spacing: .12em; text-transform: uppercase; }
.rd-lightbox { text-align: center; padding: 20px 64px; }
.rd-lightbox [data-close] { position: absolute; right: 10px; top: 10px; }
.rd-lightbox img { display: block; height: auto; width: auto; max-width: 100%; max-height: calc(100svh - 150px); margin: 0 auto; object-fit: contain; }
.rd-lightbox p { margin: 14px 0 0; max-width: 60ch; font: 400 12px/1.5 var(--layout-ui); }
.rd-deck:fullscreen { overflow-y: auto; width: 100%; padding: 0; display: flex; flex-direction: column; border: 0; }
.rd-deck:fullscreen .rd-stage { flex: 1; display: grid; }
.rd-deck:fullscreen .rd-slide { min-height: calc(100svh - 72px); padding-inline: max(6vw,32px); }
.rd-deck:fullscreen .rd-controls { position: sticky; bottom: 0; }
.rd-deck.is-reading .rd-progress { display: none; }
@media (min-width: 1600px) { .rd-slide { min-height: 720px; } .rd-phone img { height: 500px; } }
@media (min-width: 761px) and (max-height: 800px) {
  .rd-slide { min-height: max(490px, calc(100svh - 200px)); padding: 28px 40px; gap: 24px; }
  .rd-slide h1, .rd-slide h2 { font-size: 40px; margin-bottom: 18px; }
  .rd-slide .rd-kicker { margin-bottom: 16px; }
  .rd-slide .rd-lead { font-size: 15px; }
  .rd-slide p { font-size: 13px; margin-bottom: 16px; }
  .rd-meta { margin-top: 20px; padding-top: 16px; }
  .rd-meta dd { font-size: 12px; }
  .rd-phone img, .rd-cover .rd-phone img { height: 350px; }
  .rd-slide .rd-note { margin-top: 20px; padding-top: 16px; font-size: 13px; }
  .rd-three h3 { font-size: 21px; margin: 12px 0 10px; }
  .rd-three p { font-size: 12px; }
  .rd-stat strong { font-size: 64px; }
  .rd-problem { gap: 18px; }
  .rd-problem h2 { font-size: 36px; }
  .rd-problem .rd-stat strong { font-size: 56px; }
  .rd-problem .rd-three > div { padding-top: 16px; }
  .rd-impact .rd-stat strong { font-size: 84px; }
  .rd-icon-options { height: 250px; }
  .rd-icon-study { padding-block: 12px; }
  .rd-adaptive .rd-phone img { height: 275px; }
  .rd-type-detail { padding-block: 16px; margin-block: 20px; }
  .rd-list { margin-top: 18px; }
}
@media (max-width: 1050px) {
  .rd-slide { padding: 36px; gap: 28px; }
  .rd-phone img { height: 380px; }
  .rd-cover .rd-phone img { height: 440px; }
  .rd-visual { gap: 16px; }
  .rd-slide .rd-lead { font-size: 16px; }
  .rd-icon-study { padding: 18px; }
}
@media (max-width: 760px) {
  .rd-main { width: calc(100% - 32px); padding-top: 84px; }
  .rd-slide { padding: 32px 24px; min-height: auto; gap: 32px; }
  .rd-split, .rd-cover { grid-template-columns: 1fr; }
  .rd-slide h1, .rd-slide h2 { font-size: 40px; line-height: 1.08; }
  .rd-slide .rd-kicker { font-size: 9px; margin-bottom: 20px; }
  .rd-slide p, .rd-slide .rd-lead { font-size: 15px; }
  .rd-slide .rd-copy p:last-child { margin-bottom: 0; }
  .rd-cover .rd-phone img { height: 400px; }
  .rd-phone img { height: auto; max-height: 430px; width: 100%; }
  .rd-pair .rd-phone { flex: 1 1 0; }
  .rd-single .rd-phone { max-width: 230px; }
  .rd-phone figcaption { font-size: 10px; }
  .rd-three { grid-template-columns: 1fr; gap: 24px; }
  .rd-three h3 { margin: 10px 0; }
  .rd-evidence { gap: 22px; }
  .rd-stat strong { font-size: 48px; }
  .rd-problem .rd-stat strong { font-size: clamp(28px, 9vw, 42px); white-space: nowrap; }
  .rd-impact .rd-stat strong { font-size: 60px; }
  .rd-stat p { font-size: 13px; }
  .rd-controls { grid-template-columns: 1fr auto; padding: 10px; gap: 6px; }
  .rd-deck.is-enhanced .rd-controls { position: sticky; bottom: 0; z-index: 20; }
  .rd-tools { gap: 0; }
  .rd-controls button { padding: 8px; font-size: 11px; }
  .rd-pagination { gap: 0; }
  .rd-pagination button { width: 36px; font-size: 18px; }
  #rd-counter { min-width: 58px; font-size: 10px; }
  #rd-fullscreen { display: none; }
  .rd-adaptive .rd-visual { flex-wrap: wrap; gap: 24px; }
  .rd-adaptive .rd-phone { width: calc(50% - 12px); }
  .rd-adaptive .rd-phone img { width: 100%; height: auto; }
  .rd-icon-study { max-width: 360px; justify-self: center; width: 100%; }
  .rd-icon-options { max-height: 300px; }
  .rd-dialog { padding: 24px; }
  .rd-toc .rd-dialog-head { top: -24px; }
  #rd-toc-list { grid-template-columns: 1fr; }
  .rd-dialog h2 { font-size: 25px; }
  .rd-lightbox { padding: 56px 16px 20px; }
}
@media (max-width: 620px) {
  .rd-main { padding-top: 72px; }
  .rd-deck, .rd-slide { scroll-margin-top: 72px; }
}
@media (max-width: 360px) {
  .rd-controls { grid-template-columns: 1fr; }
  .rd-tools, .rd-pagination { justify-content: center; }
  .rd-slide h1, .rd-slide h2 { font-size: 34px; overflow-wrap: break-word; }
  .rd-impact .rd-stat strong { font-size: 46px; }
  .rd-evidence { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) { .rd-progress span { transition: none; } }

/* Reading is the default. The rail belongs to the page, not the slide canvas. */
.rd-main.is-reading-layout { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 32px; align-items: start; }
.rd-sidebar { position: sticky; top: 84px; max-height: calc(100svh - 108px); overflow-y: auto; scrollbar-width: thin; padding: 8px 12px 0 0; }
.rd-sidebar-title { font: 700 15px/1.4 var(--layout-ui); margin: 0 0 16px; letter-spacing: -.015em; }
.rd-present, .rd-mobile-bar button { cursor: pointer; color: var(--rd-ink); background: transparent; border: 1px solid #d7ddd4; border-radius: 5px; min-height: 44px; font: 700 12px/1.4 var(--layout-ui); padding: 10px 14px; }
.rd-present { width: 100%; text-align: left; margin-bottom: 20px; }
.rd-present:hover, .rd-mobile-bar button:hover { background: #edf1ea; }
.rd-sidebar .rd-toc-chapter { color: #7b817a; font: 700 9px/1.5 var(--layout-ui); letter-spacing: .07em; text-transform: uppercase; margin: 20px 0 6px; }
.rd-sidebar .rd-toc-chapter:first-child { margin-top: 0; }
.rd-sidebar a { display: block; padding: 5px 0 5px 10px; border-left: 2px solid #e5e8e2; color: #667061; text-decoration: none; font: 400 12px/1.5 var(--layout-ui); }
.rd-sidebar a:hover { color: #263d35; background: #f5f7f2; }
.rd-sidebar a[aria-current] { color: #263d35; font-weight: 700; border-left-color: #6f8d79; background: #edf1ea; }
.rd-reading-position { color: #7b817a; font: 400 10px/1.5 var(--layout-ui); letter-spacing: .12em; margin: 20px 0 8px; }
.rd-sidebar a:focus-visible, .rd-present:focus-visible, .rd-mobile-bar button:focus-visible { outline: 2px solid #587065; outline-offset: 2px; }
.rd-mobile-bar { display: none; }
.rd-deck.is-reading { min-width: 0; border: 0; background: #fff; }
.rd-deck.is-reading .rd-slide { min-height: 0; padding: 64px 40px; gap: 36px; }
.rd-deck.is-reading .rd-slide + .rd-slide { border-top: 0; margin-top: 24px; }
.rd-deck.is-reading .rd-slide:not(.rd-cover):not(.rd-principles):not(.rd-impact):not(.rd-explore):not(.rd-closing) { background: #f8f7f2; }
.rd-deck.is-reading .rd-slide h1 { font-size: clamp(38px, 3.9vw, 54px); }
.rd-deck.is-reading .rd-slide h2 { font-size: clamp(34px, 3.2vw, 44px); }
.rd-deck.is-reading .rd-slide p { font-size: 15px; line-height: 1.7; }
.rd-deck.is-reading .rd-slide .rd-kicker { font-size: 10px; }
.rd-deck.is-reading .rd-slide .rd-footnote { font-size: 11px; }
.rd-deck.is-reading .rd-phone img { height: auto; max-height: 440px; width: auto; max-width: 100%; }
.rd-deck.is-reading .rd-cover .rd-phone img { max-height: 460px; }
.rd-deck.is-reading .rd-pair .rd-phone { flex: 1 1 0; }
.rd-deck.is-reading .rd-visual { gap: 20px; }
.rd-deck.is-reading .rd-adaptive .rd-phone img { max-height: 380px; }
.rd-deck.is-reading .rd-end-link { display: none; }
.reading-page.rd-presenting .project-pagination, .reading-page.rd-presenting .portfolio-footer { display: none; }
@media (min-width: 1001px) and (max-width: 1150px) {
  .rd-main.is-reading-layout { grid-template-columns: 150px minmax(0, 1fr); gap: 24px; }
  .rd-deck.is-reading .rd-split, .rd-deck.is-reading .rd-cover { grid-template-columns: 1fr; }
  .rd-deck.is-reading .rd-pair { max-width: 420px; width: 100%; justify-self: center; }
}
@media (max-width: 1000px) {
  .rd-main.is-reading-layout { display: block; }
  .is-reading-layout .rd-sidebar { display: none; }
  .is-reading-layout .rd-mobile-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; top: 64px; z-index: 30; background: rgb(255 255 255 / 96%); padding: 8px 0; margin-bottom: 12px; border-bottom: 1px solid #e5e8e2; }
  .rd-mobile-bar button { border-color: transparent; padding-inline: 10px; }
  #rd-mobile-chapter { color: #7b817a; font-size: 10px; margin-inline: 10px; font-weight: 400; }
  .rd-deck.is-reading .rd-slide { scroll-margin-top: 144px; }
}
@media (max-width: 760px) {
  .rd-deck.is-reading .rd-slide { padding: 36px 24px; gap: 28px; }
  .rd-deck.is-reading .rd-slide + .rd-slide { margin-top: 16px; }
  .rd-deck.is-reading .rd-slide h1 { font-size: 40px; }
  .rd-deck.is-reading .rd-slide h2 { font-size: 36px; }
  .rd-deck.is-reading .rd-phone img { max-height: 400px; }
  .rd-deck.is-reading .rd-cover .rd-phone img { max-height: 390px; }
  .rd-deck.is-reading .rd-single .rd-phone { max-width: 210px; }
  .rd-deck.is-reading .rd-visual { gap: 24px; }
}
@media (max-width: 620px) {
  .is-reading-layout .rd-mobile-bar { top: 56px; }
  .rd-deck.is-reading .rd-slide { scroll-margin-top: 132px; }
}
@media (max-width: 360px) {
  .rd-deck.is-reading .rd-slide { padding-inline: 20px; }
  .rd-deck.is-reading .rd-slide h1 { font-size: 34px; }
  .rd-deck.is-reading .rd-slide h2 { font-size: 32px; }
}
@media print {
  .portfolio-header, .rd-controls, .rd-sidebar, .rd-mobile-bar, .rd-progress, .project-pagination, .portfolio-footer { display: none !important; }
  .rd-main, .rd-main.is-reading-layout { display: block; width: 100%; padding: 0; }
  .rd-deck { border: 0; }
  .rd-slide, .rd-slide[hidden] { display: grid; min-height: 0; break-after: page; break-inside: avoid; }
  .rd-slide { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
