/* The QR redesign part 2 (his pick 22 Oct 14:12: layout B; the approved round-2 sketch ~/projects/tm30-scratch-keep/redesign/new2/step1.css):
   THE "Scan with your phone" component's look (src/core/phone-qr.js), loaded by the website and the extension (the build copies it to
   lib/phone-qr.css). Closed: ONE slim line, no box. Open: a tight panel — the QR (160 px) with the sentence, the link + Copy and Reset QR
   stacked beside it; a narrow box (a phone) moves the link row under the QR. Built only on the tokens both pages define; 44 px targets. */
.sp{container-type:inline-size;display:grid;gap:8px;min-width:0}
.sp-line{display:flex;align-items:center;gap:8px;min-height:44px;min-width:0;padding-left:2px;flex-wrap:wrap;row-gap:0}   /* T-352b: the button under the title when both do not fit (240 px: it ran 57 px past the edge) */
.sp-ic{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:var(--brand-soft);color:var(--brand-text)}
.sp-ic svg{width:16px;height:16px}
.sp-title{margin:0;white-space:nowrap;font-weight:600;font-size:var(--fs-1,13.5px);color:var(--ink)}
.sp .sp-toggle{flex:none;white-space:nowrap;display:inline-flex;align-items:center;gap:4px;min-height:44px;margin:0;padding:0 6px;border:0;border-radius:var(--radius-s,6px);background:transparent;color:var(--brand-text);font:inherit;font-weight:600;font-size:var(--fs-1,13.5px);cursor:pointer;width:auto;box-shadow:none}
@media (hover:hover){.sp .sp-toggle:not(:disabled):hover{background:var(--surface-2);text-decoration:underline;text-underline-offset:2px}}
.sp-chev{width:14px;height:14px;flex:none;transition:transform .2s ease}
.sp-toggle[aria-expanded="true"] .sp-chev{transform:rotate(180deg)}
/* the open panel: the QR, and everything else stacked beside it */
.sp-panel{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"qr side";gap:12px;align-items:start;justify-self:start;width:fit-content;max-width:100%;padding:10px;box-sizing:border-box;border:1px solid var(--line-strong);border-radius:var(--radius,8px);background:var(--surface);min-width:0}
.sp-panel[hidden]{display:none}
.sp-qr{grid-area:qr;display:block;width:160px;height:160px;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius-s,6px)}
.sp-side{grid-area:side;display:grid;gap:8px;align-content:start;min-width:0;max-width:30rem}
.sp-say{margin:0;font-size:13px;line-height:1.4;color:var(--ink)}
.sp-linkrow{display:flex;gap:6px;align-items:center;min-width:0}
.sp .sp-link{flex:1 1 auto;width:auto;min-width:0;min-height:44px;margin:0;padding:6px 8px;box-sizing:border-box;border:1px solid var(--line-strong);border-radius:var(--radius-s,6px);background:var(--surface-2);color:var(--ink-2);font:inherit;font-size:12.5px;text-overflow:ellipsis}
.sp .sp-copy{flex:none;min-height:44px;margin:0;padding:0 12px;border:1px solid var(--line-strong);border-radius:var(--radius-s,6px);background:var(--surface);color:var(--brand-text);font:inherit;font-weight:600;font-size:13px;cursor:pointer;width:auto;box-shadow:none}
.sp .sp-reset{justify-self:start;display:inline-flex;align-items:center;gap:5px;min-height:44px;margin:-6px 0 -6px -6px;padding:0 6px;border:0;border-radius:var(--radius-s,6px);background:transparent;color:var(--ink-2);font:inherit;font-size:12.5px;font-weight:500;cursor:pointer;width:auto;box-shadow:none}
.sp-reset svg{width:14px;height:14px}
/* his 26 Oct look (T-267): with a mouse, Reset QR sits closer to the link so the tip can take 2 lines; a touch screen keeps the 44 px target */
@media (pointer:fine){.sp .sp-reset{min-height:28px;margin:-4px 0 -4px -6px}}
.sp-tip{margin:0;font-size:12.5px;line-height:1.4;color:var(--ink-2)}
@media (hover:hover){.sp .sp-copy:not(:disabled):hover,.sp .sp-reset:not(:disabled):hover{background:var(--surface-2);color:var(--ink)}}
/* an empty status line takes no room but stays in the page (a live region must be there before its words arrive) */
.sp-msg{margin:0;font-size:13px;color:var(--ink-2)}
.sp-msg:empty{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* a narrow box (a phone): the QR beside the sentence, Reset QR and its tip (T-267), the link row under all three */
@container (max-width:350px){
  .sp-panel{grid-template-columns:auto minmax(0,1fr);grid-template-areas:"qr say" "qr reset" "qr tip" "link link";gap:8px 12px;width:100%}
  .sp-side{display:contents}
  .sp-say{grid-area:say}
  .sp .sp-reset{grid-area:reset;align-self:end;margin-bottom:0}
  .sp-linkrow{grid-area:link}
  .sp-tip{grid-area:tip}
  .sp-qr{width:140px;height:140px}
}
@container (max-width:380px){
  .sp-ic{display:none}
  .sp-title,.sp .sp-toggle{font-size:14px}
}
@media (prefers-reduced-motion:reduce){.sp *{transition:none!important}}
