.app-shell .tagging-access { box-sizing: border-box; width: 100%; max-width: 680px; margin: 24px auto; padding: clamp(20px, 3vw, 28px); background: #fff; color: #171a18; border: 2px solid #303830; border-radius: 18px; font-family: inherit; text-shadow: 0.15px 0 #171a18; }
.app-shell .tagging-access header { display: grid; gap: 8px; margin-bottom: 20px; }
.app-shell .tagging-access h2 { margin: 0; font-size: clamp(22px, 4vw, 28px); line-height: 1.2; letter-spacing: -.025em; }
.app-shell .tagging-access p { margin: 0; color: #171a18; font-size: 16px; line-height: 1.5; }
.app-shell .tagging-access .eyebrow { font-size: 12px; }
.app-shell .tagging-access__master { display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 0 0 16px; font-size: 16px; font-weight: 600; }
.app-shell .tagging-access__master > span { flex: 1; }
.app-shell .tagging-access input[type=checkbox] { flex: 0 0 auto; width: 22px; height: 22px; margin: 0; accent-color: #171a18; }
.app-shell .tagging-access__groups { display: grid; gap: 4px; margin: 0; padding: 12px; min-width: 0; max-height: 240px; overflow-y: auto; border: 2px solid #707870; border-radius: 10px; }
.app-shell .tagging-access__groups legend { padding: 0 6px; font-size: 14px; font-weight: 600; }
.app-shell .tagging-access__groups label { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 4px; margin: 0; cursor: pointer; font-size: 16px; line-height: 1.4; }
.app-shell .tagging-access__groups label span { min-width: 0; overflow-wrap: anywhere; }
.app-shell .tagging-access__directory { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.app-shell .tagging-access .tagging-access__scope { margin: 16px 0 8px; }
.app-shell .tagging-access footer { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.app-shell .tagging-access button { min-height: 44px; max-width: 100%; padding: 10px 16px; font-size: 15px; white-space: normal; }
.app-shell .tagging-access :focus-visible { outline: 3px solid #345d34; outline-offset: 3px; }
@media (max-width: 400px) { .app-shell .tagging-access { border-radius: 14px; padding: 18px; } .app-shell .tagging-access footer > button { flex: 1 1 120px; } }

/* WHY R1502: onboarding centers a 680px decision; Settings already supplies
   a section grid. Reusing its 24px margin there doubled gaps and inset the card. */
.app-shell .rules-view .tagging-access { max-width: 100%; margin: 0; }
/* Failure/readback status is a distinct section, not another instruction line. */
.app-shell .tagging-access > [role=alert],
.app-shell .tagging-access > [role=status] { margin-top: 16px; }
.app-shell .tagging-access > [role=alert] + button { margin-top: 12px; }
