:root {
  --paper: #e5e9e5;
  --sheet: #f3f5f2;
  --ink: #1d2731;
  --pencil: #56636d;
  --rule: #c1c9c5;
  --blue: #2c5b8c;
  --tape: #f2c230;
  --tape-deep: #d9a71a;
  --plan-paper: #e5e9e5;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --voice: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17.5px/1.62 var(--sans); font-stretch: 100%;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
code { font: 0.88em/1.4 var(--mono); background: rgba(29, 39, 49, .07); padding: .1em .35em; border-radius: 3px; }
kbd {
  font: 600 .8em/1 var(--sans); padding: .25em .5em; border: 1px solid var(--rule); border-bottom-width: 2px;
  border-radius: 4px; background: var(--sheet); white-space: nowrap;
}
h1, h2, h3 { margin: 0; font-family: var(--sans); }
h3 { font-size: 1.06rem; font-weight: 700; letter-spacing: -.005em; margin-bottom: .55em; }
p { margin: 0 0 1em; }

/* ---------------------------------------------------------------- top bar: a tape-measure progress ruler */
.bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px;
  padding: 0 var(--gutter); height: 58px; background: rgba(229, 233, 229, .92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule);
}
.bar-home { font-weight: 800; font-stretch: 125%; color: var(--ink); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.ruler {
  position: relative; flex: 1; display: flex; justify-content: space-between; align-items: flex-end;
  height: 34px; max-width: 760px; margin-left: auto;
  background:
    repeating-linear-gradient(90deg, var(--pencil) 0 1px, transparent 1px 10px) bottom / 100% 6px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 50px) bottom / 100% 12px no-repeat;
  border-bottom: 1.5px solid var(--ink);
}
.ruler-fill { position: absolute; left: 0; bottom: 0; height: 100%; width: 0; background: var(--tape); opacity: .55; z-index: -1; transition: width .15s linear; }
.ruler a {
  font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; padding: 0 4px 13px;
  line-height: 1; white-space: nowrap;
}
.ruler a.on { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
@media (max-width: 720px) {
  .bar { gap: 12px; }
  .bar-home { display: none; }
  .ruler { margin: 0; }
  .ruler a { font-size: 12px; padding: 0 1px 13px; }
}
@media (max-width: 400px) { .ruler a:last-child { display: none; } }

/* ---------------------------------------------------------------- shared layout */
main > section { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.h2 { font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 800; font-stretch: 125%; line-height: 1.02; letter-spacing: -.025em; margin-bottom: .35em; }
.lede { font-size: clamp(1.08rem, 1.7vw, 1.24rem); line-height: 1.55; max-width: 62ch; color: var(--ink); }
.small { font-size: .94rem; color: var(--pencil); max-width: 60ch; }
.measure { max-width: 68ch; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); margin: 40px 0; }
.two-media { align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.list { margin: 0; padding: 0; list-style: none; }
.list li { position: relative; padding-left: 22px; margin-bottom: .7em; max-width: 62ch; }
.list li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 10px; height: 2px; background: var(--blue); }
figure { margin: 0; }
figcaption { font-size: .88rem; color: var(--pencil); margin-top: 8px; line-height: 1.45; }
figure img { border-radius: 6px; background: #d9ddd9; }
[data-zoom] { cursor: zoom-in; }
.h3-gap { margin-top: 8px; }

/* ---------------------------------------------------------------- hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(28px, 5vw, 72px);
  align-items: center; padding-top: clamp(40px, 7vw, 96px); padding-bottom: 48px;
}
.hero h1 {
  font-size: clamp(2.7rem, 6.4vw, 5.1rem); font-weight: 800; font-stretch: 125%; line-height: .96;
  letter-spacing: -.035em; margin-bottom: 26px; text-wrap: balance;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 26px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font: 700 1rem/1.2 var(--sans); text-decoration: none; color: var(--ink); transition: background-color .15s, transform .15s;
}
.btn-tape { background: var(--tape); box-shadow: inset 0 -3px 0 var(--tape-deep); }
.btn-tape:hover { background: #f7cf52; }
.btn-tape:active { transform: translateY(1px); }
.btn-line { border: 1.5px solid var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .95rem; color: var(--pencil); }
.facts li { padding-left: 22px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 1px; top: .42em; width: 12px; height: 7px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg); }
.hero-plan { background: var(--plan-paper); }
.hero-plan svg { width: 100%; height: auto; display: block; }
.hero-plan figcaption { max-width: 52ch; }
@media (max-width: 920px) { .hero { grid-template-columns: 1fr; } .hero-plan { max-width: 640px; } }

/* the one orchestrated moment: the plan draws itself */
.plan .walls rect { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.plan .openings, .plan .balc { animation: fade .6s .55s both; }
.plan .dims line.dim { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .9s .85s cubic-bezier(.4, 0, .2, 1) forwards; }
.plan .dims .tick, .plan .dims text { animation: fade .5s 1.5s both; }
.plan .labels { animation: fade .6s 1.25s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .plan *, .plan .walls rect, .plan .dims line.dim { animation: none !important; stroke-dashoffset: 0 !important; opacity: 1 !important; }
}

/* ---------------------------------------------------------------- filmstrip */
main > section.strip {
  max-width: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
  padding-top: 18px; padding-bottom: 18px; background: var(--ink); margin: 32px 0 0;
}
.strip img { border-radius: 3px; background: #2b3540; }
.strip figcaption { color: #c9d1d6; font-weight: 600; font-size: .9rem; margin-top: 8px; }
@media (max-width: 760px) { main > section.strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- before you start */
.block { padding-top: clamp(64px, 9vw, 112px); }
.sessions { list-style: none; counter-reset: s; padding: 0; margin: 0 0 18px; border-top: 1px solid var(--rule); }
.sessions li { counter-increment: s; border-bottom: 1px solid var(--rule); }
.sessions a { display: grid; grid-template-columns: 44px 1fr; column-gap: 8px; padding: 12px 0; color: var(--ink); text-decoration: none; }
.sessions a::before { content: counter(s); grid-row: span 2; font-weight: 800; font-stretch: 125%; font-size: 1.6rem; line-height: 1.1; color: var(--blue); }
.sessions b { font-weight: 700; }
.sessions span { color: var(--pencil); font-size: .95rem; }
.sessions a:hover b { text-decoration: underline; }

.say {
  position: relative; margin: 12px 0 0; padding: 26px 28px 22px 34px; background: var(--sheet);
  border-radius: 6px; max-width: 860px;
}
.say::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; border-radius: 6px 0 0 6px;
  background: repeating-linear-gradient(180deg, var(--tape) 0 9px, var(--tape-deep) 9px 10px); }
.say h3 { font-size: 1.35rem; font-stretch: 112%; font-weight: 800; }
.say p { margin: 0; max-width: 70ch; }

/* ---------------------------------------------------------------- steps */
.step { padding-top: clamp(72px, 10vw, 128px); }
.step-head { display: grid; grid-template-columns: auto 1fr; gap: clamp(16px, 3vw, 36px); align-items: start; margin-bottom: 36px; }
.num {
  font-weight: 900; font-stretch: 125%; font-size: clamp(4.5rem, 11vw, 8.5rem); line-height: .78; letter-spacing: -.05em;
  color: var(--ink); padding: 0 .06em .02em; background: linear-gradient(transparent 58%, var(--tape) 58% 92%, transparent 92%);
}
.num-alt { font-weight: 700; font-size: clamp(3.4rem, 8vw, 6rem); line-height: .9; }
.wide { margin: 0 0 8px; }
.wide img { background: transparent; }

.code, .term {
  margin: 0; padding: 18px 20px; border-radius: 6px; overflow-x: auto; font: 13.5px/1.6 var(--mono);
  -webkit-overflow-scrolling: touch;
}
.code { background: var(--sheet); border: 1px solid var(--rule); color: var(--ink); }
.code code, .term code { background: none; padding: 0; font: inherit; }
.code .c { color: var(--pencil); }
.term { background: var(--ink); color: #d4dbe0; margin: 4px 0 40px; }
.term b { color: #9fd38a; font-weight: 600; }
.two-media figure { margin-top: 6px; }

.prompt { margin: 44px 0; max-width: 820px; }
.prompt-tight { margin: 0; }
.prompt-note {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .9rem; font-weight: 600; color: var(--ink);
}
.prompt-note::before {
  content: ""; width: 14px; height: 18px; flex: none;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 18'%3E%3Crect x='3.5' y='1' width='7' height='10' rx='3.5' fill='none' stroke='%231d2731' stroke-width='1.8'/%3E%3Cpath d='M1.2 8.5a5.8 5.8 0 0 0 11.6 0M7 14.4V17' fill='none' stroke='%231d2731' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}
.prompt blockquote {
  margin: 0; padding: 24px 28px; background: var(--sheet); border-radius: 6px; border-left: 3px solid var(--blue);
  font: italic 400 1.14rem/1.62 var(--voice); color: #26313b;
}
.prompt blockquote p { max-width: 66ch; }
.prompt blockquote p:last-child { margin-bottom: 0; }

.done { border-top: 1.5px solid var(--ink); padding-top: 18px; margin-top: 8px; max-width: 820px; }
.done h3 { font-stretch: 112%; }
.done ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px; }
.done li { position: relative; padding-left: 28px; font-size: .98rem; }
.done li::before { content: ""; position: absolute; left: 0; top: .28em; width: 16px; height: 16px; border: 1.5px solid var(--ink); border-radius: 3px; }
@media (max-width: 640px) { .done ul { grid-template-columns: 1fr; } }

/* rooms mosaic */
.rooms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rooms .r-big { grid-column: span 2; grid-row: span 2; }
.rooms .r-big img { height: 100%; object-fit: cover; }
.rooms .r-big { display: flex; flex-direction: column; }
.rooms .r-big img { flex: 1; min-height: 0; }
@media (max-width: 760px) { .rooms { grid-template-columns: 1fr 1fr; } }

.callout { background: var(--sheet); border-radius: 6px; padding: 24px 28px; max-width: 820px; margin: 8px 0 0; }
.callout p { margin: 0; max-width: 66ch; }

.uses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 8px 0 0; }
.uses figcaption { font-weight: 600; color: var(--ink); }
@media (max-width: 760px) { .uses { grid-template-columns: 1fr 1fr; } }

/* share */
.hosts { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 0; border-top: 1.5px solid var(--ink); margin-bottom: 8px; }
.host { padding: 20px 24px 8px 0; }
.host + .host { padding-left: 24px; border-left: 1px solid var(--rule); }
.host p { font-size: .98rem; color: var(--ink); }
.host-pick h3::after { content: "my pick"; margin-left: 10px; font-size: .74rem; font-weight: 700; background: var(--tape); padding: 2px 8px; border-radius: 99px; vertical-align: 2px; }
@media (max-width: 860px) { .hosts { grid-template-columns: 1fr; } .host + .host { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); } }

/* skill */
main > section.skill { max-width: none; padding: 0; margin-top: clamp(72px, 10vw, 128px); background: var(--ink); color: #e9eef0; }
.skill-inner { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 8vw, 96px) var(--gutter); }
.skill .lede { color: #e9eef0; margin-bottom: 28px; }
.skill code { background: rgba(255, 255, 255, .1); color: #f4f6f7; }
.install { list-style: none; padding: 0; margin: 40px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid #3c4955; }
.install li { padding: 18px 24px 10px 0; }
.install li + li { padding-left: 24px; border-left: 1px solid #3c4955; }
.install b { display: block; font-stretch: 112%; font-size: 1.05rem; margin-bottom: 6px; }
.install span { color: #c3ccd2; font-size: .96rem; }
@media (max-width: 860px) { .install { grid-template-columns: 1fr; } .install li + li { padding-left: 0; border-left: 0; border-top: 1px solid #3c4955; } }
.advice { border-left: 3px solid var(--tape); padding: 4px 0 4px 24px; max-width: 720px; }
.advice h3 { color: var(--tape); font-stretch: 112%; }
.advice p { margin: 0; font: italic 400 1.22rem/1.55 var(--voice); color: #f1f4f5; }

/* tips */
.tips { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(24px, 4vw, 64px); margin: 24px 0 0; }
.tips > div { border-top: 1px solid var(--rule); padding: 18px 0 14px; }
.tips dt { font-weight: 700; margin-bottom: 4px; }
.tips dd { margin: 0; color: var(--pencil); max-width: 60ch; }
@media (max-width: 760px) { .tips { grid-template-columns: 1fr; } }

/* footer */
.foot {
  width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--max) - 2 * var(--gutter)); margin: clamp(72px, 10vw, 120px) auto 0;
  padding: 28px 0 56px; border-top: 1.5px solid var(--ink);
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
}
.foot p { margin: 0; color: var(--pencil); font-size: .94rem; max-width: 64ch; }

/* zoom dialog */
#zoom { padding: 0; border: 0; background: transparent; max-width: min(96vw, 1600px); max-height: 94vh; }
#zoom::backdrop { background: rgba(14, 19, 24, .86); }
#zoom img { max-height: 88vh; width: auto; border-radius: 6px; }
.zoom-close { position: absolute; top: 10px; right: 10px; font: 700 .9rem var(--sans); padding: 8px 14px; border-radius: 99px; border: 0; background: var(--tape); color: var(--ink); cursor: pointer; }
.hero-plan .plan text { font-family: var(--sans); }
.two > *, .hero > *, .step-head > * { min-width: 0; }
