/* The Admin (/architecture/admin/): page-only styles. The shell is layer.css.
   Acts: hero (shell) · one matrix (reveal) · the desk (pin, the peak, the
   signature console) · how it holds (pan) · revocation (before/after reveal)
   · the other nine and the close (shell). */

/* ---------------------------------------------------------------- 1 · one matrix: the paired role card */
.ax-sec { padding-block: clamp(88px, 10vw, 150px); }
.ax, .ax__copy { min-width: 0; }
.ax { margin: 0; padding: clamp(20px, 2.4vw, 30px); border-radius: 16px; background: var(--panel); border: 1px solid #e2dcf2; box-shadow: 0 1px 2px rgb(26 16 51 / .05), 0 6px 8px -4px rgb(26 16 51 / .06); }
.ax__pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.ax__card { padding: 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); }
.ax__who { margin: 0; font-family: var(--sc-font-display); font-weight: 600; font-size: 17px; letter-spacing: -.015em; color: var(--sc-ink); }
.ax__sub { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-4); }
.ax__role { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--lc); background: color-mix(in oklab, var(--lc) 7%, #fff); }
.ax__role span { font-weight: 700; font-size: 14px; color: var(--lc); }
.ax__role i { font-style: normal; font-size: 11.5px; color: var(--ink-2); text-align: right; }
.ax__mid { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ax__line { width: 1.5px; height: 22px; background: var(--line-2); }
.ax__mid span { font-size: 10.5px; font-weight: 600; color: var(--ink-4); white-space: nowrap; }
.ax__foot { margin: 18px 0 0; font-size: 13px; color: var(--ink-2); text-align: center; }
.ax__copy .prose { margin-top: 20px; }
@media (max-width: 560px) {
  .ax { padding: 16px; }
  .ax__pair { grid-template-columns: 1fr; }
  .ax__mid { flex-direction: row; padding: 6px 0; }
  .ax__mid .ax__line { width: 22px; height: 1.5px; }
}

/* ---------------------------------------------------------------- 2 · the desk (pin, the peak) */
.ad__stage { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(28px, 4vw, 72px); align-items: center; padding: calc(var(--bar-h) + 20px) clamp(20px, 7vw, 120px) 28px; }
.ad__lede { max-width: 44ch; }
.ad__legend { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 16px; }
.ad__legend div { padding-top: 14px; border-top: 1px solid var(--line-2); }
.ad__legend dt { font-weight: 700; font-size: 13px; color: var(--lc); text-transform: uppercase; letter-spacing: .04em; }
.ad__legend dd { margin: 6px 0 0; color: var(--fg-body); font-size: 14.5px; line-height: 1.55; max-width: 40ch; }
.ad__hint { margin: 22px 0 0; font-size: 13px; color: var(--ink-4); }

.ad__mock .win { box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 18px 30px -18px rgb(0 0 0 / .7); }
.adc__owner { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 16px 0; font-size: 12px; color: var(--ink-4); }
.adc__ownerbtn { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: #12141c; color: var(--sc-ink); font: 600 12.5px var(--sc-font-text); cursor: pointer; transition: border-color .18s var(--ease), background-color .18s var(--ease); }
.adc__ownerbtn:hover { border-color: var(--lh); }
.adc__ownerbtn[aria-pressed="true"] { background: color-mix(in oklab, var(--lh) 22%, #12141c); border-color: color-mix(in oklab, var(--lh) 55%, transparent); color: #fff; }

.adc__tabs { display: flex; gap: 4px; margin: 12px 16px 0; padding: 4px; border-radius: 11px; background: #0a0b10; border: 1px solid var(--line); }
.adc__tabs button { flex: 1; min-width: 0; min-height: 40px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background-color .18s var(--ease), color .18s var(--ease); }
.adc__tabs button:hover { color: var(--sc-ink); }
.adc__tabs button:active { transform: translateY(1px); }
.adc__tabs button[aria-selected="true"] { color: #fff; background: color-mix(in oklab, var(--lh) 26%, #12141c); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--lh) 60%, transparent); }
.adc__tabs button:focus-visible { outline: 2px solid var(--lh); outline-offset: 2px; }

.adc__panel { padding: 16px 16px 18px; }
.adc__lbl { margin: 0 0 10px; font-size: 12px; font-weight: 600; color: var(--ink-4); }
.adc__lbl2 { margin: 18px 0 8px; font-size: 12px; font-weight: 600; color: var(--ink-4); }
.adc__chips { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.adc__actor, .adc__action { display: flex; flex-direction: column; gap: 2px; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--sc-ink); font: 600 12.5px/1.3 var(--sc-font-text); cursor: pointer; text-align: left; transition: border-color .18s var(--ease), background-color .18s var(--ease); }
.adc__actor i, .adc__action i { font-style: normal; font-weight: 500; font-size: 11px; color: var(--ink-4); }
.adc__actor:hover, .adc__action:hover { border-color: var(--lh); }
.adc__actor[aria-pressed="true"], .adc__action[aria-pressed="true"] { background: color-mix(in oklab, var(--lh) 20%, #12141c); border-color: color-mix(in oklab, var(--lh) 55%, transparent); }
.adc__actor[aria-pressed="true"] i, .adc__action[aria-pressed="true"] i { color: #e9e4ff; }
.adc__chips--action .adc__action { flex-direction: row; align-items: center; }

.adc__result { position: relative; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: #0b0d13; }
.adc__result p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--fg-body); }
.adc__result p:first-of-type { margin-top: 10px; }
.adc__result b { color: var(--sc-ink); }
.adc__why { color: var(--ink-2) !important; }
.adc__badge { display: inline-flex; align-items: center; font: 700 12px/1 var(--sc-font-mono); padding: 6px 11px; border-radius: 999px; }
.adc__badge.ok { color: #b9f5cf; background: #0f2a1b; border: 1px solid #1f5f3a; }
.adc__badge.no { color: #ffb4a8; background: #2a1414; border: 1px solid #5c2620; }
.adc__foot { margin: 14px 0 0 !important; font-size: 12.5px; color: var(--ink-4) !important; }

.adc__skillhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.adc__toggle { min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: #12141c; color: var(--sc-ink); font: 700 13px var(--sc-font-text); cursor: pointer; transition: background-color .18s var(--ease), border-color .18s var(--ease), opacity .18s; }
.adc__toggle[aria-pressed="true"] { background: color-mix(in oklab, var(--lh) 26%, #12141c); border-color: color-mix(in oklab, var(--lh) 60%, transparent); color: #fff; }
.adc__toggle:disabled { opacity: .4; cursor: not-allowed; }
.adc__status { margin: 12px 0 0; font-size: 13.5px; color: var(--fg-body); }
.adc__lockmsg { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--line-2); font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.adc__pane.locked .adc__lockmsg { display: block; }
.adc__pane:not(.locked) .adc__lockmsg { display: none; }
.adc__history { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.adc__hlbl { margin: 0 0 10px; font-size: 12px; font-weight: 600; color: var(--ink-4); }
.adc__history ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.adc__history li { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line-2); }
.adc__v { font: 700 12px var(--sc-font-mono); color: var(--lh); }
.adc__vwhen { font-size: 11.5px; color: var(--ink-4); white-space: nowrap; }
.adc__vnote { font-size: 12.5px; color: var(--fg-body); }
.adc__cur { font: 600 11px var(--sc-font-text); color: #b9f5cf; background: #0f2a1b; border: 1px solid #1f5f3a; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.adc__restore { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: #12141c; color: var(--sc-ink); font-size: 11.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.adc__restore:hover { border-color: var(--lh); }
.adc__restore:disabled { opacity: .5; cursor: default; }
.adc__note { margin: 14px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-2); }

.adc__usage { margin-bottom: 8px; }
.adc__bar { position: relative; height: 12px; border-radius: 999px; background: #1c1f2a; }
.adc__fill { display: block; height: 100%; border-radius: inherit; background: var(--lh); transition: width .6s var(--ease); }
.adc__resets { margin: 8px 0 0; font-size: 12px; color: var(--ink-4); }
.adc__usebd { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.adc__usebd li, .adc__spend li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 12.5px; }
.adc__usebd span, .adc__spend span { color: var(--fg-body); }
.adc__usebd b, .adc__spend b { color: var(--sc-ink); font-family: var(--sc-font-mono); font-weight: 500; font-size: 12px; }
.adc__spend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

@media (max-width: 960px) {
  .ad__stage { grid-template-columns: 1fr; align-content: start; gap: 12px; padding: calc(var(--bar-h) + 12px) 16px 12px; }
  .ad__copy .h2 { font-size: 26px; }
  .ad__lede, .ad__legend, .ad__hint { display: none; }
  .adc__owner { margin: 10px 12px 0; }
  .adc__tabs { margin: 10px 12px 0; }
  .adc__panel { padding: 10px 12px 14px; }
  .adc__chips { gap: 6px; }
  .adc__actor, .adc__action { font-size: 12px; padding: 8px 10px; }
  .adc__history li { grid-template-columns: auto 1fr; row-gap: 4px; }
  .adc__vwhen { order: 3; }
  .adc__cur, .adc__restore { grid-column: 1 / -1; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  .adc__fill { transition-duration: .01s; }
}

/* ---------------------------------------------------------------- 3 · how it holds (pan)
   The lead is a flex sibling of the rail, outside its clipped viewport, so it
   never moves. .ah__viewport clips exactly at the lead's right edge; the
   engine's own data-sc-pan is not used here (it would translate the rail's
   whole box, including the part that starts flush with the lead, and drag
   cards across the heading). admin.js drives .ah__rail's transform itself,
   measured against .ah__viewport's own width, so nothing ever crosses back
   over the fixed column. */
.ah__stage { display: flex; align-items: stretch; overflow: hidden; padding: calc(var(--bar-h) + 20px) 0 28px clamp(20px, 7vw, 120px); }
/* the lead is opaque over the full stage height, with a soft fade past its
   own edge, so no card can ever appear to sit beside or above the heading,
   including in the pin's entry/exit slide where the two columns' content
   is not vertically synced */
.ah__lead { flex: none; position: relative; z-index: 3; width: clamp(380px, 36vw, 540px); background: #fcfbff; display: flex; flex-direction: column; justify-content: center; padding-right: 32px; }
.ah__lead::after { content: ""; position: absolute; top: 0; bottom: 0; left: 100%; width: 80px; background: linear-gradient(to right, #fcfbff, transparent); pointer-events: none; }
.ah__lead .h2 { font-size: clamp(30px, 2.6vw, 42px); }
.ah__viewport { flex: 1 1 auto; min-width: 0; align-self: stretch; overflow: hidden; position: relative; z-index: 1; }
.ah__rail { display: flex; align-items: center; gap: 20px; height: 100%; padding-right: clamp(24px, 8vw, 140px); will-change: transform; }
.ah__card { flex: none; display: flex; flex-direction: column; width: clamp(360px, 25vw, 400px); padding: 28px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 1px 2px rgb(26 16 51 / .05); }
.ah__card--w { width: clamp(400px, 29vw, 440px); }
.ah__kind { margin: 0 0 10px; font: 600 11.5px/1 var(--sc-font-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--lc); }
.ah__card h3 { font-size: clamp(19px, 1.6vw, 23px); }
.ah__card p:not(.ah__kind):not(.ah__meta) { margin: 12px 0 0; font-size: 15px; line-height: 1.65; color: var(--fg-body); }
.ah__meta { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-4); }
.ah__end { flex: none; display: flex; flex-direction: column; justify-content: center; width: clamp(300px, 24vw, 360px); padding-left: 8px; }
.ah__end .lede { margin-top: 10px; }
.ah__end .ulink { display: inline-block; margin-top: 20px; }
/* below 700px a fixed sidebar leaves too little room for a readable pan, so
   the rail stacks instead, the same fallback reduced motion uses */
@media (max-width: 700px) {
  .ah { height: auto !important; }
  .ah > .ah__stage { height: auto !important; overflow: visible !important; flex-direction: column; padding: calc(var(--bar-h) + 16px) 16px 12px; }
  .ah__lead { width: auto; max-width: none; padding-right: 0; padding-bottom: 20px; background: none; z-index: auto; }
  .ah__lead::after { display: none; }
  .ah__viewport { overflow: visible !important; }
  .ah__rail { flex-wrap: wrap; align-items: stretch; transform: none !important; padding: 0 0 clamp(48px, 8vw, 72px); height: auto; }
  .ah__end { flex: 1 1 100%; width: auto; max-width: 100%; padding-left: 0; }
  .ah__end .lede { max-width: 100%; }
  .ah__card, .ah__card--w { align-self: stretch; flex: 1 1 auto; width: auto; min-height: 0; padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ah { height: auto !important; }
  .ah > .ah__stage { height: auto !important; overflow: visible !important; flex-direction: column; padding-inline: clamp(20px, 7vw, 120px); }
  .ah__lead { width: auto; max-width: 720px; padding-right: 0; padding-bottom: 24px; background: none; z-index: auto; }
  .ah__lead::after { display: none; }
  .ah__viewport { overflow: visible !important; }
  .ah__rail { flex-wrap: wrap; align-items: stretch; transform: none !important; padding: 0 0 clamp(60px, 7vw, 100px); height: auto; }
  .ah__end { flex: 1 1 100%; width: auto; max-width: 720px; }
  .ah__end .lede { max-width: 100%; }
  .ah__card, .ah__card--w { align-self: stretch; flex: 1 1 300px; width: auto; min-height: 0; }
}

/* ---------------------------------------------------------------- 4 · revocation (before/after reveal) */
.rv .split { align-items: start; }
/* a single-column 1fr grid track still sizes to its content's min-content
   unless the item can shrink; without this a wide .lnote forces the mobile
   grid track past the viewport */
.rv__mock, .rv__copy { min-width: 0; }
.rv__copy { padding-top: clamp(0px, 3vw, 40px); }
.rv__copy .prose { margin-top: 20px; }
.rv__mock .win { box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 18px 30px -18px rgb(0 0 0 / .7); }
.rv__stack { position: relative; margin: 16px; }
.rv__before, .rv__after { padding: 14px 16px; border-radius: 12px; background: #0b0d13; border: 1px solid var(--line-2); }
.rv__after { position: absolute; inset: 0; background: #14100f; border-color: color-mix(in oklab, var(--lh) 40%, var(--line-2)); }
.rv__t { margin: 0 0 10px; font: 600 11px/1 var(--sc-font-mono); color: var(--ink-4); text-transform: uppercase; letter-spacing: .04em; }
.rv__before ul, .rv__after ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rv__before li { font-size: 13px; color: var(--fg-body); padding: 8px 10px; border-radius: 8px; background: var(--panel-2); }
.rv__after li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: rgb(255 90 78 / .06); }
.rv__after s { color: var(--ink-2); }
.rv__rm { flex: none; font: 600 10.5px var(--sc-font-mono); color: #ffb4a8; background: #2a1414; border: 1px solid #5c2620; padding: 3px 8px; border-radius: 999px; }
.rv__logline { margin: 14px 16px 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.rv__logline b { color: var(--sc-ink); }
@media (max-width: 900px) { .rv__copy { padding-top: 0; order: -1; } }
@media (max-width: 560px) {
  .rv__stack { margin: 10px; }
  .rv__before, .rv__after { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .rv__after { transition: none !important; }
}
