:root {
    --ink: #f3f4f2;
    --ink-soft: #b8bdb4;
    --muted: #8c9187;
    --line: #242722;
    --line-soft: #1c1e19;
    --paper: #0e100d;
    --paper-deep: #060706;
    --white: #151814;
    --sidebar: #090b08;
    --acid: #2563eb;
    --acid-deep: #1d4ed8;
    --coral: #f26b4a;
    --blue: #4878e8;
    --green: #4f8f75;
    --gold: #d49a2a;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    --font-heading: "Manrope", sans-serif;
    --font-body: "DM Sans", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    overflow: hidden;
}

button,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(128, 160, 20, 0.35);
    outline-offset: 2px;
}

.hidden {
    display: none !important;
}

.app-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 246px;
    height: 100vh;
    min-height: 640px;
}

.sidebar {
    background: var(--sidebar);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 20px 16px 16px;
    position: relative;
    z-index: 30;
}

.brand-row,
.topbar,
.dock-heading,
.usage-card-top,
.modal-header,
.profile-row,
.model-picker,
.model-row,
.composer-toolbar {
    align-items: center;
    display: flex;
}

.brand-row {
    justify-content: space-between;
    margin-bottom: 22px;
    padding: 0 5px;
}

.brand {
    align-items: center;
    color: var(--ink);
    display: inline-flex;
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 800;
    gap: 10px;
    letter-spacing: -0.04em;
    text-decoration: none;
}

.brand-mark,
.welcome-mark {
    align-items: center;
    display: flex;
    gap: 2px;
    justify-content: center;
}

.brand-mark {
    background: var(--ink);
    border-radius: 50%;
    height: 32px;
    transform: rotate(-10deg);
    width: 32px;
}

.brand-mark span,
.welcome-mark span {
    background: var(--acid);
    border-radius: 10px;
    display: block;
    transform: rotate(12deg);
    width: 4px;
}

.brand-mark span:nth-child(1),
.welcome-mark span:nth-child(1) {
    height: 10px;
}

.brand-mark span:nth-child(2),
.welcome-mark span:nth-child(2) {
    height: 18px;
}

.brand-mark span:nth-child(3),
.welcome-mark span:nth-child(3) {
    height: 13px;
}

.icon-btn,
.text-icon-btn {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 4px;
}

.sidebar-close,
.menu-btn {
    display: none;
}

.new-chat-btn {
    align-items: center;
    background: var(--ink);
    border: 0;
    border-radius: 11px;
    color: var(--white);
    cursor: pointer;
    display: flex;
    font-size: 13px;
    font-weight: 600;
    gap: 9px;
    justify-content: flex-start;
    padding: 11px 12px;
    transition: transform 180ms ease, background 180ms ease;
    width: 100%;
}

.new-chat-btn:hover {
    background: #30332d;
    transform: translateY(-1px);
}

.plus {
    color: var(--acid);
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
}

.key-hint {
    color: #999d94;
    font-size: 10px;
    margin-left: auto;
}

.primary-nav {
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 18px 0;
    padding-bottom: 18px;
}

.nav-item {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--ink-soft);
    cursor: pointer;
    display: flex;
    font-size: 16px;
    gap: 12px;
    padding: 10px 12px;
    text-align: left;
    width: 100%;
    transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
}

.nav-item:hover {
    transform: translateX(2px);
}

.nav-item.active {
    font-weight: 600;
}

.nav-icon {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.nav-icon svg {
    width: 18px !important;
    height: 18px !important;
    display: block;
}

.nav-badge {
    background: var(--acid);
    color: #ffffff;
    border-radius: 99px;
    font-size: 9px;
    font-weight: 700;
    margin-left: auto;
    padding: 2px 6px;
    text-transform: uppercase;
}

.history-block {
    min-height: 0;
    overflow: hidden;
}

.section-kicker {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: 10px;
    font-weight: 700;
    justify-content: space-between;
    letter-spacing: 0.1em;
    padding: 0 8px 7px;
    text-transform: uppercase;
}

.text-icon-btn {
    color: var(--muted);
    font-size: 18px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-item {
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--ink-soft);
    cursor: pointer;
    font-size: 14px;
    overflow: hidden;
    padding: 9px 10px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    transition: background 150ms ease, color 150ms ease;
}

.history-item:hover,
.history-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
}

.sidebar-footer {
    margin-top: auto;
}

.usage-card {
    background: var(--line-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 13px;
    padding: 12px;
}

.usage-card-top {
    justify-content: space-between;
}

.usage-card .eyebrow {
    color: var(--muted);
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.usage-card strong {
    display: block;
    font-size: 13px;
}

.usage-percent {
    color: var(--ink-soft);
    font-size: 13px;
}

.progress-track {
    background: var(--line);
    border-radius: 99px;
    height: 4px;
    margin: 10px 0 8px;
    overflow: hidden;
}

.progress-track span {
    background: var(--ink);
    display: block;
    height: 100%;
    transition: width 300ms ease;
    width: 35%;
}

.upgrade-link {
    background: none;
    border: 0;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    padding: 0;
}

.profile-row {
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    gap: 9px;
    padding: 8px;
    text-align: left;
    width: 100%;
}

.profile-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

.avatar {
    align-items: center;
    background: #c8d5bf;
    border-radius: 50%;
    display: flex;
    font-size: 10px;
    font-weight: 700;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.profile-row strong,
.profile-row small {
    display: block;
}

.profile-row strong {
    font-size: 11px;
}

.profile-row small {
    color: var(--muted);
    font-size: 9px;
    margin-top: 1px;
}

.profile-menu {
    color: var(--muted);
    margin-left: auto;
}

.workspace {
    background:
        radial-gradient(circle at 50% 32%, rgba(37, 99, 235, 0.05) 0, rgba(21, 24, 20, 0.3) 35%, transparent 60%),
        var(--paper);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    position: relative;
}

.topbar {
    background: rgba(14, 16, 13, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line-soft);
    flex: 0 0 68px;
    justify-content: space-between;
    padding: 0 24px;
}

.model-picker {
    background: transparent;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    gap: 10px;
    padding: 6px 8px;
    text-align: left;
}

.model-picker:hover {
    background: rgba(230, 228, 219, 0.65);
}

.model-picker small,
.model-picker strong {
    display: block;
}

.model-picker small {
    color: var(--muted);
    font-size: 9px;
    margin-bottom: 1px;
}

.model-picker strong {
    font-size: 12px;
}

.model-avatar {
    align-items: center;
    background: var(--line);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: var(--ink);
    display: inline-flex;
    flex: 0 0 auto;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 800;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.model-avatar svg {
    width: 18px !important;
    height: 18px !important;
    display: block;
}

.model-avatar.auto {
    background: var(--ink);
    color: var(--acid);
}


.chevron {
    color: var(--muted);
    font-size: 15px;
}

.topbar-actions {
    align-items: center;
    display: flex;
    gap: 9px;
}

.demo-pill {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 99px;
    color: var(--ink-soft);
    display: inline-flex;
    font-size: 11px;
    gap: 6px;
    padding: 5px 10px;
}

.demo-pill span {
    background: #6ba36a;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(107, 163, 106, 0.13);
    height: 5px;
    width: 5px;
}

.ghost-btn,
.primary-btn {
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    padding: 8px 13px;
}

.ghost-btn {
    background: transparent;
    border: 1px solid var(--line);
}

.primary-btn {
    background: var(--acid);
    border: 1px solid var(--acid-deep);
    color: #ffffff;
}

.primary-btn:hover {
    background: var(--acid-deep);
}

.primary-btn.compact {
    padding: 8px 14px;
}

.chat-view {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.conversation {
    flex: 1;
    overflow-y: auto;
    padding: 44px clamp(24px, 6vw, 88px) 20px;
    scrollbar-color: #cccac2 transparent;
    scrollbar-width: thin;
}

.welcome-state {
    margin: 0 auto;
    max-width: 720px;
    padding-top: clamp(10px, 5vh, 64px);
    text-align: center;
}

.welcome-orbit {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    display: flex;
    height: 78px;
    justify-content: center;
    margin: 0 auto 24px;
    position: relative;
    width: 78px;
    animation: orbit-float 4s ease-in-out infinite;
}

.welcome-orbit::before {
    border: 1px dashed var(--line);
    border-radius: 50%;
    content: "";
    inset: 7px;
    position: absolute;
}

@keyframes orbit-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.welcome-mark {
    background: var(--ink);
    border-radius: 50%;
    height: 46px;
    position: relative;
    transform: rotate(-10deg);
    width: 46px;
    z-index: 2;
}

.welcome-mark span {
    width: 5px;
}

.welcome-mark span:nth-child(1) {
    height: 14px;
}

.welcome-mark span:nth-child(2) {
    height: 24px;
}

.welcome-mark span:nth-child(3) {
    height: 17px;
}

.orbit-dot {
    border-radius: 50%;
    height: 6px;
    position: absolute;
    width: 6px;
}

.dot-one {
    background: var(--coral);
    left: 2px;
    top: 19px;
}

.dot-two {
    background: var(--blue);
    right: 6px;
    top: 10px;
}

.dot-three {
    background: var(--gold);
    bottom: 2px;
    right: 18px;
}

.overline {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.welcome-state h1,
.page-heading h1 {
    font-family: var(--font-heading);
    font-size: clamp(34px, 4vw, 55px);
    letter-spacing: -0.055em;
    line-height: 1.08;
    margin: 10px 0 13px;
}

.welcome-state h1 em {
    color: var(--ink-soft);
    font-family: Georgia, serif;
    font-weight: 400;
}

.welcome-copy {
    color: var(--ink-soft);
    font-size: 15px;
    margin: 0 auto;
    max-width: 520px;
}

.prompt-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 36px;
    text-align: left;
}

.prompt-card {
    align-items: center;
    background: rgba(21, 24, 20, 0.55);
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    gap: 14px;
    min-height: 76px;
    padding: 12px 16px;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.prompt-card:hover {
    border-color: var(--ink-soft);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

.prompt-card strong,
.prompt-card small {
    display: block;
}

.prompt-card strong {
    font-size: 14px;
    margin-bottom: 3px;
}

.prompt-card small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.prompt-icon {
    align-items: center;
    border-radius: 10px;
    color: var(--white);
    display: flex;
    flex: 0 0 auto;
    font-family: var(--font-heading);
    font-size: 18px;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.prompt-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block;
}

.prompt-icon.coral {
    background: var(--coral);
}

.prompt-icon.blue {
    background: var(--blue);
}

.prompt-icon.gold {
    background: var(--gold);
}

.prompt-icon.green {
    background: var(--green);
}

.messages {
    margin: 0 auto;
    max-width: 760px;
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.message.user {
    justify-content: flex-end;
}

.message-bubble {
    font-size: 16px;
    line-height: 1.65;
    max-width: min(640px, 82%);
    word-break: break-word;
    overflow-wrap: break-word;
}

.message.user .message-bubble {
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 15px 15px 3px 15px;
    color: var(--ink);
    padding: 12px 18px;
}

.message.assistant .message-bubble {
    color: var(--ink);
    padding: 4px 0 0;
}

.message-meta {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: 9px;
    gap: 7px;
    margin-bottom: 7px;
}

.message-meta .model-avatar {
    border-radius: 6px;
    height: 23px;
    width: 23px;
}

.message-meta .model-avatar svg {
    width: 14px !important;
    height: 14px !important;
}


.typing-dots {
    display: inline-flex;
    gap: 4px;
    padding: 8px 0;
}

.typing-dots span {
    animation: pulse 900ms infinite alternate;
    background: #989b94;
    border-radius: 50%;
    height: 5px;
    width: 5px;
}

.typing-dots span:nth-child(2) {
    animation-delay: 180ms;
}

.typing-dots span:nth-child(3) {
    animation-delay: 360ms;
}

@keyframes pulse {
    to {
        opacity: 0.25;
        transform: translateY(-2px);
    }
}

.compare-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin: 8px 0 28px;
}

.compare-answer {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    min-width: 0;
    padding: 16px;
}

.compare-answer p {
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.6;
    margin: 12px 0 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.compare-answer .message-meta {
    margin: 0;
}

.compare-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--acid);
    color: #ffffff;
    font-size: 9px;
    font-weight: bold;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    z-index: 2;
}

.composer-wrap {
    background: linear-gradient(to top, var(--paper) 70%, rgba(247, 245, 239, 0));
    padding: 12px clamp(24px, 6vw, 88px) 14px;
}

.composer {
    background: var(--white);
    border: 1px solid #d5d3ca;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(46, 48, 42, 0.08);
    margin: 0 auto;
    max-width: 760px;
    padding: 9px 10px 8px 13px;
}

.composer:focus-within {
    border-color: var(--ink-soft);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.35);
}

.composer textarea {
    background: transparent;
    border: 0;
    color: var(--ink);
    display: block;
    font-size: 16px;
    line-height: 1.45;
    max-height: 140px;
    min-height: 25px;
    outline: 0;
    padding: 3px 0 7px;
    resize: none;
    width: 100%;
}

.composer textarea::placeholder {
    color: #a5a79f;
}

.composer-toolbar {
    justify-content: space-between;
}

.composer-tools {
    align-items: center;
    display: flex;
    gap: 5px;
}

.tool-btn,
.mode-toggle {
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: var(--muted);
    cursor: pointer;
}

.tool-btn {
    font-size: 19px;
    height: 28px;
    width: 28px;
}

.mode-toggle {
    align-items: center;
    display: flex;
    font-size: 11px;
    gap: 4px;
    padding: 6px 8px;
}

.mode-toggle:hover,
.mode-toggle.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
}

.mode-toggle.active {
    box-shadow: inset 0 0 0 1px var(--line);
}

.toggle-icon {
    align-items: center;
    display: inline-flex;
    justify-content: center;
}

.toggle-icon svg {
    width: 14px !important;
    height: 14px !important;
    display: block;
}

.send-btn {
    background: var(--acid);
    border: none;
    border-radius: 9px;
    color: #ffffff;
    cursor: pointer;
    font-size: 17px;
    height: 32px;
    transition: transform 150ms ease, background 150ms ease;
    width: 32px;
}

.send-btn:hover {
    transform: translateY(-1px);
}

.send-btn:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.composer-note {
    color: var(--muted);
    font-size: 11px;
    margin: 7px auto 0;
    max-width: 760px;
    text-align: center;
}

.model-dock {
    background: var(--sidebar);
    border-left: 1px solid var(--line);
    padding: 24px 16px 16px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.dock-heading {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    justify-content: space-between;
    letter-spacing: 0.12em;
    margin-bottom: 16px;
    padding: 0 5px;
    text-transform: uppercase;
}

.live-indicator {
    align-items: center;
    display: flex;
    font-size: 8px;
    gap: 5px;
    letter-spacing: 0;
    text-transform: none;
}

.live-indicator i {
    background: #65a36a;
    border-radius: 50%;
    height: 5px;
    width: 5px;
}

.model-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.model-row {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    gap: 9px;
    padding: 8px;
    text-align: left;
    width: 100%;
}

.model-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.model-row.active {
    background: var(--white);
    border-color: var(--line);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.25);
}

.model-copy {
    min-width: 0;
}

.model-copy strong,
.model-copy small {
    display: block;
}

.model-copy strong {
    font-size: 13px;
    margin-bottom: 2px;
}

.model-copy small {
    color: var(--muted);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.model-status {
    background: #6da970;
    border: 2px solid var(--paper);
    border-radius: 50%;
    height: 8px;
    margin-left: auto;
    width: 8px;
}

.model-row.active .model-status {
    border-color: var(--white);
}

.manage-models {
    background: transparent;
    border: 0;
    border-top: 1px solid var(--line);
    cursor: pointer;
    display: flex;
    font-size: 12px;
    font-weight: 700;
    justify-content: space-between;
    margin-top: 12px;
    padding: 13px 5px;
    width: 100%;
}

.dock-insight {
    align-items: flex-start;
    background: var(--line-soft);
    border: 1px solid var(--line);
    border-radius: 11px;
    display: flex;
    gap: 9px;
    padding: 11px;
    margin-top: auto;
    width: 100%;
}

.insight-mark {
    align-items: center;
    background: var(--ink);
    border-radius: 7px;
    color: var(--acid);
    display: flex;
    flex: 0 0 auto;
    font-family: var(--font-heading);
    font-size: 9px;
    font-weight: 800;
    height: 25px;
    justify-content: center;
    width: 25px;
}

.insight-mark svg {
    width: 14px !important;
    height: 14px !important;
    display: block;
}

.dock-insight p {
    color: var(--ink-soft);
    font-size: 11px;
    line-height: 1.5;
    margin: 0;
}

.dock-insight strong {
    color: var(--ink);
}

.library-view {
    flex: 1;
    overflow: auto;
    padding: 64px clamp(26px, 7vw, 100px);
}

.page-heading {
    max-width: 600px;
}

.page-heading p {
    color: var(--ink-soft);
    font-size: 14px;
}

.library-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 48px;
}

.library-card {
    background: rgba(21, 24, 20, 0.55);
    border: 1px solid var(--line);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    min-height: 190px;
    padding: 18px;
}

.library-card > span {
    color: var(--muted);
    font-family: var(--font-heading);
    font-size: 11px;
}

.library-card strong {
    font-family: var(--font-heading);
    font-size: 16px;
    margin: auto 0 8px;
}

.library-card small {
    color: var(--muted);
    font-size: 10px;
}

.scrim {
    background: rgba(28, 30, 26, 0.42);
    inset: 0;
    position: fixed;
    z-index: 60;
}

.modal-shell {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 24px;
    position: fixed;
    z-index: 70;
}

.modal {
    background: rgba(21, 24, 20, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 26px;
    width: min(760px, 100%);
}

.modal-header {
    align-items: flex-start;
    justify-content: space-between;
    position: sticky;
    top: -26px;
    background: transparent;
    z-index: 10;
    padding-top: 26px;
    padding-bottom: 12px;
    margin-top: -26px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line-soft);
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    letter-spacing: -0.04em;
    margin: 5px 0 0;
}

.modal-close {
    color: var(--muted);
    font-size: 25px;
    line-height: 1;
}

.modal-lead {
    color: var(--ink-soft);
    font-size: 12px;
    margin: 12px 0 22px;
}

.modal-model-grid {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(2, 1fr);
}

.modal-model-option {
    align-items: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    gap: 11px;
    padding: 12px;
    text-align: left;
}

.modal-model-option:hover,
.modal-model-option.active {
    border-color: var(--ink-soft);
}

.modal-model-option.active {
    border-color: var(--acid);
    box-shadow: inset 0 0 0 1px var(--acid);
}

.modal-model-option strong,
.modal-model-option small {
    display: block;
}

.modal-model-option strong {
    font-size: 13px;
    margin-bottom: 3px;
}

.modal-model-option small {
    color: var(--muted);
    font-size: 11px;
}

.pricing-modal-card {
    width: min(960px, 100%);
}

.billing-toggle {
    background: var(--line-soft);
    border: 1px solid var(--line);
    border-radius: 9px;
    display: flex;
    margin: 24px auto;
    padding: 3px;
    width: max-content;
}

.billing-toggle button {
    background: transparent;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font-size: 10px;
    padding: 7px 12px;
}

.billing-toggle button.active {
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    font-weight: 700;
}

.billing-toggle span {
    color: var(--acid-deep);
    font-size: 8px;
    font-weight: 700;
}

.pricing-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, 1fr);
}

.price-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    min-height: 440px;
    padding: 28px 24px;
    position: relative;
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.price-card:hover {
    border-color: var(--ink-soft);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.price-card.featured {
    border: 2px solid var(--acid);
    box-shadow: 0 15px 40px rgba(217, 255, 67, 0.12);
    transform: translateY(-8px);
}

.price-card.featured:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 46px rgba(217, 255, 67, 0.16);
}

.popular-tag {
    background: var(--acid);
    border-radius: 99px;
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 4px 10px;
    position: absolute;
    right: 18px;
    top: 18px;
}

.plan-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.price {
    align-items: baseline;
    display: flex;
    gap: 6px;
    margin: 20px 0 12px;
}

.price strong {
    font-family: var(--font-heading);
    font-size: 42px;
    letter-spacing: -0.05em;
    color: var(--ink);
}

.price span {
    color: var(--muted);
    font-size: 13px;
}

.price-card p {
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.5;
    margin: 0 0 20px;
}

.price-card ul {
    color: var(--ink-soft);
    display: flex;
    flex-direction: column;
    font-size: 13px;
    gap: 12px;
    line-height: 1.5;
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.price-card li::before {
    color: var(--acid);
    content: "✓";
    font-weight: 800;
    margin-right: 10px;
}

.plan-btn {
    border-radius: 8px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
    margin-top: auto;
    padding: 10px;
}

.plan-btn.secondary {
    background: transparent;
    border: 1px solid var(--line);
}

.plan-btn.primary {
    background: var(--acid);
    border: 1px solid var(--acid-deep);
    color: #ffffff;
}

.plan-btn.primary:hover {
    background: var(--acid-deep);
}

.plan-btn.dark {
    background: var(--ink);
    border: 1px solid var(--ink);
    color: var(--white);
}

.pricing-footnote {
    color: var(--muted);
    font-size: 8px;
    margin: 17px 0 0;
    text-align: center;
}

.toast {
    background: var(--ink);
    border-radius: 9px;
    bottom: 22px;
    color: var(--white);
    font-size: 10px;
    left: 50%;
    opacity: 0;
    padding: 10px 14px;
    pointer-events: none;
    position: fixed;
    transform: translate(-50%, 12px);
    transition: opacity 180ms ease, transform 180ms ease;
    z-index: 100;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 1050px) {
    .app-shell {
        grid-template-columns: 230px minmax(0, 1fr);
    }

    .model-dock {
        display: none;
    }

    .dock-insight {
        display: none;
    }
}

@media (max-width: 760px) {
    body {
        overflow: hidden;
        height: 100dvh;
    }

    .app-shell {
        display: block;
        height: 100dvh;
        overflow: hidden;
    }

    .sidebar {
        bottom: 0;
        box-shadow: 18px 0 50px rgba(34, 36, 31, 0.18);
        left: 0;
        max-width: 290px;
        position: fixed;
        top: 0;
        transform: translateX(-105%);
        transition: transform 220ms ease;
        width: 86vw;
        z-index: 65; /* higher than .scrim (60) to prevent blocked clicks */
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close,
    .menu-btn {
        display: block;
    }

    .workspace {
        height: 100dvh;
    }

    .topbar {
        padding: 0 13px;
    }

    .menu-btn {
        font-size: 17px;
    }

    .desktop-only,
    .demo-pill {
        display: none;
    }

    .model-picker {
        margin-right: auto;
    }

    .conversation {
        padding: 30px 16px 16px;
    }

    .welcome-state {
        padding-top: 18px;
    }

    .welcome-state h1 {
        font-size: 36px;
    }

    .prompt-grid {
        grid-template-columns: 1fr;
        margin-top: 26px;
    }

    .prompt-card {
        min-height: 60px;
    }

    .composer-wrap {
        padding: 10px 12px 10px;
    }

    .compare-grid {
        grid-template-columns: 1fr;
    }

    .message-bubble {
        max-width: 90%;
    }

    .library-view {
        padding: 42px 20px;
    }

    .library-grid,
    .pricing-grid,
    .modal-model-grid {
        grid-template-columns: 1fr;
    }

    .price-card.featured {
        transform: none;
    }

    .modal-shell {
        align-items: flex-end;
        padding: 0;
    }

    .modal {
        border-radius: 18px 18px 0 0;
        max-height: 90dvh;
        padding: 22px 18px;
    }

    .modal-header {
        top: -22px;
        padding-top: 22px;
        margin-top: -22px;
    }
}

/* Secure Checkout Styling */
.checkout-modal-card {
    max-width: 480px;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.checkout-summary {
    align-items: center;
    background: var(--paper-deep);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    padding: 12px;
}

.summary-label {
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 600;
}

.summary-value {
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.form-group input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    font-size: 14px;
    padding: 12px 14px;
    width: 100%;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-group input:focus {
    border-color: var(--acid);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
    outline: none;
}

.form-group input::placeholder {
    color: var(--muted);
    opacity: 0.6;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

.card-input-wrap {
    position: relative;
}

.card-brand-icon {
    font-size: 18px;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.checkout-security-note {
    color: var(--muted);
    font-size: 10px;
    margin-top: 5px;
    text-align: center;
}

.checkout-submit-btn {
    background: var(--acid);
    border: 0;
    border-radius: 10px;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    margin-top: 10px;
    padding: 12px;
    transition: background 180ms ease, transform 180ms ease;
    width: 100%;
}

.checkout-submit-btn:hover {
    background: var(--acid-deep);
    transform: translateY(-1px);
}

.checkout-submit-btn:disabled {
    background: var(--muted);
    cursor: not-allowed;
    transform: none;
}

/* Success State */
.checkout-success-state {
    align-items: center;
    display: flex;
    flex-direction: column;
    padding: 20px 10px;
    text-align: center;
}

.success-icon {
    align-items: center;
    background: rgba(107, 163, 106, 0.13);
    border-radius: 50%;
    color: #65a36a;
    display: flex;
    font-size: 32px;
    font-weight: bold;
    height: 64px;
    justify-content: center;
    margin-bottom: 20px;
    width: 64px;
}

.checkout-success-state h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    margin: 0 0 10px;
}

.checkout-success-state p {
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.6;
    margin: 0 0 24px;
    max-width: 320px;
}

.checkout-success-close-btn {
    background: var(--acid);
    border: 1px solid #c4e735;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    padding: 10px 24px;
}

.checkout-success-close-btn:hover {
    background: #e4ff75;
}


/* File Preview & Attachments Styling */
.file-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line-soft);
}

.file-preview-token {
    align-items: center;
    background: var(--paper-deep);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    position: relative;
    max-width: 240px;
}

.file-preview-icon {
    font-size: 16px;
}

.file-preview-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.file-preview-name {
    color: var(--ink);
    font-size: 11px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-preview-size {
    color: var(--muted);
    font-size: 9px;
}

.file-preview-remove {
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    font-size: 14px;
    margin-left: 4px;
    padding: 0 2px;
}

.file-preview-remove:hover {
    color: var(--ink);
}

/* Document Attachment in Chat Bubble */
.chat-attachment-card {
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    gap: 10px;
    margin-top: 8px;
    padding: 8px 12px;
    max-width: 280px;
}

.message.user .chat-attachment-card {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.message.assistant .chat-attachment-card {
    background: var(--paper-deep);
    border-color: var(--line);
    color: var(--ink);
}

.chat-attachment-icon {
    font-size: 20px;
}

.chat-attachment-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-attachment-name {
    font-size: 11px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-attachment-size {
    font-size: 9px;
    opacity: 0.8;
}

.chat-attachment-image {
    border-radius: 8px;
    display: block;
    margin-top: 8px;
    max-height: 200px;
    max-width: 100%;
    object-fit: cover;
}

/* Web Search Citations & Animation Styling */
.search-animation-step {
    color: var(--muted);
    font-size: 10px;
    font-style: italic;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-citations-header {
    border-top: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    margin: 16px 0 8px;
    padding-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-citations-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.citation-card {
    align-items: center;
    background: var(--paper-deep);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    color: var(--ink);
    display: inline-flex;
    font-size: 10px;
    gap: 6px;
    padding: 6px 10px;
    text-decoration: none;
    transition: background 150ms ease, border-color 150ms ease;
}

.citation-card:hover {
    background: var(--white);
    border-color: var(--ink-soft);
}

.citation-number {
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--ink-soft);
    display: inline-flex;
    font-size: 8px;
    font-weight: 700;
    height: 14px;
    justify-content: center;
    width: 14px;
}

.citation-domain {
    color: var(--muted);
    font-size: 9px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
/* Runtime and provider status */
.demo-pill.demo span {
    background: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 154, 42, 0.16);
}

.demo-pill.live span {
    background: #6ba36a;
    box-shadow: 0 0 0 3px rgba(107, 163, 106, 0.13);
}

.live-indicator.demo i,
.model-status.demo {
    background: var(--gold);
}

.live-indicator.live i,
.model-status.live {
    background: #6da970;
}

.response-status {
    border-radius: 99px;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 6px;
}

.response-status.demo {
    background: rgba(212, 154, 42, 0.18);
    color: var(--gold);
}

.response-status.live {
    background: rgba(107, 163, 106, 0.18);
    color: #6ba36a;
}

/* MCP Connections and Modal styling */
.manage-mcp {
    background: transparent;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--ink-soft);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
    padding: 8px 10px;
    text-align: left;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.settings-modal-card {
    width: min(840px, 100%);
}

.settings-layout {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 25px;
    margin-top: 15px;
    min-height: 420px;
}

.settings-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-right: 1px solid var(--line-soft);
    padding-right: 18px;
}

.settings-tab-btn {
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--ink-soft);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 14px;
    text-align: left;
    transition: background 150ms ease, color 150ms ease;
    width: 100%;
}

.settings-tab-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
}

.settings-tab-btn.active {
    background: rgba(37, 99, 235, 0.15);
    color: var(--acid);
    font-weight: 700;
}

.settings-tab-btn .tab-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2px;
}

.settings-content {
    display: flex;
    flex-direction: column;
    min-height: 420px;
    overflow-y: auto;
    padding-right: 5px;
}

.settings-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-subtitle {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panel-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: var(--ink);
}

.panel-lead {
    color: var(--ink-soft);
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .settings-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        min-height: auto;
    }
    
    .settings-tabs {
        flex-direction: row;
        border-right: 0;
        border-bottom: 1px solid var(--line-soft);
        padding-right: 0;
        padding-bottom: 12px;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .settings-tab-btn {
        width: auto;
        padding: 8px 12px;
    }
    
    .settings-content {
        min-height: auto;
    }
}

.mcp-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}

.mcp-tab-btn {
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--ink-soft);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    transition: background 150ms, color 150ms;
}

.mcp-tab-btn:hover {
    color: var(--ink);
}

.mcp-tab-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
}

.mcp-servers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 380px;
    overflow-y: auto;
}

.mcp-server-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
}

.mcp-server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.mcp-server-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mcp-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.mcp-status-dot.connected {
    background: #6da970;
    box-shadow: 0 0 8px #6da970;
}

.mcp-status-dot.connecting {
    background: var(--gold);
    box-shadow: 0 0 8px var(--gold);
}

.mcp-status-dot.disconnected {
    background: var(--muted);
}

.mcp-status-dot.error {
    background: #d04848;
    box-shadow: 0 0 8px #d04848;
}

.mcp-server-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mcp-server-type {
    font-size: 10px;
    color: var(--ink-soft);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

.mcp-delete-btn {
    background: transparent;
    border: none;
    color: #ea5455;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.mcp-delete-btn:hover {
    background: rgba(234, 84, 85, 0.1);
}

.mcp-server-info {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
    word-break: break-all;
}

.mcp-server-tools {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 8px;
}

.mcp-server-tools-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-soft);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.mcp-tool-pill {
    display: inline-block;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line-soft);
    border-radius: 4px;
    font-size: 11px;
    padding: 2px 6px;
    margin-right: 4px;
    margin-bottom: 4px;
    color: var(--ink);
}

.mcp-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-soft);
}

.form-row input,
.form-row select,
.form-row textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    padding: 8px 12px;
    outline: none;
    transition: border-color 150ms;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    border-color: var(--ink-soft);
}

.mcp-tester {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tester-output-container {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tester-output {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--acid);
    font-family: monospace;
    font-size: 12px;
    max-height: 180px;
    overflow-y: auto;
    padding: 12px;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Premium User Profile styles */
.profile-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line-soft);
}

.profile-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--acid), var(--blue));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.profile-meta-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-meta-name {
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
}

.profile-meta-email {
    color: var(--muted);
    font-size: 13px;
}

.profile-badge {
    align-self: flex-start;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.profile-badge.pro {
    background: rgba(37, 99, 235, 0.15);
    color: #5b8dfa;
    border: 1px solid rgba(37, 99, 235, 0.3);
}

.profile-badge.free {
    background: rgba(255, 255, 255, 0.05);
    color: var(--ink-soft);
    border: 1px solid var(--line);
}

.profile-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #65a36a;
    box-shadow: 0 0 8px #65a36a;
}

.profile-detail-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.profile-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.profile-detail-label {
    color: var(--ink-soft);
    font-weight: 500;
}

.profile-detail-value {
    color: var(--ink);
    font-weight: 700;
}

.profile-progress-container {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-progress-bar {
    height: 6px;
    background: var(--line-soft);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.profile-progress-fill {
    height: 100%;
    background: var(--acid);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Custom Toggle Switch */
.switch-toggle input:checked + .slider-toggle {
    background-color: var(--acid);
    border-color: var(--acid);
}

.switch-toggle .slider-toggle:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--ink);
    transition: .3s;
    border-radius: 50%;
}

.switch-toggle input:checked + .slider-toggle:before {
    transform: translateX(20px);
}

/* Checkout Form Inputs / Textareas Premium Styles & Placeholders */
.checkout-form input,
.checkout-form select,
.checkout-form textarea {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    padding: 12px;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
    width: 100%;
}

.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus {
    border-color: var(--acid);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.checkout-form input::placeholder,
.checkout-form textarea::placeholder {
    color: var(--muted);
    opacity: 0.65;
}

/* Light Theme variables overrides */
body.light-theme {
    --ink: #111827;
    --ink-soft: #374151;
    --muted: #6b7280;
    --line: #e5e7eb;
    --line-soft: #f3f4f6;
    --paper: #f9fafb;
    --paper-deep: #ffffff;
    --white: #ffffff;
    --sidebar: #f3f4f6;
}

/* Light Theme tweaks to ensure inputs look good */
body.light-theme .checkout-form input,
body.light-theme .checkout-form select,
body.light-theme .checkout-form textarea {
    background: #ffffff;
    border-color: #d1d5db;
}

body.light-theme .settings-panel {
    background: #ffffff;
}

body.light-theme .settings-tabs {
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
}

body.light-theme .settings-tab-btn {
    color: #4b5563;
}

body.light-theme .settings-tab-btn.active {
    background: #f3f4f6;
    color: var(--acid);
}

body.light-theme .settings-tab-btn:hover {
    background: #f3f4f6;
}

body.light-theme .overline {
    color: #6b7280;
}

body.light-theme .modal-header h2 {
    color: #111827;
}

body.light-theme .modal {
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

body.light-theme .profile-detail-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

/* Accent colors selection elements */
.accent-picker {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.accent-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    transition: transform 150ms ease, border-color 150ms ease;
    padding: 0;
}

.accent-btn:hover {
    transform: scale(1.1);
}

.accent-btn.active {
    border-color: var(--ink);
    box-shadow: 0 0 0 2px var(--acid);
}

.accent-blue { background-color: #2563eb; }
.accent-coral { background-color: #f26b4a; }
.accent-green { background-color: #4f8f75; }
.accent-gold { background-color: #d49a2a; }

/* Theme switcher styling */
.theme-picker {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.theme-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--ink-soft);
    cursor: pointer;
    transition: all 150ms ease;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--ink-soft);
}

.theme-btn.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--acid);
    color: var(--ink);
    box-shadow: 0 0 0 1px var(--acid);
}

.theme-btn svg {
    width: 20px;
    height: 20px;
}

/* Danger zone elements */
.danger-section {
    border: 1px solid rgba(234, 84, 85, 0.2);
    border-radius: 12px;
    padding: 16px;
    background: rgba(234, 84, 85, 0.02);
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.danger-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.danger-action-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.danger-action-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.danger-action-desc {
    font-size: 12px;
    color: var(--muted);
}

.danger-btn-outline {
    background: transparent;
    border: 1px solid rgba(234, 84, 85, 0.4);
    color: #ea5455;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 150ms ease;
}

.danger-btn-outline:hover {
    background: rgba(234, 84, 85, 0.1);
    border-color: #ea5455;
}

/* App Loading Screen */
.app-loading-screen {
    align-items: center;
    background: #121311;
    display: flex;
    height: 100vh;
    justify-content: center;
    left: 0;
    position: fixed;
    top: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    width: 100vw;
    z-index: 9999;
}

.app-loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 24px;
    justify-content: center;
}

.loading-mark {
    align-items: center;
    background: #1f211d;
    border-radius: 50%;
    display: flex;
    gap: 4px;
    height: 64px;
    justify-content: center;
    transform: rotate(-10deg);
    width: 64px;
    animation: loading-pulse 2s infinite ease-in-out;
}

.loading-mark span {
    background: #d9ff43;
    border-radius: 10px;
    display: block;
    transform: rotate(12deg);
    width: 8px;
}

.loading-mark span:nth-child(1) {
    height: 20px;
}

.loading-mark span:nth-child(2) {
    height: 36px;
}

.loading-mark span:nth-child(3) {
    height: 26px;
}

@keyframes loading-pulse {
    0%, 100% {
        transform: rotate(-10deg) scale(0.95);
        opacity: 0.8;
    }
    50% {
        transform: rotate(-10deg) scale(1.05);
        opacity: 1;
    }
}

/* App Store Categories & Pills */
.category-pill {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-pill:hover {
    color: var(--ink);
    border-color: var(--ink-soft);
    background: rgba(255,255,255,0.02);
}

.category-pill.active {
    background: rgba(255,255,255,0.08);
    color: var(--ink);
    border-color: var(--ink-soft);
}

.connector-card.hidden {
    display: none !important;
}
