/* ==========================================================================
   ISI member pages: "the scaffold"
   --------------------------------------------------------------------------
   ISI's own look for the affiliation pages (the other six projects each have
   a different one). The pages hang from a steel ledger with one coupler per
   page; the membership is an inspection tag (green: valid, amber: renewal open,
   red: expired); the stages are scaffold bays that get boarded and braced as
   they are completed; forms climb a standard, one lift at a time.
   Colours and fonts are those of the website (isi-site.css): ink navy, ISI green
   and its glow, steel; Archivo text, Newsreader italics.
   The site has two themes: dark is the default, html[data-isi-theme="light"]
   switches every colour below.
   ========================================================================== */

.af-root.afz {
  --af-surface: #13243f;
  --af-surface-2: #0f1e37;
  --af-line: rgba(201, 209, 218, .16);
  --af-line-strong: rgba(201, 209, 218, .34);
  --af-text: #eef3f9;
  --af-muted: #9fb0c6;
  --af-primary: #00a341;
  --af-primary-ink: #ffffff;
  --af-accent: #3cdc86;
  --af-ok: #3cdc86;        --af-ok-bg: rgba(60, 220, 134, .14);
  --af-warn: #ffc94d;      --af-warn-bg: rgba(255, 201, 77, .14);
  --af-bad: #ff8b8b;       --af-bad-bg: rgba(255, 99, 99, .16);
  --af-info: #8fc2ff;      --af-info-bg: rgba(120, 170, 255, .16);
  --af-mute: #9fb0c6;      --af-mute-bg: rgba(255, 255, 255, .08);
  --af-radius: 10px;
  --af-radius-sm: 6px;
  --af-font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --af-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --af-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --af-shadow: 0 18px 44px -26px rgba(0, 0, 0, .8);
  --afz-page: #0c1b33;
  --afz-steel: linear-gradient(180deg, #e7ecf1 0%, #aab5c1 38%, #7d8a98 62%, #c3ccd5 100%);
  --afz-tube: #c9d1da;
  --afz-ghost: rgba(201, 209, 218, .3);
  --afz-green: #00a341;
  --afz-glow: #3cdc86;
  --afz-amber: #f5b21a;
  --afz-red: #e5383b;
  --afz-holder: #08111f;
  --afz-insert-ink: #0c1b33;
  background: var(--afz-page);
  padding-bottom: 84px;
}
html[data-isi-theme="light"] .af-root.afz {
  --af-surface: #ffffff;
  --af-surface-2: #f3f6f8;
  --af-line: #dde4ec;
  --af-line-strong: #b7c3d0;
  --af-text: #0c1b33;
  --af-muted: #5a6b82;
  --af-primary: #008c3a;
  --af-accent: #007a33;
  --af-ok: #00702f;        --af-ok-bg: #e2f5ea;
  --af-warn: #8f5a00;      --af-warn-bg: #fff2d4;
  --af-bad: #b3261e;       --af-bad-bg: #fdecea;
  --af-info: #1b5cb8;      --af-info-bg: #e8f1fd;
  --af-mute: #5a6b82;      --af-mute-bg: #eef1f5;
  --af-shadow: 0 16px 40px -26px rgba(12, 27, 51, .4);
  --afz-page: #f3f6f8;
  --afz-tube: #7d8a98;
  --afz-ghost: rgba(12, 27, 51, .22);
  --afz-holder: #0c1b33;
}

.afz h2, .afz h3 { font-weight: 800; letter-spacing: -.01em; font-stretch: 108%; }
.afz .af-eyebrow, .afz .af-kv dt, .afz .af-table th, .afz .af-fee__label { font-size: 11.5px; letter-spacing: .14em; font-weight: 700; }
.afz .af-eyebrow { color: var(--af-accent); }
.afz .af-card__title { font-size: 23px; font-weight: 800; }
.afz .af-step__title { font-weight: 800; }
.afz .af-step__no { color: var(--af-accent); font-weight: 700; }
.afz .af-pill { border-radius: 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.afz .af-input { background: var(--af-surface-2); color: var(--af-text); border-radius: 6px; }
.afz .af-input:focus { border-color: var(--afz-glow); box-shadow: 0 0 0 3px rgba(60, 220, 134, .22); }
.afz .af-input--select option { color: #0c1b33; background: #fff; }
.afz .af-tile__body { border-radius: 8px; background: var(--af-surface-2); }
.afz .af-tile input:checked + .af-tile__body { border-color: var(--afz-glow); background: var(--af-ok-bg); box-shadow: inset 0 0 0 1px var(--afz-glow); }
.afz .af-tile input:checked + .af-tile__body i { color: var(--af-accent); }
.afz .af-choice input, .afz .af-check input { accent-color: var(--afz-green); }
.afz .af-terms { color: var(--af-text); }
.afz .af-upload__drop:hover, .afz .af-upload.has-files .af-upload__drop { border-color: var(--afz-glow); color: var(--af-accent); }
.afz .af-progress::before { background: var(--afz-glow); }

/* buttons */
.afz .af-btn { border-radius: 6px; font-weight: 700; font-size: 14.5px; letter-spacing: .01em; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s; }
.afz .af-btn--primary { background: var(--afz-green); box-shadow: 0 10px 26px -14px rgba(60, 220, 134, .9); }
.afz .af-btn--primary:hover { filter: none; background: #00b548; transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(60, 220, 134, .5), 0 12px 30px -12px rgba(60, 220, 134, .9); }
.afz .af-btn--ghost { border-color: var(--af-line-strong); }
.afz .af-btn--ghost:hover { border-color: var(--afz-glow); color: var(--af-accent) !important; }

/* ---------- the ledger: a steel tube with one coupler per page ---------- */
.afz-ledger { position: relative; padding-top: 26px; }
.afz-ledger::before { content: ""; position: absolute; inset-inline: 0; top: 26px; height: 12px; background: var(--afz-steel); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .6); }
.afz-ledger__in { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.afz-clamps { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.afz-clamps::-webkit-scrollbar { display: none; }
.afz-clamp { position: relative; display: inline-flex; align-items: center; gap: 9px; margin-top: -8px; padding: 34px 16px 11px; border-radius: 0 0 8px 8px; background: var(--af-surface); border: 1px solid var(--af-line); border-top: 0; color: var(--af-muted) !important; font-weight: 700; font-size: 14.5px; white-space: nowrap; text-decoration: none !important; }
.afz-clamp::before { content: ""; position: absolute; top: 0; left: 50%; width: 34px; height: 28px; margin-left: -17px; border-radius: 5px; background: linear-gradient(180deg, #5c6978, #36414f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 3px 6px rgba(0, 0, 0, .4); }
.afz-clamp__bolt { position: absolute; top: 9px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #aab5c1; box-shadow: inset 0 -2px 2px rgba(0, 0, 0, .35); z-index: 1; }
.afz-clamp:hover { color: var(--af-text) !important; }
.afz-clamp.is-active { color: var(--af-text) !important; border-color: var(--afz-glow); box-shadow: 0 0 0 1px rgba(60, 220, 134, .25), 0 14px 30px -18px rgba(60, 220, 134, .7); }
.afz-clamp.is-active::before { background: linear-gradient(180deg, #17b85a, #00702f); }
.afz-clamp.is-active .afz-clamp__bolt { background: #d8ffe9; box-shadow: 0 0 8px var(--afz-glow); }
.afz-clamp__mark { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--afz-amber); color: #0c1b33; font-size: 11px; display: inline-grid; place-items: center; }
.afz-ledger__side { display: flex; align-items: center; gap: 14px; padding-top: 30px; }
.afz-ledger__side form { margin: 0; }
.afz-mini { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 5px; background: var(--af-surface); border: 1px solid var(--af-line); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--af-text); }
.afz-mini i { width: 11px; height: 14px; border-radius: 2px; background: #7d8a98; }
.afz-mini b { font-weight: 600; color: var(--af-muted); letter-spacing: .04em; }
.afz-mini--safe i { background: var(--afz-green); box-shadow: 0 0 8px rgba(60, 220, 134, .7); }
.afz-mini--caution i { background: var(--afz-amber); }
.afz-mini--stop i { background: var(--afz-red); }
.afz-out { border: 0; background: none; color: var(--af-muted); font: 700 13.5px var(--af-font); display: inline-flex; gap: 7px; align-items: center; cursor: pointer; padding: 6px 2px; }
.afz-out:hover { color: var(--af-text); }

.afz-page { padding-top: 34px; }
.af-root.af-root .afz-lead { font-family: "Newsreader", Georgia, serif; font-style: italic; font-size: 20px; line-height: 1.45; color: var(--af-muted); max-width: 760px; margin: 0 0 26px; }

/* ---------- deck: tag + bays ---------- */
.afz-deck { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 26px; margin-bottom: 22px; align-items: start; }
.afz-deck__main { display: grid; gap: 20px; min-width: 0; }
.afz-deck__main > .af-card { margin-bottom: 0; }

/* the inspection tag: a dark holder with a coloured insert */
.afz-tag { position: relative; padding: 46px 14px 16px; border-radius: 16px; background: var(--afz-holder); box-shadow: var(--af-shadow), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.afz-tag::before { content: ""; position: absolute; top: 14px; left: 50%; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--afz-page); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .6); }
.afz-tag__tie { position: absolute; top: -18px; left: 50%; width: 8px; height: 46px; margin-left: -4px; border-radius: 4px; background: #d7dde4; box-shadow: inset -2px 0 0 rgba(0, 0, 0, .18); }
.afz-tag__insert { border-radius: 8px; overflow: hidden; background: #fff; color: var(--afz-insert-ink); }
.afz-tag__head { display: flex; align-items: center; gap: 14px; padding: 18px 18px 16px; color: #fff; background: #5d6b7c; }
.afz-tag--safe .afz-tag__head { background: var(--afz-green); }
.afz-tag--caution .afz-tag__head { background: var(--afz-amber); color: #20180a; }
.afz-tag--stop .afz-tag__head { background: var(--afz-red); }
.afz-tag__icon { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 3px solid currentColor; display: grid; place-items: center; font-size: 19px; }
.afz-tag__head strong { display: block; font-size: 27px; line-height: 1; font-weight: 800; font-stretch: 112%; text-transform: uppercase; letter-spacing: .01em; }
.afz-tag__head div > span { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 600; opacity: .92; }
.af-root .afz-tag__rows { display: grid; margin: 0; padding: 6px 18px 4px; }
.afz-tag__rows > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid #d9e0e8; }
.afz-tag__rows > div:last-child { border-bottom: 0; }
.afz-tag__rows dt { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #5a6b82; margin: 0; padding-top: 3px; }
.afz-tag__rows dd { margin: 0; font-weight: 700; font-size: 14.5px; color: #0c1b33; overflow-wrap: anywhere; }
.afz-tag__box { margin: 6px 18px 18px; padding: 12px 14px 14px; border: 2px solid #0c1b33; border-radius: 6px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 2px 12px; }
.afz-tag__box strong { font-size: 46px; line-height: 1; font-weight: 800; font-stretch: 112%; color: #0c1b33; }
.afz-tag--stop .afz-tag__box strong { color: var(--afz-red); }
.afz-tag__box span { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #5a6b82; }
.afz-tag__bar { grid-column: 1 / -1; display: block; height: 6px; margin-top: 8px; border-radius: 3px; background: #dfe5ec; overflow: hidden; }
.afz-tag__bar b { display: block; height: 100%; background: var(--afz-green); }
.afz-tag--caution .afz-tag__bar b { background: var(--afz-amber); }
.afz-tag__actions { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; padding: 14px 4px 2px; }
.afz-tag__actions .af-btn--ghost { color: #fff !important; border-color: rgba(255, 255, 255, .35); }
.afz-tag__actions .af-btn--link { color: #9fe8c0 !important; }

/* the bays */
.afz-run__head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.afz-run__head h2 { font-size: 22px; }
.af-root .afz-key { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--af-muted); }
.afz-key li { display: inline-flex; align-items: center; gap: 7px; }
.afz-key li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--afz-green); box-shadow: 0 0 8px rgba(60, 220, 134, .6); }
.afz-key .is-current::before { background: var(--afz-amber); box-shadow: none; }
.afz-key .is-todo::before { background: none; border: 2px dashed var(--afz-ghost); box-shadow: none; }
.af-root .afz-bays { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0; }
.afz-bay { display: grid; justify-items: center; text-align: center; gap: 2px; min-width: 0; padding: 0 2px; }
.afz-bay svg { display: block; width: 100%; max-width: 190px; height: auto; margin-bottom: 8px; overflow: visible; }
.afz-bay__standard, .afz-bay__ledger, .afz-bay__brace, .afz-bay__rail, .afz-bay__plate { fill: none; stroke: var(--afz-tube); stroke-width: 5; stroke-linecap: round; }
.afz-bay__brace { stroke-width: 3.5; }
.afz-bay__rail { stroke-width: 3.5; }
.afz-bay__plate { stroke-width: 4; }
.afz-bay__deck rect { fill: #b98a4a; }
.afz-bay__deck path { stroke: #8a6230; stroke-width: 1.2; }
.afz-bay__coupler circle { fill: var(--afz-green); stroke: #d8ffe9; stroke-width: 1.5; }
.afz-bay.is-current .afz-bay__coupler circle { fill: var(--afz-amber); stroke: #fff3cf; }
.afz-bay.is-current .afz-bay__brace, .afz-bay.is-current .afz-bay__rail { stroke-dasharray: 7 6; }
.afz-bay.is-current .afz-bay__deck { opacity: .45; }
.afz-bay.is-todo .afz-bay__standard, .afz-bay.is-todo .afz-bay__ledger, .afz-bay.is-todo .afz-bay__plate { stroke: var(--afz-ghost); stroke-dasharray: 5 6; stroke-width: 3; }
.afz-bay.is-todo .afz-bay__brace, .afz-bay.is-todo .afz-bay__rail, .afz-bay.is-todo .afz-bay__deck, .afz-bay.is-todo .afz-bay__coupler { display: none; }
.afz-bay.is-problem .afz-bay__coupler circle { fill: var(--afz-red); stroke: #ffd7d7; }
.afz-bay.is-problem .afz-bay__brace, .afz-bay.is-problem .afz-bay__rail, .afz-bay.is-problem .afz-bay__deck { display: none; }
.afz-bay__no { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--af-muted); }
.afz-bay strong { font-size: 16px; font-weight: 800; color: var(--af-text); line-height: 1.2; }
.afz-bay em { font-style: normal; font-size: 13px; color: var(--af-muted); line-height: 1.35; }
.afz-bay.is-done em { color: var(--af-ok); font-weight: 600; }
.afz-bay.is-current em { color: var(--af-warn); font-weight: 600; }
.afz-bay.is-problem em { color: var(--af-bad); font-weight: 600; }
.afz-bay.is-todo strong { color: var(--af-muted); }

/* handover note */
.afz-note { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 22px 26px; border-radius: 10px; background: var(--af-surface); border: 1px solid var(--af-line); border-inline-start: 8px solid var(--afz-amber); box-shadow: var(--af-shadow); }
.afz-note--ok { border-inline-start-color: var(--afz-green); }
.afz-note--bad { border-inline-start-color: var(--afz-red); }
.afz-note--info { border-inline-start-color: #5b9bff; }
.afz-note__body { flex: 1 1 300px; min-width: 0; }
.afz-note h2 { font-size: 24px; margin: 4px 0 6px; }
.af-root.af-root .afz-note p { color: var(--af-muted); margin: 0; }

/* framed cards */
.afz-frames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.afz-frame { position: relative; margin-bottom: 0; padding-top: 30px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; overflow: hidden; }
.afz-frame::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 8px; background: var(--afz-steel); }
.afz-frame::after { content: ""; position: absolute; top: -3px; inset-inline-start: 22px; width: 18px; height: 14px; border-radius: 3px; background: linear-gradient(180deg, #17b85a, #00702f); box-shadow: calc(100% + 0px) 0 0 transparent; }
.afz-frame h3 { font-size: 20px; margin: 2px 0 2px; }
.afz-frame > .af-btn { margin-top: auto; }
.af-root.af-root .afz-small { font-size: 14px; color: var(--af-muted); margin: 0 0 6px; }
.af-root.af-root .afz-small--bad { color: var(--af-bad); }
.af-root .afz-lines { display: grid; width: 100%; margin: 4px 0 12px; }
.afz-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 9px 0; border-top: 1px solid var(--af-line); font-size: 14px; }
.afz-lines li:first-child { border-top: 0; }
.afz-lines a { font-weight: 700; color: var(--af-text); }
.afz-lines span { font-weight: 700; color: var(--af-text); }
.afz-lines__state { grid-column: 1 / -1; font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--af-muted); }
.afz-lines__state--ok { color: var(--af-ok); }
.afz-lines__state--warn { color: var(--af-warn); }
.afz-lines__state--bad { color: var(--af-bad); }
.afz-lines__state--info { color: var(--af-info); }
.afz-lines--plain li { display: block; color: var(--af-muted); overflow-wrap: anywhere; }

/* ---------- forms: lifts up a standard ---------- */
.afz .af-shell { grid-template-columns: 250px minmax(0, 1fr); gap: 34px; }
.afz .af-shell__nav { top: 120px; }
.afz-standard, .afz .af-shell__nav { position: sticky; padding-inline-start: 4px; }
.afz-standard__title { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--af-accent); margin: 0 0 12px 44px; }
[dir="rtl"] .afz-standard__title { margin: 0 44px 12px 0; }
.af-root.afz .af-steps { position: relative; gap: 0; padding-inline-start: 0; }
.af-root.afz .af-steps::before { content: ""; position: absolute; inset-block: -6px; inset-inline-start: 11px; width: 10px; border-radius: 5px; background: var(--afz-steel); }
.afz .af-steps__item { position: relative; align-items: center; gap: 14px; padding: 11px 8px 11px 0; border-radius: 0; }
.afz .af-steps__no { position: relative; z-index: 1; width: 32px; height: 26px; border-radius: 5px; border: 0; background: linear-gradient(180deg, #5c6978, #36414f); color: #dfe6ee; font-size: 11.5px; font-weight: 700; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 2px 5px rgba(0, 0, 0, .4); }
.afz .af-steps__label { font-size: 15px; font-weight: 700; color: var(--af-muted); }
.afz .af-steps__hint { font-size: 12.5px; color: var(--af-muted); }
.afz .af-steps__item.is-active .af-steps__no { background: linear-gradient(180deg, #f8c33d, #d1900a); color: #20180a; }
.afz .af-steps__item.is-active .af-steps__label { color: var(--af-text); }
.afz .af-steps__item.is-done .af-steps__no { background: linear-gradient(180deg, #17b85a, #00702f); color: #fff; border: 0; }
.afz .af-steps__item.is-done .af-steps__label { color: var(--af-text); }
.afz .af-shell__nav .af-progress { margin: 14px 0 12px 44px; }
.afz-standard__link { display: flex; gap: 8px; align-items: center; margin: 8px 0 0 44px; color: var(--af-text) !important; font-size: 13.5px; font-weight: 600; }
[dir="rtl"] .afz-standard__link, [dir="rtl"] .afz .af-shell__nav .af-progress { margin-inline: 44px 0; }
.afz-standard__link:hover { color: var(--af-accent) !important; }

/* ---------- small screens ---------- */
@media (max-width: 991px) {
  .afz-deck { grid-template-columns: minmax(0, 1fr); }
  .afz-tag { max-width: 420px; margin-inline: auto; width: 100%; }
  .afz-frames { grid-template-columns: minmax(0, 1fr); }
  .afz .af-shell { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .afz-standard, .afz .af-shell__nav { position: static; }
  .afz-ledger__side { width: 100%; justify-content: space-between; padding-top: 4px; }
}
@media (max-width: 640px) {
  .afz-page { padding-top: 24px; }
  .af-root.af-root .afz-lead { font-size: 17px; }
  .afz-clamp { font-size: 13.5px; padding: 32px 12px 10px; }
  .af-root .afz-bays { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 0; }
  .afz-note { padding: 18px; }
  .afz-note h2 { font-size: 21px; }
  .afz-out span { display: none; }
}
