/* humelodica.app — the how-to pages (11-15 howto). Plain help pages on the legal pages' look: site.css's colours and type only
   (page, ink, muted, line, box, mark), nothing new. The home page (hero.css) and the legal pages are untouched by this file. */
.howto .crumb { margin: 32px 0 0; font-size: 15px; }
.howto .crumb a { color: var(--muted); text-decoration: none; }
.howto .crumb a:hover { color: var(--ink); text-decoration: underline; }
.howto h1 { margin-top: 8px; }
.howto .answer { font-size: 20px; line-height: 1.5; color: var(--ink); margin: 14px 0 4px; }

.howto .steps { list-style: none; padding: 0; margin: 8px 0 0; }
.howto .steps > li { margin: 40px 0 0; }
.howto .steps h3 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 6px; font-size: 21px; font-weight: 600; letter-spacing: -0.2px; line-height: 1.3; }
.howto .steps h3 .n { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: var(--page); font-size: 15px; font-weight: 600; letter-spacing: 0; transform: translateY(-2px); }
.howto .steps p { margin: 6px 0; }
.howto .shot { margin: 18px 0 4px; }
.howto .shot img { display: block; width: 300px; max-width: 80%; height: auto; border-radius: 22px; border: 1px solid var(--line); background: var(--box); }

.howto .guides { list-style: none; padding: 0; margin: 20px 0 0; }
.howto .guides > li { margin: 0; padding: 18px 0; border-bottom: 1px solid var(--line); }
.howto .guides > li:first-child { border-top: 1px solid var(--line); }
.howto .guides a { font-size: 19px; font-weight: 600; text-decoration: none; line-height: 1.35; }
.howto .guides a:hover { text-decoration: underline; }
.howto .guides p { margin: 6px 0 0; font-size: 16px; color: var(--muted); }

.howto .end { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.howto .end .store { display: block; line-height: 0; border-radius: 8px; }
.howto .end .store img { display: block; height: 40px; width: auto; }
.howto .end .next { margin: 0; font-size: 17px; }
.howto .end .next a { font-weight: 600; }
.howto .guides + .end { margin-top: 32px; border-top: 0; padding-top: 0; }   /* the list's own last line is the rule above it */

@media (max-width: 560px) {
  .howto .answer { font-size: 18px; }
  .howto .shot img { width: 260px; }
}

/* LAYOUT E+ (11-17 howtoeplus; Ness 17 Nov: 'i like how you can clearly see it all on e, but then i also like how its neatly set up on f'
   → 'yeah go ahead with e+'). Each step list is a STORYBOARD: the steps as cards, each its screen on top, then its numbered title and its
   words — every screen and every word in the page with or without script. A whole phone screen loses its empty status-bar strip
   ('we should also crop the top'). 3 or 4 across on a wide screen, the build's pick for the guide (.cols-3 / .cols-4: the fuller last
   row), two across on a device. howto.js adds .e-on: a click on a card's screen or title opens the step large (#zoom below). No hint line
   says so (Ness 17 Nov, of 'Tap a screen to see it large.': 'remove this'): the lift on hover and the zoom-in pointer are the cue. */
:root { --body: #262c26; --lift: rgba(18, 26, 19, .22); }   /* the site's ink, see-through, for the lifted card and the dialog's shadow */
.howto .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 24px; margin-top: 30px; }
.howto .steps.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* a 4-across grid runs wider than the 720 px text column so its cards stay the 3-across size (224 px: 4 x 224 + 3 x 24 = 968), centred on
   the page and never past the page's 20 px gutter (the main session's call, 17 Nov) */
@media (min-width: 641px) {
  .howto .steps.cols-4 { --w: min(968px, calc(100vw - 40px)); width: var(--w); margin-left: calc((100% - var(--w)) / 2); margin-right: calc((100% - var(--w)) / 2); }
}
.howto .steps > li { display: flex; flex-direction: column; margin: 0; }
.howto .steps > li > .shot { order: -1; margin: 0 0 14px; }
.howto .steps .shot img { width: 100%; max-width: 100%; border-radius: 16px; }
.howto .steps h3 { font-size: 18px; gap: 9px; }
.howto .steps h3 .n { width: 24px; height: 24px; font-size: 13px; }
.howto .steps p { font-size: 15px; line-height: 1.5; }
.howto .shot.full img { aspect-ratio: 300 / 610; object-fit: cover; object-position: 50% 100%; }   /* 600 x 1304 screens: the empty strip at the top cropped off (Ness 17 Nov: 'crop the top') */

.howto.e-on .steps .shot img { cursor: zoom-in; transition: transform .2s, box-shadow .2s; }
@media (hover: hover) { .howto.e-on .steps .shot img:hover { transform: translateY(-3px); box-shadow: 0 10px 24px var(--lift); } }
.howto.e-on .steps h3 { cursor: pointer; }
.howto .shot > button { all: unset; display: block; width: 100%; border-radius: 16px; }
.howto .shot > button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* The large view: a native <dialog> (howto.js makes it). The screen on the left, sized to the window's height; the step count, title and
   words on the right, BOTTOM-ALIGNED so Back and Next sit on the screen's bottom edge and never move from step to step (Ness 17 Nov:
   'we need the text to be aligned bottom ideally otherwise everything moves when you press next, and those buttons should be
   consistent'): Back, Next and Close one height and style. Escape, Close or a click outside closes it; the arrow keys step through. */
#zoom { border: 0; padding: 0; background: var(--page); color: var(--ink); border-radius: 24px; width: min(780px, calc(100vw - 32px)); max-width: none;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; box-shadow: 0 30px 80px var(--lift); font-family: 'Outfit', 'Helvetica Neue', sans-serif; }
#zoom::backdrop { background: rgba(18, 26, 19, .45); }
.zin { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 36px; padding: 28px; align-items: stretch; }
.zshot img { display: block; height: min(540px, calc(100vh - 100px)); height: min(540px, calc(100dvh - 100px)); width: auto; max-width: 100%; border-radius: 20px; border: 1px solid var(--line); background: var(--box); box-sizing: border-box; }
.zshot img.full { aspect-ratio: 300 / 610; object-fit: cover; object-position: 50% 100%; }
.zwords { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; padding-top: 60px; }
.zcount { margin: 0 0 10px; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.zwords h3 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 8px; font-size: 26px; font-weight: 600; letter-spacing: -0.3px; line-height: 1.25; }
.zwords h3 .n { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--page); font-size: 16px; letter-spacing: 0; transform: translateY(-3px); }
.zwords p { margin: 6px 0; font-size: 18px; line-height: 1.6; color: var(--body); }
.znav { display: flex; gap: 10px; margin-top: 26px; }
.znav button, .zclose { box-sizing: border-box; height: 46px; padding: 0 22px; font: 600 16px/1 'Outfit', 'Helvetica Neue', sans-serif; border-radius: 999px; cursor: pointer; border: 1.5px solid var(--ink); }
.znav button { width: 128px; }
.znav .prev, .zclose { background: transparent; color: var(--ink); }
.znav .next { background: var(--ink); color: var(--page); }
.znav button:disabled { opacity: .35; cursor: default; }
.zclose { position: absolute; top: 28px; right: 28px; }
.znav button:focus-visible, .zclose:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* a device: two across; the large view takes the whole screen — the screen at the top, the words under it, Back and Next pinned to the
   bottom (the dialog scrolls under them when the words run long, so they stay put then too) */
@media (max-width: 640px) {
  .howto .steps, .howto .steps.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .howto .steps p { font-size: 14px; }
  #zoom { width: 100vw; max-width: 100vw; height: 100%; max-height: 100%; margin: 0; border-radius: 0; }
  .zin { display: flex; flex-direction: column; gap: 20px; min-height: 100%; box-sizing: border-box; padding-block: calc(64px + env(safe-area-inset-top, 0px)) 0;
    padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .zshot img { width: 200px; max-width: 60%; height: auto; }
  .zwords { flex: 1 1 auto; padding-top: 0; justify-content: flex-start; }
  .znav { position: sticky; bottom: 0; margin: auto 0 0; padding-block: 20px calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--page); }
  .znav button { flex: 1 1 0; width: auto; }
  .zclose { top: calc(14px + env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); }
  .zwords h3 { font-size: 22px; }
  .zwords p { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .howto.e-on .steps .shot img { transition: none; } }
