@import url('./auth.css');
@import url('./social.css');
@import url('font-face.css');
@import url('ui.css');
@import url('workspace.css');
@import url('insights.css');
@import url('conversations.css');

/* Shared tools retain their behavior; Dolora owns the visual system. */
:root {
  --bg: #fff; --surface: #fff; --sidebar: #f6f4ff;
  --ink: #20202c; --muted: #77788c; --line: #e8e7ef;
  --accent: #7160d7; --accent-dark: #5746b8; --soft: #f2efff;
  --green: var(--accent); --green-dark: var(--accent-dark);
  --lime: #ded6fc; --hover: #f8f7fc;
  --shadow: 0 8px 32px #29214e08;
  --font: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body.dark {
  color-scheme: dark;
  --bg: #17161e; --surface: #211f2b; --sidebar: #1d1b27;
  --ink: #f1eff8; --muted: #aaa5bd; --line: #363242;
  --accent: #ad9cfb; --accent-dark: #c3b7ff; --soft: #302940;
  --green: var(--accent); --green-dark: var(--accent-dark);
  --lime: #493968; --hover: #292432; --shadow: 0 8px 32px #0003;
}
html { font-family: var(--font); }
body { color: var(--ink); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline-color: var(--accent); }
.app-shell { grid-template-columns: 224px minmax(0,1fr); }
.sidebar { padding: 20px 19px; background: var(--sidebar); border-color: var(--line); overflow-y: auto; }
.brand { gap: 10px; }
.brand img { width: 46px; height: 46px; object-fit: contain; }
.brand-wordmark { font-size: 26px; font-weight: 750; letter-spacing: -1.15px; line-height: 1.13; }
.brand-wordmark small { display: block; margin-top: 3px; font-size: 12px; font-weight: 450; letter-spacing: -.1px; color: var(--muted); }
.new-chat { min-height: 44px; margin: 28px 0 26px; padding: 10px; border: 1px solid #a99aed; border-radius: 12px; color: var(--accent-dark); font-weight: 550; background: #ffffff45; }
.new-chat:hover { background: var(--surface); }
.sidebar-nav { flex: 1; }
.video-provider-filter{display:grid;gap:7px;margin:15px 0 8px;font-size:12px;color:var(--muted)}
.video-provider-filter select{width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:11px;background:var(--surface);color:var(--ink);font:inherit;font-size:13px}
.video-model-note{font-size:11px;line-height:1.6;color:var(--muted);margin:0 0 12px}
.video-audio-control{display:flex;align-items:center;gap:9px;border:1px solid var(--line);background:var(--surface);padding:11px 12px;border-radius:12px;font-size:12px;color:var(--ink)}
.video-audio-control .icon,.video-audio-note .icon{width:17px;height:17px;flex-shrink:0}
.video-audio-control .switch{margin-left:auto}
.video-audio-control[aria-checked=true] .switch{background:#8e79cc}
.video-audio-control[aria-checked=true] .switch:after{transform:translateX(13px)}
.video-audio-control strong{font-size:11px;font-weight:500;min-width:22px}
.video-audio-note{display:flex;gap:8px;align-items:center;font-size:11px;line-height:1.5;color:var(--muted);margin:0}
@media(max-width:720px){.video-model-modal .model-cost{display:block;min-width:75px;font-size:10px}.video-model-modal .model-choice-info{min-width:0}.video-model-modal .model-choice-info strong{font-size:12px}}
.nav { gap: 6px; }
.nav-row { min-height: 44px; padding: 10px 14px; gap: 13px; border-radius: 11px; color: var(--ink); font-size: 14px; }
.nav-row.active { background: #eae5fc; color: var(--ink); font-weight: 600; }
.nav-row.active > .icon { color: var(--accent-dark); }
.dark .nav-row.active { background: var(--soft); }
.nav-row .icon { width: 21px; height: 21px; }
.sidebar-bottom { margin-top: 25px; padding-top: 17px; border-top: 1px solid var(--line); }
.sidebar-bottom .nav { padding: 0; border: 0; }
.account-row { margin-top: 20px; padding: 8px 2px; }
.avatar { width: 40px; height: 40px; background: #e2dcfa; color: #4f426d; }
.dark .avatar { background: #493c66; color: var(--ink); }
.account-info { font-size: 13px; }
.account-info small { font-size: 10px; }
.topbar { height: 60px; padding: 0 26px; }
.space-name { gap: 9px; font-size: 15px; font-weight: 500; }
.connected-dot { width: 5px; height: 5px; background: #92a89b; }
.main-content { max-width: 1172px; padding: 0 26px 28px; }
.primary, .outline-button { min-height: 40px; padding: 11px 16px; border-radius: 11px; font-weight: 500; }
.primary { background: var(--accent); color: #fff; }
.primary:hover { background: var(--accent-dark); }
.dark .primary { color: #221b35; }
.outline-button { border-color: var(--line); background: var(--surface); }
.outline-button:hover { background: var(--hover); border-color: #c6bfdc; }
.chrome-button { padding: 10px 15px; }
.icon-button { border-radius: 8px; }

/* Greeting, companion and the one primary task. */
.hero { max-width: 900px; padding-top: 16px; }
.companion { width: 224px; height: 224px; margin: 0 auto 10px; }
.companion img { width: 100%; height: 100%; object-fit: contain; animation: companion-float 6s ease-in-out infinite; }
@keyframes companion-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.hero h1 { font-size: clamp(34px,3.35vw,46px); font-weight: 750; letter-spacing: -1.9px; line-height: 1.2; }
.hero-subtitle { font-size: 19px; color: var(--muted); line-height: 1.55; margin: 12px 0 28px; letter-spacing: -.35px; }
.composer { padding: 18px 20px 14px; border: 1px solid #d9d5e5; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.composer:focus-within { border-color: #a697df; box-shadow: 0 4px 26px #7160d711; }
.dark .composer { border-color: var(--line); }
.composer textarea { height: 64px; min-height: 64px; max-height: 280px; padding: 0; font-size: 15px; line-height: 1.6; }
.composer textarea::placeholder { color: var(--muted); opacity: 1; }
.composer-bottom { gap: 12px; margin-top: 8px; min-height: 40px; }
.model-button { border-radius: 10px; max-width: 245px; min-width: 0; padding: 8px 10px; font-size: 12px; gap: 8px; }
.model-button .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-button .provider-mark { display: inline-grid; }
.provider-mark { width: 21px; height: 21px; font-weight: 650; font-size: 11px; background: #f1f0f5; color: #41414d; }
.provider-mark.google { background: #eff4ff; color: #396abc; }
.provider-mark.anthropic { background: #faf0eb; color: #a2634d; }
.provider-mark.perplexity { background: #edf7f7; color: #24797e; }
.dark .provider-mark { background: var(--hover); color: var(--ink); }
.search-toggle { font-size: 12px; gap: 7px; }
.search-toggle .icon { width: 17px; height: 17px; }
.switch { width: 32px; height: 19px; background: #d3d1da; }
.switch::after { width: 13px; height: 13px; top: 3px; left: 3px; }
.search-toggle.on .switch { background: var(--accent); }
.search-toggle.on .switch::after { transform: translateX(13px); }
.send-button { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; }
.send-button:disabled { background: var(--accent); opacity: .55; }
.send-button:hover:not(:disabled) { background: var(--accent-dark); }
.quick-actions { gap: 10px; margin-top: 16px; }
.quick-action { min-height: 44px; padding: 10px 20px; gap: 10px; font-size: 13px; border-color: var(--line); background: var(--surface); }
.quick-action:hover { background: var(--soft); border-color: #d3ccef; }
.starter-section { margin: 27px auto 0; border-top: 1px solid var(--line); padding-top: 20px; }
.starter-section h2 { font-size: 18px; font-weight: 600; letter-spacing: -.6px; }
.starter-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 16px; }
.starter-item { display: flex; align-items: center; gap: 14px; text-align: left; padding: 3px 14px; min-height: 62px; border-radius: 10px; }
.starter-item:first-child { padding-left: 0; }
.starter-item + .starter-item { border-left: 1px solid var(--line); }
.starter-item:hover { background: var(--hover); }
.starter-item strong { display: block; font-size: 13px; font-weight: 550; line-height: 1.5; }
.starter-item small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; line-height: 1.5; }
.starter-icon { display: grid; place-items: center; width: 48px; height: 48px; background: var(--soft); color: var(--accent-dark); border-radius: 50%; flex-shrink: 0; }
.starter-icon .icon { width: 22px; height: 22px; }
.starter-arrow { display: none; margin-left: auto; color: var(--muted); }

/* The same language on tools, results, plans and settings. */
.view-heading h1 { font-size: 33px; font-weight: 650; letter-spacing: -1.35px; }
.view-heading p { font-size: 14px; line-height: 1.75; }
.field input, .field select, .field textarea { border-radius: 10px; border-color: var(--line); }
.canvas, .settings-box, .calculator { border-radius: 16px; border-color: var(--line); }
.reference-button { border-color: #cfc5e9; }
.conversation-title { font-size: 22px; font-weight: 600; letter-spacing: -.75px; }
body[data-conversation=true] .main-content { display: flex; flex-direction: column; min-height: calc(100svh - 60px); }
body[data-conversation=true] .conversation { width: 100%; flex: 1; }
body[data-conversation=true] .conversation-composer { width: 100%; margin-top: auto; }
body[data-mode=panel][data-conversation=true] .main-content { min-height: 0; }
.message.user { border-radius: 18px 18px 5px 18px; background: var(--soft); }
.assistant-label img { width: 32px; height: 32px; object-fit: contain; }
.assistant-label { font-size: 13px; }
.prose { font-size: 14px; line-height: 1.85; }
.prose pre { border: 1px solid var(--line); border-radius: 12px; background: var(--hover); }
.pricing-heading h1 { font-weight: 650; }
.plan-card { border-radius: 16px; }
.plan-card.featured { background: #f7f4ff; border-color: #b3a5e9; }
.dark .plan-card.featured { background: var(--soft); }
.plan-mark { width: 33px; height: 33px; object-fit: contain; }
.plan-top h2 { font-weight: 600; }
.billing-tabs .segmented button.active { background: var(--accent); color: #fff; }
.model-choice.selected { border-color: #d8cff4; background: var(--soft); }
.dark .model-choice.selected { border-color: var(--line); }
.modal { border-radius: 20px; box-shadow: 0 20px 90px #201b371a; }
.modal-backdrop { background: #201b3745; }
.modal-header h2 { font-weight: 600; letter-spacing: -.6px; }
.modal-actions { flex-wrap: wrap; }
.tools-overview { display: flex; flex-direction: column; gap: 20px; }
.tool-group h3 { font-size: 11px; font-weight: 500; color: var(--muted); margin: 0 0 9px 8px; }
.tool-menu-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.tool-menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; text-align: left; padding: 11px 8px; border-radius: 12px; }
.tool-menu-item:hover { background: var(--hover); }
.tool-menu-icon { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; background: var(--soft); color: var(--accent-dark); border-radius: 11px; }
.tool-menu-item > span:nth-child(2) { flex: 1; min-width: 0; }
.tool-menu-item strong { display: block; font-size: 14px; font-weight: 550; }
.tool-menu-item small { display: block; font-size: 11px; line-height: 1.5; color: var(--muted); margin-top: 3px; }
.tool-menu-item > .icon { width: 12px; height: 12px; color: var(--muted); }

/* Purpose-built Chrome side panel. */
body[data-mode=panel] { background: var(--hover); }
body[data-mode=panel] #app { max-width: 440px; background: var(--bg); }
body[data-mode=panel] .main-content { padding: 0 14px 10px; }
body[data-mode=panel] .panel-header { height: 76px; padding: 14px 16px 12px; gap: 8px; }
body[data-mode=panel] .panel-header .brand { gap: 7px; margin-right: auto; }
body[data-mode=panel] .brand img { width: 43px; height: 43px; object-fit: contain; }
body[data-mode=panel] .brand-wordmark { font-size: 24px; letter-spacing: -1px; }
body[data-mode=panel] .brand-wordmark small { font-size: 11px; }
body[data-mode=panel] .panel-header .icon-button { color: var(--ink); }
body[data-mode=panel] .panel-tabs { padding: 0 14px; margin-bottom: 0; }
body[data-mode=panel] .panel-tabs > .segmented { width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; gap: 4px; }
body[data-mode=panel] .panel-tabs button { min-width: 0; min-height: 40px; padding: 8px 4px; font-size: 12px; gap: 6px; border-radius: 11px 11px 6px 6px; border-bottom: 2px solid transparent; color: var(--ink); }
body[data-mode=panel] .panel-tabs .icon { width: 18px; height: 18px; }
body[data-mode=panel] .panel-tabs button.active { box-shadow: none; background: var(--soft); color: var(--accent-dark); border-bottom-color: var(--accent); }
body[data-mode=panel] .panel-page { min-height: 56px; margin: 14px 14px 14px; padding: 10px 12px; border-radius: 13px; gap: 10px; color: var(--ink); }
body[data-mode=panel] .panel-page > .icon { width: 21px; height: 21px; color: var(--accent-dark); }
body[data-mode=panel] .page-info strong { font-size: 13px; font-weight: 550; }
body[data-mode=panel] .page-info small { font-size: 10px; margin-top: 3px; }
body[data-mode=panel] .panel-page button { padding: 5px 0 5px 8px; font-size: 11px; border-left: 1px solid #dcd3f5; color: var(--accent-dark); }
body[data-mode=panel] .panel-page button .icon { width: 14px; height: 14px; }
body[data-mode=panel] .hero { padding-top: 0; align-items: center; min-height: calc(100svh - 254px); }
body[data-mode=panel] .companion { width: 166px; height: 166px; margin-bottom: 12px; }
body[data-mode=panel] .hero h1 { font-size: 28px; letter-spacing: -1.1px; line-height: 1.25; }
body[data-mode=panel] .hero-subtitle { font-size: 15px; line-height: 1.5; max-width: 300px; margin: 9px auto 14px; letter-spacing: -.25px; }
body[data-mode=panel] .quick-actions { order: 1; align-items: stretch; width: 100%; margin: 0 0 10px; gap: 0; border-top: 1px solid var(--line); }
body[data-mode=panel] .quick-action { min-height: 44px; padding: 10px 8px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; text-align: left; gap: 11px; font-size: 14px; background: transparent; }
body[data-mode=panel] .quick-action:hover { background: var(--hover); }
body[data-mode=panel] .quick-action .icon { width: 18px; height: 18px; }
body[data-mode=panel] .quick-action .trailing { width: 12px; height: 12px; margin-left: auto; color: var(--muted); }
body[data-mode=panel] .hero > .composer { width: 100%; margin-top: auto; }
body[data-mode=panel] .composer { padding: 14px 13px 12px; border-radius: 18px; }
body[data-mode=panel] .composer textarea { height: 48px; min-height: 48px; font-size: 14px; }
body[data-mode=panel] .composer-bottom { gap: 7px; min-height: 36px; }
body[data-mode=panel] .model-button { max-width: 192px; padding: 7px 8px; font-size: 11px; gap: 5px; }
body[data-mode=panel] .model-button .provider-mark { display: inline-grid; width: 17px; height: 17px; font-size: 9px; }
body[data-mode=panel] .search-toggle { margin-left: auto; }
body[data-mode=panel] .switch { width: 27px; height: 17px; }
body[data-mode=panel] .switch::after { width: 11px; height: 11px; }
body[data-mode=panel] .search-toggle.on .switch::after { transform: translateX(10px); }
body[data-mode=panel] .send-button { width: 36px; height: 36px; margin-left: 0; }
body[data-mode=panel] .send-button .icon { width: 18px; height: 18px; }
body[data-mode=panel] .panel-footer { padding: 7px 15px; gap: 8px; font-size: 10px; }
body[data-mode=panel] .panel-footer button { padding: 4px 0; font-size: 11px; background: transparent; }
body[data-mode=panel] .tool-menu-list { grid-template-columns: 1fr; }
body[data-mode=panel] .view-heading p { font-size: 12px; }
body[data-mode=panel] .canvas { border-radius: 16px; }

@media (min-width:1700px) {
  .hero { padding-top: 45px; }
  .starter-section { margin-top: 42px; }
}
@media (max-width:1100px) {
  .app-shell { grid-template-columns: 208px minmax(0,1fr); }
  .sidebar { padding-inline: 14px; }
  .main-content { padding-inline: 22px; }
  .hero h1 { font-size: 38px; }
  .starter-item { gap: 10px; padding-inline: 10px; }
  .starter-icon { width: 38px; height: 38px; }
  .starter-item strong { font-size: 12px; }
  .starter-item small { font-size: 10px; }
}
@media (max-width:900px) {
  .app-shell { grid-template-columns: 188px minmax(0,1fr); }
  .sidebar { padding-inline: 10px; }
  .brand { gap: 6px; }
  .brand img { width: 40px; height: 40px; }
  .brand-wordmark { font-size: 23px; }
  .nav-row { gap: 10px; font-size: 13px; }
  .hero h1 { font-size: 33px; }
  .hero-subtitle { font-size: 17px; }
  .composer-bottom { gap: 8px; }
  .composer-bottom .divider { display: none; }
  .search-toggle .search-label { display: none; }
  .model-button { max-width: 205px; }
  .starter-list { grid-template-columns: 1fr; }
  .starter-item, .starter-item:first-child { padding: 12px 2px; border-radius: 0; }
  .starter-item + .starter-item { border-left: 0; border-top: 1px solid var(--line); }
  .starter-item strong { font-size: 14px; }
  .starter-item small { font-size: 12px; }
  .starter-icon { width: 45px; height: 45px; }
  .starter-arrow { display: block; }
}
@media (max-width:720px) {
  .app-shell { display: block; }
  .sidebar { width: 236px; box-shadow: 0 0 0 100vw #201b3745; }
  .topbar { height: 58px; padding-inline: 15px; }
  .space-name { font-size: 12px; gap: 7px; }
  .chrome-button { padding: 8px 10px; font-size: 11px; min-height: 35px; }
  .main-content { padding: 0 17px 22px; }
  .hero { padding-top: 7px; }
  .companion { width: 186px; height: 186px; margin-bottom: 8px; }
  .hero h1 { font-size: 32px; letter-spacing: -1.35px; }
  .hero-subtitle { font-size: 17px; margin: 10px 0 25px; }
  .composer { padding: 16px 13px 12px; border-radius: 18px; }
  .composer textarea { font-size: 14px; height: 76px; min-height: 76px; }
  .composer-bottom { gap: 6px; }
  .model-button { max-width: 185px; font-size: 11px; padding: 7px; gap: 5px; }
  .search-toggle > .icon { display: none; }
  .send-button { width: 36px; height: 36px; }
  .quick-actions { gap: 7px; margin-top: 14px; }
  .quick-action { min-height: 40px; padding: 9px 12px; gap: 7px; font-size: 11px; }
  .quick-action .icon { width: 16px; height: 16px; }
  .starter-section { margin-top: 28px; }
  .tool-menu-list { grid-template-columns: 1fr; }
}
@media (max-width:370px) {
  .chrome-button { font-size: 0; gap: 0; padding: 8px; }
  .hero h1 { font-size: 28px; }
  .model-button { max-width: 159px; }
  .model-button .provider-mark { display: none; }
  .quick-action { padding-inline: 10px; font-size: 10px; }
  body[data-mode=panel] .panel-tabs button { gap: 4px; font-size: 11px; }
  body[data-mode=panel] .model-button { max-width: 164px; }
}
@media (max-height:760px) and (min-width:721px) {
  .hero { padding-top: 10px; }
  .companion { width: 178px; height: 178px; margin-bottom: 8px; }
  .hero h1 { font-size: 38px; }
  .hero-subtitle { font-size: 17px; margin-bottom: 24px; }
  .starter-section { margin-top: 24px; }
  .sidebar .new-chat { margin-top: 22px; margin-bottom: 22px; min-height: 44px; }
  .sidebar .nav-row { min-height: 40px; }
}
@media (max-height:760px) {
  body[data-mode=panel] .companion { width: 120px; height: 120px; }
  body[data-mode=panel] .hero-subtitle { margin-bottom: 16px; }
  body[data-mode=panel] .quick-action { min-height: 41px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Interactive flight band, wholly above the existing text and controls. */
.companion[data-dolora-stage] {
  position: relative; width: 100%; height: 224px;
  overflow: hidden; pointer-events: auto; isolation: isolate;
}
.companion[data-dolora-stage] > img {
  position: absolute; left: 50%; top: 0; width: 224px; height: 100%;
  margin-left: -112px; transition: opacity .4s; pointer-events: none;
}
.companion[data-dolora-stage] canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; pointer-events: none; transition: opacity .4s;
}
.companion[data-dolora-state='3d'] > img { opacity: 0; animation: none; }
.companion[data-dolora-state='3d'] canvas { opacity: 1; }
.companion-touch {
  position: absolute; z-index: 1; display: block; padding: 0; margin: 0;
  border: 0; border-radius: 50%; background: transparent; box-shadow: none;
  cursor: grab; touch-action: pan-y; -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.companion-touch[hidden] { display: none; }
.companion-touch:hover, .companion-touch:active { background: transparent; box-shadow: none; }
.companion[data-dolora-pressed='true'] .companion-touch { cursor: grabbing; }
.companion-touch:focus-visible { outline: 2px solid #9e88d6; outline-offset: -2px; }
body[data-mode=panel] .companion[data-dolora-stage] { width: 100%; height: 166px; }
body[data-mode=panel] .companion[data-dolora-stage] > img { width: 166px; margin-left: -83px; }
@media(max-width:720px) {
  .companion[data-dolora-stage] { height: 186px; }
  .companion[data-dolora-stage] > img { width: 186px; margin-left: -93px; }
}
@media(max-height:760px) and (min-width:721px) {
  .companion[data-dolora-stage] { height: 178px; }
  .companion[data-dolora-stage] > img { width: 178px; margin-left: -89px; }
}
@media(max-height:760px) {
  body[data-mode=panel] .companion[data-dolora-stage] { height: 120px; }
  body[data-mode=panel] .companion[data-dolora-stage] > img { width: 120px; margin-left: -60px; }
}

/* Keep the expanded workspace navigation readable on laptop-height windows. */
@media(min-width:721px) and (max-height:850px){.sidebar .nav-row{min-height:38px;padding:8px 12px;font-size:13px}.sidebar .sidebar-nav{gap:3px;padding-bottom:5px}.sidebar .new-chat{min-height:42px;margin:20px 0}.sidebar-bottom{margin-top:12px;padding-top:12px}.sidebar-bottom .account-row{margin-top:12px}}
