@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@500;600;700&family=Inter:wght@400;500;600&family=Geist+Mono:wght@400;500&display=swap');
/* Visual layer, loaded last. Presentation only: no markup, copy or script changes.
 * Direction, after the supplied "Pulse" fintech reference: an airy grey canvas with one large white panel inset inside it,
 * black pills for primary actions and the selected tab, big medium-weight grotesk headlines followed by a quieter grey line,
 * tonal rounded cards, and frosted violet / blue / coral gradients kept for a few data-like moments. Motion is limited to press
 * and hover feedback: specific properties, a strong ease-out, hover only on devices that hover. */

:root {
  --font-display: "Inter Tight", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-code: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --color-ink: #0b0b0d; --color-ink-2: #3d3d44; --color-muted: #6a6a73;
  --color-paper: #ececef; --color-paper-2: #f4f4f6; --color-paper-3: #e7e7eb; --color-rule: #e3e3e8; --color-control-rule: #8d8d97;
  --color-surface: #ffffff;
  --color-accent: #0b0b0d; --color-accent-hover: #2a2a30; --color-accent-press: #000000; --color-accent-soft: #efeafe; --color-accent-ink: #ffffff; --color-focus: #6a45e0;
  --color-violet: #7b5cf0; --color-violet-ink: #4b2fc0; --color-blue: #5f86f0; --color-coral: #ff5f6d;
  --color-success: #12724a; --color-success-soft: #dcf5e8; --color-error: #d23b46; --color-warn: #8f4a00; --color-warn-soft: #fdeccf;

  --radius-input: 14px; --radius-card: 24px; --radius-lg: 28px; --radius-pill: 999px;
  --sidebar-width: 260px;
  --frame: 12px;
  --ring: 0 0 0 1px rgb(11 11 13 / .09);
  --shadow-1: 0 1px 2px rgb(11 11 13 / .04), 0 8px 24px -14px rgb(11 11 13 / .12);
  --shadow-2: 0 2px 6px rgb(11 11 13 / .05), 0 18px 40px -18px rgb(11 11 13 / .22);
  --shadow-pop: 0 24px 70px -20px rgb(11 11 13 / .45), 0 0 0 1px rgb(11 11 13 / .06);
  --focus-ring: 0 0 0 3px #fff, 0 0 0 5px #6a45e0;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}

/* ---------- Canvas: grey ground, one white panel ---------- */
body { background: var(--color-paper); font-family: var(--font-body); letter-spacing: -.006em; -webkit-tap-highlight-color: transparent; }
::selection { background: rgb(123 92 240 / .22); }
html { scrollbar-color: #bdbdc6 transparent; }
main {
  margin: var(--frame) var(--frame) var(--frame) var(--sidebar-width); min-height: calc(100dvh - 2 * var(--frame));
  background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); overflow: clip;
}
aside { background: transparent; border-right: 0; box-shadow: none; padding: var(--space-lg) var(--space-md) var(--space-md); }
header {
  position: sticky; top: 0; z-index: var(--z-sticky); min-height: 68px; border-bottom: 0; background: rgb(255 255 255 / .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
}
#breadcrumb { color: var(--color-muted); font-weight: 500; }
.save-state { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--radius-pill); background: var(--color-paper-2); color: var(--color-ink-2); font-weight: 500; }
#content { padding-top: var(--space-lg); padding-bottom: var(--space-2xl); }
footer { color: var(--color-muted); }

/* ---------- Type ---------- */
h1, .page-top h1, .auth-card h1 {
  font-family: var(--font-display); font-weight: 500; letter-spacing: -.04em; line-height: 1.04; color: var(--color-ink);
  font-size: clamp(2.1rem, 1.4rem + 2.2vw, 3.25rem); max-width: 20ch;
}
h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.025em; color: var(--color-ink); }
h2 .pill, h2 .section-count, h3 .pill { font-family: var(--font-body); letter-spacing: 0; font-weight: 600; }
h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; color: var(--color-ink); }
.page-top p { color: #8a8a94; font-size: 1.1875rem; line-height: 1.4; letter-spacing: -.02em; margin-top: var(--space-md); max-width: 46ch; }
.eyebrow, .section-kicker, .map-label { font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--color-muted); }
.map-label > span:last-child { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: .75rem; }
.page-top h1 { margin-top: var(--space-sm); }
.muted, .small, .source, .stat-label, .stat-foot { color: var(--color-muted); }
code, pre, .connect-pre, #connectDialog input[readonly] { font-family: var(--font-code); }
.num, .stat-value, .progress-summary, nav b, .tabs b, .summary-chips > span { font-variant-numeric: tabular-nums; }

/* ---------- Controls: black pills ---------- */
button {
  min-height: 40px; padding: 8px 18px; border: 0; border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-ink);
  font-weight: 500; font-size: .875rem; letter-spacing: -.01em; box-shadow: 0 0 0 1px rgb(11 11 13 / .12);
  transition: transform 140ms var(--ease-out), background-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out), color 140ms var(--ease-out);
  touch-action: manipulation;
}
button:active { transform: scale(.97); background: var(--color-paper-2); }
button.primary { background: var(--color-ink); color: #fff; font-weight: 500; box-shadow: none; }
button.primary:active { background: #000; transform: scale(.97); }
button:disabled, button[aria-disabled="true"] { opacity: .45; transform: none; box-shadow: 0 0 0 1px rgb(11 11 13 / .1); background: var(--color-paper-2); }
button.primary:disabled { background: var(--color-ink); box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  button:hover { background: var(--color-paper-2); box-shadow: 0 0 0 1px rgb(11 11 13 / .2); }
  button.primary:hover { background: #2a2a30; box-shadow: none; }
  button:disabled:hover { background: var(--color-paper-2); box-shadow: 0 0 0 1px rgb(11 11 13 / .1); }
  button.primary:disabled:hover { background: var(--color-ink); }
}
@media (pointer: coarse) { button { min-height: 44px; } }
.text-button { background: transparent; box-shadow: none; color: var(--color-ink); font-weight: 600; padding-inline: 10px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgb(11 11 13 / .3); }
.text-button:active { background: var(--color-paper-2); }
@media (hover: hover) and (pointer: fine) { .text-button:hover { background: var(--color-paper-2); box-shadow: none; text-decoration-color: currentColor; } }
.danger { color: var(--color-error); }
button:focus-visible, a:focus-visible { outline: none; box-shadow: var(--focus-ring); }
input, textarea, select {
  min-height: 44px; border: 0; border-radius: var(--radius-input); background: var(--color-surface); font-size: 1rem; color: var(--color-ink);
  box-shadow: 0 0 0 1px var(--color-control-rule); transition: box-shadow 140ms var(--ease-out);
}
textarea { border-radius: 18px; }
@media (hover: hover) and (pointer: fine) { input:hover, textarea:hover, select:hover { box-shadow: 0 0 0 1px #5d5d67; } }
input:focus, textarea:focus, select:focus, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--color-ink), 0 0 0 5px rgb(123 92 240 / .28); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; padding: 0; flex-shrink: 0; box-shadow: none; accent-color: var(--color-ink); cursor: pointer; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { box-shadow: var(--focus-ring); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { box-shadow: 0 0 0 1px var(--color-error), 0 0 0 4px rgb(210 59 70 / .14); }
input::placeholder, textarea::placeholder { color: #85858f; }
label { font-weight: 500; font-size: .8125rem; color: var(--color-ink); margin-top: var(--space-md); }
a { color: var(--color-violet-ink); }

/* ---------- Sidebar: grey, with a black pill for where you are ---------- */
aside .brand { color: var(--color-ink); padding: var(--space-xs) var(--space-xs) var(--space-sm); font-family: var(--font-display); font-weight: 600; letter-spacing: -.04em; }
aside .logo, aside .logo svg { color: var(--color-ink); }
aside .brand-name > span { color: var(--color-muted); font-weight: 500; letter-spacing: 0; font-family: var(--font-body); }
aside .workspace-label { color: var(--color-muted); font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; margin-top: var(--space-md); }
aside select { background-color: var(--color-surface); font-weight: 500; font-size: .875rem; border-radius: var(--radius-pill); padding-inline: 16px; box-shadow: none; }
aside select:focus { box-shadow: 0 0 0 2px var(--color-ink); }
aside .new-company { background: transparent; box-shadow: none; color: var(--color-ink-2); font-weight: 500; min-height: 34px; justify-content: flex-start; }
@media (hover: hover) and (pointer: fine) { aside .new-company:hover { background: rgb(11 11 13 / .06); box-shadow: none; } }
aside nav { gap: 2px; margin-block: var(--space-sm); }
aside nav button { min-height: 42px; background: transparent; box-shadow: none; color: var(--color-ink-2); font-weight: 500; border-radius: var(--radius-pill); justify-content: flex-start; gap: 10px; padding: 8px 14px; }
@media (hover: hover) and (pointer: fine) { aside nav button:hover { background: rgb(11 11 13 / .06); box-shadow: none; color: var(--color-ink); } }
aside nav button:active { background: rgb(11 11 13 / .1); }
aside nav button.active { background: var(--color-ink); color: #fff; box-shadow: none; }
aside nav button.active .ui-icon { color: #fff; }
aside nav b { background: var(--color-surface); color: var(--color-ink-2); border-radius: var(--radius-pill); padding: 1px 9px; font-weight: 600; }
aside nav button.active b { background: rgb(255 255 255 / .2); color: #fff; }
aside .sidebar-bottom { border-top: 0; }
aside .sidebar-bottom button, aside #cloudAccount, aside #connectTools { background: var(--color-surface); box-shadow: none; font-weight: 500; }
@media (hover: hover) and (pointer: fine) { aside .sidebar-bottom button:hover, aside #cloudAccount:hover, aside #connectTools:hover { background: #fff; box-shadow: 0 0 0 1px rgb(11 11 13 / .2); } }
aside .local-dot { display: flex; align-items: center; gap: 8px; }

/* ---------- Surfaces: tonal, rounded, no borders ---------- */
.card { background: var(--color-paper-2); border: 0; border-radius: var(--radius-card); box-shadow: none; padding: var(--space-lg); }
.card .card { background: transparent; box-shadow: none; }
.card-head { border-bottom: 1px solid var(--color-rule); }
.card.layer-item, .card.suggestion, .card.motion { transition: background-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .card.layer-item:hover, .card.suggestion:hover, .card.motion:hover { background: #f0f0f3; box-shadow: var(--shadow-1); } }
.pill { border-radius: var(--radius-pill); padding: 3px 10px; background: var(--color-surface); color: var(--color-ink-2); font-weight: 600; font-size: .6875rem; box-shadow: 0 0 0 1px rgb(11 11 13 / .08); }
.hint { background: var(--color-surface); color: var(--color-ink-2); border-radius: 18px; box-shadow: 0 0 0 1px rgb(11 11 13 / .08); }
.empty { background: var(--color-paper-2); border-radius: var(--radius-card); text-align: center; padding: var(--space-xl) var(--space-lg); }
.empty .symbol { color: var(--color-violet); }
.avatar { background: var(--color-surface); color: var(--color-ink); border-radius: 14px; font-weight: 600; box-shadow: 0 0 0 1px rgb(11 11 13 / .08); }
.activity-item { border-bottom-color: var(--color-rule); }
.layer-item.off { background: transparent; box-shadow: inset 0 0 0 1px var(--color-rule); }

/* ---------- Tabs: grey pills, the selected one black ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; overflow: visible; margin-bottom: var(--space-lg); background: none; border: 0; box-shadow: none; }
.tab-gap { flex-basis: 100%; height: 0; }
.tabs button { min-height: 36px; padding: 6px 14px; border-radius: var(--radius-pill); background: var(--color-paper-2); box-shadow: none; color: var(--color-ink-2); font-weight: 500; font-size: .8125rem; }
@media (hover: hover) and (pointer: fine) { .tabs button:hover { background: var(--color-paper-3); box-shadow: none; color: var(--color-ink); } }
.tabs button:active { background: var(--color-paper-3); }
.tabs button.active { background: var(--color-ink); color: #fff; font-weight: 500; box-shadow: none; }
.tabs b { background: var(--color-surface); color: var(--color-ink-2); border-radius: var(--radius-pill); padding: 0 7px; font-weight: 600; font-size: .6875rem; margin-left: 6px; }
.tabs button.active b { background: rgb(255 255 255 / .22); color: #fff; }
.tabs button.alert b { background: var(--color-warn-soft); color: var(--color-warn); }
.tabs button.alert { box-shadow: none; }

/* ---------- Overview ---------- */
.library-summary { background: var(--color-paper-2); border-radius: var(--radius-lg); box-shadow: none; padding: var(--space-xl); gap: var(--space-xl); border-bottom: 0; }
.company-monogram { width: 56px; height: 56px; border: 0; border-radius: 18px; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: #fff; background: linear-gradient(140deg, #5b3fe0, #9b7df5); box-shadow: 0 10px 22px -10px rgb(91 63 224 / .7), inset 0 1px 0 rgb(255 255 255 / .35); }
.company-description h2 { font-size: 1.625rem; font-weight: 500; letter-spacing: -.035em; }
.summary-chips > span { font-weight: 600; font-size: .75rem; padding: 5px 12px; color: var(--color-ink); box-shadow: inset 0 1px 0 rgb(255 255 255 / .6); }
.summary-chips > span:nth-child(1) { background: linear-gradient(135deg, #9db8ff, #cddcff); }
.summary-chips > span:nth-child(2) { background: linear-gradient(135deg, #ff9d9d, #ffc6b6); }
.summary-chips > span:nth-child(3) { background: linear-gradient(135deg, #b39cff, #dcd1ff); }
.map-node { border-radius: var(--radius-pill); background: var(--color-surface); box-shadow: none; border: 0; }
.map-node.complete { background: var(--color-ink); color: #fff; font-weight: 500; }
.library-progress {
  position: relative; overflow: hidden; color: #fff; border-radius: var(--radius-lg); padding: var(--space-xl); box-shadow: 0 24px 50px -28px rgb(91 63 224 / .8);
  background: radial-gradient(480px 260px at 100% 0%, rgb(255 255 255 / .28), transparent 62%), radial-gradient(420px 280px at 0% 120%, rgb(255 95 109 / .4), transparent 65%), linear-gradient(125deg, #5b3fe0 0%, #7f62ef 50%, #a78bfa 100%);
}
.library-progress::after {
  content: ""; position: absolute; right: 260px; bottom: 0; width: 30%; height: 72%; pointer-events: none; opacity: .4;
  background: radial-gradient(circle, rgb(255 255 255 / .8) 1.8px, transparent 2.4px) 0 0 / 10px 10px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0 4%, #000 4% 7%, transparent 7% 12%, #000 12% 15%, transparent 15% 20%, #000 20% 24%, transparent 24% 29%, #000 29% 33%, transparent 33% 38%, #000 38% 43%, transparent 43% 48%, #000 48% 52%, transparent 52% 58%, #000 58% 62%, transparent 62% 68%, #000 68% 72%, transparent 72% 78%, #000 78% 83%, transparent 83%);
  mask-image: linear-gradient(90deg, transparent 0 4%, #000 4% 7%, transparent 7% 12%, #000 12% 15%, transparent 15% 20%, #000 20% 24%, transparent 24% 29%, #000 29% 33%, transparent 33% 38%, #000 38% 43%, transparent 43% 48%, #000 48% 52%, transparent 52% 58%, #000 58% 62%, transparent 62% 68%, #000 68% 72%, transparent 72% 78%, #000 78% 83%, transparent 83%);
}
.library-progress > * { position: relative; z-index: 1; }
.library-progress h2 { color: #fff; font-size: 1.25rem; font-weight: 500; letter-spacing: -.03em; }
.library-progress p { color: rgb(255 255 255 / .8); }
.library-progress .pill { background: rgb(255 255 255 / .2); color: #fff; box-shadow: none; }
.progress-symbol { color: #fff; }
.progress-summary { color: #fff; font-weight: 600; }
.library-progress .progress { background: rgb(255 255 255 / .3); height: 6px; border-radius: var(--radius-pill); }
.library-progress .progress i { background: #fff; border-radius: var(--radius-pill); }
.section-heading h2 { font-size: 1.375rem; font-weight: 500; letter-spacing: -.03em; }
.context-cards { background: var(--color-paper-2); border: 0; border-radius: var(--radius-lg); box-shadow: none; overflow: hidden; padding: 8px; gap: 2px; }
.context-card { padding: var(--space-md) var(--space-md); border: 0; border-radius: 18px; transition: background-color 140ms var(--ease-out); box-shadow: none; transform: none; }
@media (hover: hover) and (pointer: fine) { .context-card:hover { background: var(--color-surface); box-shadow: 0 1px 2px rgb(11 11 13 / .04); } }
.context-card:active { transform: none; background: #fff; }
.context-card-content > strong { font-family: var(--font-display); font-weight: 600; letter-spacing: -.025em; }
.context-state { display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--color-surface); font-weight: 600; font-size: .6875rem; color: var(--color-ink-2); box-shadow: 0 0 0 1px rgb(11 11 13 / .08); }
.context-state.is-added { background: var(--color-success-soft); color: var(--color-success); box-shadow: none; }
.context-card-bottom { font-weight: 600; color: var(--color-ink); }
.next-step, .hero-note { background: linear-gradient(135deg, #efeafe, #e3ecff); border-radius: var(--radius-card); box-shadow: none; }

/* ---------- Layers, agents, motions, suggestions ---------- */
.link-picker { background: var(--color-surface); border-radius: 18px; box-shadow: 0 0 0 1px rgb(11 11 13 / .08); border: 0; }
.layer-field b, .link-group strong, .link-group legend strong { color: var(--color-muted); letter-spacing: .08em; font-size: .6875rem; }
.link-chips .pill, .source .pill { background: var(--color-surface); color: var(--color-ink-2); }
.evidence-quote { margin: var(--space-sm) 0; padding: var(--space-sm) var(--space-md); background: var(--color-surface); border: 0; border-left: 3px solid var(--color-violet); border-radius: 0 14px 14px 0; color: var(--color-ink-2); font-size: .9375rem; line-height: 1.55; }
.suggestion.decided, .revision { background: transparent; box-shadow: inset 0 0 0 1px var(--color-rule); }
.pill.stale { background: var(--color-warn-soft); color: var(--color-warn); box-shadow: none; }
.pill.muted-pill { background: var(--color-paper-3); color: var(--color-muted); box-shadow: none; }
.agent-panel { background: var(--color-paper-2); box-shadow: 0 0 0 1px rgb(123 92 240 / .35), var(--shadow-1); }
.agent-email { background: var(--color-surface); box-shadow: none; }
.agent-list li::marker { color: var(--color-violet); }
.motion-grid-wrap { border-radius: 20px; background: var(--color-surface); box-shadow: 0 0 0 1px rgb(11 11 13 / .08); }
.motion-grid { border-collapse: separate; border-spacing: 0; }
.motion-grid th, .motion-grid td { border: 0; border-bottom: 1px solid var(--color-rule); border-right: 1px solid var(--color-rule); padding: 12px 14px; }
.motion-grid tr > :last-child { border-right: 0; } .motion-grid tbody tr:last-child > * { border-bottom: 0; }
.motion-grid thead th, .motion-grid tbody th { background: var(--color-paper-2); font-weight: 600; color: var(--color-ink-2); font-size: .75rem; }
@media (hover: hover) and (pointer: fine) { .motion-grid td:hover { background: #f6f3ff; } }

/* ---------- Dialogs, toast ---------- */
dialog { border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); padding: var(--space-xl); }
dialog::backdrop { background: rgb(11 11 13 / .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog h2 { font-size: 1.625rem; font-weight: 500; letter-spacing: -.03em; }
#toast { background: var(--color-ink); color: #fff; border-radius: var(--radius-pill); box-shadow: var(--shadow-pop); font-weight: 500; font-size: .875rem; padding: 12px 24px; }
.connect-token { background: var(--color-paper-2); border-radius: 18px; box-shadow: none; }
.connect-pre { background: var(--color-ink); color: #eaeaf0; border: 0; border-radius: 14px; }

/* ---------- Sign in ---------- */
body.auth-locked { background: var(--color-paper); }
.auth-gate { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); place-items: stretch; padding: var(--frame); gap: var(--frame); min-height: 100dvh; background: var(--color-paper); }
.auth-gate > .auth-card { grid-column: 1; grid-row: 1; align-self: center; justify-self: center; width: min(100% - 40px, 400px); margin: var(--space-xl) 0; background: transparent; border: 0; box-shadow: none; padding: 0; }
.auth-gate::before { content: ""; grid-column: 2; grid-row: 1; border-radius: var(--radius-lg); background: #ebe9f2 url("auth-art.svg?v=1") center / cover no-repeat; box-shadow: var(--shadow-1); }
.auth-card .eyebrow, .auth-card > p:first-child { color: var(--color-muted); }
.auth-card h1 { margin-top: var(--space-md); font-size: clamp(2.1rem, 1.6rem + 1.4vw, 2.75rem); }
.auth-card p { color: #8a8a94; }
.auth-card form > .primary, #googleSignIn { min-height: 48px; font-size: .9375rem; }
.auth-links a, .auth-links button { font-weight: 500; color: var(--color-ink); }

/* ---------- Overview: compact ---------- */
.page-top { margin-bottom: var(--space-lg); }
.library-summary { padding: var(--space-lg); gap: var(--space-lg); margin-bottom: var(--space-md); }
.company-description h2 { margin: 2px 0 6px; }
.company-description > p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: clip; }
.summary-chips { margin-top: var(--space-sm); }
.context-map .map-branches { margin-top: var(--space-sm); }
.library-progress { padding: var(--space-md) var(--space-lg); margin-bottom: var(--space-lg); }
.section-heading { margin-bottom: var(--space-sm); }
.context-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 6px; }
.context-card { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "content top" "content bottom"; align-items: start; gap: 2px 20px; padding: 14px 16px; background: var(--color-surface); border-radius: 16px; }
.context-card-top { grid-area: top; padding: 0; justify-self: end; }
.context-card-top .category-icon { display: none; }
.context-card-content { grid-area: content; }
.context-card-bottom { grid-area: bottom; justify-self: end; align-self: end; padding: 0; }
.category-copy { -webkit-line-clamp: 2; font-size: .8125rem; line-height: 1.5; }
.workspace-bottom { margin-top: var(--space-lg); gap: var(--space-lg); }
@media (hover: hover) and (pointer: fine) { .context-card:hover { background: #fff; box-shadow: var(--shadow-1); } }
@media (max-width: 1100px) { .context-cards { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Narrow screens ---------- */
@media (max-width: 960px) {
  :root { --frame: 8px; }
  main { margin: 0 var(--frame) var(--frame); min-height: 0; border-radius: 24px; }
  aside { padding: var(--space-md); }
  header { position: static; }
  .library-summary, .library-progress { padding: var(--space-lg); }
  .auth-gate { grid-template-columns: minmax(0, 1fr); grid-template-rows: 190px auto; }
  .auth-gate::before { grid-column: 1; grid-row: 1; }
  .auth-gate > .auth-card { grid-column: 1; grid-row: 2; margin: var(--space-lg) 0 var(--space-2xl); }
}
@media (max-width: 700px) { .library-progress::after { display: none; } }
@media (max-width: 480px) { .company-description h2 { font-size: 1.375rem; } dialog { padding: var(--space-lg); } }
@media (prefers-reduced-motion: reduce) { button, .card, .context-card, input, textarea, select { transition: none !important; } button:active { transform: none; } }
