/* Studio styles: media-approval pages. Owned by that page group; shared styles live in ../studio.css. */
/* Geometry from docs/studio-reference/dom/{14,22,57,71,11,16,17,18,19}-*.dom.txt. */

/* ================================================================ shared bits */
.ma-label { font-size: 14px; line-height: 20px; font-weight: 600; }
.ma-hint { font-size: 13px; line-height: 18px; color: var(--muted-foreground); }
.ma-link { color: var(--primary-300); font-weight: 600; }
.ma-link:hover { text-decoration: underline; }
.ma-inline-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; font: inherit; }
.ma-inline-link:hover { color: var(--foreground); }
.ma-paras p { font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.ma-paras p + p { margin-top: 14px; }
.ma-chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 2px 6px 2px 8px; border-radius: var(--radius-tag); background: var(--chip-bg); color: var(--text-mid); font-size: 12px; line-height: 18px; font-weight: 600; white-space: nowrap; }
.ma-chip-x { display: inline-flex; color: var(--muted-foreground); border-radius: 4px; }
.ma-chip-x:hover { color: var(--foreground); }
.ma-taginput-wrap { position: relative; display: flex; flex-direction: column; gap: 4px; }
.ma-taginput { min-height: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: var(--radius-field); cursor: text; }
.ma-taginput:focus-within { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.ma-taginput.disabled { cursor: default; }
.ma-taginput input { flex: 1; min-width: 120px; height: 26px; padding: 0 4px; background: transparent; border: 0; outline: none; color: var(--foreground); font-size: 14px; }
.ma-taginput input::placeholder { color: var(--muted-foreground); }
.ma-suggest { position: absolute; z-index: 5; top: 44px; left: 0; min-width: 220px; background: var(--popover); border: 1px solid var(--input-border); border-radius: 10px; padding: 4px; box-shadow: var(--shadow-lg); }
.ma-suggest .menu-item { font-size: 14px; padding: 6px 10px; }

/* ================================================================ media page */
.ma-media { gap: 24px; }
.ma-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.ma-fchip { display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--grey-600); color: var(--foreground); font-size: 14px; line-height: 20px; font-weight: 600; white-space: nowrap; }
.ma-fchip:hover { background: var(--grey-800); }
.ma-fchip.active { background: var(--primary-tint-12); color: var(--primary-300); border-color: transparent; }
.ma-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.ma-card { position: relative; min-width: 0; }
.ma-card-btn { display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; border-radius: 12px; }
.ma-thumb { position: relative; height: 144px; width: 100%; background: var(--card); border: 1px solid var(--grey-800); border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ma-thumb img, .ma-thumb video { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.ma-card-btn:hover .ma-thumb { border-color: var(--grey-500); }
.ma-thumb-label { position: absolute; left: 9px; top: 9px; padding: 2px 6px; border-radius: 6px; background: var(--scrim); color: rgba(255, 255, 255, .9); font-size: 11px; line-height: 16px; }
.ma-wand { position: absolute; right: 9px; top: 9px; width: 22px; height: 22px; border-radius: 6px; background: var(--scrim); color: var(--primary-foreground); display: flex; align-items: center; justify-content: center; }
.ma-wand:hover { background: var(--primary); }
.ma-card-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ma-card-name { font-size: 14px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ma-tag { display: inline-flex; align-items: center; height: 24px; padding: 2px 8px; border-radius: 6px; background: var(--chip-bg); color: var(--text-mid); font-size: 12px; line-height: 18px; font-weight: 600; white-space: nowrap; }
.ma-empty .empty { min-height: 276px; gap: 12px; }
.ma-empty .empty-icon { background: transparent; }
.ma-empty .empty-icon .icon { width: 28px; height: 28px; }
.ma-empty .empty-copy { max-width: none; gap: 12px; }
.ma-nomatch { padding: 24px 0; }
.ma-dropveil { position: fixed; inset: 0; z-index: 45; background: var(--scrim); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.ma-dropveil > div { border: 2px dashed var(--primary); border-radius: 12px; padding: 48px 64px; display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; background: var(--card); }

/* upload dialog */
.ma-up-drop { width: 100%; height: 150px; border: 1px solid var(--input-border); border-radius: 12px; padding: 32px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--foreground); }
.ma-up-drop:hover { border-color: var(--grey-500); background: var(--hover-faint); }
.ma-up-drop > .icon { color: var(--muted-foreground); }
.ma-up-drop-t { font-size: 14px; line-height: 20px; }
.ma-up-drop-s { font-size: 13px; line-height: 18px; color: var(--muted-foreground); }
.ma-up-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.ma-up-thumb { position: relative; width: 62px; height: 62px; border-radius: 6px; overflow: hidden; background: var(--grey-850); border: 1px solid var(--input-border); }
.ma-up-thumb.bad { border-color: var(--danger); }
.ma-up-thumb img, .ma-up-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ma-up-x { position: absolute; right: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--scrim); color: var(--primary-foreground); display: flex; align-items: center; justify-content: center; }
.ma-up-ratio { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 11px; line-height: 16px; background: var(--scrim); color: var(--primary-foreground); }
.ma-up-add { width: 62px; height: 62px; border-radius: 6px; border: 1px dashed var(--input-border); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted-foreground); font-size: 11px; }
.ma-up-add:hover { color: var(--foreground); border-color: var(--grey-500); }
.ma-up-errors { color: var(--danger); font-size: 13px; line-height: 18px; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.ma-up-err-detail { color: var(--muted-foreground); font-size: 12px; }
.ma-up-sum { margin-right: auto; align-self: center; font-size: 13px; }

/* detail dialog */
.ma-detail-preview { height: 320px; border-radius: 10px; background: var(--hover-faint); border: 1px solid var(--grey-800); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ma-detail-preview img, .ma-detail-preview video { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.ma-detail-meta { display: flex; align-items: flex-start; gap: 4px; }
.ma-detail-name { font-size: 16px; line-height: 24px; font-weight: 600; overflow-wrap: anywhere; }
.ma-detail-meta .icon-btn { flex: none; }
.ma-detail-meta .icon-btn:disabled { opacity: .5; }
.ma-detail-action { border-top: 1px solid var(--hairline); padding-top: 20px; }
.ma-current { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted-foreground); flex-wrap: wrap; }

/* ================================================================ tile editor (full screen, no app chrome; dom/22-stb-media-tile.dom.txt) */
body.te-lock { overflow: hidden; }
.te-root { position: fixed; inset: 0; z-index: 35; display: flex; background: var(--background); }
.te-panel { width: 320px; flex: none; display: flex; flex-direction: column; border-right: 1px solid var(--hairline); background: var(--background); min-height: 0; }
.te-head { height: 57px; flex: none; display: flex; align-items: center; gap: 8px; padding: 12px; background: var(--muted); }
.te-back { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--foreground); }
.te-back:hover { background: var(--chip-bg); }
.te-head h1 { font-size: 24px; line-height: 32px; font-weight: 700; }
.te-seg-wrap { padding: 12px; flex: none; border-bottom: 1px solid var(--hairline); }
.te-seg { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--background); border: 1px solid var(--hairline); }
.te-seg button { flex: 1; height: 32px; padding: 6px 8px; border-radius: 6px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--grey-300); }
.te-seg button:hover { color: var(--foreground); }
.te-seg button.on { background: var(--primary); color: var(--primary-foreground); }
.te-seg-sm button { height: 28px; font-size: 12px; }
.te-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.te-pad { padding: 12px; }
.te-sec { border-bottom: 1px solid var(--border); }
.te-sec-h button { width: 100%; height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--foreground); }
.te-sec-h button:hover { background: var(--hover-faint); }
.te-sec-h { font-size: inherit; font-weight: inherit; }
.te-sec.open .te-sec-h button { border-bottom: 1px solid var(--border); }
.te-sec-body { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.te-text { font-size: 13px; line-height: 18px; color: var(--muted-foreground); }
.te-src { display: flex; gap: 8px; align-items: center; }
.te-src-prev { width: 40px; height: 40px; flex: none; border-radius: 8px; border: 1px solid var(--border); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--muted-foreground); background: var(--grey-850); }
.te-src-prev img { width: 100%; height: 100%; object-fit: cover; }
.te-file { flex: 1; min-width: 0; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 8px; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 10px; }
.te-file-btn { height: 28px; padding: 0 12px; border-radius: 6px; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); font-size: 13px; font-weight: 600; white-space: nowrap; }
.te-file-btn:hover { background: color-mix(in srgb, var(--primary) 20%, transparent); }
.te-file-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.te-row2 { display: flex; gap: 8px; }
.te-light { border-top: 1px solid var(--border); padding-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.te-light-top { display: flex; justify-content: space-between; align-items: center; }
.te-light-top label { font-size: 14px; line-height: 20px; font-weight: 500; }
.te-slider { display: flex; flex-direction: column; gap: 4px; }
.te-slider-top { display: flex; justify-content: space-between; font-size: 13px; }
.te-slider input { width: 100%; accent-color: var(--primary); }
.te-switch-row { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.te-switch-row > label, .te-switch-row > span.grow { flex: 1; font-size: 14px; line-height: 20px; font-weight: 500; }
.te-switch-row .switch { width: 44px; height: 24px; }
.te-switch-row .switch::after { width: 20px; height: 20px; }
.te-switch-row .switch[aria-checked="true"]::after { transform: translateX(20px); }
.te-gcolor { position: relative; width: 16px; height: 16px; flex: none !important; border-radius: 4px; border: 1px solid var(--border); overflow: hidden; cursor: pointer; }
.te-gcolor input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.te-color { display: flex; gap: 8px; align-items: center; }
.te-color input[type=color] { width: 40px; height: 40px; flex: none; padding: 2px; border-radius: 10px; border: 1px solid var(--input-border); background: var(--input-bg); cursor: pointer; }
.te-mini-label { font-size: 13px; font-weight: 500; }
.te-foot { flex: none; padding: 12px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--hairline); background: var(--muted); }
.te-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.te-actions .btn { width: 100%; }
.te-stage { flex: 1; min-width: 0; position: relative; background: var(--muted); overflow: hidden; }
.te-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.te-canvas:active { cursor: grabbing; }
.te-canvas:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.te-picker-tabs { margin-top: -4px; }
.te-picker { max-height: min(52vh, 460px); overflow-y: auto; }
.te-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.te-picker-item { display: flex; flex-direction: column; gap: 6px; text-align: left; min-width: 0; }
.te-picker-item img { width: 100%; height: 110px; object-fit: contain; border-radius: 10px; border: 1px solid var(--grey-800); background: var(--background); }
.te-picker-item:hover img { border-color: var(--primary); }
.te-picker-item span { font-size: 12px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.te-picker-empty { padding: 32px 0; text-align: center; }
@media (max-width: 767px) {
  .te-root { flex-direction: column; overflow-y: auto; }
  .te-panel { width: 100%; border-right: 0; border-bottom: 1px solid var(--hairline); }
  .te-scroll { overflow: visible; }
  .te-stage { flex: none; height: 70vh; min-height: 360px; }
}

/* ================================================================ approval wizard (dom/71-empty-approval.dom.txt) */
.aw-page { padding-bottom: 32px; }
.aw-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.aw-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.aw-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.aw-steps li { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.aw-bar { height: 4px; border-radius: 999px; background: var(--grey-700); }
.aw-steps li.done .aw-bar { background: var(--primary); }
.aw-steps span { font-size: 13px; line-height: 18px; color: var(--muted-foreground); white-space: nowrap; }
.aw-steps li.cur span { color: var(--foreground); font-weight: 600; }
.aw-main { container-type: inline-size; }
@container (max-width: 520px) {
  .aw-steps { position: relative; padding-bottom: 28px; }
  .aw-steps li span { display: none; }
  .aw-steps li.cur span { display: block; position: absolute; left: 0; bottom: 0; }
}
.aw-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.aw-card-head { padding: 24px 24px 0; display: flex; flex-direction: column; gap: 6px; }
.aw-card-head h3 { font-size: 16px; line-height: 24px; font-weight: 600; }
.aw-card-head p { font-size: 14px; line-height: 20px; color: var(--muted-foreground); }
.aw-card-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.aw-card-head:only-child { padding-bottom: 24px; }
.aw-checks { display: flex; flex-direction: column; }
.aw-check { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.aw-check:first-child { padding-top: 0; }
.aw-check:last-child { border-bottom: 0; padding-bottom: 0; }
.aw-check > span { margin-top: 2px; }
.aw-check-t { display: flex; align-items: center; gap: 12px; font-size: 14px; line-height: 20px; font-weight: 500; flex-wrap: wrap; }
.aw-check p { font-size: 13px; line-height: 18px; margin-top: 2px; overflow-wrap: anywhere; }
.aw-versions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@container (max-width: 420px) { .aw-versions, .aw-summary { grid-template-columns: minmax(0, 1fr); } }
.aw-ver { border: 1px solid var(--border); border-radius: 10px; padding: 16px; font-size: 13px; line-height: 18px; display: flex; flex-direction: column; gap: 4px; }
.aw-ver-v { font-size: 18px; line-height: 24px; font-weight: 600; }
.aw-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.aw-back { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 8px; font-size: 14px; font-weight: 700; color: var(--foreground); }
.aw-back:hover { background: var(--secondary); }
.aw-note { font-size: 13px; color: var(--muted-foreground); }
.aw-choices { display: flex; flex-direction: column; gap: 16px; }
.aw-choice { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.aw-choice:hover:not(.disabled) { border-color: var(--grey-500); }
.aw-choice.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }
.aw-choice.disabled { cursor: default; }
.aw-choice.disabled:not(.on) { opacity: .6; }
.aw-choice input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary); flex: none; }
.aw-choice-t { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 20px; font-weight: 600; flex-wrap: wrap; }
.aw-reco { font-size: 12px; line-height: 16px; font-weight: 600; padding: 1px 8px; border-radius: 6px; background: var(--primary-tint-12); color: var(--primary-300); }
.aw-choice-d { margin-top: 6px; color: var(--muted-foreground); font-size: 14px; line-height: 20px; }
.aw-rate { text-align: right; flex: none; max-width: 45%; }
.aw-rate-v { font-size: 24px; line-height: 28px; font-weight: 700; }
.aw-rate-l { font-size: 13px; font-weight: 700; }
.aw-rate-s { font-size: 13px; color: var(--muted-foreground); }
.aw-sub { display: flex; flex-direction: column; gap: 10px; padding: 4px 4px 0 38px; }
.aw-radio, .aw-check-label { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 20px; cursor: pointer; }
.aw-radio input { width: 16px; height: 16px; margin-top: 4px; accent-color: var(--primary); }
.aw-check-label input { margin-top: 4px; flex: none; }
.aw-orgs { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.aw-quote { margin: 0; padding: 16px 20px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted-foreground); line-height: 1.7; }
.aw-table { max-height: 280px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.aw-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.aw-table th { position: sticky; top: 0; background: var(--grey-850); text-align: left; padding: 10px 12px; font-weight: 600; }
.aw-table td { padding: 10px 12px; border-top: 1px solid var(--border); }
.aw-editor { display: flex; flex-direction: column; border: 1px solid var(--input-border); border-radius: 10px; background: var(--input-bg); overflow: hidden; }
.aw-editor-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; border-bottom: 1px solid var(--input-border); gap: 8px; }
.aw-editor-tabs, .aw-editor-tools { display: flex; gap: 4px; }
.aw-editor-tabs button { height: 28px; padding: 0 12px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--muted-foreground); }
.aw-editor-tabs button.on { background: var(--secondary); color: var(--foreground); }
.aw-editor-tools button { width: 28px; height: 28px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted-foreground); }
.aw-editor-tools button:hover, .aw-editor-tabs button:hover { color: var(--foreground); background: var(--secondary); }
.aw-textarea { border: 0; border-radius: 0; min-height: 220px; background: transparent; box-shadow: none !important; }
.aw-preview { min-height: 220px; padding: 12px; }
.aw-count { font-size: 12px; text-align: right; padding: 4px 10px 6px; }
.aw-assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.aw-asset { position: relative; height: 84px; border-radius: 10px; border: 1px solid var(--border); overflow: hidden; background: var(--background); }
.aw-asset img { width: 100%; height: 100%; object-fit: contain; }
.aw-asset.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.aw-asset:disabled { opacity: .4; }
.aw-asset-tick { position: absolute; right: 4px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; }
.aw-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; margin: 0; }
.aw-summary dt { color: var(--muted-foreground); font-size: 14px; }
.aw-summary dd { margin: 4px 0 0; font-size: 16px; line-height: 24px; font-weight: 500; }
.aw-small { font-size: 13px; font-weight: 400; }
.aw-terms { max-height: 360px; overflow-y: auto; padding: 16px 20px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; }
.aw-submit-err { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.aw-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--topbar-h) + 16px); }
.aw-how { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.aw-how-h { font-size: 14px; line-height: 20px; font-weight: 600; margin-bottom: 24px; }
.aw-how-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.aw-how-list li { display: flex; gap: 12px; }
.aw-num { width: 24px; height: 24px; flex: none; border-radius: 999px; border: 1px solid var(--grey-600); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; margin-top: 2px; }
.aw-how-list strong { display: block; font-size: 14px; line-height: 20px; font-weight: 600; }
.aw-how-list span { color: var(--muted-foreground); font-size: 14px; line-height: 20px; }
.aw-alert { position: relative; background: var(--card); border: 1px solid var(--input-border); border-radius: 12px; padding: 14px 16px 14px 36px; }
.aw-alert-bar { position: absolute; left: 21px; top: 15px; bottom: 15px; width: 3px; border-radius: 999px; background: var(--grey-500); }
.aw-alert-bar.warn { background: var(--warning); }
.aw-alert h5 { margin: 0 0 4px; font-size: 14px; line-height: 16px; font-weight: 700; }
.aw-alert div > div { font-size: 12px; line-height: 18px; color: var(--grey-300); }
@media (max-width: 1180px) {
  .aw-grid { grid-template-columns: minmax(0, 1fr); }
  .aw-aside { position: static; }
}
@media (max-width: 600px) {
  .aw-choice { flex-wrap: wrap; padding: 16px; }
  .aw-rate { text-align: left; max-width: none; width: 100%; padding-left: 34px; }
  .aw-summary, .aw-versions { grid-template-columns: 1fr; }
  .aw-card-head { padding: 20px 16px 0; }
  .aw-card-body { padding: 20px 16px; }
}

/* ================================================================ approval thread (dom/11,16-19-stb-approval*.dom.txt) */
.at-page { gap: 24px; padding-bottom: 32px; }
.at-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--hairline); overflow-x: auto; }
.at-tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 12px 4px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--muted-foreground); white-space: nowrap; }
.at-tab:hover { color: var(--foreground); }
.at-tab.on { color: var(--foreground); }
.at-tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--primary); }
.at-tb { display: inline-flex; align-items: center; justify-content: center; height: 24px; padding: 2px 8px; border-radius: 999px; font-size: 13px; line-height: 18px; font-weight: 600; }
.at-tb.red { height: 18px; background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.at-tb.green { height: 18px; background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.at-tb.amber { background: color-mix(in srgb, var(--warning) 15%, transparent); color: var(--warning); }
.at-white { color: var(--foreground); }
.at-small { font-size: 13px; line-height: 18px; }
.at-banner { display: flex; gap: 12px; padding: 16px; border-radius: 8px; border: 1px solid var(--border); background: var(--muted-30); margin-bottom: 24px; }
.at-banner > .icon { margin-top: 2px; color: var(--muted-foreground); }
.at-banner.warn { border-color: color-mix(in srgb, var(--warning) 40%, transparent); background: var(--warning-tint-12); }
.at-banner.warn > .icon { color: var(--warning); }
.at-banner-t { font-weight: 500; }
.at-activity { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 0 24px; }
.at-activity h3 { font-size: 16px; line-height: 24px; font-weight: 500; margin-right: 8px; }
.at-fpill { height: 30px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--hairline); color: var(--muted-foreground); font-size: 13px; line-height: 18px; font-weight: 500; }
.at-fpill:hover { color: var(--foreground); }
.at-fpill.on { background: color-mix(in srgb, var(--primary) 10%, transparent); border-color: color-mix(in srgb, var(--primary) 50%, transparent); color: var(--foreground); }
.at-sort { margin-left: auto; font-size: 13px; color: var(--muted-foreground); text-decoration: underline; text-underline-offset: 3px; }
.at-sort:hover { color: var(--foreground); }
.at-composer { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.at-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.at-composer-foot .link-btn:disabled { opacity: .4; }
.at-events { display: flex; flex-direction: column; gap: 16px; padding-bottom: 16px; }
.at-empty, .at-issues-empty { padding: 40px; border: 1px solid var(--hairline); border-radius: 8px; background: var(--muted-30); color: var(--muted-foreground); text-align: center; }
.at-ev { background: var(--card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.at-ev-h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--muted-30); }
.at-av { width: 28px; height: 28px; flex: none; border-radius: 999px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--muted-foreground); }
.at-ev-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.at-ev-name { font-weight: 600; }
.at-dot, .at-ev-date { font-size: 13px; }
.at-ev-body { padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.at-imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.at-imgs img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.at-rcard { background: var(--muted-30); border: 1px solid var(--hairline); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.at-rhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.at-rhead h3 { font-size: 14px; line-height: 20px; font-weight: 600; }
.at-pill { display: inline-flex; align-items: center; height: 24px; padding: 2px 8px; border-radius: 6px; font-size: 12px; line-height: 18px; font-weight: 600; white-space: nowrap; }
.at-pill.green { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); }
.at-pill.amber { background: color-mix(in srgb, var(--warning) 12%, transparent); color: var(--warning); }
.at-pill.pink { background: var(--primary-tint-12); color: var(--primary-300); }
.at-rcard > p { font-size: 14px; line-height: 20px; }
.at-thr { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.at-thr-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; line-height: 18px; font-weight: 500; flex-wrap: wrap; }
.at-no { color: var(--danger); font-weight: 600; }
.at-yes { color: var(--success); font-weight: 600; }
.at-bar { position: relative; height: 16px; border-radius: 999px; background: var(--hairline); overflow: hidden; }
.at-bar-fill { height: 100%; background: var(--danger); }
.at-bar-fill.ok { background: var(--success); }
.at-bar-tick { position: absolute; top: 2px; bottom: 2px; width: 2px; margin-left: -1px; background: var(--muted-foreground); }
.at-thr-scale { position: relative; height: 20px; font-size: 13px; line-height: 18px; color: var(--muted-foreground); }
.at-thr-scale span:first-child { position: absolute; left: 0; }
.at-thr-scale span:nth-child(2) { position: absolute; transform: translateX(-50%); }
.at-thr-scale span:last-child { position: absolute; right: 0; }
.at-final { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-radius: 8px; background: var(--muted-50); margin: 4px 0; }
.at-final > span { font-weight: 500; }
.at-stars { display: flex; }
.at-stars button { width: 24px; height: 24px; border-radius: 8px; color: var(--grey-300); display: flex; align-items: center; justify-content: center; cursor: default; opacity: 1 !important; }
.at-stars button.on { color: var(--star); }
.at-ftags { display: flex; flex-wrap: wrap; gap: 4px; }
.at-ftag { height: 23px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--muted-50); color: var(--muted-foreground); font-size: 13px; line-height: 16px; }
.at-quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--border); color: var(--muted-foreground); }
.at-below { border-radius: 8px; padding: 16px; background: color-mix(in srgb, var(--danger) 10%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 20%, transparent); display: flex; flex-direction: column; gap: 16px; }
.at-below h4 { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--danger); }
.at-below p, .at-below li { line-height: 20px; }
.at-below .at-sm { font-size: 13px; }
.at-below ul { margin: 12px 0 0; padding-left: 25px; display: flex; flex-direction: column; gap: 4px; }
.at-below ul ul { margin-top: 4px; }
.at-below-sec { border-top: 1px solid color-mix(in srgb, var(--danger) 20%, transparent); padding-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.at-resub { gap: 12px; }
.at-resub-btn { width: 320px; max-width: 100%; }
.at-red-link { color: var(--primary); font-weight: 500; }
.at-above { border-radius: 8px; padding: 16px; background: var(--success-tint-12); border: 1px solid color-mix(in srgb, var(--success) 25%, transparent); display: flex; flex-direction: column; gap: 12px; }
.at-above h4 { font-size: 13px; font-weight: 600; color: var(--success); }
.at-gl { display: flex; flex-direction: column; gap: 24px; }
.at-gl-top { display: flex; flex-direction: column; gap: 8px; }
.at-gl-top p { font-weight: 500; }
.at-gl-bar { height: 8px; border-radius: 999px; background: var(--hairline); overflow: hidden; }
.at-gl-bar > div { height: 100%; background: var(--success); }
.at-gl-list { display: flex; flex-direction: column; gap: 10px; }
.at-g { display: flex; flex-direction: column; gap: 10px; }
.at-gh { font-size: 14px; line-height: 20px; font-weight: 600; padding-bottom: 4px; border-bottom: 1px solid var(--hairline); }
.at-gi { display: flex; align-items: flex-start; gap: 6px; padding-top: 4px; padding-bottom: 4px; }
.at-gi p { line-height: 20px; overflow-wrap: anywhere; }
.at-tick { width: 16px; height: 16px; margin-top: 4px; flex: none; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--muted-foreground) 40%, transparent); display: flex; align-items: center; justify-content: center; }
.at-tick.on { background: var(--success); border-color: var(--success); color: var(--primary-foreground); }
.at-issues { display: flex; flex-direction: column; gap: 16px; }
.at-issue { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.at-issue-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.at-issue-g { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted-foreground); }
.at-issue-resp { border-left: 3px solid var(--border); padding-left: 12px; display: flex; flex-direction: column; gap: 4px; }
.at-issue-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.at-issue-act .input { flex: 1; min-width: 200px; }
.at-vpop { padding: 16px !important; border-radius: 6px !important; border-color: var(--border) !important; }
.at-vpop-in { display: flex; flex-direction: column; gap: 12px; }
.at-vpop-in h3 { font-size: 14px; line-height: 20px; font-weight: 600; }
.at-vpop-in p { font-size: 13px; line-height: 18px; }
.at-vfield { display: flex; flex-direction: column; gap: 4px; }
.at-vfield > span { font-weight: 500; }
.at-vfield .select-trigger { font-size: 14px; }
@media (max-width: 600px) {
  .at-sort { margin-left: 0; }
  .at-thr-top { flex-direction: column; }
}

/* page header on phones: the title keeps its width and the actions wrap below it */
@media (max-width: 600px) {
  .ma-scope .page-head-row { flex-wrap: wrap; }
  .ma-scope .page-title { flex-basis: 100%; }
}
