:root {
    color-scheme: light;
    --paper: #f4f5f0;
    --card: #fff;
    --ink: #182e31;
    --muted: #667875;
    --line: #dce3dd;
    --green: #215e51;
    --lime: #ddedbf;
    --orange: #ae592f;
    --radius: 16px;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none
}

* {
    box-sizing: border-box
}

body {
    margin: 0
}

button,
input,
select,
textarea {
    font: inherit
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent
}

a {
    color: inherit;
    text-decoration: none
}

button {
    cursor: pointer;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    border-radius: 9px;
    padding: 11px 15px;
    min-height: 42px
}

button:hover {
    border-color: var(--green);
    background: #f3f7f1
}

button:disabled {
    opacity: .5;
    cursor: wait
}

button.primary {
    background: var(--green);
    color: white;
    border-color: var(--green)
}

button.primary:hover {
    background: #164d42
}

button.small {
    padding: 7px 11px;
    font-size: 13px;
    min-height: 34px
}

.topbar {
    height: 85px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    background: var(--paper)
}

.brand {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1.5px;
    display: flex;
    gap: 12px;
    align-items: center
}

.mark {
    display: grid;
    place-items: center;
    border: 2px solid var(--green);
    border-left-style: dotted;
    border-radius: 50%;
    height: 35px;
    width: 35px;
    color: var(--green);
    font-size: 27px
}

.brand-sub {
    font-size: 10px;
    letter-spacing: 2px;
    border-left: 1px solid var(--line);
    padding-left: 14px;
    font-weight: 500
}

.avatar {
    background: var(--lime);
    border: 0;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    padding: 0;
    font-weight: 700
}

.layout {
    max-width: 1440px;
    margin: auto;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 42px;
    padding: 36px 5% 80px
}

.sidebar {
    padding-top: 8px
}

.eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.7px;
    color: var(--muted);
    margin-bottom: 20px
}

nav {
    display: flex;
    flex-direction: column;
    gap: 7px
}

nav a {
    padding: 12px 14px;
    border-radius: 9px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px
}

nav a.active {
    background: var(--green);
    color: white
}

nav a:hover:not(.active) {
    background: #e7ece4
}

.nav-icon {
    width: 18px;
    font-size: 18px
}

.side-note {
    border-top: 1px solid var(--line);
    margin-top: 36px;
    padding-top: 24px;
    font-size: 12px
}

.side-note p {
    color: var(--muted);
    line-height: 1.8;
    margin-top: 12px
}

.dot {
    height: 6px;
    width: 6px;
    border-radius: 50%;
    display: inline-block;
    background: var(--green);
    margin-right: 4px
}

h1 {
    font-size: 36px;
    line-height: 1.15;
    letter-spacing: -1.2px;
    margin: 0 0 14px
}

h2 {
    font-size: 21px;
    line-height: 1.35;
    margin: 0
}

h3 {
    font-size: 16px;
    line-height: 1.4;
    margin: 0 0 8px
}

p {
    line-height: 1.65
}

main {
    min-width: 0
}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #eaf0e1;
    margin-bottom: 27px
}

.hero p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
    max-width: 480px
}

.hero .eyebrow {
    color: var(--green);
    margin-bottom: 14px
}

.hero button {
    white-space: nowrap
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px
}

.toolbar h2 {
    font-size: 19px
}

.search {
    display: flex;
    gap: 8px;
    width: min(400px, 100%)
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--card);
    color: var(--ink);
    padding: 12px;
    outline: none
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 2px #215e511a
}

textarea {
    resize: vertical;
    min-height: 120px
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 16px
}

label input,
label select,
label textarea {
    margin-top: 7px;
    font-weight: 400
}

.fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.6;
    font-weight: 400
}

.check input {
    width: 18px;
    flex-shrink: 0;
    margin: 4px 0 0;
    accent-color: var(--green)
}

.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px
}

.chip {
    font-size: 12px;
    border-radius: 30px;
    padding: 8px 13px;
    min-height: 34px;
    background: transparent
}

.chip.selected {
    background: var(--ink);
    color: white;
    border-color: var(--ink)
}

.cards {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 23px 26px
}

.card.link:hover {
    border-color: #8cae9a;
    box-shadow: 0 3px 10px #142c2610
}

.card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px
}

.meta {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center
}

.pill {
    display: inline-block;
    border-radius: 5px;
    padding: 4px 7px;
    background: #eff3ee;
    font-size: 11px;
    color: var(--green)
}

.pill.good {
    background: var(--lime)
}

.pill.warm {
    background: #f7e9dc;
    color: var(--orange)
}

.excerpt {
    font-size: 14px;
    color: var(--muted);
    margin: 10px 0 17px;
    line-height: 1.6
}

.card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px
}

.person {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted)
}

.mini-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #eff1e9;
    color: var(--green);
    font-size: 11px
}

.back {
    display: inline-block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px
}

.page-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin: 4px 0 24px
}

.page-head h1 {
    font-size: 29px;
    margin-bottom: 0
}

.body-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 15px;
    line-height: 1.8
}

.note {
    font-size: 13px;
    line-height: 1.7;
    color: var(--muted);
    background: #edf1e8;
    padding: 14px 16px;
    border-radius: 10px;
    margin: 16px 0
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 48px 24px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    line-height: 1.7
}

.empty h3 {
    color: var(--ink);
    font-size: 19px
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 16px
}

.section-title {
    font-size: 17px;
    margin: 26px 0 16px
}

.accepted {
    border-color: #9db877;
    background: #f8fbf2
}

.muted {
    color: var(--muted);
    font-size: 13px
}

.chat {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0
}

.bubble {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    max-width: 88%;
    padding: 14px 18px;
    align-self: flex-start
}

.bubble.ENGINEER {
    background: #eaf1e4;
    align-self: flex-end
}

.bubble.ADMIN {
    background: #eef1f5
}

.bubble p {
    margin: 7px 0 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 14px
}

.bubble .meta {
    font-size: 11px
}

.chat-form {
    position: sticky;
    bottom: 12px;
    padding: 16px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: flex;
    gap: 10px;
    align-items: flex-end
}

.chat-form textarea {
    min-height: 64px
}

.chat-form label {
    flex: 1;
    margin: 0
}

.chat-form button {
    flex-shrink: 0
}

.status-line {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin: 16px 0
}

.status-step {
    font-size: 11px;
    padding: 7px;
    border-bottom: 2px solid var(--line);
    color: var(--muted)
}

.status-step.current {
    border-color: var(--green);
    color: var(--green);
    font-weight: 700
}

dialog {
    border: 1px solid var(--line);
    border-radius: 18px;
    width: min(620px, calc(100% - 24px));
    padding: 26px;
    max-height: 90vh;
    color: var(--ink);
    background: var(--paper)
}

dialog::backdrop {
    background: #122e2855;
    backdrop-filter: blur(3px)
}

.modal-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px
}

.icon-button {
    font-size: 24px;
    line-height: 24px;
    border: 0;
    padding: 4px 10px
}

.error {
    color: #a13d2e;
    background: #fae9e3;
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    margin-bottom: 14px
}

.error:empty {
    display: none
}

#toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ink);
    color: white;
    max-width: 90%;
    border-radius: 10px;
    padding: 14px 20px;
    z-index: 10;
    font-size: 14px
}

#demo:not(:empty) {
    background: #e8d6b5;
    color: #52452c;
    padding: 8px 5%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px
}

#demo select {
    width: auto;
    font-size: 12px;
    padding: 5px 9px;
    background: #f9f2e5
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px
}

td,
th {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid var(--line)
}

.overflow {
    overflow: auto
}

.count {
    background: #fff3;
    color: inherit;
    border-radius: 20px;
    padding: 1px 6px;
    margin-left: auto
}

.load-more {
    margin: 20px auto;
    display: block
}

.auth-card {
    max-width: 550px;
    margin: 60px auto
}

.auth-card h1 {
    font-size: 28px
}

.notice-unread {
    border-left: 3px solid var(--green)
}

:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px
}

@media(max-width:900px) {
    .layout {
        grid-template-columns: 180px minmax(0, 1fr);
        gap: 22px;
        padding-left: 3%;
        padding-right: 3%
    }

    .hero {
        padding: 24px;
        display: block
    }

    .hero button {
        margin-top: 18px
    }

    h1 {
        font-size: 29px
    }

    .toolbar {
        align-items: flex-start;
        flex-direction: column
    }

    .search {
        width: 100%
    }
}

@media(max-width:640px) {
    .topbar {
        height: 65px;
        padding: 0 18px
    }

    .brand {
        font-size: 20px;
        gap: 8px
    }

    .brand-sub {
        font-size: 8px;
        padding-left: 8px
    }

    .layout {
        display: block;
        padding: 18px 14px 105px
    }

    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--paper);
        border-top: 1px solid var(--line);
        z-index: 5;
        padding: 6px 6px max(6px, env(safe-area-inset-bottom))
    }

    .sidebar>.eyebrow,
    .side-note {
        display: none
    }

    nav {
        flex-direction: row;
        justify-content: space-around;
        gap: 0;
        overflow-x: auto
    }

    nav a {
        font-size: 9px;
        padding: 6px 7px;
        flex-direction: column;
        gap: 4px;
        min-width: 50px
    }

    nav .count {
        display: none
    }

    .nav-icon {
        font-size: 20px;
        text-align: center
    }

    .hero {
        padding: 23px 20px;
        margin-bottom: 22px;
        border-radius: 14px
    }

    .hero h1 {
        font-size: 28px
    }

    .hero p {
        font-size: 13px
    }

    .card {
        padding: 19px 18px
    }

    .fields {
        grid-template-columns: 1fr
    }

    .page-head {
        align-items: flex-start
    }

    .page-head h1 {
        font-size: 25px
    }

    .page-head button {
        font-size: 12px;
        padding: 9px
    }

    .card-head {
        align-items: flex-start
    }

    .chat-form {
        bottom: 77px;
        padding: 10px;
        gap: 8px
    }

    .chat-form button {
        padding: 12px
    }

    .bubble {
        max-width: 96%
    }

    dialog {
        padding: 20px
    }

    .card-foot {
        align-items: flex-start
    }

    .status-step {
        font-size: 10px
    }

    #toast {
        bottom: 85px
    }

    .body-text {
        font-size: 14px
    }

    .search button {
        padding: 10px
    }

    .hero .eyebrow {
        font-size: 9px
    }

    .auth-card {
        margin: 20px auto
    }
}

@media(prefers-reduced-motion:no-preference) {

    .card,
    button {
        transition: border-color .15s, background .15s
    }
}

.resource-body {
    max-height: 65vh;
    overflow: auto;
    margin: 22px 0;
    padding: 16px;
    background: var(--paper);
    border-radius: 12px;
    overflow-wrap: anywhere
}

.toolbar label {
    flex: 1;
    min-width: 180px
}

.toolbar {
    flex-wrap: wrap
}

.professional-caption {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 3px;
    max-width: 260px;
    overflow-wrap: anywhere
}

.topic-link {
    display: block;
    color: inherit;
    text-decoration: none
}

.topic-link:hover h3 {
    text-decoration: underline
}

.member-avatar {
    width: 52px;
    height: 52px;
    background: var(--lime);
    color: var(--green);
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 700
}

.member-avatar.large {
    width: 76px;
    height: 76px;
    font-size: 34px
}

.profile-card {
    display: flex;
    gap: 24px;
    align-items: flex-start
}

.profile-card>div:last-child {
    min-width: 0;
    flex: 1
}

.profile-headline {
    font-size: 18px
}

.access-note {
    border: 1px solid var(--line);
    background: #edf2e5;
    border-radius: 12px;
    padding: 14px 18px;
    margin: 16px 0
}

.access-note p {
    margin: 5px 0 12px
}

.access-note button {
    margin: 0 8px 4px 0
}

.person {
    text-decoration: none;
    color: inherit
}

@media(max-width:640px) {
    .profile-card {
        display: block
    }

    .profile-card .member-avatar {
        margin-bottom: 16px
    }
}
