:root {
    --apkt-font-family: var(--bs-body-font-family);
    --apkt-fontFamily-regular: var(--bs-body-font-family);
    --apkt-borderRadius-2: 8px;
    --apkt-borderRadius-3: 8px;

    --support-ink: var(--l2p-ink, #12143a);
    --support-ink-2: var(--l2p-ink-2, #1f2468);
    --support-glow: var(--l2p-glow, #959afd);
    --support-display: var(--l2p-display, 'Sora', sans-serif);
    --support-mono: var(--l2p-mono, ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace);
    --support-rail: color-mix(in srgb, var(--bs-body-color) 20%, transparent);
}

.section-title,
.panel-title,
.step-title,
.ticket-subject {
    font-family: var(--support-display);
    letter-spacing: -0.01em;
}

h1 highlight-label,
h2 highlight-label,
h3 highlight-label {
    color: var(--bs-primary);
}

.mono {
    font-family: var(--support-mono);
}

.brand-text {
    font-family: Artemus, sans-serif;
    line-height: 1;
    color: #272a64;
    transform: translateY(0.1em);
}

html[data-bs-theme=dark] .brand-text {
    color: rgba(222, 226, 230, 0.75);
}

.brand-suffix {
    margin-left: 0.4rem;
    padding: 0.1rem 0.45rem;
    border-radius: 0.35rem;
    font-family: var(--support-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-primary);
    background-color: color-mix(in srgb, var(--bs-primary) 12%, transparent);
}

.navbar .nav-link {
    font-weight: 500;
    white-space: nowrap;
}

.navbar .navbar-toggler {
    margin-left: auto;
    order: 1;
}

.navbar .navbar-toggler:focus {
    box-shadow: none;
}

.navbar .navbar-toggler:focus-visible {
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--bs-primary) 40%, transparent);
}

@media (max-width: 991.98px) {
    .navbar-brand {
        margin-right: auto;
    }
}

@media (max-width: 575.98px) {
    .brand-suffix {
        display: none;
    }
}

.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    background-color: color-mix(in srgb, var(--bs-body-bg) 72%, transparent);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid color-mix(in srgb, var(--bs-border-color) 60%, transparent);
    box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.28);
}

.header-fixed:has(.offcanvas.showing),
.header-fixed:has(.offcanvas.show),
.header-fixed:has(.offcanvas.hiding) {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -100%, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fadeInDown {
    animation: fadeInDown 0.4s ease backwards;
}

.skip-link {
    position: absolute;
    left: 0.75rem;
    top: -3.5rem;
    z-index: 1080;
    padding: 0.55rem 0.95rem;
    border-radius: 0.6rem;
    background-color: var(--bs-primary);
    color: #fff;
    text-decoration: none;
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 0.75rem;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
    border-radius: 0.35rem;
}

.container.narrow {
    max-width: 42rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--bs-primary);
}

.section-title {
    font-weight: 700;
}

.live-dot {
    flex: 0 0 auto;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: var(--bs-success);
    animation: live-pulse 2s ease-out infinite;
}

@keyframes live-pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bs-success) 55%, transparent); }
    70% { box-shadow: 0 0 0 0.5rem transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

.surface-card {
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(18, 20, 58, 0.04), 0 5px 14px -10px rgba(18, 20, 58, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.pill-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.9rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    color: var(--bs-primary);
    border: 1px solid color-mix(in srgb, var(--bs-primary) 35%, transparent);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pill-link:hover {
    color: var(--bs-primary);
    background-color: color-mix(in srgb, var(--bs-primary) 10%, transparent);
    border-color: color-mix(in srgb, var(--bs-primary) 55%, transparent);
}

.tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.8rem;
    font-size: 1.4rem;
    color: var(--bs-primary);
    background-color: color-mix(in srgb, var(--bs-primary) 14%, transparent);
}

.home-band {
    position: relative;
    overflow: hidden;
    padding: 3.25rem 0 3.5rem;
    color: #fff;
    background:
        radial-gradient(1000px 460px at 14% -20%, color-mix(in srgb, var(--support-glow) 38%, transparent), transparent 60%),
        linear-gradient(158deg, var(--support-ink-2), var(--support-ink));
}

html[data-bs-theme=dark] .home-band {
    background:
        radial-gradient(1000px 460px at 14% -20%, color-mix(in srgb, var(--support-glow) 38%, transparent), transparent 60%),
        linear-gradient(158deg, color-mix(in srgb, var(--support-ink-2) 50%, var(--bs-body-bg)), var(--bs-body-bg));
}

.home-band-inner {
    position: relative;
    z-index: 1;
    max-width: 36rem;
}

.home-band .surface-card {
    color: var(--bs-body-color);
    box-shadow: 0 26px 60px -32px rgba(0, 0, 0, 0.6);
}

.home-band .surface-card .eyebrow {
    color: var(--bs-primary);
}

.home-band .eyebrow {
    color: color-mix(in srgb, var(--support-glow) 62%, #fff);
}

.home-band-title {
    font-family: var(--support-display);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    font-size: clamp(2.1rem, 4.5vw, 3.1rem);
    margin: 0.55rem 0 0.6rem;
}

.home-band-lead {
    max-width: 34rem;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.05rem;
}

.home-ask {
    max-width: 34rem;
    margin-top: 1.6rem;
}

.ask-group .form-control {
    padding-left: 1rem;
}

.ask-group .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
}

.home-ask-hint {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.62);
}

.home-start {
    padding-top: 2.75rem;
}

.home-channels {
    padding-top: 3.5rem;
    padding-bottom: 1.5rem;
}

.step-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.step {
    position: relative;
    display: flex;
    gap: 1.1rem;
}

.step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 1.12rem;
    top: 2.6rem;
    bottom: -1.4rem;
    width: 1px;
    height: auto;
    background-color: var(--bs-border-color);
}

@media (min-width: 768px) {
    .step-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.25rem;
    }

    .step {
        flex-direction: column;
        gap: 0.9rem;
    }

    .step:not(:last-child)::before {
        left: 2.9rem;
        right: -2.25rem;
        top: 1.12rem;
        bottom: auto;
        width: auto;
        height: 1px;
    }
}

.step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--bs-primary);
    background-color: var(--bs-body-bg);
    border: 1px solid color-mix(in srgb, var(--bs-primary) 30%, transparent);
}

.step-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.example-ticket {
    padding: 1.4rem 1.5rem 1.5rem;
}

.card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.example-subject {
    font-size: 1.1rem;
    margin: 0.5rem 0 1.15rem;
}

.desk-card {
    padding: 1.4rem 1.5rem 0.6rem;
}

.desk-title {
    font-family: var(--support-display);
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0.5rem 0 0.35rem;
}

.desk-list {
    gap: 0;
}

.desk-list .ticket-row,
.desk-list .ticket-row:hover {
    padding: 0.95rem 0;
    border: 0;
    border-top: 1px solid var(--bs-border-color);
    border-radius: 0;
    background-color: transparent;
}

.desk-list .ticket-row:first-child {
    border-top: 0;
}

.channel {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.25rem 1.35rem 1.35rem;
    text-decoration: none;
    color: var(--bs-body-color);
}

.channel:hover {
    color: var(--bs-body-color);
    border-color: color-mix(in srgb, var(--bs-primary) 45%, var(--bs-border-color));
    box-shadow: 0 10px 30px rgba(18, 20, 58, 0.1);
}

.channel-title {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0.9rem 0 0.3rem;
    font-family: var(--support-display);
    font-weight: 600;
}

.channel-title .ki-right {
    font-size: 0.85rem;
    color: var(--bs-primary);
    transform: translateX(-0.15rem);
    opacity: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.channel:hover .ki-right {
    transform: translateX(0);
    opacity: 1;
}

.channel-text {
    font-size: 0.9rem;
    color: var(--bs-secondary-color);
}

@media (prefers-reduced-motion: reduce) {
    .live-dot {
        animation: none;
    }

    .surface-card,
    .channel-title .ki-right {
        transition: none;
    }
}

.panel {
    padding: 1.75rem;
    border-radius: 1rem;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
}

.panel + .panel {
    margin-top: 1.25rem;
}

.panel-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
}

.panel.empty {
    text-align: center;
    color: var(--bs-secondary-color);
    border-style: dashed;
}

.form-page {
    padding-top: 2.5rem;
    padding-bottom: 1rem;
}

.form-page-lead {
    max-width: 34rem;
}

.form-card {
    padding: 1.75rem;
}

.form-card legend.form-label {
    float: none;
    width: auto;
    font-size: inherit;
}

.markdown-field.is-ready .markdown-source {
    display: none;
}

.markdown-editor:empty {
    display: none;
}

.markdown-editor .toastui-editor-defaultUI {
    border-radius: 0.5rem;
    border-color: var(--bs-border-color);
    font-family: var(--bs-body-font-family);
}

.markdown-editor .toastui-editor-main {
    border-radius: 0 0 0.5rem 0.5rem;
    overflow: hidden;
}

.markdown-editor .toastui-editor-defaultUI-toolbar {
    border-radius: 0.5rem 0.5rem 0 0;
    border-top-left-radius: 0.5rem !important;
    border-color: var(--bs-border-color);
    background-color: var(--bs-tertiary-bg);
}

.markdown-editor .toastui-editor-toolbar-divider {
    background-color: var(--bs-border-color);
}

.markdown-editor .toastui-editor-mode-switch {
    border-radius: 0 0 0.5rem 0.5rem;
    border-color: var(--bs-border-color);
    background-color: var(--bs-tertiary-bg);
}

.markdown-editor .toastui-editor-ww-container,
.markdown-editor .toastui-editor-md-container {
    background-color: var(--bs-body-bg);
}

.markdown-editor .toastui-editor-contents {
    font-family: var(--bs-body-font-family);
    font-size: 1.05rem;
    line-height: 1.7;
}

.markdown-editor .toastui-editor-contents p {
    margin: 0 0 0.75rem;
}

.markdown-editor .toastui-editor-contents code,
.markdown-editor .toastui-editor-contents pre,
.markdown-editor .toastui-editor-md-container .ProseMirror {
    font-family: var(--support-mono);
}

.markdown-editor .toastui-editor-contents code {
    color: var(--bs-body-color);
    background-color: color-mix(in srgb, var(--bs-primary) 12%, transparent);
}

.markdown-editor .toastui-editor-contents pre {
    border-radius: 0.6rem;
    background-color: var(--bs-tertiary-bg);
}

.markdown-editor .toastui-editor-contents blockquote {
    border-left-color: color-mix(in srgb, var(--bs-primary) 45%, transparent);
}

.markdown-editor .toastui-editor-contents a {
    color: var(--bs-primary);
}

.markdown-editor .toastui-editor-ok-button {
    color: #fff;
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.markdown-editor .toastui-editor-close-button {
    color: var(--bs-body-color);
    background-color: transparent;
    border-color: var(--bs-border-color);
}

.markdown-editor .toastui-editor-popup {
    border-radius: 0.6rem;
    border-color: var(--bs-border-color);
}

.markdown-editor .placeholder {
    display: inline;
    min-height: 0;
    vertical-align: baseline;
    cursor: text;
    opacity: 1;
    color: var(--bs-secondary-color);
    background-color: transparent;
}

.choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.choice {
    padding: 0.45rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--bs-secondary-color);
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.choice:hover {
    color: var(--bs-body-color);
    border-color: color-mix(in srgb, var(--bs-primary) 45%, var(--bs-border-color));
}

.btn-check:checked + .choice {
    color: var(--bs-primary);
    background-color: color-mix(in srgb, var(--bs-primary) 12%, transparent);
    border-color: color-mix(in srgb, var(--bs-primary) 45%, transparent);
}

.btn-check:checked + .choice-high {
    color: var(--bs-warning);
    background-color: color-mix(in srgb, var(--bs-warning) 14%, transparent);
    border-color: color-mix(in srgb, var(--bs-warning) 45%, transparent);
}

.btn-check:checked + .choice-urgent {
    color: var(--bs-danger);
    background-color: color-mix(in srgb, var(--bs-danger) 14%, transparent);
    border-color: color-mix(in srgb, var(--bs-danger) 45%, transparent);
}

.btn-check:focus-visible + .choice {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.help-card {
    padding: 1.6rem 1.75rem;
}

@media (min-width: 992px) {
    .help-card {
        position: sticky;
        top: 6rem;
    }
}

.help-title {
    font-family: var(--support-display);
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
    margin: 0.6rem 0 1.15rem;
}

.help-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.help-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    line-height: 1.5;
}

.help-list .ki-duotone {
    margin-top: 0.15rem;
    font-size: 1.15rem;
    color: var(--bs-primary);
}

.help-note {
    margin: 1.35rem 0 0;
    padding-top: 1.15rem;
    border-top: 1px solid var(--bs-border-color);
    font-size: 0.9rem;
    color: var(--bs-secondary-color);
}

.help-channels {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.6rem;
}

.help-channels a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    text-decoration: none;
}

.status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.status-tab {
    padding: 0.4rem 0.9rem;
    border-radius: 2rem;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--bs-secondary-color);
    background-color: transparent;
    text-decoration: none;
    border: 1px solid var(--bs-border-color);
}

.status-tab:hover {
    color: var(--bs-primary);
    border-color: color-mix(in srgb, var(--bs-primary) 45%, var(--bs-border-color));
}

.status-tab.is-active {
    color: var(--bs-primary);
    background-color: color-mix(in srgb, var(--bs-primary) 10%, transparent);
    border-color: color-mix(in srgb, var(--bs-primary) 35%, transparent);
}

.ticket-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.ticket-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 0.85rem;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
}

.ticket-row:hover {
    border-color: color-mix(in srgb, var(--bs-primary) 45%, var(--bs-border-color));
}

.ticket-link {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    min-width: 0;
    text-decoration: none;
    color: var(--bs-body-color);
}

.ticket-link:hover .ticket-subject {
    color: var(--bs-primary);
}

.ticket-subject {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.page-shell {
    max-width: 71rem;
}

.page-head {
    margin-bottom: 2.25rem;
}

.ticket-id {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--support-mono);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--bs-secondary-color);
}

.ticket-title {
    font-family: var(--support-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    font-size: clamp(1.55rem, 3.2vw, 2.2rem);
    max-width: 26ch;
    margin: 0.4rem 0 0.85rem;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}

.split-main {
    min-width: 0;
}

@media (min-width: 992px) {
    .split-layout {
        grid-template-columns: minmax(0, 1fr) 18.5rem;
        gap: 3.5rem;
    }

    .split-aside {
        position: sticky;
        top: 6rem;
    }

    .page-head .ticket-meta {
        display: none;
    }
}

.split-aside .panel {
    padding: 1.25rem 1.35rem 1.35rem;
}

.split-aside .panel-title {
    font-family: var(--support-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    margin-bottom: 0.9rem;
}

.record {
    margin: 0;
}

.record-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-top: 1px solid var(--bs-border-color);
}

.record-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.record-row:last-child {
    padding-bottom: 0;
}

.record-key {
    flex: 0 0 auto;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--bs-secondary-color);
}

.record-value {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 500;
    text-align: right;
    overflow-wrap: anywhere;
}

.ticket-meta {
    font-size: 0.82rem;
    color: var(--bs-secondary-color);
}

.ticket-status {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 500;
}

.statusdot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.45rem;
    border-radius: 50%;
    background-color: var(--bs-secondary-color);
}

.statusdot-open { background-color: var(--bs-primary); }
.statusdot-pending { background-color: var(--bs-warning); }
.statusdot-resolved { background-color: var(--bs-success); }
.statusdot-closed { background-color: var(--bs-secondary-color); }

.thread {
    position: relative;
    padding-left: 2rem;
}

.thread-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.thread-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.thread > :last-child,
.thread-list:last-child > .thread-item:last-child {
    margin-bottom: 0;
}

.thread-item::before {
    content: "";
    position: absolute;
    left: -2rem;
    top: 0.4rem;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background-color: var(--bs-body-bg);
    border: 1.5px solid var(--support-rail);
}

.thread-item::after {
    content: "";
    position: absolute;
    left: -1.675rem;
    top: 1.35rem;
    bottom: -2.5rem;
    width: 1px;
    background-color: var(--support-rail);
}

.thread > :last-child::after,
.thread-list:last-child > .thread-item:last-child::after {
    display: none;
}

@media (max-width: 575.98px) {
    .thread {
        padding-left: 1.5rem;
    }

    .thread-item::before {
        left: -1.5rem;
    }

    .thread-item::after {
        left: -1.175rem;
    }
}

.thread-item.is-agent::before {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--bs-primary) 14%, transparent);
}

.thread-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.thread-author {
    font-family: var(--support-display);
    font-weight: 600;
    font-size: 0.95rem;
}

.thread-time {
    margin-left: auto;
    font-family: var(--support-mono);
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
}

.thread-body {
    max-width: 42rem;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.thread-body > :last-child {
    margin-bottom: 0;
}

.thread-body p,
.thread-body ul,
.thread-body ol,
.thread-body pre,
.thread-body blockquote {
    margin-bottom: 0.75rem;
}

.thread-body ul,
.thread-body ol {
    padding-left: 1.35rem;
}

.thread-body code {
    padding: 0.1rem 0.3rem;
    border-radius: 0.3rem;
    font-family: var(--support-mono);
    font-size: 0.85em;
    color: var(--bs-body-color);
    background-color: color-mix(in srgb, var(--bs-primary) 12%, transparent);
}

.thread-body pre {
    padding: 0.85rem 1rem;
    border-radius: 0.6rem;
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    overflow-x: auto;
}

.thread-body pre code {
    padding: 0;
    font-size: 0.82em;
    background: none;
}

.thread-body blockquote {
    padding: 0.15rem 0 0.15rem 1rem;
    border-left: 2px solid color-mix(in srgb, var(--bs-primary) 45%, transparent);
    color: var(--bs-secondary-color);
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.5rem;
    border-radius: 2rem;
    font-family: var(--support-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    border: 1px solid var(--bs-border-color);
}

.pill-accent {
    color: var(--bs-primary);
    background-color: color-mix(in srgb, var(--bs-primary) 10%, transparent);
    border-color: color-mix(in srgb, var(--bs-primary) 28%, transparent);
}

.thread-compose::before,
.thread-rate::before {
    background-color: var(--bs-body-bg);
    border-color: color-mix(in srgb, var(--bs-primary) 55%, transparent);
}

.thread-end::before {
    background-color: var(--bs-secondary-color);
    border-color: var(--bs-secondary-color);
}

.thread-compose,
.thread-rate,
.thread-end {
    max-width: 42rem;
}

.thread-title {
    font-family: var(--support-display);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.thread-compose .markdown-field > .form-label {
    font-family: var(--support-display);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.55rem;
    color: var(--bs-body-color);
}

.thread-note {
    max-width: 42rem;
    margin-bottom: 0.85rem;
    color: var(--bs-secondary-color);
}

.attachment-picker {
    display: none;
}

.attachment-list {
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    padding: 0.4rem 0.5rem 0.4rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
}

.attachment-chip .ki-paper-clip {
    color: var(--bs-secondary-color);
}

.attachment-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-meta {
    font-family: var(--support-mono);
    font-size: 0.72rem;
    color: var(--bs-secondary-color);
}

.attachment-progress {
    width: 4rem;
    height: 0.35rem;
    border: 0;
    border-radius: 2rem;
    background-color: var(--bs-border-color);
    overflow: hidden;
}

.attachment-progress::-webkit-progress-bar {
    background-color: var(--bs-border-color);
}

.attachment-progress::-webkit-progress-value {
    background-color: var(--bs-primary);
}

.attachment-progress::-moz-progress-bar {
    background-color: var(--bs-primary);
}

.attachment-remove {
    display: inline-flex;
    padding: 0;
    border: 0;
    background: none;
    line-height: 1;
    color: var(--bs-secondary-color);
    cursor: pointer;
}

.attachment-remove:hover {
    color: var(--bs-danger);
}

.attachments {
    list-style: none;
    margin: 0.9rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.attachments a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    color: var(--bs-body-color);
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.attachments a:hover {
    color: var(--bs-primary);
    border-color: color-mix(in srgb, var(--bs-primary) 45%, var(--bs-border-color));
}

.attachments .ki-paper-clip {
    color: var(--bs-secondary-color);
}

.attachments .attachment-meta {
    padding-left: 0.15rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    text-decoration: none;
}

.back-link::before {
    content: "←";
}

.back-link:hover {
    color: var(--bs-primary);
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.external-divider {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 1.75rem 0 1.25rem;
    font-size: 0.82rem;
    color: var(--bs-secondary-color);
}

.external-divider::before,
.external-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--bs-border-color);
}

.external-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.external-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: 0.65rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
}

.external-button:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--bs-primary) 45%, var(--bs-border-color));
}

.external-button:disabled {
    opacity: 0.6;
}

.field-section {
    margin-bottom: 3rem;
}

.field-section:last-child {
    margin-bottom: 0;
}

.rule-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.35rem;
}

.rule-head::after {
    content: "";
    order: 2;
    flex: 1 1 auto;
    height: 1px;
    background-color: var(--bs-border-color);
}

.rule-title {
    order: 1;
    margin: 0;
    font-family: var(--support-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.rule-count {
    order: 3;
    font-family: var(--support-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--bs-secondary-color);
}

.field-lead {
    max-width: 34rem;
    margin-bottom: 1.35rem;
    color: var(--bs-secondary-color);
}

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

@media (min-width: 576px) {
    .field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

.field-locked {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.85rem;
    border-radius: 0.5rem;
    font-family: var(--support-mono);
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
    background-color: var(--bs-tertiary-bg);
    border: 1px dashed var(--bs-border-color);
    overflow-wrap: anywhere;
}

.record-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.record-list > li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1.25rem;
    padding: 0.9rem 0;
    border-top: 1px solid var(--bs-border-color);
}

.record-list > li:first-child {
    padding-top: 0;
    border-top: 0;
}

.record-name {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex: 0 0 auto;
    min-width: 10rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.record-name i {
    font-size: 1.05rem;
    color: var(--bs-secondary-color);
}

.record-list .btn,
.record-list form,
.record-list .login-inline-widget {
    margin-left: auto;
}

.record-hint {
    flex: 1 0 100%;
    margin: 0;
    font-size: 0.82rem;
    color: var(--bs-secondary-color);
}

.identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 1.25rem;
    margin-bottom: 1.15rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.monogram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.9rem;
    font-family: var(--support-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: var(--bs-primary);
    background-color: color-mix(in srgb, var(--bs-primary) 14%, transparent);
}

.identity-name {
    font-family: var(--support-display);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    margin: 0.85rem 0 0.25rem;
}

.identity-email {
    font-family: var(--support-mono);
    font-size: 0.76rem;
    color: var(--bs-secondary-color);
    overflow-wrap: anywhere;
}

.telegram-widget {
    display: flex;
    justify-content: center;
    min-height: 2.4rem;
}

.login-inline-widget {
    margin-left: auto;
}

.login-inline-widget .telegram-widget {
    min-height: 0;
}

.rating-comment {
    margin: 0 0 0.75rem;
    padding-left: 0.9rem;
    border-left: 3px solid var(--bs-border-color);
    color: var(--bs-secondary-color);
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.search-row .form-control {
    flex: 1 1 16rem;
}

.participants {
    list-style: none;
    margin: 0;
    padding: 0;
}

.participants li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0;
    border-top: 1px solid var(--bs-border-color);
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.participants li:first-child {
    padding-top: 0;
    border-top: 0;
}

.participants form {
    flex: 0 0 auto;
}

.participant-remove {
    display: inline-flex;
    padding: 0;
    border: 0;
    background: none;
    line-height: 1;
    color: var(--bs-secondary-color);
    cursor: pointer;
}

.participant-remove:hover {
    color: var(--bs-danger);
}

.aside-form {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.9rem;
}

.aside-form .form-control {
    min-width: 0;
    font-size: 0.85rem;
}

.aside-action {
    margin-top: 1.25rem;
    padding: 0 0.35rem;
}

.aside-action .form-text {
    margin-bottom: 0.6rem;
}

.compose-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    max-width: 42rem;
}

.compose-actions > .attachments-field {
    flex: 1 1 14rem;
    margin-bottom: 0;
}

.compose-actions .form-text {
    margin-bottom: 0;
}

.compose-actions .btn-primary {
    flex: 0 0 auto;
}

.display-none {
    display: none;
}

.cursor-pointer {
    cursor: pointer;
}

.ki-copy,
.ki-copy-success {
    font-size: 1rem;
    line-height: 1.35;
    flex-shrink: 0;
}
