:root {
    --ink: #202124;
    --muted: #62666d;
    --line: #d9dadd;
    --surface: #ffffff;
    --canvas: #f4f5f3;
    --accent: #c83f32;
    --accent-dark: #a92f25;
    --success: #217a52;
    --success-soft: #e9f5ef;
    --danger: #ad2d2d;
    --danger-soft: #faecea;
    --focus: #176b87;
    --kendo-color-primary: #c83f32;
    --kendo-color-primary-hover: #a92f25;
}

/* Feed discovery and private-interest controls share a restrained card language so
   personalisation feels like an account choice rather than an advertising profile. */
.feed-tabs {
    display: flex;
    gap: .5rem;
    margin: 0 0 1.25rem;
    overflow-x: auto;
}

.feed-tab,
.interest-tag {
    border: 1px solid var(--border, #d8dce5);
    border-radius: 999px;
    background: #fff;
    color: inherit;
    cursor: pointer;
    font: inherit;
}

.feed-tab {
    padding: .65rem 1rem;
    white-space: nowrap;
}

.feed-tab.active,
.interest-tag.selected {
    border-color: #5b4ee8;
    background: #5b4ee8;
    color: #fff;
}

.feed-reason {
    color: #665db5;
    font-size: .82rem;
    text-decoration: none;
}

.interest-page,
.search-page {
    width: min(100%, 64rem);
    margin: 0 auto;
}

.interest-card,
.selected-search-tags,
.search-section {
    margin: 1rem 0;
    padding: 1.25rem;
    border: 1px solid var(--border, #d8dce5);
    border-radius: 1rem;
    background: #fff;
}

.interest-card-heading,
.search-section-heading,
.interest-actions,
.unified-search,
.interest-search {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.interest-card-heading,
.search-section-heading {
    justify-content: space-between;
}

.interest-count {
    white-space: nowrap;
    color: #5b4ee8;
}

.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin: 1rem 0;
}

.interest-tag {
    padding: .5rem .8rem;
}

.interest-search,
.unified-search {
    align-items: stretch;
    margin: 1rem 0;
}

.consent-choice,
.match-toggle {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
}

.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: .8rem;
}

.recommendation-card,
.search-post {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1rem;
    border: 1px solid var(--border, #d8dce5);
    border-radius: .8rem;
    color: inherit;
    text-decoration: none;
}

.recommendation-member-heading {
    display: flex;
    align-items: center;
    gap: .7rem;
}

.search-post + .search-post {
    margin-top: .75rem;
}

@media (max-width: 640px) {
    .interest-card-heading,
    .search-section-heading,
    .interest-actions,
    .unified-search,
    .interest-search {
        align-items: stretch;
        flex-direction: column;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.k-body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    letter-spacing: 0;
}

a {
    color: var(--accent-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--accent);
}

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

h1 {
    margin-bottom: 0.65rem;
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    line-height: 1.12;
    letter-spacing: 0;
}

h1:focus {
    outline: none;
}

h2 {
    margin-bottom: 0.35rem;
    font-size: 1.05rem;
    line-height: 1.3;
    letter-spacing: 0;
}

.k-button {
    min-height: 2.75rem;
    border-radius: 4px;
    font-weight: 650;
    letter-spacing: 0;
}

.k-input,
.k-picker {
    min-height: 2.8rem;
    border-radius: 4px;
}

.k-input:focus-within,
.k-picker:focus-within {
    outline: 3px solid color-mix(in srgb, var(--focus) 25%, transparent);
    outline-offset: 1px;
}

.account-shell {
    min-height: 100vh;
}

.account-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 2.5rem 1rem;
}

.account-panel {
    width: min(100%, 760px);
    padding: clamp(1.5rem, 5vw, 3rem);
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 12px 30px rgba(32, 33, 36, 0.07);
}

.account-panel-narrow {
    width: min(100%, 480px);
}

.wordmark,
.app-wordmark {
    color: var(--ink);
    font-size: 1.35rem;
    font-weight: 800;
    text-decoration: none;
}

.wordmark {
    display: inline-block;
    margin-bottom: 2.5rem;
}

.account-heading {
    margin-bottom: 2rem;
}

.account-heading p,
.page-heading p,
.completion-state p,
.verification-action p,
.activation-row p {
    color: var(--muted);
    line-height: 1.55;
}

.eyebrow {
    margin-bottom: 0.65rem;
    color: var(--accent-dark) !important;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.account-form {
    display: grid;
    gap: 1.25rem;
}

.full-width-button > .k-button {
    width: 100%;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
}

.field {
    display: grid;
    min-width: 0;
    gap: 0.4rem;
}

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

.field label,
.legal-actions legend {
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 700;
}

.optional,
.field-hint,
.document-version {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 400;
}

.validation-message {
    color: var(--danger);
    font-size: 0.82rem;
    line-height: 1.35;
}

.legal-actions {
    display: grid;
    gap: 0.85rem;
    margin: 0;
    padding: 1.15rem 0 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.legal-actions legend {
    margin-bottom: 0.8rem;
}

.legal-action,
.inline-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.legal-action label,
.inline-check label {
    line-height: 1.45;
}

.document-version {
    margin-left: 0.35rem;
}

.notice {
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #f8f8f7;
    line-height: 1.45;
}

.notice ul {
    margin: 0.55rem 0 0;
    padding-left: 1.2rem;
}

.notice-error {
    border-color: #e3b3ae;
    background: var(--danger-soft);
    color: #7d2020;
}

.notice-success {
    border-color: #aad3be;
    background: var(--success-soft);
    color: #155a3b;
}

.account-switch {
    margin: 0;
    padding-top: 1.5rem;
    color: var(--muted);
    text-align: center;
}

.completion-state {
    text-align: center;
}

.completion-state .muted {
    max-width: 520px;
    margin-right: auto;
    margin-left: auto;
}

.status-mark {
    display: grid;
    width: 3.25rem;
    height: 3.25rem;
    margin: 0 auto 1.25rem;
    place-items: center;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 800;
}

.status-mark-success {
    background: var(--success-soft);
    color: var(--success);
}

.status-mark-error {
    background: var(--danger-soft);
    color: var(--danger);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.primary-link {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.8rem 1.2rem;
    border-radius: 4px;
    background: var(--accent);
    color: white;
    font-weight: 700;
    text-decoration: none;
}

.primary-link:hover {
    background: var(--accent-dark);
    color: white;
}

.app-shell {
    min-height: 100vh;
}

.app-header {
    display: flex;
    min-height: 4.25rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem max(1rem, calc((100vw - 1080px) / 2));
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.app-header nav {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.app-header nav a {
    color: var(--ink);
    font-weight: 650;
    text-decoration: none;
}

.app-header nav .nav-primary {
    padding: 0.65rem 0.9rem;
    border-radius: 4px;
    background: var(--accent);
    color: white;
}

.app-content {
    width: min(100%, 1080px);
    margin: 0 auto;
    padding: 2.5rem 1rem 4rem;
}

.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem max(1rem, calc((100vw - 1080px) / 2));
    border-top: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.82rem;
}

.app-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.9rem;
}

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

.legal-heading {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--line);
}

.document-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1.5rem 0 0;
}

.document-metadata div {
    display: grid;
    grid-template-columns: auto auto;
    gap: 0.4rem;
}

.document-metadata dt {
    color: var(--muted);
    font-weight: 650;
}

.document-metadata dd {
    margin: 0;
}

.legal-document {
    padding: 1.5rem 0;
}

.legal-document section {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--line);
}

.legal-document h2 {
    font-size: 1.25rem;
}

.legal-document p,
.legal-document li {
    line-height: 1.7;
}

.legal-document ul {
    padding-left: 1.35rem;
}

.legal-contact {
    margin: 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.activation-page {
    display: grid;
    gap: 1.5rem;
}

.page-heading {
    max-width: 690px;
}

.activation-list {
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.activation-row {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    min-height: 6.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.activation-row p {
    margin-bottom: 0;
}

.gate-icon {
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 800;
}

.gate-complete {
    background: var(--success-soft);
    color: var(--success);
}

.gate-pending {
    background: #eeefec;
    color: #555a60;
}

.status-label {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 750;
    text-transform: uppercase;
}

.verification-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: 4px;
    background: var(--surface);
}

.verification-action .status-mark {
    flex: 0 0 auto;
    margin: 0;
}

.verification-action p {
    max-width: 720px;
    margin-bottom: 0;
}

.activation-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.route-loading {
    padding: 4rem 1rem;
    color: var(--muted);
    text-align: center;
}

/* Home redirects as soon as the secure session check completes.  Avoid flashing
   implementation text while retaining an announcement for screen-reader users. */
.route-loading--silent {
    min-height: 0;
    padding: 0;
}

.member-page {
    display: grid;
    gap: 2rem;
    width: min(100%, 860px);
    margin: 0 auto;
}

.profile-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
}

.secondary-link {
    flex: 0 0 auto;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

.profile-form,
.settings-section {
    display: grid;
    gap: 1.5rem;
}

.settings-section {
    padding: 1.5rem 0;
    border-top: 1px solid var(--line);
}

.settings-section-heading p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.5;
}

.profile-photo-layout {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.profile-photo-preview,
.profile-photo-pending img {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #eef0ed;
}

.profile-photo-preview {
    display: grid;
    width: 9rem;
    aspect-ratio: 1;
    place-items: center;
    color: #3f4449;
    font-size: 2.5rem;
    font-weight: 800;
}

.profile-photo-preview img,
.profile-photo-pending img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-controls,
.profile-photo-pending,
.profile-photo-state,
.profile-photo-crop-workspace {
    display: grid;
    gap: 0.75rem;
}

.profile-photo-controls {
    justify-items: start;
}

.profile-photo-pending {
    grid-template-columns: 4.5rem minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.profile-photo-pending img {
    width: 4.5rem;
    aspect-ratio: 1;
}

.profile-photo-state {
    gap: 0.15rem;
}

.profile-photo-state span {
    color: var(--muted);
    font-size: 0.9rem;
}

.profile-photo-crop-workspace {
    width: min(100%, 38rem);
}

.profile-photo-cropper {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #161819;
}

.profile-photo-cropper cropper-canvas {
    width: 100%;
    height: 100%;
}

.social-link-list {
    display: grid;
    border-top: 1px solid var(--line);
}

.social-link-row {
    display: grid;
    grid-template-columns: 8rem minmax(0, 1fr) minmax(11rem, 0.55fr);
    gap: 1rem;
    align-items: center;
    min-height: 4.75rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.5rem;
}

.member-profile-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--line);
}

.member-profile-header h1 {
    margin-bottom: 0.35rem;
}

.profile-initial {
    display: grid;
    width: 3.5rem;
    height: 3.5rem;
    flex: 0 0 3.5rem;
    place-items: center;
    border: 1px solid #c8cacd;
    border-radius: 50%;
    background: #eef0ed;
    color: #3f4449;
    font-size: 1.25rem;
    font-weight: 800;
}

.member-thumbnail,
.member-profile-photo {
    flex: 0 0 auto;
    border: 1px solid #c8cacd;
    border-radius: 50%;
    background: #eef0ed;
    object-fit: cover;
}

.member-thumbnail {
    width: 3.5rem;
    height: 3.5rem;
}

.member-profile-photo {
    width: 7rem;
    height: 7rem;
}

.member-handle,
.member-location {
    margin-bottom: 0;
    color: var(--muted);
}

.member-handle {
    font-size: 0.86rem;
    font-weight: 700;
}

.profile-content {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.profile-bio {
    margin-bottom: 0;
    line-height: 1.65;
    white-space: pre-wrap;
}

.social-profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}

.member-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    width: min(100%, 640px);
}

.member-results {
    display: grid;
    border-top: 1px solid var(--line);
}

.member-result {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr) minmax(8rem, auto);
    gap: 1rem;
    align-items: center;
    min-height: 5.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
}

.member-result:hover {
    color: var(--ink);
    background: #f9f9f7;
}

.member-result-main {
    display: grid;
    gap: 0.25rem;
}

.member-result-main span,
.member-result-location {
    color: var(--muted);
    font-size: 0.86rem;
}

.member-result-location {
    text-align: right;
}

.empty-state {
    padding: 2rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.empty-state p {
    color: var(--muted);
}

.feed-page {
    display: grid;
    gap: 1.5rem;
    width: min(100%, 760px);
    margin: 0 auto;
}

.feed-heading,
.composer-options,
.post-header,
.post-actions,
.post-metrics,
.inline-actions,
.follow-request {
    display: flex;
    align-items: center;
}

.feed-heading,
.post-header,
.follow-request {
    justify-content: space-between;
}

.post-composer {
    display: grid;
    gap: 1rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.composer-options {
    flex-wrap: wrap;
    gap: 0.8rem;
}

.compact-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.media-picker {
    position: relative;
    overflow: hidden;
}

.media-picker input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.selected-media {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    color: var(--muted);
    font-size: 0.86rem;
}

.text-command,
.report-command,
.post-action,
.comment-actions button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-weight: 650;
}

.feed-stream {
    display: grid;
    gap: 1rem;
}

.feed-post {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.post-header {
    align-items: flex-start;
    gap: 0.8rem;
}

.shared-header,
.relationship-member {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.shared-header {
    justify-content: space-between;
}

.follow-pill {
    min-width: 5.6rem;
    min-height: 2rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
}

.follow-pill.available {
    border-color: var(--accent);
    color: var(--accent);
}

.follow-pill.pending,
.follow-pill.following {
    background: var(--canvas);
}

.follow-pill:disabled {
    cursor: wait;
    opacity: 0.65;
}

.post-byline,
.shared-byline,
.follow-request > div:first-child {
    display: grid;
    flex: 1;
    gap: 0.15rem;
}

.post-byline span,
.shared-byline span,
.comment-heading span,
.follow-request span {
    color: var(--muted);
    font-size: 0.8rem;
}

.post-byline a,
.shared-byline a,
.comment-heading a,
.follow-request a {
    color: var(--ink);
    text-decoration: none;
}

.post-body {
    margin: 0;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.shared-post {
    display: grid;
    gap: 0.8rem;
    padding-left: 1rem;
    border-left: 3px solid var(--line);
}

.post-media {
    display: grid;
    gap: 3px;
    overflow: hidden;
    border-radius: 4px;
    background: #151617;
}

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

.post-media img,
.post-media video {
    display: block;
    width: 100%;
    max-height: 36rem;
    aspect-ratio: 4 / 3;
    background: #151617;
    object-fit: contain;
}

.post-media.grid img {
    height: 17rem;
    object-fit: cover;
}

.reaction-summary,
.post-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.post-metrics {
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--line);
}

.post-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-action {
    min-width: 5rem;
    min-height: 2.25rem;
    padding: 0.35rem 0.6rem;
    border-radius: 3px;
}

.post-action:hover,
.post-action.active {
    background: #efefec;
    color: var(--ink);
}

.danger-command {
    color: var(--danger);
}

.reaction-picker {
    position: relative;
}

.reaction-tray {
    position: absolute;
    z-index: 20;
    bottom: calc(100% + 0.35rem);
    left: 0;
    display: none;
    grid-template-columns: repeat(5, 2.5rem);
    gap: 0.15rem;
    padding: 0.35rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 6px 18px rgba(32, 33, 36, 0.15);
}

.reaction-picker:hover .reaction-tray,
.reaction-picker:focus-within .reaction-tray {
    display: grid;
}

.reaction-tray button {
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    font-size: 1.35rem;
}

.reaction-tray button:hover,
.reaction-tray button:focus {
    background: #efefec;
}

.inline-panel,
.inline-editor,
.comments {
    display: grid;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.inline-panel h2 {
    font-size: 0.95rem;
}

.inline-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.report-warning {
    margin: 0;
    color: var(--danger);
    font-size: 0.86rem;
    line-height: 1.45;
}

.comment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
}

.comment {
    display: grid;
    gap: 0.45rem;
    margin-left: min(calc(var(--comment-level) * 1.5rem), 6rem);
    padding: 0.8rem 0 0.8rem 0.8rem;
    border-left: 2px solid var(--line);
}

.comment p {
    margin: 0;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.comment-heading,
.comment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.7rem;
}

.comment-actions button {
    font-size: 0.78rem;
}

.follow-requests {
    border-top: 1px solid var(--line);
}

.follow-request {
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.relationship-page {
    display: grid;
    gap: 2rem;
}

.relationship-page section {
    min-width: 0;
}

.relationship-table {
    width: 100%;
    border-collapse: collapse;
}

.relationship-table th,
.relationship-table td {
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.relationship-table th {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.relationship-table td:last-child {
    text-align: right;
}

.relationship-member > div,
.relationship-table td:first-child {
    min-width: 0;
}

.relationship-member > div,
.relationship-table td:first-child {
    gap: 0.15rem;
}

.relationship-member > div {
    display: grid;
}

.relationship-member a,
.relationship-table td:first-child > a {
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

.relationship-member span,
.relationship-table td:first-child > span {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
}

.dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgb(18 22 24 / 58%);
}

.confirm-dialog {
    width: min(100%, 420px);
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 18px 50px rgb(0 0 0 / 24%);
}

.confirm-dialog h2 {
    font-size: 1.15rem;
}

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

#blazor-error-ui {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 1000;
    display: none;
    padding: 1rem 2.5rem 1rem 1rem;
    border: 1px solid #e3b3ae;
    border-radius: 4px;
    background: var(--danger-soft);
    color: #7d2020;
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: 0.65rem;
    right: 0.85rem;
    cursor: pointer;
}

.loading-progress {
    position: absolute;
    display: block;
    width: 6rem;
    height: 6rem;
    inset: 22vh 0 auto;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: var(--line);
    stroke-width: 0.55rem;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.loading-progress circle:last-child {
    /* The Blazor startup indicator is shown before any page component loads,
       so it uses Tremblr's stable brand blue directly. */
    stroke: #0175bd;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    inset: calc(22vh + 2.35rem) 0 auto;
    color: var(--muted);
    text-align: center;
}

.loading-progress-text::after {
    content: var(--blazor-load-percentage-text, "Loading");
}

@media (max-width: 700px) {
    .account-page {
        display: block;
        padding: 0;
    }

    .account-panel {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

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

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

    .profile-heading,
    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .social-link-row {
        grid-template-columns: 1fr;
        gap: 0.65rem;
        padding: 1rem 0;
    }

    .profile-photo-layout {
        grid-template-columns: 1fr;
    }

    .profile-photo-preview {
        width: 7rem;
    }

    .profile-photo-pending {
        grid-template-columns: 4rem minmax(0, 1fr);
    }

    .profile-photo-pending img {
        width: 4rem;
    }

    .profile-photo-pending .k-button {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .member-search {
        grid-template-columns: 1fr;
    }

    .member-result {
        grid-template-columns: 3.5rem minmax(0, 1fr);
    }

    .member-result-location {
        grid-column: 2;
        text-align: left;
    }

    .app-header {
        min-height: 3.75rem;
    }

    .app-header nav {
        gap: 0.65rem;
    }

    .app-header {
        align-items: flex-start;
        gap: 0.5rem;
    }

    .app-header nav {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .composer-options,
    .post-actions,
    .follow-request {
        align-items: stretch;
        flex-direction: column;
    }

    .post-header {
        flex-wrap: wrap;
    }

    .post-header .post-byline {
        min-width: calc(100% - 4rem);
    }

    .post-header .follow-pill {
        margin-left: 3.5rem;
    }

    .relationship-table,
    .relationship-table tbody,
    .relationship-table tr,
    .relationship-table td {
        display: block;
        width: 100%;
    }

    .relationship-table thead {
        display: none;
    }

    .relationship-table tr {
        padding: 0.8rem 0;
        border-bottom: 1px solid var(--line);
    }

    .relationship-table td {
        padding: 0.3rem 0;
        border: 0;
        text-align: left;
    }

    .relationship-table td:last-child {
        padding-top: 0.6rem;
        text-align: left;
    }

    .post-media.grid img {
        height: 11rem;
    }

    .comment {
        margin-left: min(calc(var(--comment-level) * 0.65rem), 2.6rem);
    }

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

    .activation-row {
        grid-template-columns: 2.5rem minmax(0, 1fr);
    }

    .status-label {
        grid-column: 2;
    }

    .verification-action,
    .activation-footer,
    .app-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .app-footer nav {
        justify-content: flex-start;
    }
}
.tag-editor { display: grid; gap: .45rem; }
.tag-chips, .post-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag-chip, .post-tag { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .5rem; border: 1px solid #b8c2cc; border-radius: 4px; background: #f4f6f8; color: #24303b; font-size: .875rem; }
.tag-chip button { width: 1.25rem; height: 1.25rem; padding: 0; border: 0; background: transparent; color: #4a5560; font-size: 1rem; line-height: 1; cursor: pointer; }
.tag-input { width: 100%; min-height: 2.5rem; padding: .55rem .7rem; border: 1px solid #9aa6b2; border-radius: 4px; background: #fff; color: #17212b; }
.tag-input:focus { outline: 2px solid #1473e6; outline-offset: 1px; }
.post-tags { margin-block: .65rem; }
.post-content-link { color: inherit; text-decoration: none; }
.post-content-link:hover .post-body { text-decoration: underline; }
.post-content-link:focus-visible { outline: 2px solid #1473e6; outline-offset: 2px; }
.post-media > a { display: block; }
.message-compose { display: grid; gap: .75rem; }
.member-posts { display: grid; gap: 1rem; }
