:root {
    --portal-danger: #a33a31;
    --portal-danger-soft: #fff0ed;
    --portal-warning: #8a5a08;
    --portal-warning-soft: #fff6dc;
    --portal-success: #116149;
    --portal-success-soft: #e8f5ef;
    --portal-info: #245c75;
    --portal-info-soft: #eaf4f8;
    --portal-focus: #0f766e;
}

[hidden] {
    display: none !important;
}

.portal-page {
    min-width: 320px;
}

.portal-page button,
.portal-page input,
.portal-page select,
.portal-page textarea {
    font: inherit;
}

.portal-page button,
.portal-page a,
.portal-page input,
.portal-page select,
.portal-page textarea {
    -webkit-tap-highlight-color: transparent;
}

.portal-page :focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.36);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 50%;
    z-index: 100;
    padding: 10px 18px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--ink);
    text-decoration: none;
    transform: translate(-50%, -180%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translate(-50%, 0);
}

.portal-page .site-header {
    margin-top: 12px;
}

.portal-page .site-nav a[aria-current="page"] {
    color: var(--jade-dark);
    background: rgba(15, 118, 110, 0.1);
    font-weight: 750;
}

.portal-page .site-nav [data-account-link] {
    max-width: 180px;
    overflow: hidden;
    color: #ffffff;
    background: var(--ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-page .site-nav [data-account-link]:hover {
    color: #ffffff;
    background: var(--jade-dark);
}

.portal-main {
    width: var(--container);
    margin: 0 auto;
    padding: 68px 0 96px;
}

.portal-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.62fr);
    gap: 28px;
    align-items: stretch;
    margin-bottom: 34px;
}

.portal-hero__copy,
.portal-hero__aside {
    min-width: 0;
    border: 1px solid rgba(23, 25, 21, 0.1);
    border-radius: var(--radius-lg);
}

.portal-hero__copy {
    position: relative;
    overflow: hidden;
    padding: clamp(32px, 5vw, 64px);
    background:
        radial-gradient(circle at 90% 10%, rgba(217, 199, 165, 0.52), transparent 34%),
        rgba(255, 255, 255, 0.67);
    box-shadow: var(--shadow);
}

.portal-hero__copy::after {
    position: absolute;
    right: -88px;
    bottom: -116px;
    width: 260px;
    height: 260px;
    content: "";
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: 50%;
    box-shadow:
        0 0 0 34px rgba(15, 118, 110, 0.035),
        0 0 0 70px rgba(15, 118, 110, 0.025);
}

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

.portal-hero__aside {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 34px;
    padding: 30px;
    color: #f8faf6;
    background:
        linear-gradient(145deg, rgba(13, 29, 25, 0.98), rgba(13, 56, 50, 0.95)),
        radial-gradient(circle at 80% 20%, rgba(217, 199, 165, 0.22), transparent 32%);
    box-shadow: 0 24px 64px rgba(13, 29, 25, 0.18);
}

.portal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 18px;
    color: var(--jade-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.portal-eyebrow::before {
    width: 24px;
    height: 1px;
    content: "";
    background: currentColor;
}

.portal-hero h1 {
    max-width: 780px;
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.065em;
}

.portal-lead {
    max-width: 760px;
    margin: 22px 0 0;
    color: var(--ink-muted);
    font-size: clamp(16px, 1.8vw, 18px);
    line-height: 1.85;
}

.portal-hero__aside h2 {
    margin: 0;
    color: var(--sand);
    font-family: var(--font-display);
    font-size: 28px;
    letter-spacing: -0.03em;
}

.portal-hero__aside p {
    margin: 12px 0 0;
    color: rgba(248, 250, 246, 0.76);
    line-height: 1.75;
}

.aside-stat {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.aside-stat span {
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 16px;
    color: rgba(248, 250, 246, 0.72);
    background: rgba(255, 255, 255, 0.05);
    font-size: 12px;
    line-height: 1.5;
}

.aside-stat strong {
    display: block;
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 23px;
}

.portal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.38fr);
    gap: 22px;
    align-items: start;
}

.portal-layout--equal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.portal-panel {
    min-width: 0;
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid rgba(23, 25, 21, 0.1);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 16px 42px rgba(23, 25, 21, 0.065);
}

.portal-panel--soft {
    background: rgba(241, 238, 231, 0.66);
    box-shadow: none;
}

.portal-panel--danger {
    border-color: rgba(163, 58, 49, 0.2);
    background: rgba(255, 240, 237, 0.62);
}

.panel-heading {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.panel-heading h2,
.panel-heading h3 {
    margin: 0;
    font-family: var(--font-display);
    letter-spacing: -0.035em;
}

.panel-heading h2 {
    font-size: clamp(28px, 3vw, 38px);
}

.panel-heading h3 {
    font-size: 25px;
}

.panel-heading p {
    max-width: 650px;
    margin: 8px 0 0;
    color: var(--ink-muted);
    line-height: 1.7;
}

.panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
}

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

.field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.field--wide,
.form-actions,
.form-status,
.form-note {
    grid-column: 1 / -1;
}

.field label,
.field-label,
.portal-fieldset legend {
    color: var(--ink);
    font-size: 14px;
    font-weight: 750;
}

.field-hint {
    margin: -2px 0 0;
    color: var(--ink-muted);
    font-size: 12px;
    line-height: 1.6;
}

.field input,
.field select,
.field textarea,
.dialog-form input,
.dialog-form select,
.dialog-form textarea {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    color: var(--ink);
    border: 1px solid rgba(23, 25, 21, 0.17);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.9);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field textarea,
.dialog-form textarea {
    min-height: 132px;
    resize: vertical;
    line-height: 1.7;
}

.field textarea.textarea--article {
    min-height: 270px;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.dialog-form input:hover,
.dialog-form select:hover,
.dialog-form textarea:hover {
    border-color: rgba(15, 118, 110, 0.38);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.dialog-form input:focus,
.dialog-form select:focus,
.dialog-form textarea:focus {
    outline: 0;
    border-color: var(--jade);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.11);
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled {
    color: var(--ink-muted);
    cursor: not-allowed;
    background: rgba(241, 238, 231, 0.8);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
    border-color: var(--portal-danger);
    box-shadow: 0 0 0 3px rgba(163, 58, 49, 0.09);
}

.input-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

.check-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--ink-muted);
    font-size: 13px;
    line-height: 1.65;
}

.check-row input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--jade);
}

.check-row a {
    color: var(--jade-dark);
    font-weight: 700;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding-top: 2px;
}

.portal-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    color: var(--ink);
    border: 1px solid rgba(23, 25, 21, 0.15);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.portal-button:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(15, 118, 110, 0.3);
    box-shadow: 0 10px 20px rgba(23, 25, 21, 0.08);
}

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

.portal-button--primary {
    color: #ffffff;
    border-color: var(--ink);
    background: var(--ink);
}

.portal-button--primary:hover:not(:disabled) {
    border-color: var(--jade-dark);
    background: var(--jade-dark);
}

.portal-button--jade {
    color: #ffffff;
    border-color: var(--jade);
    background: var(--jade);
}

.portal-button--danger {
    color: var(--portal-danger);
    border-color: rgba(163, 58, 49, 0.28);
    background: rgba(255, 240, 237, 0.8);
}

.portal-button--ghost {
    color: var(--jade-dark);
    border-color: rgba(15, 118, 110, 0.2);
    background: rgba(15, 118, 110, 0.04);
}

.portal-button--small {
    min-height: 36px;
    padding: 7px 13px;
    font-size: 12px;
}

.block-action { margin-top: 14px; }
.audit-detail { grid-column: 2 / -1; }
.scroll-progress--20 { width: 20%; }
.scroll-progress--40 { width: 40%; }
.scroll-progress--60 { width: 60%; }
.scroll-progress--80 { width: 80%; }
.scroll-progress--100 { width: 100%; }

.text-button {
    padding: 3px 0;
    color: var(--jade-dark);
    border: 0;
    background: transparent;
    cursor: pointer;
    font-weight: 750;
    text-decoration: underline;
    text-decoration-color: rgba(15, 118, 110, 0.32);
    text-underline-offset: 4px;
}

.form-status {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 13px;
    font-size: 13px;
    line-height: 1.6;
}

.form-status[data-tone="success"] {
    color: var(--portal-success);
    border-color: rgba(17, 97, 73, 0.18);
    background: var(--portal-success-soft);
}

.form-status[data-tone="error"] {
    color: var(--portal-danger);
    border-color: rgba(163, 58, 49, 0.18);
    background: var(--portal-danger-soft);
}

.form-status[data-tone="warning"] {
    color: var(--portal-warning);
    border-color: rgba(138, 90, 8, 0.18);
    background: var(--portal-warning-soft);
}

.form-status[data-tone="info"] {
    color: var(--portal-info);
    border-color: rgba(36, 92, 117, 0.16);
    background: var(--portal-info-soft);
}

.notice {
    padding: 17px 18px;
    color: var(--ink-muted);
    border-left: 4px solid var(--jade);
    border-radius: 15px;
    background: rgba(15, 118, 110, 0.07);
    font-size: 14px;
    line-height: 1.75;
}

.notice strong {
    color: var(--ink);
}

.notice--warning {
    border-left-color: #b57a13;
    background: var(--portal-warning-soft);
}

.notice--danger {
    border-left-color: var(--portal-danger);
    background: var(--portal-danger-soft);
}

.status-chip {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    color: var(--portal-info);
    border: 1px solid rgba(36, 92, 117, 0.15);
    border-radius: 999px;
    background: var(--portal-info-soft);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
}

.status-chip::before {
    width: 7px;
    height: 7px;
    content: "";
    border-radius: 50%;
    background: currentColor;
}

.status-chip[data-tone="success"] {
    color: var(--portal-success);
    border-color: rgba(17, 97, 73, 0.17);
    background: var(--portal-success-soft);
}

.status-chip[data-tone="warning"] {
    color: var(--portal-warning);
    border-color: rgba(138, 90, 8, 0.16);
    background: var(--portal-warning-soft);
}

.status-chip[data-tone="danger"] {
    color: var(--portal-danger);
    border-color: rgba(163, 58, 49, 0.16);
    background: var(--portal-danger-soft);
}

.status-chip[data-tone="neutral"] {
    color: #5d625b;
    border-color: rgba(23, 25, 21, 0.12);
    background: rgba(241, 238, 231, 0.84);
}

.auth-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 24px;
    padding: 5px;
    border: 1px solid rgba(23, 25, 21, 0.09);
    border-radius: 15px;
    background: rgba(241, 238, 231, 0.72);
}

.auth-switch button {
    min-height: 42px;
    color: var(--ink-muted);
    border: 0;
    border-radius: 11px;
    background: transparent;
    cursor: pointer;
    font-weight: 750;
}

.auth-switch button[aria-selected="true"] {
    color: var(--ink);
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(23, 25, 21, 0.08);
}

.identity-card {
    display: grid;
    gap: 16px;
}

.identity-line {
    display: flex;
    gap: 14px;
    align-items: center;
}

.identity-avatar {
    display: grid;
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    place-items: center;
    color: #ffffff;
    border-radius: 18px;
    background: linear-gradient(145deg, var(--jade), var(--jade-dark));
    font-family: var(--font-display);
    font-size: 24px;
    box-shadow: 0 12px 28px rgba(15, 118, 110, 0.18);
}

.identity-line strong,
.identity-line span {
    display: block;
}

.identity-line span {
    margin-top: 4px;
    color: var(--ink-muted);
    font-size: 13px;
}

.fact-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.fact-list > div {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.fact-list > div:last-child {
    border-bottom: 0;
}

.fact-list dt {
    color: var(--ink-muted);
}

.fact-list dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.privacy-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.privacy-list li {
    position: relative;
    padding-left: 25px;
    color: var(--ink-muted);
    line-height: 1.7;
}

.privacy-list li::before {
    position: absolute;
    top: 0.58em;
    left: 2px;
    width: 8px;
    height: 8px;
    content: "";
    border-radius: 50%;
    background: var(--jade);
    box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.09);
}

.section-anchor {
    scroll-margin-top: 110px;
}

.community-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.community-toolbar p {
    margin: 0;
    color: var(--ink-muted);
}

.post-list,
.submission-list,
.comment-list,
.moderation-list,
.audit-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.post-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    padding: 22px;
    border: 1px solid rgba(23, 25, 21, 0.1);
    border-radius: 19px;
    background: rgba(255, 255, 255, 0.72);
    transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.post-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 118, 110, 0.23);
    box-shadow: 0 16px 34px rgba(23, 25, 21, 0.07);
}

.post-card h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(22px, 2.5vw, 29px);
    line-height: 1.25;
    letter-spacing: -0.035em;
}

.post-card h3 button {
    padding: 0;
    color: inherit;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.post-card h3 button:hover {
    color: var(--jade-dark);
}

.post-summary {
    display: -webkit-box;
    max-width: 760px;
    margin: 11px 0 0;
    overflow: hidden;
    color: var(--ink-muted);
    line-height: 1.72;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 14px;
    color: var(--ink-muted);
    font-size: 12px;
}

.post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.post-card__action {
    align-self: center;
}

.submission-item,
.comment-item,
.moderation-item,
.audit-item {
    min-width: 0;
    padding: 17px 18px;
    border: 1px solid rgba(23, 25, 21, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.68);
}

.submission-item__top,
.moderation-item__top,
.audit-item__top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
}

.submission-item h3,
.moderation-item h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.45;
}

.submission-item p,
.moderation-item p,
.audit-item p {
    margin: 9px 0 0;
    color: var(--ink-muted);
    font-size: 13px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.empty-state {
    padding: 34px 24px;
    color: var(--ink-muted);
    border: 1px dashed rgba(23, 25, 21, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.38);
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 7px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 21px;
}

.loading-block {
    position: relative;
    min-height: 130px;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(241, 238, 231, 0.68);
}

.loading-block::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, 0.7) 42%, transparent 62%);
    transform: translateX(-100%);
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    to {
        transform: translateX(100%);
    }
}

.portal-dialog {
    width: min(820px, calc(100vw - 28px));
    max-height: calc(100vh - 32px);
    padding: 0;
    overflow: hidden;
    color: var(--ink);
    border: 1px solid rgba(23, 25, 21, 0.14);
    border-radius: 26px;
    background: #fbfaf7;
    box-shadow: 0 28px 90px rgba(13, 29, 25, 0.28);
}

.portal-dialog::backdrop {
    background: rgba(13, 29, 25, 0.54);
    backdrop-filter: blur(5px);
}

.dialog-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    max-height: calc(100vh - 32px);
}

.dialog-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
}

.dialog-header h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(25px, 4vw, 38px);
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.dialog-close {
    display: grid;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--ink);
    border: 1px solid rgba(23, 25, 21, 0.12);
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    font-size: 22px;
}

.dialog-body {
    overflow: auto;
    padding: clamp(22px, 4vw, 38px);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 24px;
    color: var(--ink-muted);
    font-size: 13px;
}

.article-body {
    color: #343931;
    font-size: 16px;
    line-height: 1.9;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.article-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.comment-section {
    margin-top: 36px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}

.comment-section h3 {
    margin: 0 0 18px;
    font-family: var(--font-display);
    font-size: 26px;
}

.comment-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: center;
    color: var(--ink-muted);
    font-size: 12px;
}

.comment-item__meta strong {
    color: var(--ink);
    font-size: 13px;
}

.comment-item__content {
    margin: 9px 0 0;
    color: #343931;
    line-height: 1.75;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.comment-form {
    display: grid;
    gap: 11px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(241, 238, 231, 0.65);
}

.comment-form textarea {
    width: 100%;
    min-height: 92px;
    padding: 11px 13px;
    border: 1px solid rgba(23, 25, 21, 0.16);
    border-radius: 12px;
    resize: vertical;
}

.promise-card {
    display: grid;
    gap: 15px;
    padding: 24px;
    color: #f8faf6;
    border-radius: 22px;
    background: linear-gradient(145deg, var(--jade-dark), #123d37);
}

.promise-card strong {
    font-family: var(--font-display);
    font-size: 34px;
}

.promise-card p {
    margin: 0;
    color: rgba(248, 250, 246, 0.76);
    line-height: 1.7;
}

.contact-grid {
    display: grid;
    gap: 12px;
}

.contact-item {
    padding: 16px;
    border: 1px solid rgba(23, 25, 21, 0.1);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.6);
}

.contact-item span,
.contact-item strong,
.contact-item a {
    display: block;
}

.contact-item span {
    color: var(--ink-muted);
    font-size: 12px;
}

.contact-item strong,
.contact-item a {
    margin-top: 6px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 750;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.contact-item a:hover {
    color: var(--jade-dark);
    text-decoration: underline;
}

.report-result {
    display: grid;
    gap: 12px;
    padding: 25px;
    color: var(--portal-success);
    border: 1px solid rgba(17, 97, 73, 0.18);
    border-radius: 20px;
    background: var(--portal-success-soft);
}

.report-result strong {
    font-family: var(--font-display);
    font-size: 28px;
}

.report-result p {
    margin: 0;
    line-height: 1.7;
}

.report-number {
    display: inline-flex;
    width: fit-content;
    padding: 8px 12px;
    color: var(--ink);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-weight: 700;
}

.admin-gate {
    max-width: 720px;
    margin: 34px auto 0;
    padding: clamp(30px, 5vw, 54px);
    border: 1px solid rgba(23, 25, 21, 0.1);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow);
    text-align: center;
}

.admin-gate__mark {
    display: grid;
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    place-items: center;
    color: #ffffff;
    border-radius: 20px;
    background: var(--ink);
    font-family: var(--font-display);
    font-size: 27px;
}

.admin-gate h1,
.admin-gate h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(31px, 5vw, 48px);
    letter-spacing: -0.045em;
}

.admin-gate p {
    margin: 14px auto 0;
    color: var(--ink-muted);
    line-height: 1.75;
}

.admin-gate .portal-button {
    margin-top: 22px;
}

.admin-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.summary-card {
    padding: 18px;
    border: 1px solid rgba(23, 25, 21, 0.1);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.66);
}

.summary-card span,
.summary-card strong {
    display: block;
}

.summary-card span {
    color: var(--ink-muted);
    font-size: 12px;
}

.summary-card strong {
    margin-top: 7px;
    font-family: var(--font-display);
    font-size: 28px;
}

.admin-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    padding: 6px;
    overflow-x: auto;
    border: 1px solid rgba(23, 25, 21, 0.09);
    border-radius: 17px;
    background: rgba(241, 238, 231, 0.7);
    scrollbar-width: thin;
}

.admin-tabs button {
    flex: 1 0 auto;
    min-height: 42px;
    padding: 8px 16px;
    color: var(--ink-muted);
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    font-weight: 750;
}

.admin-tabs button[aria-selected="true"] {
    color: var(--ink);
    background: #ffffff;
    box-shadow: 0 7px 18px rgba(23, 25, 21, 0.08);
}

.admin-tabpanel {
    min-height: 280px;
}

.moderation-item {
    padding: 20px;
}

.moderation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 11px;
    color: var(--ink-muted);
    font-size: 12px;
}

.moderation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

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

.audit-time {
    color: var(--ink-muted);
    font-size: 12px;
}

.audit-action {
    font-weight: 750;
}

.dialog-form {
    display: grid;
    gap: 16px;
}

.dialog-form .field {
    gap: 7px;
}

.dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    justify-content: flex-end;
    margin-top: 4px;
}

.toast-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 120;
    display: grid;
    width: min(390px, calc(100vw - 36px));
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 16px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    background: rgba(23, 25, 21, 0.94);
    box-shadow: 0 18px 40px rgba(13, 29, 25, 0.22);
    backdrop-filter: blur(14px);
    pointer-events: auto;
    animation: toast-in 200ms ease both;
    line-height: 1.55;
}

.toast--success {
    background: rgba(17, 97, 73, 0.96);
}

.toast--error {
    background: rgba(126, 41, 34, 0.97);
}

.toast--warning {
    background: rgba(112, 73, 6, 0.97);
}

.toast__close {
    flex: 0 0 auto;
    padding: 0 2px;
    color: #ffffff;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.portal-page .site-footer {
    margin-top: 10px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    justify-content: center;
    margin-top: 5px;
}

@media (max-width: 980px) {
    .portal-hero,
    .portal-layout,
    .portal-layout--equal {
        grid-template-columns: 1fr;
    }

    .portal-hero__aside {
        min-height: 260px;
    }

    .admin-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .portal-page .site-nav [data-account-link] {
        max-width: none;
    }

    .portal-main {
        padding: 48px 0 72px;
    }

    .portal-hero {
        gap: 16px;
        margin-bottom: 18px;
    }

    .portal-hero__copy,
    .portal-hero__aside {
        border-radius: 24px;
    }

    .portal-hero__copy {
        padding: 32px 24px;
    }

    .portal-hero__aside {
        min-height: auto;
        padding: 24px;
    }

    .portal-panel {
        padding: 22px;
        border-radius: 19px;
    }

    .panel-heading {
        flex-direction: column;
    }

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

    .field--wide,
    .form-actions,
    .form-status,
    .form-note {
        grid-column: auto;
    }

    .post-card {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .post-card__action {
        justify-self: start;
    }

    .audit-item {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .dialog-header {
        padding: 18px;
    }

    .dialog-body {
        padding: 22px 18px;
    }
}

@media (max-width: 520px) {
    .aside-stat,
    .admin-summary {
        grid-template-columns: 1fr;
    }

    .input-action {
        grid-template-columns: 1fr;
    }

    .input-action .portal-button {
        width: 100%;
    }

    .form-actions > .portal-button,
    .dialog-actions > .portal-button {
        flex: 1 1 auto;
    }

    .fact-list > div {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .submission-item__top,
    .moderation-item__top,
    .audit-item__top {
        flex-direction: column;
    }

    .toast-stack {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .loading-block::after {
        animation: none;
    }
}

@media (forced-colors: active) {
    .status-chip::before,
    .privacy-list li::before {
        forced-color-adjust: none;
    }

    .portal-button,
    .field input,
    .field select,
    .field textarea {
        border: 1px solid ButtonText;
    }
}
