:root {
    --ink: #27323e;
    --muted: #647181;
    --line: #bdc4cc;
    --panel: #f3f4f5;
    --blue: #a9c5e7;
    --blue2: #dce9f7;
    --bar: #8c9198;
    --link: #294d7a;
    --red: #a94a4a;
    --green: #427a55
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: #fff;
    color: var(--ink);
    font: 14px/1.28 Arial, Helvetica, sans-serif
}

a {
    color: var(--link);
    text-decoration: underline;
    cursor: pointer
}

a:hover {
    color: #b33
}

header {
    height: 128px;
    padding: 8px clamp(16px, 3vw, 40px);
    background: #cecece;
    border-bottom: 1px solid #b4b4b4;
    display: flex;
    align-items: center;
    gap: 22px;
    overflow: hidden;
    position: relative;
}

a.brand {
    position: absolute;
    left: 0;
    top: 0;
}

form {
    display: flex;
    width: min(500px, 100%);
    margin-left: auto
}

input,
button {
    height: 30px;
    border: 1px solid #8a9096;
    background: #fff;
    color: #20262c;
    padding: 4px 8px;
    font: inherit
}

input {
    border-radius: 2px 0 0 2px;
    width: 100%
}

button {
    border-radius: 0 2px 2px 0;
    font-weight: bold
}

.menu {
    display: none
}

.layout {
    max-width: 2000px;
    margin: auto;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr)
}

.layout>aside {
    padding: 18px 13px;
    min-height: calc(100vh - 65px);
    border-right: 1px solid #d4d7da;
    background: #f6f6f6
}

.layout aside nav {
    display: grid;
    gap: 3px;
    margin-bottom: 18px
}

.layout aside a {
    display: block;
    padding: 6px 8px;
    color: #4a5662;
    text-decoration: none;
    border-bottom: 1px solid #e1e3e5
}

.layout aside a:hover {
    background: #dce9f7;
    text-decoration: underline
}

.layout aside small {
    display: block;
    color: #6b737b;
    font-weight: bold;
    padding: 4px 8px;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: .07em
}

.layout aside .nav-category {
    margin-top: 10px;
    background: #a7a7a7;
    color: #fff
}

main {
    min-width: 0;
    padding: 30px clamp(20px, 4vw, 50px) 60px
}

.loading,
.empty {
    padding: 25px;
    border: 1px solid var(--line);
    background: #f3f3f3;
    color: var(--muted)
}

h1 {
    font-size: 27px;
    margin: 0 0 5px;
    color: #26313c
}

h2 {
    font-size: 16px;
    margin: 25px 0 8px
}

.welcome {
    border-bottom: 1px solid #d5d9dd;
    padding-bottom: 15px
}

.welcome p {
    max-width: 760px;
    margin: 6px 0;
    color: var(--muted)
}

.eyebrow {
    font-size: 11px;
    font-weight: bold;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #647381;
    margin: 0 0 5px
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 16px 0 24px
}

.stat {
    padding: 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    text-align: center
}

.stat b {
    display: block;
    font-size: 24px;
    color: #334a62
}

.stat span {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted)
}

.forum-section {
    margin: 20px 0
}

.section-bar {
    background: var(--bar);
    border: 1px solid #868b91;
    color: #fff;
    padding: 6px 9px;
    font-weight: bold
}

.section-bar span {
    padding-right: 7px
}

.forum-table,
.topic-table {
    border: 1px solid var(--line);
    border-top: 0
}

.table-head,
.topic-head {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) 110px 110px minmax(230px, 1.1fr);
    background: var(--blue);
    color: #5e6873;
    font-size: 12px;
    font-weight: bold
}

.table-head>*,
.topic-head>* {
    padding: 6px 8px;
    border-left: 1px solid #bfd0e5
}

.forum-row,
.topic-row {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) 110px 110px minmax(230px, 1.1fr);
    background: #f4f4f4;
    border-top: 1px solid #ddd
}

.forum-row:nth-child(odd),
.topic-row:nth-child(odd) {
    background: #ececec
}

.forum-info,
.topic-info {
    display: flex;
    gap: 10px;
    padding: 10px
}

.forum-icon,
.topic-icon {
    flex: 0 0 32px;
    height: 32px;
    border: 1px solid #b5bac1;
    background: #dde1e5;
    color: #77828e;
    display: grid;
    place-items: center;
    font-size: 18px
}

.topic-icon {
    border-radius: 3px;
    color: #8b99a7;
    font-size: 20px
}

.forum-title,
.topic-title {
    font-size: 15px;
    font-weight: bold
}

.forum-info p,
.topic-info p {
    margin: 2px 0 0;
    color: #56616d;
    font-size: 12px
}

.count,
.replies,
.starter,
.last-post {
    border-left: 1px solid #d5d5d5;
    padding: 9px 8px
}

.count,
.replies {
    text-align: center
}

.count b,
.replies b {
    display: block;
    font-size: 16px
}

.count small,
.replies small {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase
}

.last-post {
    font-size: 12px;
    display: grid;
    align-content: center;
    gap: 1px
}

.last-post time {
    font-weight: bold
}

.last-post span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.loss,
.saved {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    border-radius: 2px;
    padding: 2px 4px;
    text-decoration: none
}

.loss {
    background: #f5d7d7;
    color: #8d3737
}

.saved {
    background: #dbeadf;
    color: var(--green)
}

.crumbs {
    margin-bottom: 18px;
    color: #637181
}

.crumbs span {
    padding: 0 5px
}

.forum-hero,
.topic-hero {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 3px solid var(--blue);
    padding: 0 0 14px;
    margin-bottom: 15px
}

.forum-hero p,
.topic-hero p,
.subtitle {
    color: #5c6875;
    margin: 5px 0
}

.hero-stats {
    display: grid;
    grid-template-columns: auto auto;
    gap: 2px 8px;
    align-content: center;
    text-align: right
}

.hero-stats b {
    font-size: 18px
}

.hero-stats span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase
}

.page-note {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px
}

.topic-row {
    grid-template-columns: minmax(300px, 1fr) 180px 90px minmax(190px, .8fr)
}

.topic-head {
    grid-template-columns: minmax(300px, 1fr) 180px 90px minmax(190px, .8fr)
}

.starter {
    display: flex;
    align-items: center
}

.archive-state {
    min-width: 190px;
    border: 1px solid #b5cbb9;
    background: #edf7ef;
    padding: 9px 11px;
    display: grid;
    align-content: center;
    gap: 2px;
    font-size: 12px;
    color: #426049
}

.archive-state.warn {
    border-color: #dab1b1;
    background: #fff1f1;
    color: #8c3f3f
}

.archive-state b {
    font-size: 13px
}

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 13px 0;
    padding: 8px;
    background: #f1f1f1;
    border: 1px solid #d1d1d1
}

.pager a,
.pager span {
    padding: 4px 7px;
    border: 1px solid #bac0c6;
    background: #fff;
    text-decoration: none
}

.pager .active-page {
    background: #7798bd;
    color: #fff;
    border-color: #6788ad;
    font-weight: bold
}

.bottom {
    margin-top: 20px
}

.post {
    display: grid;
    grid-template-columns: 185px minmax(0, 1fr);
    border: 1px solid #aeb5bd;
    margin: 12px 0;
    background: #fff
}

.post>.author {
    min-height: 135px;
    padding: 12px;
    border: 0;
    border-right: 1px solid #c8cdd2;
    background: #eaedf0
}

.author-name {
    display: block;
    font-weight: bold;
    font-size: 15px;
    overflow-wrap: anywhere
}

.author span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #596775
}

.post section>header {
    height: auto;
    padding: 7px 10px;
    border-bottom: 1px solid #c8cdd2;
    background: #a6a6a6;
    color: #fff;
    display: flex;
    justify-content: space-between
}

.post section>header a {
    color: #fff
}

.message {
    padding: 16px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.45;
    min-height: 95px
}

.media {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 0 16px 12px
}

.media a {
    padding: 3px 5px;
    background: #edf3f8;
    border: 1px solid #c2d1df;
    font-size: 12px
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(330px, 1.4fr);
    gap: 15px
}

.profile-card {
    padding: 16px;
    border: 1px solid var(--line);
    background: #f3f3f3
}

.profile-card h2 {
    margin: 0 0 12px
}

.profile-card dl {
    margin: 0
}

.profile-card dl>div {
    border-top: 1px solid #d3d6d9;
    padding: 6px 0
}

.profile-card dt {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase
}

.profile-card dd {
    margin: 1px 0
}

.cards {
    display: grid;
    gap: 5px
}

.card {
    display: block;
    border: 1px solid #c9cdd1;
    padding: 8px;
    background: #fff
}

.card small {
    display: block;
    color: var(--muted);
    margin-top: 3px
}

code {
    font-size: 12px
}

@media(max-width:820px) {
    header {
        height: 25vw;
        padding: 6px 13px
    }

    svg.logoSVG {
        width: 100vw;
        height: auto;
    }

    #cp1 {
        display: none;
    }

    aside.author {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .brand small,
    header form {
        display: none
    }

    .menu {
        display: block;
        margin-left: auto
    }

    .layout {
        display: block
    }

    .layout>aside {
        display: none;
        position: fixed;
        z-index: 3;
        top: 56px;
        bottom: 0;
        width: min(84vw, 310px);
        overflow: auto;
        box-shadow: 4px 0 20px #0003
    }

    .layout>aside.open {
        display: block
    }

    main {
        padding: 18px 10px 35px
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        margin: 13px 0
    }

    .table-head,
    .topic-head {
        display: none
    }

    .forum-table,
    .topic-table {
        border: 0
    }

    .forum-row,
    .topic-row {
        display: block;
        margin: 8px 0;
        border: 1px solid var(--line)
    }

    .forum-info,
    .topic-info {
        padding: 10px
    }

    .count,
    .replies,
    .starter,
    .last-post {
        border: 0;
        border-top: 1px solid #d3d3d3;
        padding: 7px 10px
    }

    .forum-row .count,
    .topic-row .replies {
        display: inline-block;
        width: 34%;
        text-align: left
    }

    .forum-row .count b,
    .topic-row .replies b {
        display: inline;
        margin-right: 5px
    }

    .forum-row .count small,
    .topic-row .replies small {
        display: inline
    }

    .starter {
        padding: 7px 10px
    }

    .forum-hero,
    .topic-hero {
        display: block
    }

    .hero-stats {
        display: flex;
        gap: 7px;
        text-align: left;
        margin-top: 10px
    }

    .archive-state {
        margin-top: 12px;
        min-width: 0
    }

    .post {
        grid-template-columns: 1fr
    }

    .post>.author {
        min-height: 0;
        border: 0;
        border-bottom: 1px solid #c8cdd2;
        padding: 9px 12px
    }

    .author span {
        display: inline;
        margin: 0 0 0 9px
    }

    .message {
        padding: 13px
    }

    .profile-grid {
        grid-template-columns: 1fr
    }

    .section-bar {
        margin-top: 12px
    }
}