/* NeedKaro Pulse
   Mobile-first. Designed for 360px upwards with no horizontal overflow,
   a fixed bottom nav on small screens, and a visible focus state on every
   interactive element. Colours and radii reuse the classic NeedKaro tone. */

:root {
    --pulse-bg: #f4f6fb;
    --pulse-surface: #ffffff;
    --pulse-surface-2: #f8fafc;
    --pulse-border: #e2e8f0;
    --pulse-text: #0f172a;
    --pulse-text-2: #475569;
    --pulse-text-3: #64748b;
    --pulse-brand: #0f172a;
    --pulse-brand-2: #1d4ed8;
    --pulse-accent: #f97316;
    --pulse-ok: #15803d;
    --pulse-warn: #b45309;
    --pulse-danger: #b91c1c;
    --pulse-radius: 14px;
    --pulse-radius-sm: 9px;
    --pulse-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 18px rgba(15, 23, 42, .05);
    --pulse-nav-h: 60px;
    --pulse-top-h: 56px;
    --pulse-max: 720px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.pulse-body {
    margin: 0;
    background: var(--pulse-bg);
    color: var(--pulse-text);
    font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Devanagari", "Noto Sans", Arial, sans-serif;
    /* The bottom nav is fixed, so the page needs bottom padding equal to it. */
    padding-bottom: calc(var(--pulse-nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
    overflow-x: hidden;
    overflow-wrap: break-word;
}

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

/* ---------- focus + skip link ---------- */
.pulse-body :focus-visible {
    outline: 3px solid var(--pulse-brand-2);
    outline-offset: 2px;
    border-radius: 4px;
}
.pulse-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: var(--pulse-brand);
    color: #fff;
    padding: 10px 16px;
    border-radius: 0 0 var(--pulse-radius-sm) 0;
    text-decoration: none;
}
.pulse-skip-link:focus { left: 0; }
.pulse-main:focus { outline: none; }

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

/* ---------- top bar ---------- */
.pulse-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--pulse-brand);
    color: #fff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
}
.pulse-topbar-inner {
    max-width: var(--pulse-max);
    margin: 0 auto;
    min-height: var(--pulse-top-h);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
}
.pulse-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, .09);
    border: 0;
    color: #fff;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    max-width: 40%;
}
.pulse-city-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pulse-search {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
}
.pulse-search-icon {
    position: absolute;
    left: 10px;
    color: #94a3b8;
    pointer-events: none;
}
.pulse-search-input {
    width: 100%;
    min-width: 0;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff;
    border-radius: 999px;
    padding: 8px 12px 8px 31px;
    font-size: 14px;
}
.pulse-search-input::placeholder { color: #94a3b8; }
.pulse-topbar-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.pulse-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--pulse-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.pulse-citypanel { background: var(--pulse-brand); border-top: 1px solid rgba(255, 255, 255, .1); }
.pulse-citypanel-inner { max-width: var(--pulse-max); margin: 0 auto; padding: 10px 12px 14px; }
.pulse-radius-group { border: 0; margin: 0; padding: 0; }
.pulse-radius-group legend { color: #cbd5e1; font-size: 12px; padding: 0 0 6px; }
.pulse-radius-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pulse-citypanel .pulse-chip {
    background: rgba(255, 255, 255, .1);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, .18);
}
.pulse-citypanel .pulse-chip.is-active { background: #fff; color: var(--pulse-brand); border-color: #fff; }

/* ---------- layout ---------- */
.pulse-main {
    max-width: var(--pulse-max);
    margin: 0 auto;
    padding: 12px 12px 8px;
}
.pulse-section-title { font-size: 20px; line-height: 1.25; margin: 0 0 4px; }
.pulse-section-title-sm { font-size: 16px; }
.pulse-section-sub { color: var(--pulse-text-2); font-size: 13px; margin: 0 0 12px; }
.pulse-crumb { font-size: 13px; margin: 0 0 10px; color: var(--pulse-text-2); }
.pulse-crumb a { color: var(--pulse-text-2); }
.pulse-dot { margin: 0 6px; color: var(--pulse-text-3); }
.pulse-note { font-size: 13px; color: var(--pulse-text-2); margin: 8px 0; }
.pulse-note-muted { color: var(--pulse-text-3); }
.pulse-hint { font-size: 12.5px; color: var(--pulse-text-3); margin: 6px 0 0; }
.pulse-formerror {
    background: #fef2f2;
    color: var(--pulse-danger);
    border: 1px solid #fecaca;
    border-radius: var(--pulse-radius-sm);
    padding: 10px 12px;
    font-size: 14px;
    margin: 10px 0;
}

/* ---------- hero + tabs ---------- */
.pulse-hero { padding: 4px 0 10px; }
.pulse-hero-title { font-size: 21px; margin: 0 0 2px; }
.pulse-hero-sub { color: var(--pulse-text-2); font-size: 13.5px; margin: 0; }
.pulse-tabs, .pulse-profiletabs, .pulse-filterbar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -12px 12px;
    padding: 0 12px 2px;
}
.pulse-tabs::-webkit-scrollbar, .pulse-profiletabs::-webkit-scrollbar, .pulse-filterbar::-webkit-scrollbar { display: none; }
.pulse-tab {
    flex: 0 0 auto;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--pulse-surface);
    border: 1px solid var(--pulse-border);
    color: var(--pulse-text-2);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.pulse-tab.is-active { background: var(--pulse-brand); color: #fff; border-color: var(--pulse-brand); }
.pulse-chip {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--pulse-border);
    background: var(--pulse-surface);
    color: var(--pulse-text-2);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.pulse-chip.is-active { background: var(--pulse-brand); color: #fff; border-color: var(--pulse-brand); }
.pulse-cityrow { display: flex; gap: 8px; overflow-x: auto; margin: 0 -12px 14px; padding: 0 12px 2px; scrollbar-width: none; }
.pulse-cityrow::-webkit-scrollbar { display: none; }

/* ---------- feed + card ---------- */
.pulse-feed { display: flex; flex-direction: column; gap: 12px; }
.pulse-card {
    background: var(--pulse-surface);
    border: 1px solid var(--pulse-border);
    border-radius: var(--pulse-radius);
    box-shadow: var(--pulse-shadow);
    padding: 13px 14px 8px;
}
.pulse-card-sponsored {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--pulse-warn);
    font-weight: 700;
    margin: 0 0 6px;
}
.pulse-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pulse-card-identity { display: flex; gap: 10px; min-width: 0; }
.pulse-card-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    background: var(--pulse-surface-2);
}
.pulse-card-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--pulse-brand);
    color: #fff;
    font-weight: 700;
}
.pulse-card-identity-text { min-width: 0; }
.pulse-card-author { margin: 0; font-size: 14.5px; font-weight: 650; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.pulse-card-author a { color: inherit; text-decoration: none; }
.pulse-card-author a:hover { text-decoration: underline; }
.pulse-card-meta { margin: 1px 0 0; font-size: 12.5px; color: var(--pulse-text-3); display: flex; flex-wrap: wrap; }
.pulse-card-questionmark {
    margin: 8px 0 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--pulse-brand-2);
}
.pulse-card-title { font-size: 17px; margin: 8px 0 4px; line-height: 1.3; }
.pulse-card-title a { color: inherit; text-decoration: none; }
.pulse-card-title a:hover { text-decoration: underline; }
.pulse-card-body { font-size: 15px; }
.pulse-card-body p { margin: 0 0 8px; white-space: pre-wrap; }

.pulse-badge {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--pulse-surface-2);
    color: var(--pulse-text-2);
    border: 1px solid var(--pulse-border);
    white-space: nowrap;
}
.pulse-badge-business { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.pulse-badge-provider { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.pulse-badge-verified { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.pulse-badge-audience { background: #fef3c7; color: #92400e; border-color: #fde68a; }

.pulse-pill {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
}
.pulse-pill-live { background: #ecfdf5; color: #047857; }
.pulse-pill-expired { background: #f1f5f9; color: var(--pulse-text-3); }
.pulse-pill-open { background: #eff6ff; color: #1d4ed8; }

/* media grid */
.pulse-card-media { display: grid; gap: 3px; margin: 8px 0; border-radius: var(--pulse-radius-sm); overflow: hidden; }
.pulse-card-media-1 { grid-template-columns: 1fr; }
.pulse-card-media-2 { grid-template-columns: 1fr 1fr; }
.pulse-card-media-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.pulse-card-media-3 .pulse-media-item:first-child { grid-row: span 2; }
.pulse-card-media-4 { grid-template-columns: 1fr 1fr; }
.pulse-media-item { display: block; background: var(--pulse-surface-2); }
.pulse-media-item img { width: 100%; height: 100%; max-height: 260px; object-fit: cover; aspect-ratio: 4 / 3; }

/* details grid */
.pulse-detailgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.pulse-detailgrid > div { background: var(--pulse-surface-2); border-radius: var(--pulse-radius-sm); padding: 8px 10px; min-width: 0; }
.pulse-detailgrid dt { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--pulse-text-3); font-weight: 700; }
.pulse-detailgrid dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }

/* poll */
.pulse-poll { margin: 10px 0 4px; }
.pulse-poll-options { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.pulse-poll-option { position: relative; }
.pulse-poll-vote, .pulse-poll-static {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    text-align: left;
    background: var(--pulse-surface-2);
    border: 1px solid var(--pulse-border);
    border-radius: var(--pulse-radius-sm);
    padding: 10px 12px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--pulse-text);
    cursor: pointer;
}
.pulse-poll-vote:hover { border-color: var(--pulse-brand-2); }
.pulse-poll-vote[aria-pressed="true"] { border-color: var(--pulse-brand-2); box-shadow: inset 0 0 0 1px var(--pulse-brand-2); }
.pulse-poll-static { cursor: default; }
.pulse-poll-bar {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: var(--pct, 0%);
    background: #dbeafe;
    border-radius: var(--pulse-radius-sm);
    z-index: 0;
}
.pulse-poll-result { font-variant-numeric: tabular-nums; color: var(--pulse-brand-2); }
.pulse-poll-foot { font-size: 12.5px; color: var(--pulse-text-3); margin: 8px 0 0; }
.pulse-poll-closed { font-size: 12.5px; font-weight: 700; color: var(--pulse-warn); margin: 0 0 6px; }

/* offer */
.pulse-offer { border: 1px solid var(--pulse-border); border-radius: var(--pulse-radius-sm); padding: 10px 12px; margin: 8px 0; background: var(--pulse-surface-2); }
.pulse-offer.is-expired { opacity: .72; }
.pulse-offer-status { margin: 0 0 4px; }
.pulse-offer-price { margin: 0 0 2px; font-size: 16px; }
.pulse-offer-price s { color: var(--pulse-text-3); font-size: 13px; margin-left: 6px; }
.pulse-offer-validity { margin: 0; font-size: 12.5px; color: var(--pulse-text-3); }
.pulse-offer-terms { margin: 6px 0 0; font-size: 13.5px; }
.pulse-offer-scarcity { margin: 6px 0 0; font-size: 12.5px; font-weight: 700; color: var(--pulse-warn); }

/* need tile */
.pulse-needcard { border-left: 3px solid var(--pulse-brand-2); background: #f8fafc; border-radius: 0 var(--pulse-radius-sm) var(--pulse-radius-sm) 0; padding: 8px 12px; margin: 8px 0; }
.pulse-needcard-head { margin: 0 0 2px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--pulse-brand-2); }
.pulse-needcard-body { margin: 0; font-size: 14.5px; }
.pulse-needcard-meta { margin: 4px 0 0; font-size: 12.5px; color: var(--pulse-text-3); display: flex; flex-wrap: wrap; align-items: center; }
.pulse-needsgrid { display: grid; gap: 8px; margin-bottom: 14px; }
.pulse-needtile { display: block; background: var(--pulse-surface); border: 1px solid var(--pulse-border); border-left: 3px solid var(--pulse-brand-2); border-radius: var(--pulse-radius-sm); padding: 10px 12px; text-decoration: none; color: inherit; }
.pulse-needtile-head { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--pulse-brand-2); }
.pulse-needtile-body { display: block; font-size: 14.5px; margin: 3px 0; }
.pulse-needtile-meta { display: block; font-size: 12.5px; color: var(--pulse-text-3); }

/* stats + actions */
.pulse-card-stats { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--pulse-text-3); padding: 8px 0 4px; border-top: 1px solid var(--pulse-border); margin-top: 8px; }
.pulse-card-actions { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; border-top: 1px solid var(--pulse-border); padding-top: 4px; }
.pulse-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 0;
    color: var(--pulse-text-2);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 8px;
    border-radius: var(--pulse-radius-sm);
    cursor: pointer;
    text-decoration: none;
    min-height: 40px;
}
.pulse-action:hover { background: var(--pulse-surface-2); }
.pulse-action.is-on { color: var(--pulse-brand-2); }
.pulse-action-menu { margin-left: auto; font-size: 17px; }
.pulse-action-icon { font-size: 14px; line-height: 1; }
.pulse-card-menu {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--pulse-border);
    margin-top: 4px;
    padding: 4px 0;
}
.pulse-menuitem {
    text-align: left;
    background: none;
    border: 0;
    font: inherit;
    font-size: 14px;
    padding: 11px 10px;
    border-radius: var(--pulse-radius-sm);
    cursor: pointer;
    color: var(--pulse-text);
    text-decoration: none;
    min-height: 44px;
}
.pulse-menuitem:hover { background: var(--pulse-surface-2); }
.pulse-menuitem-danger { color: var(--pulse-danger); }

/* ---------- buttons ---------- */
.pulse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 650;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .12s ease, color .12s ease;
}
.pulse-btn-primary { background: var(--pulse-brand); color: #fff; }
.pulse-btn-primary:hover { background: #1e293b; }
.pulse-btn-primary[disabled] { background: #94a3b8; cursor: not-allowed; }
.pulse-btn-secondary { background: var(--pulse-surface); color: var(--pulse-text); border-color: var(--pulse-border); }
.pulse-btn-secondary:hover { background: var(--pulse-surface-2); }
.pulse-btn-ghost { background: none; color: var(--pulse-brand-2); }
.pulse-btn-sm { min-height: 36px; padding: 6px 14px; font-size: 13.5px; }
.pulse-linkbtn { background: none; border: 0; font: inherit; font-size: 12.5px; color: var(--pulse-brand-2); cursor: pointer; padding: 4px 0; text-decoration: underline; }
.pulse-linkbtn-danger { color: var(--pulse-danger); }

/* ---------- empty states ---------- */
.pulse-empty {
    background: var(--pulse-surface);
    border: 1px dashed var(--pulse-border);
    border-radius: var(--pulse-radius);
    padding: 26px 18px;
    text-align: center;
}
.pulse-empty h2 { font-size: 17px; margin: 0 0 6px; }
.pulse-empty p { color: var(--pulse-text-2); font-size: 14.5px; margin: 0 0 14px; }
.pulse-empty-inline { padding: 16px; border: 0; background: none; }
.pulse-empty-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pulse-loadmore { display: flex; justify-content: center; padding: 16px 0 8px; }

/* ---------- explore ---------- */
.pulse-catgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.pulse-catcard {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: var(--pulse-surface);
    border: 1px solid var(--pulse-border);
    border-radius: var(--pulse-radius);
    padding: 13px;
    text-decoration: none;
    color: inherit;
    min-height: 96px;
}
.pulse-catcard:hover { border-color: var(--pulse-brand-2); }
.pulse-catcard-icon { font-size: 22px; line-height: 1; }
.pulse-catcard-label { font-size: 14.5px; font-weight: 650; }
.pulse-catcard-count { font-size: 12px; color: var(--pulse-text-3); margin-top: auto; }
.pulse-explore-note { background: var(--pulse-surface); border: 1px solid var(--pulse-border); border-radius: var(--pulse-radius); padding: 16px; }
.pulse-explore-note h2 { font-size: 16px; margin: 0 0 5px; }
.pulse-explore-note p { color: var(--pulse-text-2); font-size: 14px; margin: 0 0 12px; }

/* ---------- composer ---------- */
.pulse-kindgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.pulse-kindcard {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    background: var(--pulse-surface);
    border: 1px solid var(--pulse-border);
    border-radius: var(--pulse-radius);
    padding: 11px 13px;
    cursor: pointer;
    font: inherit;
    min-height: 62px;
}
.pulse-kindcard[aria-selected="true"] { border-color: var(--pulse-brand); box-shadow: inset 0 0 0 1px var(--pulse-brand); }
.pulse-kindcard-label { font-size: 14.5px; font-weight: 650; }
.pulse-kindcard-hint { font-size: 12px; color: var(--pulse-text-3); }
.pulse-panel { background: var(--pulse-surface); border: 1px solid var(--pulse-border); border-radius: var(--pulse-radius); padding: 16px; margin-bottom: 14px; }
.pulse-panel h2 { font-size: 16px; margin: 0 0 5px; }
.pulse-panel p { font-size: 14px; }
.pulse-field { margin-bottom: 14px; min-width: 0; }
.pulse-fieldset { border: 1px solid var(--pulse-border); border-radius: var(--pulse-radius-sm); padding: 12px 14px; margin: 0 0 16px; }
.pulse-fieldrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pulse-label { display: block; font-size: 13.5px; font-weight: 650; margin-bottom: 5px; }
.pulse-input, .pulse-textarea {
    width: 100%;
    font: inherit;
    font-size: 15px;
    color: var(--pulse-text);
    background: var(--pulse-surface-2);
    border: 1px solid var(--pulse-border);
    border-radius: var(--pulse-radius-sm);
    padding: 10px 12px;
}
.pulse-textarea { resize: vertical; min-height: 72px; }
.pulse-input:focus, .pulse-textarea:focus { background: #fff; border-color: var(--pulse-brand-2); }
.pulse-checkrow { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 14px; }
.pulse-checkrow input { width: 19px; height: 19px; flex: 0 0 auto; accent-color: var(--pulse-brand); }
.pulse-file { width: 100%; font: inherit; font-size: 13.5px; }
.pulse-pollinput { margin-bottom: 8px; }
.pulse-submitrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pulse-preview { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; }
.pulse-preview li { width: 74px; height: 74px; border-radius: var(--pulse-radius-sm); overflow: hidden; border: 1px solid var(--pulse-border); }
.pulse-preview img { width: 100%; height: 100%; object-fit: cover; }

/* custom listbox (prevents native selects expanding the viewport) */
.pulse-selectwrap { position: relative; }
.pulse-selectbtn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font: inherit;
    font-size: 15px;
    text-align: left;
    color: var(--pulse-text);
    background: var(--pulse-surface-2);
    border: 1px solid var(--pulse-border);
    border-radius: var(--pulse-radius-sm);
    padding: 10px 12px;
    cursor: pointer;
    min-height: 44px;
}
.pulse-selectlist {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    margin: 4px 0 0;
    padding: 4px;
    list-style: none;
    background: var(--pulse-surface);
    border: 1px solid var(--pulse-border);
    border-radius: var(--pulse-radius-sm);
    box-shadow: var(--pulse-shadow);
    max-height: 260px;
    overflow-y: auto;
}
.pulse-selectlist li { padding: 10px 10px; border-radius: 6px; font-size: 14.5px; cursor: pointer; min-height: 40px; }
.pulse-selectlist li:hover, .pulse-selectlist li:focus { background: var(--pulse-surface-2); }
.pulse-selectlist li[aria-selected="true"] { font-weight: 700; }

/* ---------- profile ---------- */
.pulse-profilehead { background: var(--pulse-surface); border: 1px solid var(--pulse-border); border-radius: var(--pulse-radius); padding: 16px; margin-bottom: 12px; }
.pulse-profilehead-id { display: flex; gap: 12px; align-items: center; }
.pulse-profilehead-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.pulse-profilehead-meta { margin: 4px 0 0; font-size: 13px; color: var(--pulse-text-2); display: flex; flex-wrap: wrap; align-items: center; }
.pulse-profilehead-bio { margin: 12px 0 0; font-size: 14.5px; }
.pulse-profilehead-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pulse-statgrid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 14px; padding: 0; }
.pulse-statgrid li { background: var(--pulse-surface); border: 1px solid var(--pulse-border); border-radius: var(--pulse-radius-sm); padding: 9px 6px; text-align: center; }
.pulse-statgrid-n { display: block; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pulse-statgrid-l { display: block; font-size: 11.5px; color: var(--pulse-text-3); }

/* ---------- comments ---------- */
.pulse-comments { margin-top: 18px; }
.pulse-commentform { background: var(--pulse-surface); border: 1px solid var(--pulse-border); border-radius: var(--pulse-radius); padding: 12px; margin-bottom: 12px; }
.pulse-commentlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pulse-comment { background: var(--pulse-surface); border: 1px solid var(--pulse-border); border-radius: var(--pulse-radius-sm); padding: 10px 12px; }
.pulse-comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 3px; }
.pulse-comment-name { font-size: 13.5px; font-weight: 650; }
.pulse-comment-time { font-size: 12px; color: var(--pulse-text-3); }
.pulse-comment-body { margin: 0; font-size: 14.5px; white-space: pre-wrap; }
.pulse-comment.is-removed { background: var(--pulse-surface-2); }
.pulse-comment-name-gone, .pulse-comment-body-gone { color: var(--pulse-text-3); font-style: italic; }

/* ---------- claim + report + prose ---------- */
.pulse-claim, .pulse-reportpanel { background: var(--pulse-surface); border: 1px solid var(--pulse-border); border-radius: var(--pulse-radius); padding: 16px; margin-top: 18px; }
.pulse-claimform { margin-top: 10px; }
.pulse-reportpanel p { font-size: 14px; color: var(--pulse-text-2); }
.pulse-prose { background: var(--pulse-surface); border: 1px solid var(--pulse-border); border-radius: var(--pulse-radius); padding: 18px 16px; }
.pulse-prose h2 { font-size: 16px; margin: 18px 0 6px; }
.pulse-prose p, .pulse-prose li { font-size: 14.5px; color: var(--pulse-text-2); }
.pulse-proselist { padding-left: 20px; }
.pulse-linklist { list-style: none; padding: 0; margin: 0 0 10px; }
.pulse-linklist li { padding: 7px 0; border-bottom: 1px solid var(--pulse-border); }
.pulse-linklist a { color: var(--pulse-brand-2); font-size: 14.5px; }

/* A row action that posts a form inline, e.g. "Unmute" in settings. */
.pulse-inlineform { display: inline; }
.pulse-btn-quiet {
    background: transparent;
    color: var(--pulse-text-2);
    border: 1px solid var(--pulse-border);
    box-shadow: none;
}
.pulse-btn-quiet:hover { border-color: var(--pulse-brand); color: var(--pulse-brand); }

/* ---------- bottom nav ---------- */
.pulse-bottomnav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--pulse-border);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.pulse-bottomnav-list { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0; }
.pulse-navitem {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: var(--pulse-nav-h);
    padding: 6px 2px;
    color: var(--pulse-text-3);
    text-decoration: none;
    font-size: 10.5px;
    font-weight: 600;
}
.pulse-navitem.is-active { color: var(--pulse-brand); }
.pulse-navitem-label { line-height: 1.1; text-align: center; }
.pulse-navitem-create { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--pulse-brand); }

/* ---------- footer ---------- */
.pulse-footer { max-width: var(--pulse-max); margin: 0 auto; padding: 18px 12px 26px; }
.pulse-footer-nav { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.pulse-footer-nav a { color: var(--pulse-text-2); font-size: 12.5px; }
.pulse-footer-note { color: var(--pulse-text-3); font-size: 12px; margin: 12px 0 0; }

/* ---------- toast + sheet ---------- */
.pulse-toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--pulse-nav-h) + 16px);
    transform: translateX(-50%);
    z-index: 70;
    background: var(--pulse-brand);
    color: #fff;
    padding: 11px 18px;
    border-radius: 999px;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .3);
    max-width: calc(100vw - 32px);
    text-align: center;
}
.pulse-sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(15, 23, 42, .5); }
.pulse-sheet {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 65;
    background: var(--pulse-surface);
    border-radius: var(--pulse-radius) var(--pulse-radius) 0 0;
    padding: 16px;
    max-height: 82vh;
    overflow-y: auto;
    max-width: 560px;
    margin: 0 auto;
}
.pulse-sheet h2 { font-size: 17px; margin: 0 0 10px; }
.pulse-sheetlist { list-style: none; margin: 0; padding: 0; }
.pulse-sheetlist li { margin-bottom: 8px; }
.pulse-sheet-close { float: right; }

/* ---------- desktop ---------- */
@media (min-width: 900px) {
    :root { --pulse-max: 940px; }
    body.pulse-body { padding-bottom: 24px; }
    .pulse-topbar-inner { gap: 14px; padding: 8px 20px; }
    .pulse-main { padding: 20px 20px 8px; }
    /* The bottom nav becomes a top rail, so the page is not padded for it. */
    .pulse-bottomnav {
        position: static;
        background: var(--pulse-surface);
        border-top: 0;
        border-bottom: 1px solid var(--pulse-border);
        backdrop-filter: none;
    }
    .pulse-bottomnav-list { max-width: var(--pulse-max); margin: 0 auto; grid-template-columns: repeat(5, auto); gap: 4px; padding: 6px 20px; }
    .pulse-navitem { flex-direction: row; min-height: 40px; padding: 6px 14px; font-size: 13.5px; border-radius: 999px; }
    .pulse-navitem:hover { background: var(--pulse-surface-2); }
    .pulse-navitem-create { width: 26px; height: 26px; }
    .pulse-catgrid { grid-template-columns: repeat(4, 1fr); }
    .pulse-kindgrid { grid-template-columns: repeat(3, 1fr); }
    .pulse-footer { padding-bottom: 26px; }
    .pulse-toast { bottom: 24px; }
}

@media (min-width: 1200px) {
    .pulse-feed { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
}

/* ---------- motion + print ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

@media print {
    .pulse-topbar, .pulse-bottomnav, .pulse-footer, .pulse-card-actions, .pulse-loadmore { display: none; }
    body.pulse-body { padding: 0; background: #fff; }
    .pulse-card { border: 1px solid #999; box-shadow: none; break-inside: avoid; }
}

/* ---------- following list, notifications, comment replies ----------
   Added after the first pass: these three surfaces were in the router but had
   no styles, so they rendered as unstyled text blocks. */
.pulse-followlist, .pulse-notiflist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pulse-followrow {
    display: flex;
    gap: 11px;
    align-items: center;
    background: var(--pulse-surface);
    border: 1px solid var(--pulse-border);
    border-radius: var(--pulse-radius);
    padding: 11px 13px;
}
.pulse-followrow-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}
.pulse-followrow-text { min-width: 0; }
.pulse-followrow-name {
    display: block;
    font-size: 15px;
    font-weight: 650;
    color: var(--pulse-text);
    text-decoration: none;
}
a.pulse-followrow-name:hover { text-decoration: underline; }
.pulse-followrow-meta {
    margin: 2px 0 0;
    font-size: 12.5px;
    color: var(--pulse-text-3);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.pulse-notif {
    background: var(--pulse-surface);
    border: 1px solid var(--pulse-border);
    border-radius: var(--pulse-radius);
    padding: 12px 14px;
}
.pulse-notif.is-unread { border-left: 3px solid var(--pulse-brand-2); }
.pulse-notif-msg { margin: 0; font-size: 14.5px; }
.pulse-notif-meta {
    margin: 5px 0 0;
    font-size: 12px;
    color: var(--pulse-text-3);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
}

.pulse-replies {
    list-style: none;
    margin: 9px 0 0;
    padding: 0 0 0 12px;
    border-left: 2px solid var(--pulse-border);
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.pulse-reply .pulse-comment-body { font-size: 14px; }
.pulse-comment-edited { font-size: 11.5px; color: var(--pulse-text-3); font-style: italic; }

/* Inverted button for use on the dark top bar. */
.pulse-btn-invert { background: #fff; color: var(--pulse-brand); }
.pulse-btn-invert:hover { background: #e2e8f0; }

/* Reserve room for the in-viewport IntersectionObserver, so a slow image
   never shifts the actions below it. */
.pulse-media-item img { background: var(--pulse-surface-2); }
/* Author-level display rules (for example .pulse-btn) must never override the
   semantic hidden state used while switching composer types. */
.pulse-body [hidden] { display: none !important; }
