:root {
    --ink: #171717;
    --paper: #fffaf0;
    --white: #ffffff;
    --yellow: #ffd84d;
    --coral: #ff6b72;
    --turquoise: #43c9c2;
    --purple: #9a7cff;
    --mint: #a8e6bd;
    --blue: #63bde8;
    --muted: #6b675f;
    --line: 2px solid var(--ink);
    --line-heavy: 3px solid var(--ink);
    --shadow: 5px 5px 0 var(--ink);
    --shadow-small: 3px 3px 0 var(--ink);
    --content: 1240px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--paper);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

body::before {
    content: "";
    display: block;
    height: 7px;
    background: var(--yellow);
    border-bottom: var(--line-heavy);
}

img,
svg {
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

a:hover {
    text-decoration-style: wavy;
}

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
    letter-spacing: 0;
}

button,
summary,
select {
    cursor: pointer;
}

:focus-visible {
    outline: 4px solid #1769ff;
    outline-offset: 3px;
}

::selection {
    background: var(--purple);
    color: var(--ink);
}

.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;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    border: var(--line-heavy);
    background: var(--yellow);
    box-shadow: var(--shadow-small);
    transform: translateY(-180%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: var(--line-heavy);
    background: var(--white);
}

.header-inner {
    display: flex;
    min-height: 72px;
    max-width: var(--content);
    margin: 0 auto;
    padding: 10px 22px;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 1.25rem;
    font-weight: 900;
    text-decoration: none;
}

.brand:hover {
    text-decoration: none;
    transform: rotate(-1deg);
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: var(--line-heavy);
    border-radius: 5px;
    background: var(--coral);
    box-shadow: var(--shadow-small);
    line-height: 1;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 5px;
}

.main-navigation a {
    padding: 8px 9px;
    font-size: .93rem;
    font-weight: 800;
    text-decoration: none;
}

.main-navigation .nav-mobile-only {
    display: none;
}

.main-navigation a:hover {
    background: #f1eee5;
    text-decoration: none;
}

.main-navigation .nav-primary {
    border: var(--line);
    border-radius: 4px;
    background: var(--yellow);
    box-shadow: 2px 2px 0 var(--ink);
}

.header-actions {
    display: flex;
    margin-left: auto;
    align-items: center;
    gap: 9px;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: var(--line);
    border-radius: 4px;
    background: var(--yellow);
    box-shadow: var(--shadow-small);
    font-size: 1.25rem;
    font-weight: 900;
}

.icon-link {
    position: relative;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: var(--line);
    border-radius: 4px;
    background: var(--white);
    box-shadow: 2px 2px 0 var(--ink);
    font-weight: 900;
    text-decoration: none;
}

.notification-count {
    position: absolute;
    top: -9px;
    right: -9px;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--coral);
    font-size: .7rem;
    line-height: 18px;
    text-align: center;
}

.language-switcher {
    display: flex;
    overflow: visible;
    border: var(--line);
    border-radius: 4px;
    background: var(--white);
}

.language-switcher a {
    padding: 5px 7px;
    font-size: .75rem;
    font-weight: 900;
    text-decoration: none;
}

.language-switcher a + a {
    border-left: var(--line);
}

.language-switcher a.active {
    background: var(--turquoise);
}

.user-menu {
    position: relative;
}

.user-menu summary {
    display: flex;
    max-width: 170px;
    align-items: center;
    gap: 7px;
    list-style: none;
    font-weight: 800;
}

.user-menu summary::-webkit-details-marker {
    display: none;
}

.user-menu summary span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-popover {
    position: absolute;
    top: calc(100% + 13px);
    right: 0;
    display: grid;
    min-width: 190px;
    border: var(--line-heavy);
    border-radius: 4px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.user-menu-popover a,
.user-menu-popover .link-button {
    display: block;
    width: 100%;
    padding: 10px 13px;
    border: 0;
    border-bottom: var(--line);
    background: transparent;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
}

.user-menu-popover form:last-child .link-button {
    border-bottom: 0;
}

.user-menu-popover a:hover,
.user-menu-popover .link-button:hover {
    background: var(--yellow);
}

.page-shell {
    width: min(100% - 36px, var(--content));
    min-height: calc(100vh - 260px);
    margin: 0 auto;
    padding: 42px 0 70px;
}

.page-shell-narrow {
    max-width: 780px;
}

.page-shell-wide {
    max-width: 1400px;
}

.page-header {
    display: flex;
    margin-bottom: 28px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
}

.page-header-copy {
    max-width: 780px;
}

.eyebrow {
    display: inline-block;
    margin: 0 0 7px;
    padding: 4px 9px;
    border: var(--line);
    border-radius: 999px;
    background: var(--turquoise);
    font-size: .74rem;
    font-weight: 900;
    text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
    overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4 {
    margin-top: 0;
    font-family: "Arial Black", Arial, sans-serif;
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: 0;
}

h1 {
    margin-bottom: 12px;
    font-size: 4.7rem;
}

h2 {
    margin-bottom: 16px;
    font-size: 2.4rem;
}

h3 {
    margin-bottom: 8px;
    font-size: 1.12rem;
}

.page-title-compact {
    font-size: 3.35rem;
}

.lead {
    margin: 0;
    color: #3e3b36;
    font-size: 1.08rem;
    font-weight: 600;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: .875rem;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    min-height: 44px;
    padding: 10px 17px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: var(--line-heavy);
    border-radius: 5px;
    background: var(--white);
    box-shadow: var(--shadow-small);
    color: var(--ink);
    font-weight: 900;
    text-align: center;
    text-decoration: none;
}

.button:hover {
    box-shadow: 1px 1px 0 var(--ink);
    text-decoration: none;
    transform: translate(2px, 2px);
}

.button:active {
    box-shadow: none;
    transform: translate(3px, 3px);
}

.button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.button-small {
    min-height: 36px;
    padding: 7px 11px;
    border-width: 2px;
    box-shadow: 2px 2px 0 var(--ink);
    font-size: .84rem;
}

.button-yellow { background: var(--yellow); }
.button-coral { background: var(--coral); }
.button-turquoise { background: var(--turquoise); }
.button-purple { background: var(--purple); }
.button-mint { background: var(--mint); }
.button-ink { background: var(--ink); color: var(--white); }
.button-plain { box-shadow: none; }

.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.danger-link,
.text-danger {
    color: #a40000;
}

.hero {
    position: relative;
    display: grid;
    margin-bottom: 44px;
    padding: 46px;
    border: var(--line-heavy);
    border-radius: 7px;
    background: var(--yellow);
    box-shadow: 8px 8px 0 var(--ink);
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr);
    gap: 40px;
    overflow: hidden;
}

.hero::after {
    content: "#";
    align-self: center;
    color: var(--coral);
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 16rem;
    font-weight: 900;
    line-height: .7;
    text-align: center;
    -webkit-text-stroke: 3px var(--ink);
}

.hero h1 {
    max-width: 800px;
}

.hero .lead {
    max-width: 650px;
    margin-bottom: 24px;
}

.hero-search {
    display: flex;
    max-width: 690px;
    gap: 10px;
}

.hero-search input {
    flex: 1 1 auto;
    min-width: 0;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
}

.content-main,
.content-aside {
    min-width: 0;
}

.section-heading {
    display: flex;
    margin-bottom: 16px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-heading h2,
.section-heading h3 {
    margin: 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.category-card {
    position: relative;
    display: grid;
    min-height: 190px;
    padding: 22px;
    border: var(--line-heavy);
    border-radius: 6px;
    background: var(--white);
    box-shadow: var(--shadow);
    grid-template-rows: auto 1fr auto;
}

.category-card:nth-child(4n + 1) { border-top: 12px solid var(--coral); }
.category-card:nth-child(4n + 2) { border-top: 12px solid var(--purple); }
.category-card:nth-child(4n + 3) { border-top: 12px solid var(--turquoise); }
.category-card:nth-child(4n + 4) { border-top: 12px solid var(--yellow); }

.category-card:hover {
    box-shadow: 8px 8px 0 var(--ink);
    transform: translate(-2px, -2px);
}

.category-card h3 a {
    text-decoration: none;
}

.category-card h3 a::after {
    position: absolute;
    inset: 0;
    content: "";
}

.category-card p {
    margin: 0 0 18px;
    color: #4d4942;
}

.category-meta,
.topic-meta,
.post-meta,
.meta-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 15px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.activity-list,
.topic-list,
.notification-list,
.admin-list,
.report-list {
    display: grid;
    margin: 0;
    padding: 0;
    gap: 12px;
    list-style: none;
}

.activity-item,
.topic-row,
.notification-item,
.admin-row,
.report-row {
    position: relative;
    padding: 17px;
    border: var(--line);
    border-radius: 5px;
    background: var(--white);
    box-shadow: var(--shadow-small);
}

.activity-item a,
.topic-row h2 a,
.topic-row h3 a,
.notification-item a {
    font-weight: 900;
    text-decoration: none;
}

.activity-item:hover,
.topic-row:hover {
    background: #fffdf8;
    box-shadow: var(--shadow);
}

.topic-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.topic-row h2,
.topic-row h3 {
    margin-bottom: 9px;
    font-size: 1.15rem;
}

.topic-stats {
    display: grid;
    min-width: 136px;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    text-align: center;
}

.topic-stat {
    padding: 7px;
    border-left: var(--line);
}

.topic-stat strong,
.topic-stat span {
    display: block;
}

.topic-stat strong {
    font-size: 1.05rem;
}

.topic-stat span {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.badge {
    display: inline-flex;
    min-height: 25px;
    padding: 2px 8px;
    align-items: center;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--white);
    color: var(--ink);
    font-size: .68rem;
    font-weight: 900;
    line-height: 1.15;
    text-transform: uppercase;
}

.badge-open,
.badge-success { background: var(--mint); }
.badge-closed,
.badge-warning { background: var(--yellow); }
.badge-archived,
.badge-muted { background: #dedbd2; }
.badge-pinned,
.badge-danger,
.badge-coral { background: var(--coral); }
.badge-info { background: var(--turquoise); }
.badge-purple { background: var(--purple); }

.toolbar {
    display: flex;
    margin-bottom: 22px;
    padding: 14px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    border-block: var(--line);
    background: #fff3c0;
}

.filter-form {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.filter-field {
    min-width: 150px;
}

.filter-field label {
    display: block;
    margin-bottom: 4px;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.panel {
    padding: 24px;
    border: var(--line-heavy);
    border-radius: 6px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.panel-flat {
    padding: 22px 0;
    border-block: var(--line-heavy);
}

.panel-yellow { background: #fff3b6; }
.panel-turquoise { background: #bcece9; }
.panel-purple { background: #ded4ff; }
.panel-mint { background: #d8f4e1; }

.stack {
    display: grid;
    gap: 22px;
}

.stack-small {
    display: grid;
    gap: 12px;
}

.empty-state {
    padding: 42px 24px;
    border: 3px dashed var(--ink);
    background: #fffdf8;
    text-align: center;
}

.empty-state-mark {
    display: block;
    margin-bottom: 12px;
    color: var(--purple);
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    -webkit-text-stroke: 2px var(--ink);
}

.empty-state h2,
.empty-state h3 {
    margin-bottom: 8px;
}

.empty-state p {
    max-width: 560px;
    margin: 0 auto 18px;
}

.form-card {
    padding: 30px;
    border: var(--line-heavy);
    border-radius: 7px;
    background: var(--white);
    box-shadow: 8px 8px 0 var(--ink);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.field {
    min-width: 0;
}

.field-full {
    grid-column: 1 / -1;
}

.field label,
.field legend {
    display: block;
    margin-bottom: 7px;
    font-weight: 900;
}

.required::after {
    content: " *";
    color: #b00000;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: var(--line-heavy);
    border-radius: 4px;
    background: var(--white);
    box-shadow: 3px 3px 0 #bbb4a7;
}

textarea {
    min-height: 170px;
    resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
    background: #fffdf5;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"],
.field-error-input {
    border-color: #b00000;
    box-shadow: 3px 3px 0 #b00000;
}

.field-help,
.field-counter {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: .8rem;
}

.field-error {
    display: block;
    margin-top: 7px;
    color: #a40000;
    font-size: .86rem;
    font-weight: 800;
}

.checkbox-field,
.radio-field {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.checkbox-field input,
.radio-field input {
    width: 22px;
    height: 22px;
    margin: 1px 0 0;
    accent-color: var(--turquoise);
}

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

.form-summary {
    margin-bottom: 20px;
    padding: 14px 17px;
    border: var(--line-heavy);
    border-radius: 4px;
    box-shadow: var(--shadow-small);
}

.form-summary-error {
    background: #ffd1d3;
}

.form-summary ul {
    margin: 7px 0 0;
    padding-left: 20px;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(460px, 1fr);
    gap: 50px;
    align-items: center;
}

.auth-aside {
    padding: 34px;
    border: var(--line-heavy);
    border-radius: 7px;
    background: var(--purple);
    box-shadow: var(--shadow);
}

.auth-aside-mark {
    display: block;
    margin-bottom: 20px;
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 7rem;
    font-weight: 900;
    line-height: .8;
}

.auth-aside ul {
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.auth-aside li {
    margin-top: 10px;
    padding: 9px 12px;
    border: var(--line);
    background: var(--white);
    box-shadow: var(--shadow-small);
    font-weight: 800;
}

.flash-stack {
    display: grid;
    margin-bottom: 22px;
    gap: 10px;
}

.flash {
    padding: 13px 17px;
    border: var(--line-heavy);
    border-radius: 4px;
    box-shadow: var(--shadow-small);
}

.flash-success { background: var(--mint); }
.flash-error { background: #ffd1d3; }
.flash-info { background: #ccecfb; }
.flash-warning { background: #fff3b6; }

.breadcrumbs {
    display: flex;
    margin: 0 0 24px;
    padding: 0;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 700;
    list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
    margin-left: 7px;
    content: "/";
    color: var(--ink);
    font-weight: 900;
}

.tag-list {
    display: flex;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
}

.tag {
    display: inline-block;
    padding: 3px 8px;
    border: 2px solid var(--ink);
    border-radius: 3px;
    background: #ded4ff;
    font-size: .72rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.topic-header {
    margin-bottom: 28px;
    padding: 28px;
    border: var(--line-heavy);
    border-radius: 6px;
    background: var(--yellow);
    box-shadow: var(--shadow);
}

.topic-header h1 {
    margin: 12px 0;
    font-size: 4rem;
}

.topic-actions {
    display: flex;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 9px;
}

.inline-form {
    display: inline-flex;
}

.post-list {
    display: grid;
    gap: 22px;
}

.post {
    display: grid;
    scroll-margin-top: 96px;
    border: var(--line-heavy);
    border-radius: 6px;
    background: var(--white);
    box-shadow: var(--shadow);
    grid-template-columns: 190px minmax(0, 1fr);
}

.post-author {
    padding: 20px;
    border-right: var(--line-heavy);
    background: #d8f4e1;
}

.post:nth-child(4n + 2) .post-author { background: #ded4ff; }
.post:nth-child(4n + 3) .post-author { background: #fff3b6; }
.post:nth-child(4n + 4) .post-author { background: #bcece9; }

.avatar {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 11px;
    place-items: center;
    border: var(--line-heavy);
    border-radius: 4px;
    background: var(--coral);
    box-shadow: var(--shadow-small);
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 1.55rem;
    font-weight: 900;
}

.avatar-small {
    width: 34px;
    height: 34px;
    margin: 0;
    border-width: 2px;
    box-shadow: 2px 2px 0 var(--ink);
    font-size: .9rem;
}

.post-author-name {
    display: block;
    margin-bottom: 5px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.post-body {
    min-width: 0;
    padding: 20px 22px;
}

.post-topline {
    display: flex;
    margin-bottom: 18px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.post-anchor {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 900;
}

.post-content {
    min-height: 70px;
    font-size: 1.02rem;
    line-height: 1.68;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.post-deleted,
.post-hidden {
    min-height: auto;
    padding: 18px;
    border: 2px dashed var(--ink);
    background: #efede7;
    color: var(--muted);
    font-style: italic;
}

.post-footer {
    display: flex;
    margin-top: 22px;
    padding-top: 13px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 2px solid var(--ink);
}

.post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.reply-panel {
    margin-top: 34px;
}

.pagination {
    display: flex;
    margin-top: 28px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.pagination-link {
    display: grid;
    min-width: 42px;
    min-height: 42px;
    padding: 7px 10px;
    place-items: center;
    border: var(--line);
    border-radius: 4px;
    background: var(--white);
    box-shadow: 2px 2px 0 var(--ink);
    font-weight: 900;
    text-decoration: none;
}

.pagination-link.current {
    background: var(--yellow);
    box-shadow: none;
    transform: translate(2px, 2px);
}

.pagination-link.disabled {
    opacity: .45;
}

.pagination-direction {
    min-width: 92px;
}

.profile-header {
    display: grid;
    margin-bottom: 32px;
    padding: 28px;
    border: var(--line-heavy);
    border-radius: 7px;
    background: var(--turquoise);
    box-shadow: 7px 7px 0 var(--ink);
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
}

.profile-header .avatar {
    width: 92px;
    height: 92px;
    margin: 0;
    font-size: 2.5rem;
}

.profile-header h1 {
    margin-bottom: 7px;
    font-size: 3.7rem;
}

.profile-stats {
    display: flex;
    gap: 10px;
}

.profile-stat {
    min-width: 86px;
    padding: 10px;
    border: var(--line);
    background: var(--white);
    box-shadow: var(--shadow-small);
    text-align: center;
}

.profile-stat strong,
.profile-stat span {
    display: block;
}

.profile-stat strong {
    font-size: 1.35rem;
}

.profile-stat span {
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.tabs {
    display: flex;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: var(--line-heavy);
}

.tabs a {
    padding: 10px 16px;
    border: var(--line);
    border-bottom: 0;
    background: var(--white);
    font-weight: 900;
    text-decoration: none;
}

.tabs a.active {
    background: var(--yellow);
}

.notification-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.notification-item.unread {
    border-left: 12px solid var(--coral);
    background: #fff9d8;
}

.notification-item p {
    margin: 5px 0;
}

.admin-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.admin-sidebar {
    position: sticky;
    top: 96px;
    overflow: hidden;
    border: var(--line-heavy);
    border-radius: 5px;
    background: var(--mint);
    box-shadow: var(--shadow);
}

.admin-sidebar-title {
    margin: 0;
    padding: 17px;
    border-bottom: var(--line-heavy);
    background: var(--ink);
    color: var(--white);
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.08;
}

.admin-sidebar nav {
    display: grid;
}

.admin-sidebar a {
    padding: 13px 15px;
    border-bottom: var(--line);
    font-weight: 900;
    text-decoration: none;
}

.admin-sidebar a:last-child {
    border-bottom: 0;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: var(--yellow);
}

.admin-row,
.report-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.admin-row h3,
.report-row h3,
.admin-row p,
.report-row p {
    margin: 0 0 5px;
}

.admin-row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.definition-grid {
    display: grid;
    margin: 0;
    grid-template-columns: minmax(120px, .35fr) minmax(0, 1fr);
}

.definition-grid dt,
.definition-grid dd {
    margin: 0;
    padding: 11px 12px;
    border-bottom: 2px solid var(--ink);
}

.definition-grid dt {
    background: #efece5;
    font-weight: 900;
}

.definition-grid dd {
    overflow-wrap: anywhere;
}

.definition-grid dt:last-of-type,
.definition-grid dd:last-of-type {
    border-bottom: 0;
}

.danger-zone {
    padding: 22px;
    border: 3px solid #a40000;
    background: #ffd1d3;
    box-shadow: 5px 5px 0 #a40000;
}

.error-page {
    display: grid;
    min-height: 62vh;
    place-items: center;
    text-align: center;
}

.error-card {
    width: min(100%, 760px);
    padding: 46px 30px;
    border: var(--line-heavy);
    border-radius: 7px;
    background: var(--yellow);
    box-shadow: 9px 9px 0 var(--ink);
}

.error-code {
    display: block;
    margin-bottom: 12px;
    color: var(--coral);
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 11rem;
    font-weight: 900;
    line-height: .8;
    -webkit-text-stroke: 3px var(--ink);
}

.panel-coral {
    background: #ffd1d3;
}

.site-footer {
    border-top: var(--line-heavy);
    background: var(--ink);
    color: var(--white);
}

.footer-inner {
    display: grid;
    max-width: var(--content);
    min-height: 190px;
    margin: 0 auto;
    padding: 36px 22px;
    grid-template-columns: 1fr auto;
    gap: 18px 40px;
    align-items: start;
}

.brand-footer {
    color: var(--white);
}

.footer-inner p {
    margin: 10px 0 0;
    color: #cbc7bf;
}

.footer-inner nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-weight: 800;
}

.footer-copy {
    grid-column: 1 / -1;
    padding-top: 16px;
    border-top: 1px solid #77736c;
}

@media (max-width: 1100px) {
    .header-inner {
        gap: 12px;
    }

    .menu-toggle {
        display: grid;
        place-items: center;
    }

    .main-navigation {
        position: absolute;
        top: 100%;
        right: 18px;
        display: none;
        width: min(340px, calc(100vw - 36px));
        padding: 10px;
        border: var(--line-heavy);
        border-radius: 4px;
        background: var(--white);
        box-shadow: var(--shadow);
    }

    .main-navigation.is-open {
        display: grid;
    }

    .main-navigation a {
        padding: 11px;
        border-bottom: 2px solid var(--ink);
    }

    .main-navigation a:last-child {
        border-bottom: 0;
    }

    .content-grid {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .hero {
        grid-template-columns: minmax(0, 1fr) 220px;
    }
}

@media (max-width: 850px) {
    .content-grid,
    .auth-layout,
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .hero::after {
        position: absolute;
        right: 10px;
        bottom: -25px;
        z-index: 0;
        opacity: .15;
    }

    .hero > * {
        position: relative;
        z-index: 1;
    }

    .admin-sidebar {
        position: static;
    }

    .admin-sidebar nav {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-sidebar a:nth-child(odd) {
        border-right: var(--line);
    }
}

@media (max-width: 768px) {
    body::before {
        height: 5px;
    }

    .site-header {
        position: relative;
    }

    .header-inner {
        min-height: 64px;
        padding: 9px 14px;
        flex-wrap: wrap;
    }

    .brand span:last-child,
    .user-menu summary > span:last-child,
    .header-actions > .button:first-of-type {
        display: none;
    }

    .main-navigation .nav-mobile-only {
        display: block;
    }

    .header-actions {
        margin-left: auto;
    }

    .page-shell {
        width: min(100% - 24px, var(--content));
        padding: 28px 0 50px;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    h1 { font-size: 3rem; }
    h2 { font-size: 2rem; }
    .page-title-compact { font-size: 2.7rem; }
    .topic-header h1 { font-size: 3rem; }
    .profile-header h1 { font-size: 2.8rem; }
    .error-code { font-size: 8rem; }

    .hero {
        margin-bottom: 34px;
        padding: 26px 20px;
        box-shadow: 5px 5px 0 var(--ink);
    }

    .hero-search {
        align-items: stretch;
        flex-direction: column;
    }

    .category-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .field-full {
        grid-column: auto;
    }

    .toolbar,
    .filter-form {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-field {
        min-width: 0;
    }

    .topic-row,
    .notification-item,
    .admin-row,
    .report-row {
        grid-template-columns: 1fr;
    }

    .topic-stats {
        min-width: 0;
        border-top: var(--line);
    }

    .topic-stat {
        border-left: 0;
    }

    .topic-stat + .topic-stat {
        border-left: var(--line);
    }

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

    .post-author {
        display: grid;
        padding: 14px 16px;
        border-right: 0;
        border-bottom: var(--line-heavy);
        grid-template-columns: auto 1fr;
        gap: 4px 13px;
        align-items: center;
    }

    .post-author .avatar {
        width: 46px;
        height: 46px;
        margin: 0;
        grid-row: 1 / 3;
        font-size: 1.15rem;
    }

    .post-author-name {
        margin: 0;
    }

    .post-body {
        padding: 17px;
    }

    .post-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-header {
        grid-template-columns: auto 1fr;
    }

    .profile-stats {
        grid-column: 1 / -1;
    }

    .profile-stat {
        flex: 1 1 0;
        min-width: 0;
    }

    .auth-layout {
        gap: 28px;
    }

    .auth-aside {
        order: 2;
    }

    .form-card {
        padding: 21px 17px;
        box-shadow: 5px 5px 0 var(--ink);
    }

    .definition-grid {
        grid-template-columns: 1fr;
    }

    .definition-grid dt {
        border-bottom: 0;
    }

    .admin-row-actions {
        justify-content: flex-start;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-copy {
        grid-column: auto;
    }
}

@media (max-width: 430px) {
    h1 { font-size: 2.45rem; }
    h2 { font-size: 1.7rem; }
    .page-title-compact,
    .topic-header h1,
    .profile-header h1 { font-size: 2.2rem; }
    .error-code { font-size: 6rem; }
    .header-actions {
        gap: 6px;
    }

    .language-switcher a {
        padding: 4px 5px;
        font-size: .68rem;
    }

    .header-actions .button {
        padding-inline: 8px;
        font-size: .72rem;
    }

    .user-menu-popover {
        right: -54px;
    }

    .button-row,
    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .button-row .button,
    .form-actions .button {
        width: 100%;
    }

    .profile-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-header .avatar {
        margin: 0 auto;
    }

    .profile-stats {
        grid-column: auto;
    }

    .pagination-direction {
        min-width: 76px;
    }

    .admin-sidebar nav {
        grid-template-columns: 1fr;
    }

    .admin-sidebar a:nth-child(odd) {
        border-right: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media print {
    body::before,
    .site-header,
    .site-footer,
    .topic-actions,
    .post-actions,
    .reply-panel,
    .pagination {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .page-shell {
        width: 100%;
        padding: 0;
    }

    .post,
    .topic-header,
    .panel {
        border: 1px solid #000;
        box-shadow: none;
    }
}
