/*
 * The embeddable board is isolated from the full portal stylesheet so normal
 * product UI changes cannot unexpectedly break layouts on customer websites.
 */
:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172b4d;
    background: #ffffff;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-width: 0;
    margin: 0;
    background: #ffffff;
}

body {
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #0052cc;
}

a:focus-visible {
    outline: 3px solid #b3d4ff;
    outline-offset: 3px;
    border-radius: 4px;
}

.embed-board {
    width: 100%;
    max-width: 920px;
    min-width: 0;
    margin: 0 auto;
    padding: 0 20px 18px;
}

.embed-header {
    position: sticky;
    z-index: 2;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0 14px;
    border-bottom: 1px solid #ebecf0;
    background: rgba(255, 255, 255, 0.97);
}

.embed-heading {
    min-width: 0;
}

.embed-company {
    overflow: hidden;
    margin-bottom: 2px;
    color: #6b778c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.embed-header h1 {
    overflow-wrap: anywhere;
    margin: 0;
    color: #091e42;
    font-size: 24px;
    line-height: 1.2;
}

.embed-open-link {
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 1px solid #b3d4ff;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.embed-open-link:hover {
    border-color: #4c9aff;
    background: #f7faff;
}

.embed-sorting {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 14px 0 8px;
    scrollbar-width: thin;
}

.embed-sorting a {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    color: #505f79;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.embed-sorting a:hover {
    background: #f4f5f7;
}

.embed-sorting a[aria-current="page"] {
    color: #0747a6;
    background: #deebff;
}

.embed-posts {
    display: grid;
    gap: 10px;
    padding: 4px 0 14px;
}

.embed-post {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 15px;
    padding: 16px;
    border: 1px solid #dfe1e6;
    border-radius: 10px;
    background: #ffffff;
}

.embed-post:hover {
    border-color: #b3bac5;
}

.embed-votes {
    display: flex;
    align-items: center;
    align-self: start;
    flex-direction: column;
    min-width: 0;
    padding: 7px 4px;
    border-radius: 8px;
    color: #42526e;
    background: #f4f5f7;
    line-height: 1.1;
}

.embed-votes > span {
    color: #7a869a;
    font-size: 11px;
}

.embed-votes strong {
    max-width: 100%;
    overflow: hidden;
    margin: 3px 0;
    font-size: 17px;
    text-overflow: ellipsis;
}

.embed-votes small {
    color: #7a869a;
    font-size: 10px;
}

.embed-post-content {
    min-width: 0;
}

.embed-status {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    color: #5e6c84;
    background: #f4f5f7;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.embed-post h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.3;
}

.embed-post h2 a {
    color: #172b4d;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.embed-post h2 a:hover {
    color: #0052cc;
    text-decoration: underline;
}

.embed-post p {
    margin: 7px 0 9px;
    color: #505f79;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.embed-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: #7a869a;
    font-size: 12px;
}

.embed-empty {
    padding: 46px 20px;
    border: 1px dashed #c1c7d0;
    border-radius: 10px;
    text-align: center;
}

.embed-empty h2 {
    margin: 0 0 5px;
    font-size: 18px;
}

.embed-empty p {
    margin: 0;
    color: #6b778c;
}

.embed-pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 5px 0 18px;
    color: #7a869a;
    font-size: 13px;
    text-align: center;
}

.embed-pagination a,
.embed-pagination > span:first-child,
.embed-pagination > span:last-child {
    padding: 7px 10px;
    border: 1px solid #dfe1e6;
    border-radius: 6px;
    text-decoration: none;
}

.embed-pagination a:first-child,
.embed-pagination > span:first-child {
    justify-self: start;
}

.embed-pagination a:last-child,
.embed-pagination > span:last-child {
    justify-self: end;
}

.embed-pagination [aria-disabled="true"] {
    opacity: 0.55;
}

.embed-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-top: 14px;
    border-top: 1px solid #ebecf0;
    color: #7a869a;
    font-size: 12px;
}

.embed-footer a {
    flex: 0 0 auto;
    text-decoration: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (max-width: 520px) {
    .embed-board {
        padding: 0 12px 14px;
    }

    .embed-header {
        align-items: flex-start;
        gap: 12px;
        padding-top: 14px;
    }

    .embed-header h1 {
        font-size: 20px;
    }

    .embed-open-link {
        padding: 7px 9px;
        font-size: 12px;
    }

    .embed-post {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 11px;
        padding: 13px 11px;
    }

    .embed-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }
}
