* {
    box-sizing: border-box;
}

:root {
    --ll-ink: #15191d;
    --ll-muted: #5c6670;
    --ll-panel: #ffffff;
    --ll-panel-soft: #f4f6f8;
    --ll-line: #c8d0d8;
    --ll-line-dark: #8e99a4;
    --ll-steel: #2b333b;
    --ll-steel-light: #e6eaee;
    --ll-blue: #2f5f87;
    --ll-blue-dark: #203f5c;
    --ll-good: #1f6b49;
    --ll-bad: #9f2d2d;
    --ll-app-width: 1180px;
    --ll-gutter: 24px;
    --ll-shadow-raised: 0 3px 7px rgba(30, 42, 52, 0.24);
    --ll-shadow: var(--ll-shadow-raised);
    --ll-shadow-inset: inset 2px 2px 5px rgba(45, 57, 67, 0.30), inset -2px -2px 3px rgba(255, 255, 255, 0.92);
    --ll-bg: #c0ced8;
    --ll-title-gap: 8px;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #d0dde6 0%, var(--ll-bg) 45%, #b6c7d3 100%);
    color: var(--ll-ink);
    font-family: Segoe UI, system-ui, Arial, sans-serif;
}

a {
    color: var(--ll-blue);
}

main {
    max-width: var(--ll-app-width);
    margin: 0 auto;
    padding: 18px var(--ll-gutter) 26px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 0;
    background: #ffffff;
    border-top: 1px solid rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(190, 199, 207, 0.34);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -1px 0 rgba(158, 169, 180, 0.12),
        0 1px 2px rgba(21, 25, 29, 0.06);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    width: 100%;
    max-width: var(--ll-app-width);
    min-height: 72px;
    margin: 0 auto;
    padding: 0 var(--ll-gutter);
}

.brand {
    display: block;
    min-width: min(400px, 32vw);
    text-decoration: none;
}

.brand img {
    display: block;
    width: min(400px, 32vw);
    max-width: 100%;
    height: auto;
    object-fit: contain;
    object-position: left center;
}

nav {
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

nav form {
    display: inline;
}

.nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    border: 1px solid #9fadba;
    border-radius: 5px;
    background: linear-gradient(180deg, #ffffff 0%, #e9edf1 100%);
    color: #203f5c;
    padding: 3px 8px;
    text-decoration: none;
    font-family: Segoe UI, system-ui, Arial, sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.15;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 1px 2px rgba(21, 25, 29, 0.1);
}

.nav-button:hover {
    background: linear-gradient(180deg, #f9fbfc 0%, #dbe3ea 100%);
    border-color: var(--ll-blue);
}

.nav-button[aria-current="page"] {
    background: linear-gradient(180deg, #dceaf4 0%, #c6d8e8 100%);
    border-color: var(--ll-blue);
    box-shadow: inset 0 0 0 2px rgba(47, 95, 135, 0.18), 0 1px 2px rgba(21, 25, 29, 0.12);
}

.logout-button {
    border-color: #7d1f1f;
    background: linear-gradient(180deg, #c84646 0%, #9f2d2d 58%, #762020 100%);
    color: #ffffff;
}

.danger,
.danger:hover {
    border-color: #7d1f1f;
    background: linear-gradient(180deg, #c84646 0%, #9f2d2d 58%, #762020 100%);
    color: #ffffff;
}

.danger-link {
    color: var(--ll-bad);
    font-weight: 700;
}

.logout-button:hover {
    background: linear-gradient(180deg, #d75252 0%, #b43434 58%, #842424 100%);
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 1px solid #1c3348;
    border-radius: 6px;
    background: linear-gradient(180deg, #376f9c 0%, #2b567a 55%, #203f5c 100%);
    color: #ffffff;
    padding: 6px 12px;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 1px 2px rgba(21, 25, 29, 0.18);
}

button:hover,
.button:hover {
    filter: brightness(1.05);
}

.secondary {
    background: linear-gradient(180deg, #58636f 0%, #39434d 55%, #252d35 100%);
    border-color: #222a31;
}

.link {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ll-blue);
    box-shadow: none;
}

.hero,
.page-head,
.split,
.auth-panel,
.metrics,
.table-wrap,
.searching-workspace {
    background: var(--ll-panel);
    border: 1px solid var(--ll-line);
    border-radius: 8px;
    box-shadow: var(--ll-shadow);
}

.hero,
.page-head,
.split,
.auth-panel,
.metrics {
    padding: 14px;
    margin-bottom: 12px;
}

.searching-workspace {
    padding: 12px;
    margin-bottom: 12px;
}

.workspace-head,
.workspace-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.workspace-head {
    margin-bottom: 12px;
}

.workspace-head h1,
.workspace-panel-head h2 {
    margin: 0 0 4px;
}

.workspace-head h1 {
    font-size: 30px;
}

.workspace-head p,
.workspace-panel-head p {
    margin: 0;
    color: var(--ll-muted);
}

.workspace-panel-head {
    padding: 6px 0 9px;
}

.tab-strip {
    justify-content: flex-start;
    gap: 4px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--ll-line);
}

.tab-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    color: #203f5c;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.tab-link[aria-selected="true"] {
    background: #ffffff;
    border-color: var(--ll-line);
    box-shadow: inset 0 3px 0 var(--ll-blue);
}

.tab-link:hover {
    background: #eef3f7;
}

.dashboard-tabs {
    position: relative;
    z-index: 1;
    margin: 0 0 -1px 10px;
    border-bottom: 0;
}

.dashboard-tabs .tab-link {
    border-color: var(--ll-line);
    border-bottom-color: #aeb8c2;
    background: #edf2f6;
}

.dashboard-tabs .tab-link[aria-selected="true"] {
    background: #ffffff;
    border-bottom-color: #ffffff;
    transform: translateY(1px);
}

.tabbed-workspace {
    border-top-left-radius: 6px;
}

.tab-panel {
    min-width: 0;
}

.search-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.75fr);
    gap: 18px;
    align-items: start;
}

.search-rules,
.search-summary {
    border: 1px solid var(--ll-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 14px;
}

.rule-choice {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 10px;
    padding: 11px 0;
    border-top: 1px solid #e0e6eb;
}

.rule-choice:first-of-type {
    border-top: 0;
}

.rule-choice > span {
    display: grid;
    gap: 3px;
}

.rule-choice.disabled {
    opacity: 0.62;
}

.stacked-actions {
    display: grid;
    gap: 8px;
}

.subtle {
    color: var(--ll-muted);
}

.hero,
.page-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.page-head-with-metrics {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px;
}

.title-copy,
.page-head p,
.page-head-with-metrics p {
    margin: 0;
    line-height: 1.35;
}

.hero h1,
.page-head h1 {
    margin: 0 0 var(--ll-title-gap);
    font-size: clamp(26px, 2.8vw, 32px);
    line-height: 1.05;
}

.hero-tagline {
    margin: -4px 0 12px;
    color: #174f83;
    font-size: 20px;
    font-weight: 700;
}

h2 {
    margin-top: 0.2rem;
    margin-bottom: 0.55rem;
    font-size: 22px;
    line-height: 1.15;
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.compact-metrics {
    width: min(360px, 42vw);
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.metric-grid-2x2 {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.metrics div,
.metrics a {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: center;
    min-height: 48px;
    padding: 7px 10px;
    border: 1px solid var(--ll-line);
    border-radius: 6px;
    background: linear-gradient(180deg, #ffffff 0%, var(--ll-steel-light) 100%);
    color: var(--ll-ink);
    text-decoration: none;
}

.compact-metrics div,
.compact-metrics a {
    min-height: 38px;
    padding: 5px 8px;
}

.metrics strong {
    display: block;
    font-size: 22px;
    line-height: 1;
}

.compact-metrics strong {
    font-size: 18px;
}

.metrics span {
    color: var(--ll-muted);
    font-size: 12px;
    line-height: 1.1;
}

.compact-metrics span {
    font-size: 11px;
}

.admin-metrics {
    grid-template-columns: repeat(3, minmax(95px, 1fr));
    width: min(520px, 50vw);
}

.account-middle,
.about-hero {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    gap: 12px;
    margin-bottom: 12px;
}

.account-stack {
    display: grid;
    gap: 10px;
}

.mini-panel,
.support-panel {
    background: var(--ll-panel);
    border: 1px solid var(--ll-line);
    border-radius: 8px;
    box-shadow: var(--ll-shadow);
    padding: 12px;
}

.subscription-panel {
    align-self: start;
}

.provider-section {
    margin-bottom: 12px;
}

.about-copy,
.about-status {
    background: var(--ll-panel);
    border: 1px solid var(--ll-line);
    border-radius: 8px;
    box-shadow: var(--ll-shadow);
    padding: 14px;
}

.about-status {
    display: grid;
    align-content: start;
    gap: 6px;
}

.about-status p,
.support-panel p {
    margin-top: 0;
}

.auth-panel {
    max-width: 460px;
    margin: 36px auto;
}

.stack,
label {
    display: grid;
    gap: 6px;
}

.stack {
    gap: 12px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 36px;
    border: 1px solid #aeb8c2;
    border-radius: 6px;
    padding: 6px 8px;
    background: #ffffff;
    color: var(--ll-ink);
}

textarea {
    min-height: 120px;
    padding: 8px;
    resize: vertical;
}

.cardish {
    background: var(--ll-panel);
    border: 1px solid var(--ll-line);
    border-radius: 8px;
    box-shadow: var(--ll-shadow);
    padding: 22px;
    margin-bottom: 18px;
}

.public-page-shell,
.public-page-panel {
    width: 100%;
    max-width: none;
}

.public-page-copy {
    max-width: 900px;
    line-height: 1.55;
}


.public-page-copy h2 {
    margin-top: 1.35rem;
}

.public-page-copy li + li {
    margin-top: 0.45rem;
}


.company-wordmark {
    font-weight: 700;
}

.guest-pass-compact {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.admin-guest-bug-row .guest-pass-compact {
    grid-column: 1 / -1;
}

.guest-pass-compact-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-height: 28px;
}

.guest-pass-compact-head h2 {
    margin: 0;
}

.guest-pass-compact-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(96px, 132px)) auto;
    gap: 8px;
    align-items: end;
}

.guest-pass-compact-row label {
    gap: 4px;
    font-size: 12px;
    color: var(--ll-muted);
}

.guest-pass-compact-row input {
    min-height: 34px;
    padding: 5px 7px;
}

.guest-pass-compact-row button {
    min-height: 34px;
    white-space: nowrap;
}

.notice {
    padding: 9px 12px;
    border-radius: 6px;
    margin-bottom: 14px;
}

.good {
    background: #e9f7ef;
    color: #11472f;
    border: 1px solid #a8d7bd;
}

.bad {
    background: #fff1f1;
    color: #7e2020;
    border: 1px solid #e4b3b3;
}

.beta {
    background: #f8fafb;
    color: #26323c;
    border: 1px solid rgba(80, 95, 108, 0.25);
    box-shadow: var(--ll-shadow-inset);
}

.modal-scrim {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(21, 25, 29, 0.34);
}

.confirm-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 41;
    width: min(420px, calc(100vw - 32px));
    transform: translate(-50%, -50%);
    padding: 20px;
    border: 1px solid var(--ll-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 22px 55px rgba(21, 25, 29, 0.24);
}

.confirm-modal h2 {
    margin-bottom: 8px;
}

.modal-actions,
.support-actions,
.saved-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.modal-actions {
    justify-content: flex-end;
    margin-top: 14px;
}

.recent-runs {
    margin: 0 0 10px;
    padding: 8px 10px;
    border: 1px solid var(--ll-line);
    border-radius: 6px;
    background: #f8fafb;
}

.recent-runs-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 6px;
}

.recent-run-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.recent-run-link {
    display: inline-flex;
    padding: 4px 7px;
    border: 1px solid #c7d2dc;
    border-radius: 5px;
    background: #ffffff;
    font-size: 12px;
    text-decoration: none;
}

.recent-run-link.current {
    border-color: var(--ll-blue);
    background: #dceaf4;
}

.runs-manager {
    display: grid;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--ll-line);
}

.runs-manager[hidden] {
    display: none;
}

.run-manager-row {
    display: grid;
    grid-template-columns: 20px 1fr;
    align-items: center;
    gap: 6px;
}

.inline-form {
    display: inline-flex;
    align-items: center;
}

.compact-delete {
    min-height: 26px;
    padding: 3px 7px;
    font-size: 12px;
}

.row-actions {
    white-space: nowrap;
}

.row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #e2e7eb;
}

.row div:last-child {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filters {
    display: grid;
    grid-template-columns: repeat(6, minmax(100px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.result-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid var(--ll-line);
    border-radius: 6px;
    background: #ffffff;
}

.filter-active {
    border: 1px solid #b7c2cc;
    border-radius: 999px;
    background: #edf3f8;
    color: #203f5c;
    padding: 4px 9px;
    font-weight: 700;
    font-size: 13px;
}

.table-wrap {
    overflow: auto;
    margin-bottom: 12px;
    padding: 12px;
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 980px;
    background: #ffffff;
}

th,
td {
    border-bottom: 1px solid #e2e7eb;
    padding: 9px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #edf1f5;
}

.site-footer {
    max-width: var(--ll-app-width);
    margin: 0 auto;
    padding: 8px var(--ll-gutter) 24px;
    color: var(--ll-muted);
    font-size: 14px;
    text-align: center;
}

.site-footer p {
    margin: 4px 0;
}

.site-footer .footer-link-button {
    display: inline;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ll-blue);
    font: inherit;
    font-weight: inherit;
    line-height: inherit;
    vertical-align: baseline;
    box-shadow: none;
}

.site-footer .footer-link-button:hover {
    filter: none;
    text-decoration: underline;
}

.badge {
    background: #dfe6ec;
    border: 1px solid #bac4cd;
    border-radius: 999px;
    padding: 8px 12px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid #bac4cd;
    border-radius: 999px;
    background: #eef2f5;
    color: #2b333b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
    vertical-align: middle;
}

.good-pill {
    border-color: #9bc8b0;
    background: #eaf7ef;
    color: #145136;
}

.free-pill {
    border-color: #d1a05d;
    background: #fff1d8;
    color: #6f4617;
}

.warn-pill {
    border-color: #c9b46b;
    background: #fff6d8;
    color: #655015;
}

.scheduled-pill {
    border-color: #aebdcc;
    background: #e8eff5;
    color: #385061;
}

.guest-pill {
    border-color: #9bbbd4;
    background: #e5f2fb;
    color: #254f70;
}

.bad-pill {
    border-color: #dfb0b0;
    background: #fff0f0;
    color: #7e2020;
}

.neutral-pill {
    border-color: #c0cad3;
    background: #edf2f5;
    color: #3f4b55;
}

.rule-form {
    display: grid;
    gap: 8px;
    align-content: start;
}

.rule-form h2 {
    margin-bottom: 0;
}

.rule-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 8px;
}

.rule-grid label {
    gap: 4px;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
}

.rule-grid input,
.rule-grid select,
.multi-select-toggle {
    min-height: 36px;
}

.property-type-field {
    position: relative;
}

.multi-select {
    position: relative;
    display: block;
    min-width: 0;
}

.multi-select-toggle {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid #aeb8c2;
    background: #ffffff;
    color: var(--ll-ink);
    padding: 6px 8px;
    font-weight: 500;
    box-shadow: none;
}

.multi-select-toggle:hover,
.multi-select-toggle:focus {
    filter: none;
    border-color: var(--ll-blue);
}

.multi-select-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 6;
    display: grid;
    gap: 2px;
    max-height: 230px;
    overflow: auto;
    padding: 8px;
    border: 1px solid #aeb8c2;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(20, 25, 29, 0.18);
}

.multi-select-menu[hidden] {
    display: none;
}

.multi-select-option {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 7px;
    align-items: center;
    min-height: 28px;
    padding: 3px 4px;
    border-radius: 4px;
    font-weight: 500;
}

.multi-select-option:hover,
.multi-select-option:focus-within {
    background: #eef4f8;
}

.multi-select-option input {
    min-height: auto;
}

.legacy-option span {
    color: #4e5f70;
}

.multi-select-clear {
    justify-self: start;
    margin-top: 4px;
}

.rule-grid .span-2 {
    grid-column: span 2;
}

.rule-grid .span-3 {
    grid-column: span 3;
}

.rule-grid .span-4 {
    grid-column: span 4;
}

.rule-grid .span-5 {
    grid-column: span 5;
}

.rule-grid .span-7 {
    grid-column: span 7;
}

.rule-grid .span-8 {
    grid-column: span 8;
}

.rule-submit {
    justify-self: start;
}

.actions,
.help-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.ll-tooltip {
    position: fixed;
    z-index: 50;
    max-width: 300px;
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 7px;
    background: rgba(14, 22, 31, 0.58);
    color: #ffffff;
    font-size: 14px;
    line-height: 1.35;
    box-shadow: 0 12px 28px rgba(21, 25, 29, 0.24);
    pointer-events: none;
    backdrop-filter: blur(4px);
}

.listing-title-link {
    color: #154d7c;
    font-family: Segoe UI, system-ui, Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.listing-title-link:hover,
.listing-title-link:focus {
    color: #0f3557;
    text-decoration-thickness: 2px;
}

.subtle-link {
    display: inline-block;
    margin-top: 4px;
    color: #4e5f70;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.listing-address {
    display: inline-block;
    margin-top: 3px;
    color: #4e5f70;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.25;
}

.help-scrim {
    position: fixed;
    inset: 0;
    z-index: 20;
    background: rgba(21, 25, 29, 0.24);
}

.help-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 30;
    width: min(500px, 94vw);
    height: 100vh;
    overflow: hidden;
    padding: 22px;
    background: #fbfcfd;
    border-left: 1px solid var(--ll-line);
    box-shadow: -18px 0 38px rgba(21, 25, 29, 0.18);
    transform: translateX(0);
    transition: transform 180ms ease;
    display: flex;
    flex-direction: column;
}

.help-drawer[aria-hidden="true"] {
    transform: translateX(105%);
}

.help-drawer-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.help-drawer h2,
.help-drawer h3,
.help-full h2,
.help-full h3 {
    margin-top: 0;
}

.help-close {
    min-width: 40px;
    padding: 8px 12px;
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--ll-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.help-search-label {
    margin-bottom: 6px;
}

.help-search-form {
    display: grid;
    gap: 6px;
}

.help-search-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center;
}

.help-search-results {
    margin: 12px 0;
    padding: 12px;
    border: 1px solid var(--ll-line);
    border-radius: 6px;
    background: #ffffff;
}

.help-drawer-body {
    overflow: auto;
    min-height: 0;
    padding-right: 4px;
}

.help-search-results h3 {
    margin: 0 0 8px;
}

.help-search-results ul {
    margin: 0;
    padding-left: 18px;
}

.select-column,
th input[data-select-all-visible],
td input[data-row-select] {
    width: auto;
    min-height: auto;
}

.help-toc {
    display: block;
    margin: 18px 0;
}

.help-toc details {
    padding: 8px 0;
    border-bottom: 1px solid #e2e7eb;
}

.help-toc summary {
    cursor: pointer;
    font-weight: 700;
}

.help-toc a {
    display: block;
    padding: 5px 0 5px 12px;
}

.help-article,
.help-full-article {
    padding: 14px 0;
    border-top: 1px solid #e2e7eb;
}

.help-target-highlight {
    background: rgba(255, 242, 166, 0.42);
    box-shadow: inset 3px 0 0 #d2a925;
}

.help-back-to-top {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid #b7c2cc;
    background: rgba(255, 255, 255, 0.92);
    color: #203f5c;
    box-shadow: 0 5px 16px rgba(21, 25, 29, 0.16);
    font-size: 18px;
    line-height: 1;
    z-index: 2;
}

.help-back-to-top[hidden] {
    display: none;
}

.app-back-to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 12;
    width: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 6px;
    border: 1px solid #9fadba;
    background: rgba(255, 255, 255, 0.94);
    color: #203f5c;
    box-shadow: 0 3px 8px rgba(21, 25, 29, 0.18);
    font-size: 18px;
    line-height: 1;
}

.app-back-to-top[hidden] {
    display: none;
}

.help-full ul {
    columns: 2;
}

.print-head p {
    margin: 4px 0;
}

.print-table table {
    min-width: 1000px;
}

[data-help-key]:focus {
    outline: 3px solid rgba(47, 95, 135, 0.28);
    outline-offset: 2px;
}

@media (max-width: 760px) {
    .hero,
    .page-head,
    .split,
    .page-head-with-metrics,
    .account-middle,
    .about-hero {
        display: block;
    }

    .metrics {
        grid-template-columns: 1fr 1fr;
    }

    .compact-metrics {
        width: 100%;
        margin-top: 10px;
    }

    .admin-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .rule-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rule-grid .span-2,
    .rule-grid .span-3,
    .rule-grid .span-4,
    .rule-grid .span-5,
    .rule-grid .span-7,
    .rule-grid .span-8 {
        grid-column: span 1;
    }

    .guest-pass-compact-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-stack,
    .about-copy {
        margin-bottom: 12px;
    }

    .filters {
        grid-template-columns: 1fr;
    }

    .topbar {
        min-height: 0;
        padding: 12px 0;
    }

    .topbar-inner {
        align-items: flex-start;
        flex-direction: column;
        min-height: 0;
        padding: 0 14px;
    }

    .brand {
        min-width: 0;
        width: 100%;
    }

    .brand img {
        width: min(100%, 285px);
    }

    nav {
        gap: 10px;
        justify-content: flex-start;
    }

    main {
        padding: 14px;
    }

    .help-full ul {
        columns: 1;
    }

    .help-search-row {
        grid-template-columns: 1fr;
    }
}

@media (pointer: coarse) {
    button,
    .button,
    input,
    select {
        min-height: 42px;
    }

    .nav-button {
        min-height: 38px;
        padding: 7px 10px;
    }
}

@media (max-width: 520px) {
    .rule-grid {
        grid-template-columns: 1fr;
    }

    .guest-pass-compact-row {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .help-drawer,
    .help-target-highlight {
        transition: none;
    }
}

@media print {
    @page {
        size: landscape;
        margin: 0.45in;
    }

    body {
        background: #ffffff;
        color: #000000;
        font-size: 11px;
    }

    .topbar,
    .notice,
    .no-print,
    .help-drawer,
    .help-scrim,
    .modal-scrim,
    .confirm-modal,
    .ll-tooltip,
    .filters,
    form,
    button,
    .button {
        display: none !important;
    }

    main,
    .site-footer {
        max-width: none;
        padding: 0;
    }

    .page-head,
    .table-wrap,
    .cardish,
    .split {
        border: 0;
        box-shadow: none;
        padding: 0;
        margin: 0 0 14px;
        background: #ffffff;
    }

    .page-head {
        display: block;
    }

    table {
        min-width: 0;
        font-size: 10px;
    }

    th,
    td {
        padding: 5px;
        border-bottom: 1px solid #cfd6dd;
    }

    a {
        color: #000000;
        text-decoration: none;
    }
}
