/* ============================================================================
   MAIN LAYOUT â€” CorePage.ai
   ============================================================================ */

/* ---- Shared Utilities ---- */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Side-nav spacer ---- */

.side-nav__spacer {
    flex: 1;
}

/* ============================================================================
   SHARED MODAL (feedback, upgrade)
   ============================================================================ */

.cp-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fadeIn 0.18s ease;
}

.cp-modal-overlay[hidden] {
    display: none;
}

.cp-modal {
    position: relative;
    background: var(--bg-card, var(--surface));
    border: 0.1rem solid var(--border);
    border-radius: 1.6rem;
    padding: 3.2rem 2.8rem;
    width: min(46rem, calc(100vw - 3.2rem));
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    animation: slideUp 0.22s ease;
    box-shadow: 0 2.4rem 6rem rgba(0, 0, 0, 0.5), 0 0 0 0.1rem rgba(255, 255, 255, 0.04);
}

.cp-modal__close {
    position: absolute;
    top: 1.2rem;
    right: 1.4rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2.2rem;
    cursor: pointer;
    padding: 0.4rem;
    line-height: 1;
    transition: color 0.12s;
}

.cp-modal__close:hover {
    color: var(--text);
}

.cp-modal__title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin: 0;
}

.cp-modal__label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
}

.cp-modal__textarea {
    width: 100%;
    min-height: 12rem;
    padding: 1rem 1.2rem;
    border: 0.1rem solid var(--border);
    border-radius: 0.8rem;
    background: var(--surface-2, var(--surface));
    color: var(--text);
    font-size: 1.35rem;
    font-family: inherit;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
    line-height: 1.6;
}

.cp-modal__textarea:focus {
    border-color: var(--accent);
}

.cp-modal__textarea::placeholder {
    color: var(--text-faint);
}

.cp-modal__counter {
    font-size: 1.1rem;
    color: var(--text-faint);
    text-align: right;
    margin-top: -0.8rem;
}

.cp-modal__hint {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.cp-modal__submit {
    width: 100%;
    padding: 1.1rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0.8rem;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    margin-top: 0.4rem;
}

.cp-modal__submit:hover {
    opacity: 0.88;
}

.cp-modal__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ---- Upgrade modal specifics ---- */

.cp-modal--upgrade {
    width: min(56rem, calc(100vw - 3.2rem));
    text-align: center;
    align-items: center;
}

.upgrade-modal__icon {
    font-size: 2.8rem;
    color: var(--accent);
    margin-bottom: -0.4rem;
}

.upgrade-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    width: 100%;
    margin-top: 0.4rem;
}

@media (max-width: 480px) {
    .upgrade-plans {
        grid-template-columns: 1fr;
    }
}

.upgrade-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.8rem 1.6rem;
    border: 0.1rem solid var(--border);
    border-radius: 1.2rem;
    background: var(--surface-2, var(--surface));
    text-align: left;
}

.upgrade-plan--featured {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(var(--accent-rgb, 99, 102, 241), 0.08), transparent);
}

.upgrade-plan__badge {
    position: absolute;
    top: -1rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 1.0rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.25rem 0.9rem;
    border-radius: 2rem;
    white-space: nowrap;
}

.upgrade-plan__label {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.upgrade-plan__price {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.04em;
    line-height: 1;
}

.upgrade-plan__period {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0;
}

.upgrade-plan__saving {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 600;
}

.upgrade-plan__perks {
    list-style: none;
    padding: 0;
    margin: 0.4rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.upgrade-plan__perks li {
    font-size: 1.2rem;
    color: var(--text-muted);
    padding-left: 1.4rem;
    position: relative;
}

.upgrade-plan__perks li::before {
    content: 'âœ“';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.upgrade-plan__cta {
    width: 100%;
    margin-top: 1rem;
    padding: 0.85rem;
    border-radius: 0.8rem;
    border: 0.15rem solid var(--accent);
    background: transparent;
    color: var(--accent);
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.upgrade-plan__cta:hover,
.upgrade-plan--featured .upgrade-plan__cta {
    background: var(--accent);
    color: #fff;
}

.upgrade-plan--featured .upgrade-plan__cta:hover {
    opacity: 0.88;
}

/* ============================================================================
   NAVBAR
   ============================================================================ */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 5.6rem;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    background: var(--navbar-bg);
    border-bottom: 0.1rem solid var(--navbar-border);
    backdrop-filter: blur(1.6rem) saturate(160%);
    -webkit-backdrop-filter: blur(1.6rem) saturate(160%);
    gap: 2rem;
}

/* Logo */
.navbar__logo {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-shrink: 0;
}

.navbar__logo-icon {
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 0.8rem;
    display: block;
    object-fit: contain;
    mix-blend-mode: multiply;
    flex-shrink: 0;
}

.navbar__logo-wordmark {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.navbar__logo-wordmark span {
    color: var(--accent);
}

/* Spacer */
.navbar__spacer {
    flex: 1;
}

/* Theme switcher â€” moved to profile center view (see .settings-theme-row below) */

/* Avatar */
.navbar__avatar {
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    cursor: pointer;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.navbar__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.navbar__avatar:hover {
    box-shadow: 0 0 0 0.3rem var(--accent-glow);
    transform: scale(1.05);
}

/* ============================================================================
   NAVBAR â€” EXTENSIONS (nav links + apps button)
   ============================================================================ */

.navbar__nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 1.6rem;
}

.navbar__nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.7rem;
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s;
    gap: 0.5rem;
}

.navbar__nav-link:hover {
    background: var(--surface-2);
    color: var(--text);
}

.navbar__nav-link.is-active {
    color: var(--text);
    background: var(--surface-2);
}

.navbar__nav-link svg {
    width: 1.4rem;
    height: 1.4rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* Panel toggle button â€” hidden on desktop, visible on tablet/mobile */
.navbar__panel-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 0.7rem;
    color: var(--text-muted);
    background: transparent;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.navbar__panel-toggle svg {
    width: 1.8rem;
    height: 1.8rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.navbar__panel-toggle:hover {
    background: var(--surface-2);
    color: var(--text);
}

/* Apps button â€” removed from navbar, kept for reference if needed */

/* Notification bell */
.navbar__bell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 0.7rem;
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s;
    position: relative;
    flex-shrink: 0;
}

.navbar__bell:hover {
    background: var(--surface-2);
    color: var(--text);
}

.navbar__bell svg {
    width: 1.6rem;
    height: 1.6rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.navbar__bell-dot {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: var(--accent);
    border: 0.15rem solid var(--bg);
}

/* ============================================================================
   APPS PANEL (in left sidebar)
   ============================================================================ */

.apps-panel__category {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.6rem;
}

.apps-panel__label {
    font-size: 1.0rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
    padding: 0 0.4rem;
}

.apps-panel__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.app-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 0.6rem 0.9rem;
    border-radius: 1rem;
    border: 0.1rem solid var(--border-subtle);
    background: var(--surface-2);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.app-tile:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
    transform: translateY(-0.1rem);
}

.app-tile__icon {
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: var(--surface);
    border: 0.1rem solid var(--border-subtle);
}

.app-tile__label {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.2;
}

/* â”€â”€ Ontap app tile variant (new) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.app-tile--ontap {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    text-align: left;
}

.app-tile__emoji {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.app-tile__info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.app-tile--ontap .app-tile__label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-tile__desc {
    font-size: 1.0rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* â”€â”€ Apps panel search + chips â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.apps-search-wrap {
    padding: 0 0 0.8rem;
}

.apps-search-input {
    width: 100%;
    padding: 0.65rem 1rem;
    border: 0.1rem solid var(--border-subtle);
    border-radius: 0.8rem;
    background: var(--surface-2);
    color: var(--text);
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.apps-search-input:focus {
    border-color: var(--accent);
}

.apps-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.apps-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.38rem 0.85rem;
    border-radius: 2rem;
    border: 0.1rem solid var(--border-subtle);
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 1.0rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    white-space: nowrap;
}

.apps-cat-chip:hover {
    border-color: var(--accent);
    color: var(--text);
}

.apps-cat-chip.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.apps-ontap-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    padding-top: 0.25rem;
}

.apps-loading,
.apps-empty {
    font-size: 1.1rem;
    color: var(--text-faint);
    padding: 1.6rem 0.4rem;
    text-align: center;
}

/* â”€â”€ #center-app â€” ontap iframe view â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.center-app__bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.4rem;
    border-bottom: 0.1rem solid var(--border-subtle);
    flex-shrink: 0;
    min-height: 4.8rem;
}

.center-app__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 0.8rem;
    border: 0.1rem solid var(--border-subtle);
    background: var(--surface-2);
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.12s, border-color 0.12s;
}

.center-app__back:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
    color: var(--text);
}

.center-app__back svg {
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.center-app__name {
    flex: 1;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.center-app__newtab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.0rem;
    height: 3.0rem;
    border-radius: 0.7rem;
    color: var(--text-faint);
    flex-shrink: 0;
    transition: color 0.12s;
    text-decoration: none;
}

.center-app__newtab:hover {
    color: var(--accent);
}

.center-app__newtab svg {
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ontap-frame {
    flex: 1;
    width: 100%;
    border: none;
    display: block;
    background: var(--surface);
    min-height: 0;
}

/* ============================================================================
   PAGE WRAPPER & SHELL
   ============================================================================ */

.page {
    height: calc(100vh - 5.6rem);
    overflow: hidden;
    padding: 0;
    max-width: none;
    margin: 0;
    position: relative;
}

/* 3-column shell: chat | center | right panel */
.shell {
    display: grid;
    grid-template-columns: 1fr 1.4fr 30rem;
    grid-template-rows: 1fr;
    gap: 0;
    height: 100%;
    overflow: hidden;
}

/* Collapsed left panel â€” center column expands into freed space */
.shell.side-collapsed {
    grid-template-columns: 4.4rem 1fr 30rem;
}

.shell.side-collapsed .side-panel {
    display: none;
}

/* All columns stretch to full shell height via default grid align-items:stretch */

.shell__left {
    display: flex;
    flex-direction: row;
    min-width: 0;
    overflow: hidden;
    border-right: 0.1rem solid var(--border-subtle);
}

/* Side icon-bar nav */
.side-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 4.4rem;
    flex-shrink: 0;
    padding: 1.4rem 0;
    gap: 0.4rem;
    border-right: 0.1rem solid var(--border-subtle);
}

.side-nav__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 0.8rem;
    color: var(--text-faint);
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.side-nav__btn svg {
    width: 1.6rem;
    height: 1.6rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.side-nav__btn:hover {
    background: var(--surface-2);
    color: var(--text);
}

.side-nav__btn.is-active {
    background: var(--surface-2);
    color: var(--accent);
}

/* Panel content area */
.side-panel {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding: 2rem 1.8rem 3rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    background-color: rgba(0, 0, 0, 0.05);
}

.side-panel::-webkit-scrollbar {
    width: 0.4rem;
}

.side-panel::-webkit-scrollbar-track {
    background: transparent;
}

.side-panel::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10rem;
}

.side-panel__view {
    display: none;
}

.side-panel__view.is-active {
    display: block;
}

.shell__center {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    padding: 0;
}

/* Center-column view switcher */
.center-view {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.center-view.is-active {
    display: flex;
}

/* Home view keeps existing padding */
#center-home {
    padding: 2rem 2.4rem 0;
}

/* Placeholder views (pages, notifications, app) */
.center-view__inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 4rem 3.2rem;
    flex: 1;
}

.center-view__title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.03em;
    margin-bottom: 0.6rem;
}

.center-view__sub {
    font-size: 1.3rem;
    color: var(--text-muted);
}

/* Flows teaser */
.flows-teaser {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 4rem 3.2rem;
    flex: 1;
    overflow: hidden;
}

.flows-teaser__bg-icon {
    position: absolute;
    right: -1rem;
    top: 50%;
    transform: translateY(-55%);
    font-size: 28rem;
    line-height: 1;
    opacity: 0.07;
    color: var(--text);
    pointer-events: none;
    user-select: none;
    letter-spacing: 0;
}

.flows-teaser__content {
    position: relative;
    z-index: 1;
}

.flows-teaser__title {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.04em;
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

.flows-teaser__sub {
    font-size: 1.35rem;
    color: var(--text-muted);
    max-width: 34rem;
    line-height: 1.6;
}

/* Profile view */
.center-profile {
    padding: 2.4rem 3.2rem;
    overflow-y: auto;
    flex: 1;
}

.shell__right {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    overflow-y: auto;
    padding: 2rem 1.8rem 2rem 1.6rem;
    border-left: 0.1rem solid var(--border-subtle);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.shell__right::-webkit-scrollbar {
    width: 0.3rem;
}

.shell__right::-webkit-scrollbar-track {
    background: transparent;
}

.shell__right::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10rem;
}

/* ============================================================================
   GREETING STRIP
   ============================================================================ */

.greeting {
    padding: 0.4rem 0 0.2rem;
}

.greeting__name {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.greeting__sub {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* ============================================================================
   CAPTURE CARD
   ============================================================================ */

.capture-card {
    background: var(--surface);
    border: 0.1rem solid var(--border);
    border-radius: 1.6rem;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    box-shadow: var(--shadow-md);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.capture-card:focus-within {
    border-color: var(--accent);
    box-shadow: var(--shadow-md), 0 0 0 0.3rem var(--accent-glow);
}

.capture-card__textarea {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1.4rem;
    font-family: inherit;
    color: var(--text);
    resize: none;
    min-height: 7rem;
    line-height: 1.65;
    caret-color: var(--accent);
}

.capture-card__textarea::placeholder {
    color: var(--text-faint);
}

.capture-card__divider {
    height: 0.1rem;
    background: var(--border-subtle);
    margin: 0;
}

.capture-card__footer {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.capture-card__mic {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 0.8rem;
    border: 0.1rem solid var(--border);
    color: var(--text-faint);
    background: var(--surface-2);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.capture-card__mic:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-glow);
}

.capture-card__mic svg {
    width: 1.4rem;
    height: 1.4rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.capture-card__actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    flex-wrap: wrap;
}

.capture-card__save {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 0.8rem;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, box-shadow 0.15s;
    border: none;
}

.capture-card__save:hover {
    background: var(--accent-hover);
    box-shadow: 0 0.3rem 1rem var(--accent-glow);
}

.capture-card__save svg {
    width: 1.4rem;
    height: 1.4rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================================================
   SECTION STRUCTURE
   ============================================================================ */

.section {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.section__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.section__meta {
    font-size: 1.1rem;
    color: var(--text-faint);
    font-weight: 500;
}

.section__link {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 500;
    transition: opacity 0.15s;
}

.section__link:hover {
    opacity: 0.75;
}

.section__badge {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--accent-2);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.section__badge::before {
    content: '';
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--accent-2);
    animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }
}

/* 2-column card grid */
.card-grid--2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

/* 3-column card grid */
.card-grid--3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

/* ============================================================================
   BRIEF FEED (left column â€” compact numbered news list)
   ============================================================================ */

.side-panel .section__header {
    padding-bottom: 1.2rem;
    margin-bottom: 0.2rem;
    border-bottom: 0.1rem solid var(--border-subtle);
}

.brief-feed {
    display: flex;
    flex-direction: column;
}

/* â”€â”€ Category tabs â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.brief-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    padding: 0.8rem 0 1.0rem;
    border-bottom: 0.1rem solid var(--border-subtle);
    margin-bottom: 0.2rem;
}

.brief-tab {
    font-size: 0.84rem;
    font-weight: 500;
    padding: 0.3rem 0.85rem;
    border-radius: 10rem;
    border: 0.1rem solid var(--border-subtle);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: background 0.15s, color 0.15s;
}

.brief-tab:hover:not(.brief-tab--locked) {
    background: var(--surface-2);
    color: var(--text);
}

.brief-tab--active {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

.brief-tab--locked {
    opacity: 0.5;
    cursor: pointer;
}

.brief-tab__lock {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* â”€â”€ Category overview paragraph â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.brief-summary {
    font-size: 1.0rem;
    color: var(--text-muted);
    line-height: 1.55;
    padding: 1.1rem 0 0.6rem;
    border-bottom: 0.1rem solid var(--border-subtle);
    margin-bottom: 0.2rem;
}

/* â”€â”€ Story clusters â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.brief-cluster {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1.2rem 0;
    border-bottom: 0.1rem solid var(--border-subtle);
}

.brief-cluster:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.brief-cluster__header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.brief-cluster__topic {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
}

/* â”€â”€ Source link pills â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

a.brief-source,
.brief-source--link {
    cursor: pointer;
    text-decoration: none;
}

a.brief-source:hover,
.brief-source--link:hover {
    background: var(--accent-glow);
    color: var(--accent);
}

/* â”€â”€ Loading / empty / error states â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.brief-loading,
.brief-empty,
.brief-error {
    font-size: 0.95rem;
    color: var(--text-faint);
    padding: 1.4rem 0;
    text-align: center;
}

.brief-retry-btn {
    background: none;
    border: 0.1rem solid var(--border-subtle);
    border-radius: 0.4rem;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.88rem;
    padding: 0.2rem 0.7rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.brief-retry-btn:hover {
    background: var(--surface-2);
}

/* â”€â”€ Premium upsell banner â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.brief-upsell {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.6rem;
    padding: 1rem 1.1rem;
    border-radius: 0.75rem;
    background: var(--accent-glow);
    border: 0.1rem solid var(--accent);
    box-shadow: 0 0 0 0.25rem var(--accent-glow);
}

.brief-upsell__icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    line-height: 1;
}

.brief-upsell__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.brief-upsell__label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--accent);
}

.brief-upsell__text {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.brief-upsell__btn {
    flex-shrink: 0;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1.05rem;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 0.15rem 0.5rem rgba(0, 0, 0, 0.15);
}

.brief-upsell__btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 0.2rem 0.7rem rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 1rem;
    padding: 1.2rem 0;
    border-bottom: 0.1rem solid var(--border-subtle);
}

.brief-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.brief-item__num {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-faint);
    min-width: 1.6rem;
    padding-top: 0.15rem;
    flex-shrink: 0;
}

.brief-item__content {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
}

.brief-item__row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.brief-item__tag {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.1rem 0.55rem;
    border-radius: 10rem;
    background: var(--accent-glow);
    color: var(--accent);
    white-space: nowrap;
    flex-shrink: 0;
}

.brief-item__headline {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
}

.brief-item__summary {
    font-size: 1.0rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.brief-item__sources {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.1rem;
}

.brief-source {
    font-size: 0.84rem;
    font-weight: 500;
    padding: 0.15rem 0.6rem;
    border-radius: 10rem;
    background: var(--surface-2);
    color: var(--text-muted);
}

/* ============================================================================
   PINNED NOTES VIEW
   ============================================================================ */

.postits-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notes-add-btn {
    background: none;
    border: 0.1rem solid var(--border-subtle);
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.6rem;
    line-height: 1;
    width: 2.8rem;
    height: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.notes-add-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.notes-empty {
    font-size: 1.1rem;
    color: var(--text-faint);
    text-align: center;
    padding: 2rem 0;
}

.postit {
    position: relative;
    background: var(--surface-2);
    border: 0.1rem solid var(--border-subtle);
    border-left: 0.3rem solid var(--accent);
    border-radius: 0.8rem;
    padding: 1.1rem 1.3rem 1rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.postit:hover {
    background: var(--surface-hover);
    border-left-color: var(--accent-2);
}

.postit--selected {
    border-left-color: var(--accent-2);
    box-shadow: 0 0 0 0.15rem var(--accent-2);
}

.postit--dragging {
    opacity: 0.35;
    cursor: grabbing;
}

.postit--drag-over {
    outline: 0.2rem dashed var(--accent-1);
    outline-offset: 0.2rem;
}

/* Color variants */
.postit--yellow {
    border-left-color: #f0bf00;
}

.postit--green {
    border-left-color: #3cab68;
}

.postit--blue {
    border-left-color: #3a8cd4;
}

.postit--pink {
    border-left-color: #e0608a;
}

.postit--purple {
    border-left-color: #9b6dd6;
}

.postit__meta {
    font-size: 1.0rem;
    color: var(--text-faint);
    font-weight: 500;
}

.postit__delete {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    background: none;
    border: none;
    color: var(--text-faint);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s, color 0.12s;
    padding: 0.1rem 0.4rem;
}

.postit:hover .postit__delete {
    opacity: 0.5;
}

.postit__delete:hover {
    opacity: 1 !important;
    color: var(--danger, #e05555);
}

/* Editing state */
.postit--editing .postit__body {
    display: none;
}

.postit__editor {
    width: 100%;
    min-height: 8rem;
    resize: vertical;
    font: inherit;
    font-size: 1.25rem;
    line-height: 1.55;
    color: var(--text);
    background: var(--surface);
    border: 0.1rem solid var(--accent);
    border-radius: 0.5rem;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.55rem;
    outline: none;
}

/* AI actions bar â€” moved to notes section header */
.notes-ai-btn {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border: 0.1rem solid var(--accent);
    border-radius: 2rem;
    background: none;
    color: var(--accent);
    cursor: pointer;
    transition: background 0.14s, color 0.14s;
    white-space: nowrap;
}

.notes-ai-btn:hover {
    background: var(--accent);
    color: #fff;
}

.notes-ai-btn--locked {
    opacity: 0.38;
    cursor: not-allowed;
    pointer-events: initial;
}

.notes-ai-btn--locked:hover {
    background: none;
    color: var(--accent);
}

/* LinkedIn result copy modal */
.ai-copy-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: 2rem;
}

.ai-copy-modal__card {
    background: var(--bg-card, var(--surface));
    border-radius: 1.2rem;
    padding: 2.4rem 2.8rem;
    max-width: 56rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.4);
}

.ai-copy-modal__title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-1, var(--text));
}

.ai-copy-modal__text {
    min-height: 16rem;
    resize: vertical;
    font: inherit;
    font-size: 1.3rem;
    line-height: 1.6;
    background: var(--surface-2);
    border: 0.1rem solid var(--border-subtle);
    border-radius: 0.6rem;
    padding: 1rem 1.2rem;
    color: var(--text);
}

.ai-copy-modal__actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.ai-copy-modal__copy,
.ai-copy-modal__close {
    padding: 0.6rem 1.6rem;
    border-radius: 2rem;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    border: 0.1rem solid var(--border-subtle);
    background: none;
    color: var(--text);
    transition: background 0.14s, color 0.14s;
}

.ai-copy-modal__copy {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.ai-copy-modal__copy:hover {
    opacity: 0.85;
}

.ai-copy-modal__close:hover {
    background: var(--surface-hover);
}

/* Proofread diff modal */
.ai-proof-modal__card { max-width: 80rem; }
.ai-proof-modal__cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}
.ai-proof-modal__col { display: flex; flex-direction: column; gap: 0.6rem; }
.ai-proof-modal__col-label { font-size: 1.15rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.05em; }
.ai-proof-modal__text {
    font-size: 1.3rem;
    line-height: 1.65;
    background: var(--surface-2);
    border: 0.1rem solid var(--border-subtle);
    border-radius: 0.6rem;
    padding: 1rem 1.2rem;
    color: var(--text-2);
    white-space: pre-wrap;
    min-height: 12rem;
    max-height: 40vh;
    overflow-y: auto;
}
.ai-proof-modal__text--new {
    color: var(--text-1);
    border-color: var(--color-accent, #635bff);
}

/* ============================================================================
   NEWS CARD
   ============================================================================ */

.news-card {
    background: var(--surface);
    border: 0.1rem solid var(--border);
    border-radius: 1.4rem;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
    min-height: 13rem;
}

.news-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-0.15rem);
}

.news-card--featured {
    flex-direction: row;
    gap: 1.6rem;
    align-items: flex-start;
    grid-column: span 2;
    min-height: 14rem;
}

.news-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    min-width: 0;
}

.news-card__thumb {
    width: 12rem;
    height: 8rem;
    border-radius: 0.8rem;
    background: var(--surface-2);
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0.1rem solid var(--border-subtle);
}

.news-card__thumb-placeholder {
    font-size: 2.4rem;
    opacity: 0.35;
}

.news-card__tag {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.news-card__headline {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.news-card--featured .news-card__headline {
    font-size: 1.3rem;
}

.news-card__summary {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.55;
    flex: 1;
}

.news-card__meta {
    font-size: 1.0rem;
    color: var(--text-faint);
    margin-top: auto;
}

/* ============================================================================
   VIDEO CARD
   ============================================================================ */

.video-card {
    background: var(--surface);
    border: 0.1rem solid var(--border);
    border-radius: 1.4rem;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-0.15rem);
}

.video-card__thumb {
    width: 100%;
    aspect-ratio: 16 / 8;
    background: var(--surface-2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 0.1rem solid var(--border-subtle);
}

.video-card__thumb-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--surface-2) 0%, var(--bg) 100%);
}

.video-card__play {
    position: relative;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.4rem 1.6rem var(--accent-glow);
    transition: transform 0.15s, box-shadow 0.15s;
}

.video-card:hover .video-card__play {
    transform: scale(1.08);
    box-shadow: 0 0.6rem 2rem var(--accent-glow);
}

.video-card__play svg {
    width: 1.6rem;
    height: 1.6rem;
    fill: #fff;
    margin-left: 0.2rem;
}

.video-card__info {
    padding: 1.2rem 1.4rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.video-card__tag {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-2);
}

.video-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
}

.video-card__meta {
    font-size: 1.0rem;
    color: var(--text-faint);
}

/* ============================================================================
   PAGE MINI-CARD (Recent Pages)
   ============================================================================ */

.page-mini-card {
    background: var(--surface);
    border: 0.1rem solid var(--border);
    border-radius: 1.4rem;
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.page-mini-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-0.15rem);
}

.page-mini-card__icon {
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 0.9rem;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    border: 0.1rem solid var(--border-subtle);
}

.page-mini-card__name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.page-mini-card__status {
    display: inline-flex;
    align-items: center;
    font-size: 1.0rem;
    font-weight: 600;
    padding: 0.2rem 0.7rem;
    border-radius: 10rem;
    width: fit-content;
}

.page-mini-card__status--draft {
    background: var(--widget-badge-bg);
    color: var(--widget-badge-text);
}

.page-mini-card__status--published {
    background: var(--accent-2-glow);
    color: var(--accent-2);
}

.page-mini-card__meta {
    font-size: 1.0rem;
    color: var(--text-faint);
    margin-top: auto;
}

.page-mini-card__actions {
    display: flex;
    gap: 0.6rem;
    margin-top: auto;
}

/* ============================================================================
   BENTO GRID (kept for .widget base reuse, bento class unused)
   ============================================================================ */

/* ============================================================================
   WIDGET BASE
   ============================================================================ */

.widget {
    background: var(--surface);
    border: 0.1rem solid var(--border);
    border-radius: 1.4rem;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
}

/* Widget header row */
.widget__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
}

.widget__title-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.widget__icon {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.6rem;
    background: var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.widget__icon svg {
    width: 1.3rem;
    height: 1.3rem;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.widget__icon--accent2 {
    background: var(--accent-2-glow);
}

.widget__icon--accent2 svg {
    stroke: var(--accent-2);
}

.widget__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.widget__badge {
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 10rem;
    background: var(--widget-badge-bg);
    color: var(--widget-badge-text);
    margin-left: auto;
    letter-spacing: 0.04em;
}

.widget__action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.6rem;
    color: var(--text-faint);
    transition: background 0.15s, color 0.15s;
}

.widget__action:hover {
    background: var(--surface-2);
    color: var(--text);
}

.widget__action svg {
    width: 1.3rem;
    height: 1.3rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Widget body */
.widget__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    overflow: hidden;
}

/* ============================================================================
   SKELETON SHIMMER
   ============================================================================ */

.skel {
    background: var(--surface-2);
    border-radius: 0.5rem;
    height: 1rem;
    animation: skel-pulse 1.8s ease-in-out infinite;
}

.skel--lg {
    height: 1.3rem;
}

.skel--sm {
    height: 0.7rem;
}

.skel--w-full {
    width: 100%;
}

.skel--w-3q {
    width: 75%;
}

.skel--w-half {
    width: 50%;
}

.skel--w-2q {
    width: 62%;
}

.skel--w-1q {
    width: 38%;
}

@keyframes skel-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.38;
    }
}

/* ============================================================================
   CAPTURE WIDGET â€” AI BUTTONS (reused inside capture-card)
   ============================================================================ */

.btn-ai {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 0.7rem;
    background: var(--surface-2);
    border: 0.1rem solid var(--border);
    color: var(--text-muted);
    font-size: 1.15rem;
    font-weight: 500;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}

.btn-ai:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
}

.btn-ghost-sm {
    padding: 0.3rem 0.8rem;
    border-radius: 0.6rem;
    font-size: 1.1rem;
    font-weight: 500;
    background: transparent;
    border: 0.1rem solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-family: inherit;
}

.btn-ghost-sm:hover {
    background: var(--surface-2);
    color: var(--text);
}

.btn-ghost-sm--accent {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-ghost-sm--accent:hover {
    background: var(--accent-glow);
}

/* ============================================================================
   MARKETS WIDGET (right panel)
   ============================================================================ */

.markets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
}

.market-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    background: var(--surface-2);
    border-radius: 0.8rem;
    border: 0.1rem solid var(--border-subtle);
}

.market-item__name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.market-item__value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.market-item__change {
    font-size: 0.95rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.market-item__change.up {
    color: var(--accent-2);
}

.market-item__change.flat {
    color: var(--text-faint);
}

.market-item__change.down {
    color: #F06A6A;
}

.markets-skeleton {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.markets-skeleton__row {
    height: 5.5rem;
    background: var(--surface-2);
    border-radius: 0.8rem;
    animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.markets-error {
    font-size: 1.2rem;
    color: var(--text-faint);
    padding: 1rem 0;
    text-align: center;
}

.markets-analyze-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    padding: 0.3rem;
    cursor: pointer;
    color: var(--text-faint);
    opacity: 0.5;
    transition: opacity 0.2s, color 0.2s;
    margin-left: 0.5rem;
}

.markets-analyze-btn:hover {
    opacity: 1;
    color: var(--accent-1);
}

/* ============================================================================
   WEATHER WIDGET (right panel)
   ============================================================================ */

.weather-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

/* Loading skeleton */
.weather-skeleton {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.4rem 0;
}

.weather-skeleton__temp,
.weather-skeleton__line {
    border-radius: 0.4rem;
    background: var(--surface-hover);
    animation: skeleton-pulse 1.4s ease-in-out infinite;
}

.weather-skeleton__temp {
    height: 3.6rem;
    width: 7rem;
}

.weather-skeleton__line {
    height: 1.2rem;
    width: 80%;
}

.weather-skeleton__line--short {
    width: 50%;
}

@keyframes skeleton-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.weather-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.weather-temp {
    font-size: 4rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.04em;
    line-height: 1;
}

.weather-icon {
    font-size: 2.8rem;
    line-height: 1;
}

/* City name in widget header right side */
.weather-header-city {
    font-size: 1.05rem;
    color: var(--text-faint);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 12rem;
    align-self: center;
}

/* AI sentence or fallback description line */
.weather-summary {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 0.5rem;
    font-style: italic;
}

/* 5-day forecast strip */
.weather-forecast {
    display: flex;
    gap: 0.2rem;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 0.1rem solid var(--border-subtle);
}

.weather-forecast__day {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 1.0rem;
}

.weather-forecast__label {
    color: var(--text-faint);
    font-weight: 600;
}

.weather-forecast__icon {
    font-size: 1.4rem;
}

.weather-forecast__high {
    color: var(--text);
    font-weight: 700;
}

.weather-error {
    font-size: 1.1rem;
    color: var(--danger, #e05555);
    padding: 0.6rem 0;
}

/* City picker panel â€” layout now via .weather-cfg-row */
.weather-city-picker {
    padding: 0;
}

.weather-city-form {
    display: flex;
    gap: 0.6rem;
}

.weather-city-input {
    flex: 1;
    font: inherit;
    font-size: 1.2rem;
    padding: 0.5rem 0.9rem;
    border: 0.1rem solid var(--border-subtle);
    border-radius: 0.6rem;
    background: var(--surface-2);
    color: var(--text);
    outline: none;
}

.weather-city-input:focus {
    border-color: var(--accent);
}

.weather-city-submit {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.5rem 1.1rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0.6rem;
    cursor: pointer;
}

.weather-city-results {
    list-style: none;
    margin: 0.4rem 0 0;
    border: 0.1rem solid var(--border-subtle);
    border-radius: 0.6rem;
    overflow: hidden;
    background: var(--surface-2);
}

.weather-city-result {
    padding: 0.6rem 1rem;
    font-size: 1.15rem;
    cursor: pointer;
    color: var(--text);
}

.weather-city-result:hover {
    background: var(--surface-hover);
}

/* ============================================================================
   WORLD CLOCK WIDGET (right panel)
   ============================================================================ */

.clock-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.clock-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0;
    border-bottom: 0.1rem solid var(--border-subtle);
}

.clock-item:last-child {
    border-bottom: none;
}

.clock-item__city {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.clock-item__time {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

/* ============================================================================
   TIMER WIDGET (right panel)
   ============================================================================ */

.timer-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    padding: 0.4rem 0;
}

.timer-time {
    font-size: 3.6rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.timer-label {
    font-size: 1.0rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.timer-controls {
    display: flex;
    gap: 0.8rem;
}

.timer-btn {
    padding: 0.55rem 1.4rem;
    border-radius: 0.8rem;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    border: 0.1rem solid var(--border);
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.timer-btn--start {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.timer-btn--start:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.timer-btn--reset {
    background: var(--surface-2);
    color: var(--text-muted);
}

.timer-btn--reset:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.timer-presets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.timer-preset {
    padding: 0.3rem 0.9rem;
    border-radius: 10rem;
    font-size: 1.05rem;
    font-weight: 500;
    background: var(--surface-2);
    border: 0.1rem solid var(--border-subtle);
    color: var(--text-faint);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-family: inherit;
}

.timer-preset:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================================================
   CHAT PANEL (center column)
   ============================================================================ */

.chat-panel {
    background: transparent;
    border: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    box-shadow: none;
}

.chat-panel__header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.2rem 0 1rem;
    border-bottom: 0.1rem solid var(--border-subtle);
    flex-shrink: 0;
}

.chat-panel__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.chat-panel__badge {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 10rem;
    background: var(--accent-glow);
    color: var(--accent);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* LLM model selector â€” in .search-pills row, pushed to the right */
.llm-selector {
    margin-left: auto;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 0.1rem solid var(--border);
    border-radius: 2rem;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.3rem 1.8rem 0.3rem 1.8rem;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: left 0.55rem center, right 0.45rem center;
    background-size: 1rem, 1rem;
    transition: border-color 0.15s, color 0.15s;
    max-width: 14rem;
}

.llm-selector:hover,
.llm-selector:focus {
    border-color: var(--accent);
    color: var(--text);
}

/* Scrollable message stream */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.2rem 0.6rem 1.2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    scrollbar-gutter: stable;
}

.chat-messages::-webkit-scrollbar {
    width: 0.4rem;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10rem;
}

/* Message bubbles */
.chat-msg {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-width: 90%;
}

.chat-msg--user {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-msg--ai,
.chat-msg--note {
    align-self: flex-start;
    align-items: flex-start;
}

.chat-msg__bubble {
    padding: 0.7rem 1rem;
    border-radius: 1rem;
    font-size: 1.1rem;
    line-height: 1.55;
    word-break: break-word;
}

.chat-msg--user .chat-msg__bubble {
    background: var(--accent);
    color: #fff;
    border-bottom-right-radius: 0.25rem;
}

.chat-msg--ai .chat-msg__bubble {
    background: var(--surface-2);
    color: var(--text);
    border: 0.1rem solid var(--border-subtle);
    border-bottom-left-radius: 0.25rem;
}

.chat-msg--ai .chat-msg__bubble strong {
    font-weight: 600;
}

.chat-msg--ai .chat-msg__bubble em {
    font-style: italic;
}

.chat-msg--ai .chat-msg__bubble code {
    font-family: monospace;
    font-size: 0.95em;
    background: var(--surface-3, rgba(0, 0, 0, 0.08));
    padding: 0.1em 0.35em;
    border-radius: 0.25rem;
}

.chat-msg--ai .chat-msg__bubble pre {
    background: var(--surface-3, rgba(0, 0, 0, 0.08));
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 0.5rem 0;
    font-size: 0.9em;
}

.chat-msg--ai .chat-msg__bubble pre code {
    background: none;
    padding: 0;
}

.chat-msg--note .chat-msg__bubble {
    background: var(--surface-2);
    color: var(--text);
    border: 0.1rem solid var(--border-subtle);
    border-left: 0.3rem solid var(--accent-2);
    border-radius: 0.25rem 1.2rem 1.2rem 0.25rem;
}

.chat-msg__sender {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-faint);
    padding: 0 0.2rem;
}

.chat-msg--ai .chat-msg__sender {
    color: var(--accent);
}

.chat-msg--note .chat-msg__sender {
    color: var(--accent-2);
}

.chat-msg__meta {
    font-size: 0.8rem;
    color: var(--text-faint);
    padding: 0 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-msg__notice {
    font-size: 0.78rem;
    color: var(--accent);
    opacity: 0.8;
}

/* Typing indicator */
.chat-typing {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 1rem 1.3rem;
    background: var(--surface-2);
    border: 0.1rem solid var(--border-subtle);
    border-radius: 1.2rem;
    border-bottom-left-radius: 0.25rem;
    width: fit-content;
}

.chat-typing__dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--text-faint);
    animation: typing-bounce 1.2s ease-in-out infinite;
}

.chat-typing__dot:nth-child(2) {
    animation-delay: 0.22s;
}

.chat-typing__dot:nth-child(3) {
    animation-delay: 0.44s;
}

@keyframes typing-bounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-0.35rem);
        opacity: 1;
    }
}

/* Input area */
.chat-input-area {
    border-top: 0.1rem solid var(--border-subtle);
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex-shrink: 0;
    background: transparent;
}

.chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: 0.8rem;
    background: var(--surface-2);
    border: 0.1rem solid var(--border);
    border-radius: 1.1rem;
    padding: 0.7rem 0.7rem 0.7rem 1.2rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.chat-input-row:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.25rem var(--accent-glow);
}

.chat-textarea {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 1.3rem;
    color: var(--text);
    resize: none;
    line-height: 1.5;
    max-height: 12rem;
    overflow-y: auto;
    caret-color: var(--accent);
    padding: 0;
    top: -0.5rem;
    position: relative;
    padding-top: 0.5rem;
}

.chat-textarea::placeholder {
    color: var(--text-faint);
}

.chat-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.8rem;
    background: var(--accent);
    border: none;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.chat-send-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 0.3rem 1rem var(--accent-glow);
    transform: translateY(-0.05rem);
}

.chat-send-btn svg {
    width: 1.4rem;
    height: 1.4rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---- Search pills ---- */
.search-pills {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 0 0;
}

.chat-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0.1rem solid var(--border);
    border-radius: 2rem;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    color: var(--text-faint);
    opacity: 0.6;
    transition: opacity 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}

.chat-clear-btn:hover {
    opacity: 1;
    color: var(--danger, #e05555);
    border-color: var(--danger, #e05555);
}

/* Search provider dropdown */
.search-selector {
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 0.1rem solid var(--border);
    border-radius: 2rem;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.3rem 2rem 0.3rem 2.2rem;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: left 0.65rem center, right 0.55rem center;
    background-size: 1.1rem, 1.1rem;
    transition: border-color 0.15s, color 0.15s;
}

.search-selector:hover,
.search-selector:focus {
    border-color: var(--accent);
    color: var(--text);
}

/* ============================================================================
   CALENDAR WIDGET (right panel)
   ============================================================================ */

.cal-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.cal-nav__title {
    flex: 1;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.cal-nav__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.6rem;
    background: var(--surface-2);
    border: 0.1rem solid var(--border-subtle);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
}

.cal-nav__btn:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.cal-nav__btn svg {
    width: 1.2rem;
    height: 1.2rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.15rem;
}

.cal-day-name {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2.2rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cal-day {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2.9rem;
    border-radius: 0.6rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    font-variant-numeric: tabular-nums;
    font-family: inherit;
    background: transparent;
    border: none;
}

.cal-day:hover:not(.cal-day--today) {
    background: var(--surface-hover);
    color: var(--text);
}

.cal-day--today {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
}

.cal-day--other-month {
    color: var(--text-faint);
    opacity: 0.45;
}

/* ============================================================================
   POP THEME EXTRAS
   ============================================================================ */

[data-theme="pop"] .chat-panel {
    background: transparent;
}

[data-theme="pop"] .news-card:hover,
[data-theme="pop"] .video-card:hover,
[data-theme="pop"] .page-mini-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.1rem var(--accent), var(--shadow-md);
}

/* ============================================================================
   RESPONSIVE â€” TABLET (640â€“1279px)
   ============================================================================ */

@media (min-width: 640px) and (max-width: 1279px) {
    .navbar {
        padding: 0 2.4rem;
    }

    .navbar__nav {
        display: none;
    }

    .navbar__panel-toggle {
        display: flex;
    }

    .page {
        height: calc(100vh - 5.6rem);
    }

    .shell {
        grid-template-columns: 1fr 22rem;
        grid-template-areas: "center right";
    }

    .shell__left {
        display: none;
        position: fixed;
        top: 5.6rem;
        left: 0;
        height: calc(100vh - 5.6rem);
        z-index: 200;
        box-shadow: 0.4rem 0 2.4rem rgba(0, 0, 0, 0.35);
        background: var(--bg);
        overflow-y: auto;
    }

    .shell__left.is-open {
        display: flex;
    }

    .shell__center {
        grid-area: center;
        padding: 1rem 1rem 0;
    }

    .shell__right {
        grid-area: right;
        padding: 1rem;
        border-left: 0.1rem solid var(--border-subtle);
    }

    #center-home {
        padding: 1rem 1rem 0;
    }

    .greeting__name {
        font-size: 2.2rem;
    }

    .card-grid--2 {
        grid-template-columns: 1fr;
    }

    .news-card--featured {
        grid-column: span 1;
        flex-direction: column;
    }

    .news-card__thumb {
        width: 100%;
        height: 10rem;
    }

    .card-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .markets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================================
   RESPONSIVE â€” MOBILE (<640px)
   ============================================================================ */

@media (max-width: 639px) {
    .navbar {
        padding: 0 1.4rem;
        height: 5.2rem;
    }

    .navbar__logo-wordmark {
        font-size: 1.4rem;
    }

    .navbar__nav {
        display: none;
    }

    .navbar__panel-toggle {
        display: flex;
    }

    .page {
        height: calc(100vh - 5.2rem);
        overflow-y: auto;
    }

    .shell {
        grid-template-columns: 1fr;
        grid-template-areas: "center";
        height: auto;
        overflow: visible;
    }

    .shell__left,
    .shell__right {
        display: none;
        position: fixed;
        top: 5.2rem;
        height: calc(100vh - 5.2rem);
        z-index: 200;
        box-shadow: 0.4rem 0 2.4rem rgba(0, 0, 0, 0.35);
        background: var(--bg);
        overflow-y: auto;
    }

    .shell__left {
        left: 0;
    }

    .shell__right {
        right: 0;
        width: 30rem;
        border-left: 0.1rem solid var(--border-subtle);
        padding: 2rem 1.8rem;
    }

    .shell__left.is-open,
    .shell__right.is-open {
        display: flex;
    }

    .shell__center {
        grid-area: center;
        height: calc(100vh - 5.2rem);
        min-height: 38rem;
        overflow: hidden;
        padding: 0;
    }

    #center-home {
        padding: 1.4rem 1.4rem 0;
    }

    .greeting__name {
        font-size: 2rem;
    }

    .card-grid--2 {
        grid-template-columns: 1fr;
    }

    .news-card--featured {
        grid-column: span 1;
        flex-direction: column;
    }

    .news-card__thumb {
        width: 100%;
        height: 10rem;
    }

    .card-grid--3 {
        grid-template-columns: 1fr;
    }

    .markets-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .apps-panel {
        width: calc(100vw - 3.2rem);
        right: -1rem;
    }

    .apps-panel__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .llm-selector {
        max-width: 13rem;
    }
}

/* ============================================================================
   NAVBAR â€” Login Button
   ============================================================================ */

.navbar__login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-1);
    font-size: 1.3rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.navbar__login-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent);
}

.navbar__login-icon {
    display: none;
    width: 1.8rem;
    height: 1.8rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* On mobile: icon-only pill + tighter navbar gap so it doesn't overflow */
@media (max-width: 639px) {
    .navbar {
        gap: 0.8rem;
    }

    .navbar__login-btn {
        width: 3.4rem;
        height: 3.4rem;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        gap: 0;
    }

    .navbar__login-icon {
        display: block;
    }

    .navbar__login-text {
        display: none;
    }
}

@media (max-width: 639px) {
    .cp-modal-overlay {
        align-items: flex-start;
        padding: 1.6rem 0;
        overflow-y: auto;
    }
}

/* ============================================================================
   AUTH MODAL
   ============================================================================ */

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fadeIn 0.2s ease;
}

.auth-modal-overlay[hidden] {
    display: none;
}

.auth-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1.6rem;
    padding: 3.2rem 2.8rem;
    width: min(42rem, calc(100vw - 3.2rem));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.6rem;
    animation: slideUp 0.22s ease;
    box-shadow: 0 2.4rem 6rem rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
    position: relative;
}

.auth-modal__logo {
    width: 4.8rem;
    height: 4.8rem;
    background: var(--accent);
    border-radius: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #fff;
    font-weight: 700;
}

.auth-modal__title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-1);
    text-align: center;
    margin: 0;
}

.auth-modal__sub {
    font-size: 1.35rem;
    color: var(--text-3);
    text-align: center;
    margin: 0;
}

.auth-providers {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
    margin-top: 0.4rem;
}

.auth-provider-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.4rem;
    border-radius: 0.8rem;
    border: 1px solid var(--border);
    background: var(--bg-1);
    color: var(--text-1);
    font-size: 1.4rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.12s;
    text-align: left;
    width: 100%;
}

.auth-provider-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.auth-provider-btn:active {
    transform: translateY(0);
}

.auth-provider-btn svg,
.auth-provider-btn img {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
}

.auth-provider-btn[data-provider="google"] {
    --btn-accent: #4285F4;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-3);
    font-size: 1.2rem;
    width: 100%;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-email-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}

.auth-email-form input {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    background: var(--bg-1);
    color: var(--text-1);
    font-size: 1.4rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.auth-email-form input:focus {
    border-color: var(--accent);
}

.auth-email-form input::placeholder {
    color: var(--text-3);
}

.auth-submit-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0.8rem;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    margin-top: 0.2rem;
}

.auth-submit-btn:hover {
    opacity: 0.88;
}

.auth-email-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.auth-link-btn {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-link-btn:hover {
    color: var(--text-1);
}

.auth-modal__msg {
    font-size: 1.3rem;
    color: var(--color-green, #4caf50);
    text-align: center;
    min-height: 1.8rem;
}

.auth-modal__close {
    position: absolute;
    top: 1.2rem;
    right: 1.4rem;
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.4rem;
    line-height: 1;
}

.auth-modal__close:hover {
    color: var(--text-1);
}

.auth-modal__error {
    font-size: 1.3rem;
    color: var(--color-red, #e05252);
    text-align: center;
    min-height: 1.8rem;
}

/* ============================================================================
   SETTINGS PANEL
   ============================================================================ */

#panel-apps.is-active {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    padding-bottom: 2rem;
}

.settings-block {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.settings-block__label {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
}

/* Account row */
.settings-greeting-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.settings-greeting-row .settings-field__label {
    white-space: nowrap;
    flex-shrink: 0;
}

.settings-account {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-1);
    border-radius: 0.8rem;
    border: 1px solid var(--border);
}

.settings-account__avatar {
    width: 3.8rem;
    height: 3.8rem;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.settings-account__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.settings-account__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.settings-account__name {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.settings-account__email {
    font-size: 1.2rem;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Subscription row */
.settings-sub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 1rem;
    background: var(--bg-1);
    border-radius: 0.8rem;
    border: 1px solid var(--border);
}

.settings-sub__info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.settings-sub__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.7rem;
    border-radius: 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.settings-sub__badge--free {
    background: var(--bg-card);
    color: var(--text-3);
    border: 1px solid var(--border);
}

/* 'user' tier = registered free account */
.settings-sub__badge--user {
    background: var(--bg-card);
    color: var(--text-2);
    border: 1px solid var(--accent);
}

.settings-sub__badge--pro,
.settings-sub__badge--premium {
    background: var(--accent);
    color: #fff;
}

.settings-sub__detail {
    font-size: 1.2rem;
    color: var(--text-3);
}

/* Shared button */
.settings-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border-radius: 0.7rem;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    border: 1px solid transparent;
    white-space: nowrap;
}

.settings-btn--ghost {
    background: var(--bg-1);
    border-color: var(--border);
    color: var(--text-1);
}

.settings-btn--ghost:hover {
    background: var(--bg-card);
}

.settings-btn--primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.settings-btn--primary:hover {
    opacity: 0.88;
}

.settings-btn--upgrade {
    background: var(--accent);
    color: #fff;
    flex-shrink: 0;
}

.settings-btn--upgrade:hover {
    opacity: 0.88;
}

/* AI Profile form */
.settings-profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    cursor: default;
}

.settings-field__label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-2);
}

.settings-field__hint {
    font-size: 1.1rem;
    color: var(--text-3);
    line-height: 1.4;
}

.settings-input.settings-input--full,
textarea.settings-input--full {
    width: 100%;
    box-sizing: border-box;
}

.settings-input--textarea {
    width: 100%;
    resize: vertical;
    min-height: 6rem;
    line-height: 1.5;
}

.settings-profile-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.settings-profile-status {
    font-size: 1.2rem;
    color: var(--accent);
    font-weight: 500;
}

/* Theme selector */
.settings-theme-row {
    display: flex;
    gap: 0.8rem;
}

.settings-theme-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 0.6rem 1rem;
    border-radius: 1rem;
    border: 0.15rem solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 1.15rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.settings-theme-btn svg {
    width: 3rem;
    height: 3rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* Per-theme accent colors so each option is visually distinct */
.settings-theme-btn[data-theme="light"] {
    color: #e8a020;
    border-color: #e8a020;
    background: rgba(232, 160, 32, 0.08);
}

.settings-theme-btn[data-theme="dark"] {
    color: #7b9cef;
    border-color: #7b9cef;
    background: rgba(123, 156, 239, 0.08);
}

.settings-theme-btn[data-theme="pop"] {
    color: #c96ddf;
    border-color: #c96ddf;
    background: rgba(201, 109, 223, 0.08);
}

.settings-theme-btn:hover {
    box-shadow: 0 0 0 0.2rem currentColor;
    opacity: 0.9;
}

.settings-theme-btn.is-active {
    box-shadow: 0 0 0 0.2rem currentColor;
    color: inherit;
}

.settings-theme-btn[data-theme="light"].is-active {
    color: #e8a020;
}

.settings-theme-btn[data-theme="dark"].is-active {
    color: #7b9cef;
}

/* â”€â”€ Chat char counter â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.chat-char-count {
    font-size: 1.1rem;
    color: var(--text-3);
    white-space: nowrap;
    align-self: center;
    margin-left: 0.2rem;
    transition: color 0.15s;
}

.chat-char-count.is-near-limit {
    color: #e8a020;
}

.chat-char-count.is-at-limit {
    color: #e05050;
    font-weight: 600;
}

/* â”€â”€ LLM optgroup labels â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.llm-selector optgroup {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-3);
}

.llm-selector option {
    padding-left: 0.6rem;
}

/* â”€â”€ Admin panel â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* Full-width admin view â€” sits outside .shell, hidden by default */
#center-admin {
    display: none;
    flex-direction: column;
    position: absolute;
    inset: 0;
    background: var(--bg-0);
    z-index: 10;
    overflow: hidden;
}

.has-admin #center-admin {
    display: flex;
}

/* Hide the 3-column shell while admin is open */
.has-admin .shell {
    display: none;
}

.admin-panel {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    padding: 2rem;
    height: 100%;
    overflow: hidden;
}

.admin-panel__header {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    flex-shrink: 0;
}

.admin-panel__title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-1);
    margin: 0;
}

.admin-panel__tabs {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.admin-tab {
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-2);
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.admin-tab.is-active,
.admin-tab:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.admin-panel__body {
    flex: 1;
    overflow: auto;
    min-height: 0;
}

.admin-tab-pane {
    display: none;
}

.admin-tab-pane.is-active {
    display: block;
}

.admin-loading {
    color: var(--text-3);
    font-size: 1.3rem;
    padding: 1.6rem 0;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1.2rem;
    padding: 0.4rem 0;
}

.admin-stat-card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.4rem 1.6rem;
    text-align: center;
}

.admin-stat-val {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1;
    margin-bottom: 0.4rem;
}

.admin-stat-lbl {
    font-size: 1.1rem;
    color: var(--text-3);
    text-transform: capitalize;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.2rem;
}

.admin-table th,
.admin-table td {
    padding: 0.7rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
    white-space: nowrap;
    max-width: 24rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-table th {
    color: var(--text-3);
    font-weight: 600;
    font-size: 1.1rem;
    background: var(--bg-0);
    position: sticky;
    top: 0;
}

.admin-table tr:hover td {
    background: var(--bg-1);
}

/* Make Premium button */
.admin-make-premium-btn {
    font-size: 1.1rem;
    padding: 0.3rem 0.7rem;
    border-radius: 0.5rem;
    border: 1px solid var(--color-accent, #635bff);
    background: transparent;
    color: var(--color-accent, #635bff);
    cursor: pointer;
    white-space: nowrap;
}
.admin-make-premium-btn:hover { background: var(--color-accent, #635bff); color: #fff; }
.admin-make-premium-btn:disabled { opacity: 0.5; cursor: default; }

/* Logs bar (date picker + load button) */
.admin-logs-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.6rem 0.4rem;
}
.admin-logs-bar input[type="date"] {
    padding: 0.4rem 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: var(--bg-1);
    color: var(--text-1);
    font-size: 1.2rem;
}
.admin-logs-bar button {
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: var(--bg-1);
    color: var(--text-1);
    cursor: pointer;
    font-size: 1.2rem;
}

/* Log entries */
.admin-logs { padding: 0.8rem 1.6rem; display: flex; flex-direction: column; gap: 0.4rem; }
.admin-log-entry { border: 1px solid var(--border); border-radius: 0.6rem; overflow: hidden; }
.admin-log-entry summary {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    background: var(--bg-1);
    font-size: 1.2rem;
    list-style: none;
}
.admin-log-entry summary::-webkit-details-marker { display: none; }
.admin-log-entry--err summary { border-left: 3px solid var(--color-red, #e05252); }
.admin-log-ts { color: var(--text-2); font-size: 1.1rem; }
.admin-log-model { font-weight: 500; flex: 1; }
.admin-log-status { font-size: 1.1rem; color: var(--text-2); }
.admin-log-body { padding: 0.6rem 0.8rem; background: var(--bg-0); }
.admin-log-pre {
    font-size: 1.05rem;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 20rem;
    overflow-y: auto;
    background: var(--bg-1);
    border-radius: 0.4rem;
    padding: 0.5rem;
    margin: 0.3rem 0;
}

/* Notification / Activity centre */
.notif-panel { padding: 2rem 2.4rem; overflow-y: auto; flex: 1; min-height: 0; }
.notif-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.6rem; }
.notif-title { font-size: 1.8rem; font-weight: 600; color: var(--text-1); }
.notif-clear-btn {
    font-size: 1.2rem;
    color: var(--text-2);
    background: none;
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: 0.5rem;
    padding: 0.4rem 1rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.notif-clear-btn:hover { color: var(--text-1); border-color: var(--text-2); }

.notif-usage { margin-bottom: 2rem; }
.notif-usage__label {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    color: var(--text-2);
    margin-bottom: 0.5rem;
}
.notif-usage__bar {
    height: 0.6rem;
    border-radius: 0.3rem;
    background: var(--bg-2);
    overflow: hidden;
    cursor: default;
}
.notif-usage__fill {
    height: 100%;
    border-radius: 0.3rem;
    background: var(--color-accent, #635bff);
    transition: width 0.5s ease;
}

.notif-loading { color: var(--text-2); font-size: 1.3rem; padding: 1rem 0; }
.notif-empty   { color: var(--text-2); font-size: 1.3rem; padding: 1rem 0; }

.notif-list { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; }
.notif-item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.1rem 1rem;
    padding: 1rem 1.2rem;
    border-radius: 0.8rem;
    font-size: 1.3rem;
    background: var(--bg-1);
}
.notif-item__type { grid-column: 1; grid-row: 1; color: var(--text-1); font-weight: 500; }
.notif-item__sub  { color: var(--text-2); font-size: 1.1rem; font-weight: 400; }
.notif-item__snippet { grid-column: 1 / -1; grid-row: 2; color: var(--text-2); font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-item__right { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 0.8rem; }
.notif-item__meta { color: var(--text-2); font-size: 1.15rem; white-space: nowrap; }
.notif-item__ts   { color: var(--text-3, var(--text-2)); font-size: 1.1rem; white-space: nowrap; }

.settings-theme-btn[data-theme="pop"].is-active {
    color: #c96ddf;
}

/* Select */
.settings-select {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.7rem;
    border: 1px solid var(--border);
    background: var(--bg-1);
    color: var(--text-1);
    font-size: 1.3rem;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    cursor: pointer;
}

.settings-select:focus {
    outline: none;
    border-color: var(--accent);
}

.settings-select--sm {
    width: auto;
    max-width: 16rem;
}

/* Widget list in settings */
.settings-widget-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1rem;
    background: var(--bg-1);
    border-radius: 0.7rem;
    border: 1px solid var(--border);
}

.settings-widget-row__order {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex-shrink: 0;
}

.settings-widget-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.4rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 0.3rem;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    transition: background 0.12s, color 0.12s;
}

.settings-widget-arrow:hover:not([disabled]) {
    background: var(--surface-hover);
    color: var(--text);
}

.settings-widget-arrow[disabled] {
    opacity: 0.25;
    cursor: default;
}

.settings-widget-row__check {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
}

.settings-widget-row__check input[type="checkbox"] {
    width: 1.5rem;
    height: 1.5rem;
    accent-color: var(--accent);
    cursor: pointer;
}

.settings-widget-row__name {
    font-size: 1.3rem;
    color: var(--text-1);
    font-weight: 500;
    flex: 1;
}

.settings-widget-row__cfg {
    margin-left: auto;
    flex-shrink: 0;
}

.settings-input {
    padding: 0.5rem 0.8rem;
    border-radius: 0.6rem;
    border: 1px solid var(--border);
    background: var(--bg-1);
    color: var(--text-1);
    font-size: 1.3rem;
    font-family: inherit;
    width: 16rem;
    max-width: 100%;
    outline: none;
    transition: border-color 0.15s;
}

.settings-input:focus {
    border-color: var(--accent);
}

.settings-input--sm {
    width: 12rem;
}

/* Clock city picker */
.clock-city-picker {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.clock-city-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.clock-city-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    border: 1px solid var(--border);
    background: var(--bg-2, var(--bg-1));
    color: var(--text-1);
    font-size: 1.15rem;
    cursor: pointer;
    line-height: 1.4;
    transition: background 0.12s, border-color 0.12s;
}

.clock-city-tag:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
}

/* ============================================================================
   WIDGET â€” Remove Button
   ============================================================================ */

.widget {
    position: relative;
}

.widget__remove-btn {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.widget:hover .widget__remove-btn,
.widget:focus-within .widget__remove-btn {
    opacity: 1;
}

.widget__remove-btn:hover {
    background: rgba(200, 50, 50, 0.8);
}

/* ============================================================================
   CHAT â€” Upgrade Prompt & Upgrade Button
   ============================================================================ */

.chat-upgrade-prompt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 0.8rem;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    font-size: 1.3rem;
    color: var(--text-2);
    margin: 0.4rem 0;
}

.chat-upgrade-btn {
    flex-shrink: 0;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.chat-upgrade-btn:hover {
    opacity: 0.88;
}

/* ============================================================================
   UPGRADE MODAL â€” Pricing Cards & Feature List
   ============================================================================ */

.upgrade-modal__pricing {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.upgrade-modal__price-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1.2rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: var(--bg-1);
    position: relative;
}

.upgrade-modal__price-card--yearly {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, var(--bg-1));
}

.upgrade-modal__price-badge {
    position: absolute;
    top: -1rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.15rem 0.6rem;
    border-radius: 2rem;
    white-space: nowrap;
}

.upgrade-modal__price-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.upgrade-modal__price-amount {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-1);
    line-height: 1;
}

.upgrade-modal__price-amount span {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-3);
}

.upgrade-modal__features {
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.upgrade-modal__features li {
    font-size: 1.3rem;
    color: var(--text-2);
    padding-left: 1.6rem;
    position: relative;
}

.upgrade-modal__features li::before {
    content: 'âœ“';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.settings-sub__limits {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 0.2rem;
}

.settings-sub__limits span {
    font-size: 1.1rem;
    color: var(--text-3);
    background: var(--bg-1);
    border: 1px solid var(--border);
    padding: 0.15rem 0.6rem;
    border-radius: 2rem;
}

/* ============================================================================
   ANIMATIONS (shared)
   ============================================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(1.6rem) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================================================
   PANEL OVERLAY BACKDROP (tablet/mobile)
   ============================================================================ */

.panel-overlay-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    top: 5.6rem;
    background: rgba(0, 0, 0, 0.45);
    z-index: 199;
    animation: fadeIn 0.18s ease;
}

.panel-overlay-backdrop.is-visible {
    display: block;
}

@media (max-width: 639px) {
    .panel-overlay-backdrop {
        top: 5.2rem;
    }
}

/* ============================================================================
   SETTINGS ACCORDION
   ============================================================================ */

.center-profile {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.settings-block {
    display: flex;
    flex-direction: column;
    border-bottom: 0.1rem solid var(--border-subtle);
}

.settings-block__label {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.4rem 3.2rem;
    user-select: none;
    transition: background 0.12s;
}

.settings-block__label:hover {
    background: var(--surface-2);
}

.settings-block__label::after {
    content: '';
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
    border-right: 0.15rem solid currentColor;
    border-bottom: 0.15rem solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 1rem;
}

.settings-block.is-open>.settings-block__label::after {
    transform: rotate(-135deg);
}

.settings-block__body {
    display: none;
    flex-direction: column;
    gap: 0.8rem;
    padding: 0 3.2rem 1.8rem;
}

.settings-block.is-open>.settings-block__body {
    display: flex;
}

/* ============================================================================
   GREETING
   ============================================================================ */

.greeting__edit-input {
    background: transparent;
    border: none;
    border-bottom: 0.15rem solid var(--accent);
    outline: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: var(--accent);
    width: auto;
    min-width: 8rem;
    max-width: 20rem;
    caret-color: var(--accent);
    padding: 0;
}

/* ============================================================================
   WEATHER CITY PICKER â€” Â°F on left
   ============================================================================ */

.weather-cfg-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.weather-cfg-row .weather-city-form {
    flex: 1;
}

.weather-cfg-row .settings-weather-unit {
    margin-top: 0;
    flex-shrink: 0;
}

.settings-weather-unit {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.1rem;
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
}

.settings-weather-unit input[type="checkbox"] {
    width: 1.5rem;
    height: 1.5rem;
    accent-color: var(--accent);
    cursor: pointer;
}

/* ============================================================================
   CLOCK CONFIG ROW â€” city + 24h side by side
   ============================================================================ */

.clock-cfg-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.clock-cfg-row .clock-city-add {
    flex: 1;
    min-width: 0;
}

/* ============================================================================
   FONT SIZE SLIDER
   ============================================================================ */

.settings-font-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-font-slider-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.settings-font-slider {
    flex: 1;
    accent-color: var(--accent);
    cursor: pointer;
    height: 0.4rem;
}

.settings-font-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-2);
    min-width: 5.5rem;
    text-align: right;
}

/* ============================================================================
   NOTES â€” AI ACTIONS IN HEADER
   ============================================================================ */

.section__header--notes {
    flex-wrap: wrap;
    gap: 0.6rem;
}

.notes-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.notes-ai-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notes-ai-bar--loading {
    opacity: 0.55;
    pointer-events: none;
}

/* ============================================================================
   NOTES â€” MOVE TO TOP BUTTON
   ============================================================================ */

.postit__move-top {
    position: absolute;
    bottom: 0.7rem;
    right: 0.8rem;
    background: none;
    border: none;
    color: var(--text-faint);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s, color 0.12s;
    padding: 0.1rem 0.3rem;
    font-family: inherit;
}

.postit:hover .postit__move-top {
    opacity: 0.45;
}

.postit__move-top:hover {
    opacity: 1 !important;
    color: var(--accent);
}

/* ============================================================================
   NOTES â€” MARKDOWN RENDERING
   ============================================================================ */

.postit__body {
    font-size: 1.25rem;
    color: var(--text);
    line-height: 1.55;
    margin-bottom: 0.55rem;
    word-break: break-word;
}

.postit__body ul {
    margin: 0.3rem 0 0.3rem 1.4rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.postit__body li {
    list-style: disc;
}

.postit__body strong {
    font-weight: 700;
}

.postit__body em {
    font-style: italic;
}

/* ============================================================================
   MODULES MANAGER PANEL
   ============================================================================ */

.modules-intro {
    font-size: 1.2rem;
    color: var(--text-faint);
    margin-bottom: 1.4rem;
    line-height: 1.5;
}

.modules-grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.module-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    background: var(--surface-2);
    border: 0.1rem solid var(--border-subtle);
    border-radius: 0.9rem;
    transition: border-color 0.15s;
}

.module-card--coming-soon {
    opacity: 0.5;
}

.module-card__icon {
    flex-shrink: 0;
    width: 2.8rem;
    height: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.module-card__icon svg {
    width: 1.8rem;
    height: 1.8rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.module-card__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.module-card__title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.module-card__desc {
    font-size: 1.1rem;
    color: var(--text-faint);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.module-card__badge {
    flex-shrink: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-faint);
    background: var(--surface-3, var(--surface-2));
    border: 0.1rem solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 0.25rem 0.6rem;
    white-space: nowrap;
}

/* Toggle switch */
.module-toggle-wrap {
    position: relative;
    flex-shrink: 0;
    width: 3.8rem;
    height: 2.2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.module-toggle {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.module-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--surface-3, rgba(255,255,255,0.08));
    border: 0.1rem solid var(--border-subtle);
    border-radius: 2.2rem;
    transition: background 0.2s, border-color 0.2s;
}

.module-toggle-slider::before {
    content: '';
    position: absolute;
    left: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 1.5rem;
    background: var(--text-faint);
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}

.module-toggle:checked + .module-toggle-slider {
    background: var(--accent);
    border-color: var(--accent);
}

.module-toggle:checked + .module-toggle-slider::before {
    transform: translateX(1.6rem) translateY(-50%);
    background: #fff;
}

.module-toggle:focus-visible + .module-toggle-slider {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ============================================================
   RSS READER â€” Side Panel
   ============================================================ */

.rss-side-config {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.rss-side-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.rss-side-hint {
    font-weight: 400;
    color: var(--text-faint);
}

.rss-side-textarea {
    width: 100%;
    padding: 0.7rem 0.8rem;
    font-size: 1.1rem;
    font-family: ui-monospace, 'Courier New', monospace;
    color: var(--text-main);
    background: var(--surface-1);
    border: 0.1rem solid var(--border-subtle);
    border-radius: 0.8rem;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.rss-side-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.rss-load-btn {
    align-self: flex-start;
    padding: 0.5rem 1.2rem;
    font-size: 1.2rem;
    font-weight: 600;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0.7rem;
    cursor: pointer;
    transition: opacity 0.15s;
}

.rss-load-btn:hover { opacity: 0.85; }
.rss-load-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.rss-side-status {
    font-size: 1.1rem;
    color: var(--text-faint);
    padding: 0.2rem 0;
}

/* Compact headline list in side panel */
.rss-side-headlines {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.8rem;
}

.rss-headline {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.7rem 0.8rem;
    background: var(--surface-2);
    border: 0.1rem solid var(--border-subtle);
    border-radius: 0.7rem;
    text-decoration: none;
    color: var(--text-main);
    transition: background 0.12s;
}

.rss-headline:hover { background: var(--surface-hover, var(--surface-2)); opacity: 0.9; }

.rss-headline__source {
    font-size: 1rem;
    font-weight: 700;
    color: var(--feed-color, var(--accent));
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.rss-headline__title {
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rss-headline__time {
    font-size: 1rem;
    color: var(--text-faint);
}

/* "Open Full Reader" button */
.rss-open-center-btn {
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 1.15rem;
    font-weight: 600;
    background: transparent;
    color: var(--accent);
    border: 0.1rem solid var(--accent);
    border-radius: 0.7rem;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, color 0.15s;
}

.rss-open-center-btn:hover {
    background: var(--accent);
    color: #fff;
}

/* ============================================================
   RSS READER â€” Center View
   ============================================================ */

#center-rss {
    padding: 2.4rem 2rem;
    overflow-y: auto;
}

.rss-center {
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.rss-center__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.rss-center__title-row {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.rss-center__title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.rss-center-status {
    font-size: 1.2rem;
    color: var(--text-faint);
}

/* AI Digest button */
.rss-ai-btn {
    padding: 0.55rem 1.3rem;
    font-size: 1.2rem;
    font-weight: 600;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    transition: opacity 0.15s;
}

.rss-ai-btn:hover { opacity: 0.85; }
.rss-ai-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* AI Digest output */
.rss-ai-digest {
    border-radius: 1rem;
    overflow: hidden;
    border: 0.1rem solid var(--border-subtle);
}

.rss-ai-digest__inner {
    background: var(--surface-2);
}

.rss-ai-digest__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.4rem;
    background: var(--accent);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
}

.rss-ai-digest__close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.rss-ai-digest__body {
    padding: 1.4rem;
    font-size: 1.3rem;
    line-height: 1.7;
    color: var(--text-main);
    white-space: pre-wrap;
}

.rss-ai-digest__summary {
    padding: 1.2rem 1.4rem 0.5rem;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-muted);
}

.rss-ai-digest__inner .brief-cluster {
    padding-left: 1.4rem;
    padding-right: 1.4rem;
}

.brief-cluster__summary {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

.brief-cluster__sources {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.5rem;
    margin-top: 0.4rem;
}

.brief-cluster__sources .brief-source {
    font-size: 0.78rem;
    padding: 0.15rem 0.55rem;
    border-radius: 2rem;
    background: var(--surface-3, var(--surface-2));
    border: 0.1rem solid var(--border-subtle);
    color: var(--text-faint);
    white-space: nowrap;
    max-width: 18rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Article cards */
.rss-center-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rss-article-card {
    background: var(--surface-2);
    border: 0.1rem solid var(--border-subtle);
    border-radius: 1rem;
    padding: 1.2rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.rss-article-meta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.rss-source-badge {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--feed-color, var(--accent));
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.6rem;
    background: color-mix(in srgb, var(--feed-color, var(--accent)) 12%, transparent);
    border-radius: 0.4rem;
}

.rss-article-date {
    font-size: 1.1rem;
    color: var(--text-faint);
}

.rss-author-badge {
    font-size: 1.05rem;
    color: var(--text-faint);
}

.rss-article-body {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}

.rss-article-image-wrap {
    flex-shrink: 0;
    width: 7rem;
    height: 5rem;
    border-radius: 0.6rem;
    overflow: hidden;
    background: var(--surface-1);
}

.rss-article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rss-article-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.rss-article-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.rss-article-title a {
    color: var(--text-main);
    text-decoration: none;
}

.rss-article-title a:hover { text-decoration: underline; }

.rss-article-excerpt {
    font-size: 1.2rem;
    color: var(--text-secondary, var(--text-faint));
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rss-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.rss-category-tag {
    font-size: 1rem;
    padding: 0.15rem 0.55rem;
    background: var(--surface-1);
    border: 0.1rem solid var(--border-subtle);
    border-radius: 0.4rem;
    color: var(--text-faint);
}

/* Shared empty / loading / error states */
.rss-empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--text-faint);
    font-size: 1.2rem;
}

.rss-empty-state--loading { color: var(--accent); }
.rss-empty-state--error   { color: #dc2626; }

/* â”€â”€ Feed error alerts (side panel) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.rss-feed-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.4rem;
    border-radius: 0.5rem;
    background: color-mix(in srgb, #dc2626 10%, transparent);
    border: 0.1rem solid color-mix(in srgb, #dc2626 30%, transparent);
    font-size: 0.85rem;
    line-height: 1.4;
}

.rss-feed-alert__msg {
    flex: 1;
    color: var(--text-muted);
    word-break: break-all;
}

.rss-feed-alert__close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--text-faint);
    padding: 0 0.1rem;
    margin-top: -0.1rem;
}

.rss-feed-alert__close:hover { color: #dc2626; }

.rss-error-item {
    font-size: 1.1rem;
    color: #dc2626;
    padding: 0.4rem 0;
    border-bottom: 0.1rem solid var(--border-subtle);
}

/* =====================================================
   Social Post Idea Generator
   ===================================================== */

/* Center view scroll */
#center-social-posts {
    overflow-y: auto;
}

/* Center layout */
.social-center {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2.4rem 2rem;
    max-width: 72rem;
    margin: 0 auto;
}

.social-center__header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-bottom: 0.4rem;
    border-bottom: 0.1rem solid var(--border-subtle);
}

.social-center__title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.social-center__desc {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin: 0;
}

/* â”€â”€ Panel: generator controls â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.sp-panel-body {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding-top: 0.4rem;
}

.sp-label {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* Add a thin divider before every section label that follows a control group */
.sp-persona-grid + .sp-label,
.sp-pill-group + .sp-label {
    border-top: 1px solid var(--border-subtle);
    padding-top: 1rem;
    margin-top: 0.2rem;
}

/* Persona list â€” single column stacked buttons */
/* Persona grid — 2x2 image cards */
.sp-persona-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.sp-persona-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 0.5rem 0.7rem;
    background: var(--bg-secondary);
    border: 0.15rem solid var(--border-subtle);
    border-radius: 0.8rem;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s;
}

.sp-persona-card:hover {
    border-color: var(--accent);
}

.sp-persona-card.is-selected {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, var(--bg-secondary));
}

.sp-persona-card__img {
    width: 100%;
    max-width: 5.6rem;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0.5rem;
}

.sp-persona-card__name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.3;
}

.sp-persona-card.is-selected .sp-persona-card__name {
    color: var(--accent);
}

.sp-persona-card__desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.35;
    font-weight: 400;
}

/* Pill groups — platform / tone / format */
.sp-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sp-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.8rem;
    background: var(--bg-secondary);
    border: 0.15rem solid var(--border-subtle);
    border-radius: 10rem;
    color: var(--text-muted);
    font-size: 1.15rem;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, color 0.12s;
    white-space: nowrap;
}

.sp-pill svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
    stroke-width: 1.75;
    fill: none;
    flex-shrink: 0;
}

.sp-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.sp-pill.is-selected {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Actions row */.sp-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.sp-generate-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0.6rem;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.14s;
}

.sp-generate-btn:hover {
    opacity: 0.88;
}

.sp-copy-btn {
    padding: 0.75rem 1rem;
    background: transparent;
    color: var(--accent);
    border: 0.15rem solid var(--accent);
    border-radius: 0.6rem;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.14s;
    white-space: nowrap;
}

.sp-copy-btn--sm {
    padding: 0.4rem 0.8rem;
    font-size: 1.1rem;
}

/* ✦ Write Post button */
.sp-personalize-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.9rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.14s;
    white-space: nowrap;
}

.sp-personalize-btn:hover {
    opacity: 0.85;
}

.sp-copy-btn:hover:not(:disabled) {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.sp-copy-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Status */
.sp-status {
    font-size: 1.2rem;
    padding: 0.3rem 0;
}

.sp-status--error   { color: #dc2626; }
.sp-status--success { color: #16a34a; }
.sp-status--neutral { color: var(--text-muted); }

/* ── Personalize-with-AI modal ──────────────────────────── */

.sp-personalize-modal .sp-pm-card {
    width: min(56rem, 95vw);
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.sp-pm-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sp-pm-label {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
}

.sp-pm-idea {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 0.9rem 1rem;
    font-size: 1.2rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary);
    max-height: 14rem;
    overflow-y: auto;
}

.sp-pm-textarea {
    width: 100%;
    min-height: 8rem;
    padding: 0.8rem 1rem;
    border: 0.15rem solid var(--border-subtle);
    border-radius: 0.6rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1.25rem;
    line-height: 1.55;
    resize: vertical;
    box-sizing: border-box;
}

.sp-pm-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.sp-pm-result {
    width: 100%;
    min-height: 10rem;
    padding: 0.8rem 1rem;
    border: 0.15rem solid var(--accent);
    border-radius: 0.6rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1.25rem;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
}

.sp-pm-status {
    font-size: 1.15rem;
    min-height: 1.4em;
}

.sp-pm-status--success { color: #16a34a; }
.sp-pm-status--error   { color: #dc2626; }
.sp-pm-status--muted   { color: var(--text-muted); }

/* â”€â”€ Center: Latest idea card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.social-current-card {
    border: 0.2rem solid var(--accent);
    border-radius: 0.8rem;
    overflow: hidden;
}

.social-current-card__bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1.2rem;
    background: color-mix(in srgb, var(--accent) 8%, var(--bg-secondary));
    border-bottom: 0.1rem solid color-mix(in srgb, var(--accent) 20%, transparent);
}

.social-current-badge {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.social-hist-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    flex: 1;
}

.social-hist-tag {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent);
    border-radius: 0.4rem;
    font-size: 1rem;
    font-weight: 600;
}

.social-idea-pre {
    margin: 0;
    padding: 1.4rem;
    background: var(--bg-tertiary, var(--bg-secondary));
    color: var(--text-primary);
    font-family: 'Menlo', 'Consolas', 'Monaco', monospace;
    font-size: 1.25rem;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
}

/* â”€â”€ Center: History feed â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.social-history-section {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.social-history-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.social-history-heading {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.social-clear-btn {
    font-size: 1.1rem;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 0.4rem;
    transition: color 0.12s;
}

.social-clear-btn:hover {
    color: #dc2626;
}

.social-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.social-hist-item {
    border: 0.1rem solid var(--border-subtle);
    border-radius: 0.7rem;
    overflow: hidden;
}

.social-hist-item__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.55rem 1rem;
    background: var(--bg-secondary);
    border-bottom: 0.1rem solid var(--border-subtle);
}

.social-hist-item__ts {
    font-size: 1.05rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.social-hist-item__actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.social-hist-del {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.1rem 0.4rem;
    border-radius: 0.3rem;
    transition: color 0.12s;
}

.social-hist-del:hover {
    color: #dc2626;
}

.social-hist-pre {
    margin: 0;
    padding: 1rem 1.2rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Menlo', 'Consolas', 'Monaco', monospace;
    font-size: 1.15rem;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Tags row inside history item */
.social-hist-item .social-hist-tags {
    padding: 0.5rem 1.2rem;
    background: var(--bg-secondary);
    border-bottom: 0.1rem solid var(--border-subtle);
}

/* â”€â”€ Center: Empty state â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.social-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.social-empty-state__icon {
    width: 3.2rem;
    height: 3.2rem;
    stroke: var(--text-muted);
    stroke-width: 1.5;
    fill: none;
    opacity: 0.5;
}

.social-empty-state p {
    font-size: 1.3rem;
    color: var(--text-muted);
    max-width: 36rem;
    line-height: 1.6;
    margin: 0;
}

/* ── Changelog view ─────────────────────────────────────── */

.cl-wrap {
    max-width: 72rem;
    margin: 0 auto;
    padding: 3rem 2.4rem 5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    flex: 1;
}

.cl-header {
    padding-bottom: 2.4rem;
    border-bottom: 2px solid var(--border-subtle);
    margin-bottom: 2.8rem;
}

.cl-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.4rem;
    letter-spacing: -0.03em;
}

.cl-sub {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin: 0;
}

.cl-entry {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2.4rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.cl-entry:last-child {
    border-bottom: none;
}

.cl-entry__meta {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.cl-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.7rem;
    border-radius: 99px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cl-badge--new    { background: var(--accent); color: #fff; }
.cl-badge--update { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); border: 1px solid var(--accent); }
.cl-badge--launch { background: #16a34a; color: #fff; }

.cl-date {
    font-size: 1.15rem;
    color: var(--text-muted);
    font-weight: 500;
}

.cl-entry__title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.cl-entry__desc {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--text-secondary, var(--text-muted));
    margin: 0;
}

.cl-entry__list {
    margin: 0;
    padding-left: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cl-entry__list li {
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .cl-wrap { padding: 2rem 1.4rem 4rem; }
    .cl-title { font-size: 2rem; }
    .cl-entry__title { font-size: 1.4rem; }
}
