/* AI Briefing for the Board: builds on /styles.css tokens and /tools/shared/learn.css */
.ab, .ab-deck { --amber: #8a5300; --amber-bg: #fff5e2; --green: #157f3d; --green-bg: #ecf7f0; --field: #c9ccd2; }
.ab svg, .ab-deck svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Hero */
.ab-hero { padding-bottom: clamp(88px, 10vw, 140px); }
.ab-back { margin-bottom: 28px; }
.ab-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.ab-meta .chip { background: rgba(255, 255, 255, .85); }

/* Sections */
.ab { background: var(--bg-2); padding: clamp(56px, 7vw, 100px) 0 clamp(64px, 8vw, 110px); scroll-margin-top: 64px; }
.ab-deck { padding: clamp(64px, 8vw, 110px) 0; scroll-margin-top: 64px; }
.ab-head h2 { margin-top: 14px; font-size: clamp(30px, 3.4vw, 46px); max-width: 20ch; }
.ab-head > p:not(.mono) { margin-top: 16px; max-width: 38em; color: var(--text); }
.ab-card { background: #fff; border: 1px solid var(--line); padding: clamp(20px, 2.4vw, 32px); }
.ab-print-head { display: none; }

.ab-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.ab-form, .ab-summary { min-width: 0; }
.ab-summary { position: sticky; top: 88px; }

.ab-sample { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 10px 14px; background: #f3f5ff; border-left: 2px solid var(--blue); font-size: 15px; color: var(--text); }
.ab-sample .mono { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.ab-sample[hidden] { display: none; }
.ab-link { min-height: 44px; margin-left: auto; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); text-decoration: underline; text-underline-offset: 4px; }
.ab-link:hover { color: var(--blue); }

/* Steps */
.ab-step { margin-top: 20px; padding: clamp(20px, 2.4vw, 30px); background: #fff; border: 1px solid var(--line); min-width: 0; display: grid; gap: 18px; scroll-margin-top: 90px; }
.ab-step legend { float: left; width: 100%; display: flex; flex-direction: column; gap: 6px; padding: 0; }
.ab-step legend + * { clear: both; }
.ab-step__n { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.ab-step__t { font-size: clamp(22px, 2vw, 27px); font-weight: 500; letter-spacing: -.015em; color: var(--ink); }
.ab-hint { font-size: 15.5px; color: var(--text); max-width: 44em; }
.ab-hint a, .ab-means__body a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.ab-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ab-grid3 { display: grid; grid-template-columns: 1fr 1fr .8fr; gap: 14px; }
.ab-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ab-field > span:first-child { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.ab-field--narrow { max-width: 320px; }
.ab-field input[type="text"], .ab-field input[type="number"], .ab-field select, .ab-field textarea { width: 100%; min-height: 44px; padding: 0 12px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid var(--field); border-radius: 0; transition: border-color .2s ease, box-shadow .2s ease; }
.ab-field textarea { padding: 10px 12px; resize: vertical; line-height: 1.45; }
.ab-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23646a73' stroke-width='1.4'/%3E%3C/svg%3E"); background-position: calc(100% - 14px) 50%; background-size: 10px 6px; background-repeat: no-repeat; padding-right: 34px; }
.ab-field input:focus, .ab-field select:focus, .ab-field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }

.ab-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ab-chip { position: relative; display: block; cursor: pointer; }
.ab-chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.ab-chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px; font-size: 15px; line-height: 1.25; color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--field); transition: background-color .2s ease, color .2s ease, box-shadow .2s ease; }
.ab-chip span svg { width: 0; opacity: 0; transition: width .2s var(--ease), opacity .2s ease; }
.ab-chip:hover span { box-shadow: inset 0 0 0 1px var(--blue); }
.ab-chip input:checked + span { background: var(--blue); color: #fff; box-shadow: none; }
.ab-chip input:checked + span svg { width: 14px; opacity: 1; }
.ab-chip input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.ab-init { padding: 16px; background: var(--bg-2); border-left: 2px solid var(--navy); display: grid; gap: 12px; }
.ab-init + .ab-init { margin-top: 12px; }
.ab-init__head { display: flex; align-items: center; justify-content: space-between; min-height: 28px; }
.ab-init__head .mono { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); }
.ab-x { display: grid; place-items: center; width: 44px; height: 44px; margin: -8px -8px -8px 0; color: var(--soft); }
.ab-x:hover { color: #b42318; }
.ab-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 18px; font-size: 15px; font-weight: 500; color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--field); transition: box-shadow .25s ease, color .25s ease, background-color .25s ease, transform .2s var(--ease); justify-self: start; }
.ab-btn:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--blue); color: var(--blue); }
.ab-btn:active:not(:disabled) { transform: scale(.98); }
.ab-btn:disabled { opacity: .4; cursor: default; }
.ab-btn[hidden] { display: none; }
.ab-btn--blue { background: var(--blue); color: #fff; box-shadow: none; }
.ab-btn--blue:hover:not(:disabled) { background: var(--blue-deep); color: #fff; box-shadow: none; }
.ab-btn:focus-visible, .ab-x:focus-visible, .ab-link:focus-visible, .ab-view__b:focus-visible, .ab-dot:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.ab-cap__row { display: flex; align-items: center; gap: 14px; }
.ab-cap input[type="range"] { flex: 1; min-width: 0; height: 44px; accent-color: var(--blue); }
.ab-cap output { min-width: 52px; font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.ab-capnote { display: flex; gap: 8px; align-items: flex-start; margin-top: -8px; font-size: 14.5px; line-height: 1.4; }
.ab-capnote svg { margin-top: 2px; }
.ab-capnote--ok { color: var(--green); }
.ab-capnote--warn { color: var(--amber); }

.ab-rd { display: grid; }
.ab-rd__row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 110px; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.ab-rd__row:first-child { border-top: 0; }
.ab-rd__name { font-weight: 500; }
.ab-rd__lvl { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--blue); }
.ab-seg { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--field); }
.ab-seg__o { position: relative; display: block; cursor: pointer; }
.ab-seg__o + .ab-seg__o { border-left: 1px solid var(--field); }
.ab-seg__o input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.ab-seg__o span { display: grid; place-items: center; min-height: 44px; font-variant-numeric: tabular-nums; transition: background-color .2s ease, color .2s ease; }
.ab-seg__o:hover span { color: var(--blue); }
.ab-seg__o input:checked + span { background: var(--navy); color: #fff; }
.ab-seg__o input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: -3px; }

/* Summary */
.ab-score > .mono { color: var(--navy); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.ab-score__big { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
#k-strong { font-size: clamp(56px, 6vw, 80px); font-weight: 500; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--blue); }
.ab-score__of { font-size: 28px; margin-left: -6px; color: var(--soft); }
.ab-score__sub { margin-top: 6px; font-size: 15px; color: var(--text); }
.ab-band, .ab-flag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; }
.ab-band--ok, .ab-flag--ok { color: var(--green); background: var(--green-bg); }
.ab-band--info { color: var(--blue); background: #eef1ff; }
.ab-band--warn, .ab-flag--warn { color: var(--amber); background: var(--amber-bg); }
.ab-rail { margin-top: 20px; }
.ab-rail .lx-rail__stops li { font-size: 11px; }
.ab-fixes { margin-top: 22px; }
.ab-fixes > .mono { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.ab-fixes ul { margin-top: 6px; list-style: none; }
.ab-fixes a { display: flex; gap: 10px; align-items: center; min-height: 44px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.35; color: var(--ink); }
.ab-fixes a svg { color: var(--amber); }
.ab-fixes a:hover span { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.ab-allgood { display: flex; gap: 10px; padding: 12px 14px; color: var(--green); background: var(--green-bg); font-size: 15px; }
.ab-allgood svg { margin-top: 3px; }
.ab-actions { margin-top: 20px; }
.ab-act--blue { background: var(--blue); color: #fff; border-color: var(--blue); }
.ab-act--blue:hover { background: var(--blue-deep); color: #fff; }

/* Deck */
.ab-deck__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px 32px; }
.ab-view { display: inline-flex; border: 1px solid var(--field); }
.ab-view__b { min-height: 44px; padding: 0 18px; font-size: 15px; font-weight: 500; color: var(--text); transition: background-color .2s ease, color .2s ease; }
.ab-view__b + .ab-view__b { border-left: 1px solid var(--field); }
.ab-view__b[aria-pressed="true"] { background: var(--navy); color: #fff; }
.ab-gap { background: #fff1c7; color: #5c3b00; padding: 0 .2em; box-shadow: inset 0 -1px 0 #d9a300; }

.ab-means { margin-top: clamp(28px, 3.4vw, 40px); border-left: 3px solid var(--blue); }
.ab-means__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.ab-means__body { margin-top: 14px; display: grid; gap: 10px; max-width: 62em; }
.ab-means__body p { color: var(--text); }
.ab-means__body b { color: var(--ink); font-weight: 600; }
.ab-means__body .ab-lead { font-size: clamp(19px, 1.6vw, 22px); color: var(--ink); letter-spacing: -.01em; }

.ab-slides { margin-top: 28px; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; counter-reset: none; }
.ab-slides[hidden], .ab-rehearse[hidden] { display: none; }
.ab-card-s { min-width: 0; }
.ab-slide { container-type: inline-size; position: relative; aspect-ratio: 16 / 9; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.ab-slide::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1.2cqw; background: var(--blue); }
.ab-slide__in { position: absolute; inset: 0; padding: 5.5cqw 6cqw 5cqw 7.4cqw; display: flex; flex-direction: column; }
.ab-slide__n { font-size: max(10px, 2.1cqw); letter-spacing: .08em; color: var(--blue); }
.ab-slide__t { margin-top: 1.2cqw; font-size: max(15px, 4.6cqw); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; color: var(--navy); }
.ab-slide ul { margin-top: 3cqw; list-style: none; display: grid; gap: 1.7cqw; }
.ab-slide li { position: relative; padding-left: 3cqw; font-size: max(10.5px, 2.55cqw); line-height: 1.32; color: var(--ink); }
.ab-slide li::before { content: ""; position: absolute; left: 0; top: .55em; width: 1.2cqw; height: 1.2cqw; min-width: 5px; min-height: 5px; background: var(--blue); }
.ab-slide__brand { position: absolute; right: 4cqw; bottom: 3cqw; font-size: max(8px, 1.6cqw); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.ab-card-s.is-new .ab-slide { animation: abFlash 1.2s var(--ease); }
@keyframes abFlash { 0% { box-shadow: 0 0 0 3px var(--blue); } 100% { box-shadow: 0 0 0 0 transparent; } }
.ab-notes { margin-top: 8px; border-top: 1px solid var(--line); }
.ab-notes summary { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: 15px; font-weight: 500; list-style: none; }
.ab-notes summary::-webkit-details-marker { display: none; }
.ab-notes summary::before { content: "+"; width: 14px; color: var(--blue); font-family: var(--mono); }
.ab-notes[open] summary::before { content: "−"; }
.ab-notes summary .mono { margin-left: auto; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--soft); font-weight: 400; }
.ab-notes p { padding: 0 0 12px 24px; font-size: 15px; color: var(--text); }

/* Rehearse */
.ab-rehearse { margin-top: 28px; max-width: 980px; }
.ab-rh__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--navy); }
.ab-rh__time { color: var(--soft); }
.ab-rh__stage:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.ab-rh__nav { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ab-rh__dots { display: flex; flex-wrap: wrap; justify-content: center; }
.ab-dot { display: grid; place-items: center; width: 32px; height: 44px; }
.ab-dot i { width: 8px; height: 8px; background: var(--field); transition: background-color .2s ease, transform .3s var(--ease); }
.ab-dot.is-on i { background: var(--blue); transform: scale(1.4); }
.ab-rh__notes { margin-top: 16px; padding: 16px 18px; background: var(--bg-2); border-left: 2px solid var(--navy); }
.ab-rh__notes .mono { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); }
.ab-rh__notes p + p { margin-top: 6px; color: var(--ink); }

/* Q&A */
.ab-qa { margin-top: clamp(56px, 7vw, 90px); }
.ab-qlist { margin-top: 24px; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.ab-q { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 20px 0; border-top: 1px solid var(--line); }
.ab-q__n { font-size: 12px; color: var(--blue); padding-top: 5px; }
.ab-q h3 { font-size: 19px; font-weight: 500; letter-spacing: -.01em; line-height: 1.3; }
.ab-q .ab-flag { margin-top: 8px; text-transform: none; letter-spacing: 0; font-size: 12.5px; line-height: 1.3; }
.ab-q p { margin-top: 10px; font-size: 15.5px; color: var(--text); }

.ab-extra { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.ab-extra .lx-note { margin: 0; }

@media (max-width: 1020px) {
  .ab-layout { grid-template-columns: 1fr; }
  .ab-summary { position: static; order: -1; }
  .ab-extra { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .ab-slides, .ab-qlist { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ab-grid2, .ab-grid3 { grid-template-columns: 1fr; }
  .ab-rd__row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .ab-rd__row .ab-seg { grid-column: 1 / -1; grid-row: 2; }
  .ab-link { margin-left: 0; }
  .ab-rh__dots { display: none; }
  .ab-rh__nav .ab-btn { flex: 1; }
  .ab-means__head .lx-actions, .ab-actions { width: 100%; }
  .ab-means__head .lx-act, .ab-actions .lx-act { flex: 1 1 calc(50% - 5px); justify-content: center; padding: 0 10px; font-size: 14px; }
  .ab-deck__head .ab-view { width: 100%; }
  .ab-view__b { flex: 1; }
  .ab-slide li { line-height: 1.25; }
  .ab-slide__brand { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ab-chip span, .ab-chip span svg, .ab-dot i, .ab-btn { transition: none; }
  .ab-card-s.is-new .ab-slide { animation: none; }
}

/* Print: one slide per landscape page, then the director Q&A */
@page { size: landscape; margin: 12mm; }
@media print {
  .ab-hero, .ab, .ab-deck__head, .ab-means, .ab-rehearse, .ab-extra, .ab-notes summary, .lx-guide, .cta, .nav, .foot { display: none !important; }
  .ab-deck { padding: 0; }
  .ab-print-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .ab-slides, .ab-slides[hidden] { display: block !important; margin: 0; }
  .ab-card-s { break-after: page; page-break-after: always; break-inside: avoid; }
  .ab-slide { width: 100%; max-width: 235mm; margin: 0 auto; box-shadow: none; border: 1px solid #c9ccd2; animation: none !important; }
  .ab-notes { border: 0; }
  .ab-notes { max-width: 235mm; margin: 0 auto; }
  .ab-notes > p { padding: 10px 0 0; font-size: 11pt; }
  .ab-notes > p::before { content: "Speaker notes: "; font-weight: 600; color: var(--ink); }
  .ab-qa { margin-top: 0; }
  .ab-qlist { grid-template-columns: 1fr 1fr; }
  .ab-q { break-inside: avoid; padding: 10px 0; }
  .ab-gap { background: none; box-shadow: none; text-decoration: underline dotted; }
}
