/* Design justification: each decision as problem, evidence, principle, fix, before and after, see it live. */

/* index: each decision as its change */
.d-index { display: grid; gap: 40px; padding-bottom: clamp(32px, 5vw, 64px); }
.d-index h2 { font-size: 17px; font-weight: 600; color: var(--fg-2); margin-bottom: 8px; }
.d-index ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 40px; }
.d-index a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 16px; min-height: 52px; padding: 10px 0; text-decoration: none; }
.d-index a span { font-size: 19px; font-weight: 500; }
.d-index a:hover span { text-decoration: underline; text-underline-offset: .2em; }
.d-index .chg { font-size: 16px; color: var(--fg-3); }
.d-index .chg b { color: var(--green); font-weight: 600; }
.d-index .is-planned-list a span { color: var(--fg-2); }
.d-index .is-planned-list .chg b { color: var(--fg-2); }
@media (max-width: 760px) { .d-index ol { grid-template-columns: 1fr; } .d-index a { grid-template-columns: 1fr; gap: 2px; } }

/* one decision */
.dec { padding: clamp(72px, 10vw, 136px) 0; scroll-margin-top: var(--nav-h); }
.dec:nth-child(even) { background: var(--bg-2); }
.dec-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 56px; align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.dec-head .tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; margin-bottom: 14px; }
.dec-head .tag.built { color: var(--green); }
.dec-head .tag.planned { color: var(--fg-2); }
.dec-head .tag.planned::before { display: none; }
.dec-head .tag::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.dec-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.4vw, 62px); line-height: 1.06; letter-spacing: -.025em; text-wrap: balance; max-width: 13em; }
.change { text-align: right; }
.change-n { display: flex; align-items: baseline; justify-content: flex-end; gap: 14px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.change-n .b { font-size: clamp(26px, 2.6vw, 38px); color: var(--red); }
.change-n .a { font-size: clamp(44px, 5vw, 76px); color: var(--green); }
.dec.planned .change-n .a { color: var(--fg-2); }
.change-n svg { width: 26px; height: 26px; color: var(--fg-3); align-self: center; }
.change p { margin-top: 10px; color: var(--fg-3); font-size: 16px; }
@media (max-width: 760px) { .dec-head { grid-template-columns: 1fr; } .change { text-align: left; } .change-n { justify-content: flex-start; } }

/* the reasoning, in four parts */
.dec-body { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.why { display: grid; gap: 28px; }
.why > div { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 4px 16px; }
.why > div::before { content: ""; grid-row: span 2; width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; background: var(--c); }
.why h3 { font-size: 15px; font-weight: 600; color: var(--c); }
.why p, .why li { color: var(--fg-2); font-size: 17px; }
.why .p-problem { --c: var(--red); }
.why .p-evidence { --c: var(--fg-2); }
.why .p-principle { --c: var(--fg); }
.why .p-fix { --c: var(--green); }
.dec.planned .why .p-fix { --c: var(--fg-2); }
.why .principle-name { color: var(--fg); font-weight: 600; }
.why .principle-name small { color: var(--fg-3); font-weight: 400; font-size: 14px; }
.why .p-fix p { color: var(--fg); }
.ev { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ev a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 10px; border-radius: 999px; background: var(--raise-2); text-decoration: none; font-size: 15px; color: var(--fg); }
.ev a:hover { background: color-mix(in srgb, var(--raise-2) 70%, var(--fg) 8%); }
.ev a i { width: 9px; height: 9px; border-radius: 50%; }
.ev a i.high { background: var(--red); } .ev a i.medium { background: var(--orange); } .ev a i.low { background: var(--grey); }
.ev-voice { margin-top: 10px; }
.ev-voice a { color: var(--fg); }
.ev-voice blockquote { margin-top: 10px; font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.45; color: var(--fg); }
.ev-voice figcaption { margin-top: 6px; font-size: 14px; color: var(--fg-3); }
.dec-live { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }

/* before and after */
.ba { display: grid; gap: 28px; }
.ba figure { display: grid; gap: 10px; }
.ba figcaption { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.ba figcaption::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.ba .is-before { --c: var(--red); }
.ba .is-after { --c: var(--green); }
.ba .browser-view { max-height: 62vh; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.ba .browser-view img { width: 100%; }
.ba button.zoom { all: unset; display: block; cursor: zoom-in; width: 100%; }
.ba button.zoom:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.ba-none { padding: 28px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--fg-2); }
@media (max-width: 900px) { .dec-body { grid-template-columns: minmax(0, 1fr); } }

/* the redesign is mobile first: its screens sit in a phone */
.ba:has(.is-phone) { grid-template-columns: minmax(0, 1fr) 230px; align-items: start; }
.ba .is-phone .phone { max-width: 230px; aspect-ratio: 390 / 844; border-radius: 40px; padding: 9px; }
.ba .is-phone .phone-screen { border-radius: 32px; }
.ba .is-phone .phone::before { top: 16px; height: 18px; }
.ba .is-phone .phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
@media (max-width: 1100px) and (min-width: 901px) { .ba:has(.is-phone) { grid-template-columns: minmax(0, 1fr); } .ba .is-phone .phone { max-width: 260px; } }
@media (max-width: 560px) { .ba:has(.is-phone) { grid-template-columns: minmax(0, 1fr); } .ba .is-phone .phone { max-width: 280px; margin: auto; } }

.ba .is-phone .phone { display: block; width: min(250px, 100%); margin-inline: auto; }
.ba .is-phone .phone img { display: block; width: 100%; height: auto; border-radius: 18px; }
.ba .is-phone .phone { aspect-ratio: auto; border-radius: 28px; padding: 7px; }
.ba .is-phone .phone::before, .ba .is-phone .phone::after { display: none; }
.change-n .a { min-width: 0; overflow-wrap: anywhere; font-size: clamp(30px, 4.25vw, 62px); }
.change-n svg { flex: none; }
