:root {
    color-scheme: dark;
    --background: #050505;
    --surface: #0d0d0d;
    --surface-raised: #151515;
    --text: #f7f7f5;
    --muted: #aaa9a5;
    --accent: #ff3b30;
    --accent-strong: #d91f16;
    --border: #2b2b2b;
    --max-width: 1160px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--border);
    background: rgba(5, 5, 5, 0.88);
    backdrop-filter: blur(18px);
}

.nav {
    width: min(calc(100% - 32px), var(--max-width));
    min-height: 64px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; }
.brand::before {
    content: "";
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    background: center / contain no-repeat url("/assets/brand/xchecked-icon-dark.png");
}
.brand-logo { display: none; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 22px; }

.button {
    min-height: 44px;
    padding: 10px 17px;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--surface-raised);
    color: var(--text);
    cursor: pointer;
    font-weight: 680;
}

.button:hover { border-color: #565656; }
.button-disabled { cursor: default; opacity: .72; }
.button-disabled:hover { border-color: var(--border); }
.button:disabled, button:disabled { cursor: wait; opacity: .55; }
.button.primary { border-color: var(--accent); background: var(--accent); color: #000; }
.button.primary:hover { background: #ff5a51; }
.button:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

main { overflow: hidden; }
.container { width: min(calc(100% - 32px), var(--max-width)); margin: auto; }

.hero {
    min-height: calc(100svh - 64px);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: center;
    gap: clamp(38px, 7vw, 96px);
    padding-block: 76px;
}

.eyebrow { color: var(--accent); font-weight: 760; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }
h1 { margin: 12px 0 18px; max-width: 800px; font-size: clamp(3.2rem, 8vw, 7.2rem); line-height: .92; letter-spacing: -.065em; }
.hero-copy { max-width: 650px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.device {
    max-width: 390px;
    margin: auto;
    padding: 14px;
    border: 1px solid #3b3b3b;
    border-radius: 42px;
    background: #101010;
    box-shadow: 0 34px 90px rgba(255, 59, 48, .14);
}

.device-screen { min-height: 610px; padding: 25px 18px; border-radius: 31px; background: #000; border: 1px solid #252525; }
.device-title { margin: 18px 0; font-size: 1.55rem; font-weight: 760; }
.flight-card, .check-card { border: 1px solid #4c1210; border-radius: 15px; padding: 16px; margin-top: 12px; }
.route { display: flex; justify-content: space-between; color: var(--accent); font-size: 1.7rem; font-weight: 780; }
.flight-meta, .check-meta { color: #d84b45; font-size: .9rem; }
.progress { height: 5px; margin-top: 14px; border-radius: 99px; background: #32100e; overflow: hidden; }
.progress > span { display: block; width: 72%; height: 100%; background: var(--accent); }

.section { padding-block: 96px; }
.section-heading { max-width: 700px; margin-bottom: 38px; }
.section h2 { margin: 8px 0 12px; font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: 1; letter-spacing: -.045em; }
.section-heading p { color: var(--muted); font-size: 1.1rem; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature-card { min-height: 220px; padding: 24px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.feature-icon { color: var(--accent); font-size: 1.6rem; }
.feature-card h3 { margin: 36px 0 8px; font-size: 1.2rem; }
.feature-card p { margin: 0; color: var(--muted); }

.platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.platform { padding: 24px; border-top: 1px solid var(--accent); background: linear-gradient(180deg, rgba(255,59,48,.08), transparent); }
.platform strong { display: block; font-size: 1.25rem; }
.platform span { color: var(--muted); }

.cta { margin-block: 80px; padding: clamp(30px, 7vw, 72px); border: 1px solid #4c1210; border-radius: 24px; background: radial-gradient(circle at top right, rgba(255,59,48,.18), transparent 45%), var(--surface); }
.cta h2 { max-width: 720px; }

.auth-shell { min-height: calc(100svh - 64px); display: grid; place-items: center; padding: 42px 16px; }
.auth-card { width: min(100%, 480px); padding: 32px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.auth-card h1 { margin: 4px 0 12px; font-size: 2.5rem; line-height: 1; letter-spacing: -.04em; }
.auth-card p { color: var(--muted); }
.auth-card .button { width: 100%; margin-top: 12px; }
.status { min-height: 24px; color: var(--muted); }
.status.error { color: var(--accent); }

.admin-shell { padding-block: 54px 90px; }
.admin-header { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 34px; }
.admin-header h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 4rem); }
.admin-header .button { margin-left: auto; }
.admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.admin-card { padding: 22px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.admin-card span { color: var(--muted); }
.admin-card strong { display: block; margin-top: 12px; color: var(--accent); font-size: 2rem; }

footer { border-top: 1px solid var(--border); color: var(--muted); }
.footer-inner { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a:hover, .legal-page a { color: var(--accent); }

@media (max-width: 820px) {
    .nav-links a:not(.button) { display: none; }
    .hero { grid-template-columns: 1fr; min-height: auto; }
    .device { width: min(100%, 360px); }
    .feature-grid, .platforms, .admin-grid { grid-template-columns: 1fr; }
    .feature-card { min-height: auto; }
    .footer-inner { flex-direction: column; align-items: flex-start; padding-block: 25px; }
}

@media (prefers-reduced-motion: no-preference) {
    .feature-card, .button { transition: transform .18s ease, border-color .18s ease, background .18s ease; }
    .feature-card:hover { transform: translateY(-3px); border-color: #4a4a4a; }
}
@media (prefers-reduced-motion: reduce) { .spinner,.icon-button.is-loading { animation-duration: 2s; } }

.admin-body { min-height: 100svh; }
.admin-badge { padding: 3px 8px; border-radius: 6px; background: var(--accent); color: #000; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.icon-button { width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; font-size: 1.3rem; }
.admin-app { width: min(100%, 1500px); min-height: calc(100svh - 65px); margin: auto; display: grid; grid-template-columns: 210px minmax(0, 1fr); overflow: visible; }
.admin-nav { position: sticky; top: 65px; height: calc(100svh - 65px); padding: 24px 14px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 5px; }
.admin-tab { min-height: 45px; padding: 8px 12px; border: 0; border-radius: 10px; display: flex; align-items: center; gap: 12px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.admin-tab span { width: 22px; color: var(--accent); font-size: 1.1rem; text-align: center; }.admin-tab b { font-weight: 650; }.admin-tab:hover,.admin-tab.active { background: var(--surface-raised); color: var(--text); }
.admin-content { min-width: 0; padding: clamp(22px, 4vw, 52px); }.workspace-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 30px; }.workspace-header h1 { margin: 2px 0; font-size: clamp(2rem, 4vw, 3.7rem); }.view-description { max-width: 650px; margin: 8px 0 0; color: var(--muted); }.workspace-meta { text-align: right; color: var(--muted); }.workspace-meta p { margin: 4px 0; }.workspace-meta small { display: block; }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }.metric,.panel { padding: 20px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); }.metric span { color: var(--muted); font-size: .84rem; }.metric strong { display: block; margin-top: 8px; color: var(--accent); font-size: 1.65rem; }.panel { margin-top: 16px; }.panel h2 { margin: 0; }.panel p { color: var(--muted); }
.quick-links { margin-top: 18px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }.quick-link { min-height: 92px; padding: 15px; border: 1px solid var(--border); border-radius: 12px; display: grid; grid-template-columns: 28px 1fr; column-gap: 10px; align-items: center; background: #090909; color: var(--text); text-align: left; cursor: pointer; }.quick-link > span { grid-row: 1 / 3; color: var(--accent); font-size: 1.3rem; }.quick-link strong,.quick-link small { display: block; }.quick-link small { color: var(--muted); }.quick-link:hover { border-color: #555; background: var(--surface-raised); }
.toolbar { display: flex; gap: 10px; margin-bottom: 18px; }.toolbar input,.toolbar select { min-height: 44px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }.toolbar input { flex: 1; }
.toolbar-spacer { flex: 1; }.edit-toggle.active { border-color: var(--accent); color: var(--accent); }
.batch-bar { min-height: 52px; margin: -6px 0 16px; padding: 8px 10px; border: 1px solid #4c1210; border-radius: 11px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; background: rgba(255,59,48,.06); }
.batch-bar label { display: flex; align-items: center; gap: 7px; }.batch-bar select { min-height: 38px; margin-left: auto; padding: 6px 9px; border: 1px solid var(--border); border-radius: 8px; background: #000; color: var(--text); }
.data-list { display: grid; gap: 8px; }.data-row { padding: 15px 16px; border: 1px solid var(--border); border-radius: 13px; display: flex; justify-content: space-between; gap: 18px; background: var(--surface); }.row-main { min-width: 0; display: grid; gap: 3px; }.row-main strong,.row-main span,.row-main small { overflow-wrap: anywhere; }.row-main span,.row-main small,.row-main p { color: var(--muted); }.row-main p { margin: 6px 0 0; }.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 7px; }.row-actions button { min-height: 40px; padding: 7px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-raised); color: var(--text); cursor: pointer; }.row-actions .danger-link { color: var(--accent); }.empty-state { padding: 48px 20px; border: 1px dashed var(--border); border-radius: 13px; display: grid; gap: 5px; color: var(--muted); text-align: center; }.empty-state strong { color: var(--text); font-size: 1.05rem; }.load-more { margin: 18px auto 0; }
.data-row.is-editing { grid-template-columns: auto minmax(0,1fr) auto; align-items: center; }.row-select { display: grid; place-items: center; min-width: 28px; min-height: 44px; }.row-select input,.batch-bar input { width: 18px; height: 18px; accent-color: var(--accent); }
[data-open-user] { cursor:pointer; }[data-open-user]:hover,[data-open-user]:focus-visible { border-color:#555; background:var(--surface-raised); }[data-open-user]:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
.pagination { min-height: 62px; display: flex; align-items: center; justify-content: center; gap: 14px; }.pagination span { min-width: 70px; color: var(--muted); text-align: center; }
.loading-row { min-height: 140px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }.spinner { width: 19px; height: 19px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: admin-spin .8s linear infinite; }@keyframes admin-spin { to { transform: rotate(360deg); } }
.icon-button.is-loading { animation: admin-spin .8s linear infinite; }
.notice { position: fixed; z-index: 50; right: 20px; bottom: 20px; max-width: 420px; padding: 13px 16px; border: 1px solid #1f6f3a; border-radius: 11px; background: #092713; color: #a9efbf; box-shadow: 0 12px 40px #000; }.notice.error { border-color: var(--accent); background: #310908; color: #ffaaa5; }
dialog { width: min(calc(100% - 32px), 470px); padding: 25px; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); color: var(--text); }dialog::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(3px); }dialog h2 { margin-top: 0; }dialog p,dialog label { color: var(--muted); }dialog label { display: grid; gap: 7px; }dialog input,dialog select { width: 100%; min-height:44px; padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: #000; color: var(--text); }.dialog-actions { margin-top: 22px; display: flex; justify-content: flex-end; gap: 9px; }.button.danger { border-color: var(--accent); background: var(--accent); color: #000; }
@media (max-width: 900px) { .metric-grid { grid-template-columns: repeat(2, 1fr); }.admin-app { grid-template-columns: 74px minmax(0,1fr); }.admin-nav { align-items: center; }.admin-tab { width: 48px; justify-content: center; }.admin-tab b { display: none; }.quick-links { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .admin-app { display: block; padding-bottom: 74px; }.admin-content { padding: 20px 14px; }.admin-nav { position: fixed; z-index: 30; top: auto; left: 0; right: 0; bottom: 0; height: 68px; padding: 7px 8px max(7px, env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--border); flex-direction: row; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; background: rgba(5,5,5,.96); }.admin-nav::-webkit-scrollbar { display:none; }.admin-tab { min-width: 48px; min-height: 48px; }.workspace-header { display: block; }.workspace-meta { margin-top: 12px; text-align: left; }.metric-grid { grid-template-columns: 1fr 1fr; }.toolbar { flex-wrap: wrap; }.toolbar input,.toolbar select { flex: 1 1 180px; }.data-row,.data-row.is-editing { display: grid; grid-template-columns: auto minmax(0,1fr); }.data-row .row-actions { grid-column: 1 / -1; justify-content: flex-start; }.row-actions button { min-height: 44px; }.batch-bar select { width: 100%; margin-left: 0; }.batch-bar .button { flex: 1; }.nav { width: calc(100% - 20px); }.notice { left: 12px; right: 12px; bottom: 82px; } }
.member-badge { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.workspace-switcher { gap: 9px; }.workspace-link { background: transparent; }.admin-workspace-link { border-color: var(--accent); color: var(--accent); }
.member-shell { width: min(100%, 1380px); min-height: calc(100svh - 65px); margin: auto; display: grid; grid-template-columns: 210px minmax(0,1fr); overflow: visible; }
.member-nav { padding: 24px 14px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 5px; }
.member-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
.profile-form { margin: 0; }.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.profile-form label, dialog label { display: grid; gap: 6px; color: var(--muted); }
.profile-form input, .profile-form textarea, dialog textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: #000; color: var(--text); }
.profile-form fieldset { margin: 22px 0; padding: 16px; border: 1px solid var(--border); border-radius: 12px; }
.profile-form .toggle { min-height: 38px; display: flex; grid-template-columns: auto 1fr; align-items: center; }.profile-form .toggle input { width: 20px; min-height: 20px; }
.danger-zone { margin-top: 20px; padding: 22px; border: 1px solid #6f1712; border-radius: 15px; background: #170504; }.danger-zone h2 { margin-top: 0; }
.legal-page { max-width: 820px; padding-block: clamp(54px,8vw,100px); }.legal-page h1 { font-size: clamp(3rem,8vw,6rem); }.legal-page h2 { margin-top: 42px; font-size: 1.45rem; }.legal-page p,.legal-page li { color: var(--muted); font-size: 1.06rem; }.legal-lead { font-size: clamp(1.2rem,2.5vw,1.5rem) !important; }.steps { display: grid; gap: 12px; padding-left: 24px; margin-bottom: 28px; }.support-grid { display: grid; gap: 14px; }.support-grid .panel { margin: 0; }
@media (max-width:900px) { .member-shell { grid-template-columns:74px minmax(0,1fr); }.member-nav { align-items:center; }.member-nav .admin-tab { width:48px; justify-content:center; }.member-nav .admin-tab b { display:none; } }
@media (max-width:620px) { .member-shell { display:block; padding-bottom:74px; }.member-nav { position:fixed; z-index:30; left:0; right:0; bottom:0; height:68px; padding:7px 8px max(7px,env(safe-area-inset-bottom)); border:0; border-top:1px solid var(--border); flex-direction:row; justify-content:flex-start; overflow-x:auto; scrollbar-width:none; background:rgba(5,5,5,.96); }.member-nav::-webkit-scrollbar { display:none; }.form-grid { grid-template-columns:1fr; }.member-metrics { grid-template-columns:1fr; }.legal-page { padding-inline:18px; }.workspace-link span:last-child { display:none; }.workspace-link { width:44px; padding-inline:0; }.admin-badge { display:none; } }

/* Collaborative knowledge workspace */
.member-nav { position: sticky; top: 65px; height: calc(100svh - 65px); }
.nav-divider { height: 1px; margin: 10px 8px; background: var(--border); }
.nav-count { min-width: 20px; margin-left: auto; padding: 1px 5px; border-radius: 99px; background: var(--accent); color: #000; font-size: .68rem; font-style: normal; font-weight: 850; text-align: center; }
.safety-banner { margin: -10px 0 22px; padding: 11px 14px; border: 1px solid #58491a; border-radius: 11px; background: #181506; color: #d8c677; font-size: .84rem; }
.safety-banner strong { color: #fff0a3; }
.member-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.dashboard-columns { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr); gap:16px; }
.community-panel { min-width:0; }
.section-title { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:18px; }
.section-title h2 { margin:2px 0; }
.section-title p:not(.eyebrow) { margin:7px 0 0; color:var(--muted); }
.text-button { padding:7px 4px; border:0; background:transparent; color:var(--accent); cursor:pointer; font-weight:700; }
.text-button:hover { text-decoration:underline; }
.quick-actions { display:grid; gap:10px; }
.knowledge-action { min-height:82px; padding:14px; border:1px solid var(--border); border-radius:12px; display:grid; grid-template-columns:30px 1fr; column-gap:10px; background:#090909; color:var(--text); text-align:left; cursor:pointer; }
.knowledge-action > span { grid-row:1 / 3; color:var(--accent); font-size:1.3rem; }.knowledge-action small { color:var(--muted); }
.community-search { display:grid; grid-template-columns:minmax(220px,1fr) minmax(150px,220px) auto; gap:10px; }
.community-search input,.community-search select { width:100%; min-height:48px; padding:10px 13px; border:1px solid var(--border); border-radius:11px; background:var(--surface); color:var(--text); }
.filter-chips,.tag-row { display:flex; flex-wrap:wrap; gap:7px; }
.filter-chips { margin:12px 0 22px; }.filter-chips button,.tag-row span { padding:5px 9px; border:1px solid var(--border); border-radius:99px; background:transparent; color:var(--muted); font-size:.78rem; }.filter-chips button { cursor:pointer; }.filter-chips button:hover { border-color:var(--accent); color:var(--text); }
.resource-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; }
.resource-grid > .empty-state,.resource-grid > .loading-row { grid-column:1 / -1; }
.resource-card { min-width:0; padding:20px; border:1px solid var(--border); border-radius:15px; background:var(--surface); display:flex; flex-direction:column; }
.resource-card:hover { border-color:#4a4a4a; }.resource-card h3 { margin:14px 0 7px; font-size:1.18rem; }.resource-card > p { margin:0 0 13px; color:var(--muted); display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.resource-heading { display:flex; justify-content:space-between; gap:10px; align-items:center; }.resource-type { color:var(--accent); font-size:.76rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }.visibility-badge,.status-pill { padding:3px 7px; border:1px solid #405d49; border-radius:99px; color:#9ed6ad; font-size:.7rem; font-weight:750; text-transform:capitalize; }.visibility-badge.linked { border-color:#3c5271; color:#a9c8ef; }
.trust-grid { margin:15px 0 12px; display:grid; grid-template-columns:1fr 1fr; gap:7px; color:var(--muted); font-size:.75rem; }.trust-grid strong { color:var(--text); }.provenance { margin-top:auto; padding-top:11px; border-top:1px solid var(--border); color:var(--muted); font-size:.78rem; }.provenance strong { color:var(--text); }
.resource-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:14px; }.resource-actions .button { min-height:39px; padding:7px 11px; font-size:.82rem; }.compact-card { min-height:220px; }
.activity-list,.compact-list { display:grid; gap:8px; }.activity-row { padding:14px; border:1px solid var(--border); border-radius:12px; display:grid; grid-template-columns:10px minmax(0,1fr) auto; gap:11px; align-items:start; background:var(--surface); }.activity-row.unread { border-color:#56302e; background:#130b0a; }.activity-dot { width:7px; height:7px; margin-top:8px; border-radius:50%; background:var(--border); }.activity-row.unread .activity-dot { background:var(--accent); box-shadow:0 0 0 4px rgba(255,59,48,.12); }.activity-row p { margin:3px 0; color:var(--muted); }.activity-row small { color:var(--muted); }
.inline-toggle { display:flex; align-items:center; gap:8px; color:var(--muted); }.inline-toggle input { width:18px; height:18px; accent-color:var(--accent); }
.content-result-group + .content-result-group { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.content-result-group > h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; color: var(--text); }
.content-result-group > h2 span { min-width: 24px; padding: 2px 7px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12px; text-align: center; }
.deleted-content { opacity: .82; }
.segmented { width:min(100%,620px); margin-bottom:18px; padding:4px; border:1px solid var(--border); border-radius:12px; display:grid; grid-template-columns:repeat(3,1fr); background:#090909; }.segmented button { min-height:40px; padding:7px; border:0; border-radius:8px; background:transparent; color:var(--muted); cursor:pointer; }.segmented button.active { background:var(--surface-raised); color:var(--text); box-shadow:0 1px 5px #000; }
.status-pill.needs_review { border-color:#6b5317; color:#f0d56d; }.status-pill.retired { border-color:#64302d; color:#f4a29d; }.status-pill.draft { border-color:#555; color:#bbb; }
.diff-list { display:grid; gap:9px; margin:16px 0; }.diff-row { padding:11px; border:1px solid var(--border); border-radius:10px; display:grid; grid-template-columns:auto minmax(0,1fr); gap:10px; }.diff-row input { width:18px; height:18px; accent-color:var(--accent); }.diff-row strong,.diff-row del,.diff-row ins { display:block; overflow-wrap:anywhere; }.diff-row del { margin-top:5px; color:var(--muted); }.diff-row ins { margin-top:4px; color:#a9efbf; text-decoration:none; }.split-actions { display:grid; grid-template-columns:auto 1fr auto auto; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.field-hint { font-size:.78rem; color:var(--muted); }
.ticket-list { display:grid; gap:9px; }.ticket-row { width:100%; padding:16px; border:1px solid var(--border); border-radius:13px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; background:var(--surface); color:var(--text); text-align:left; cursor:pointer; }.ticket-row:hover { border-color:#555; }.ticket-row h3 { margin:3px 0 5px; }.ticket-row p { margin:0; color:var(--muted); }.ticket-row-meta { display:flex; flex-wrap:wrap; gap:8px; align-items:center; color:var(--muted); font-size:.76rem; }.ticket-row-aside { display:grid; justify-items:end; align-content:space-between; gap:8px; color:var(--muted); font-size:.78rem; }.ticket-dialog { width:min(calc(100% - 24px),720px); }.ticket-dialog-header { display:flex; justify-content:space-between; gap:15px; }.ticket-dialog-header h2 { margin:8px 0 3px; }.ticket-dialog-header p { margin:0; }.ticket-thread { max-height:45svh; margin:18px 0; padding:4px; display:grid; gap:10px; overflow-y:auto; }.ticket-message { max-width:82%; padding:11px 13px; border:1px solid var(--border); border-radius:13px 13px 13px 3px; background:#090909; }.ticket-message.member { justify-self:end; border-radius:13px 13px 3px 13px; border-color:#54302e; background:#170a09; }.ticket-message strong,.ticket-message small { display:block; }.ticket-message p { margin:4px 0; color:var(--text); white-space:pre-wrap; overflow-wrap:anywhere; }.ticket-message small { color:var(--muted); font-size:.72rem; }.status-pill.open { border-color:#375e43;color:#a9efbf}.status-pill.in_progress { border-color:#3c5271;color:#a9c8ef}.status-pill.waiting_on_user { border-color:#6b5317;color:#f0d56d}.status-pill.resolved,.status-pill.closed { border-color:#555;color:#bbb}
.admin-ticket-dialog { width:min(calc(100% - 24px),820px); }.ticket-controls { margin:16px 0; padding:12px; border:1px solid var(--border); border-radius:12px; display:grid; grid-template-columns:1fr 1fr 1.4fr auto; gap:9px; align-items:end; }.ticket-controls label { font-size:.76rem; }.ticket-controls input,.ticket-controls select { min-width:0; }.priority-urgent { color:#ff8c85; }.priority-high { color:#f0d56d; }
.user-inspector { width:min(calc(100% - 24px),1080px); max-height:92svh; padding:0; overflow:hidden; }.user-inspector > form { max-height:92svh; display:flex; flex-direction:column; }.user-inspector-header { padding:22px 24px 14px; display:flex; justify-content:space-between; gap:16px; }.user-inspector-header h2 { margin:8px 0 3px; }.user-inspector-header p { margin:0; }.user-actions { padding:0 24px 14px; display:flex; flex-wrap:wrap; gap:8px; }.inspector-tabs { padding:0 24px; border-bottom:1px solid var(--border); display:flex; gap:4px; overflow-x:auto; }.inspector-tabs button { flex:0 0 auto; padding:11px 13px; border:0; border-bottom:2px solid transparent; background:transparent; color:var(--muted); cursor:pointer; }.inspector-tabs button.active { border-bottom-color:var(--accent); color:var(--text); }.user-panel { min-height:300px; padding:20px 24px; overflow:auto; }.user-inspector > form > .dialog-actions { padding:0 24px 20px; }.detail-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }.detail-card { min-width:0; padding:14px; border:1px solid var(--border); border-radius:11px; background:#090909; }.detail-card span,.detail-card small { display:block; color:var(--muted); }.detail-card strong { display:block; margin-top:5px; overflow-wrap:anywhere; }.detail-section { margin-top:18px; }.detail-section h3 { margin:0 0 9px; }.record-groups { display:grid; gap:8px; }.record-group { border:1px solid var(--border); border-radius:11px; background:#090909; overflow:hidden; }.record-group summary { padding:12px 14px; cursor:pointer; font-weight:700; }.record-group pre { max-height:360px; margin:0; padding:14px; border-top:1px solid var(--border); overflow:auto; background:#000; color:#ccc; font:12px/1.45 ui-monospace,SFMono-Regular,Menlo,monospace; white-space:pre-wrap; overflow-wrap:anywhere; }.profile-editor { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; }.profile-editor label { display:grid; gap:6px; color:var(--muted); }.profile-editor input { width:100%; min-height:44px; padding:9px 11px; border:1px solid var(--border); border-radius:9px; background:#000; color:var(--text); }.profile-editor .profile-save { grid-column:1 / -1; justify-self:start; }.truncation-warning { margin:0 0 12px; padding:10px 12px; border:1px solid #6b5317; border-radius:9px; color:#f0d56d; }
@media(max-width:1050px){.dashboard-columns{grid-template-columns:1fr}.member-metrics{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.resource-grid{grid-template-columns:1fr}.community-search{grid-template-columns:1fr}.community-search .button{width:100%}.activity-row{grid-template-columns:10px minmax(0,1fr)}.activity-row .text-button{grid-column:2;justify-self:start}.segmented{grid-template-columns:1fr}.dashboard-columns{display:block}.community-panel{margin-top:14px}.ticket-row{grid-template-columns:1fr}.ticket-row-aside{justify-items:start}.ticket-message{max-width:95%}.ticket-controls{grid-template-columns:1fr 1fr}.ticket-controls label:nth-child(3),.ticket-controls .button{grid-column:1 / -1}.detail-grid{grid-template-columns:1fr 1fr}.profile-editor{grid-template-columns:1fr}.user-inspector-header,.user-actions,.user-panel{padding-inline:15px}.inspector-tabs{padding-inline:10px}}

.user-row{align-items:center;cursor:pointer}.user-row:hover{border-color:#555;background:var(--surface-raised)}.user-avatar,.profile-picture-large{display:grid;place-items:center;flex:0 0 auto;overflow:hidden;border:1px solid var(--border);border-radius:50%;background:#242424;color:#fff;font-weight:750}.user-avatar{width:46px;height:46px}.user-avatar img,.profile-picture-large img{width:100%;height:100%;object-fit:cover}.admin-user-page{width:min(calc(100% - 32px),1160px);margin:0 auto;padding:34px 0 90px}.back-link{display:inline-flex;margin-bottom:18px;color:var(--muted)}.back-link:hover{color:var(--text)}.user-page-header{display:grid;grid-template-columns:auto minmax(260px,1fr);gap:20px 26px;align-items:center;padding:22px;border:1px solid var(--border);border-radius:16px;background:var(--surface)}.profile-picture-block{display:flex;gap:16px;align-items:center}.profile-picture-large{width:112px;height:112px;font-size:2.2rem}.picture-actions{display:grid;gap:7px;align-content:center}.picture-actions .button{width:max-content}.picture-actions small{max-width:220px;color:var(--muted)}.user-heading h1{margin:7px 0 2px}.user-heading p{margin:0;color:var(--muted);overflow-wrap:anywhere}.user-page-header>.user-actions{grid-column:1/-1;padding:0}.page-tabs{margin-top:22px;padding:0}.user-page-panel{min-height:320px;padding:22px 0}.record-group summary{display:flex;align-items:center;gap:10px}.record-type-badge{flex:0 0 auto;padding:3px 8px;border:1px solid #4e4e4e;border-radius:999px;color:#ddd;background:#202020;font-size:.74rem;font-weight:750;text-transform:uppercase;letter-spacing:.04em}
@media(max-width:700px){.admin-user-page{width:min(calc(100% - 24px),1160px);padding-top:20px}.user-page-header{grid-template-columns:1fr}.profile-picture-block{align-items:flex-start}.profile-picture-large{width:88px;height:88px}.user-page-header>.user-actions{grid-column:1}.user-page-header>.user-actions .button{flex:1 1 145px}.page-tabs{overflow-x:auto}.detail-grid{grid-template-columns:1fr}.record-group summary{align-items:flex-start;flex-direction:column}}
.overview-metrics{margin-bottom:24px}.detail-card small{margin-top:5px}.readable-section{margin:0 0 28px}.readable-section>header{display:flex;justify-content:space-between;align-items:end;gap:16px;margin-bottom:11px}.readable-section>header h2{margin:0;font-size:1.14rem}.readable-section>header p{margin:3px 0 0;color:var(--muted)}.content-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.content-card{min-width:0;padding:16px;border:1px solid var(--border);border-radius:13px;background:var(--surface)}.content-card h3{margin:9px 0 3px;font-size:1.02rem;overflow-wrap:anywhere}.content-card p{margin:0;color:var(--muted)}.content-card small{display:block;margin-top:7px;color:#858585}.content-card-badges{display:flex;flex-wrap:wrap;gap:6px}.soft-badge{padding:3px 8px;border-radius:999px;background:#282828;color:#ccc;font-size:.72rem;font-weight:700;text-transform:capitalize}.soft-badge.shared{background:#183b26;color:#8ee4ad}.soft-badge.warning{background:#4a3514;color:#f2ce7c}.content-card-details{display:flex;flex-wrap:wrap;gap:8px 14px;margin-top:9px;color:#c9c9c9;font-size:.84rem}.content-card-details b{text-transform:capitalize}.compact-empty{padding:22px;border:1px dashed var(--border);border-radius:12px;color:var(--muted);text-align:center}.usage-summary{padding:18px;border:1px solid var(--border);border-radius:13px;background:var(--surface)}.usage-summary>strong{display:block;font-size:1.15rem}.usage-track{height:9px;margin:11px 0 18px;border-radius:999px;background:#2b2b2b;overflow:hidden}.usage-track span{display:block;height:100%;border-radius:inherit;background:var(--accent)}
@media(max-width:700px){.content-list{grid-template-columns:1fr}.readable-section>header{align-items:start}.overview-metrics{grid-template-columns:1fr 1fr}}
.summary-chips{display:flex;flex-wrap:wrap;gap:8px}.summary-chips span{padding:8px 11px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--muted)}.summary-chips b{color:var(--text)}
.token-limit-editor{display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) auto;gap:12px;align-items:end;margin-top:16px;padding:16px;border:1px solid var(--border);border-radius:13px;background:var(--surface)}.token-limit-editor label{display:grid;gap:6px;color:var(--muted)}.token-limit-editor select,.token-limit-editor input{min-height:44px;padding:9px 11px;border:1px solid var(--border);border-radius:9px;background:#000;color:var(--text)}
@media(max-width:700px){.token-limit-editor{grid-template-columns:1fr}.token-limit-editor .button{width:100%}}
@media(max-width:620px){.member-nav{position:fixed;z-index:30;top:auto;left:0;right:0;bottom:0;width:100%;height:calc(68px + env(safe-area-inset-bottom));padding:7px 8px max(7px,env(safe-area-inset-bottom));border-right:0;border-top:1px solid var(--border);display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;gap:5px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:none;background:rgba(5,5,5,.96);backdrop-filter:blur(18px)}.member-nav .admin-tab{flex:0 0 48px;width:48px;min-width:48px;min-height:48px;padding:8px;justify-content:center}.member-nav .nav-divider{display:none}.member-nav .nav-count{position:absolute;top:2px;right:1px;margin:0}.member-shell{padding-bottom:calc(74px + env(safe-area-inset-bottom))}}

/* Admin operations console */
.admin-body {
    --background: #f3f6f9;
    --surface: #ffffff;
    --surface-raised: #eef3f7;
    --text: #14202b;
    --muted: #667585;
    --accent: #176b87;
    --accent-strong: #0e536b;
    --border: #d8e0e7;
    color-scheme: light;
    background: var(--background);
}
.admin-body .brand::before { background-image: url("/assets/brand/xchecked-icon-light.png"); }
.admin-body .site-header { border-color: #dce4ea; background: rgba(255,255,255,.9); box-shadow: 0 1px 0 rgba(17,38,54,.03); }
.admin-body .nav { width: min(calc(100% - 40px), 1540px); }
.admin-body .admin-badge { border: 1px solid #b9d8e4; background: #e5f3f7; color: #10546a; letter-spacing: .05em; }
.admin-body .button,.admin-body .icon-button { border-color: var(--border); background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(17,38,54,.05); }
.admin-body .button:hover,.admin-body .icon-button:hover { border-color: #9eb1bf; background: #f8fafb; }
.admin-body .button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.admin-body .button.primary:hover { background: var(--accent-strong); }
.admin-body .button:focus-visible,.admin-body a:focus-visible,.admin-body button:focus-visible,.admin-body input:focus-visible,.admin-body select:focus-visible,.admin-body textarea:focus-visible { outline-color: #2494b8; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 12px; padding: 9px 13px; border-radius: 8px; transform: translateY(-160%); background: var(--text); color: #fff; }
.skip-link:focus { transform: none; }
.admin-body .admin-app { width: min(100%, 1580px); grid-template-columns: 236px minmax(0,1fr); }
.admin-body .admin-nav { padding: 28px 18px; border-color: #dce4ea; background: #f8fafc; }
.admin-nav-label { margin: 0 10px 8px; color: #8492a0; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.admin-body .admin-tab { position: relative; min-height: 46px; border-radius: 9px; color: #586979; }
.admin-body .admin-tab span { color: #6d8392; }
.admin-body .admin-tab:hover { background: #eaf0f4; color: var(--text); }
.admin-body .admin-tab.active { background: #dfeef3; color: #0d526a; box-shadow: inset 3px 0 0 var(--accent); }
.admin-body .admin-tab.active span { color: var(--accent); }
.admin-body .admin-content { padding: clamp(26px,4vw,58px); }
.admin-body .workspace-header { margin-bottom: 34px; padding-bottom: 25px; border-bottom: 1px solid var(--border); }
.admin-body .workspace-header h1 { margin: 1px 0 5px; color: #102230; font-size: clamp(2rem,3.8vw,3.35rem); line-height: 1.02; letter-spacing: -.045em; }
.admin-body .eyebrow { margin: 0 0 8px; color: var(--accent); }
.admin-body .view-description { margin-top: 7px; }
.access-state { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border: 1px solid #bcdac5; border-radius: 999px; background: #edf8f0; color: #27653a; font-size: .75rem; font-weight: 750; }
.access-state i { width: 7px; height: 7px; border-radius: 50%; background: #39a359; box-shadow: 0 0 0 3px rgba(57,163,89,.13); }
.admin-body .workspace-meta p { color: #344a59; font-weight: 650; }
.admin-body .metric-grid { gap: 14px; }
.admin-body .metric,.admin-body .panel { border-color: #dce4ea; border-radius: 14px; background: #fff; box-shadow: 0 5px 18px rgba(24,48,65,.045); }
.admin-body .metric { position: relative; min-height: 118px; overflow: hidden; }
.admin-body .metric::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: #b8dce7; content: ""; }
.admin-body .metric strong { margin-top: 10px; color: #123143; font-size: 1.85rem; letter-spacing: -.035em; }
.admin-body .quick-links { grid-template-columns: repeat(3,minmax(0,1fr)); }
.admin-body .quick-link { min-height: 104px; border-color: #dce4ea; background: #f8fafb; }
.admin-body .quick-link > span { color: var(--accent); }
.admin-body .quick-link:hover { border-color: #9dbfcb; background: #eef6f8; transform: translateY(-1px); }
.admin-body .toolbar { padding: 12px; border: 1px solid #dce4ea; border-radius: 13px; background: #fff; box-shadow: 0 3px 12px rgba(24,48,65,.035); }
.admin-body .toolbar input,.admin-body .toolbar select,.admin-body dialog input,.admin-body dialog select,.admin-body dialog textarea { border-color: #cfd9e1; background: #f8fafb; color: var(--text); }
.admin-body .batch-bar { border-color: #9bc7d6; background: #eaf5f8; }
.admin-body .batch-bar select { border-color: #c3d3dc; background: #fff; color: var(--text); }
.admin-body .data-list,.admin-body .ticket-list { gap: 10px; }
.admin-body .data-row,.admin-body .ticket-row { border-color: #dce4ea; background: #fff; box-shadow: 0 2px 8px rgba(24,48,65,.035); }
.admin-body .data-row:hover,.admin-body .ticket-row:hover,[data-open-user]:hover { border-color: #a9c3ce; background: #fbfdfe; }
.admin-body .row-actions button { border-color: #d4dde4; background: #f5f8fa; color: #29404f; }
.admin-body .row-actions .danger-link,.admin-body .danger-link { color: #b42318; }
.admin-body .empty-state,.admin-body .compact-empty { border-color: #cbd6de; background: rgba(255,255,255,.55); }
.admin-body .pagination .button { min-width: 100px; }
.admin-body .notice { border-color: #98c8aa; background: #effaf2; color: #216739; box-shadow: 0 12px 36px rgba(24,48,65,.18); }
.admin-body .notice.error { border-color: #e5aaa5; background: #fff2f1; color: #9f1e16; }
.admin-body dialog { border-color: #ccd7df; background: #fff; color: var(--text); box-shadow: 0 30px 90px rgba(15,32,45,.28); }
.admin-body dialog::backdrop { background: rgba(19,36,49,.55); }
.admin-body .detail-card,.admin-body .record-group,.admin-body .content-card,.admin-body .usage-summary,.admin-body .token-limit-editor { border-color: #dce4ea; background: #fff; }
.admin-body .record-group pre { border-color: #dce4ea; background: #f4f7f9; color: #263b49; }
.admin-body .profile-editor input,.admin-body .token-limit-editor select,.admin-body .token-limit-editor input { border-color: #cfd9e1; background: #fff; color: var(--text); }
.admin-body .soft-badge { background: #e8eef2; color: #455966; }
.admin-body .soft-badge.shared { background: #e2f4e8; color: #23653a; }
.admin-body .record-type-badge { border-color: #bdd1db; background: #eef5f7; color: #28576a; }
.admin-body .user-page-header { border-color: #dce4ea; background: #fff; box-shadow: 0 5px 18px rgba(24,48,65,.045); }
@media (max-width: 1100px) { .admin-body .quick-links { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 900px) { .admin-body .admin-app { grid-template-columns: 78px minmax(0,1fr); }.admin-nav-label { display:none; } }
@media (max-width: 620px) {
    .admin-body .admin-nav { background: rgba(255,255,255,.96); }
    .admin-body .admin-tab.active { box-shadow: inset 0 -3px 0 var(--accent); }
    .admin-body .quick-links { grid-template-columns: 1fr; }
    .admin-body .workspace-header { padding-bottom: 18px; }
    .admin-body .metric { min-height: 100px; padding: 16px; }
    .admin-body .toolbar { padding: 9px; }
}
.legal-editor-layout { display:grid; grid-template-columns:260px minmax(0,1fr); gap:20px; align-items:start; }
.legal-document-list { display:grid; gap:7px; position:sticky; top:92px; }
.legal-document { padding:12px; border:1px solid var(--border); border-radius:10px; display:grid; gap:3px; background:#fff; color:var(--text); text-align:left; cursor:pointer; }
.legal-document small { color:var(--muted); }
.legal-document.active { border-color:#93becd; background:#e7f3f6; box-shadow:inset 3px 0 0 var(--accent); }
.legal-editor { padding:22px; border:1px solid var(--border); border-radius:14px; display:grid; grid-template-columns:minmax(0,1fr) 130px; gap:15px; background:#fff; box-shadow:0 5px 18px rgba(24,48,65,.045); }
.legal-editor-heading { grid-column:1/-1; display:flex; justify-content:space-between; gap:16px; align-items:start; }
.legal-editor-heading h2 { margin:0; }
.legal-editor label { display:grid; gap:6px; color:var(--muted); font-size:.82rem; font-weight:650; }
.legal-editor label:nth-of-type(3),.legal-editor label:nth-of-type(4) { grid-column:1/-1; }
.legal-editor input,.legal-editor textarea { width:100%; padding:10px 12px; border:1px solid #cfd9e1; border-radius:9px; background:#f8fafb; color:var(--text); font:inherit; }
.legal-editor textarea { resize:vertical; line-height:1.55; }
.legal-editor-actions { grid-column:1/-1; display:flex; justify-content:space-between; gap:12px; align-items:center; color:var(--muted); }
@media(max-width:850px){.legal-editor-layout{grid-template-columns:1fr}.legal-document-list{position:static;grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.legal-document-list{grid-template-columns:1fr}.legal-editor{padding:15px;grid-template-columns:1fr}.legal-editor label{grid-column:1!important}.legal-editor-heading,.legal-editor-actions{align-items:stretch;flex-direction:column}.legal-editor-actions .button{width:100%}}
.finance-notice{margin-bottom:18px;padding:13px 15px;border:1px solid #d8c37a;border-radius:11px;display:flex;gap:8px;background:#fff9df;color:#67520d}.finance-notice span{color:#786823}.finance-metrics{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}.finance-grid{display:grid;grid-template-columns:minmax(300px,.75fr) minmax(500px,1.25fr);gap:16px}.finance-panel{margin:0}.finance-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.finance-form label{display:grid;gap:5px;color:var(--muted);font-size:.78rem;font-weight:650}.finance-form input{width:100%;min-height:44px;padding:9px 11px;border:1px solid #cfd9e1;border-radius:9px;background:#f8fafb;color:var(--text)}.finance-form .button{grid-column:1/-1}.finance-table-wrap{max-width:100%;overflow:auto}.finance-table{width:100%;border-collapse:collapse;font-size:.85rem}.finance-table th,.finance-table td{padding:11px 9px;border-bottom:1px solid var(--border);text-align:left;white-space:nowrap}.finance-table th{color:var(--muted);font-size:.72rem;text-transform:uppercase;letter-spacing:.05em}.finance-table code{font-size:.72rem}.finance-empty{text-align:center!important;color:var(--muted)}@media(max-width:1100px){.finance-grid{grid-template-columns:1fr}.finance-metrics{grid-template-columns:repeat(2,1fr)}}@media(max-width:620px){.finance-notice{display:grid}.finance-form{grid-template-columns:1fr}.finance-metrics{grid-template-columns:1fr 1fr}}
