/* Chirp — Twitter-timeline-style theme for Known.
   v3: flat, neutral, professional. One centred column, round avatars,
   restrained blue accent, system type, minimal chrome. */

:root {
    --chirp-blue: #1d9bf0;
    --chirp-blue-dark: #1a8cd8;
    --chirp-text: #0f1419;
    --chirp-muted: #67717b;
    --chirp-border: #e6e9ec;
    --chirp-divider: #eff2f4;
    --chirp-page-bg: #f2f4f6;
    --chirp-hover: #f8f9fa;
}

/* ---------- base ---------- */

body {
    background: var(--chirp-page-bg);
    color: var(--chirp-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--chirp-blue); }
a:hover, a:focus { color: var(--chirp-blue-dark); text-decoration: none; }

h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--chirp-text);
    letter-spacing: -0.01em;
    line-height: 1.3;
}
h1 { font-size: 21px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }

/* ---------- navbar ---------- */

.navbar-default {
    background: #fff;
    border: none;
    border-bottom: 1px solid var(--chirp-border);
    box-shadow: none;
}

.navbar-default .navbar-brand {
    color: var(--chirp-text);
    font-weight: 700;
    letter-spacing: -0.01em;
}
.navbar-default .navbar-brand:hover { color: var(--chirp-text); }

.navbar-default .navbar-nav > li > a {
    color: #45505a;
    font-weight: 500;
    font-size: 14px;
}
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus,
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus {
    color: var(--chirp-text);
    background: transparent;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover {
    color: var(--chirp-text);
    background: transparent;
    box-shadow: inset 0 -2px 0 var(--chirp-blue);
}

/* search box: keep it quiet */
.navbar-default .navbar-form {
    margin-top: 10px;
}
.navbar-default .navbar-form input[type="text"],
.navbar-default .navbar-form input[type="search"] {
    background: #f2f4f6;
    border: 1px solid transparent;
    border-radius: 8px;
    box-shadow: none;
    font-size: 13px;
    height: 30px;
}
.navbar-default .navbar-form input[type="text"]:focus {
    background: #fff;
    border-color: var(--chirp-border);
    outline: none;
    box-shadow: none;
}

.dropdown-menu {
    border: 1px solid var(--chirp-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 20, 25, 0.08);
    padding: 6px 0;
}
.dropdown-menu > li > a { padding: 8px 16px; color: var(--chirp-text); font-size: 14px; }
.dropdown-menu > li > a:hover { background: var(--chirp-hover); color: var(--chirp-text); }
.dropdown-menu .divider { background: var(--chirp-divider); margin: 6px 0; }

/* ---------- the timeline panel ---------- */

/* transparent rail: every section is its own card on the grey page */
.container.page-body {
    max-width: 640px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-top: 6px;
    margin-bottom: 48px;
    box-shadow: none;
    overflow: visible;
}

#page-messages { margin: 0; }
#page-messages .alert {
    border-radius: 10px;
    margin-bottom: 14px;
    /* Known gives alerts col-md-* classes; the float wrecks the layout below */
    float: none;
    width: auto;
    margin-left: 0;
}

/* homepage profile header: its own card */
.row.profile.h-card {
    margin: 0 0 14px;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--chirp-border);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 20, 25, 0.05);
}
.row.profile.h-card > .col-md-8 {
    width: 100%;
    margin-left: 0;
    padding: 0;
    float: none;
}
.row.profile.h-card > .col-md-8 > .row:not(.visible-sm) {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
}
.row.profile.h-card .namebadge {
    width: auto;
    padding: 0;
    float: none;
    flex: none;
}
.row.profile.h-card .namebadge .icon-container,
.row.profile.h-card .namebadge img {
    display: block;
    width: 72px !important;
    height: 72px !important;
    border-radius: 9999px;
    object-fit: cover;
    border: none;
    box-shadow: none;
}
.row.profile.h-card .namebadge-profile {
    width: auto;
    flex: 1 1 auto;
    padding: 0;
    float: none;
}
.row.profile.h-card .namebadge-profile .row { display: block; margin: 0; }
.row.profile.h-card .namebadge-profile .col-md-12 { padding: 0; width: 100%; float: none; }
h1.p-profile { margin: 0 0 2px; font-size: 20px; }
h1.p-profile a { color: var(--chirp-text); }
h1.p-profile a:hover { color: var(--chirp-text); text-decoration: none; }
.row.profile.h-card .e-note, .row.profile.h-card p {
    color: var(--chirp-muted);
    font-size: 14px;
    margin-bottom: 2px;
}

/* ---------- entries ---------- */

/* every post is its own card */
.row.idno-entry {
    margin: 0 0 14px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid var(--chirp-border);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 20, 25, 0.05);
    transition: box-shadow 0.12s ease;
}
.row.idno-entry:hover { box-shadow: 0 2px 10px rgba(15, 20, 25, 0.08); }

/* no avatar block at the top of posts: a tiny one lives in the byline instead.
   !important needed to beat bootstrap's .visible-md/.visible-lg !important */
.row.idno-entry > .owner { display: none !important; }
.row.idno-entry .visible-xs img { display: none; }
.row.idno-entry > .idno-content {
    width: 100%;
    max-width: none;
    padding: 0;
    float: none;
    margin-left: 0;
    /* static so the access pill anchors to the card, not this column */
    position: static;
}
.row.idno-entry > .col-md-offset-1 { margin-left: 0; }

img.u-photo { border-radius: 9999px; }

/* keep titles clear of the access pill */
.idno-entry .idno-body > h1.p-name,
.idno-entry .idno-body > h2.p-name { margin-right: 90px; }

/* tiny avatar in the byline ("binit published this...") */
.chirp-byline-avatar {
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    display: block;
    margin-right: 5px;
}
/* the avatar's anchor is the inline-level box the text baseline sees;
   align THAT, not the img inside it */
.idno-entry .permalink a.icon-container {
    display: inline-block;
    vertical-align: -6px;
    margin-right: 5px;
    line-height: 0;
}

/* post titles: article-sized, not billboard-sized */
.idno-body { margin-top: 0; }
.idno-body h2.p-name, .idno-body h1.p-name {
    font-size: 17px;
    margin: 0 0 4px;
    line-height: 1.35;
}
.idno-body h2.p-name a, .idno-body h1.p-name a { color: var(--chirp-text); }
.idno-body h2.p-name a:hover, .idno-body h1.p-name a:hover { text-decoration: underline; }
.idno-body h3.p-summary {
    font-size: 14px;
    font-weight: 400;
    color: var(--chirp-muted);
    margin: 0 0 6px;
}

/* core sets overflow:auto on .idno-body (float containment); that CLIPS the
   edge-to-edge media bleed. The float it contained is gone, so release it. */
.idno-entry .idno-body, .idno-object .idno-body { overflow: visible; }

/* kill the core Georgia serif inside post bodies */
.idno-body p,
.idno-object .idno-body li,
.idno-body .e-content, .idno-body .e-content p {
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
}

.e-content {
    font-size: 15px;
    color: var(--chirp-text);
    word-wrap: break-word;
}
.e-content p { margin-bottom: 8px; }

/* ---------- media bleeds edge-to-edge of the card ---------- */

.idno-entry .e-content img,
.idno-entry .idno-body > img,
.idno-entry .e-content video,
.idno-entry .e-content iframe,
.idno-entry [id^="map_"] {
    display: block;
    width: calc(100% + 40px);
    max-width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
    border: none;
    border-radius: 0;
    border-top: 1px solid var(--chirp-divider);
    border-bottom: 1px solid var(--chirp-divider);
    margin-top: 10px;
    margin-bottom: 10px;
}
/* small inline images (icons, emoji) stay inline */
.idno-entry .e-content p img[width], .idno-entry .e-content img.emoji {
    display: inline;
    width: auto;
    max-width: 100%;
    margin: 0;
    border: none;
}
.idno-entry .e-content iframe {
    aspect-ratio: 16 / 9;
    height: auto;
}
.idno-entry [id^="map_"] {
    height: 290px !important;
    overflow: hidden;
}

/* ---------- article (blog post) typography ---------- */

.idno-body h1:not(.p-name) { font-size: 20px; margin: 18px 0 8px; }
.idno-body h2:not(.p-name) { font-size: 18px; margin: 18px 0 8px; }
.idno-body h3:not(.p-summary) { font-size: 16px; margin: 14px 0 6px; }
.idno-body blockquote {
    border-left: 3px solid var(--chirp-border);
    margin: 12px 0;
    padding: 2px 0 2px 14px;
    color: var(--chirp-muted);
    font-size: 15px;
}
.idno-body pre {
    background: #f6f8fa;
    border: 1px solid var(--chirp-divider);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
}
.idno-body code {
    background: #f6f8fa;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 13px;
    color: var(--chirp-text);
}
.idno-body pre code { background: none; padding: 0; }
.idno-body ul, .idno-body ol { padding-left: 22px; margin-bottom: 10px; }
.idno-body hr { border-color: var(--chirp-divider); margin: 18px 0; }

/* entry footer: one quiet metadata line */
.idno-entry .footer {
    margin-top: 10px;
    font-size: 13px;
    color: var(--chirp-muted);
}
.idno-entry .footer p { margin-bottom: 4px; }
.idno-entry .footer a { color: var(--chirp-muted); }
.idno-entry .footer a:hover { color: var(--chirp-blue); }
.idno-entry .footer .fa { font-size: 13px; }

/* interaction counts: quiet icon row, X-style */
.idno-entry .interactions {
    display: flex;
    gap: 22px;
    font-size: 13px;
    color: #98a2ab;
    margin-top: 2px;
}
.idno-entry .interactions a, .idno-entry .interactions span { color: #98a2ab; }
.idno-entry .interactions a:hover { color: var(--chirp-blue); }
.idno-entry .interactions .fa { font-size: 14px; }
.extra-metadata { font-size: 12px; color: #98a2ab; }
.extra-metadata a { color: #98a2ab; }

/* public/private: subtle grey pill, top right of the post */
.row.idno-entry { position: relative; }
.chirp-access {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f4f6f8;
    border: 1px solid var(--chirp-border);
    border-radius: 9999px;
    padding: 2px 10px;
    color: #7a848d;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.6;
}
.chirp-access .fa { font-size: 11px; }
@media (max-width: 767px) {
    .chirp-access { top: 12px; right: 12px; }
}

/* ---------- buttons and forms ---------- */

.btn {
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
}
.btn-primary {
    background: var(--chirp-blue);
    border-color: var(--chirp-blue);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background: var(--chirp-blue-dark);
    border-color: var(--chirp-blue-dark);
}
.btn-default {
    border-color: var(--chirp-border);
    color: var(--chirp-text);
    background: #fff;
}
.btn-default:hover { background: var(--chirp-hover); border-color: #cfd6dc; }

/* the audience selector: quiet chip, not a loud info button */
.btn-info.access, .btn-info.access:hover, .btn-info.access:focus,
.open > .btn-info.access.dropdown-toggle {
    background: #f2f4f6;
    border: 1px solid var(--chirp-border);
    color: var(--chirp-text);
    box-shadow: none;
    font-size: 13px;
}

textarea, .form-control, input[type="text"], input[type="email"],
input[type="password"], input[type="url"] {
    border: 1px solid var(--chirp-border);
    border-radius: 8px;
    box-shadow: none;
    color: var(--chirp-text);
    font-size: 15px;
}
textarea:focus, .form-control:focus, input:focus {
    border-color: var(--chirp-blue);
    box-shadow: 0 0 0 2px rgba(29, 155, 240, 0.12);
    outline: none;
}

.idno-form, .content-form { padding: 14px 20px; }

/* compose bar: its own compact card, buttons only */
.buttonBar { margin-bottom: 0; }
.chirp-composer {
    background: #fff;
    border: 1px solid var(--chirp-border);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 20, 25, 0.05);
    padding: 6px 10px;
    margin-bottom: 14px;
    /* BFC: stray floats (e.g. alert banners) can't squeeze the button row */
    display: flow-root;
}
/* content types: one even row, LinkedIn/Facebook style */
#contentTypeButtonBar {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
    border-top: none;
    text-align: center;
}
a.contentTypeButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 1 1 0;
    width: auto;
    margin: 0;
    padding: 8px 6px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #45505a;
    white-space: nowrap;
}
a.contentTypeButton:hover {
    background: var(--chirp-hover);
    color: var(--chirp-text);
}
span.contentTypeLogo {
    display: inline;
    font-size: 15px;
    padding: 0;
    color: var(--chirp-blue);
}

/* ---------- static pages / single posts ---------- */

.page-body > .row:not(.idno-entry):not(.profile) {
    margin: 0 0 14px;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--chirp-border);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 20, 25, 0.05);
}

.pagination > li > a { color: var(--chirp-blue); border-color: var(--chirp-divider); }
.pagination > .active > a,
.pagination > .active > a:hover { background: var(--chirp-blue); border-color: var(--chirp-blue); }

/* ---------- footer ---------- */

.blank-footer { height: 32px; }
.footer-links, footer {
    color: #98a2ab;
    font-size: 12.5px;
    text-align: center;
}
footer a { color: #98a2ab; }

/* ---------- small screens ---------- */

@media (max-width: 767px) {
    .container.page-body { margin-top: 0; padding: 0 8px; }
    .row.idno-entry { padding: 14px 14px; border-radius: 12px; margin-bottom: 10px; }
    .row.profile.h-card { padding: 20px 16px 16px; border-radius: 12px; }
    .chirp-composer { border-radius: 12px; margin-bottom: 10px; }
    /* match the tighter mobile padding for edge-to-edge media */
    .idno-entry .e-content img,
    .idno-entry .idno-body > img,
    .idno-entry .e-content video,
    .idno-entry .e-content iframe,
    .idno-entry [id^="map_"] {
        width: calc(100% + 28px);
        max-width: calc(100% + 28px);
        margin-left: -14px;
        margin-right: -14px;
    }
    .chirp-composer { padding: 12px 14px 6px; }
}
