:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --ink: #162033;
    --muted: #5f6b7e;
    --line: #dce3ef;
    --brand: #174ea6;
    --brand-ink: #ffffff;
    --danger: #a52222;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
}

a {
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
}

.topbar {
    align-items: center;
    background: #101827;
    color: #fff;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 28px;
    position: sticky;
    top: 0;
    z-index: 9998;
}

.brand {
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.topbar nav {
    align-items: center;
    display: flex;
    gap: 14px;
    margin-left: auto;
}

.topbar nav a {
    align-items: center;
    color: #dfe7f6;
    display: inline-flex;
    min-height: 34px;
}

.menu-toggle {
    display: none;
}

.pin-network-nav {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    line-height: 1;
}

.pin-network-nav .st-network-command-widget,
.pin-network-nav .st-network-command,
.pin-network-nav [id^="st-network-command-"] {
    flex: 0 0 auto;
}

.shell {
    margin: 0 auto;
    max-width: 1120px;
    padding: 32px 18px 56px;
}

.hero,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    margin-bottom: 18px;
    padding: 24px;
}

.hero h1,
.panel h1,
.panel h2 {
    margin-top: 0;
}

.eyebrow,
.pill {
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.pill {
    background: #eaf1ff;
    border-radius: 999px;
    display: inline-block;
    margin: 4px 4px 0 0;
    padding: 6px 10px;
}

.grid,
.stats {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.stats article {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.stats strong {
    display: block;
    font-size: 30px;
}

.stats span,
.panel p,
td span {
    color: var(--muted);
}

.auth-panel {
    margin: 8vh auto 0;
    max-width: 460px;
}

.form {
    display: grid;
    gap: 14px;
}

.form.compact {
    align-items: end;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.form-row {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.social-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

label {
    color: var(--muted);
    display: grid;
    font-size: 14px;
    font-weight: 700;
    gap: 6px;
}

.label-with-help {
    align-items: center;
    display: inline-flex;
    gap: 7px;
}

input,
select,
textarea {
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    font: inherit;
    padding: 10px 12px;
    width: 100%;
}

button,
.button {
    background: var(--brand);
    border: 0;
    border-radius: 6px;
    color: var(--brand-ink);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 900;
    justify-content: center;
    padding: 11px 14px;
}

.help-dot {
    align-items: center;
    background: #eaf1ff;
    border: 1px solid #bfd2f2;
    border-radius: 50%;
    color: var(--brand);
    display: inline-flex;
    font-size: 12px;
    height: 22px;
    padding: 0;
    width: 22px;
}

.notice {
    background: #eaf7ef;
    border: 1px solid #b7dfc2;
    border-radius: 6px;
    color: #14532d;
    padding: 12px 14px;
}

.notice.bad {
    background: #fff1f1;
    border-color: #f0b4b4;
    color: var(--danger);
}

.modal-backdrop {
    align-items: center;
    background: rgba(16, 24, 39, 0.54);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 18px;
    position: fixed;
    z-index: 80;
}

.modal-backdrop[hidden] {
    display: none;
}

.modal-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
    max-width: 520px;
    padding: 26px;
    position: relative;
    width: 100%;
}

.modal-panel h2 {
    margin: 0 0 10px;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.modal-close {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    height: 34px;
    padding: 0;
    position: absolute;
    right: 14px;
    top: 14px;
    width: 34px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    min-width: 820px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

.inline-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inline-form input,
.inline-form select {
    max-width: 180px;
}

button.secondary,
.button.secondary {
    background: #fff;
    border: 1px solid var(--line);
    color: var(--brand);
}

.filter-panel {
    box-shadow: none;
}

.settings-head {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 220px;
    margin-bottom: 22px;
}

.strength-card {
    background: #f8fbff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.strength-card strong {
    display: block;
    font-size: 34px;
    margin: 8px 0;
}

.strength-meter {
    background: #e6edf8;
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
}

.strength-meter span {
    background: linear-gradient(90deg, #174ea6, #2e8a57);
    display: block;
    height: 100%;
}

.next-steps {
    border-top: 1px solid var(--line);
    margin-top: 22px;
    padding-top: 18px;
}

.layout-two {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 320px;
}

.profile-directory {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.directory-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    border-top: 5px solid var(--accent, var(--brand));
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    display: grid;
    gap: 12px;
    overflow-wrap: anywhere;
    padding: 22px;
}

.directory-card h2 {
    font-size: 20px;
    margin: 0;
}

.post-card,
.profile-hero,
.comment {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    margin-bottom: 18px;
    padding: 22px;
}

.profile-hero {
    border-top: 5px solid var(--accent, var(--brand));
}

.post-card.full {
    font-size: 18px;
}

.post-author {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.post-author small {
    color: var(--muted);
    display: block;
}

.avatar {
    align-items: center;
    background: var(--accent, var(--brand));
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-weight: 900;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.post-image {
    border-radius: 8px;
    display: block;
    max-height: 420px;
    max-width: 100%;
    object-fit: cover;
}

.post-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.post-actions form {
    display: inline-flex;
    gap: 8px;
}

.profile-list,
.link-list,
.mini-feed {
    display: grid;
    gap: 10px;
}

.profile-list a,
.link-list a,
.mini-feed a {
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    overflow-wrap: anywhere;
    padding: 10px;
}

.profile-list span,
.mini-feed span {
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 10px;
    justify-content: center;
    padding: 0 18px 34px;
}

.site-footer a {
    color: var(--muted);
}

@media (max-width: 720px) {
    .topbar {
        align-items: center;
        flex-direction: row;
        gap: 10px;
        padding: 10px 14px;
    }

    .brand {
        flex: 1 1 auto;
        min-width: 0;
    }

    .menu-toggle {
        align-items: center;
        background: #fff;
        border: 1px solid rgba(255, 255, 255, .2);
        border-radius: 8px;
        color: #101827;
        cursor: pointer;
        display: inline-flex;
        flex: 0 0 auto;
        font: inherit;
        font-weight: 800;
        justify-content: center;
        min-height: 36px;
        padding: 8px 12px;
    }

    .topbar nav {
        display: inline-flex;
        flex: 0 0 auto;
        gap: 8px;
        margin-left: 0;
        position: relative;
    }

    .topbar nav > a {
        display: none;
    }

    .topbar nav.open {
        align-items: stretch;
        background: #101827;
        border: 1px solid rgba(255, 255, 255, .16);
        border-radius: 10px;
        box-shadow: 0 18px 44px rgba(15, 23, 42, .22);
        display: grid;
        gap: 6px;
        grid-template-columns: 1fr;
        padding: 10px;
        position: absolute;
        right: 54px;
        top: calc(100% + 10px);
        width: min(240px, calc(100vw - 28px));
        z-index: 20;
    }

    .topbar nav.open > a {
        align-items: center;
        border: 1px solid rgba(255, 255, 255, .08);
        border-radius: 8px;
        color: #fff;
        display: flex;
        min-height: 38px;
        padding: 8px 10px;
    }

    .layout-two {
        grid-template-columns: 1fr;
    }

    .settings-head {
        grid-template-columns: 1fr;
    }
}
