:root {
    color-scheme: dark;
    --portal-bg: #0a0b0d;
    --portal-panel: #101216;
    --portal-raised: #171a1f;
    --portal-line: #ffffff14;
    --portal-text: #f4f6f5;
    --portal-muted: #9ba19f;
    --portal-green: #00e676;
    --portal-green-dim: #00e67620;
    --portal-display: "Space Grotesk", sans-serif;
    --portal-body: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; }
body { overflow: hidden; background: var(--portal-bg); color: var(--portal-text); font: 13px var(--portal-body); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a { color: inherit; }
button { cursor: pointer; }
a { text-decoration: none; }
button:focus-visible, a:focus-visible, select:focus-visible, textarea:focus-visible, input:focus-visible { outline: 2px solid var(--portal-green); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.portal-shell { display: grid; grid-template-columns: 254px minmax(0, 1fr); height: 100dvh; min-height: 540px; }
.portal-sidebar { z-index: 5; display: flex; flex-direction: column; min-width: 0; padding: 15px 10px 12px; border-right: 1px solid #ffffff0e; background: #101114; }
.sidebar-top { display: flex; align-items: center; gap: 13px; padding: 0 5px 17px; }
.language-picker { position: relative; display: flex; flex: 0 0 37px; align-items: center; justify-content: center; width: 37px; height: 36px; border: 1px solid var(--portal-line); border-radius: 7px; background: #191b20; font-size: 18px; }
.language-picker select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
#language-flag svg { display: block; width: 22px; height: 16px; border-radius: 2px; box-shadow: 0 0 0 1px #ffffff26; }
.portal-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.portal-brand-mark { color: var(--portal-green); font: 700 21px/1 var(--portal-display); letter-spacing: -3px; white-space: nowrap; }
.portal-brand-mark i { color: #e8f0eb; font-style: normal; }
.portal-brand-copy { display: grid; font: 600 16px/1 var(--portal-display); letter-spacing: -.6px; }
.portal-brand-copy strong { color: var(--portal-green); }
.portal-brand-copy small { margin-top: 4px; color: #838a86; font: 700 7px/1 var(--portal-body); letter-spacing: 1.7px; }
.sidebar-collapse { width: 29px; height: 29px; margin-left: auto; border: 0; border-radius: 5px; background: transparent; color: #8d9390; font-size: 17px; }
.sidebar-collapse:hover, .sidebar-action:hover, .sidebar-search:hover { background: #ffffff0a; color: #fff; }
.account-switcher { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 45px; padding: 6px 8px; border: 1px solid var(--portal-line); border-radius: 7px; background: #191b20; text-align: left; }
.account-avatar { display: grid; flex: 0 0 27px; place-items: center; width: 27px; height: 27px; border: 1px solid #00e67642; border-radius: 7px; color: var(--portal-green); font: 700 10px var(--portal-display); }
.account-copy { display: grid; flex: 1; min-width: 0; gap: 3px; }
.account-copy strong { overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small { color: #929895; font-size: 9px; }
.account-chevron { color: #8f9692; }
.sidebar-search, .sidebar-action { display: flex; align-items: center; gap: 12px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: #bcc1bf; text-align: left; font-size: 11px; }
.sidebar-search { height: 42px; margin: 9px 0 3px; color: #aeb4b1; }
.sidebar-search > span:first-child, .sidebar-action > span:first-child { width: 17px; color: #9ba29e; text-align: center; font-size: 16px; }
.sidebar-search kbd { margin-left: auto; color: #737a76; font: 9px var(--portal-body); }
.sidebar-action.is-current { background: #ffffff0d; color: #fff; }
.sidebar-action.is-current > span:first-child { color: var(--portal-green); }
.sidebar-divider { height: 1px; margin: 10px 0; background: var(--portal-line); }
.sidebar-spacer { flex: 1; min-height: 14px; }
.credits-card { padding: 13px 12px 11px; border: 1px solid #ffffff12; border-radius: 9px; background: linear-gradient(145deg, #181b20, #111317); }
.credits-card-heading { display: flex; align-items: center; gap: 7px; }
.credits-card-heading strong { font-size: 11px; font-weight: 600; }
.credits-spark { color: var(--portal-green); }
.credits-card-heading #quota-plan-badge { margin-left: auto; padding: 3px 5px; border-radius: 4px; background: #ffffff0d; color: #bdc3c0; font-size: 8px; font-weight: 700; }
.usage-details-button { display: grid; flex: 0 0 23px; place-items: center; width: 23px; height: 23px; padding: 0; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #8d9891; font-size: 15px; }
.usage-details-button:hover { border-color: #ffffff1b; background: #ffffff0a; color: var(--portal-green); }
.credits-card p { min-height: 29px; margin: 10px 0 8px; color: #9ea5a1; font-size: 10px; line-height: 1.5; }
.quota-track { height: 4px; overflow: hidden; border-radius: 5px; background: #ffffff16; }
.quota-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--portal-green); transition: width .25s ease; }
.credits-button { width: 100%; min-height: 31px; margin-top: 10px; border: 1px solid #ffffff1c; border-radius: 5px; background: #ffffff0b; color: #e3e8e5; font-size: 10px; font-weight: 600; }
.credits-button:hover { border-color: #00e67670; }
.sidebar-footer-brand { display: flex; justify-content: space-between; padding: 12px 5px 0; color: #737a76; font-size: 9px; }
.sidebar-footer-brand span { color: var(--portal-green); }

.portal-main { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: auto; }
.portal-topbar { z-index: 4; position: sticky; top: 0; display: flex; flex: 0 0 54px; align-items: center; justify-content: center; min-height: 54px; padding: 0 25px; border-bottom: 1px solid #ffffff0b; background: #0a0b0dea; backdrop-filter: blur(14px); }
.top-navigation { display: flex; align-items: center; gap: 29px; height: 100%; }
.top-nav-item { position: relative; display: flex; align-items: center; height: 100%; }
.top-nav-trigger, .top-nav-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 2px; border: 0; background: transparent; color: #c1c7c4; font-size: 11px; }
.top-nav-trigger > span:last-child { color: #78807b; }
.top-nav-link:hover, .top-nav-trigger:hover { color: var(--portal-green); }
.top-dropdown { position: absolute; top: calc(100% - 2px); left: -20px; display: none; width: 230px; padding: 12px; border: 1px solid #ffffff16; border-radius: 8px; background: #101216; box-shadow: 0 18px 60px #000a; }
.top-nav-item.open .top-dropdown { display: grid; gap: 3px; }
.top-dropdown p { margin: 3px 7px 7px; color: #828a85; font: 700 8px var(--portal-body); letter-spacing: 1.5px; }
.top-dropdown button { min-height: 34px; padding: 0 8px; border: 0; border-radius: 4px; background: transparent; color: #d3d8d5; text-align: left; font-size: 11px; }
.top-dropdown button:hover { background: #ffffff0c; color: var(--portal-green); }
.topbar-actions { position: absolute; right: 23px; display: flex; align-items: center; gap: 12px; }
.account-email { max-width: 170px; overflow: hidden; color: #a4aba7; font-size: 10px; text-overflow: ellipsis; }
.top-sign-in { min-height: 31px; padding: 0 13px; border: 1px solid #ffffff23; border-radius: 5px; background: #ffffff08; font-size: 10px; font-weight: 600; }
.top-sign-in:hover { border-color: #00e67660; }
.mobile-menu { display: none; }

.workspace { position: relative; display: flex; flex: 1; flex-direction: column; align-items: center; min-height: 0; padding: 20px clamp(22px, 4vw, 62px) 34px; background: radial-gradient(ellipse at 49% 10%, #00e67613 0%, transparent 36%), radial-gradient(ellipse at 85% 22%, #1683ff0c 0%, transparent 28%), #0b0c0f; }
.hero-content { display: flex; width: min(100%, 870px); flex-direction: column; align-items: center; padding: clamp(10px, 4vh, 38px) 0 24px; text-align: center; }
.announcement { display: flex; align-items: center; gap: 9px; min-height: 32px; padding: 0 13px; border: 1px solid #ffffff17; border-radius: 30px; background: #0e1513; color: #c7ceca; font-size: 10px; }
.announcement > span:last-child { color: var(--portal-green); }
.announcement-mark { color: var(--portal-green); font: 700 12px var(--portal-display); }
.workspace-eyebrow { margin: 25px 0 10px; color: #8c9690; font: 700 9px var(--portal-body); letter-spacing: 2px; }
.live-dot { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--portal-green); box-shadow: 0 0 12px #00e676b0; vertical-align: 1px; }
.hero-content h1, .conversation-heading h1, .pricing-view > h1 { margin: 0; font: 600 clamp(30px, 4.2vw, 49px)/1.14 var(--portal-display); letter-spacing: -2.4px; }
.hero-subtitle { margin: 12px 0 27px; color: #b1b9b4; font-size: 14px; }
.composer { width: min(100%, 570px); padding: 14px 16px 11px; border: 1px solid #ffffff1b; border-radius: 15px; background: #17191d; box-shadow: 0 16px 55px #0005; text-align: left; transition: border-color .2s ease, box-shadow .2s ease; }
.composer:focus-within { border-color: #00e6766b; box-shadow: 0 16px 55px #0005, 0 0 28px #00e6760c; }
.composer textarea { display: block; width: 100%; min-height: 66px; max-height: 220px; resize: vertical; border: 0; outline: 0; background: transparent; color: #edf1ee; font-size: 13px; line-height: 1.6; }
.composer textarea::placeholder { color: #858d89; }
.composer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 7px; }
.composer-tools { display: flex; align-items: center; gap: 9px; }
.icon-button { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #ffffff20; border-radius: 50%; background: transparent; color: #c8cecb; font-size: 21px; line-height: 1; }
.icon-button:hover { border-color: #00e6768c; color: var(--portal-green); }
.attach-button { font-size: 21px; }
.model-button, .context-button { display: flex; align-items: center; gap: 7px; padding: 6px 4px; border: 0; background: transparent; color: #b6bcb9; font-size: 9px; }
.model-button > span:last-child { color: #7d8580; }
.model-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--portal-green); }
.context-button { color: #858e89; }
.voice-button { border: 0; font-size: 15px; }
.send-button { display: grid; place-items: center; width: 31px; height: 31px; border: 0; border-radius: 50%; background: linear-gradient(135deg, #00e676, #13bf91); color: #07120c; font-size: 19px; font-weight: 700; }
.send-button:hover { filter: brightness(1.13); }
.send-button:disabled { cursor: wait; opacity: .55; }
.composer-submit-actions { display: flex; align-items: center; gap: 7px; }
.cancel-button { display: grid; place-items: center; width: 31px; height: 31px; padding: 0; border: 0; border-radius: 6px; background: linear-gradient(135deg, #ff5555, #d92638); color: #fff; font-size: 11px; line-height: 1; box-shadow: 0 3px 12px #ff304522; }
.cancel-button:hover { filter: brightness(1.15); }
.cancel-button:active { transform: scale(.94); }
.composer-note { width: min(100%, 570px); min-height: 22px; margin: 9px 0 20px; color: #858d89; text-align: center; font-size: 9px; line-height: 1.6; }
.mode-grid { display: flex; align-items: center; justify-content: center; gap: 13px; }
.mode-card { display: grid; min-width: 69px; justify-items: center; gap: 7px; padding: 0; border: 0; background: transparent; color: #aeb6b1; font-size: 9px; }
.mode-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #ffffff12; border-radius: 9px; background: #171b1b; color: #d2d9d4; font-size: 20px; transition: .2s ease; }
.mode-card:hover .mode-icon, .mode-card.selected .mode-icon { border-color: #00e67663; background: #102019; color: var(--portal-green); box-shadow: 0 0 20px #00e67610; }
.mode-card.selected strong { color: #edf1ee; }
.mode-card strong { font-weight: 500; }
.start-from { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 27px; color: #9aa29d; font-size: 9px; }
.start-from button { min-height: 24px; padding: 0 9px; border: 1px solid #ffffff19; border-radius: 20px; background: #15181b; color: #d0d5d2; font-size: 9px; }
.start-from button:hover { border-color: #00e6765c; }
.recent-section { width: min(100%, 1000px); margin-top: auto; padding: 21px 22px 20px; border: 1px solid #ffffff12; border-radius: 17px; background: #101216d9; }
.recent-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
.recent-heading h2 { margin: 0; font: 600 16px var(--portal-display); letter-spacing: -.5px; }
.recent-heading button { padding: 3px 0; border: 0; background: transparent; color: #69c998; font-size: 9px; }
.recent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.recent-card { position: relative; min-height: 79px; padding: 0; border: 1px solid #ffffff12; border-radius: 9px; background: #15181d; color: #dce1de; transition: border-color .18s ease, transform .18s ease; }
.recent-card:hover { transform: translateY(-2px); border-color: #00e6764e; }
.recent-open { display: block; width: 100%; min-height: 79px; padding: 12px 38px 12px 12px; border: 0; border-radius: inherit; background: transparent; color: inherit; text-align: left; }
.recent-card strong { display: block; overflow: hidden; margin: 9px 0 5px; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.recent-card small { color: #8d9690; font-size: 8px; }
.recent-card .recent-icon { color: var(--portal-green); font-size: 13px; }
.recent-empty { grid-column: 1/-1; padding: 12px 0; color: #8c9490; font-size: 10px; }
.conversation-actions { display: flex; align-items: center; gap: 9px; }
.conversation-star-button, .favorite-toggle { display: grid; flex: 0 0 30px; place-items: center; width: 30px; height: 30px; border: 1px solid #ffffff1c; border-radius: 6px; background: #171a1e; color: #9da69f; font-size: 16px; }
.conversation-star-button.is-starred, .favorite-toggle.is-starred { color: #00e676; }
.favorite-toggle { position: absolute; top: 9px; right: 8px; }
.resource-view { width: min(100%, 960px); margin: 0 auto; padding: clamp(18px, 4vw, 42px) 0 35px; }
.resource-heading { width: min(100%, 800px); margin: 0 auto 26px; }
.resource-heading .workspace-eyebrow { margin: 0 0 10px; }
.resource-heading h1 { margin: 0 0 8px; font: 600 clamp(26px, 4vw, 38px)/1.15 var(--portal-display); letter-spacing: -1.1px; }
.resource-heading > p:not(.workspace-eyebrow) { max-width: 700px; margin: 0; color: #a4aca7; font-size: 12px; line-height: 1.7; }
.resource-back-button { margin-top: 16px; padding: 7px 11px; border: 1px solid #ffffff20; border-radius: 5px; background: #171a1e; color: #d5dcd7; font-size: 10px; }
.resource-content { width: min(100%, 800px); margin: 0 auto; }
.resource-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.resource-card { min-width: 0; padding: 17px; border: 1px solid #ffffff14; border-radius: 9px; background: #121519; }
.resource-card h2 { margin: 0 0 8px; font: 600 13px var(--portal-display); }
.resource-card p { margin: 0; color: #a0a8a3; font-size: 10px; line-height: 1.7; }
.resource-card-index { display: block; margin-top: 14px; color: #00e676; font: 600 10px var(--portal-display); }
.resource-card-button, .resource-open-button { min-height: 32px; margin-top: 14px; padding: 0 11px; border: 1px solid #ffffff1e; border-radius: 5px; background: #181c20; color: #dce2de; font-size: 10px; font-weight: 600; }
.resource-card-button:hover, .resource-open-button:hover { border-color: #00e6766b; }
.template-grid { grid-template-columns: 1fr; }
.template-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 14px; }
.template-card .resource-card-button { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
.resource-conversation-list { display: grid; gap: 9px; }
.resource-conversation { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 13px 50px 13px 14px; border: 1px solid #ffffff13; border-radius: 8px; background: #121519; }
.resource-conversation-details { flex: 1; min-width: 0; }
.resource-conversation-details strong { display: block; overflow: hidden; color: #e5eae7; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.resource-conversation-details p { overflow: hidden; margin: 5px 0; color: #9ca49f; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.resource-conversation-details small { color: #7d8680; font-size: 9px; }
.resource-conversation .favorite-toggle { top: 50%; transform: translateY(-50%); }
.resource-open-button { flex: 0 0 auto; margin: 0; }
.resource-empty { padding: 16px 0; color: #a0a8a3; font-size: 11px; line-height: 1.7; }
.resource-search { width: 100%; min-height: 42px; margin-bottom: 13px; padding: 0 13px; border: 1px solid #ffffff20; border-radius: 6px; background: #121519; color: var(--portal-text); }
.resource-status { display: flex; align-items: center; gap: 14px; min-height: 66px; padding: 15px; border: 1px solid #ffffff14; border-radius: 8px; background: #121519; }
.resource-status-indicator { flex: 1; margin: 0; color: #ffc173; font-size: 11px; }
.resource-status-indicator.is-online { color: #00e676; }
.resource-status-indicator.is-offline { color: #ff8b8b; }
.resource-status .resource-card-button { margin: 0; }
.portal-footer { display: flex; flex: 0 0 33px; align-items: center; justify-content: center; gap: 9px; min-height: 33px; color: #68716b; font-size: 8px; }
.portal-footer a { color: #929b95; }
.portal-footer a:hover { color: var(--portal-green); }
.portal-footer span { padding-left: 9px; border-left: 1px solid #ffffff20; }

.conversation-view { display: flex; width: min(100%, 850px); flex: 1; flex-direction: column; min-height: 0; padding: 12px 0 0; }
.conversation-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 0 17px; border-bottom: 1px solid #ffffff14; }
.conversation-heading .workspace-eyebrow { margin: 0 0 7px; font-size: 8px; }
.conversation-heading h1 { max-width: 620px; overflow: hidden; font-size: 22px; letter-spacing: -.8px; text-overflow: ellipsis; white-space: nowrap; }
.new-chat-button { display: flex; align-items: center; gap: 6px; padding: 8px 11px; border: 1px solid #ffffff20; border-radius: 6px; background: #171a1e; font-size: 9px; }
.new-chat-button:hover { border-color: #00e67668; }
.message-list { flex: 1; overflow: auto; padding: 22px max(5px, calc((100% - 650px)/2)); }
.message { margin: 0 0 20px; }
.message-user { display: flex; justify-content: flex-end; }
.message-user .message-content { max-width: 82%; padding: 11px 14px; border: 1px solid #00e67628; border-radius: 13px 13px 3px 13px; background: #102018; color: #eef5f0; white-space: pre-wrap; }
.message-assistant { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 10px; }
.message-avatar { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #00e67648; border-radius: 7px; color: var(--portal-green); font: 700 9px var(--portal-display); }
.message-content { overflow-wrap: anywhere; color: #d4dbd7; font-size: 12px; line-height: 1.75; white-space: pre-wrap; }
.message-content p { margin: 0 0 10px; }
.message-content h1, .message-content h2, .message-content h3, .message-content h4 { margin: 17px 0 8px; color: #edf2ee; font: 600 15px/1.35 var(--portal-display); letter-spacing: -.3px; }
.message-content ul, .message-content ol { padding-left: 21px; margin: 6px 0 11px; }
.message-content li { padding: 2px 0; }
.message-content strong { color: #eef4f0; }
.message-content code { padding: 2px 5px; border: 1px solid #ffffff12; border-radius: 4px; background: #0d1110; color: #9ce8b9; font: 11px/1.6 Consolas, "Courier New", monospace; white-space: pre-wrap; }
.message-content pre { position: relative; max-width: 100%; overflow: auto; margin: 8px 0 12px; padding: 13px; border: 1px solid #ffffff16; border-radius: 7px; background: #0e1113; }
.message-content pre::before { display: block; margin-bottom: 8px; color: #78837c; content: attr(data-language); font: 8px var(--portal-body); letter-spacing: 1px; text-transform: uppercase; }
.message-content pre code { padding: 0; border: 0; background: transparent; color: #c3d5ca; font: 11px/1.7 Consolas, "Courier New", monospace; white-space: pre; }
.message-content:empty::after { display: inline-block; width: 5px; height: 15px; background: var(--portal-green); content: ""; vertical-align: -2px; animation: blink-caret 1s steps(2, start) infinite; }
.message-content.message-pending:empty::after { display: none; }
.message-generation { display: inline-flex; align-items: center; gap: 8px; margin: 3px 0 5px; color: #9ba69f; font-size: 10px; }
.message-generation::after { width: 22px; height: 4px; border-radius: 4px; background: radial-gradient(circle, var(--portal-green) 1.5px, transparent 2px) 0 0/8px 4px repeat-x; content: ""; animation: generation-pulse .9s linear infinite; }
.message-actions { display: flex; align-items: center; gap: 4px; grid-column: 2; margin-top: -4px; }
.message-actions { position: relative; }
.message-action-button { display: grid; place-items: center; min-width: 26px; height: 25px; padding: 0 6px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #87918a; font-size: 13px; }
.message-action-button:hover, .message-action-button.is-selected { border-color: #ffffff17; background: #ffffff09; color: #e5ebe7; }
.message-actions-menu { position: absolute; z-index: 2; top: 24px; right: 0; display: grid; min-width: 150px; padding: 5px; border: 1px solid #ffffff1c; border-radius: 7px; background: #15191b; box-shadow: 0 10px 30px #0008; }
.message-actions-menu button { min-height: 29px; padding: 0 8px; border: 0; border-radius: 4px; background: transparent; color: #d8e0da; text-align: left; font-size: 9px; }
.message-actions-menu button:hover { background: #ffffff0c; }
.generated-file-list { grid-column: 2; display: grid; gap: 6px; margin-top: 3px; padding: 10px 12px; border: 1px solid #00e67627; border-radius: 7px; background: #101914; }
.generated-file-list > strong { color: #96e7b3; font-size: 9px; }
.generated-file-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.generated-file-row code { overflow: hidden; color: #bbc5bf; font-size: 9px; text-overflow: ellipsis; }
.generated-file-row button { flex: 0 0 auto; padding: 4px 7px; border: 1px solid #ffffff1a; border-radius: 4px; background: #171d19; color: #dce5df; font-size: 9px; }
.generated-file-row button:hover { border-color: #00e67670; }
.browser-project-files { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #ffffff15; }
.browser-project-files h2 { margin: 0 0 11px; font: 600 14px var(--portal-display); }
.browser-file-list { display: grid; gap: 7px; }
.browser-file-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 9px 11px; border: 1px solid #ffffff14; border-radius: 7px; background: #121519; }
.browser-file-row code { flex: 1 1 180px; overflow: hidden; color: #c2cdc5; font-size: 10px; text-overflow: ellipsis; }
.browser-file-row .resource-card-button { min-height: 27px; margin: 0; padding: 0 8px; font-size: 9px; }
.message-files { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.message-files span, .attachment-chip { padding: 4px 7px; border: 1px solid #ffffff1b; border-radius: 5px; color: #aeb6b1; font-size: 9px; }
.conversation-composer { width: 100%; }
.prompt-edit-notice { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px; padding: 7px 9px; border: 1px solid #00e6762a; border-radius: 6px; background: #101a14; color: #aebbb2; font-size: 9px; text-align: left; }
.prompt-edit-notice button { flex: 0 0 auto; padding: 3px 6px; border: 0; background: transparent; color: #9ee8b9; font-size: 9px; }
.conversation-composer textarea { min-height: 45px; }
.conversation-mode { color: #9aa29d; font-size: 9px; }
.conversation-view .composer-note { width: 100%; margin: 7px 0 0; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 5px; }
.attachment-chip { display: flex; align-items: center; gap: 6px; }
.attachment-chip button { padding: 0; border: 0; background: transparent; color: #cad0cd; font-size: 12px; }
.portal-alert { position: fixed; z-index: 10; right: 24px; bottom: 24px; max-width: min(380px, calc(100vw - 40px)); padding: 12px 15px; border: 1px solid #ffffff25; border-radius: 8px; background: #181c1b; color: #e8ece9; box-shadow: 0 12px 35px #0009; font-size: 11px; line-height: 1.5; }
.portal-alert.is-error { border-color: #e875756b; }

.pricing-view { width: min(100%, 1000px); padding: clamp(22px, 6vh, 60px) 0; text-align: center; }
.pricing-view .workspace-eyebrow { margin-top: 0; }
.pricing-view > h1 { font-size: clamp(30px, 4vw, 42px); }
.pricing-view .hero-subtitle { margin-bottom: 36px; }
.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; text-align: left; }
.pricing-card { position: relative; min-height: 237px; padding: 20px; border: 1px solid #ffffff1a; border-radius: 10px; background: #121519; }
.pricing-card.is-featured { border-color: #00e67666; box-shadow: 0 0 28px #00e6760a; }
.pricing-card h2 { margin: 0 0 17px; color: #e2e8e4; font: 600 14px var(--portal-display); }
.pricing-card > strong { display: block; min-height: 42px; font: 600 28px var(--portal-display); }
.pricing-card > strong small { color: #aab1ac; font: 10px var(--portal-body); }
.pricing-card p { min-height: 49px; margin: 12px 0 15px; color: #a0a8a3; font-size: 10px; line-height: 1.6; }
.pricing-card button, .pricing-card a { display: flex; min-height: 34px; align-items: center; justify-content: center; width: 100%; border: 1px solid #ffffff22; border-radius: 5px; background: #171b1f; font-size: 10px; font-weight: 600; }
.pricing-card button:hover, .pricing-card a:hover { border-color: #00e6766b; }
.pricing-card .pricing-current { background: #ffffff0b; color: #a3aaa6; }
.popular-badge { position: absolute; top: 15px; right: 14px; padding: 4px 6px; border-radius: 4px; background: #00e676; color: #07120c; font-size: 7px; font-weight: 700; }
.pricing-disclaimer { margin: 20px auto; color: #929b95; font-size: 9px; line-height: 1.6; }

.auth-dialog { width: min(420px, calc(100vw - 32px)); padding: 0; border: 1px solid #ffffff1c; border-radius: 13px; background: #121518; color: var(--portal-text); box-shadow: 0 24px 90px #000c; }
.auth-dialog::backdrop { background: #020403c9; backdrop-filter: blur(4px); }
.portal-dialog { width: min(520px, calc(100vw - 28px)); max-height: min(82vh, 720px); padding: 0; overflow: auto; border: 1px solid #ffffff1c; border-radius: 13px; background: #121518; color: var(--portal-text); box-shadow: 0 24px 90px #000c; }
.portal-dialog::backdrop { background: #020403c9; backdrop-filter: blur(4px); }
.portal-dialog-content { position: relative; display: flex; flex-direction: column; padding: 25px; }
.portal-dialog-content h2 { margin: 18px 38px 15px 0; font: 600 20px var(--portal-display); }
.portal-dialog-content > p:not(.usage-error) { color: #a1aaa4; font-size: 10px; line-height: 1.6; }
.tool-option-list { display: grid; gap: 4px; }
.tool-option { display: flex; align-items: center; gap: 12px; min-height: 49px; padding: 6px 10px; border: 0; border-radius: 7px; background: transparent; color: #dce2de; text-align: left; }
.tool-option:hover { background: #ffffff0c; }
.tool-option > span:first-child { display: grid; flex: 0 0 22px; place-items: center; color: var(--portal-green); font-size: 17px; }
.tool-option > span:last-child { display: grid; gap: 4px; }
.tool-option strong { font-size: 10px; }
.tool-option small { color: #9ca59f; font-size: 9px; }
.dialog-hint { margin: 13px 0 0; color: #909993; font-size: 9px; line-height: 1.6; }
.library-panel { display: grid; gap: 7px; margin-top: 15px; padding-top: 13px; border-top: 1px solid #ffffff16; }
.library-panel-heading, .library-file-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.library-panel-heading strong { font-size: 11px; }
.library-file-row { padding: 7px; border: 1px solid #ffffff14; border-radius: 5px; }
.library-file-row code, .github-file-row code { overflow: hidden; color: #c5d0c9; font-size: 9px; text-overflow: ellipsis; }
.dialog-primary-button, .dialog-secondary-button { min-height: 32px; padding: 0 10px; border: 1px solid #ffffff20; border-radius: 5px; background: #191d20; color: #e1e7e3; font-size: 9px; font-weight: 600; }
.dialog-primary-button { border-color: #00e67665; background: #00e67616; color: #b9f2cd; }
.dialog-primary-button:hover, .dialog-secondary-button:hover { border-color: var(--portal-green); }
.dialog-primary-button:disabled, .dialog-secondary-button:disabled { cursor: wait; opacity: .6; }
.usage-dialog { position: fixed; inset: 10px auto auto 10px; width: min(250px, calc(100vw - 20px)); max-width: none; max-height: min(190px, calc(100dvh - 16px)); height: auto; margin: 0; overflow: auto; border: 1px solid #3c4554; border-radius: 9px; background: #222834; color: #e2e6ee; box-shadow: 0 12px 36px #0009; }
.usage-dialog::backdrop { background: #05070b70; backdrop-filter: blur(1px); }
.usage-panel-content { padding: 9px 13px 11px; }
.usage-header, .usage-header-actions, .usage-brand-line { display: flex; align-items: center; }
.usage-header { justify-content: space-between; gap: 8px; min-height: 23px; }
.usage-brand-line { min-width: 0; gap: 7px; }
.usage-brand-line > strong { color: #e0e5ed; font-size: 12px; font-weight: 500; white-space: nowrap; }
.usage-brand-line > strong span { color: var(--portal-green); font-weight: 700; }
.usage-plan { margin: 0; padding: 3px 5px; border-radius: 4px; background: #ffffff0d; color: #b9c3d3; font-size: 8px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.usage-header-actions { gap: 3px; }
.usage-upgrade-button { width: 100%; min-height: 30px; margin-top: 9px; padding: 0 10px; border: 1px solid #ffffff20; border-radius: 5px; background: #ffffff0b; color: #e3e8ef; font-size: 10px; font-weight: 600; white-space: nowrap; }
.usage-icon-button { display: grid; width: 21px; height: 21px; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #98a3b5; font-size: 13px; }
.usage-icon-button:hover { background: #ffffff10; color: #f3f5f9; }
.usage-icon-button:disabled { cursor: wait; opacity: .6; }
.usage-icon-button.is-loading span { animation: usage-spin .8s linear infinite; }
.usage-close-button { font-size: 17px; }
.usage-divider { height: 1px; margin: 6px 0 8px; background: #394151; }
.usage-meter { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.usage-meter-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.usage-meter-heading strong { color: #aab4c5; font-size: 11px; font-weight: 500; }
.usage-meter-heading span { color: #8995a8; font-size: 8px; text-align: right; }
.usage-meter > p { min-height: 22px; margin: 5px 0 5px; color: #dce2ed; font: 600 16px/1.3 var(--portal-display); }
.usage-meter.is-empty > p { min-height: 0; margin: 6px 0; color: #929daf; font: 400 9px/1.45 var(--portal-body); }
.usage-meter .quota-track { height: 4px; border-radius: 2px; background: #3a4251; }
.usage-meter .quota-track span { background: #a6afbf; }
.usage-upgrade-button:hover { border-color: #00e67670; background: #ffffff0b; color: #fff; }
.usage-error { margin: 10px 0 0; color: #ff9696; font-size: 10px; line-height: 1.5; }
@keyframes usage-spin { to { transform: rotate(360deg); } }
.usage-error { margin: 10px 0 0; color: #ff9696; font-size: 10px; line-height: 1.5; }
.github-dialog label:not(.github-file-row) { margin: 10px 0 6px; color: #d6ddd8; font-size: 10px; font-weight: 600; }
.github-dialog input[type=url] { min-height: 38px; padding: 0 10px; border: 1px solid #ffffff20; border-radius: 5px; background: #0d1012; color: #f1f4f2; }
.github-dialog > .portal-dialog-content > .dialog-primary-button { margin-top: 10px; }
.github-file-list { display: grid; gap: 5px; max-height: 260px; overflow: auto; margin-top: 10px; }
.github-file-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid #ffffff13; border-radius: 5px; }
.github-file-row input { accent-color: var(--portal-green); }
.auth-dialog form { position: relative; display: flex; flex-direction: column; padding: 30px; }
.dialog-close { position: absolute; top: 14px; right: 15px; width: 30px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: #aab2ad; font-size: 21px; }
.dialog-brand { color: var(--portal-green); font: 700 13px var(--portal-display); }
.auth-dialog h2 { margin: 20px 0 7px; font: 600 22px var(--portal-display); }
.auth-dialog form > p:not(.auth-error) { margin: 0 0 20px; color: #a1aaa4; font-size: 11px; line-height: 1.6; }
.auth-dialog label { margin: 12px 0 6px; color: #d6ddd8; font-size: 10px; font-weight: 600; }
.auth-dialog input { min-height: 40px; padding: 0 11px; border: 1px solid #ffffff20; border-radius: 5px; background: #0d1012; color: #f1f4f2; }
.auth-submit { min-height: 40px; margin-top: 19px; border: 0; border-radius: 5px; background: var(--portal-green); color: #07120c; font-size: 11px; font-weight: 700; }
.auth-submit:disabled { cursor: wait; opacity: .6; }
.auth-switch { margin-top: 14px; padding: 7px; border: 0; background: transparent; color: #a7b0aa; font-size: 10px; }
.auth-switch strong { color: var(--portal-green); }
.auth-error { margin: 12px 0 0; color: #ff9696; font-size: 10px; line-height: 1.5; }

@keyframes blink-caret { to { visibility: hidden; } }
@keyframes generation-pulse { to { background-position-x: 8px; } }

@media (max-width: 980px) {
    .portal-shell { grid-template-columns: 225px minmax(0, 1fr); }
    .portal-topbar { justify-content: flex-start; }
    .top-navigation { gap: 18px; }
    .topbar-actions { right: 14px; }
    .account-email { max-width: 120px; }
    .workspace { padding-right: 25px; padding-left: 25px; }
}
@media (max-width: 700px) {
    body { overflow: hidden; }
    .portal-shell { grid-template-columns: minmax(0, 1fr); }
    .portal-sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: 260px; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 15px 0 50px #0006; }
    .portal-sidebar.mobile-open { transform: translateX(0); }
    .portal-topbar { justify-content: center; padding: 0 10px; }
    .mobile-menu { position: absolute; left: 11px; display: block; padding: 6px 8px; border: 0; background: transparent; color: #dce2de; font-size: 16px; }
    .top-navigation { gap: clamp(10px, 3vw, 20px); }
    .top-nav-trigger, .top-nav-link { gap: 3px; font-size: 9px; }
    .topbar-actions { right: 9px; }
    .account-email { display: none; }
    .top-sign-in { min-height: 28px; padding: 0 8px; font-size: 9px; }
    .workspace { overflow: auto; padding: 14px 16px 22px; }
    .hero-content { padding-top: 18px; }
    .workspace-eyebrow { margin-top: 20px; }
    .hero-content h1 { font-size: clamp(28px, 7.4vw, 39px); letter-spacing: -1.7px; }
    .hero-subtitle { max-width: 370px; font-size: 12px; line-height: 1.6; }
    .composer { padding: 12px; }
    .composer textarea { min-height: 60px; }
    .context-button { display: none; }
    .mode-grid { gap: 4px; }
    .mode-card { min-width: 67px; }
    .mode-icon { width: 42px; height: 42px; }
    .start-from { margin-top: 19px; }
    .recent-section { margin-top: 20px; padding: 15px; }
    .recent-grid { grid-template-columns: 1fr; gap: 7px; }
    .recent-card { min-height: 66px; }
    .conversation-view { padding-top: 5px; }
    .conversation-heading h1 { max-width: 50vw; font-size: 16px; }
    .message-list { padding: 16px 1px; }
    .pricing-view { padding-top: 25px; }
    .pricing-grid { grid-template-columns: 1fr; gap: 9px; }
    .pricing-card { min-height: 0; padding: 16px; }
    .pricing-card h2 { margin-bottom: 8px; }
    .pricing-card > strong { min-height: 30px; font-size: 23px; }
    .pricing-card p { min-height: auto; margin: 6px 0 10px; }
    .resource-view { padding-top: 18px; }
    .resource-heading h1 { font-size: 27px; }
    .resource-card-grid { grid-template-columns: 1fr; }
    .template-card { grid-template-columns: 1fr; }
    .template-card .resource-card-button { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 14px; }
    .resource-conversation { align-items: flex-start; flex-wrap: wrap; }
    .resource-open-button { margin-left: auto; }
}
@media (max-width: 420px) {
    .top-navigation { gap: 8px; }
    .top-nav-trigger, .top-nav-link { font-size: 8px; }
    .top-nav-trigger > span:last-child { display: none; }
    .mode-card { min-width: 59px; font-size: 8px; }
    .mode-icon { width: 39px; height: 39px; }
    .portal-footer { gap: 5px; font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
