/* ==========================================================================
   "Why Good Design Is More Than Just Good Usability"
   (/blog/an-introduction-to-emotional-design) — article-only styles.
   Everything is scoped to .ed / .ed-page so no other page is affected.

   Concept: the page lives through a day. Norman's levels unfold over time
   (first impression, daily use, long-term meaning), so the light changes as
   you read, using only colours already on the site:
     opening    butter  (the homepage "hooked" statement)
     visceral   sky     (the homepage hero)
     behavioral paper   (daylight, work)
     reflective ink + amber glow (the footer's evening)
     AirPods + digital  paper (morning again)
     closing    butter  (full circle)
   ========================================================================== */

.ed-page {
  --ed-sky: #5dcbf7;
  --ed-sky-2: #a8e3f5;
  --ed-butter: #ffda70;
  --ed-amber: #fdb73b;
  --ed-paper: #f7f6f1;
  --ed-ink: #0b0b0c;
  --ed-white: #ffffff;
  --ed-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ed-shift: 380px; /* how long the light takes to change between chapters */
  /* type: Montserrat stays the site's display voice; Newsreader carries the reading */
  --ed-serif: "Newsreader", Georgia, "Times New Roman", serif;
  background: var(--ed-butter);
}

.ed { color: var(--ed-ink); font-family: var(--font); }
.ed-wrap { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin-inline: auto; }
.ed :focus-visible { outline: 2.5px solid var(--ed-ink); outline-offset: 3px; border-radius: 6px; }
.ed-ch--r :focus-visible { outline-color: var(--ed-amber); }
.ed cite { font-style: italic; }

/* ---------- opening ---------- */
.ed-open { background: var(--ed-butter); padding: clamp(150px, 15vw, 210px) 0 0; }
.ed-open-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 26px; font-weight: 600; font-size: 1rem; }
.ed-open-meta span,
.ed-open-meta time { opacity: 0.7; }
.ed-back { font-weight: 600; opacity: 0.85; text-underline-offset: 4px; transition: opacity 0.2s; }
.ed-back:hover { opacity: 1; text-decoration: underline; }

.ed-open-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.4vw, 40px);
  margin-top: clamp(28px, 4vw, 56px);
}
.ed-open-head { display: contents; }
.ed-title {
  grid-column: 1 / -1;
  position: relative;
  z-index: 2;
  font-family: "Montserrat", var(--font);
  font-weight: 800;
  font-size: clamp(2.7rem, 7.6vw, 8rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}
.ed-title span { display: block; }
.ed-sub {
  grid-column: 1 / 6;
  align-self: end;
  max-width: 24ch;
  padding-bottom: 6px;
  font-family: var(--ed-serif);
  font-style: italic;
  font-size: clamp(1.35rem, 1.9vw, 1.85rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* the opening object: a studio plate the title slightly overlaps */
.ed-hero-plate {
  grid-column: 6 / 13;
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 5 / 4;
  margin-top: clamp(36px, 4.4vw, 72px);
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(70% 60% at 22% 18%, #fffdf7 0%, rgba(255, 253, 247, 0) 70%),
    linear-gradient(180deg, #f6f1e3 0%, #ece3cb 100%);
}
.ed-hero-plate { place-items: initial; }
/* a close crop: the case runs off the frame, so the whole object is only revealed later, in "One product. Three experiences." */

/* ---------- introduction + the three levels ---------- */
.ed-intro-sec { background: var(--ed-butter); padding: clamp(90px, 10vw, 150px) 0 clamp(100px, 11vw, 170px); }
.ed-first { font-size: clamp(1.75rem, 2.8vw, 2.6rem) !important; line-height: 1.15 !important; letter-spacing: -0.015em; font-variation-settings: "opsz" 60 !important; }

.ed-index {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.4vw, 40px);
  margin-top: clamp(72px, 8vw, 120px);
}
.ed-index-item { position: relative; display: grid; align-content: start; gap: 8px; padding: 18px 0 6px; border-top: 2px solid var(--ed-ink); }
.ed-index-n { font-weight: 600; font-size: 0.95rem; opacity: 0.6; font-variant-numeric: tabular-nums; }
.ed-index-item strong { font-family: "Montserrat", var(--font); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.8rem); letter-spacing: -0.05em; line-height: 1; }
.ed-index-item span:last-child { font-size: 1.05rem; opacity: 0.75; }
/* each entry carries a swatch of its chapter's light */
.ed-index-item::after {
  content: "";
  position: absolute;
  top: 20px;
  right: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--ed-ink);
  transition: transform 0.5s var(--ed-out);
}
.ed-index-item--v::after { background: var(--ed-sky); }
.ed-index-item--b::after { background: var(--ed-paper); }
.ed-index-item--r::after { background: var(--ed-ink); }
.ed-index-item:hover::after,
.ed-index-item:focus-visible::after { transform: scale(1.8); }

/* ---------- chapters: the light changes between them ---------- */
.ed-ch { position: relative; padding: clamp(110px, 12vw, 190px) 0 clamp(120px, 14vw, 220px); }
/* butter to sky passes through a pale midpoint so the blend never turns green */
.ed-ch--v {
  padding-top: clamp(220px, 20vw, 320px);
  background: linear-gradient(180deg, var(--ed-butter) 0, #fcf2d8 calc(var(--ed-shift) * 0.24), #e3f5fc calc(var(--ed-shift) * 0.38), var(--ed-sky) calc(var(--ed-shift) * 0.6), var(--ed-sky) 55%, var(--ed-sky-2) 100%);
}
.ed-ch--b { background: linear-gradient(180deg, var(--ed-sky-2) 0, var(--ed-paper) var(--ed-shift), var(--ed-paper) 100%); }
.ed-ch--r {
  padding-top: clamp(240px, 22vw, 340px);
  color: var(--ed-paper);
  background:
    radial-gradient(50% 40% at 85% 30%, rgba(253, 183, 59, 0.14) 0%, rgba(253, 183, 59, 0) 70%),
    radial-gradient(60% 30% at 10% 92%, rgba(253, 183, 59, 0.1) 0%, rgba(253, 183, 59, 0) 70%),
    linear-gradient(180deg, var(--ed-paper) 0, #2a2a2b calc(var(--ed-shift) * 0.7), var(--ed-ink) var(--ed-shift), var(--ed-ink) 100%);
}
.ed-ch--t { background: linear-gradient(180deg, var(--ed-ink) 0, #2a2a2b calc(var(--ed-shift) * 0.3), var(--ed-paper) var(--ed-shift), var(--ed-paper) 100%); }
.ed-ch--d { background: var(--ed-paper); padding-top: 0; }

/* the chapter word: one big gesture per level */
.ed-word {
  font-family: "Montserrat", var(--font);
  font-weight: 800;
  font-size: clamp(3.4rem, 15.2vw, 16.5rem);
  line-height: 0.82;
  letter-spacing: -0.065em;
  margin-left: -0.05em;
  white-space: nowrap;
  user-select: none;
}
.ed-word--v { color: var(--ed-white); }
.ed-word--b { color: var(--ed-ink); }
.ed-word--r { display: grid; color: var(--ed-paper); }
.ed-mirror {
  display: block;
  height: 0.62em;
  overflow: hidden;
  margin-top: 0.02em;
  transform: scaleY(-1);
  transform-origin: 50% 0;
  translate: 0 0.62em;
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0) 75%);
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0) 75%);
}

.ed-h2 {
  margin-top: clamp(30px, 3.4vw, 52px);
  font-family: "Montserrat", var(--font);
  font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
  max-width: 20ch;
  text-wrap: balance;
}
.ed-h2--lead { margin-top: 0; }
.ed-h2 + .ed-text { margin-top: clamp(26px, 3vw, 44px); }

/* reading column */
.ed-text { max-width: 40rem; }
.ed-text > * + * { margin-top: 1.05em; }
.ed-text p { font-family: var(--ed-serif); font-size: clamp(1.2rem, 1.4vw, 1.38rem); line-height: 1.6; letter-spacing: -0.003em; font-variation-settings: "opsz" 18; }
.ed-segue { font-style: italic; }
* + .ed-text { margin-top: clamp(48px, 6vw, 90px); }

/* typographic moments: set in the site's display face, never centred */
.ed-statement {
  max-width: 17ch;
  margin: clamp(80px, 10vw, 150px) 0 clamp(64px, 8vw, 120px);
  font-family: var(--ed-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.3rem, 5.2vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 72;
  text-wrap: balance;
}

/* ---------- images ---------- */
.ed-frame { overflow: hidden; border-radius: 22px; background: rgba(11, 11, 12, 0.08); }
.ed-frame img { width: 100%; height: 100%; object-fit: cover; }

/* visceral: one composition, three crops */
.ed-tri {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 28px);
  margin-top: clamp(56px, 7vw, 110px);
  align-items: start;
}
.ed-tri .ed-frame { aspect-ratio: 3 / 4; }
.ed-tri .ed-plate:nth-child(2) { margin-top: clamp(40px, 7vw, 120px); }
.ed-tri .ed-plate:nth-child(1) img { object-position: 74% 50%; }
.ed-tri .ed-plate:nth-child(2) img { object-position: 55% 40%; }
.ed-tri .ed-plate:nth-child(3) img { object-position: 24% 62%; }
.ed-tri figcaption { margin-top: 12px; font-family: var(--ed-serif); font-style: italic; font-size: 1.08rem; opacity: 0.8; }

/* reflective: a full-bleed still, then a quiet pair */
.ed-bleed { margin: clamp(64px, 8vw, 130px) 0; }
.ed-bleed-frame { position: relative; height: clamp(320px, 44vw, 660px); overflow: hidden; }
.ed-bleed-frame img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; object-position: 50% 50%; will-change: transform; }
.ed-spread {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.4vw, 40px);
  row-gap: 40px;
  margin-top: clamp(56px, 7vw, 110px);
  align-items: start;
}
.ed-spread--r .ed-plate--a { grid-column: 2 / 7; }
.ed-spread--r .ed-plate--a .ed-frame { aspect-ratio: 4 / 5; }
.ed-spread--r .ed-plate--a img { object-position: 38% 70%; }
.ed-spread--r .ed-plate--b { grid-column: 8 / 13; margin-top: clamp(80px, 12vw, 200px); }
.ed-spread--r .ed-plate--b .ed-frame { aspect-ratio: 4 / 3; }
/* evening grade: the photos sit quieter in the dark chapter */
.ed-ch--r img { filter: saturate(0.8) contrast(1.03); }
.ed-ch--r .ed-frame { background: rgba(255, 255, 255, 0.06); }

/* ---------- microwave comparison (behavioral) ----------
   Two appliance control panels, drawn as objects: A in black glass with a
   green fluorescent display and a membrane keypad; B in brushed steel with
   three proper keys. Nothing else: no doors, no cartoon. */
.ed-mw { margin-top: clamp(64px, 8vw, 120px); }
.ed-mw-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; }
.ed-mw-title { max-width: 22ch; font-family: var(--ed-serif); font-style: italic; font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.12; letter-spacing: -0.02em; font-variation-settings: "opsz" 48; }
.ed-skip { font-weight: 600; font-size: 0.95rem; text-decoration: underline; text-underline-offset: 4px; opacity: 0.7; }
.ed-skip:hover { opacity: 1; }
.ed-mw-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 340px));
  justify-content: center;
  gap: clamp(28px, 6vw, 110px);
  margin-top: clamp(36px, 4vw, 60px);
  padding: clamp(40px, 5vw, 72px) 0 clamp(28px, 3vw, 40px);
  border-radius: 28px;
  background: radial-gradient(80% 70% at 50% 35%, #ffffff 0%, #ecebe5 100%);
}
.mw { display: grid; justify-items: center; }
.mw-panel {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 22px 24px;
  border-radius: 14px;
  min-height: 470px;
}
/* the panel's soft floor shadow */
.mw-panel::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: -18px; height: 20px; border-radius: 50%; background: radial-gradient(closest-side, rgba(11, 11, 12, 0.22), rgba(11, 11, 12, 0)); z-index: -1; }
.mw { position: relative; z-index: 0; }

.mw--busy .mw-panel {
  background: linear-gradient(160deg, #2a2b2e 0%, #141416 38%, #0d0d0f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 30px 50px -30px rgba(11, 11, 12, 0.6);
}
/* a single reflection across the glass */
.mw--busy .mw-panel::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0 30%, rgba(255, 255, 255, 0) 30% 100%); pointer-events: none; }
.mw--calm .mw-panel {
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, rgba(0, 0, 0, 0.02) 1px 3px), linear-gradient(180deg, #e9e9e7 0%, #cfd0cd 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(11, 11, 12, 0.1), 0 30px 50px -30px rgba(11, 11, 12, 0.5);
}

/* the oven lamp: a thin strip that warms up while it runs */
.mw-lamp { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); transition: background 0.5s ease, box-shadow 0.5s ease; }
.mw--calm .mw-lamp { background: rgba(11, 11, 12, 0.1); }
.mw.is-on .mw-lamp { background: #ffb547; box-shadow: 0 0 18px 2px rgba(255, 181, 71, 0.55); }

.mw-lcd {
  display: block;
  padding: 14px 16px;
  border-radius: 6px;
  font-family: "Montserrat", var(--font);
  font-weight: 600;
  font-size: 1.7rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
}
.mw--busy .mw-lcd { background: #050807; color: #6cf5c9; text-shadow: 0 0 10px rgba(108, 245, 201, 0.55); box-shadow: inset 0 0 0 1px rgba(108, 245, 201, 0.08); }
.mw--calm .mw-lcd { background: #17130c; color: var(--ed-amber); text-shadow: 0 0 10px rgba(253, 183, 59, 0.45); }

.mw-keys { flex: 1; display: grid; min-height: 0; }
.mw--busy .mw-keys { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(30px, 1fr); gap: 1px; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, 0.12); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); }
.mw--busy .mw-keys button {
  min-width: 0;
  padding: 2px;
  border: 0;
  background: #141416;
  color: rgba(255, 255, 255, 0.62);
  font: 500 9.5px/1.1 var(--font);
  cursor: pointer;
  overflow: hidden;
}
.mw--busy .mw-keys button.is-digit { color: rgba(255, 255, 255, 0.9); font-size: 13px; font-weight: 600; }
.mw--busy .mw-keys button:hover { background: #1d1d20; color: #fff; }
.mw--busy .mw-keys button:active { background: #26262a; }

.mw--calm .mw-keys { grid-template-rows: 1fr 1.25fr 1fr; gap: 12px; margin-top: 10px; }
.mw--calm .mw-keys button {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfbfa 0%, #e6e6e3 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 0 0 1px rgba(11, 11, 12, 0.16), 0 3px 0 #b9bab6, 0 6px 12px -6px rgba(11, 11, 12, 0.4);
  color: var(--ed-ink);
  font: 700 1.15rem/1.1 "Montserrat", var(--font);
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: translate 0.08s ease, box-shadow 0.08s ease;
}
.mw--calm .mw-keys button:active { translate: 0 2px; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 0 0 1px rgba(11, 11, 12, 0.16), 0 1px 0 #b9bab6, 0 3px 6px -4px rgba(11, 11, 12, 0.4); }
.mw--calm .mw-keys button.is-main { background: linear-gradient(180deg, #2b2b2d 0%, #0d0d0f 100%); color: var(--ed-white); box-shadow: 0 0 0 1px #000, 0 3px 0 #000, 0 8px 14px -6px rgba(11, 11, 12, 0.6); }

.mw-label { margin-top: 30px; font-size: 0.98rem; }
.mw-label strong { font-weight: 700; margin-right: 6px; }
.mw-label { color: rgba(11, 11, 12, 0.6); }
.mw-label strong { color: var(--ed-ink); }
.mw-state { min-height: 3em; max-width: 30ch; margin-top: 6px; font-family: var(--ed-serif); font-style: italic; font-size: 1.08rem; line-height: 1.4; text-align: center; }
.ed-mw-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; margin-top: 18px; }
.ed-mw-result { font-family: var(--ed-serif); font-size: 1.25rem; }
.ed-mw-reset { padding: 0; border: 0; background: none; color: inherit; font: 600 0.95rem var(--font); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; opacity: 0.7; }
.ed-mw-reset:hover { opacity: 1; }

/* ---------- One product. Three experiences. ----------
   Three photographs of the same product; the level names are the controls. */
.ap { margin-top: clamp(64px, 8vw, 120px); }
.ap-title { font-family: "Montserrat", var(--font); font-weight: 800; font-size: clamp(1.8rem, 3.4vw, 3.2rem); line-height: 1; letter-spacing: -0.05em; }
.ap-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.4vw, 40px);
  margin-top: clamp(28px, 3.4vw, 48px);
  align-items: end;
}
.ap-photos { grid-column: 1 / 8; position: relative; aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden; background: #1a1a1b; }
.ap-photo { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 0.8s ease; }
.ap-photo img { width: 100%; height: 100%; object-fit: cover; scale: 1.04; transition: scale 1.6s var(--ed-out); }
.ap-photo--v img { object-position: 44% 50%; }
.ap-photo--b img { object-position: 50% 30%; }
.ap-photo--r img { object-position: 50% 25%; }
.ap[data-level="v"] .ap-photo--v,
.ap[data-level="b"] .ap-photo--b,
.ap[data-level="r"] .ap-photo--r { opacity: 1; }
.ap[data-level="v"] .ap-photo--v img,
.ap[data-level="b"] .ap-photo--b img,
.ap[data-level="r"] .ap-photo--r img { scale: 1; }

.ap-side { grid-column: 8 / 13; padding-bottom: 6px; }
.ap-tabs { display: grid; justify-items: start; gap: 2px; }
.ap-tabs button {
  position: relative;
  padding: 2px 0 2px 34px;
  border: 0;
  background: none;
  color: var(--ed-ink);
  font: 800 clamp(1.9rem, 3.4vw, 3.3rem)/1.08 "Montserrat", var(--font);
  letter-spacing: -0.05em;
  opacity: 0.22;
  cursor: pointer;
  transition: opacity 0.35s ease;
}
.ap-tabs button::before { content: ""; position: absolute; left: 0; top: 50%; width: 0; height: 3px; background: var(--ed-ink); transition: width 0.45s var(--ed-out); }
.ap-tabs button:hover { opacity: 0.5; }
.ap-tabs button[aria-selected="true"] { opacity: 1; }
.ap-tabs button[aria-selected="true"]::before { width: 22px; }
.ap-panels { margin-top: clamp(24px, 3vw, 40px); padding-left: 34px; min-height: 7.5em; }
.ap-panels p { max-width: 26rem; font-family: var(--ed-serif); font-size: clamp(1.2rem, 1.4vw, 1.38rem); line-height: 1.55; }

/* ---------- confirmation microinteraction (digital) ----------
   The same form, twice. Utilitarian looks like a default admin screen and
   answers in log-speak; reassuring shows progress, then the change itself. */
.ed-confirm { max-width: 32rem; margin-top: clamp(48px, 6vw, 90px); }
.cf-switch { display: inline-flex; padding: 4px; border-radius: 999px; background: #e9e7df; }
.cf-switch button { padding: 9px 16px; border: 0; border-radius: 999px; background: none; color: var(--ed-ink); font: 600 0.95rem var(--font); cursor: pointer; transition: background 0.3s, box-shadow 0.3s; }
.cf-switch button[aria-pressed="true"] { background: var(--ed-white); box-shadow: 0 1px 3px rgba(11, 11, 12, 0.14); }
.cf-card { position: relative; margin-top: 14px; transition: border-radius 0.3s ease, background 0.3s ease, box-shadow 0.3s ease; }
.cf-row { display: flex; align-items: flex-end; gap: 16px; }
.cf-field { flex: 1; display: grid; gap: 8px; }
.cf-input { width: 100%; min-width: 0; color: var(--ed-ink); }
.cf-btn { position: relative; margin-top: 18px; cursor: pointer; }
.cf-note { margin-top: 12px; font-size: 0.95rem; opacity: 0.6; }
.cf-spin, .cf-tick { display: none; }
.cf-msg-wrap { display: grid; grid-template-rows: 1fr; }
.cf-msg { min-height: 1.4em; margin-top: 14px; }

/* utilitarian: grey, square, system type, a status code */
.cf[data-tone="plain"] .cf-card { padding: 18px; border-radius: 2px; background: #f4f4f4; box-shadow: 0 0 0 1px #c9c9c9; font-family: Arial, Helvetica, sans-serif; }
.cf[data-tone="plain"] .cf-avatar { display: none; }
.cf[data-tone="plain"] .cf-field label { font-size: 12px; font-weight: 700; color: #555; }
.cf[data-tone="plain"] .cf-input { padding: 5px 6px; border: 1px solid #a9a9a9; border-radius: 0; background: #fff; font: 13px Arial, Helvetica, sans-serif; }
.cf[data-tone="plain"] .cf-input:focus { outline: 1px solid #555; outline-offset: 0; }
.cf[data-tone="plain"] .cf-btn { padding: 4px 14px; border: 1px solid #8f8f8f; border-radius: 2px; background: linear-gradient(#fafafa, #dedede); color: #111; font: 13px Arial, Helvetica, sans-serif; }
.cf[data-tone="plain"] .cf-msg { font: 11px/1.4 Menlo, Consolas, monospace; color: #777; }

/* reassuring: a person's profile, progress, then the change said back */
.cf[data-tone="warm"] .cf-card { padding: clamp(22px, 2.6vw, 32px); border-radius: 26px; background: var(--ed-white); box-shadow: 0 0 0 1px rgba(11, 11, 12, 0.06), 0 24px 50px -30px rgba(11, 11, 12, 0.35); }
.cf-avatar { position: relative; flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--ed-butter); font: 800 1.5rem "Montserrat", var(--font); letter-spacing: -0.04em; transition: box-shadow 0.4s ease; }
.cf-badge { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: #2f9e5c; box-shadow: 0 0 0 3px var(--ed-white); opacity: 0; scale: 0.4; transition: opacity 0.25s ease, scale 0.45s var(--ed-out); }
.cf-badge::after { content: ""; position: absolute; left: 7px; top: 6px; width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; rotate: -45deg; }
.cf[data-tone="warm"] .cf-field label { font-size: 0.9rem; font-weight: 600; }
.cf[data-tone="warm"] .cf-input { padding: 12px 14px; border: 0; border-radius: 12px; background: var(--ed-paper); box-shadow: inset 0 0 0 1.5px transparent; font: 500 1.08rem var(--font); transition: box-shadow 0.3s ease; }
.cf[data-tone="warm"] .cf-input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--ed-ink); }
.cf[data-tone="warm"] .cf-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 148px; height: 50px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--ed-ink); color: var(--ed-white); font: 600 1rem var(--font); transition: background 0.3s ease; }
.cf[data-tone="warm"] .cf-spin { display: block; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: #fff; opacity: 0; animation: cf-spin 0.7s linear infinite; }
.cf[data-tone="warm"] .cf-tick { display: block; position: absolute; width: 18px; height: 10px; margin-top: -4px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg) scale(0.4); opacity: 0; transition: opacity 0.2s ease, transform 0.4s var(--ed-out); }
@keyframes cf-spin { to { rotate: 360deg; } }
.cf[data-tone="warm"].is-saving .cf-btn-text { opacity: 0; }
.cf[data-tone="warm"].is-saving .cf-spin { opacity: 1; }
.cf[data-tone="warm"].is-saved .cf-btn { background: #2f9e5c; }
.cf[data-tone="warm"].is-saved .cf-btn-text { opacity: 0; }
.cf[data-tone="warm"].is-saved .cf-tick { opacity: 1; transform: rotate(-45deg) scale(1); }
.cf[data-tone="warm"].is-saved .cf-avatar { box-shadow: 0 0 0 3px var(--ed-white), 0 0 0 5px #2f9e5c; }
.cf[data-tone="warm"].is-saved .cf-badge { opacity: 1; scale: 1; }
.cf[data-tone="warm"].is-saved .cf-input { box-shadow: inset 0 0 0 1.5px #2f9e5c; }
.cf[data-tone="warm"] .cf-msg-wrap { grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ed-out); }
.cf[data-tone="warm"].is-saved .cf-msg-wrap { grid-template-rows: 1fr; }
.cf[data-tone="warm"] .cf-msg { overflow: hidden; min-height: 0; margin-top: 0; }
.cf[data-tone="warm"].is-saved .cf-msg { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: #e8f5ed; color: #1d6b3d; font-weight: 600; font-size: 1rem; line-height: 1.4; }

/* ---------- closing: back to butter ---------- */
.ed-end {
  padding: clamp(110px, 12vw, 190px) 0 clamp(150px, 16vw, 250px);
  background: linear-gradient(180deg, var(--ed-paper) 0, var(--ed-butter) var(--ed-shift), var(--ed-butter) 100%);
}
.ed-three { margin: clamp(56px, 7vw, 100px) 0 0; padding: 0; list-style: none; }
.ed-three li {
  font-family: var(--ed-serif);
  font-size: clamp(1.6rem, 2.8vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 60;
}
.ed-three li + li { margin-top: 0.3em; }
.ed-last {
  max-width: 16ch;
  margin-top: clamp(110px, 13vw, 200px);
  font-family: "Montserrat", var(--font);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.2vw, 5rem);
  line-height: 1;
  letter-spacing: -0.055em;
}
.ed-back--end { display: inline-block; margin-top: clamp(64px, 8vw, 110px); }

/* ---------- desktop editorial axis: reading column right of centre ---------- */
@media (min-width: 1000px) {
  .ed-ch > .ed-wrap > .ed-h2,
  .ed-ch > .ed-wrap > .ed-text,
  .ed-intro-sec .ed-text,
  .ed-end .ed-wrap > .ed-h2,
  .ed-end .ed-wrap > .ed-text,
  .ed-three,
  .ed-confirm { margin-left: 33.333%; }
  .ed-statement { margin-left: 8.333%; }
  .ed-last,
  .ed-back--end { margin-left: 33.333%; }
}

/* ---------- motion (in-view states set by emotional-design.js) ---------- */
.js .ed-title span { opacity: 0; translate: 0 0.3em; animation: ed-rise 1.15s var(--ed-out) forwards; }
.js .ed-title span:nth-child(2) { animation-delay: 0.08s; }
.js .ed-title span:nth-child(3) { animation-delay: 0.16s; }
.js .ed-open-meta,
.js .ed-sub { opacity: 0; animation: ed-fade 1s ease 0.55s forwards; }
.js .ed-hero-plate { opacity: 0; animation: ed-fade 1.4s ease 0.35s forwards; }
@keyframes ed-rise { to { opacity: 1; translate: 0 0; } }
@keyframes ed-fade { to { opacity: 1; } }

/* each chapter word moves the way its level feels */
.js .ed-word--v { opacity: 0; scale: 1.035; transform-origin: 0 100%; transition: opacity 0.4s ease-out, scale 0.7s var(--ed-out); }   /* instant */
.js .ed-word--b { opacity: 0; translate: 0 0.14em; transition: opacity 0.9s ease, translate 1s var(--ed-out); }                       /* steady */
.js .ed-word--r > span:first-child { opacity: 0; transition: opacity 1.8s ease; }                                                         /* slow */
.js .ed-word--r .ed-mirror { opacity: 0; transition: opacity 2.2s ease 0.9s; }
.ed-word.is-in { opacity: 1; scale: 1; translate: 0 0; }
.ed-word--r.is-in > span:first-child { opacity: 1; }
.ed-word--r.is-in .ed-mirror { opacity: 1; }

.js .ed-plate { opacity: 0; transition: opacity 1s ease; }
.js .ed-plate .ed-frame img { scale: 1.06; transition: scale 1.6s var(--ed-out); }
.ed-plate.is-in { opacity: 1; }
.ed-plate.is-in .ed-frame img { scale: 1; }
.js .ed-tri .ed-plate:nth-child(2) { transition-delay: 0.12s; }
.js .ed-tri .ed-plate:nth-child(3) { transition-delay: 0.24s; }
.js .ed-statement,
.js .ed-last { opacity: 0; transition: opacity 1.1s ease; }
.js .ed-statement--slow { transition-duration: 2s; }
.ed-statement.is-in,
.ed-last.is-in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .js .ed-title span, .js .ed-open-meta, .js .ed-sub, .js .ed-hero-plate { animation: none; opacity: 1; translate: none; }
  .js .ed-word, .js .ed-word--r > span, .js .ed-word--r .ed-mirror,
  .js .ed-plate, .js .ed-statement, .js .ed-last { opacity: 1; scale: 1; translate: none; transition: none; }
  .js .ed-plate .ed-frame img { scale: 1; transition: none; }
  .ap-photo, .ap-photo img, .ap-tabs button, .ap-tabs button::before, .mw-lamp, .cf-tick, .cf-badge, .cf-msg-wrap, .cf-switch button, .ed-index-item::after { transition: none !important; }
  .cf-spin { animation: none !important; }
  .ed-bleed-frame img { transform: none !important; }
}

/* ---------- tablet & phone ---------- */
@media (max-width: 999px) {
  .ed-sub { grid-column: 1 / -1; margin-top: 24px; }
  .ed-hero-plate { grid-column: 1 / -1; margin-top: 36px; aspect-ratio: 4 / 3; }
  .ed-spread--r .ed-plate--a { grid-column: 1 / 10; }
  .ed-spread--r .ed-plate--b { grid-column: 3 / 13; margin-top: 0; }
}

@media (max-width: 700px) {
  .ed-page { --ed-shift: 240px; }
  .ed-title { font-size: 12.6vw; line-height: 0.95; text-wrap: balance; }
  .ed-title span { display: inline; }
  .ed-hero-plate { aspect-ratio: 1 / 1; border-radius: 24px; }
  .ed-index { grid-template-columns: 1fr; gap: 0; margin-top: 56px; }
  .ed-index-item { grid-template-columns: 34px 1fr; align-items: baseline; padding: 16px 30px 16px 0; border-top-width: 1.5px; }
  .ed-index-item span:last-child { grid-column: 2; }
  .ed-word { font-size: 17vw; }
  .ed-tri { grid-template-columns: 1fr 1fr; }
  .ed-tri .ed-plate:nth-child(1) { grid-column: 1 / -1; }
  .ed-tri .ed-plate:nth-child(1) .ed-frame { aspect-ratio: 4 / 3; }
  .ed-tri .ed-plate:nth-child(2) { margin-top: 0; }
  .ed-spread--r .ed-plate--a,
  .ed-spread--r .ed-plate--b { grid-column: 1 / 13; }
  .ed-frame { border-radius: 18px; }
  .ed-bleed-frame { height: 300px; }

  .ed-mw-pair { grid-template-columns: 1fr; gap: 44px; padding: 32px 18px 20px; border-radius: 22px; }
  .mw-panel { min-height: 0; }
  .mw--busy .mw-keys { grid-auto-rows: 38px; }
  .mw--calm .mw-keys { grid-template-rows: 54px 64px 54px; }

  .ap-photos { grid-column: 1 / -1; aspect-ratio: 4 / 5; border-radius: 20px; }
  .ap-side { grid-column: 1 / -1; padding-top: 22px; }
  .ap-tabs { grid-template-columns: repeat(3, auto); justify-content: start; gap: 18px; }
  .ap-tabs button { padding: 0 0 8px; font-size: 1.35rem; }
  .ap-tabs button::before { top: auto; bottom: 0; }
  .ap-tabs button[aria-selected="true"]::before { width: 100%; }
  .ap-panels { padding-left: 0; margin-top: 18px; min-height: 6.5em; }

}


/* ==========================================================================
   Photography pass: each level opens on a full-bleed photograph with its
   word set over it. The light-of-day grounds continue underneath.
   ========================================================================== */
.ed-ch,
.ed-ch--v,
.ed-ch--r { padding-top: 0; }
.ed-cover { position: relative; height: min(88vh, 880px); min-height: 460px; overflow: hidden; background: #111; }
.ed-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ed-cover--b img { object-position: 50% 60%; }
.ed-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 8, 9, 0.62) 0%, rgba(8, 8, 9, 0.12) 45%, rgba(8, 8, 9, 0) 70%); pointer-events: none; }
.ed-cover-text { position: absolute; z-index: 2; left: 0; right: 0; bottom: clamp(28px, 4vw, 64px); }
.ed-cover .ed-word { color: var(--ed-white) !important; text-shadow: 0 2px 40px rgba(0, 0, 0, 0.25); }
.ed-cover .ed-word--r .ed-mirror { height: 0.3em; }
.ed-cover + .ed-wrap { padding-top: clamp(70px, 8vw, 120px); }
.ed-cover + .ed-wrap > .ed-h2 { margin-top: 0; }
.js .ed-cover img { scale: 1.07; transition: scale 2.6s var(--ed-out); }
.ed-cover.is-in img { scale: 1; }

.ed-credit { font-family: var(--font); font-size: 0.78rem; opacity: 0.6; }
.ed-credit a { text-decoration: underline; text-underline-offset: 2px; }
.ed-cover .ed-credit { position: absolute; z-index: 2; right: 16px; bottom: 12px; color: var(--ed-white); opacity: 0.7; }
.ed-credit--set { margin-top: 14px; }

/* opening: the photograph fills the plate */
.ed-hero-plate { background: #1a1612; }
.ed-hero-plate img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.ed-hero-plate .ed-credit { position: absolute; right: 14px; bottom: 10px; color: var(--ed-white); opacity: 0.7; }

/* the triptych and the reflective pair take the same warm, low-light grade */
.ed-tri .ed-frame img, .ed-spread--r .ed-frame img { filter: none; }

@media (prefers-reduced-motion: reduce) { .js .ed-cover img { scale: 1; transition: none; } }
@media (max-width: 700px) { .ed-cover { height: 72vh; min-height: 420px; } }

/* coming out of the reflective night: a clean cut back to daylight, no smear of dark behind the heading */
.ed-ch--t { padding-top: clamp(110px, 12vw, 190px); background: var(--ed-paper); }

/* opening: a portrait plate, so the person (not the product) leads */
.ed-hero-plate { grid-column: 7 / 13; aspect-ratio: 4 / 5; }
.ed-hero-plate img { object-position: 50% 30%; }
.ed-sub { grid-column: 1 / 6; }
@media (max-width: 999px) { .ed-hero-plate { grid-column: 1 / -1; aspect-ratio: 4 / 5; } }
@media (max-width: 700px) { .ed-hero-plate { aspect-ratio: 4 / 5; } }

/* the last line after the closing statement: quiet, in the reading voice */
.ed-coda { max-width: 40rem; margin-top: clamp(28px, 3vw, 44px); font-family: var(--ed-serif); font-style: italic; font-size: clamp(1.3rem, 1.8vw, 1.6rem); line-height: 1.4; }
@media (min-width: 1000px) { .ed-coda { margin-left: 33.333%; } }
.js .ed-coda { opacity: 0; transition: opacity 1.4s ease 0.6s; }
.ed-last.is-in + .ed-coda { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .js .ed-coda { opacity: 1; transition: none; } }

/* ---- microwaves, second pass: a realistic keypad, and a dial ---- */
.mw-panel { min-height: 0; }
.mw--busy .mw-keys { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 44px; }
.mw--busy .mw-keys button { font-size: 10.5px; }
.mw--busy .mw-keys button.is-digit { font-size: 15px; }
.mw--busy .mw-keys button.is-start { color: #6cf5c9; font-weight: 600; }
.mw--busy .mw-keys button:nth-child(-n+8) { color: rgba(255, 255, 255, 0.5); }

/* B: brushed steel, one dial, Start and Stop */
.mw--calm .mw-keys { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto; gap: 12px; margin-top: 8px; }
.mw-dial {
  --a: -150deg;
  position: relative;
  grid-column: 1 / -1;
  justify-self: center;
  width: min(190px, 100%);
  aspect-ratio: 1;
  margin: 14px 0 18px;
  border-radius: 50%;
  touch-action: none;
  cursor: grab;
}
.mw-dial:active { cursor: grabbing; }
.mw-dial:focus-visible { outline: 2.5px solid var(--ed-ink); outline-offset: 6px; }
/* minute ticks printed on the panel around the knob */
.mw-dial-ticks {
  position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(from -150deg, rgba(11, 11, 12, 0.55) 0 0.6deg, transparent 0.6deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 0 41%, #000 41.5% 48%, transparent 48.5%);
  mask: radial-gradient(circle, transparent 0 41%, #000 41.5% 48%, transparent 48.5%);
  clip-path: polygon(50% 50%, 0 100%, 0 0, 100% 0, 100% 100%);
}
.mw-dial-knob {
  position: absolute; inset: 17%;
  border-radius: 50%;
  background:
    repeating-conic-gradient(rgba(255, 255, 255, 0.35) 0 2deg, rgba(0, 0, 0, 0.05) 2deg 4deg),
    radial-gradient(circle at 35% 30%, #fbfbfa 0%, #d9dad6 60%, #b9bab6 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 0 0 1px rgba(11, 11, 12, 0.18), 0 10px 18px -8px rgba(11, 11, 12, 0.5);
  rotate: var(--a);
  transition: rotate 0.12s ease-out;
}
.mw-dial-knob i { position: absolute; left: 50%; top: 9%; width: 3px; height: 26%; margin-left: -1.5px; border-radius: 2px; background: var(--ed-ink); }
.mw--calm .mw-keys button {
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(11, 11, 12, 0.18), 0 2px 4px -2px rgba(11, 11, 12, 0.3);
  color: var(--ed-ink);
  font: 600 0.98rem/1 var(--font);
  letter-spacing: 0;
  translate: none;
  transition: background 0.2s ease;
}
.mw--calm .mw-keys button:active { translate: none; background: #e9e9e6; box-shadow: 0 0 0 1px rgba(11, 11, 12, 0.18); }
.mw--calm .mw-keys button.is-main { background: var(--ed-ink); color: var(--ed-white); box-shadow: none; }
.mw--calm .mw-keys button.is-main:active { background: #2a2a2b; }
@media (max-width: 700px) {
  .mw--busy .mw-keys { grid-auto-rows: 40px; }
  .mw--calm .mw-keys { grid-template-rows: auto; }
  .mw-dial { width: 170px; }
}
@media (prefers-reduced-motion: reduce) { .mw-dial-knob { transition: none; } }

.mw--busy .mw-keys button.is-start { grid-column: span 2; }

/* dial, refined: printed minute ticks, a plain turned-metal knob, a round focus ring */
.mw-dial:focus-visible { border-radius: 50%; }
.mw-dial-ticks { -webkit-mask: none; mask: none; clip-path: none; background: none; }
.mw-dial-ticks i { position: absolute; left: 50%; top: 0; width: 2px; height: 50%; margin-left: -1px; transform-origin: 50% 100%; rotate: var(--t); }
.mw-dial-ticks i::before { content: ""; position: absolute; left: 0; top: 2%; width: 2px; height: 9%; border-radius: 1px; background: rgba(11, 11, 12, 0.45); }
.mw-dial-ticks i.is-major::before { height: 14%; background: var(--ed-ink); }
.mw-dial-knob { background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e4e5e2 55%, #c4c5c1 100%); }
.mw-dial-knob::after { content: ""; position: absolute; inset: 14%; border-radius: 50%; box-shadow: inset 0 1px 2px rgba(11, 11, 12, 0.18), inset 0 -1px 0 rgba(255, 255, 255, 0.8); }
.ed-hero-plate img { object-position: 50% 70%; }

/* inactive level names stay readable (large text needs 3:1 against the paper) */
.ap-tabs button { opacity: 0.5; }
.ap-tabs button:hover { opacity: 0.75; }
.ap-tabs button[aria-selected="true"] { opacity: 1; }

