/* Goings AI. Graphite and white, no accent hue: the chrome "S" is the only metal on screen.
   Flat surfaces separated by tone steps, ink buttons, motion only where it explains what happened. */
:root {
  --bg: #f4f5f7; --surface: #ffffff; --sidebar: #eef0f3; --hover: #e7e9ed; --active: #e1e4e9;
  --text: #111317; --muted: #515866; --faint: #6b7280; --line: #e2e5ea; --line-strong: #cdd2d9;
  --ink: #111317; --on-ink: #ffffff; --user: #e8eaee; --code-bg: #f6f7f9; --ok: #16794a; --danger: #c2372d;
  --mark-fill: linear-gradient(140deg, #6a707b 0%, #23262d 40%, #7b818c 66%, #2c3037 100%); /* taste-skill-ignore: the logo's own chrome finish (brand asset) */
  --sheen: rgb(255 255 255 / .85);
  --float: 0 12px 32px rgb(16 20 30 / .14), 0 2px 6px rgb(16 20 30 / .06);
  --hl-kw: #7a3fd1; --hl-str: #1b7f4b; --hl-num: #b35a00; --hl-com: #6b7280; --hl-fn: #1f5fbf; --hl-attr: #b8336a;
  --display: "Schibsted Grotesk", system-ui, sans-serif;
  --sans: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace; /* taste-skill-ignore: used only in code blocks */
  --out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0e10; --surface: #16181c; --sidebar: #111316; --hover: #1d2025; --active: #252830;
    --text: #eceef2; --muted: #a3aab6; --faint: #868d9a; --line: #23262c; --line-strong: #33373f;
    --ink: #eceef2; --on-ink: #0d0e10; --user: #1f2227; --code-bg: #111316; --ok: #3ccf8e; --danger: #ff6b5e;
    --mark-fill: linear-gradient(140deg, #fafafa 0%, #d2d2d2 34%, #8b8b8b 58%, #cfcfcf 80%, #f2f2f2 100%); /* taste-skill-ignore: the logo's own chrome finish (brand asset) */
    --float: 0 16px 40px rgb(0 0 0 / .55), 0 2px 6px rgb(0 0 0 / .4);
    --hl-kw: #c4a7ff; --hl-str: #9fe0b4; --hl-num: #ffc58f; --hl-com: #868d9a; --hl-fn: #8fc8ff; --hl-attr: #f5a3c7;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0e10; --surface: #16181c; --sidebar: #111316; --hover: #1d2025; --active: #252830;
  --text: #eceef2; --muted: #a3aab6; --faint: #868d9a; --line: #23262c; --line-strong: #33373f;
  --ink: #eceef2; --on-ink: #0d0e10; --user: #1f2227; --code-bg: #111316; --ok: #3ccf8e; --danger: #ff6b5e;
  --mark-fill: linear-gradient(140deg, #fafafa 0%, #d2d2d2 34%, #8b8b8b 58%, #cfcfcf 80%, #f2f2f2 100%); /* taste-skill-ignore: the logo's own chrome finish (brand asset) */
  --float: 0 16px 40px rgb(0 0 0 / .55), 0 2px 6px rgb(0 0 0 / .4);
  --hl-kw: #c4a7ff; --hl-str: #9fe0b4; --hl-num: #ffc58f; --hl-com: #868d9a; --hl-fn: #8fc8ff; --hl-attr: #f5a3c7;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 15.5px/1.6 var(--sans); -webkit-font-smoothing: antialiased; caret-color: var(--text); }
body.loading > * { visibility: hidden; }
button, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
::selection { background: color-mix(in srgb, var(--text) 18%, transparent); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 8px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
.tnum { font-variant-numeric: tabular-nums; }

/* press feedback on every control */
button:not(:disabled) { transition: background-color .15s, color .15s, border-color .15s, transform .2s var(--out), opacity .15s; }
button:not(:disabled):active { transform: scale(.97); }

.icon-btn { border: 0; background: none; padding: 7px; border-radius: 99px; color: var(--muted); display: grid; place-items: center; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.link { border: 0; background: none; color: var(--muted); padding: 2px 4px; font-size: 14px; }
.link:hover { color: var(--text); }

/* the one button style: flat ink, fully round */
.ink-btn { border: 0; background: var(--ink); color: var(--on-ink); font-weight: 600; border-radius: 99px; padding: 11px 18px; }
.ink-btn:hover:not(:disabled) { opacity: .86; }
.ink-btn:disabled { opacity: .45; cursor: default; }

/* the logo as a mask, so it takes the metal finish of the theme and can shimmer while GoingsELLM works */
.mark { display: inline-block; flex: none; background: var(--mark-fill); background-size: 100% 100%; /* taste-skill-ignore: the logo's own chrome finish (brand asset) */
  -webkit-mask: url("/logo.svg") center / contain no-repeat; mask: url("/logo.svg") center / contain no-repeat; }
.mark.live { background-image: linear-gradient(105deg, transparent 38%, var(--sheen) 50%, transparent 62%), var(--mark-fill); /* taste-skill-ignore: the logo's own chrome finish (brand asset) */
  background-size: 260% 100%, 100% 100%; animation: sheen 1.5s linear infinite; }
@keyframes sheen { from { background-position: 130% 0, 0 0; } to { background-position: -30% 0, 0 0; } }

/* segmented control */
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--hover); padding: 3px; border-radius: 99px; }
.seg button { border: 0; background: none; border-radius: 99px; padding: 6px 12px; color: var(--muted); font-weight: 500; font-size: 13.5px; }
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); }

/* ============================ sign in */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-brand { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 36px 56px;
  background: #0d0e10; color: #eceef2;
  --mark-fill: linear-gradient(140deg, #fafafa 0%, #d2d2d2 34%, #8b8b8b 58%, #cfcfcf 80%, #f2f2f2 100%); } /* taste-skill-ignore: the logo's own chrome finish (brand asset) */
.brand-top { display: flex; align-items: center; gap: 10px; font: 700 19px/1 var(--display); letter-spacing: -.03em; }
.brand-inner { max-width: 520px; }
.brand-line { font: 700 clamp(38px, 4vw, 56px)/1 var(--display); letter-spacing: -.045em; margin: 0 0 18px; text-wrap: balance; }
.tagline { font-size: 17px; line-height: 1.5; color: #b9bfca; margin: 0 0 36px; max-width: 44ch; }
.brand-foot { font-size: 13px; color: #868d9a; margin: 0; }

/* the live demo: the real chat, playing a few requests on a loop */
.demo { background: #16181c; border-radius: 22px; padding: 22px; min-height: 250px; display: flex; flex-direction: column; gap: 16px; }
.demo-user { align-self: flex-end; max-width: 85%; background: #24272d; padding: 9px 15px; border-radius: 18px 18px 6px 18px; font-size: 14.5px; min-height: 40px; }
.demo-user:empty { visibility: hidden; }
.demo-bot { display: grid; grid-template-columns: 22px 1fr; gap: 12px; }
.demo-bot .mark { width: 16px; height: 23px; margin-top: 2px; }
.demo-body p { margin: 0 0 12px; font-size: 14.5px; color: #dfe2e8; min-height: 1.5em; }
.demo-file { display: flex; align-items: center; gap: 12px; background: #1e2126; border-radius: 14px; padding: 10px 12px; max-width: 340px; }
.demo-file .file-icon { width: 32px; height: 38px; font-size: 9px; padding-bottom: 5px; }
.demo-file b { display: block; font-size: 14px; font-weight: 600; }
.demo-file span { font-size: 12.5px; color: #a3aab6; }
.demo-file .pill { margin-left: auto; background: #eceef2; color: #0d0e10; border-radius: 99px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; }
.demo-chart { background: #fff; border-radius: 12px; padding: 14px 16px 10px; color: #111317; max-width: 380px; }
.demo-chart b { font-size: 13px; }
.demo-chart svg { display: block; width: 100%; height: 110px; margin-top: 6px; }
.demo-code { background: #0f1013; border-radius: 12px; padding: 12px 14px; font: 12.5px/1.6 var(--mono); color: #dfe2e8; max-width: 400px; white-space: pre; overflow: hidden; }
.demo-code .k { color: #c4a7ff; } .demo-code .s { color: #9fe0b4; } .demo-code .n { color: #ffc58f; }
.pop { animation: pop .5s var(--out) both; }
.fade-out { opacity: 0; transform: translateY(-6px); transition: opacity .35s, transform .35s; }

.auth-panel { display: grid; place-items: center; padding: 32px 24px; }
.auth-card { width: min(380px, 100%); animation: enter .6s var(--out) both; }
.mark-auth { width: 26px; height: 37px; display: none; margin-bottom: 20px; }
.auth h1 { font: 700 32px/1.1 var(--display); letter-spacing: -.035em; margin: 0 0 8px; }
.auth-sub { color: var(--muted); margin: 0 0 26px; }
.auth-tabs { display: grid; margin-bottom: 22px; }
.auth-tabs button { padding: 8px; font-size: 14.5px; }
#authForm { display: grid; gap: 16px; }
#authForm label { display: grid; gap: 7px; font-size: 14px; font-weight: 500; color: var(--text); }
#authForm input { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 12px; padding: 11px 14px; font-size: 15.5px; color: var(--text);
  transition: border-color .15s, box-shadow .2s var(--out); }
#authForm input:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 12%, transparent); } /* taste-skill-ignore: focus ring or a floating overlay */
#authForm .ink-btn { margin-top: 6px; padding: 13px; font-size: 15.5px; }
.auth-error { color: var(--danger); font-size: 14px; margin: 0; }
.auth-error:empty { display: none; }
.auth-error:not(:empty) { animation: nudge .4s var(--out); }
@keyframes nudge { 25% { transform: translateX(-5px); } 60% { transform: translateX(3px); } }
.auth-fine { font-size: 13px; color: var(--faint); margin-top: 24px; line-height: 1.55; }

/* ============================ layout */
.app { display: grid; grid-template-columns: 268px 1fr; height: 100dvh; transition: grid-template-columns .35s var(--out); }
.app.collapsed { grid-template-columns: 0 1fr; }
.app.collapsed .sidebar { visibility: hidden; }

/* ---------------- sidebar: an open plane, a tone step from the canvas */
.sidebar { background: var(--sidebar); display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 14px 10px 10px; overflow: hidden; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 16px 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 19px/1 var(--display); letter-spacing: -.03em; }
.mark-brand { width: 17px; height: 24px; }
.side-nav { display: grid; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 11px; border: 0; background: none; padding: 8px 10px; border-radius: 10px; color: var(--text); text-align: left; font-size: 14.5px; }
.nav-item svg { color: var(--muted); flex: none; }
.nav-item:hover { background: var(--hover); }
.nav-item.active { background: var(--active); }
.nav-item kbd { margin-left: auto; font: 12px var(--sans); color: var(--faint); }
.new-chat { font-weight: 600; }
.new-chat svg { color: var(--text); }
.search-box { padding: 6px 2px 2px; }
.search-box input { width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 10px; padding: 8px 12px; font-size: 14px; outline: none; }
.search-box input:focus { border-color: var(--text); }
.recents-head { font-size: 13px; color: var(--faint); padding: 22px 10px 6px; }
.recents { flex: 1; overflow-y: auto; min-height: 0; }
.recent { display: flex; align-items: center; border-radius: 10px; }
.recent:hover { background: var(--hover); }
.recent.active { background: var(--active); }
.recent.fresh { animation: slidein .5s var(--out); }
@keyframes slidein { from { opacity: 0; transform: translateX(-10px); } }
.recent .open { flex: 1; min-width: 0; border: 0; background: none; text-align: left; padding: 7px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; color: var(--text); }
.recent .files { color: var(--faint); padding-right: 2px; display: grid; }
.recent .del { border: 0; background: none; color: var(--faint); padding: 4px 9px; opacity: 0; font-size: 12px; }
.recent:hover .del, .recent.active .del { opacity: 1; }
.recent .del:hover { color: var(--danger); }
.recents .empty { color: var(--faint); font-size: 14px; padding: 6px 10px; }
.side-foot { position: relative; padding-top: 8px; }
.profile { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: none; border-radius: 12px; padding: 8px; text-align: left; }
.profile:hover { background: var(--hover); }
.avatar-initial { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.profile-text { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: baseline; white-space: nowrap; overflow: hidden; }
.profile-text b { font-weight: 550; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; }
.plan { color: var(--faint); font-size: 13px; }
.menu { position: absolute; bottom: calc(100% + 8px); left: 0; right: 0; background: var(--surface); border-radius: 16px; box-shadow: var(--float); padding: 6px; z-index: 20; /* taste-skill-ignore: focus ring or a floating overlay */
  transform-origin: bottom center; animation: pop .25s var(--out); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.97); } }
.menu > button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 10px; font-size: 14px; }
.menu > button:hover { background: var(--hover); }
.menu .danger { color: var(--danger); }
.menu-email { font-size: 13px; color: var(--muted); padding: 6px 10px 2px; overflow: hidden; text-overflow: ellipsis; }
.menu-usage { font-size: 13px; color: var(--muted); padding: 2px 10px 10px; font-variant-numeric: tabular-nums; }
.menu-label { font-size: 13px; color: var(--faint); padding: 8px 10px 6px; }
.theme-seg { display: grid; margin: 0 4px 8px; }
.meter { height: 6px; border-radius: 99px; background: var(--hover); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width .6s var(--out); }

/* ---------------- main */
.main { display: flex; flex-direction: column; min-width: 0; height: 100dvh; position: relative; background: var(--bg); }
.topbar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; min-height: 56px; }
.app:not(.collapsed) #openSide { visibility: hidden; }
.chat-title { flex: 1; font-size: 14.5px; font-weight: 550; margin: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { display: flex; align-items: center; gap: 7px; padding: 5px 12px 5px 10px; border-radius: 99px; background: var(--hover); font-size: 13px; color: var(--muted); }
.dot { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.dot.on { background: var(--ok); }
.dot.off { background: var(--danger); }
@keyframes breathe { 50% { opacity: .45; } }

/* home */
.home { flex: 1; overflow-y: auto; display: flex; }
.home-inner { width: min(760px, 100% - 40px); margin: auto; padding: 2vh 0 6vh; }
.hello { margin-bottom: 28px; text-align: center; }
.hello > * { animation: enter .7s var(--out) both; }
.hello > :nth-child(2) { animation-delay: .06s; } .hello > :nth-child(3) { animation-delay: .12s; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } }
.mark-greet { width: 30px; height: 42px; margin-bottom: 16px; }
.greeting { font: 700 clamp(34px, 4.4vw, 50px)/1.02 var(--display); letter-spacing: -.045em; margin: 0; text-wrap: balance; }
.greeting-sub { color: var(--muted); font-size: 17px; margin: 10px 0 0; }
.home .composer { min-height: 132px; }
.home-meta { display: flex; justify-content: space-between; align-items: center; padding: 10px 8px 0; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.model-chip { font-weight: 600; color: var(--text); }

/* suggestions: a plain two-column list, the icon bare beside the words */
.starters { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; margin-top: 28px; }
.try { display: flex; gap: 12px; align-items: flex-start; text-align: left; border: 0; background: none; border-radius: 12px; padding: 10px 12px; animation: enter .6s var(--out) both; }
.try:hover { background: var(--hover); }
.try svg { width: 18px; height: 18px; flex: none; margin-top: 2px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: stroke .15s, transform .3s var(--out); }
.try:hover svg { stroke: var(--text); transform: translateX(2px); }
.try b { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.try small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.4; margin-top: 1px; }

.creations { margin-top: 48px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; padding: 0 2px; }
.section-head h2 { font-size: 15px; font-weight: 600; margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.card { border: 0; background: var(--surface); border-radius: 16px; overflow: hidden; text-align: left; padding: 0; animation: enter .6s var(--out) both;
  transition: transform .35s var(--out), background-color .15s !important; }
.card:hover { transform: translateY(-3px); }
.card:active { transform: scale(.98) !important; }
.card .thumb { height: 128px; background: var(--hover); position: relative; overflow: hidden; display: grid; place-items: center; }
.card .thumb iframe { position: absolute; top: 0; left: 0; width: 400%; height: 400%; transform: scale(.25); transform-origin: 0 0; border: 0; pointer-events: none; background: #fff;
  transition: transform .6s var(--out); }
.card:hover .thumb iframe { transform: scale(.26); }
.card .thumb svg { max-width: 90%; max-height: 90%; }
.card .meta { padding: 11px 14px 13px; }
.card .meta b { display: block; font-weight: 550; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta span { font-size: 13px; color: var(--muted); }
.card .kind { position: absolute; top: 8px; left: 8px; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--surface); color: var(--muted); }
.library { flex: 1; overflow-y: auto; }
.library-inner { width: min(1000px, 100% - 40px); margin: 0 auto; padding: 18px 0 40px; }
.library h1 { font: 700 32px/1.1 var(--display); margin: 8px 0 6px; letter-spacing: -.035em; }
.library .sub { color: var(--muted); margin: 0 0 20px; }
.lib-filter { margin-bottom: 22px; }

/* thread */
.thread { flex: 1; overflow-y: auto; padding: 6px max(20px, calc((100% - 760px) / 2)) 28px; }
.msg { margin: 28px 0; }
.msg.user { display: flex; justify-content: flex-end; animation: rise .5s var(--out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.msg.user .bubble { background: var(--user); padding: 10px 16px; border-radius: 20px 20px 6px 20px; max-width: min(85%, 620px); white-space: pre-wrap; overflow-wrap: anywhere; transform-origin: bottom right; }
.msg.bot { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 14px; animation: fadein .4s ease-out both; }
@keyframes fadein { from { opacity: 0; } }
.msg.bot > .mark { width: 17px; height: 24px; margin: 3px 0 0 4px; }
.msg.bot .body { min-width: 0; }
.content { overflow-wrap: anywhere; }
.content > :first-child { margin-top: 0; } .content > :last-child { margin-bottom: 0; }
.content p { margin: 10px 0; }
.content h1, .content h2, .content h3 { line-height: 1.3; margin: 26px 0 8px; letter-spacing: -.01em; font-weight: 650; text-wrap: balance; }
.content h1 { font-size: 1.4em; } .content h2 { font-size: 1.2em; } .content h3 { font-size: 1.05em; }
.content ul, .content ol { padding-left: 24px; margin: 10px 0; } .content li { margin: 4px 0; }
.content li::marker { color: var(--faint); }
.content blockquote { margin: 12px 0; padding: 10px 16px; background: var(--hover); border-radius: 12px; color: var(--muted); }
.content table { border-collapse: collapse; margin: 14px 0; font-size: 14px; display: block; overflow-x: auto; font-variant-numeric: tabular-nums; }
.content th, .content td { border-bottom: 1px solid var(--line); padding: 8px 14px 8px 0; text-align: left; }
.content th { font-weight: 500; color: var(--muted); font-size: 13px; }
.content :not(pre) > code { background: var(--hover); padding: 1px 6px; border-radius: 6px; font: .86em var(--mono); }
.content a { color: var(--text); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.content a:hover { text-decoration-color: var(--text); }
.content hr { border: 0; height: 8px; margin: 18px 0; }
.cursor::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 5px; border-radius: 50%; background: var(--text); }
.thinking { display: flex; align-items: center; padding: 3px 0; font-size: 15px; }
.shimmer-text { color: var(--muted); animation: breathe 1.6s ease-in-out infinite; }
.note { font-size: 14px; color: var(--muted); }
.msg-actions { display: flex; gap: 2px; margin-top: 8px; margin-left: -8px; opacity: 0; transition: opacity .2s; }
.msg.bot:hover .msg-actions, .msg.bot:focus-within .msg-actions, .msg.bot.last .msg-actions { opacity: 1; }
.icon-x { width: 14px; height: 14px; display: block; }
.msg-actions button { border: 0; background: none; color: var(--muted); padding: 5px 9px; border-radius: 99px; font-size: 13px; }
.msg-actions button:hover { background: var(--hover); color: var(--text); }
.error-box { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); padding: 11px 15px; border-radius: 14px; font-size: 14.5px; margin-left: 40px; animation: rise .5s var(--out) both; }

/* code */
.code { border-radius: 14px; overflow: hidden; margin: 14px 0; background: var(--code-bg); border: 1px solid var(--line); }
.code-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px; font-size: 12.5px; color: var(--muted); background: var(--hover); }
.code-bar button { border: 0; background: none; color: var(--muted); font-size: 12.5px; padding: 3px 10px; border-radius: 99px; }
.code-bar button:hover { background: var(--active); color: var(--text); }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.code pre code { font: 13px/1.6 var(--mono); background: none !important; padding: 0 !important; color: var(--text); }
.hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-literal, .hljs-type, .hljs-meta .hljs-keyword { color: var(--hl-kw); }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-template-tag { color: var(--hl-str); }
.hljs-number, .hljs-symbol, .hljs-bullet, .hljs-variable.constant_ { color: var(--hl-num); }
.hljs-comment, .hljs-quote, .hljs-deletion, .hljs-meta { color: var(--hl-com); font-style: italic; }
.hljs-title, .hljs-title.function_, .hljs-section, .hljs-name { color: var(--hl-fn); }
.hljs-attr, .hljs-attribute, .hljs-property, .hljs-selector-class, .hljs-selector-id, .hljs-tag { color: var(--hl-attr); }

/* files */
.file-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px 12px 12px 14px; margin: 14px 0; max-width: 500px; animation: pop .5s var(--out) both; }
.file-icon { width: 40px; height: 48px; border-radius: 4px 12px 4px 4px; display: grid; place-items: end center; padding-bottom: 7px; font: 700 10px var(--sans); color: #fff; flex: none; letter-spacing: .03em; }
.file-meta { flex: 1; min-width: 0; }
.file-meta b { display: block; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.file-card .dl { padding: 8px 15px; font-size: 13.5px; }
.file-card .peek { border: 0; background: var(--hover); border-radius: 99px; padding: 8px 13px; font-size: 13.5px; color: var(--text); }
.file-card .peek:hover { background: var(--active); }
.file-card.working { border-style: dashed; animation: none; }

/* visuals */
.visual { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin: 14px 0; background: var(--surface); animation: pop .5s var(--out) both; }
.visual-bar { display: flex; align-items: center; gap: 4px; padding: 7px 8px; background: var(--hover); }
.visual-bar .seg { background: var(--active); }
.visual-bar .seg button { padding: 4px 12px; font-size: 13px; }
.visual-bar .spacer { flex: 1; }
.visual-bar .act { border: 0; background: none; padding: 5px 10px; border-radius: 99px; font-size: 13px; color: var(--muted); }
.visual-bar .act:hover { background: var(--active); color: var(--text); }
.visual iframe { display: block; width: 100%; height: 460px; border: 0; background: #fff; transition: height .5s var(--out); }
.visual .code { border: 0; border-radius: 0; margin: 0; max-height: 460px; overflow: auto; }
.svg-view { padding: 16px; display: grid; place-items: center; background: #fff; }
.svg-view svg { max-width: 100%; height: auto; }
.viewer { width: min(1200px, 96vw); height: 92vh; padding: 0; border: 0; border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--float); } /* taste-skill-ignore: focus ring or a floating overlay */
.viewer[open] { display: flex; flex-direction: column; animation: zoomin .45s var(--out); }
@keyframes zoomin { from { opacity: 0; transform: scale(.96); } }
.viewer::backdrop { background: rgb(5 6 9 / .55); }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 8px 18px; font-weight: 600; font-size: 14.5px; }
.viewer iframe { flex: 1; width: 100%; border: 0; background: #fff; }

/* composer */
.dock { padding: 4px max(20px, calc((100% - 760px) / 2)) max(12px, env(safe-area-inset-bottom)); }
.dock-fine { text-align: center; font-size: 12.5px; color: var(--faint); margin: 8px 0 0; }
.composer { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 24px; padding: 14px 12px 10px 18px; display: flex; flex-direction: column;
  transition: border-color .2s, box-shadow .3s var(--out); view-transition-name: composer; }
.composer:focus-within { border-color: color-mix(in srgb, var(--text) 40%, var(--line-strong)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 6%, transparent); } /* taste-skill-ignore: focus ring or a floating overlay */
#input { flex: 1; width: 100%; border: 0; outline: none; resize: none; background: none; max-height: 260px; padding: 2px 0 10px; line-height: 1.5; font-size: 16px; }
#input::placeholder { color: var(--faint); transition: opacity .2s; }
.composer-row { display: flex; align-items: center; gap: 8px; }
.modes { display: flex; gap: 2px; margin-right: auto; margin-left: -8px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.mode { display: flex; align-items: center; gap: 6px; border: 0; background: none; border-radius: 99px; padding: 6px 11px; font-size: 13.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.mode svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mode:hover { background: var(--hover); color: var(--text); }
.mode[aria-checked="true"] { background: var(--ink); color: var(--on-ink); }
.counter { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.counter.warn { color: var(--danger); }
.send { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; flex: none; }
.send:hover:not(:disabled) { opacity: .86; }
.send:disabled { opacity: .22; cursor: default; }
.send svg { transition: transform .35s var(--out); }
.send:hover:not(:disabled) svg { transform: translateY(-2px); }

/* view transitions: the composer glides between the home screen and the bottom dock */
::view-transition-group(composer) { animation-duration: .55s; animation-timing-function: var(--out); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }
html.theme-swap::view-transition-old(root), html.theme-swap::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.theme-swap::view-transition-group(composer) { animation: none; }

.scrim { position: fixed; inset: 0; background: rgb(0 0 0 / .4); z-index: 9; animation: fadein .25s; }
@media (max-width: 1000px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .mark-auth { display: block; }
}
@media (max-width: 860px) {
  .app, .app.collapsed { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 86vw; max-width: 310px; z-index: 10; transform: translateX(-102%); transition: transform .4s var(--out); visibility: visible !important; }
  body.side-open .sidebar { transform: none; box-shadow: var(--float); } /* taste-skill-ignore: focus ring or a floating overlay */
  #openSide { visibility: visible !important; }
  #collapse { display: none; }
  .nav-item kbd { display: none; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .starters { grid-template-columns: 1fr; }
  .try:nth-child(n+5) { display: none; }
  .status-text { display: none; }
  .status { padding: 8px; background: none; }
  .msg.bot { grid-template-columns: 1fr; gap: 6px; }
  .error-box { margin-left: 0; }
}
@media (max-width: 480px) {
  .mode span { display: none; }
  .mode[aria-checked="true"] span { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
