/* The objects the scenes are made of. Two families that must never blur:
   the familiar apps (cool white, system-ui, thin chrome) and Homefellow's own sheets (warm, Gloock and Onest).
   Between them, the yellow mark and the slip that carries the marked words across. */

/* ---------- every scene ---------- */
.scene, .family { position: relative; }
.fx { position: absolute; inset: 0; z-index: 6; pointer-events: none; list-style: none; }
/* a scene holding still for the visitor says so: a small pause mark in its corner (kit.js, Player.mark) */
.held-mark { position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; border-radius: 50%; background: rgba(20, 32, 58, .82); box-shadow: 0 0 0 1.5px rgba(255, 246, 229, .55), 0 6px 14px -6px rgba(8, 12, 40, .6); opacity: 0; transform: scale(.8); transition: opacity .2s, transform .25s var(--ease); }
.held-mark::before, .held-mark::after { content: ""; position: absolute; top: 10px; width: 4px; height: 12px; border-radius: 1.5px; background: var(--white); }
.held-mark::before { left: 11px; }
.held-mark::after { right: 11px; }
.held > .fx .held-mark { opacity: 1; transform: none; }
.slip { position: absolute; left: 0; top: 0; padding: 5px 11px 6px; border-radius: 6px; background: var(--sun); color: var(--ink); font: 600 15px/1.25 var(--text); white-space: nowrap; box-shadow: 0 1px 2px rgba(8, 12, 40, .3), 0 10px 20px -6px rgba(8, 12, 40, .55); will-change: transform, opacity; }
.slip-ink { background: var(--ink); color: var(--white); box-shadow: 0 0 0 1.5px rgba(255, 246, 229, .3), 0 10px 20px -6px rgba(8, 12, 40, .55); }
.slip-guess { background: var(--sheet); outline: 1.5px dashed rgba(20, 32, 58, .7); outline-offset: -3px; }
.slip-quiet { background: var(--sheet); }
.tap { position: absolute; left: -19px; top: -19px; width: 38px; height: 38px; border-radius: 50%; background: rgba(20, 32, 58, .22); box-shadow: 0 0 0 2px rgba(20, 32, 58, .7), 0 0 0 4.5px rgba(255, 253, 247, .85); }

.playing .arr { opacity: 0; transform: translateY(8px); transition: opacity .55s ease, transform .6s var(--ease); }
.playing .arr.on { opacity: 1; transform: none; }
.hl { padding: .04em .14em .07em; margin: 0 -.14em; border-radius: 4px; background: linear-gradient(var(--sun), var(--sun)) no-repeat 0 0 / 100% 100%; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.playing .hl { background-size: 0% 100%; transition: background-size .7s cubic-bezier(.5, 0, .2, 1), color .5s; }
.playing .hl.on { background-size: 100% 100%; }
.playing .ch { opacity: 0; }
.playing .ch.on { opacity: 1; }
.instant, .instant * { transition: none !important; animation: none !important; }
@keyframes landed { 0%, 25% { background-color: var(--sun); box-shadow: 0 0 0 5px var(--sun); } 100% { background-color: rgba(255, 215, 102, 0); box-shadow: 0 0 0 5px rgba(255, 215, 102, 0); } }

/* a section's stage: what comes in on the left, what Homefellow makes of it on the right */
.stage { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); gap: clamp(36px, 5.6vw, 88px); align-items: stretch; align-content: start; }
.st-in, .st-out { position: relative; min-width: 0; display: flex; flex-direction: column; }
/* the window and Homefellow's sheet beside it end on one line */
.st-out > .hf-sheet, .st-in > .app { flex: 1 1 auto; }
.mail { display: flex; flex-direction: column; }
.mail-body { flex: 1 1 auto; }
.st-head { display: flex; align-items: center; gap: 9px; height: 24px; margin-bottom: 14px; font: 600 16px/1.3 var(--text); color: var(--fg); opacity: .84; }
.st-head .crane { width: 27px; height: 15px; }

/* ---------- the familiar apps ---------- */
.app { --app-ink: #1F2430; --app-dim: #5F6B7C; --app-line: #E4E7EC; --app-bar: #F2F4F7; --app-blue: #2F6FDE;
  background: #fff; color: var(--app-ink); border-radius: 10px; font: 400 15px/1.3 var(--ui); letter-spacing: 0; overflow: hidden; box-shadow: 0 0 0 1px rgba(20, 32, 58, .07), var(--lift); }
.app-bar { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; background: var(--app-bar); border-bottom: 1px solid var(--app-line); white-space: nowrap; }
.app-dots { display: flex; gap: 6px; }
.app-dots i { width: 10px; height: 10px; border-radius: 50%; background: #D0D5DD; }
.app-title { font-weight: 600; }
.app-sub { color: var(--app-dim); }
.app-sub b { font-weight: 600; color: var(--app-ink); }
.app-search { margin-left: auto; display: flex; align-items: center; gap: 7px; width: min(46%, 270px); height: 26px; padding: 0 9px; border-radius: 7px; background: #fff; box-shadow: inset 0 0 0 1px var(--app-line); color: var(--app-dim); }
.ic { flex: none; width: 15px; height: 15px; }
.seg { margin-left: auto; display: flex; padding: 2px; border-radius: 7px; background: #E4E7EC; }
.seg i { padding: 2px 11px; border-radius: 5px; font-style: normal; color: var(--app-dim); }
.seg i.on { background: #fff; color: var(--app-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }

/* mail */
.mail { --rh: 46px; --rows: 7; }
.mail-body { display: grid; grid-template-columns: 138px minmax(0, 1fr); }
.mail-side { padding: 10px 8px; border-right: 1px solid var(--app-line); background: #FAFBFC; }
.mail-side li { padding: 6px 10px; border-radius: 7px; color: var(--app-dim); }
.mail-side li.on { background: #E4ECFA; color: var(--app-ink); font-weight: 600; }
.mail-side .bar { display: block; height: 8px; margin: 16px 10px 0; border-radius: 4px; background: #E4E7EC; }
.mail-side .bar.s { width: 52%; }
.mail-list { position: relative; height: calc(var(--rh) * var(--rows)); overflow: hidden; }
.mail-rows { transform: translateY(calc(var(--hid, 0) * var(--rh) * -1)); transition: transform .75s var(--ease), opacity .6s ease; will-change: transform; }
.mrow { position: relative; display: grid; grid-template-columns: 9px 140px minmax(0, 1fr) auto; align-items: center; gap: 0 12px; height: var(--rh); padding: 0 14px 0 12px; border-bottom: 1px solid var(--app-line); overflow: hidden; }
.mdot { width: 9px; height: 9px; border-radius: 50%; background: var(--app-blue); transition: opacity .4s; }
.mfrom { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msubj { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msub { margin-right: .6em; font-weight: 600; }
.msnip { color: var(--app-dim); }
.mright { display: grid; justify-items: end; align-items: center; white-space: nowrap; color: var(--app-dim); }
.mtime, .mverdict { grid-area: 1 / 1; transition: opacity .45s; }
.mverdict { display: flex; align-items: center; gap: 5px; opacity: 0; }
.mverdict:empty { display: none; }
.mrow.read { color: var(--app-dim); }
.mrow.read .mdot { opacity: 0; }
.mrow.read .mfrom, .mrow.read .msub { font-weight: 400; }
.mrow.v.read .mtime, .mrow.flag .mtime { opacity: 0; }
.mrow.v.read .mverdict, .mrow.flag .mverdict { opacity: 1; }
.mrow.flag .mverdict { color: var(--app-ink); font-weight: 600; }
.mrow.flag .mdot { opacity: 0; }
.sunmark { width: 11px; height: 11px; border-radius: 3px; background: var(--sun); box-shadow: inset 0 0 0 1px rgba(20, 32, 58, .25); }
.mscan { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 215, 102, 0), rgba(255, 215, 102, .55) 55%, rgba(255, 215, 102, 0)); transform: translateX(-101%); pointer-events: none; }
.playing .mrow.scan .mscan { animation: scan .85s cubic-bezier(.4, 0, .5, 1) both; }
@keyframes scan { to { transform: translateX(101%); } }

.mail.compact { --rh: 58px; --rows: 4; }
.compact .mrow { grid-template-columns: 9px minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: center; gap: 2px 10px; }
.compact .mdot { grid-area: 1 / 1; }
.compact .mfrom { grid-area: 1 / 2; }
.compact .mright { grid-area: 1 / 3; }
.compact .msubj { grid-area: 2 / 2 / 3 / 4; }
.compact .msub { font-weight: 400; }

.mail-open { position: absolute; inset: 0; padding: 12px 20px 10px; background: #fff; transform: translateX(102%); transition: transform .7s var(--ease); box-shadow: -14px 0 26px -14px rgba(20, 32, 58, .28); }
.mail-open.on { transform: none; }
.mo-back { display: flex; align-items: center; gap: 3px; margin: 0 0 8px -4px; color: var(--app-blue); }
.mo-subj { margin-bottom: 9px; font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.mo-from { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--app-dim); }
.mo-from b { color: var(--app-ink); font-weight: 600; }
.mo-time { margin-left: auto; white-space: nowrap; }
.wide .mo-to { display: block; }
.mo-av { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #DCE6F8; color: #2A57A8; font-style: normal; font-weight: 650; }
.mo-body p { margin-bottom: 10px; font-size: 16.5px; line-height: 1.5; }
/* on a wide window the message opens as a reading pane beside the list */
.wide .mail-open { left: 34%; padding: 16px 20px 10px; border-left: 1px solid var(--app-line); }
.wide .mo-back { display: none; }
.wide .mrow.flag { background: #E9F0FC; }
.compact .mail-open { padding: 11px 14px 6px; }
.compact .mo-back { display: none; }
.compact .mo-subj { margin-bottom: 6px; font-size: 16px; }
.compact .mo-from { margin-bottom: 8px; }
.compact .mo-av { width: 26px; height: 26px; }
.compact .mo-body p { margin-bottom: 5px; font-size: 15px; line-height: 1.4; }
.compact .mo-to { display: none; }

.blk { position: absolute; left: 3px; right: 4px; top: calc(var(--s) * var(--hh)); height: calc(var(--len) * var(--hh) - 2px); padding: 1px 5px 2px 5px; border-left: 3px solid var(--c); border-radius: 5px; background: var(--bg); color: #1F2430; font-size: 15px; line-height: 17px; overflow: hidden; transition: box-shadow .35s; }
.blk b { font-weight: 600; }
.blk-time { color: rgba(31, 36, 48, .72); }

/* the calendar's week */
.cal-day { min-width: 0; border-left: 1px solid var(--app-line); }
.cal-dh { display: flex; align-items: center; justify-content: center; gap: 5px; height: 38px; border-bottom: 1px solid var(--app-line); color: var(--app-dim); white-space: nowrap; }
.cal-dh b { font-weight: 600; color: var(--app-ink); }
.cal-day.today .cal-dh b { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 13px; background: var(--app-blue); color: #fff; }

/* ---------- Homefellow's sheets ---------- */
.hf-sheet { padding: 22px 24px 24px; border-radius: 14px; background: var(--sheet); color: var(--ink); font: 400 16px/1.4 var(--text); box-shadow: var(--lift); }
.hf-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font: 600 15px/1.2 var(--text); color: var(--dim); }
.hf-brand .crane { width: 26px; height: 15px; }
.hf-day { font: 400 clamp(40px, 3.5vw, 56px)/1 var(--display); letter-spacing: -.012em; }
.hf-date { margin-top: 4px; font: 500 16px/1.3 var(--text); color: var(--dim); }
.hf-title { margin-bottom: 14px; font: 400 clamp(27px, 2.4vw, 36px)/1.08 var(--display); letter-spacing: -.008em; }
.hf-label { margin: 18px 0 8px; font: 600 15px/1.3 var(--text); color: var(--dim); }

/* what needs you */
.need-mark { position: absolute; left: 0; top: 15px; width: 10px; height: 10px; border-radius: 3px; background: var(--sun); box-shadow: inset 0 0 0 1px rgba(20, 32, 58, .2); }
.need-t { width: fit-content; border-radius: 3px; font: 600 17px/1.25 var(--text); letter-spacing: -.008em; }
.need-n { font: 400 15px/1.35 var(--text); color: var(--dim); }
/* a slot that is still empty: a pencil rule, room for what comes */

.needs.roomy .need-in { padding: 13px 92px 14px 24px; }
.needs.roomy .need-mark { top: 20px; }
.needs.roomy .need-t { font-size: clamp(17px, 1.4vw, 20px); }
.need-when { display: inline-block; margin-right: .3em; border-radius: 3px; font-weight: 600; color: var(--ink); }
.pill { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px; border-radius: 10px; box-shadow: inset 0 0 0 1.5px rgba(20, 32, 58, .3); font: 600 15px/1 var(--text); white-space: nowrap; transition: background-color .3s, color .3s, box-shadow .3s; }
.pill.solid { background: var(--ink); color: var(--white); box-shadow: none; }
.needs.roomy .done-btn { position: absolute; right: 0; top: 14px; height: 34px; padding: 0 14px; }
.need.done .done-btn { background: var(--ink); color: var(--white); box-shadow: none; }
.need.done .need-t { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.need.done .need-t, .need.done .need-n { opacity: .5; transition: opacity .4s; }
.needs.roomy .need.gone, .needs.dn .need.gone { grid-template-rows: 0fr; opacity: 0; border-top-color: transparent; }

/* a question and its answer */
.qa { display: grid; gap: 10px; }
.q { padding: 16px 20px 18px; }
.q .hf-brand { margin-bottom: 7px; }
.q-text { font: 400 clamp(21px, 1.85vw, 28px)/1.18 var(--display); letter-spacing: -.006em; text-wrap: balance; }
.bubble { justify-self: end; max-width: 94%; padding: 11px 18px 13px; border-radius: 22px 22px 6px 22px; background: var(--ink); color: var(--white); font: 450 clamp(16px, 1.25vw, 19px)/1.4 var(--text); box-shadow: var(--lift-s); }
.on-dark .bubble { box-shadow: 0 0 0 1.5px rgba(255, 246, 229, .3), var(--lift-s); }
.bubble .hl { margin: 0; padding: .04em .16em .07em; color: var(--ink); }
.playing .bubble .hl { transition: background-size .7s cubic-bezier(.5, 0, .2, 1), color .25s .2s; }
.playing .bubble .hl:not(.on) { color: inherit; }
.evid { padding: 12px 14px 13px; border-radius: 9px; background: #fff; color: #1F2430; font: 400 15px/1.45 var(--ui); box-shadow: inset 0 0 0 1px #E4E7EC; }
.evid-src { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 600; }
.evid blockquote { margin: 0; padding-left: 11px; border-left: 3px solid var(--sun); }
.evid-date, .evid-time { color: #5F6B7C; font-weight: 400; }
.evid-date { margin-top: 6px; }
.evid-time { margin-left: auto; }
.evid-line { color: #5F6B7C; }
.evid-line b { margin-right: .4em; font-weight: 600; color: #1F2430; }

/* ---------- it notices the emails that matter ---------- */
.rest .hf-title { margin-bottom: 6px; }
.rest-line { font-size: 18px; color: var(--dim); }
.item-t { margin-bottom: 12px; font: 400 clamp(26px, 2.35vw, 35px)/1.08 var(--display); letter-spacing: -.008em; text-wrap: balance; }
.item-when { width: fit-content; margin-bottom: 12px; padding: 3px 9px 4px; border-radius: 5px; background: var(--sun); font: 600 16px/1.3 var(--text); }
.item-why { font-size: 17px; line-height: 1.45; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* ---------- it knows what matters this week ---------- */
.switch { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 3px; border-radius: 11px; background: rgba(20, 32, 58, .08); font: 600 15px/1 var(--text); }
.switch span { position: relative; z-index: 1; padding: 10px 14px; text-align: center; color: var(--dim); transition: color .4s; }
.switch span.on { color: var(--white); }
.thumb { position: absolute; left: 3px; top: 3px; bottom: 3px; width: calc((100% - 6px) / 3); border-radius: 8px; background: var(--ink); transition: transform .55s var(--ease); }
.switch[data-v="1"] .thumb { transform: translateX(100%); }
.switch[data-v="2"] .thumb { transform: translateX(200%); }
.panels { display: grid; margin-top: 4px; }
.panel { grid-area: 1 / 1; min-width: 0; opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility 0s .4s; }
.panel.on { opacity: 1; visibility: visible; transition: opacity .5s ease .15s; }
.panel[data-p="2"] { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 clamp(20px, 2.4vw, 34px); align-items: start; }
.month { display: grid; grid-template-columns: repeat(7, 38px); gap: 1px; }
.m-h { height: 24px; text-align: center; font: 600 15px/24px var(--text); color: var(--dim); }
.m-d { display: grid; justify-items: center; align-content: start; height: 42px; padding-top: 2px; font: 500 15px/22px var(--text); }
.m-d b { min-width: 26px; height: 22px; border-radius: 11px; text-align: center; font-weight: 500; }
.m-d.today b { background: var(--ink); color: var(--white); font-weight: 600; }
.m-d.past b { color: rgba(20, 32, 58, .42); }
.m-marks { display: flex; gap: 3px; height: 8px; margin-top: 3px; }
.m-marks i { width: 7px; height: 7px; border-radius: 50%; background: #5C97E6; }
.m-marks .mk-h { border-radius: 2px; background: var(--sun); box-shadow: inset 0 0 0 1px rgba(20, 32, 58, .3); }
.ahead li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 0 8px; padding: 9px 0; border-top: 1px solid var(--rule); font: 500 15.5px/1.35 var(--text); }
.ahead b { font-weight: 600; white-space: nowrap; }

/* ---------- just ask ---------- */


/* ---------- the dinner moment ---------- */

/* ---------- phone: the source above, Homefellow below ---------- */
@media (max-width: 900px) {
  .stage, .stage[data-scene] { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .st-head { margin-bottom: 10px; }
  .hf-sheet { padding: 18px 18px 20px; }
  .mail { --rh: 58px; --rows: 5; }
  .mail.compact { --rows: 3; }
  .mail-body { grid-template-columns: minmax(0, 1fr); }
  .mail-side { display: none; }
  .mrow { grid-template-columns: 9px minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: center; gap: 2px 10px; }
  .mdot { grid-area: 1 / 1; }
  .mfrom { grid-area: 1 / 2; }
  .mright { grid-area: 1 / 3; }
  .msubj { grid-area: 2 / 2 / 3 / 4; }
  .msub { font-weight: 400; }
  .msnip { display: none; }
  .app-search { width: 46%; }
  .mail-open, .wide .mail-open { left: 0; padding: 11px 14px 6px; border-left: 0; }
  .mo-back { display: none; }
  .mo-subj { margin-bottom: 6px; font-size: 17px; }
  .mo-from { margin-bottom: 9px; }
  .mo-to { display: none; }
  .mo-body p { margin-bottom: 6px; font-size: 15.5px; line-height: 1.42; }
  .mail.wide .mo-body p { font-size: 16px; }
  .seg i { padding: 2px 8px; }
  .cal .app-sub { display: none; }
  .panel[data-p="2"] { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .month { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

/* ---------- things that make room for themselves, and how a loop turns over ---------- */
.grow { display: grid; grid-template-rows: 1fr; overflow: hidden; }
.grow > * { min-height: 0; }
.playing .grow { transition: grid-template-rows .5s var(--ease); }
.playing .grow > * { transition: opacity .4s ease .1s; }
.playing .grow:not(.on):not(.open) { grid-template-rows: 0fr; }
.playing .grow:not(.on) > * { opacity: 0; }
/* a closed row is truly closed: its padding and rule would otherwise hold it open by a few pixels */
.playing .grow:not(.on):not(.open) > * { padding-top: 0 !important; padding-bottom: 0 !important; border-width: 0 !important; }
.ghost { position: absolute; z-index: 7; pointer-events: none; will-change: transform, opacity; }
.ghost > * { width: 100% !important; max-width: none !important; height: 100%; margin: 0 !important; transform: none !important; opacity: 1 !important; visibility: visible !important; }
.ghost * { animation: none !important; transition: none !important; }
.ghost-fade > * { box-shadow: none !important; }

/* ---------- Homefellow's surface: a small piece of this page's sky, then the warm sheet ---------- */
.hf-sheet.has-sky { padding: 0; overflow: hidden; }
.hf-body { padding: 14px 22px 18px; }
.hf-sky { position: relative; overflow: hidden; padding: 16px 22px 36px; color: #FFF8EA; background: #2A2F66; }
.hs-pic { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 88% 64%; }
.hf-sky::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16, 20, 54, .55), rgba(16, 20, 54, .15) 55%, rgba(16, 20, 54, 0)); }
.hs-day { position: relative; z-index: 1; font: 400 clamp(34px, 3vw, 46px)/1 var(--display); letter-spacing: -.012em; text-shadow: 0 1px 12px rgba(14, 18, 50, .45); }
.hs-meta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 6px; font: 600 15px/1.3 var(--text); text-shadow: 0 1px 8px rgba(14, 18, 50, .5); }

/* the mark for where something came from: an email, the calendar, an answer, a letter */
.srcic { flex: none; width: 15px; height: 15px; margin-top: 2px; color: rgba(20, 32, 58, .55); }
.chipsrc .srcic, .yr-name .srcic { margin: 0; }

/* what needs you */
.need { display: grid; grid-template-rows: 1fr; overflow: hidden; }
.need-in { position: relative; min-height: 0; padding: 9px 0 10px 22px; border-top: 1px solid var(--rule); }
.playing .need { transition: grid-template-rows .55s var(--ease), opacity .45s ease; }
.playing .we.hit .we-t, .playing .need.hit .need-when, .playing [data-part="when"].on .item-when { animation: landed 1.7s ease-out; }

/* a calendar as a week of cells, and its new-event popover */
.cal { position: relative; }
/* a question with answers to tap */
.qcard { padding: 18px 20px 20px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.choice { padding: 9px 16px 10px; border-radius: 11px; box-shadow: inset 0 0 0 1.5px rgba(20, 32, 58, .28); font: 600 16px/1.2 var(--text); transition: background-color .25s, color .25s, box-shadow .25s; }
.choice.sel { background: var(--ink); color: var(--white); box-shadow: none; }
.q-stack { display: grid; }
.q-stack .qcard { grid-area: 1 / 1; align-self: start; padding: 22px 26px 26px; transition: opacity .35s, transform .45s var(--ease); }
.q-stack .qcard:not(.cur) { opacity: 0; visibility: hidden; transform: translateY(10px); }
.q-stack .q-text { font-size: clamp(24px, 2.4vw, 36px); }
.q-stack .choice { padding: 11px 20px 12px; font-size: clamp(16px, 1.3vw, 19px); }

/* a chat, like any assistant's, in Homefellow's hand */
.chatwin { display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: var(--sheet); color: var(--ink); font: 400 17px/1.45 var(--text); box-shadow: var(--lift); }
.cw-head { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--rule); font: 600 15px/1.2 var(--text); color: var(--dim); }
.cw-head .crane { width: 26px; height: 15px; }
.thread { position: relative; height: clamp(290px, 44vh, 372px); overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 40px); mask-image: linear-gradient(180deg, transparent 0, #000 40px); }
.thread-in { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 20px 4px; }
.cw-body { display: grid; align-content: end; gap: 12px; min-height: 176px; padding: 14px 16px 8px; }
.msg-me { width: fit-content; max-width: 84%; margin: 8px 0 8px auto; padding: 9px 15px 10px; border-radius: 18px 18px 5px 18px; background: var(--ink); color: var(--white); font-weight: 450; }
.msg-hf { max-width: 92%; padding: 4px 0 12px; }
.msg-text { font-size: 17.5px; }
.chipsrc span { text-wrap: balance; }
.chipsrc { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 11px 5px 9px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(20, 32, 58, .2); font: 500 15px/1.25 var(--text); color: rgba(20, 32, 58, .82); }
.cw-body .msg-me, .cw-body .msg-hf { margin-top: 0; margin-bottom: 0; padding-bottom: 0; }
.cw-body .msg-me { padding-bottom: 10px; }
.composer { display: flex; align-items: center; gap: 10px; min-height: 50px; margin: 6px 12px 12px; padding: 5px 6px 5px 16px; border-radius: 25px; background: rgba(20, 32, 58, .07); font: 500 16px/1.3 var(--text); }
.comp-ph { flex: 1 1 auto; color: rgba(20, 32, 58, .5); }
.comp-text { display: none; flex: 1 1 auto; min-width: 0; }
.composer.writing .comp-ph { display: none; }
.composer.writing .comp-text.cur, .chatwin.mini .composer.writing .comp-text { display: block; }
.comp-send { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--white); }
.comp-send .ic { width: 18px; height: 18px; }
.part-ask { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.part-ask .part-head { display: block; margin: 0; padding-top: 12px; }
.part-ask h3 { margin-bottom: .5em; }

/* the email item: one sheet that says it is reading along, then fills in */
.item .rest { display: none; }
.playing .item .rest { display: grid; }
.item .hf-label { margin-top: 14px; }
.item .acts { margin-top: 16px; }

/* the morning view */
.mview .switch { width: fit-content; margin-bottom: 2px; }
.mview .hf-body { padding-top: 14px; }


/* ---------- shorter desktop screens ---------- */
@media (min-width: 901px) and (max-height: 800px) {
}

/* ---------- phone: the pair fits one screen ---------- */
@media (max-width: 900px) {
  .stage[data-scene] { grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
  .st-out > .hf-sheet, .st-in > .app { flex: none; }
  .part-ask { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .part-ask .part-head { padding-top: 0; }
  /* the window short enough that the marked sentence and the line it becomes share one screen */
  .mail { --rows: 3; }
  .mail.compact { --rows: 3; }
  .hf-sky { padding: 12px 18px 30px; }
  .hs-day { font-size: 34px; }
  .needs.roomy .need-in { padding: 11px 76px 12px 22px; }
  .panel[data-p="2"] .ahead { display: none; }
  .mview .switch { width: auto; }
  .thread { height: 300px; }
}

/* ---------- the emails that matter: a short list, newest on top, each with where it came from ---------- */
.mlist .hf-title { margin-bottom: 8px; }
.mi-in { padding: 11px 0 12px; border-top: 1px solid var(--rule); }
.mi-t { width: fit-content; border-radius: 3px; font: 600 clamp(17px, 1.35vw, 19px)/1.25 var(--text); letter-spacing: -.008em; }
.mi-w { margin-top: 4px; }
.mi-w b { padding: 2px 8px 3px; border-radius: 5px; background: var(--sun); font: 600 15px/1.3 var(--text); }
.mi-src { display: flex; align-items: center; gap: 6px; margin-top: 6px; font: 500 15px/1.3 var(--text); color: var(--dim); }
.playing .mi.on .mi-t { animation: landed 1.7s ease-out; }
.scene:not(.playing) .mi.pre { display: none; }
/* The emails stage never changes height: the list's sheet and the mail window are a fixed size, tall enough for
   the list at its fullest (three lines on a wide screen, each title on two lines), and a still shows only what fits. */
.stage[data-scene="email"] .mlist, .stage[data-scene="email"] .mail { flex: none; height: 450px; overflow: hidden; }
.scene:not(.playing) .mlist .mi:not(.pre):nth-child(n+4) { display: none; }
@media (max-width: 900px) {
  .stage[data-scene="email"] .mail { height: auto; }
  .stage[data-scene="email"] .mlist { height: 292px; }
  .scene:not(.playing) .mlist .mi:not(.pre):nth-child(n+3) { display: none; }
}
.wide .mo-body p { font-size: 17px; }

/* ---------- everything your calendar was missing: one calendar as a time grid, one switch ---------- */
.cal-one { position: relative; --hh: 62px; }
.cal-body { display: grid; grid-template-columns: 198px minmax(0, 1fr); }
.cal-list { padding: 14px 10px 16px; border-right: 1px solid var(--app-line); background: #FAFBFC; }
.cal-list p { margin: 0 8px 8px; font-weight: 600; color: var(--app-dim); }
.cal-list li { display: flex; align-items: center; gap: 10px; padding: 5px 8px; white-space: nowrap; }
.cal-list li i { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 4.5px; background: var(--c); color: #fff; }
.cal-list li .ic { width: 12px; height: 12px; }
.cal-hf { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 9px 7px; border: 0; border-radius: 9px; background: none; box-shadow: inset 0 0 0 1.5px #E4E7EC; color: inherit; font: 600 15px/1.3 var(--ui); text-align: left; cursor: pointer; transition: background-color .35s, box-shadow .35s; }
.cal-hf span { flex: 1 1 auto; }
.cal-hf-dot { flex: none; width: 16px; height: 16px; border-radius: 4.5px; box-shadow: inset 0 0 0 2px #D9A400; transition: background-color .35s; }
.sw { flex: none; position: relative; width: 42px; height: 25px; border-radius: 13px; background: #C5CAD3; transition: background-color .35s; }
.sw::after { content: ""; position: absolute; left: 2.5px; top: 2.5px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .35s var(--ease); }
.hf-on .cal-hf { background: #FFF6D6; box-shadow: inset 0 0 0 1.5px #EBCB63; }
.hf-on .cal-hf-dot { background: #D9A400; }
.hf-on .sw { background: #D9A400; }
.hf-on .sw::after { transform: translateX(17px); }
.cal-hf:focus-visible, .ev.add:focus-visible { outline: 3px solid var(--app-blue); outline-offset: 2px; }
/* the grid: a column of hours, then a column a day; in each, the day's name, an all-day slot and the hours */
.cal-grid { display: grid; grid-template-columns: 58px repeat(7, minmax(0, 1fr)); }
.cal-times { color: var(--app-dim); text-align: right; }
.cal-one .cal-dh { height: 40px; }
.cal-one .cal-day { border-left: 1px solid var(--app-line); }
.cal-ad { position: relative; display: grid; align-content: center; gap: 3px; height: 66px; padding: 4px 3px; border-bottom: 1px solid var(--app-line); }
.cal-times .cal-ad { padding: 0 8px 0 6px; font-size: 15px; white-space: nowrap; overflow: hidden; }
.cal-hr { height: var(--hh); padding: 0 8px 0 0; font-size: 15px; line-height: 1; white-space: nowrap; transform: translateY(-.5em); }
.cal-hr:first-of-type { transform: translateY(7px); }
.cal-hours { position: relative; height: calc(var(--hh) * 6); background: repeating-linear-gradient(180deg, transparent 0, transparent calc(var(--hh) - 1px), var(--app-line) calc(var(--hh) - 1px), var(--app-line) var(--hh)); background-position: 0 0; }
.cal-day.today .cal-hours, .cal-day.today .cal-ad { background-color: rgba(47, 111, 222, .035); }
.ev { position: absolute; left: 3px; right: 4px; top: calc(var(--s) * var(--hh) + 1px); height: calc(var(--len) * var(--hh) - 2px); padding: 2px 5px 2px 5px; border: 0; border-left: 3px solid var(--c); border-radius: 5px; background: var(--bg); color: #1F2430; font: 400 15px/17px var(--ui); text-align: left; overflow: hidden; }
.ev b { font-weight: 600; }
.ev.allday { position: relative; left: auto; right: auto; top: auto; height: auto; padding: 3px 6px 4px 5px; }
/* two things at once: the later one sits over the right of the earlier, the way a calendar app stacks them */
.ev.half.h1 { left: 46%; z-index: 1; box-shadow: 0 0 0 1.5px #fff; }
.ev.half .blk-time { display: block; }
.ev.add { --c: #D9A400; --bg: #FFF1C2; cursor: pointer; }
.ev.add.guess { border: 1.5px dashed #B48A00; padding-left: 6px; background: #FFFDF3; }
/* a family entry Homefellow knows has moved: dimmed and struck through while its calendar is on */
.ev.stale { transition: opacity .45s ease; }
.ev.stale b { text-decoration: line-through transparent; text-decoration-thickness: 1.5px; transition: text-decoration-color .45s; }
.hf-on .ev.stale { opacity: .5; }
.hf-on .ev.stale b { text-decoration-color: currentColor; }
.ev-badge { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 4px; background: #fff; color: #6B5200; font: 600 13px/17px var(--ui); box-shadow: inset 0 0 0 1px #E2B93B; vertical-align: 1px; }
.t-short { display: none; }
.ev.half .t-long { display: none; }
.ev.half .t-short { display: inline; }
.ev .srcic { margin: 1.5px 0 0; color: #8A6A00; }
.ev-src { float: left; margin: 0 5px 0 0; }
.ev.add.open { z-index: 3; box-shadow: 0 0 0 2.5px #D9A400, 0 6px 14px -4px rgba(20, 32, 58, .4); }
/* what Homefellow adds: there only while its calendar is switched on */
.add { opacity: 0; visibility: hidden; transform: translateY(5px) scale(.96); transform-origin: 50% 0; transition: opacity .3s ease, transform .35s var(--ease), visibility 0s .35s, box-shadow .25s; }
.hf-on .add { opacity: 1; visibility: visible; transform: none; transition: opacity .45s ease calc(var(--i) * .18s + .1s), transform .6s cubic-bezier(.3, 1.5, .5, 1) calc(var(--i) * .18s + .1s), box-shadow .25s; }
.cal-pop { position: absolute; z-index: 5; width: 300px; padding: 13px 16px 15px; border-radius: 11px; background: #fff; color: #1F2430; font: 400 15px/1.45 var(--ui); box-shadow: 0 0 0 1px rgba(20, 32, 58, .1), 0 4px 10px rgba(20, 32, 58, .12), 0 22px 40px -12px rgba(20, 32, 58, .5); opacity: 0; visibility: hidden; transform: scale(.94); transform-origin: 0 var(--py, 20px); transition: opacity .18s, transform .25s var(--ease), visibility 0s .25s; }
.cal-pop[data-side="left"] { transform-origin: 100% var(--py, 20px); }
.cal-pop.on { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.cal-pop::before { content: ""; position: absolute; left: -6px; top: calc(var(--py, 20px) - 6px); width: 12px; height: 12px; border-radius: 2px; background: #fff; box-shadow: -1px 1px 0 rgba(20, 32, 58, .1); transform: rotate(45deg); }
.cal-pop[data-side="left"]::before { left: auto; right: -6px; box-shadow: 1px -1px 0 rgba(20, 32, 58, .1); }
.pop-cal { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; color: #6B5200; font-weight: 600; }
.pop-cal i { width: 11px; height: 11px; border-radius: 3px; background: #D9A400; }
.cal-pop.guess .pop-cal i { background: none; box-shadow: inset 0 0 0 1.5px #B48A00; }
.pop-title { font-size: 18px; font-weight: 650; line-height: 1.25; letter-spacing: -.01em; }
.pop-when { margin-bottom: 9px; color: var(--app-dim); }
.pop-why { display: flex; gap: 8px; padding-top: 9px; border-top: 1px solid var(--app-line); }
.pop-why .srcic { margin-top: 3px; color: #8A6A00; }
.pop-why q { display: block; margin-top: 4px; padding-left: 9px; border-left: 3px solid var(--sun); quotes: none; }
.cal-key { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 18px; font: 500 16px/1.3 var(--text); color: var(--fg); }
.cal-key li { display: flex; align-items: center; gap: 9px; }
.ck { width: 26px; height: 17px; border-radius: 4px; box-shadow: 0 1px 2px rgba(20, 32, 58, .18); }
.ck-cal { border-left: 3px solid #3F7FE0; background: #EEF4FD; }
.ck-hf { border-left: 3px solid #D9A400; background: #FFF1C2; }
.ck-guess { border: 1.5px dashed #B48A00; background: #FFFDF3; }
.on-dark .ck-guess { border-color: #FFD766; }
@media (min-width: 901px) and (max-height: 800px) {
  .cal-one { --hh: 54px; }
}
@media (max-width: 900px) {
  .cal-one { --hh: 64px; }
  .cal-body { grid-template-columns: minmax(0, 1fr); }
  .cal-list { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; padding: 8px 8px 10px; border-right: 0; border-bottom: 1px solid var(--app-line); }
  .cal-list p { display: none; }
  .cal-list ul { display: flex; flex-wrap: wrap; }
  .cal-list li { gap: 6px; padding: 4px 6px; }
  .cal-hf { margin-top: 6px; }
  /* a phone shows Tuesday to Thursday, with Tuesday wide enough for two things side by side */
  .cal-grid { grid-template-columns: 50px minmax(0, 1.62fr) minmax(0, 1.26fr) minmax(0, 1fr); }
  .t-long { display: none; }
  .t-short { display: inline; }
  .ev { overflow-wrap: normal; }
  .ev-badge { margin-left: 2px; padding: 0 4px; }
  .ev.add .ev-src { display: none; }
  .cal-one .cal-day[data-d="mon"], .cal-one .cal-day[data-d="fri"], .cal-one .cal-day[data-d="sat"], .cal-one .cal-day[data-d="sun"] { display: none; }
  .cal-times .cal-ad { font-size: 14px; }
  .cal-hr { padding-right: 6px; font-size: 14px; }
  .cal-times .cal-ad { padding: 0 6px 0 2px; }
  .cal-ad { height: 94px; }
  .cal-pop { left: 8px; right: 8px; bottom: 8px; width: auto; transform-origin: 50% 100%; }
  .cal-pop.up { bottom: auto; top: 148px; transform-origin: 50% 0; }
  .cal-pop::before { display: none; }
  .cal-key { gap: 6px 18px; margin-top: 14px; font-size: 15px; }
}

/* ---------- it gets to know you: the family's map, coloured in as it learns ---------- */
/* one sheet: the title and the question in a slim column, the picture filling the rest. The question card lies a
   little over the picture's left edge, where the picture is empty. */
.map-sheet { display: grid; grid-template-columns: clamp(168px, 13.6vw, 196px) minmax(0, 1fr); gap: 0 4px; padding: 12px 12px 12px 26px; background: #FDF9F3; }
.map-side { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; padding: 12px 0 clamp(96px, 12.4vw, 180px); }
.map-title { position: relative; z-index: 3; margin: 0; font-size: clamp(26px, 2.2vw, 32px); white-space: nowrap; }
/* wide enough that four answers sit on one row */
.map-q { position: relative; z-index: 4; width: 352px; margin: 0 0 0 -12px; }
.map-q .qcard { align-self: end; padding: 18px 20px 20px; background: var(--sheet); }
.map-q .q-text { font-size: clamp(22px, 1.95vw, 29px); }
.map-q .choices { gap: 6px; margin-top: 12px; }
.map-q .choices + .choices { margin-top: 8px; }
.map-q .choice { padding: 8px 11px 9px; font-size: 15.5px; }
.ch-label { align-self: center; min-width: 3em; font: 600 15px/1.2 var(--text); color: var(--dim); }
.picked { display: grid; margin-top: 12px; }
.picked li { grid-area: 1 / 1; align-self: start; min-width: 0; }
.playing .picked li { transition: opacity .25s .1s, transform .4s var(--ease) .1s; }
.playing .picked li:not(.cur) { transition: opacity .14s, transform .3s; }
.picked li:not(.cur) { opacity: 0; transform: translateX(22px); }
.picked li.was { transform: translateX(-22px); }
.pk-kind { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; font: 600 15px/1.3 var(--text); color: var(--dim); }
.pk-kind .srcic { margin: 0; }
.pk { padding: 10px 12px 12px; border-radius: 9px; background: #fff; color: #1F2430; font: 400 15px/1.4 var(--ui); box-shadow: inset 0 0 0 1px #E4E7EC, 0 4px 10px -4px rgba(20, 32, 58, .3); }
.pk-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.pk-head .mo-av { width: 24px; height: 24px; font-size: 13px; }
.pk-head b { font-weight: 650; }
.pk-subj { font-weight: 600; }
.pk-body { color: #3A4252; }
.pk .hl { color: #1F2430; }
.pk-cal { display: grid; gap: 5px; padding: 8px; }
.pk-ev { padding: 5px 9px 6px 8px; border-left: 3px solid var(--c); border-radius: 5px; background: var(--bg); }
.pk-ev b { font-weight: 600; }
.pk-ev span { color: rgba(31, 36, 48, .72); margin-left: .3em; }
/* a photographed letter: paper, a little askew, on the dark of the photo */
.pk-letter { margin: 2px 4px 4px; padding: 12px 14px 14px; border-radius: 3px; background: #FBF7EC; font-family: Georgia, "Iowan Old Style", serif; box-shadow: 0 0 0 5px #3B4354, 0 0 0 6px #2A303D, 0 8px 14px -4px rgba(20, 32, 58, .45); transform: rotate(-1.6deg); }
.pk-rule { display: block; height: 2px; margin: 7px 0; border-radius: 1px; background: rgba(31, 36, 48, .16); }
.pk-rule.s { width: 58%; margin-bottom: 0; }
.pk-answer { display: grid; gap: 7px; padding: 0; background: none; box-shadow: none; font-family: var(--text); }
.pk-q { font: 400 17px/1.25 var(--display); color: var(--ink); }
.pk-a { justify-self: end; padding: 9px 14px 10px; border-radius: 18px 18px 5px 18px; background: var(--ink); color: var(--white); font-weight: 500; }
.pk-a .hl { margin: 0; padding: .04em .16em .07em; color: var(--ink); }
.playing .pk-a .hl:not(.on) { color: inherit; }
.map-art { position: relative; aspect-ratio: 1600 / 1000; }
.map-pan { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.map-art img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.map-ghost { filter: grayscale(1); opacity: .34; -webkit-mask-image: radial-gradient(ellipse 34% 47% at 51% 50%, #000 52%, rgba(0, 0, 0, .46) 100%); mask-image: radial-gradient(ellipse 34% 47% at 51% 50%, #000 52%, rgba(0, 0, 0, .46) 100%); }
.map-fx { position: absolute; inset: 0; pointer-events: none; }
.bloom { position: absolute; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 2.5px rgba(255, 215, 102, .9), 0 0 26px 8px rgba(255, 215, 102, .5), inset 0 0 30px 8px rgba(255, 215, 102, .45); opacity: 0; animation: bloom 1.25s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes bloom { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.12); } 18% { opacity: .95; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); } }
/* a label: a small warm slip with a pointer, beside the thing it names; at rest, a dot */
.mtag { position: absolute; z-index: 2; width: 0; height: 0; }
.mtag:not(.on) { visibility: hidden; }
.mtag-dot { position: absolute; left: -11px; top: -11px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; opacity: 0; pointer-events: none; cursor: pointer; }
.mtag-dot::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 2px var(--ink), 0 0 0 4.5px rgba(253, 249, 243, .92); transform: scale(0); transition: transform .35s var(--ease); }
.mtag.rest .mtag-dot { opacity: 1; pointer-events: auto; }
.mtag.rest .mtag-dot::before { transform: none; }
.mtag-dot:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; }
.mtag-label { --hide: translate(-50%, -6px) scale(.92); --show: translate(-50%, 0); position: absolute; display: grid; gap: 1px; width: max-content; padding: 5px 11px 6px; border-radius: 8px; background: #FFFEFA; color: var(--ink); font: 500 15px/1.25 var(--text); text-align: left; box-shadow: 0 0 0 1px rgba(20, 32, 58, .1), 0 2px 4px rgba(20, 32, 58, .16), 0 12px 20px -9px rgba(20, 32, 58, .45); opacity: 0; visibility: hidden; transform: var(--hide); transition: opacity .2s, transform .3s var(--ease), visibility 0s .3s; }
.mtag-label b { font-weight: 650; }
.mtag-more { display: none; align-items: center; gap: 5px; }
.mtag-more .srcic { margin: 0; }
.mtag.more .mtag-more { display: flex; }
.mtag-label::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 2px; background: inherit; transform: rotate(45deg); }
.mtag.below .mtag-label { left: 0; top: 12px; transform-origin: 50% 0; }
.mtag.below .mtag-label::after { left: calc(50% - 5px); top: -4.5px; box-shadow: -1px -1px 0 rgba(20, 32, 58, .1); }
.mtag.above .mtag-label { --hide: translate(-50%, 6px) scale(.92); left: 0; bottom: 12px; transform-origin: 50% 100%; }
.mtag.above .mtag-label::after { left: calc(50% - 5px); bottom: -4.5px; box-shadow: 1px 1px 0 rgba(20, 32, 58, .1); }
.mtag.left .mtag-label { --hide: translate(6px, -50%) scale(.92); --show: translate(0, -50%); right: 12px; top: 0; transform-origin: 100% 50%; }
.mtag.left .mtag-label::after { right: -4.5px; top: calc(50% - 5px); box-shadow: 1px -1px 0 rgba(20, 32, 58, .1); }
.mtag.on:not(.rest) .mtag-label, .mtag.rest:hover .mtag-label, .mtag.rest:focus-within .mtag-label, .mtag.peek .mtag-label { opacity: 1; visibility: visible; transform: var(--show); transition: opacity .25s, transform .4s var(--ease); }
.mtag.rest:hover, .mtag.rest:focus-within, .mtag.peek { z-index: 3; }
.playing .mtag.hit .mtag-label { animation: taghit 1.7s ease-out; }
@keyframes taghit { 0%, 22% { background-color: var(--sun); } 100% { background-color: #FFFEFA; } }
@media (max-width: 900px) {
  .map-sheet { grid-template-columns: minmax(0, 1fr); margin-inline: -10px; padding: 14px 0 6px; }
  .map-side { display: contents; }
  .map-q { order: -1; width: auto; min-height: 172px; margin: 0 16px 4px; }
  .map-q .qcard { align-self: start; padding: 4px 2px 6px; box-shadow: none; background: none; }
  .mtag-dot::before { inset: 6px; box-shadow: 0 0 0 1.5px var(--ink), 0 0 0 3.5px rgba(253, 249, 243, .92); }
  /* the picture cropped in on the house, at 160% of the width; it pans to each thing as it is learned */
  .map-art { aspect-ratio: 1 / 1; overflow: hidden; border-radius: 0 0 12px 12px; }
  .map-pan { width: 160%; transform: translate3d(var(--pan, -20.75%), 0, 0); }
  .playing .map-pan { transition: transform .8s cubic-bezier(.45, .05, .25, 1); }
  .map-sheet { padding-bottom: 0; }
  .map-title { margin: 12px 16px 0; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 30px; }
  .mtag-label { padding: 4px 9px 5px; font-size: 14px; }
  .mtag .mtag-more { display: none !important; }
}

/* ---------- the morning view: one generous surface, three views ---------- */
.mview { max-width: 1040px; margin: 0 auto; }
.mview .hf-sky { padding: 22px 30px 46px; }
.mview .hs-day { font-size: clamp(36px, 3.2vw, 48px); }
.mview .hf-body { padding: 14px 30px 20px; }
/* one view at a time, all three stacked in one place, so the sheet keeps one height whichever it shows */
.mview .panels { margin-top: 0; }
.playing .mview .panel.on { animation: viewin .45s ease both; }
@keyframes viewin { from { opacity: 0; transform: translateY(8px); } }
.mview .switch { width: min(100%, 420px); margin-bottom: 6px; font-size: 16px; }
.mview .panel[data-p="0"] { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0 clamp(28px, 4vw, 52px); align-items: start; }
.mview .needs.roomy .need-in { padding: 11px 96px 12px 26px; }
.mview .needs.roomy .need-mark { top: 18px; }
.mview .needs.roomy .need-t { font-size: clamp(18px, 1.5vw, 21px); }
.mview .need-n { margin-top: 2px; font-size: 16px; }
.need-src { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 3px 10px 4px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(20, 32, 58, .16); font: 500 15px/1.25 var(--text); color: rgba(20, 32, 58, .8); }
.need-src .srcic { margin: 0; }
.need.done .need-src { opacity: .5; }
.daylist li { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 0 8px; padding: 11px 0 12px 14px; border-top: 1px solid var(--rule); font: 400 16px/1.35 var(--text); }
.daylist li::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 13px; width: 3px; border-radius: 2px; background: var(--c); }
.daylist b { font-weight: 600; }
.daylist em { display: block; font-style: normal; font-weight: 600; }
.daylist span { color: var(--dim); }
.daylist em { color: var(--ink); }
.wkstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.wkstrip li { min-height: 164px; padding: 8px 7px 12px; border-left: 1px solid var(--rule); }
.wkstrip li:first-child { border-left: 0; padding-left: 0; }
.wk-h { margin-bottom: 8px; font: 500 15px/1.3 var(--text); color: var(--dim); }
.wk-h b { font-weight: 650; color: var(--ink); }
.wkstrip .today .wk-h b { box-shadow: 0 2px 0 var(--sun); }
.wk-e { display: block; margin-top: 5px; padding: 5px 8px 6px; border-left: 3px solid var(--c, #5C97E6); border-radius: 5px; background: rgba(20, 32, 58, .055); font: 500 15px/1.25 var(--text); }
.wk-e small { display: block; font-size: 15px; color: var(--dim); }
.wk-hf { border-left-color: #D9A400; background: #FFE9A3; font-weight: 600; }
.wk-guess { padding: 4px 7px 5px; border: 1.5px dashed rgba(20, 32, 58, .55); background: none; }
.wk-needs { margin-top: 4px; }
.wk-needs ul { display: flex; flex-wrap: wrap; gap: 6px 30px; }
.wk-needs li { position: relative; display: flex; gap: 8px; padding-left: 20px; font: 400 16px/1.4 var(--text); }
.wk-needs .need-mark { top: 7px; }
.wk-needs b { font-weight: 650; }
.mview .panel[data-p="2"] { grid-template-columns: auto minmax(0, 1fr); gap: 0 clamp(32px, 5vw, 64px); }
.mview .month { grid-template-columns: repeat(7, 54px); }
.mview .m-d { height: 50px; padding-top: 4px; font-size: 16px; }
.mview .ahead li { grid-template-columns: 104px minmax(0, 1fr); padding: 12px 0; font-size: 16.5px; }
@media (max-width: 900px) {
  .mview .hf-sky { padding: 16px 18px 40px; }
  .mview .hs-pic { object-position: 84% 62%; }
  .mview .hf-body { padding: 14px 18px 18px; }
  .mview .switch { width: auto; font-size: 15px; }
  .mview .switch span { padding: 10px 4px; }
  .mview .panel[data-p="0"], .mview .panel[data-p="2"] { grid-template-columns: minmax(0, 1fr); }
  .mview .needs.roomy .need-in { padding: 12px 74px 13px 22px; }
  .wkstrip { grid-template-columns: minmax(0, 1fr); border-bottom: 0; }
  .wkstrip li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 0 6px; min-height: 0; padding: 6px 0 8px; border-left: 0; border-top: 1px solid var(--rule); }
  .wkstrip li:first-child { border-top: 0; }
  .wkstrip .wk-h { grid-row: 1 / 9; margin: 6px 0 0; }
  .wkstrip .wk-e { grid-column: 2; }
  .wkstrip li:not(:has(.wk-e)) { display: none; }
  .mview .month { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .mview .ahead li { grid-template-columns: 92px minmax(0, 1fr); }
  .mview .panel[data-p="2"] .ahead { display: block; }
}

/* ---------- it remembers what comes back around: a year in the life of the home ---------- */
/* the year and the morning view share the one inset width (1040), centred; every app-like stage fills the column */
/* never taller than the window under the top bar, so the note and the month that brings it are seen together */
.yr { width: min(100%, 1040px, (100vh - 150px) * 1.65); margin: 0 auto; }
.yr-pic { position: relative; aspect-ratio: 1600 / 968; overflow: hidden; border-radius: 20px; background: #CFE3F2; box-shadow: var(--lift); }
.yr-pan { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 1600 / 1000; }
.yr-s { position: absolute; left: 0; top: 0; display: block; width: 100%; height: 100%; }
/* the summer picture is 3% taller than the others: fitted to their framing so the house never doubles in a fade */
.yr-summer { transform-origin: 0 0; transform: translateY(-.17%) scaleY(.97); }
.yr-ring { position: absolute; z-index: 3; width: 11%; aspect-ratio: 1; margin: -5.500% 0 0 -5.500%; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255, 215, 102, .95), 0 0 0 9px rgba(255, 215, 102, .3), 0 0 44px 14px rgba(255, 215, 102, .55), inset 0 0 30px 6px rgba(255, 215, 102, .4); opacity: 0; transform: scale(.5); transition: opacity .35s ease, transform .5s var(--ease); pointer-events: none; }
.lit .yr-ring { opacity: 1; transform: none; }
/* the note: a small Homefellow sheet with a pointer */
.yr-note { --ax: 50%; --hide: translate(-50%, -6px) scale(.92); --show: translate(-50%, 0); position: absolute; z-index: 4; width: max-content; max-width: min(290px, 30%); padding: 10px 14px 11px; border-radius: 12px; background: var(--sheet); color: var(--ink); font: 400 15px/1.35 var(--text); box-shadow: 0 0 0 1px rgba(20, 32, 58, .1), 0 3px 6px rgba(20, 32, 58, .18), 0 16px 26px -10px rgba(20, 32, 58, .5); opacity: 0; visibility: hidden; transform: var(--hide); transition: opacity .25s, transform .35s var(--ease), visibility 0s .35s; }
.lit .yr-note { opacity: 1; visibility: visible; transform: var(--show); transition: opacity .3s, transform .45s cubic-bezier(.3, 1.4, .5, 1); }
.yr-note::after { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 2px; background: inherit; transform: rotate(45deg); }
.yr-note.above { --hide: translate(calc(var(--ax) * -1), 6px) scale(.92); --show: translate(calc(var(--ax) * -1), 0); margin-top: -6.400%; transform-origin: var(--ax) 100%; translate: 0 -100%; }
.yr-note.above::after { left: calc(var(--ax) - 6px); bottom: -5px; box-shadow: 1px 1px 0 rgba(20, 32, 58, .1); }
.yr-note.left { --hide: translate(6px, -50%) scale(.92); --show: translate(0, -50%); margin-left: -6.400%; transform-origin: 100% 50%; translate: -100% 0; }
.yr-note.left::after { right: -5px; top: calc(50% - 6px); box-shadow: 1px -1px 0 rgba(20, 32, 58, .1); }
.yr-note.right { --hide: translate(-6px, -50%) scale(.92); --show: translate(0, -50%); margin-left: 6.400%; transform-origin: 0 50%; }
.yr-note.right::after { left: -5px; top: calc(50% - 6px); box-shadow: -1px 1px 0 rgba(20, 32, 58, .1); }
.yn-t { font: 400 clamp(19px, 1.6vw, 22px)/1.12 var(--display); letter-spacing: -.006em; }
.yn-l { margin-top: 3px; }
.yn-a { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.yn-a .srcic { margin: 0; }
.yn-a .done-btn { height: 30px; padding: 0 12px; font-size: 15px; }
.yr-dock { display: none; }
/* the year: twelve months, tinted by season, and the marker that travels along them */
.yr-strip { margin-top: 14px; padding: 6px 0; border-radius: 12px; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.yr-strip:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }
.ys-track { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); height: 40px; border-radius: 10px; overflow: hidden; box-shadow: var(--lift-s); }
.ys-m { display: grid; place-items: center; color: rgba(20, 32, 58, .78); font: 600 15px/1 var(--text); transition: color .3s; }
.ys-m b { font-weight: inherit; }
.ys-m.cur { color: var(--ink); }
.ys-winter { background: #D3E3F3; } .ys-winter:nth-child(odd) { background: #C6DAF0; }
.ys-spring { background: #D6EACB; } .ys-spring:nth-child(odd) { background: #C9E3BE; }
.ys-summer { background: #FBE7A6; } .ys-summer:nth-child(odd) { background: #F9DE8E; }
.ys-autumn { background: #F6D0A6; } .ys-autumn:nth-child(odd) { background: #F3C493; }
.ys-markpos { position: absolute; inset: 0; pointer-events: none; will-change: transform; }
.ys-mark { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px rgba(255, 253, 247, .7); pointer-events: none; }
.ys-mark::before { content: ""; position: absolute; left: -5px; top: -5px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px rgba(255, 253, 247, .8); }
@media (max-width: 900px) {
  /* on a phone the months sit above the picture, so the time of year and the house are seen together */
  .yr { width: 100%; min-width: 0; display: flex; flex-direction: column; }
  /* the picture at 150% of the width, panning to whichever thing is lit; the note docked under it */
  .yr-pic { aspect-ratio: 1067 / 968; border-radius: 16px; }
  .yr-pan { width: 150%; transform: translate3d(var(--pan, -16.670%), 0, 0); transition: transform .9s cubic-bezier(.45, .05, .25, 1); }
  .instant .yr-pan { transition: none; }
  .yr-note:not(.docked) { display: none; }
  .yr-ring { width: 14%; margin: -7% 0 0 -7%; }
  .yr-dock { display: block; min-height: 108px; margin-top: 12px; }
  .yr-note.docked { position: relative; width: auto; max-width: none; translate: none; margin: 0; --hide: translateY(6px); --show: none; }
  .yr-note.docked::after { display: none; }
  .yr-strip { order: -1; margin: 0 0 8px; }
  .ys-track { height: 38px; }
  .ys-m b { font-size: 0; }
  .ys-m b::first-letter { font-size: 14px; }
}

/* ---------- wherever it's useful: the frame, the laptop and the phone, as a product family ---------- */
.where h2 { margin-bottom: .5em; }
.family { --stage: clamp(690px, 66vw, 820px); position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, .9fr); gap: 0 clamp(24px, 3.4vw, 52px); padding-top: var(--stage); }
.fam { display: contents; }
.fam h3 { grid-row: 1; margin: 30px 0 10px; font-size: clamp(26px, 2.5vw, 38px); }
.fam .copy { grid-row: 2; font-size: clamp(17px, 1.3vw, 20px); }
.fam-laptop > h3, .fam-laptop > .copy { grid-column: 1; }
.fam-frame > h3, .fam-frame > .copy { grid-column: 2; }
.fam-phone > h3, .fam-phone > .copy { grid-column: 3; }
.fam .dev-slot { position: absolute; }
.fam-frame .dev-slot { left: 50%; top: 0; width: min(54%, 670px); transform: translateX(-54%); }
.fam-laptop .dev-slot { left: -1.5%; bottom: calc(100% - var(--stage)); width: min(50%, 620px); z-index: 2; }
.fam-phone .dev-slot { right: clamp(8px, 3%, 44px); bottom: calc(100% - var(--stage)); width: 300px; z-index: 3; }
.dv-label { font: 600 13px/1.3 var(--text); color: var(--dim); }
/* a row that needs you: a round picture, the thing, its why, a round check */
.dv-need { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0 9px; padding: 8px 0; transition: opacity .4s; }
.dv-need + .dv-need { border-top: 1px solid var(--rule); }
.dv-th { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
.dv-th svg { width: 56%; height: 56%; }
.dv-th-form { background: #DCE7F6; color: #3D68A8; }
.dv-th-camp { background: #DCEFE3; color: #2E7354; }
.dv-th-vet { background: #F5E2D2; color: #9A532C; }
.dv-need p { min-width: 0; }
.dv-need b { display: block; font: 600 14.5px/1.25 var(--text); letter-spacing: -.006em; }
.dv-need span { display: block; font: 400 13px/1.3 var(--text); color: var(--dim); }
.dv-check { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: inset 0 0 0 1.75px rgba(20, 32, 58, .3); color: transparent; transition: background-color .25s, color .25s, box-shadow .25s; }
button.dv-check { cursor: pointer; }
.dv-check .ic { width: 14px; height: 14px; }
.dv-need.done .dv-check { background: var(--ink); color: var(--white); box-shadow: none; }
.dv-need.done b { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.dv-need.done p, .dv-need.done .dv-th { opacity: .45; }
.dv-time li { display: grid; grid-template-columns: 44px minmax(0, 1fr); padding: 5px 0; font: 500 13.5px/1.3 var(--text); }
.dv-time b { font-weight: 600; color: var(--dim); }

/* the kitchen frame: oak, a white mat, the picture edge to edge, type on the picture */
.kf { position: relative; container-type: inline-size; padding-top: 5.200%; }
.kf-light { position: absolute; left: -22%; right: -22%; top: -12%; bottom: -16%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 252, 240, .7), rgba(255, 252, 240, .28) 55%, rgba(255, 252, 240, 0)); pointer-events: none; }
.kf-nail { position: absolute; left: 50%; top: 0; width: 26%; height: 5.800%; margin-left: -13%; background: linear-gradient(to bottom right, transparent calc(50% - 1px), rgba(60, 40, 30, .55) calc(50% - 1px), rgba(60, 40, 30, .55) calc(50% + 1px), transparent calc(50% + 1px)) left / 50% 100% no-repeat, linear-gradient(to bottom left, transparent calc(50% - 1px), rgba(60, 40, 30, .55) calc(50% - 1px), rgba(60, 40, 30, .55) calc(50% + 1px), transparent calc(50% + 1px)) right / 50% 100% no-repeat; }
.kf-nail::after { content: ""; position: absolute; left: calc(50% - 5px); top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #6B4A36; box-shadow: 0 2px 3px rgba(40, 25, 15, .4); }
.kf-wood { position: relative; padding: 2.300cqw; border-radius: 6px; background: linear-gradient(135deg, #D9B07C 0%, #B98652 46%, #CFA36D 100%); box-shadow: inset 0 0 0 1px rgba(90, 50, 20, .45), inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -2px 0 rgba(70, 40, 15, .3), 0 3px 4px rgba(40, 30, 50, .22), 0 26px 40px -14px rgba(40, 30, 60, .5), 0 60px 80px -40px rgba(40, 30, 60, .45); }
.kf-mat { padding: 3cqw; background: #FDFBF6; box-shadow: inset 0 0 0 1px rgba(60, 40, 20, .25), inset 0 3px 6px rgba(60, 40, 20, .18); }
.kf-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #1A2452; box-shadow: 0 0 0 1px rgba(40, 30, 20, .35); }
/* the same thing at four times of day: pictures dissolve (the new one over the old, which stays whole underneath);
   words go, then the new words come once the picture is halfway */
.tod-pic > * { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.tod-pic > .was { opacity: 1; z-index: 0; }
.tod-pic > .cur { opacity: 1; z-index: 1; transition: opacity 1.2s ease; }
.tod-txt { display: grid; }
.tod-txt > * { grid-area: 1 / 1; opacity: 0; transition: opacity .25s ease; }
.tod-txt > .cur { opacity: 1; transition: opacity .4s ease .55s; }
.kf-screen .tod-pic { position: absolute; inset: 0; }
.kf-pics > * { object-position: 58% 50%; }
.kf-shade { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 46%; background: linear-gradient(180deg, rgba(14, 16, 44, 0), rgba(14, 16, 44, .5) 52%, rgba(14, 16, 44, .82)); }
.kf-text { position: absolute; inset: 0; z-index: 3; color: #FFF8EA; }
.kf-t { position: relative; }
.kf-top { position: absolute; left: 5.200%; top: 5%; z-index: 1; text-shadow: 0 1px 2px rgba(14, 18, 50, .55), 0 1px 14px rgba(14, 18, 50, .6); }
.kf-clock { font: 400 clamp(54px, 19cqw, 132px)/.9 var(--display); letter-spacing: -.02em; }
.kf-clock small { margin-left: .14em; font: 500 .22em/1 var(--text); letter-spacing: 0; }
.kf-date { margin-top: .5em; font: 600 clamp(15px, 3cqw, 20px)/1.3 var(--text); }
.kf-wx { font: 500 clamp(14px, 2.600cqw, 17px)/1.4 var(--text); }
.kf-low { position: absolute; left: 5.200%; right: 5.200%; bottom: 5.400%; z-index: 1; }
.kf-hello { margin-bottom: .2em; font: 400 clamp(20px, 4.400cqw, 30px)/1.1 var(--display); }
.kf-low ul { display: flex; flex-wrap: wrap; gap: 2px clamp(14px, 3.400cqw, 26px); font: 500 clamp(14px, 2.700cqw, 17.5px)/1.4 var(--text); }
.kf-low li { display: flex; align-items: baseline; gap: .5em; white-space: nowrap; transition: opacity .5s; }
.kf-low b { font-weight: 700; }
.kf-need i { align-self: center; width: .62em; height: .62em; border-radius: .16em; background: var(--sun); }
.kf-need.done { opacity: .4; text-decoration: line-through; }

/* the phone: a thin even bezel, a large radius, an island, the scene as a tall header under the sheet */
.ph { padding: 7px; border-radius: 44px; background: #10152E; box-shadow: inset 0 0 0 1.5px #3A4266, 0 0 0 1px #0A0D20, 0 30px 44px -18px rgba(20, 28, 60, .6), 0 70px 90px -50px rgba(20, 28, 60, .55); }
.ph-screen { position: relative; display: flex; flex-direction: column; height: 584px; overflow: hidden; border-radius: 37px; background: var(--sheet); color: var(--ink); }
.ph-status { position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 4px 22px 0 26px; color: #FFF8EA; font: 600 13px/1 var(--text); }
.ph-island { position: absolute; left: 50%; top: 9px; width: 76px; height: 22px; margin-left: -38px; border-radius: 11px; background: #080A18; }
.ph-status span { display: flex; align-items: flex-end; gap: 3px; }
.ph-status span i { width: 4px; height: 6px; border-radius: 1px; background: currentColor; }
.ph-status span i:nth-child(2) { height: 9px; }
.ph-status span i:nth-child(3) { width: 20px; height: 10px; border-radius: 3px; margin-left: 3px; }
.ph-hero { position: relative; flex: none; height: 192px; color: #FFF8EA; }
.ph-hero .tod-pic, .lap-banner .tod-pic { position: absolute; inset: 0; }
.ph-hero img { object-position: 86% 42%; }
.ph-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 20, 54, .5), rgba(16, 20, 54, 0) 42%, rgba(16, 20, 54, .3)); }
.ph-hello { position: absolute; left: 18px; top: 52px; z-index: 1; font: 400 25px/1.1 var(--display); white-space: nowrap; text-shadow: 0 1px 10px rgba(14, 18, 50, .5); }
.ph-date { text-shadow: 0 1px 8px rgba(14, 18, 50, .5); }
.ph-date { position: absolute; left: 18px; top: 84px; z-index: 1; font: 500 13px/1.3 var(--text); }
.ph-sheet { position: relative; z-index: 2; flex: 1 1 auto; min-height: 0; overflow: hidden; margin-top: -26px; padding: 16px 16px 0; border-radius: 26px 26px 0 0; background: var(--sheet); }
.ph-sheet .dv-label { margin: 2px 0 2px; }
.ph-sheet .dv-needs { margin-bottom: 10px; }
.ph-tabs { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); height: 60px; padding: 0 12px 8px; border-top: 1px solid var(--rule); background: var(--sheet); font: 600 13px/1.2 var(--text); color: rgba(20, 32, 58, .66); }
.ph-tabs span { display: grid; justify-items: center; align-content: center; gap: 2px; }
.ph-tabs svg { width: 21px; height: 21px; fill: currentColor; }
.ph-tabs .on { color: var(--ink); }

/* the laptop: thin, with the app in its window */
.lap { position: relative; container-type: inline-size; padding: 0 5.500%; }
.lap-lid { padding: 1.700cqw 1.700cqw 2.100cqw; border-radius: 2.400cqw 2.400cqw 0 0; background: #141A36; box-shadow: inset 0 0 0 1.5px #3A4266, 0 24px 40px -18px rgba(20, 28, 60, .55); }
.lap-screen { display: grid; grid-template-columns: 25% minmax(0, 1fr); aspect-ratio: 16 / 11; overflow: hidden; border-radius: .8cqw; background: var(--sheet); color: var(--ink); }
.lap-side { display: flex; flex-direction: column; gap: 2px; padding: 12px 6px; background: #F5F0E4; border-right: 1px solid var(--rule); font: 500 13px/1.25 var(--text); }
.lap-brand { margin: 0 6px 10px; font: 400 14px/1.1 var(--display); letter-spacing: -.01em; }
.lap-side span { padding: 6px 7px; border-radius: 7px; color: rgba(20, 32, 58, .72); white-space: nowrap; }
.lap-side .on { background: var(--ink); color: var(--white); font-weight: 600; }
.lap-main { display: flex; flex-direction: column; min-width: 0; }
.lap-banner { position: relative; flex: none; height: 27%; color: #FFF8EA; }
.lap-banner img { object-position: 50% 66%; }
.lap-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16, 20, 54, .45), rgba(16, 20, 54, 0) 60%); }
.lap-day { position: absolute; left: 16px; top: 10%; z-index: 1; font: 400 clamp(22px, 5cqw, 30px)/1.05 var(--display); text-shadow: 0 1px 10px rgba(14, 18, 50, .4); }
.lap-meta { position: absolute; left: 16px; top: 47%; z-index: 1; display: grid; font: 500 13px/1.32 var(--text); text-shadow: 0 1px 2px rgba(14, 18, 50, .6), 0 1px 10px rgba(14, 18, 50, .55); }
.lap-cols { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 0 16px; padding: 9px 12px 0 14px; min-height: 0; overflow: hidden; }
.lap-cols .dv-need { padding: 5px 0; gap: 0 7px; }
.lap-cols .dv-need span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lap-cols .dv-th { width: 30px; height: 30px; }
.lap-cols .dv-need b { font-size: 13px; }
.lap-cols .dv-check { width: 22px; height: 22px; }
.lap-cols .dv-check .ic { width: 11px; height: 11px; }
.lap-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 4px; margin-top: 6px; }
.lap-week li { display: grid; justify-items: center; align-content: start; gap: 5px; padding: 6px 0 10px; border-radius: 8px; }
.lap-week b { font: 600 14px/1.2 var(--text); color: var(--dim); }
.lap-week em { font: 400 21px/1 var(--display); font-style: normal; }
.lap-week .today { background: rgba(20, 32, 58, .07); }
.lap-week i { width: 76%; height: 8px; border-radius: 4px; background: #7FA8E6; }
.lap-week .wk-h { background: var(--sun); box-shadow: inset 0 0 0 1px rgba(20, 32, 58, .2); }
.lap-today { margin-top: 6px; }
.lap-cols .dv-time li { grid-template-columns: 40px minmax(0, 1fr); padding: 3px 0; font-size: 13px; }
.lap-ahead { margin-top: 10px; }
.lap-ahead li { padding: 6px 0; border-top: 1px solid var(--rule); font: 500 13px/1.3 var(--text); }
.lap-ahead b { display: block; font-weight: 650; color: var(--dim); }
.lap-base { position: relative; display: block; height: 2.600cqw; margin: 0 -5.800%; border-radius: 2px 2px 1.800cqw 1.800cqw; background: linear-gradient(180deg, #D7DCE8, #A9B1C6); box-shadow: 0 18px 24px -12px rgba(20, 28, 60, .5); }
.lap-base::after { content: ""; position: absolute; left: 50%; top: 0; width: 15%; height: 34%; margin-left: -7.500%; border-radius: 0 0 6px 6px; background: rgba(40, 50, 80, .35); }

@media (max-width: 900px) {
  /* one after another: the frame at full width, then the phone, then the laptop, each with its words */
  .family { display: flex; flex-direction: column; padding-top: 0; }
  .fam { display: block; margin-top: 88px; }
  .fam:first-child { margin-top: 0; }
  .fam-phone { order: 2; }
  .fam-laptop { order: 3; }
  .fam .dev-slot { position: relative; left: auto; right: auto; top: auto; bottom: auto; width: auto; transform: none; }
  .fam-frame .dev-slot { margin: 0 -6px; }
  .fam-phone .dev-slot { width: 300px; margin: 0 auto; }
  .fam-laptop .dev-slot { margin: 0 -4px; }
  .fam h3 { margin-top: 18px; }
  .kf-top { top: 4%; }
  .kf-low li { white-space: normal; }
  .lap-screen { grid-template-columns: minmax(0, 1fr); aspect-ratio: auto; }
  .lap-cols .dv-need span { white-space: normal; }
  .lap-side { display: none; }
  .lap-banner { height: 88px; }
  .lap-cols { grid-template-columns: minmax(0, 1fr); padding: 10px 14px 12px; }
  .lap-cols > div + div { margin-top: 8px; }
}

/* the inbox skims: rows arrive and are read at a quick, uneven tick */
.mail.wide .mail-rows { transition: transform .26s var(--ease), opacity .6s ease; }
.playing .mail.wide .mrow.scan .mscan { animation-duration: .42s; }
.mail.wide .mdot, .mail.wide .mtime, .mail.wide .mverdict { transition-duration: .2s; }

/* ---------- a tablet held upright (701 to 900): the phone's stages in a narrower centred column (site.css) ---------- */
@media (min-width: 701px) and (max-width: 900px) {
  /* the family's map less tall than it is wide, so the question and the picture share one screen */
  .map-art { aspect-ratio: 5 / 4; }
  .map-pan { width: 128%; }
}

/* ---------- a laptop or a tablet on its side (901 to 1300): the wide stages, made to fit ---------- */
@media (min-width: 901px) and (max-width: 1300px) {
  /* the calendars' list folds into one row above the week, so every day has room for its words */
  .cal-body { grid-template-columns: minmax(0, 1fr); }
  .cal-list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 7px 10px; border-right: 0; border-bottom: 1px solid var(--app-line); }
  .cal-list p { display: none; }
  .cal-list ul { display: flex; flex-wrap: wrap; }
  .cal-list li { gap: 7px; padding: 4px 8px; }
  .cal-hf { width: auto; margin: 0 0 0 auto; padding: 6px 8px 6px 10px; gap: 9px; }
}
@media (min-width: 1181px) and (max-width: 1300px) {
  /* all seven days: an entry with a shorter name uses it */
  .t-long { display: none; }
  .t-short { display: inline; }
}
@media (min-width: 901px) and (max-width: 1180px) {
  /* Monday to Friday, wide enough that no entry is cut */
  .cal-grid { grid-template-columns: 58px repeat(5, minmax(0, 1fr)); }
  .cal-one .cal-day[data-d="sat"], .cal-one .cal-day[data-d="sun"] { display: none; }
  /* the mail window without its folders, and wider than Homefellow's list, so no row is cut */
  .stage[data-scene="email"] { grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: 32px; }
  .mail-body { grid-template-columns: minmax(0, 1fr); }
  .mail-side { display: none; }
  .mrow { grid-template-columns: 9px 128px minmax(0, 1fr) auto; }
  .wide .mail-open { left: 30%; }
  /* the laptop's week strip and its long lines need a wider screen than this */
  .lap-week { display: none; }
}

/* ---------- the narrowest phones ---------- */
@media (max-width: 380px) {
  /* a quiet email keeps only its check, so the sender's name has room */
  .mrow:not(.flag) .mverdict { gap: 0; font-size: 0; }
  /* the calendar's time column narrower, and Wednesday as wide as Tuesday */
  .cal-grid { grid-template-columns: 44px minmax(0, 1.5fr) minmax(0, 1.3fr) minmax(0, 1fr); }
  .cal-hr, .cal-times .cal-ad { padding: 0 4px 0 0; font-size: 13px; }
  .ev-badge { display: table; margin: 2px 0 0; }
  .cal .app-bar { gap: 8px; padding: 0 8px; }
  .cal .seg i { padding: 2px 6px; }
  /* four answers still on one row */
  .map-q .choices { gap: 5px; }
  .map-q .choice { padding: 8px 9px 9px; font-size: 15px; }
}

/* ---------- phones ---------- */
@media (max-width: 700px) {
  /* the calendar starts at 3 PM (nothing on these three days is earlier), so the week, the change and the key below
     it fit one screen */
  .cal-ad { height: 80px; }
  .cal-times .cal-hr:nth-child(3) { display: none; }
  .cal-one .cal-hours { height: calc(var(--hh) * 5); }
  .cal-one .ev:not(.allday) { top: calc((var(--s) - 1) * var(--hh) + 1px); }
}
@media (max-width: 900px) {
  /* the month's letter stays readable: the marker is a dot under it */
  .ys-m { place-items: start center; padding-top: 7px; }
  .ys-mark { top: auto; bottom: 4px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 253, 247, .8); }
  .ys-mark::before { display: none; }
}
@media (max-width: 420px) {
  /* a note's line has room for two lines, so the stage keeps its height whichever note is up */
  .yr-note.docked .yn-l { min-height: 2lh; }
}
