/* IA guide pages (ia/*.html and the walkthrough parts of IA.html).
   Builds on ../shared.css: same colours, sections, cards and tables. Generated pages come from ia/_src/build_ia.py. */

/* ---------- source labels: where a piece of guidance comes from */
.src { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; padding: 1px 7px; border-radius: 10px;
  margin-right: 6px; vertical-align: 1px; white-space: nowrap; border: 1px solid transparent; }
.src-ib { background: rgba(26, 115, 232, .14); color: #1a5fc4; border-color: rgba(26, 115, 232, .35); }
.src-guide { background: rgba(214, 150, 0, .16); color: #8a5a00; border-color: rgba(214, 150, 0, .45); }
.src-tip { background: rgba(46, 160, 90, .14); color: #1d7a45; border-color: rgba(46, 160, 90, .4); }
.src-school { background: rgba(142, 68, 173, .13); color: #7a3b99; border-color: rgba(142, 68, 173, .38); }
body.dark-mode .src-ib { color: #8cc4ff; }
body.dark-mode .src-guide { color: #ffd36b; }
body.dark-mode .src-tip { color: #7fdca4; }
body.dark-mode .src-school { color: #d9a6f0; }
.src-key { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14.5px; margin: 6px 0 4px; }

/* ---------- page header, breadcrumbs, chips */
.ia-crumbs { font-size: 14px; margin: -10px 0 18px; opacity: .85; }
.ia-crumbs a { color: var(--highlight-color); text-decoration: none; font-weight: 600; }
.ia-crumbs a:hover { text-decoration: underline; }
.ia-lead { font-size: 18px; line-height: 1.6; margin: 0 0 14px; }
.ia-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.ia-chip { background: var(--bg-color); border-radius: 20px; padding: 5px 13px; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 1px 3px var(--shadow-color); }
.ia-chip i { color: var(--highlight-color); margin-right: 6px; }
.content p { margin: 0 0 12px; font-size: 16.5px; }
.content .section h3.subsection-title { scroll-margin-top: 20px; }
.section[id], .ia-part[id], h3[id], h4[id] { scroll-margin-top: 16px; }

/* links in body text */
.content a:not(.nav-item):not(.home-btn):not(.ia-btn):not(.ia-card-link):not(.ia-pager a) { color: var(--highlight-color); font-weight: 600; }

/* ---------- jump list of subsections */
.ia-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.ia-jump a { text-decoration: none; background: var(--table-header-bg); color: var(--text-color) !important; font-weight: 600;
  font-size: 14.5px; padding: 6px 12px; border-radius: 8px; }
.ia-jump a:hover, .ia-jump a:focus-visible { color: var(--highlight-color) !important; outline: 2px solid var(--highlight-color); }

/* ---------- the seven parts of a subsection */
.ia-part { margin: 18px 0; }
.ia-part > h4 { font-size: 18px; color: var(--highlight-color); margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.ia-part > h4 .ia-num { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: var(--highlight-color);
  color: #fff; font-size: 13px; align-items: center; justify-content: center; flex: 0 0 24px; }
.ia-steps { margin: 0 0 6px 4px; padding-left: 22px; }
.ia-steps li { margin: 6px 0; font-size: 16px; }
.ia-plain { list-style: none; margin: 0; padding: 0; }
.ia-plain li { position: relative; padding-left: 20px; margin: 6px 0; font-size: 16px; }
.ia-plain li:before { content: "•"; color: var(--highlight-color); font-weight: 700; position: absolute; left: 4px; }

/* explanation box */
.ia-explain { background: var(--bg-color); border-radius: 10px; padding: 14px 18px; box-shadow: 0 1px 4px var(--shadow-color); }

/* worked example: a "student document" look */
.ia-example { border: 2px dashed rgba(26, 115, 232, .45); border-radius: 12px; padding: 0; margin: 10px 0;
  background: var(--table-bg); overflow: hidden; }
body.dark-mode .ia-example { border-color: rgba(66, 165, 245, .45); }
.ia-ex-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px;
  padding: 9px 16px; background: var(--table-header-bg); font-size: 14px; }
.ia-ex-head b { color: var(--highlight-color); }
.ia-ex-body { padding: 16px 20px 8px; }
.ia-ex-body p { font-family: Georgia, 'Times New Roman', serif; font-size: 16.5px; line-height: 1.65; }
.ia-ex-body h5 { font-size: 16px; margin: 6px 0 8px; }
.ia-ex-foot { padding: 0 20px 12px; font-size: 13.5px; opacity: .8; font-style: italic; }
.wc-pill { display: inline-block; padding: 3px 10px; border-radius: 12px; font-weight: 700; font-size: 13.5px;
  background: rgba(46, 160, 90, .16); color: #1d7a45; border: 1px solid rgba(46, 160, 90, .4); }
body.dark-mode .wc-pill { color: #7fdca4; }
.wc-pill.over { background: rgba(231, 76, 60, .15); color: #c0392b; border-color: rgba(231, 76, 60, .4); }
.ia-sc-list { margin: 4px 0 12px; padding-left: 34px; }
.ia-sc-list li { margin: 5px 0; font-family: Georgia, 'Times New Roman', serif; font-size: 16px; }
.ia-sc-list li::marker { font-weight: 700; content: "SC" counter(list-item) "  "; color: var(--highlight-color); font-family: 'Source Sans Pro', sans-serif; }

/* exemplar lessons: amber, like the IA Documentation Guide */
.ia-lessons { border-left: 5px solid #d69600; background: rgba(214, 150, 0, .09); border-radius: 0 10px 10px 0; padding: 12px 16px; }
.ia-lessons p.ia-lessons-src { font-size: 13.5px; margin: 0 0 6px; opacity: .85; font-style: italic; }
.ia-lessons ul { list-style: none; margin: 0; padding: 0; }
.ia-lessons li { position: relative; padding-left: 24px; margin: 7px 0; font-size: 16px; }
.ia-lessons li:before { content: "\f19d"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: 1px;
  color: #d69600; font-size: 13px; }
.ia-lessons .implication { display: block; font-size: 15px; opacity: .9; margin-top: 2px; }

/* checklists */
.ia-check { list-style: none; margin: 0; padding: 0; }
.ia-check li { margin: 6px 0; }
.ia-check label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 16px; padding: 6px 10px;
  border-radius: 8px; background: var(--bg-color); }
.ia-check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--highlight-color); flex: 0 0 18px; }
.ia-check input:checked + span { opacity: .6; text-decoration: line-through; }
.ia-check-note { font-size: 13px; opacity: .75; margin-top: 6px; }

/* evidence callout */
.ia-evidence { background: var(--bg-color); border-radius: 10px; padding: 12px 16px; box-shadow: 0 1px 4px var(--shadow-color); }

/* warnings / notes for discrepancies */
.ia-note { border-left: 5px solid #8e44ad; background: rgba(142, 68, 173, .08); border-radius: 0 10px 10px 0;
  padding: 12px 16px; margin: 12px 0; font-size: 15.5px; }
.ia-note strong:first-child { color: #8e44ad; }
body.dark-mode .ia-note strong:first-child { color: #d9a6f0; }
.ia-warn { border-left: 5px solid #e67e22; background: rgba(230, 126, 34, .1); border-radius: 0 10px 10px 0;
  padding: 12px 16px; margin: 12px 0; font-size: 15.5px; }

/* figures: diagrams keep a readable size on phones and scroll sideways inside their box */
.ia-figure { margin: 14px 0 10px; color: var(--text-color); }
.ia-fig-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--section-bg); border-radius: 8px;
  padding: 10px; box-shadow: inset 0 0 0 1px var(--table-border); }
.ia-fig-scroll svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.ia-figure figcaption { font-size: 14.5px; opacity: .85; margin-top: 6px; }
.ia-scroll-hint { display: none; font-size: 13px; opacity: .7; margin-top: 4px; }
@media (max-width: 760px) {
  .ia-fig-scroll svg { max-width: none !important; width: var(--fig-min, 680px); }
  .ia-scroll-hint { display: block; }
}

/* tables that may be wide */
.ia-table-wrap { overflow-x: auto; margin: 10px 0; -webkit-overflow-scrolling: touch; }
.ia-table-wrap .comparison-table { margin-top: 0; min-width: 560px; }
.comparison-table.ia-tight th, .comparison-table.ia-tight td { padding: 8px 10px; font-size: 14.5px; vertical-align: top; }
.comparison-table td code, .comparison-table td pre { font-size: 13px; }
.comparison-table tfoot td { font-weight: 700; background: var(--table-header-bg); }
.ia-met { font-weight: 700; color: #1d7a45; } body.dark-mode .ia-met { color: #7fdca4; }
.ia-part-met { font-weight: 700; color: #b26a00; } body.dark-mode .ia-part-met { color: #ffc36b; }
.ia-not-met { font-weight: 700; color: #c0392b; } body.dark-mode .ia-not-met { color: #ff8a80; }

/* code shown as a "screenshot" from an editor, with line numbers and numbered annotations */
.ia-code { background: var(--code-bg); border-radius: 8px; margin: 12px 0; overflow: hidden; box-shadow: 0 1px 4px var(--shadow-color); }
.ia-code-bar { display: flex; justify-content: space-between; gap: 10px; padding: 6px 12px; font-size: 13px;
  background: rgba(0, 0, 0, .06); font-family: 'Source Sans Pro', sans-serif; }
body.dark-mode .ia-code-bar { background: rgba(255, 255, 255, .06); }
.ia-code pre { margin: 0; padding: 10px 0; overflow-x: auto; font-family: Menlo, Consolas, 'Courier New', monospace; font-size: 13.5px; line-height: 1.55; }
.ia-code .ln { display: inline-block; width: 3.2em; text-align: right; padding-right: 12px; opacity: .5; user-select: none; }
.ia-code .hl-line { background: rgba(26, 115, 232, .13); display: inline-block; min-width: 100%; }
.ia-code .cm { color: #2e8b57; font-style: italic; }
body.dark-mode .ia-code .cm { color: #7fdca4; }
.ia-code .ann { display: inline-flex; width: 19px; height: 19px; border-radius: 50%; background: var(--highlight-color); color: #fff;
  font: 700 11px/19px 'Source Sans Pro', sans-serif; justify-content: center; margin-left: 10px; vertical-align: 1px; }
.ia-code-notes { list-style: none; padding: 8px 14px 12px; margin: 0; font-size: 14.5px; }
.ia-code-notes li { margin: 4px 0; padding-left: 28px; position: relative; }
.ia-code-notes li b.n { position: absolute; left: 0; top: 1px; width: 19px; height: 19px; border-radius: 50%; background: var(--highlight-color);
  color: #fff; font-size: 11px; text-align: center; line-height: 19px; }
pre.ia-pseudo, pre.ia-pre { background: var(--code-bg); border-left: 4px solid var(--highlight-color); border-radius: 0 8px 8px 0;
  padding: 12px 16px; overflow-x: auto; font-family: Menlo, Consolas, 'Courier New', monospace; font-size: 13.5px; line-height: 1.55; margin: 12px 0; }

/* cards linking to pages */
.ia-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 10px 0; }
.ia-card-link { display: block; text-decoration: none; color: var(--text-color); background: var(--bg-color); border-radius: 10px;
  padding: 14px 16px; box-shadow: 0 2px 5px var(--shadow-color); transition: transform .2s ease; border: 2px solid transparent; }
.ia-card-link:hover, .ia-card-link:focus-visible { transform: translateY(-3px); border-color: var(--highlight-color); outline: none; }
.ia-card-link b { display: block; color: var(--highlight-color); font-size: 17px; margin-bottom: 4px; }
.ia-card-link span { font-size: 14.5px; opacity: .9; }
.ia-card-link .ia-card-meta { display: block; margin-top: 6px; font-size: 13px; opacity: .75; }

/* criterion overview cards on IA.html */
.ia-crit { background: var(--bg-color); border-radius: 12px; padding: 18px 20px; margin: 14px 0; box-shadow: 0 2px 6px var(--shadow-color);
  border-left: 6px solid var(--highlight-color); }
.ia-crit h3 { margin: 0 0 6px; color: var(--highlight-color); font-size: 21px; }
.ia-crit h3 a { color: inherit !important; text-decoration: none; }
.ia-crit h3 a:hover { text-decoration: underline; }
.ia-crit p { margin: 6px 0; }
.ia-crit ol { margin: 6px 0 4px 22px; }
.ia-crit ol li { margin: 3px 0; }
.ia-btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; color: #fff !important;
  background: var(--highlight-color); padding: 8px 14px; border-radius: 8px; margin-top: 8px; font-size: 15px; }
.ia-btn:hover, .ia-btn:focus-visible { filter: brightness(1.1); outline: 2px solid var(--text-color); }

/* previous / next */
.ia-pager { display: flex; justify-content: space-between; gap: 14px; margin: 10px 0 40px; flex-wrap: wrap; }
.ia-pager a { flex: 1 1 260px; text-decoration: none; background: var(--section-bg); border-radius: 12px; padding: 14px 18px;
  box-shadow: 0 2px 8px var(--shadow-color); color: var(--text-color); border: 2px solid transparent; }
.ia-pager a:hover, .ia-pager a:focus-visible { border-color: var(--highlight-color); outline: none; }
.ia-pager small { display: block; opacity: .75; font-size: 13px; }
.ia-pager b { color: var(--highlight-color); font-size: 17px; }
.ia-pager .next { text-align: right; }
.ia-sub-pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; font-size: 14.5px; flex-wrap: wrap; }
.ia-sub-pager a { text-decoration: none; font-weight: 600; }

/* nav extras: links styled as the site's nav items */
a.nav-item { display: block; text-decoration: none; }
.nav-item.active { background: var(--nav-item-hover-bg); box-shadow: inset 4px 0 0 #fff; }
.nav-item.nav-sub { padding: 8px 14px 8px 28px; font-weight: 600; font-size: 13.5px; }
.nav-group { color: var(--nav-item-color); opacity: .75; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin: 8px 4px 0; }
.toggle-mode:focus-visible, .nav-item:focus-visible, .floating-nav-toggle:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
button.floating-nav-toggle { border: none; font: inherit; }

/* budget table */
.ia-budget td:nth-child(n+2), .ia-budget th:nth-child(n+2) { text-align: right; white-space: nowrap; }
.ia-budget .ia-sub-row td:first-child { padding-left: 32px; font-size: 14.5px; }
.ia-budget .ia-crit-row td { font-weight: 700; background: var(--table-header-bg); }

/* diagram pages: "often confused with" */
.ia-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .ia-vs { grid-template-columns: 1fr; } }

/* select guide (Criterion C) */
.ia-q { border-left: 6px solid var(--highlight-color); padding-left: 16px; margin: 26px 0 12px; }
.ia-q h3 { font-size: 22px; color: var(--highlight-color); margin: 0 0 6px; }
.ia-q h3 .qn { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; background: var(--highlight-color); color: #fff;
  justify-content: center; align-items: center; margin-right: 10px; font-size: 18px; vertical-align: 2px; }

/* phones: the same off-canvas menu as the revision site */
@media (max-width: 860px) {
  .container { display: block; }
  .nav-menu { position: fixed; top: 0; left: 0; bottom: 0; width: 82vw; min-width: 0; max-width: 320px; max-height: none; height: 100vh; padding-top: 64px; }
  .floating-nav-toggle { left: 12px; top: 12px; }
  .content, body.nav-hidden .content { padding: 64px 16px 32px; }
  .section { padding: 18px 16px; }
  .section-title { font-size: 21px; }
  .section-title i { display: none; }
  .subsection-title { font-size: 19px; }
  .app-grid { grid-template-columns: 1fr; }
  .ia-ex-body { padding: 12px 12px 6px; }
  .ia-ex-body p { font-size: 16px; }
}
@media print {
  .nav-menu, .floating-nav-toggle, .ia-pager, .bit-spot { display: none !important; }
  .content { padding: 0; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
a.sr-only:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 999; background: var(--highlight-color); color: #fff; padding: 8px 12px; border-radius: 6px; }
h1.section-title { margin-top: 0; }

/* IA.html: the four parts of the guide */
.ia-part-banner { display: flex; gap: 16px; align-items: center; margin: 50px 0 22px; padding: 18px 22px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(26,115,232,.18), rgba(91,79,240,.14)); border: 1px solid rgba(26,115,232,.35); scroll-margin-top: 16px; }
.ia-part-banner h2 { margin: 0 0 4px; font-size: 26px; color: var(--highlight-color); }
.ia-part-banner p { margin: 0; font-size: 16px; }
.ia-part-num { flex: 0 0 52px; height: 52px; border-radius: 50%; background: var(--highlight-color); color: #fff; font-size: 24px;
  font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ia-goals .ia-card-link b { font-size: 18px; }
.ia-goals { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
@media (max-width: 860px) { .ia-part-banner { margin-top: 34px; padding: 14px 16px; } .ia-part-banner h2 { font-size: 21px; }
  .ia-part-num { flex-basis: 40px; height: 40px; font-size: 19px; } }

/* ---------- IA.html landing page: Bit asks what the student wants to do */
.ial-body { --buddy-ink: #1d2333; --buddy-bubble: #ffffff; --buddy-bubble-ink: #1d2333; min-height: 100vh; }
.ial-body.dark-mode { --buddy-ink: #e3e7f2; --buddy-bubble: #2a2f3a; --buddy-bubble-ink: #eef1f7; }
.ial-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  max-width: 1180px; margin: 0 auto; padding: 18px 20px 0; position: relative; z-index: 2; }
.ial-top .home-btn { display: inline-flex; padding: 10px 16px; }
.ial-top-right { display: flex; gap: 8px; flex-wrap: wrap; }
.ial-pill { font: 600 14px 'Source Sans Pro', sans-serif; padding: 9px 14px; border-radius: 20px; cursor: pointer;
  background: var(--section-bg); color: var(--text-color); border: 1px solid var(--table-border); box-shadow: 0 2px 6px var(--shadow-color); }
.ial-pill:hover, .ial-pill:focus-visible { border-color: var(--highlight-color); outline: none; }
.ial { max-width: 1180px; margin: 0 auto; padding: 24px 20px 48px; position: relative; z-index: 1; }
.ial-intro { text-align: center; max-width: 760px; margin: 10px auto 18px; animation: ial-fade .6s ease-out both; }
.ial-kicker { text-transform: uppercase; letter-spacing: 2px; font-size: 13px; font-weight: 700; color: var(--highlight-color); margin: 0; }
.ial-intro h1 { font-size: 46px; line-height: 1.1; margin: 6px 0 10px;
  background: linear-gradient(135deg, #42a5f5, #7c4dff 60%, #ff7aa2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ial-intro p { font-size: 18px; }
.ial-stage { display: grid; grid-template-columns: 470px 1fr; gap: 20px; align-items: center; }
.ial-bit { min-height: 250px; display: flex; justify-content: center; align-items: center; animation: ial-arrive .9s cubic-bezier(.2,1.4,.4,1) both; }
.ial-bit svg { max-width: 100%; }
.ial-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ial-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px 20px 16px 22px; border-radius: 16px;
  text-decoration: none; color: var(--text-color); background: var(--section-bg); border: 2px solid var(--table-border);
  box-shadow: 0 6px 18px var(--shadow-color); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  animation: ial-rise .55s ease-out both; animation-delay: calc(.35s + var(--i) * .12s); overflow: hidden; }
.ial-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px;
  background: linear-gradient(180deg, #42a5f5, #7c4dff); }
.ial-card:hover, .ial-card:focus-visible { transform: translateY(-4px); border-color: var(--highlight-color); outline: none;
  box-shadow: 0 10px 26px rgba(26,115,232,.28); }
.ial-num { position: absolute; top: 12px; right: 14px; font-size: 13px; font-weight: 700; opacity: .5; }
.ial-icon { font-size: 26px; color: var(--highlight-color); }
.ial-card b { font-size: 20px; color: var(--highlight-color); }
.ial-card span { font-size: 15.5px; opacity: .9; }
.ial-card em { font-style: normal; font-weight: 700; font-size: 14px; color: var(--highlight-color); margin-top: auto; padding-top: 6px; }
.ial-quick { text-align: center; margin-top: 26px; font-size: 15px; animation: ial-fade .6s ease-out .9s both; }
.ial-quick a { display: inline-block; min-width: 30px; margin: 0 3px; padding: 3px 8px; border-radius: 8px; font-weight: 700;
  text-decoration: none; color: var(--highlight-color); background: var(--section-bg); border: 1px solid var(--table-border); }
.ial-quick a:hover, .ial-quick a:focus-visible { border-color: var(--highlight-color); outline: none; }
.ial-quick span { opacity: .5; margin: 0 4px; }
.ial-no-bit .ial-stage { grid-template-columns: 1fr; }
.ial-no-bit .ial-bit { display: none; }
@keyframes ial-arrive { from { opacity: 0; transform: translateY(60px) scale(.5); } to { opacity: 1; transform: none; } }
@keyframes ial-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes ial-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ial-intro, .ial-bit, .ial-card, .ial-quick { animation: none; } .ial-card { transition: none; } }
@media (max-width: 860px) {
  .ial-stage { grid-template-columns: 1fr; gap: 6px; }
  .ial-bit { min-height: 170px; }
  .ial-choices { grid-template-columns: 1fr; }
  .ial-intro h1 { font-size: 34px; }
  .ial-intro p { font-size: 16.5px; }
  .ial { padding: 10px 16px 36px; }
  .ial-top { padding: 12px 16px 0; }
}

/* ---------- collapsible subsections on the criterion pages (A1, A2 …): closed until opened */
.ia-collapse-title { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.ia-collapse-btn { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; cursor: pointer; color: var(--highlight-color); font: inherit; padding: 4px 0; }
.ia-collapse-btn:focus-visible { outline: 3px solid var(--highlight-color); outline-offset: 6px; border-radius: 6px; }
.ia-collapse-hint { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700;
  padding: 8px 14px; border-radius: 22px; background: var(--highlight-color); color: #fff; box-shadow: 0 2px 8px var(--shadow-color); }
.ia-collapse-btn:hover .ia-collapse-hint { filter: brightness(1.12); }
.ia-collapse-hint i { transition: transform .25s ease; }
.ia-collapse.open .ia-collapse-hint i { transform: rotate(180deg); }
.ia-hint-close, .ia-collapse.open .ia-hint-open { display: none; }
.ia-collapse.open .ia-hint-close { display: inline; }
.ia-collapse.open .ia-collapse-title { margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid var(--table-border); }
.ia-js .ia-collapse:not(.open) .ia-collapse-body { display: none; }
.ia-collapse:not(.open) { padding-top: 22px; padding-bottom: 22px; margin-bottom: 18px; }
.ia-collapse-tools { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 0; }
.ia-collapse-tools button { font: 600 14px 'Source Sans Pro', sans-serif; padding: 7px 14px; border-radius: 18px; cursor: pointer;
  background: var(--bg-color); color: var(--text-color); border: 1px solid var(--table-border); }
.ia-collapse-tools button:hover, .ia-collapse-tools button:focus-visible { border-color: var(--highlight-color); outline: none; }
@media (max-width: 860px) { .ia-hint-open, .ia-hint-close { display: none !important; } .ia-collapse-hint { padding: 8px 11px; } }
@media print { .ia-collapse-body { display: block !important; } .ia-collapse-hint { display: none; } }

/* ---------------------------------------------------------------- inline Bit with an HTML speech bubble */
.ia-bit-inline { display: flex; align-items: flex-start; gap: 18px; margin: 4px 0 22px; }
.ia-bit-figure { flex: 0 0 auto; width: 130px; }
.ia-bit-figure svg { display: block; }
.ia-bit-say { position: relative; flex: 1 1 auto; max-width: 640px; margin-top: 14px; padding: 16px 20px;
  border-radius: 16px; background: var(--buddy-bubble, rgba(102,126,234,.12)); color: var(--buddy-bubble-ink, inherit);
  border: 2px solid var(--highlight-color, #667eea); }
.ia-bit-say::before { content: ""; position: absolute; left: -13px; top: 30px; border: 12px solid transparent;
  border-left: 0; border-right-color: var(--highlight-color, #667eea); }
.ia-bit-say p { margin: 0 0 8px; }
.ia-bit-say p:last-child { margin-bottom: 0; }
.ia-bit-first { font-size: 1.15em; font-weight: 700; }
.ia-bit-first a { color: var(--buddy-link, var(--highlight-color, #667eea)); }
.ia-bit-first i { margin-right: 6px; }
.ia-bit-none .ia-bit-figure { display: none; }
.ia-bit-none .ia-bit-say { margin-top: 0; }
.ia-bit-none .ia-bit-say::before { display: none; }
@media (max-width: 600px) {
  .ia-bit-inline { flex-direction: column; align-items: center; gap: 6px; }
  .ia-bit-figure { width: 100px; }
  .ia-bit-figure svg { width: 100px; }
  .ia-bit-say { margin-top: 8px; }
  .ia-bit-say::before { left: 50%; top: -13px; margin-left: -12px; border: 12px solid transparent; border-top: 0;
    border-bottom-color: var(--highlight-color, #667eea); }
}

/* ---------------------------------------------------------------- Criterion D: code + GUI/output in one figure */
.ia-combo { margin: 12px 0 16px; border: 1px solid var(--border-color, rgba(128,128,128,.3)); border-radius: 10px; padding: 10px 12px 4px; }
.ia-combo figcaption { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.ia-combo figcaption i { margin-right: 6px; opacity: .8; }
.ia-combo-grid { display: flex; flex-direction: column; gap: 10px; }
.ia-combo-code .ia-code { margin: 0; }
.ia-combo-side { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.ia-combo-side .ia-shot { flex: 1 1 260px; }
.ia-shot { border-radius: 10px; overflow: hidden; border: 1px solid rgba(128,128,128,.35); font-family: 'Source Sans Pro', Arial, sans-serif; }
.ia-shot-bar { font-size: 12.5px; padding: 5px 10px; background: rgba(128,128,128,.18); }
.ia-shot-bar i { margin-right: 5px; }
.ia-shot-phone { max-width: 340px; background: #f7f8fc; color: #1d2433; }
.ia-shot-phone .ia-shot-bar { background: #4f5bd5; color: #fff; }
.ia-shot-phone .ia-shot-body { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.ia-slot { display: flex; gap: 10px; padding: 6px 8px; border-radius: 6px; font-size: 13.5px; background: #fff; border: 1px solid #dde1ec; }
.ia-slot b { min-width: 3em; }
.ia-slot-booked, .ia-slot-taken { background: #eceff5; color: #5b6476; }
.ia-slot-taken { border-color: #d9534f; }
.ia-slot-free { border-color: #3aa76d; }
.ia-toast { padding: 7px 9px; border-radius: 6px; font-size: 13.5px; font-weight: 600; }
.ia-toast-bad { background: #fdecea; color: #a12622; border: 1px solid #f2b8b5; }
.ia-shot-term { background: #12151c; color: #d7dde8; }
.ia-shot-term .ia-shot-bar { color: #aab3c5; }
.ia-shot-term pre { margin: 0; padding: 8px 10px; font-family: Menlo, Consolas, 'Courier New', monospace; font-size: 12px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.ia-shot .ann { display: inline-flex; width: 19px; height: 19px; border-radius: 50%; background: var(--highlight-color, #667eea); color: #fff;
  font-size: 12px; font-weight: 700; align-items: center; justify-content: center; margin-left: 6px; vertical-align: middle; font-family: 'Source Sans Pro', Arial, sans-serif; }
@media (max-width: 600px) { .ia-shot-phone { max-width: none; } }

/* ---------------------------------------------------------------- Criterion D: real examples */
.ia-real { margin: 8px 0 26px; }
.ia-real h3 .ia-chip { margin-left: 8px; font-size: 13px; vertical-align: middle; }
.ia-real-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 10px 0 16px; }
.ia-real-pages a { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; font-size: 14px; }
.ia-real-pages img { width: 100%; height: auto; border-radius: 6px; border: 1px solid rgba(128,128,128,.35); background: #fff;
  box-shadow: 0 1px 4px var(--shadow-color, rgba(0,0,0,.2)); transition: transform .15s; }
.ia-real-pages a:hover img, .ia-real-pages a:focus img { transform: translateY(-2px); }
.ia-ex-body h4.ia-doc-h { font-size: 18px; margin: 26px 0 6px; padding-top: 14px; border-top: 1px solid rgba(128,128,128,.3); scroll-margin-top: 16px; }
.ia-ex-body h4.ia-doc-h:first-child { margin-top: 4px; padding-top: 0; border-top: 0; }

/* Criterion D worked example: website-only labels beside each part (drawn by CSS, so not part of the document) */
.ia-ex-body .ia-pl { position: relative; }
.ia-ex-body .ia-pl::before { display: inline-block; margin: 0 8px 0 0; padding: 1px 8px; border-radius: 999px; font: 600 11.5px/1.6 'Source Sans Pro', Arial, sans-serif;
  letter-spacing: .02em; text-transform: uppercase; vertical-align: 2px; background: rgba(102,126,234,.16); color: var(--highlight-color, #667eea); }
.ia-ex-body .ia-pl-code::before { content: "Code"; margin-bottom: 4px; }
.ia-ex-body .ia-pl-exp::before { content: "Explanation"; }
.ia-ex-body .ia-pl-jus::before { content: "Justification"; }
.ia-ex-body .ia-pl-test::before { content: "Testing"; }
.ia-sc-codes { list-style: none; padding-left: 0 !important; }
.ia-sc-codes li { margin: 4px 0; }
.ia-sc-codes b { display: inline-block; min-width: 3.2em; }
.ia-sc-codes, .ia-sc-codes li { list-style: none; counter-increment: none; }
.ia-sc-codes li::before, .ia-sc-codes li::marker { content: none; display: none; }
.ia-sc-codes li { padding-left: 0; }
