/* The "How to" panel (HELP_AND_RUNBOOK_SPEC section 5). Every rule hangs off
   the panel's own classes. Tokens point at public/styles.css (VISUAL_SPEC);
   no new palette. Status colours reuse the access-level pairs. */
.htlayer, .howbtn, .howlink {
  /* --ink, --ink-2, --muted, --line, --off, --paper and --accent come from :root */
  --sent-bg: var(--tint); --signed: var(--l1); --adjusted: var(--l3);
}
.htlayer { font-size: 14px; line-height: 1.5; font-family: inherit; color: var(--ink); }
.htlayer * { box-sizing: border-box; }
.htlayer h2, .htlayer h3, .htlayer p { margin: 0; }
.howbtn { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; white-space: nowrap; }
.howbtn .q { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 11px; font-weight: 700; line-height: 1; }
.htlayer { position: fixed; inset: 0; z-index: 1001; }
.htscrim { position: absolute; inset: 0; background: rgba(22,25,29,.28); }
.htpanel { position: absolute; top: 0; right: 0; bottom: 0; width: 360px; max-width: 100%; background: var(--paper); box-shadow: -6px 0 24px rgba(22,25,29,.18); display: flex; flex-direction: column; outline: none; color: var(--ink); font-size: 14px; line-height: 1.5; }
.hthead { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.hthead h2 { font-size: 17px; font-weight: 700; }
.hthead small { color: var(--muted); font-size: 12.5px; }
.htclose { margin-left: auto; background: none; border: 0; font-size: 24px; line-height: 1; color: var(--muted); padding: 0 4px; min-width: 32px; min-height: 32px; }
.htclose:hover { color: var(--ink); }
.htscroll { flex: 1; overflow-y: auto; padding: 8px 18px 16px; }
.htscroll h3 { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 4px; }
.htlist { list-style: none; margin: 0; padding: 0; }
.htlist > li { border-bottom: 1px solid var(--line); }
.httitle { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0; padding: 11px 0; font-weight: 600; font-size: 14px; color: var(--ink); }
.httitle::after { content: "+"; margin-left: auto; color: var(--muted); font-weight: 400; font-size: 18px; line-height: 1; }
.htlist > li.on .httitle::after { content: "\2212"; }
.htsoon { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--off); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.htbody { padding: 0 0 14px; }
.htgoal { background: var(--sent-bg); border-radius: 7px; padding: 8px 11px; color: var(--ink-2); font-size: 13.5px; margin-bottom: 10px; }
.htoutline { color: var(--ink-2); font-size: 13.5px; }
.htsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.htsteps > li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 9px; align-items: start; }
.htn { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700; }
.htsteps p { font-size: 13.5px; color: var(--ink); padding-top: 2px; }
.htpic { background: none; border: 0; padding: 4px 0 0; color: var(--accent); font-size: 12.5px; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.htshot { width: 100%; height: auto; margin-top: 6px; border: 1px solid var(--line); border-radius: 6px; }
.htshot.pending { display: grid; place-items: center; height: 110px; background: var(--off); color: var(--muted); font-size: 12.5px; border-style: dashed; }
.htdone { margin-top: 12px; font-size: 13.5px; color: var(--ink-2); }
.htdone > b:first-child { color: var(--signed); margin-right: 4px; }
.htwatch { margin-top: 10px; border: 1px solid #F1D9B5; background: #FFF8EE; border-radius: 7px; padding: 8px 11px; font-size: 13px; color: var(--ink-2); }
.htwatch > b { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--adjusted); margin-bottom: 2px; }
.htwatch ul { margin: 0; padding-left: 18px; }
.htnone { color: var(--muted); font-size: 13.5px; padding: 12px 0; }
.htback { background: none; border: 0; padding: 6px 0; color: var(--accent); font-size: 13px; font-weight: 500; }
.htfoot { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 18px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.htlink { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; font-size: 13px; }
.htmuted { color: var(--muted); }
.helpfoot { max-width: 980px; margin: 0 auto; padding: 4px 16px 28px; text-align: center; }
.howlink { background: none; border: 0; padding: 8px 0; color: var(--accent); font-size: 13.5px; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 520px) {
  .htpanel { width: 100%; }
}
.htzoom { display: block; position: relative; width: 100%; padding: 0; margin: 0; border: 0; background: none; cursor: zoom-in; text-align: left; }
.htzoom .htshot { transition: box-shadow .15s; }
.htzoom:hover .htshot, .htzoom:focus-visible .htshot { box-shadow: 0 0 0 2px var(--accent); }
.htzoomhint { position: absolute; right: 6px; bottom: 6px; background: rgba(22,25,29,.78); color: #fff; font-size: 11.5px; font-weight: 500; border-radius: 4px; padding: 2px 7px; }
.htbox { position: absolute; inset: 0; z-index: 2; background: rgba(22,25,29,.86); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 48px 24px 20px; cursor: zoom-out; }
.htbox img { max-width: 100%; max-height: calc(100vh - 110px); width: auto; height: auto; object-fit: contain; border-radius: 6px; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.45); }
.htbox p { color: #E3E7EC; font-size: 13px; text-align: center; }
.htboxclose { position: absolute; top: 10px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.htboxclose:hover { background: rgba(255,255,255,.26); }
@media (max-width: 520px) { .htbox { padding: 56px 8px 12px; } }

/* DECKWRIGHT: in the app bar the button sits in .me, before the email, and
   takes .me button's type and colour. */
.me .howbtn { color: var(--on-accent); }
.me .howbtn:hover { text-decoration: underline; }
.htwatch { border-color: var(--l3-bg); background: var(--l3-bg); }

/* DECKWRIGHT: the explainer video slot and its pop-out (HELP_AND_RUNBOOK_SPEC 7b.1). */
.htvid { display: block; position: relative; width: 100%; padding: 0; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--navy-deep); cursor: pointer; text-align: left; }
.htvid img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.htvid:hover, .htvid:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.htplay { position: absolute; left: 50%; top: 42%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--paper); }
.htplay::after { content: ""; position: absolute; left: 18px; top: 14px; border-style: solid; border-width: 9px 0 9px 14px; border-color: transparent transparent transparent var(--on-accent); }
.htvidmeta { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px; background: var(--paper); color: var(--ink-2); font-size: 12.5px; }
.htvidmeta b { color: var(--ink); font-weight: 600; }
.htvbox { cursor: default; }
.htvbox video { max-width: min(100%, 1200px); max-height: calc(100vh - 120px); width: 100%; background: #000; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.45); }
