:root {
    color-scheme: dark;
    --bg: #111827;
    --surface: #1d2638;
    --surface-soft: #1d2638;
    --surface-elevated: #273148;
    --surface-muted: rgba(255, 255, 255, 0.04);
    --text: #edf2ff;
    --muted: #9ba8c7;
    --accent: #6d83ff;
    --border: rgba(148, 163, 184, 0.18);
    --line-soft: rgba(255, 255, 255, 0.08);
    --danger: #f2688a;
    --success: #40c792;
    --shadow: 0 10px 24px rgba(3, 8, 20, 0.22);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.shell {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100% - 28px));
    margin: 0 auto;
    padding: 20px 0 64px;
}

.layout-content {
    display: grid;
    gap: 24px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #0f172a;
    box-shadow: var(--shadow);
    position: sticky;
    top: 18px;
    z-index: 20;
}

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

.brand-block .muted {
    margin-bottom: 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-logo {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.brand-text {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.nav a,
.ghost {
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--muted);
    border: 1px solid transparent;
    transition: 150ms ease;
}

.nav a.active,
.nav a:hover,
.ghost:hover {
    background: rgba(109, 131, 255, 0.16);
    border-color: rgba(109, 131, 255, 0.2);
    color: var(--text);
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.site-footer {
    display: grid;
    gap: 16px;
    margin-top: 32px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--text);
}

.footer-link:hover {
    background: rgba(109, 131, 255, 0.16);
}

.admin-feed-banner {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 18px;
    border-color: rgba(109, 131, 255, 0.2);
    align-items: start;
}

.admin-feed-summary,
.admin-feed-list {
    display: grid;
    gap: 14px;
}

.admin-feed-summary {
    align-content: start;
}

.admin-feed-summary h2 {
    margin-bottom: 8px;
}

.admin-feed-list {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
}

.admin-feed-item {
    flex: 1 1 320px;
    max-width: 460px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.04);
}

.admin-feed-item h3 {
    margin-bottom: 10px;
}

.admin-feed-item p {
    margin-bottom: 0;
}

.admin-feed-excerpt {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.55;
    text-wrap: pretty;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.hero,
.dashboard-grid,
.form-grid,
.grid {
    display: grid;
    gap: 18px;
}

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

.dashboard-grid {
    grid-template-columns: 1fr 1.2fr;
    margin-bottom: 24px;
}

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

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

.quick-start-grid,
.tutorial-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.section {
    margin-top: 24px;
}

.page-stack {
    display: grid;
    gap: 24px;
}

.page-stack > .section {
    margin-top: 0;
}

.page-header-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
    gap: 18px;
    align-items: start;
}

.page-header-panel,
.page-side-panel {
    display: grid;
    gap: 16px;
}

.page-header-copy,
.page-side-panel > div {
    display: grid;
    gap: 10px;
}

.page-header-copy p,
.page-side-panel p,
.page-side-panel h2 {
    margin-bottom: 0;
}

.page-side-panel .profile-stats,
.page-side-panel .code-box {
    margin: 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
    margin-bottom: 14px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 700;
}

h1,
h2,
h3 {
    letter-spacing: -0.03em;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

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

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

label {
    display: grid;
    gap: 8px;
}

input,
textarea,
button,
.button {
    width: 100%;
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
}

input,
textarea {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

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

button,
.button {
    border: none;
    background: linear-gradient(180deg, var(--accent), #386fd8);
    color: white;
    cursor: pointer;
    text-align: center;
    font-weight: 700;
}

.button.secondary,
button.secondary,
.ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

button.danger {
    background: linear-gradient(180deg, #e06482, var(--danger));
}

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

.button-row .button,
.button-row button,
.button-row form {
    width: auto;
}

.slim-button {
    width: auto;
}

.follow-form {
    margin: 0;
}

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

.flash {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 18px;
}

.flash-success {
    background: rgba(31, 157, 97, 0.14);
    border: 1px solid rgba(31, 157, 97, 0.3);
}

.flash-error {
    background: rgba(216, 78, 106, 0.14);
    border: 1px solid rgba(216, 78, 106, 0.3);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(109, 131, 255, 0.16);
    color: #d4ddff;
    font-size: 0.78rem;
    font-weight: 700;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 10px;
}

.public-post,
.admin-post,
.creator-card,
.quick-start-card,
.tutorial-card {
    display: grid;
    gap: 12px;
}

.tutorial-hero {
    display: grid;
    gap: 16px;
}

.timeline-list {
    display: grid;
    gap: 16px;
}

.timeline-card {
    border-radius: 22px;
    background: var(--surface);
}

.reply-card {
    position: relative;
    padding-left: 28px;
}

.reply-card::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 18px;
    bottom: 18px;
    width: 2px;
    border-radius: 999px;
    background: rgba(99, 100, 255, 0.32);
}

.author-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.author-row.compact {
    grid-template-columns: auto minmax(0, 1fr);
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--surface-soft);
}

.author-avatar.large {
    width: 56px;
    height: 56px;
}

.author-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #36405f, #242c40);
    color: #fff;
    font-weight: 800;
}

.author-meta {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.author-line {
    display: block;
}

.author-avatar-link {
    display: inline-flex;
    width: fit-content;
    border-radius: 14px;
}

.author-name {
    display: block;
    font-size: 1rem;
    font-weight: 800;
}

.author-link {
    display: inline-flex;
    width: fit-content;
    color: inherit;
    text-decoration: none;
}

.author-subline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.author-subline,
.author-handle,
.author-date {
    color: var(--muted);
    font-size: 0.94rem;
}

.author-link:hover .author-name,
.author-link:hover .author-handle {
    color: var(--accent);
}

.author-avatar-link:focus-visible,
.author-link:focus-visible {
    outline: 2px solid rgba(99, 100, 255, 0.45);
    outline-offset: 3px;
}

.timeline-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.timeline-link:hover {
    background: rgba(99, 100, 255, 0.16);
}

.post-title {
    margin: 4px 0 0;
    font-size: clamp(1.15rem, 1rem + 0.5vw, 1.5rem);
    line-height: 1.28;
}

.post-title-link {
    color: inherit;
    text-decoration: none;
}

.post-title-link:hover {
    color: var(--accent);
}

.post-content {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.8;
    white-space: normal;
}

.post-card-clickable {
    cursor: pointer;
}

.post-card-clickable:focus-visible {
    outline: 2px solid rgba(99, 100, 255, 0.45);
    outline-offset: 4px;
}

.post-card-clickable:hover .post-title-link {
    color: var(--accent);
}

.post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
    color: var(--muted);
    font-size: 0.92rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.post-actions .inline-form {
    width: auto;
}

.action-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: 150ms ease;
}

.action-pill:hover {
    color: var(--text);
    border-color: rgba(99, 100, 255, 0.28);
    background: rgba(99, 100, 255, 0.12);
}

.action-pill.active {
    color: var(--text);
    border-color: rgba(99, 100, 255, 0.34);
    background: rgba(99, 100, 255, 0.18);
}

.action-count {
    color: var(--text);
    font-weight: 700;
}

.reply-context {
    position: relative;
    margin: 4px 0 12px;
    padding-left: 18px;
    font-size: 0.95rem;
}

.reply-context::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    border-radius: 999px;
    background: rgba(99, 100, 255, 0.34);
}

.reply-context-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}

.reply-context-label,
.reply-context-handle,
.reply-context-title {
    color: var(--muted);
}

.reply-context-link {
    color: #a8b0ff;
    font-weight: 700;
}

.reply-context-title {
    overflow-wrap: anywhere;
}

.reply-target {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
}

.reply-target h3,
.reply-target p {
    margin-bottom: 0;
}

.reply-page {
    gap: 20px;
}

.reply-page-header {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr);
    gap: 20px;
    align-items: start;
}

.reply-page-copy,
.reply-panel-head {
    display: grid;
    gap: 10px;
}

.reply-page-copy p,
.reply-page-copy h1,
.reply-panel-head p,
.reply-panel-head h2 {
    margin-bottom: 0;
}

.reply-page-stats {
    margin: 0;
    justify-content: flex-end;
}

.reply-layout {
    display: grid;
    grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.reply-context-panel,
.reply-compose-panel {
    display: grid;
    gap: 18px;
}

.reply-context-panel {
    position: sticky;
    top: 112px;
}

.reply-target-card {
    margin-bottom: 0;
    padding: 20px 20px 20px 34px;
    background: rgba(255, 255, 255, 0.03);
}

.reply-target-card.reply-preview-card {
    padding-left: 34px;
}

.reply-target-excerpt {
    line-height: 1.7;
}

.reply-target-actions {
    margin-top: 4px;
}

.reply-identity-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.03);
}

.reply-identity-card p {
    margin-bottom: 0;
}

.reply-compose-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.composer-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 700;
}

.reply-compose-form {
    gap: 18px;
}

.field-group {
    display: grid;
    gap: 10px;
}

.field-label {
    font-size: 0.95rem;
    font-weight: 700;
}

.field-hint {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.field-group-large textarea {
    min-height: 260px;
}

.reply-compose-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
    gap: 16px;
    align-items: start;
}

.reply-publish-toggle {
    padding: 16px 18px;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    align-items: flex-start;
}

.reply-publish-toggle span {
    display: grid;
    gap: 6px;
}

.reply-publish-toggle strong,
.reply-publish-toggle small {
    display: block;
}

.reply-action-row {
    padding-top: 4px;
}

.reddit-thread-page {
    gap: 20px;
}

.discussion-header-panel,
.discussion-header-copy,
.discussion-post-panel,
.comment-context-section,
.comment-list-panel,
.comment-login-panel {
    display: grid;
    gap: 18px;
}

.discussion-header-copy p,
.discussion-header-copy h1,
.discussion-section-head p,
.discussion-section-head h2 {
    margin-bottom: 0;
}

.discussion-section-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
}

.discussion-post-card {
    cursor: default;
}

.discussion-post-card.reply-card {
    padding-left: 22px;
}

.discussion-post-card.reply-card::before {
    display: none;
}

.discussion-post-card .timeline-link {
    display: none;
}

.discussion-post-card .post-title {
    font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.9rem);
}

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

.comment-composer-card-compact .comment-compose-avatar {
    width: 44px;
    height: 44px;
}

.comment-composer-header {
    display: grid;
    gap: 8px;
}

.comment-composer-shell {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.comment-compose-avatar {
    width: 52px;
    height: 52px;
}

.comment-compose-form {
    gap: 16px;
}

.comment-composer-card-compact .field-group-large textarea {
    min-height: 170px;
}

.comment-compose-meta {
    display: grid;
    gap: 6px;
}

.comment-target-link {
    color: #b9c7ff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.comment-compose-footer {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr);
    gap: 16px;
    align-items: start;
}

.comment-upload-field {
    min-width: 0;
}

.comment-publish-toggle {
    min-height: 100%;
}

.comment-compose-actions {
    align-items: center;
}

.comment-context-stack,
.comment-tree {
    display: grid;
    gap: 16px;
}

.comment-thread-node {
    display: grid;
    gap: 14px;
}

.comment-children {
    display: grid;
    gap: 14px;
    margin-left: 18px;
    padding-left: 18px;
    border-left: 2px solid rgba(255, 255, 255, 0.08);
}

.comment-card {
    display: grid;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.comment-card-highlighted {
    border-color: rgba(109, 131, 255, 0.34);
    background: rgba(109, 131, 255, 0.08);
}

.comment-card-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
}

.comment-card-meta {
    min-width: 0;
}

.comment-card-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.92rem;
}

.comment-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(109, 131, 255, 0.16);
    color: #d8e1ff;
    font-size: 0.72rem;
    font-weight: 700;
}

.comment-permalink {
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.comment-card-body {
    font-size: 0.98rem;
    line-height: 1.7;
}

.comment-image-row {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.comment-card .post-actions {
    gap: 14px;
    padding-top: 0;
    border-top: 0;
    font-size: 0.88rem;
}

.comment-card .action-pill {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
}

.comment-card .action-pill:hover,
.comment-card .action-pill.active {
    background: transparent;
    border-color: transparent;
    color: #c8d3ff;
}

.comment-card .action-count {
    color: inherit;
}

.comment-owner-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: -2px;
}

.comment-owner-link {
    display: inline-flex;
    align-items: center;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.comment-owner-link:hover {
    color: #c8d3ff;
}

.comment-owner-delete {
    color: #f3a3b8;
}

.comment-owner-delete:hover {
    color: #ffd0da;
}

.comment-count-label {
    margin: 0;
}

.discussion-empty {
    box-shadow: none;
}

.post-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.92rem;
}

.post-thread-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted);
    font-size: 0.92rem;
}

.post-thread-summary strong {
    color: var(--text);
    font-size: 0.95rem;
}

.thread-section {
    display: grid;
    gap: 16px;
}

.thread-section-timeline {
    overflow: hidden;
    padding: 18px 0 0;
    gap: 0;
}

.thread-section-timeline .section-head {
    padding: 0 20px 16px;
    margin-bottom: 0;
}

.thread-timeline {
    display: grid;
    gap: 0;
}

.thread-entry {
    position: relative;
    padding: 0 20px 0 44px;
}

.thread-entry::before {
    content: "";
    position: absolute;
    left: 18px;
    top: -16px;
    bottom: -16px;
    width: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.thread-entry::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 22px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #7e86d8;
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 4px rgba(99, 100, 255, 0.1);
}

.thread-entry:first-child::before {
    top: 34px;
}

.thread-entry:last-child::before {
    bottom: 34px;
}

.thread-entry-focus::after {
    background: var(--accent);
}

.thread-entry-root::after {
    background: #9ca3bf;
}

.thread-entry + .thread-entry {
    margin-top: 2px;
}

.thread-focus-label {
    margin: 0 0 10px;
    padding-left: 0;
}

.thread-post-card {
    padding: 18px 0 16px;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.thread-entry-root .thread-post-card {
    border-top: 0;
}

.thread-post-card .author-row {
    align-items: center;
}

.thread-post-card .author-avatar {
    width: 46px;
    height: 46px;
    border-radius: 12px;
}

.thread-post-card .timeline-link {
    display: none;
}

.thread-post-card .reply-context {
    display: none;
}

.thread-post-card .post-title {
    margin-top: 2px;
    font-size: 1.05rem;
}

.thread-post-card .post-content {
    line-height: 1.65;
}

.thread-post-card .post-actions {
    gap: 20px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.thread-post-card .action-pill {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
}

.thread-post-card .action-pill:hover,
.thread-post-card .action-pill.active {
    background: transparent;
    border-color: transparent;
    color: #b8bef3;
}

.thread-post-card .action-count {
    color: inherit;
    font-weight: 700;
}

.thread-post-card.post-card-clickable:hover {
    background: rgba(255, 255, 255, 0.02);
}

.thread-timeline-replies .empty,
.thread-empty {
    margin-left: 36px;
}

.conversation-count {
    margin: 0;
}

.reply-preview-card {
    position: relative;
    padding-left: 28px;
}

.reply-preview-card::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 18px;
    bottom: 18px;
    width: 2px;
    border-radius: 999px;
    background: rgba(99, 100, 255, 0.28);
}

.code-box {
    display: grid;
    gap: 10px;
    align-content: start;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 18px;
}

.code-box code {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.18);
    overflow-wrap: anywhere;
}

.inline-code-block {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.18);
    overflow-wrap: anywhere;
    font-family: "Cascadia Code", Consolas, monospace;
}

.compact {
    margin-top: 12px;
}

.profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
}

.profile-stats.compact {
    margin-top: 12px;
}

.profile-stats.compact.reply-page-stats {
    margin: 0;
}

.stat-pill {
    display: inline-grid;
    gap: 2px;
    min-width: 120px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.stat-pill:hover {
    background: rgba(99, 100, 255, 0.12);
}

.stat-pill strong {
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.stat-pill span {
    color: var(--muted);
    font-size: 0.92rem;
}

.captcha-box {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
}

.settings-stack {
    display: grid;
    gap: 24px;
}

.settings-theme-note {
    display: grid;
    gap: 10px;
    align-content: start;
    padding: 16px 18px;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
}

.settings-theme-note p {
    margin-bottom: 0;
}

.form-note {
    margin: 0;
}

.admin-page {
    gap: 28px;
}

.admin-inline-card {
    display: grid;
    gap: 12px;
    padding: 18px 20px;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
}

.admin-inline-card h3,
.admin-inline-card p {
    margin-bottom: 0;
}

.admin-user-grid {
    align-items: start;
}

.captcha-label {
    display: inline-block;
    font-weight: 700;
}

.captcha-image {
    width: min(100%, 340px);
    border-radius: 14px;
    border: 1px solid var(--border);
    background: white;
}

button[disabled],
.button[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.narrow {
    width: min(620px, 100%);
    margin: 0 auto;
}

.wide {
    width: min(920px, 100%);
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox input {
    width: auto;
}

.checkbox.reply-publish-toggle {
    align-items: flex-start;
    gap: 12px;
}

.image-row,
.image-grid {
    display: grid;
    gap: 12px;
}

.image-row {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.image-row img,
.image-grid img,
.card-check img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--border);
}

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

.card-check {
    align-items: start;
    grid-template-columns: auto 1fr 100px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
}

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

.relationship-panel {
    display: grid;
    gap: 16px;
    align-content: start;
}

.relationship-panel .section-head {
    margin-bottom: 0;
}

.tutorial-list {
    display: grid;
    gap: 8px;
    padding-left: 20px;
    margin: 0;
}

.empty {
    text-align: center;
}

.profile-hero {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    min-height: 220px;
}

.profile-theme-scope {
    --profile-accent: var(--accent);
}

.profile-theme-scope .eyebrow {
    color: var(--profile-accent);
}

.profile-overlay {
    background: rgba(18, 20, 31, 0.88);
    padding: 16px;
    border-radius: 12px;
}

.profile-theme-scope .profile-overlay {
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 3px 0 var(--profile-accent);
}

.avatar {
    width: 92px;
    height: 92px;
    border-radius: 18px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 12px;
}

.profile-theme-scope .avatar {
    border-color: var(--profile-accent);
}

.profile-theme-scope .profile-stat-pill {
    border-color: var(--profile-accent);
    background: rgba(255, 255, 255, 0.04);
}

.profile-theme-scope .profile-stat-pill:hover {
    background: rgba(255, 255, 255, 0.08);
}

.profile-theme-scope .profile-hero .button:not(.secondary),
.profile-theme-scope .profile-hero button:not(.secondary) {
    background: var(--profile-accent);
}

.profile-theme-scope .profile-hero .button.secondary:hover,
.profile-theme-scope .profile-hero button.secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px var(--profile-accent);
    color: #fff;
}

.post-page {
    width: min(900px, 100%);
    margin: 0 auto;
}

.rich-text {
    line-height: 1.7;
}

.rich-text > :first-child {
    margin-top: 0;
}

.rich-text > :last-child {
    margin-bottom: 0;
}

.rich-text a {
    color: #a8b0ff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rich-text p,
.rich-text ul,
.rich-text ol,
.rich-text blockquote,
.rich-text pre,
.rich-text hr {
    margin: 0 0 16px;
}

.rich-text ul,
.rich-text ol {
    padding-left: 22px;
}

.rich-text li + li {
    margin-top: 6px;
}

.rich-text blockquote {
    padding: 14px 16px;
    border-left: 3px solid rgba(99, 100, 255, 0.55);
    border-radius: 0 14px 14px 0;
    background: rgba(255, 255, 255, 0.02);
    color: #d8dcf7;
}

.rich-text code {
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 0.95em;
}

.rich-text pre {
    overflow-x: auto;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.rich-text pre code {
    padding: 0;
    background: transparent;
}

.rich-text hr {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-summary-card {
    gap: 14px;
}

.profile-summary-card p {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .topbar,
    .admin-feed-banner,
    .hero,
    .page-header-grid,
    .reply-page-header,
    .reply-layout,
    .comment-composer-shell,
    .comment-compose-footer,
    .dashboard-grid,
    .form-grid,
    .reply-compose-grid,
    .relationship-panels {
        grid-template-columns: 1fr;
    }

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

    .brand-logo {
        width: 38px;
        height: 38px;
    }

    .card-check {
        grid-template-columns: 1fr;
    }

    .author-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .timeline-link {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .discussion-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .reply-context-panel {
        position: static;
    }

    .reply-page-stats {
        justify-content: flex-start;
    }

    .comment-children {
        margin-left: 12px;
        padding-left: 12px;
    }

    .thread-entry::before {
        left: 18px;
    }

    .thread-entry::after {
        left: 12px;
    }
}
