/* ================= Did You Know: banner, carousel, close flow =================
   Reads every value from alt-tokens.css. Host (`.a-dyk-host`) and panel (`.a-dyk-panel`) are
   two elements like `.a-band`/`.a-context`. The host keeps padding while `hidden`; CSS/base.css's
   `[hidden]` wins regardless (sys_design-system.md, "hidden is a property, and it wins"). */

/* ---------- the host: a wrapper, exactly like .a-band / .a-context ---------- */

/* Same declaration and tokens as its siblings `.a-band` (alt-shell.css) and `.a-context`
   (alt-tasks.css); the row gap is `.a-page`'s own `gap`. */
.alt-app .a-dyk-host{ flex:0 0 auto; padding:var(--a-3) var(--a-4) 0; }
/* The one breakpoint those two siblings narrow at (alt-responsive.css, alt-tasks.css) — matched
   here on the same property so the three stay aligned below 1024px too. */
@media (max-width:820px){
  .alt-app .a-dyk-host{ padding-left:var(--a-3); padding-right:var(--a-3); }
}

/* ---------- the card ---------- */

.alt-app .a-dyk-panel{
  display:flex;
  flex-direction:column;
  gap:var(--a-4);
  width:100%;
  box-sizing:border-box;
  padding:var(--a-4);
  background:var(--a-panel);
  border:1px solid var(--a-blue);
  border-radius:var(--a-r-lg);
}

/* Inside `.a-modal` the dialog chrome is the box, as `.a-dyk-manual-slot` already does;
   `.in-modal` sheds the card's border/background to avoid a card inside a card. */
.alt-app .a-dyk-panel.in-modal{
  border:0;
  background:transparent;
  height:100%;
  overflow:auto;
  scrollbar-gutter:stable;
}

/* ---------- head row: eyebrow, position, Previous/Next, then (pushed right) i / close ---------- */

.alt-app .a-dyk-head{
  display:flex;
  align-items:center;
  gap:var(--a-3);
  flex-wrap:wrap;
}

.alt-app .a-dyk-eyebrow{
  font:700 var(--a-fs-11)/var(--a-lh-tight) var(--a-body);
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--a-dim);
  flex:0 0 auto;
}

.alt-app .a-dyk-pos{
  font-size:var(--a-fs-ctl-sm);
  color:var(--a-dim);
  flex:0 0 auto;
}

/* An icon button is a square on the ladder with the 6px radius (DS-21); `.a-btn.icon` gives the box, hit target
   and focus ring, this shows the edge before hover so a lone control is findable. */
.alt-app .a-dyk-navbtn{
  border-radius:var(--a-r-sm);
  background:transparent;
  border-color:var(--a-line-strong);
}
.alt-app .a-dyk-navbtn:hover{
  background:var(--a-raised);
  border-color:var(--a-blue);
}
.alt-app .a-dyk-navbtn > svg{ width:var(--a-glyph); height:var(--a-glyph); }   /* the one 15px glyph (DS-21) */

.alt-app .a-dyk-head-spacer{ flex:1 1 auto; }

.alt-app .a-dyk-info,
.alt-app .a-dyk-close{ flex:0 0 auto; }

/* ---------- body: title, description, benefit cues ---------- */

.alt-app .a-dyk-body{
  display:flex;
  flex-direction:column;
  gap:var(--a-2);
}

.alt-app .a-dyk-title{
  font:700 var(--a-fs-21)/var(--a-lh-tight) var(--a-display);
  color:var(--a-text);
  margin:0;
}

.alt-app .a-dyk-desc{
  font-size:var(--a-fs-ctl);
  line-height:var(--a-lh-body);
  color:var(--a-dim);
  margin:0;
  max-width:70ch;
}

/* The cues row sits below the description in source order (never absolute), so it wraps and
   cannot overlap. Each entry is a check mark plus its caption; `tip.benefits` ships plain
   sentences and must not be abbreviated (design spec, "Content truth"). */
.alt-app .a-dyk-cues{
  display:flex;
  flex-wrap:wrap;
  gap:var(--a-3) var(--a-5);
  margin-top:var(--a-2);
}

.alt-app .a-dyk-cue{
  display:flex;
  align-items:center;
  gap:8px;
  max-width:220px;
}

.alt-app .a-dyk-cue-ico{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  flex:0 0 auto;
  border-radius:var(--a-r-pill);
  background:var(--a-blue-soft);
  color:var(--a-blue);
}
.alt-app .a-dyk-cue-ico svg{ width:12px; height:12px; }

.alt-app .a-dyk-cue-cap{
  font-size:var(--a-fs-ctl-sm);
  line-height:var(--a-lh-ui);
  color:var(--a-text);
}

/* ---------- foot: CTA(s) + the anchor's primary button, then the progress dots ---------- */

.alt-app .a-dyk-foot{
  display:flex;
  flex-direction:column;
  gap:var(--a-3);
}

.alt-app .a-dyk-foot-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:var(--a-2);
}

.alt-app .a-dyk-ctas{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:var(--a-2);
}

/* The anchor's primary action, pushed right with `margin-left:auto` so it drops to the next
   line when the row is too narrow instead of squeezing the CTAs beside it. */
.alt-app .a-dyk-mobile-cta{ margin-left:auto; }
.alt-app .a-dyk-mobile-cta-ico{ display:inline-flex; width:15px; height:15px; flex:0 0 auto; }
.alt-app .a-dyk-mobile-cta-ico svg{ width:15px; height:15px; }

.alt-app .a-dyk-dots{
  display:flex;
  align-items:center;
  gap:8px;
}

.alt-app .a-dyk-dot{
  width:6px;
  height:6px;
  border-radius:var(--a-r-pill);
  background:var(--a-line-strong);
  transition:width var(--a-quick) var(--a-ease), height var(--a-quick) var(--a-ease),
             background var(--a-quick) var(--a-ease);
}

/* Never colour alone — the current dot is also larger and carries a ring, so the distinction
   survives for a reader who can't tell accent blue from the line colour. */
.alt-app .a-dyk-dot.cur{
  width:9px;
  height:9px;
  background:var(--a-blue);
  outline:2px solid var(--a-blue-soft);
  outline-offset:0;
}

/* The ellipsis placeholder a condensed dot row draws for what the window left out
   (dykDotPlan(), JS/features/did-you-know.js) — text, never a dot, so it's not miscounted. */
.alt-app .a-dyk-dot-gap{
  font-size:var(--a-fs-11);
  line-height:var(--a-lh-ctl);
  color:var(--a-faint);
  letter-spacing:1px;
}

/* ---------- responsive: collapse the wide composition before it breaks ---------- */

/* Cues first — each wraps on its own (`.a-dyk-cue`'s max-width plus `.a-dyk-cues`' wrap), so a
   narrow card just gets more rows; only the gap tightens. */
@media (max-width:900px){
  .alt-app .a-dyk-cues{ gap:var(--a-2) var(--a-4); }
}

@media (max-width:640px){
  .alt-app .a-dyk-cue{ max-width:none; }
  .alt-app .a-dyk-cue-cap{ font-size:var(--a-fs-11); }
  /* The footer's two halves stack rather than wrap mid-row, so "Open Mobile View" never ends
     up squeezed onto the same line as a Quick Start button at a width neither can share. */
  .alt-app .a-dyk-foot-actions{ flex-direction:column; align-items:stretch; }
  .alt-app .a-dyk-mobile-cta{ margin-left:0; }
}

/* ---------- the manual dialog's own frame ---------- */

/* Sized to what a tip actually needs, not the Suite's 920×760 settings-dialog default — a
   fitted variant on its own class, the same pattern `.a-modal.a-okr-flow` uses. */
.alt-app .a-modal.a-dyk-manual-modal{
  width:min(640px, 92vw);
  height:auto;
  max-height:min(640px, 88vh);
}
.alt-app .a-dyk-manual-slot{ display:flex; flex-direction:column; min-height:0; height:100%; }

/* ---------- "Hide Did You Know?" ---------- */

.alt-app .a-modal.a-dyk-hide-modal{
  width:min(460px, 92vw);
  height:auto;
  max-height:88vh;
  padding:var(--a-5);
  gap:var(--a-4);
  overflow:auto;
}

.alt-app .a-dyk-hide-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:var(--a-3);
}
.alt-app .a-dyk-hide-head h3{ font:600 var(--a-fs-16)/var(--a-lh-tight) var(--a-display); color:var(--a-text); margin:0; }

.alt-app .a-dyk-hide-group{
  display:flex;
  flex-direction:column;
  gap:var(--a-3);
  border:0;
  padding:0;
  margin:0;
}

/* Same card-with-a-radio idiom as `.sx-choice` (alt-storage-retention.css): clickable
   anywhere in the row, with the whole row carrying the focus ring. */
.alt-app .a-dyk-choice{
  display:flex;
  align-items:flex-start;
  gap:var(--a-3);
  padding:var(--a-3);
  border:1px solid var(--a-line);
  border-radius:var(--a-r);
  background:var(--a-raised);
  cursor:pointer;
}
.alt-app .a-dyk-choice:hover{ border-color:var(--a-line-strong); }
.alt-app .a-dyk-choice:has(input:checked){ border-color:var(--a-blue); }
.alt-app .a-dyk-choice:focus-within{
  border-color:var(--a-blue);
  outline:var(--a-focus);
  outline-offset:var(--a-focus-offset);
}
.alt-app .a-dyk-choice > input[type="radio"]{
  flex:0 0 auto;
  margin:3px 0 0;
  accent-color:var(--a-blue);
}
.alt-app .a-dyk-choice-body{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
}
.alt-app .a-dyk-choice-t{ font-size:var(--a-fs-14); font-weight:700; color:var(--a-text); }
.alt-app .a-dyk-choice-d{ font-size:var(--a-fs-ctl-sm); line-height:var(--a-lh-ui); color:var(--a-dim); }

.alt-app .a-dyk-hide-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:var(--a-2);
}

/* ---------- "You're all set!" ---------- */

.alt-app .a-modal.a-dyk-confirm-modal{
  width:min(420px, 92vw);
  height:auto;
  max-height:88vh;
  padding:var(--a-6) var(--a-5);
  align-items:center;
  text-align:center;
  gap:var(--a-3);
  overflow:auto;
}

.alt-app .a-dyk-confirm-badge{
  display:flex;
  align-items:center;
  justify-content:center;
  width:56px;
  height:56px;
  border-radius:var(--a-r-pill);
  background:var(--a-green-soft);
  color:var(--a-green);
}
.alt-app .a-dyk-confirm-badge svg{ width:28px; height:28px; }

.alt-app .a-dyk-confirm-title{
  font:600 var(--a-fs-16)/var(--a-lh-tight) var(--a-display);
  color:var(--a-text);
  margin:0;
}

.alt-app .a-dyk-confirm-body{
  font-size:var(--a-fs-ctl);
  line-height:var(--a-lh-body);
  color:var(--a-dim);
  margin:0;
  max-width:38ch;
}

.alt-app .a-dyk-confirm-actions{ width:100%; }
.alt-app .a-dyk-confirm-actions .a-btn{ width:100%; }
