@import url("./tokens.css");
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.875rem;
    line-height: 1.6;
}
button,
input,
select,
textarea {
    font: inherit;
}
a {
    color: inherit;
    text-decoration: none;
}
a:hover {
    color: var(--accent-text);
}
button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: var(--accent);
    color: var(--button-ink);
    border: 1px solid var(--accent);
    border-radius: 0.45rem;
    padding: 0.7rem 1.15rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
button:hover,
.button:hover {
    background: var(--accent-hover);
    color: var(--button-ink);
}
button:disabled {
    opacity: 0.55;
    cursor: wait;
}
button.outline {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}
button.outline:hover {
    background: var(--canvas);
}
.button.secondary {
    background: var(--highlight);
    color: var(--button-ink);
    border-color: var(--highlight);
}
.small {
    font-size: 0.75rem;
    padding: 0.45rem 0.75rem;
}
.sidebar {
    border-right: 1px solid var(--line);
    background: var(--sidebar);
    color: var(--sidebar-ink);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}
.brand {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    color: var(--on-dark);
    font-size: 1.6rem;
    font-weight: 650;
    letter-spacing: -0.07rem;
}
.brand:hover {
    color: var(--on-dark);
}
.brand small {
    max-width: 9rem;
    display: block;
    color: var(--sidebar-muted);
    font-size: 0.64rem;
    font-weight: 400;
    letter-spacing: 0.07rem;
    text-transform: uppercase;
    margin-top: -0.3rem;
}
.brand-mark {
    object-fit: contain;
    flex-shrink: 0;
    background: transparent;
    color: var(--sidebar);
    font-size: 1.75rem;
    font-family: Georgia, serif;
    font-weight: bold;
    border-radius: 0.6rem;
    width: 3rem;
    height: 3rem;
    display: inline-grid;
    place-items: center;
}
.nav-label,
.eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.12rem;
    font-weight: 700;
    color: var(--muted);
}
.nav-label {
    color: var(--sidebar-muted);
    margin: 2.7rem 0.75rem 0.75rem;
}
nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
nav a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.35rem;
    font-size: 0.82rem;
}
nav a span {
    width: 1.2rem;
    font-size: 1.1rem;
}
nav a:hover,
nav a[aria-current] {
    background: var(--sidebar-selected);
    color: var(--on-dark);
}
nav a[aria-current] {
    box-shadow: inset 3px 0 var(--highlight);
}
.workspace-card {
    display: none;
}
.settings-link {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}
main {
    min-width: 0;
}
.topbar {
    height: 4.4rem;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: 1.25rem;
    font-size: 0.63rem;
    letter-spacing: 0.07rem;
    color: var(--muted);
}
.topbar strong {
    color: var(--ink);
    font-weight: 500;
    margin-left: 0.6rem;
    letter-spacing: 0.01rem;
    text-transform: none;
}
.environment {
    border: 1px solid var(--line);
    padding: 0.25rem 0.7rem;
    border-radius: 2rem;
    text-transform: capitalize;
    background: var(--surface);
    letter-spacing: 0.02rem;
}
.local-notice {
    margin: 0;
    padding: 0.55rem 1.25rem;
    background: var(--notice);
    font-size: 0.7rem;
    color: var(--accent-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.status-dot {
    width: 0.35rem;
    height: 0.35rem;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
}
.content {
    padding: 1.6rem 1.25rem;
    max-width: 100rem;
    margin: auto;
    min-height: calc(100vh - 10rem);
}
.page-heading {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-block: 0.4rem 2rem;
}
hgroup p {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
}
h1 {
    font-size: clamp(1.7rem, 2.6vw, 2.5rem);
    font-weight: 540;
    letter-spacing: -0.075rem;
    line-height: 1.25;
    margin: 0.55rem 0 0.65rem;
}
h2 {
    font-size: 0.95rem;
    font-weight: 650;
    margin: 0;
    letter-spacing: -0.015rem;
}
h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.65rem 0 0.3rem;
}
.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.65rem;
}
.stats article {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 0.6rem;
    padding: 1.25rem;
}
.stats article > span {
    font-size: 0.72rem;
    color: var(--muted);
}
.stats strong {
    font-weight: 500;
    font-size: 2.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.35rem;
}
.stats strong small {
    font-size: 1.3rem;
    color: var(--accent-text);
    font-weight: 400;
}
.stats p {
    font-size: 0.64rem;
    color: var(--muted);
    margin: 0.35rem 0 0;
}
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.section-heading {
    min-height: 4.4rem;
    padding: 1.1rem 1.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}
.section-heading > a {
    font-size: 0.7rem;
    color: var(--accent-text);
}
.count {
    background: var(--canvas);
    border: 1px solid var(--line);
    border-radius: 0.3rem;
    font-size: 0.62rem;
    padding: 0.1rem 0.4rem;
    margin-left: 0.5rem;
    color: var(--muted);
}
.table-scroll {
    overflow-x: auto;
}
table {
    border-collapse: collapse;
    width: 100%;
    text-align: left;
    white-space: nowrap;
}
th {
    background: var(--table-head);
    font-size: 0.59rem;
    text-transform: uppercase;
    letter-spacing: 0.055rem;
    font-weight: 600;
    color: var(--muted);
}
th,
td {
    padding: 0.85rem 1.4rem;
    border-bottom: 1px solid var(--line);
}
td {
    font-size: 0.75rem;
    padding-block: 1.1rem;
}
tr:last-child td {
    border-bottom: 0;
}
.client-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.client-name strong {
    font-weight: 600;
}
.avatar,
.provider-icon {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    color: var(--accent-text);
    background: var(--canvas);
    font-size: 0.65rem;
    font-weight: 650;
    flex-shrink: 0;
}
.arrow {
    font-size: 1rem;
    color: var(--muted);
}
.muted {
    color: var(--muted);
}
.pill {
    font-size: 0.59rem;
    padding: 0.22rem 0.5rem;
    border-radius: 0.3rem;
    border: 1px solid var(--line);
    background: var(--canvas);
    color: var(--muted);
    white-space: nowrap;
    font-weight: 500;
}
.pill.pass,
.pill.active {
    background: var(--success-bg);
    color: var(--success);
    border-color: var(--success-line);
}
.pill.review,
.pill.onboarding {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: var(--warning-line);
}
.pill.fail {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger-line);
}
.lower-grid {
    display: grid;
    gap: 1.5rem;
}
.provider-list {
    list-style: none;
    margin: 0;
    padding: 0.3rem 1.4rem;
}
.provider-list li {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
}
.provider-list li:last-child {
    border: 0;
}
.provider-list strong {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
}
.provider-list small {
    display: block;
    font-size: 0.65rem;
    color: var(--muted);
}
.connection-count {
    margin-left: auto;
    font-size: 0.65rem;
    color: var(--muted);
}
.watch-panel {
    background: var(--sidebar);
    color: var(--on-dark);
    padding: 2rem;
    border-radius: 0.65rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.watch-panel .eyebrow {
    color: var(--highlight);
    font-size: 0.58rem;
}
.watch-panel h2 {
    font-size: 1.8rem;
    line-height: 1.25;
    letter-spacing: -0.05rem;
    font-weight: 500;
    margin: 1.2rem 0 1rem;
}
.watch-panel > p:not(.eyebrow) {
    color: var(--sidebar-ink);
    max-width: 24rem;
    font-size: 0.77rem;
    line-height: 1.8;
    margin-bottom: 1.4rem;
}
.watch-art {
    position: absolute;
    font-size: 12rem;
    line-height: 1;
    right: -2rem;
    bottom: -3rem;
    color: var(--sidebar-selected);
    pointer-events: none;
}
.watch-panel .button {
    position: relative;
    z-index: 1;
}
.empty {
    padding: 2.7rem 1.3rem;
    text-align: center;
}
.empty-symbol {
    display: inline-block;
    color: var(--accent-text);
    font-size: 2rem;
}
.empty p {
    margin: 0.5rem auto 1.1rem;
    color: var(--muted);
    max-width: 32rem;
    font-size: 0.78rem;
}
.connection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    gap: 1rem;
    padding: 1.3rem;
}
.connection-card {
    border: 1px solid var(--line);
    border-radius: 0.6rem;
    background: var(--surface);
    padding: 1.3rem;
}
.connection-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.connection-card .eyebrow {
    margin-top: 1.3rem;
}
.connection-card h3 {
    margin-top: 0.3rem;
}
.connection-card > p:not(.eyebrow) {
    color: var(--muted);
    font-size: 0.75rem;
}
dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.7rem 1.3rem;
    font-size: 0.75rem;
}
dt {
    color: var(--muted);
}
dd {
    margin: 0;
    overflow-wrap: anywhere;
}
.connection-card dl {
    grid-template-columns: 1fr;
    gap: 0.2rem;
}
.connection-card dd {
    margin-bottom: 0.5rem;
}
.resource-list {
    list-style: none;
    padding: 0;
    font-size: 0.73rem;
}
.resource-list li {
    padding: 0.65rem 0;
    border-top: 1px solid var(--line);
}
.resource-list small {
    display: block;
    color: var(--muted);
    overflow-wrap: anywhere;
}
.info-note,
.client-notes {
    border-left: 3px solid var(--success-line);
    padding: 0.75rem 1rem;
    margin: 0 0 1.4rem;
    color: var(--muted);
    background: var(--notice);
    font-size: 0.78rem;
}
.client-notes {
    white-space: pre-line;
    overflow-wrap: anywhere;
    line-height: 1.65;
}
menu {
    display: flex;
    gap: 0.6rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.domain-results {
    padding: 1rem 1.4rem;
    border-bottom: 1px solid var(--line);
}
.domain-results > summary {
    cursor: pointer;
    font-size: 0.8rem;
}
.domain-results > summary span {
    float: right;
    color: var(--muted);
    font-size: 0.68rem;
}
.domain-results > ul {
    list-style: none;
    padding: 0;
}
.domain-results li {
    border-top: 1px solid var(--line);
    padding-block: 1rem;
}
.domain-results li header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.8rem;
}
.domain-results li p {
    font-size: 0.75rem;
    color: var(--muted);
}
.evidence {
    font-size: 0.68rem;
    color: var(--accent-text);
}
pre {
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: var(--canvas);
    padding: 1rem;
    color: var(--ink);
}
.settings-panel {
    padding: 1.5rem;
    max-width: 50rem;
}
.settings-panel dl {
    margin-block: 1.5rem;
}
.settings-panel > p {
    color: var(--muted);
    font-size: 0.8rem;
}
body > main > footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.59rem;
    letter-spacing: 0.03rem;
}
dialog {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 1.5rem;
    border-radius: 0.8rem;
    width: min(32rem, calc(100vw - 2rem));
    max-height: calc(100vh - 3rem);
    color: var(--ink);
}
dialog::backdrop {
    background: rgb(0 0 0 / 60%);
    backdrop-filter: blur(3px);
}
dialog header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.3rem;
}
dialog header h2 {
    font-size: 1.25rem;
}
dialog button.close[aria-label] {
    background: transparent;
    color: var(--muted);
    padding: 0.1rem 0.6rem;
    border: 0;
    font-size: 1.5rem;
}
dialog label {
    display: grid;
    gap: 0.35rem;
    font-weight: 550;
    font-size: 0.78rem;
    margin-top: 1rem;
}
input,
textarea,
select {
    padding: 0.65rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 0.35rem;
    color: var(--ink);
    background: var(--surface);
    width: 100%;
}
:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 3px;
}
dialog footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1.5rem;
}
.field-note {
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 0.8rem;
}
.form-error {
    color: var(--danger);
    font-size: 0.8rem;
    background: var(--danger-bg);
    padding: 0.75rem;
    border-radius: 0.3rem;
}
.search-label {
    width: min(100%, 17rem);
}
.search-label input {
    font-size: 0.75rem;
    padding: 0.45rem 0.7rem;
    background: var(--canvas);
}
.search-empty {
    padding: 1rem 1.4rem;
    color: var(--muted);
}
.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--sidebar);
    color: var(--on-dark);
    border-radius: 0.5rem;
    padding: 0.8rem 1.2rem;
    z-index: 5;
    max-width: calc(100vw - 2rem);
    box-shadow: 0 5px 20px rgb(0 0 0 / 15%);
}
[hidden] {
    display: none !important;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}
.login {
    display: grid;
    place-items: center;
    min-height: 100vh;
}
.login main {
    max-width: 31rem;
    padding: 3rem;
}
.login h1 {
    font-size: 3rem;
}
.login p {
    color: var(--muted);
}
.login .button {
    margin-block: 1.5rem;
}
.login small {
    display: block;
    color: var(--muted);
}
@media (min-width: 800px) {
    body:not(.login) {
        display: grid;
        grid-template-columns: 14.25rem minmax(0, 1fr);
    }
    .sidebar {
        height: 100vh;
        position: sticky;
        top: 0;
        padding: 2rem 1.2rem 1.2rem;
    }
    .brand {
        padding-inline: 0.6rem;
    }
    nav {
        flex-direction: column;
        flex-wrap: nowrap;
    }
    .workspace-card {
        display: grid;
        grid-template-columns: 2rem 1fr;
        column-gap: 0.65rem;
        margin-top: auto;
        border: 1px solid var(--sidebar-selected);
        border-radius: 0.45rem;
        padding: 0.9rem;
    }
    .workspace-avatar {
        grid-row: span 2;
        display: grid;
        place-items: center;
        border: 1px solid var(--sidebar-muted);
        border-radius: 0.3rem;
        font-size: 0.65rem;
    }
    .workspace-card strong {
        font-size: 0.7rem;
        font-weight: 500;
    }
    .workspace-card small {
        font-size: 0.6rem;
        color: var(--sidebar-muted);
        text-transform: capitalize;
    }
    .settings-link {
        font-size: 0.7rem;
        padding: 0.7rem 0.5rem;
    }
    .topbar {
        padding-inline: 2.3rem;
    }
    .local-notice {
        padding-inline: 2.3rem;
    }
    .content {
        padding: 2rem 2.3rem;
    }
    body > main > footer {
        padding-inline: 2.3rem;
    }
    .stats {
        grid-template-columns: repeat(4, 1fr);
    }
    .lower-grid {
        grid-template-columns: 1.15fr 1fr;
    }
}
@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto;
    }
}

/* The company is fixed by server configuration before the first paint. */
.topbar .company-name {
    color: var(--accent-text);
}
.environment[data-environment="production"] {
    border-color: var(--accent-text);
    color: var(--accent-text);
    font-weight: 700;
}
:root[data-organization="themadhatters"] .watch-panel {
    border: 1px solid var(--line);
    background-image:
        radial-gradient(circle at 88% 24%, #5bc8e8 0 2px, transparent 3px),
        radial-gradient(circle at 74% 63%, #5bc8e8 0 1px, transparent 2px);
}
:root[data-organization="yammm"] .topbar {
    box-shadow: inset 0 3px var(--highlight);
}
.login .brand-mark {
    width: 4.5rem;
    height: 4.5rem;
}
.login main {
    overflow-wrap: anywhere;
}
