/* Client portal. Tokens copied from the website (frontend/styles.css :root) so it reads as the same brand. */
:root {
  --bg: #fbfcf8;
  --bg-2: #f1f2ed;
  --bg-3: #e7e9e2;
  --line: rgba(15, 15, 15, 0.1);
  --line-strong: rgba(15, 15, 15, 0.18);
  --text: #0f0f0f;
  --muted: #62645f;
  --orange: #ff6a00;
  --orange-2: #ff8a2a;
  --orange-dark: #c24e00;
  --radius: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Poppins", system-ui, sans-serif;
  --side-w: 264px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; color: var(--text); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 520px at 100% -8%, rgba(255, 106, 0, .09), transparent 62%),
    radial-gradient(700px 480px at -10% 110%, rgba(255, 138, 42, .06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
h1, h2, p, ol, ul, dl, dd, fieldset { margin: 0; }
fieldset { padding: 0; border: 0; }
a { color: inherit; text-underline-offset: 3px; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--orange); color: #fff; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 8px; }
.label { color: var(--muted); font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- buttons & fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 26px; border: 1.5px solid var(--orange); border-radius: 999px; background: transparent; color: var(--orange); font: 500 15px var(--font); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .25s, color .25s, border-color .25s, transform .3s var(--ease), box-shadow .3s var(--ease); }
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: scale(.97); }
.btn--solid { background: var(--orange); color: #fff; box-shadow: 0 10px 22px -12px rgba(255, 106, 0, .8); }
.btn--solid:hover { background: var(--orange-dark); border-color: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgba(255, 106, 0, .9); }
.btn--solid:disabled { opacity: .6; cursor: default; transform: none; }
.btn--small { height: 40px; padding: 0 18px; font-size: 14px; }
.btn--small:hover, .btn--ghost:hover { background: var(--orange); color: #fff; }
.btn--ghost { border-color: var(--line-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--orange); }
.btn.is-busy { pointer-events: none; opacity: .7; }
.btn:has(input:focus-visible) { outline: 2px solid var(--orange); outline-offset: 3px; }

.field { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.field input, .field textarea { padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: #fff; color: var(--text); font: 400 15px/1.5 var(--font); transition: border-color .2s, box-shadow .2s; }
.field input { height: 50px; padding-block: 0; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 106, 0, .15); }
.form-error { min-height: 1.5em; color: var(--orange-dark); font-size: 13px; font-weight: 500; }
.form-error:empty { min-height: 0; }

/* ---------- sign in ---------- */
.login { display: grid; place-items: center; min-height: 100dvh; padding: 24px 16px; }
.login__card { display: grid; gap: 16px; width: min(400px, 100%); padding: 36px 32px 28px; border: 1px solid var(--line); border-radius: 28px; background: #fff; box-shadow: 0 30px 60px rgba(15, 15, 15, .06); }
.login__logo { width: min(240px, 80%); height: auto; margin-bottom: 8px; }
.login__title { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.login__sub { margin-top: -8px; margin-bottom: 8px; color: var(--muted); }
.login__help { color: var(--muted); font-size: 13px; text-align: center; text-wrap: pretty; }
.login__help:last-child { margin-bottom: 0; }

/* ---------- layout: sidebar left, content right ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; }

.side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 28px; height: 100dvh; padding: 30px 18px 22px; border-right: 1px solid var(--line); background: rgba(255, 255, 255, .55); backdrop-filter: blur(12px) saturate(1.3); -webkit-backdrop-filter: blur(12px) saturate(1.3); }
.side__top { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.side__logo { width: 168px; height: auto; }
.side__who { display: grid; gap: 2px; padding: 0 8px; }
.side__who strong { font-weight: 600; letter-spacing: -0.01em; }
.side__who span { color: var(--muted); font-size: 13px; }
.side__project { display: grid; gap: 6px; padding: 0 8px; }
.side__project select { height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; font: 500 14px var(--font); color: var(--text); }

.side__nav { position: relative; display: grid; gap: 4px; }
.side__nav button { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 14px; border: 0; border-radius: 14px; background: none; color: var(--muted); font: 500 14.5px var(--font); text-align: left; cursor: pointer; transition: color .35s var(--ease); }
.side__nav button:hover { color: var(--text); }
.side__nav button[aria-current="page"] { color: #fff; }
.side__nav .count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 11.5px; font-weight: 600; text-align: center; }
.side__nav .count:empty { display: none; }
/* the black pill slides to the active section */
.side__indicator { position: absolute; top: 0; left: 0; z-index: 0; border-radius: 14px; background: var(--text); box-shadow: 0 10px 24px -14px rgba(15, 15, 15, .7); transition: transform .5s var(--ease), width .5s var(--ease), height .5s var(--ease); }

.side__out { display: flex; align-items: center; gap: 12px; height: 44px; margin-top: auto; padding: 0 14px; border: 0; border-radius: 14px; background: none; color: var(--muted); font: 500 14px var(--font); cursor: pointer; transition: background-color .25s, color .25s; }
.side__out:hover { background: var(--bg-2); color: var(--text); }
.side__out--mobile { display: none; }

.content { width: 100%; max-width: 1080px; padding: 52px clamp(20px, 4vw, 56px) 96px; }
.panel { display: grid; gap: 20px; }
.panel__head { display: grid; gap: 6px; margin-bottom: 8px; }
.panel__head--row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; }
.panel__head--row > div { display: grid; gap: 6px; }
.panel__title { font-size: clamp(32px, 4.4vw, 52px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.04; text-wrap: balance; outline: none; }
.hello { color: var(--muted); font-size: 16px; }

.card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .85); box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 18px 40px -30px rgba(15, 15, 15, .35); }
.card__title { margin-bottom: 14px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }

/* ---------- progress: bar with a flowing gradient ---------- */
.progress__meta { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.progress__meta strong { font-size: 15px; font-weight: 600; color: var(--orange-dark); }
.progress { position: relative; height: 12px; border-radius: 999px; background: var(--bg-2); box-shadow: inset 0 1px 2px rgba(15, 15, 15, .08); overflow: hidden; }
.progress__fill {
  position: relative; width: 0; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #ff6a00 0%, #ffb066 22%, #ff6a00 45%, #ff8a2a 70%, #ffb066 85%, #ff6a00 100%);
  background-size: 200% 100%;
  box-shadow: 0 0 18px rgba(255, 106, 0, .45);
  animation: flow 3.2s linear infinite;
  transition: width 1.2s var(--ease);
}
/* a soft light that sweeps along the filled part */
.progress__fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); width: 40%; animation: sheen 2.6s var(--ease) infinite; }
@keyframes flow { to { background-position: -200% 0; } }
@keyframes sheen { from { transform: translateX(-120%); } to { transform: translateX(320%); } }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; padding: 0; list-style: none; }
.steps li { position: relative; padding-top: 10px; color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1.3; transition: color .4s; }
.steps li::before { content: ""; position: absolute; top: 0; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--bg-3); transition: background-color .4s, transform .4s var(--ease); }
.steps li.is-done { color: var(--text); }
.steps li.is-done::before { background: var(--text); }
.steps li.is-now { color: var(--orange-dark); font-weight: 600; }
.steps li.is-now::before { background: var(--orange); transform: scale(1.4); box-shadow: 0 0 0 4px rgba(255, 106, 0, .18); }

.dates { display: flex; flex-wrap: wrap; gap: 12px 36px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.dates dt { color: var(--muted); font-size: 12px; }
.dates dd { font-weight: 500; }
.notes__text { margin-top: 8px; max-width: 68ch; white-space: pre-line; text-wrap: pretty; }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; }
.tile { display: grid; align-content: start; gap: 8px; min-height: 150px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .85); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s; }
.tile strong { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.tile:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 24px 40px -28px rgba(15, 15, 15, .45); }
.tile:active { transform: translateY(-1px) scale(.99); }
.tile--feature { position: relative; overflow: hidden; background: #0f0f0f; border-color: #0f0f0f; color: #fff; }
.tile--feature .label { color: rgba(255, 255, 255, .6); }
.tile--feature::before { content: ""; position: absolute; inset: auto -30% -60% auto; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 106, 0, .55), transparent 65%); transition: transform .8s var(--ease); pointer-events: none; }
.tile--feature:hover::before { transform: translate(-12%, -10%) scale(1.15); }
.tile__cta { position: relative; display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; color: var(--orange-2); font-size: 14px; font-weight: 500; }
.tile__cta svg { width: 18px; height: 18px; transition: transform .45s var(--ease); }
.tile--feature:hover .tile__cta svg { transform: translateX(5px); }

/* ---------- presentation ---------- */
.viewer { overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: #0f0f0f; box-shadow: 0 30px 60px -30px rgba(15, 15, 15, .45); }
.viewer:has(.empty) { background: transparent; border-style: dashed; border-color: var(--line-strong); box-shadow: none; }
.viewer__frame { display: block; width: 100%; height: min(72vh, 760px); border: 0; background: #fff; }
.viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 20px; color: rgba(255, 255, 255, .75); font-size: 13px; }
.viewer__bar span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.viewer__bar .btn--ghost { border-color: rgba(255, 255, 255, .25); color: #fff; }
.viewer__loading { display: grid; place-items: center; height: 320px; color: rgba(255, 255, 255, .7); font-size: 14px; }
.viewer__link { display: grid; justify-items: start; gap: 12px; padding: 40px; color: #fff; background: radial-gradient(600px 300px at 90% 120%, rgba(255, 106, 0, .45), transparent 60%), #0f0f0f; }
.viewer__link .label { color: rgba(255, 255, 255, .6); }
.viewer__link-title { font-size: clamp(24px, 3vw, 34px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.viewer__link .btn { margin-top: 8px; }

.review { display: grid; gap: 18px; }
.review .card__title { margin-bottom: 0; }
.choice { display: flex; flex-wrap: wrap; gap: 10px; }
.choice label { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border: 1.5px solid var(--line-strong); border-radius: 999px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background-color .3s var(--ease), color .3s, border-color .3s, transform .3s var(--ease); }
.choice span:hover { border-color: var(--text); }
.choice input:checked + span { background: var(--text); border-color: var(--text); color: #fff; transform: scale(1.03); }
.choice input[value="changes"]:checked + span { background: var(--orange); border-color: var(--orange); }
.choice input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 3px; }

.stars { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.stars legend { float: left; width: 100%; margin-bottom: 8px; }
.stars legend span { text-transform: none; letter-spacing: 0; }
.star { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; cursor: pointer; color: var(--bg-3); transition: color .2s, transform .3s var(--ease); }
.star svg { width: 28px; height: 28px; fill: currentColor; stroke: none; }
.star input { position: absolute; opacity: 0; pointer-events: none; }
.star:hover { transform: scale(1.12); }
.star.is-on { color: var(--orange); }
.star:has(input:focus-visible) { outline: 2px solid var(--orange); outline-offset: 1px; }

/* ---------- rows (files, invoices, reviews) ---------- */
.rows { padding: 0; list-style: none; }
.row { display: flex; align-items: center; gap: 14px; padding: 16px 12px; margin: 0 -12px; border-radius: 14px; transition: background-color .25s; }
.row + .row { box-shadow: 0 -1px 0 var(--line); }
.row:hover { background: rgba(15, 15, 15, .03); }
.row__main { display: grid; flex: 1; gap: 2px; min-width: 0; }
.row__name { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; overflow: hidden; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.row__meta { color: var(--muted); font-size: 13px; }
.row__comment { margin: 4px 0 2px; max-width: 70ch; white-space: pre-line; text-wrap: pretty; }
.row__action { flex: none; color: var(--orange); font-size: 14px; font-weight: 500; text-decoration: none; }
.row__action:hover { text-decoration: underline; }
.row--review { align-items: start; }
.row__stars { display: inline-flex; color: var(--bg-3); }
.row__stars svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.row__stars svg.is-on { color: var(--orange); }
.empty { padding: 14px 0; color: var(--muted); font-size: 14px; text-wrap: pretty; }
.empty--page { padding: 40px 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; }

.pill { flex: none; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill--sent { border: 1px solid var(--orange); color: var(--orange-dark); }
.pill--paid { background: var(--bg-2); color: var(--muted); }
.pill--overdue { background: var(--orange); color: #fff; }
.pill--approved { background: var(--text); color: #fff; }
.pill--changes { background: #ffe8d6; color: var(--orange-dark); }

/* ---------- progress updates strip (under the progress bar) ---------- */
.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; }
.updates { display: grid; gap: 14px; }
.updates__head { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.updates__head .card__title { margin: 4px 0 0; }
.updates__nav { display: flex; gap: 8px; }
.updates__btn { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 50%; background: #fff; color: var(--text); cursor: pointer; transition: background-color .25s, color .25s, border-color .25s, transform .3s var(--ease); }
.updates__btn:hover { background: var(--text); border-color: var(--text); color: #fff; }
.updates__btn:active { transform: scale(.94); }
.updates__btn svg { width: 18px; height: 18px; }
.updates__btn--prev svg { transform: rotate(180deg); }
.updates__track { display: grid; grid-auto-flow: column; grid-auto-columns: min(340px, 82%); gap: 16px; margin: 0 -4px; padding: 4px 4px 12px; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--bg-3) transparent; }
.update { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; scroll-snap-align: start; box-shadow: 0 18px 40px -30px rgba(15, 15, 15, .35); transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.update:hover { transform: translateY(-3px); box-shadow: 0 26px 44px -28px rgba(15, 15, 15, .45); }
.update__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #0f0f0f; }
.update__media img, .update__media video { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.update:hover .update__media img { transform: scale(1.04); }
.update__media--idea { display: grid; place-items: center; background: radial-gradient(400px 220px at 80% 110%, rgba(255, 106, 0, .55), transparent 60%), #0f0f0f; }
.update__media--idea span { color: rgba(255, 255, 255, .85); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.update__body { display: grid; align-content: start; gap: 6px; padding: 16px 18px 18px; }
.update__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.update__meta time { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.update__title { font-weight: 600; letter-spacing: -0.01em; }
.update__note { color: var(--muted); font-size: 14px; white-space: pre-line; text-wrap: pretty; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.update--empty { grid-column: 1 / -1; padding: 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; }
.pill--kind-screenshot { background: var(--bg-2); color: var(--text); }
.pill--kind-recording { background: #0f0f0f; color: #fff; }
.pill--kind-idea { background: #ffe8d6; color: var(--orange-dark); }

/* ---------- chat ---------- */
.chat { display: grid; grid-template-rows: 1fr auto auto; height: min(68vh, 680px); border: 1px solid var(--line); border-radius: 24px; background: rgba(255, 255, 255, .85); overflow: hidden; box-shadow: 0 18px 40px -30px rgba(15, 15, 15, .35); }
.chat__list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 22px 20px; list-style: none; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
.chat__day { align-self: center; margin: 10px 0 4px; padding: 4px 12px; border-radius: 999px; background: var(--bg-2); color: var(--muted); font-size: 12px; font-weight: 500; }
.chat__empty { margin: auto; text-align: center; }
.bubble { display: grid; gap: 4px; max-width: min(78%, 560px); padding: 12px 16px; border-radius: 20px; animation: bubble-in .45s var(--ease) both; }
.bubble--them { align-self: flex-start; border: 1px solid var(--line); border-bottom-left-radius: 6px; background: #fff; }
.bubble--me { align-self: flex-end; border-bottom-right-radius: 6px; background: var(--orange); color: #fff; box-shadow: 0 10px 22px -14px rgba(255, 106, 0, .8); }
.bubble__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble__meta { font-size: 11.5px; opacity: .7; }
.bubble--me .bubble__meta { text-align: right; }
@keyframes bubble-in { from { opacity: 0; transform: translate3d(0, 8px, 0) scale(.98); } }
.chat__form { display: flex; align-items: end; gap: 10px; padding: 12px 12px 8px 18px; border-top: 1px solid var(--line); background: #fff; }
.chat__form textarea { flex: 1; min-height: 44px; max-height: 180px; padding: 11px 0; border: 0; background: none; color: var(--text); font: 400 15px/1.45 var(--font); resize: none; outline: none; }
.chat__send { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--orange); color: #fff; cursor: pointer; transition: background-color .25s, transform .3s var(--ease); }
.chat__send:hover { background: var(--orange-dark); transform: translateY(-1px) rotate(-8deg); }
.chat__send:disabled { opacity: .6; }
.chat__hint { padding: 0 18px 10px; background: #fff; color: var(--muted); font-size: 11.5px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; padding: 14px 22px; border-radius: 999px; background: #0f0f0f; color: #fff; font-size: 14px; font-weight: 500; box-shadow: 0 20px 40px -18px rgba(15, 15, 15, .6); opacity: 0; transform: translate(-50%, 20px) scale(.96); pointer-events: none; transition: opacity .35s var(--ease), transform .5s var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast:empty { display: none; }

/* ---------- motion: things arrive, one after another ---------- */
@keyframes rise { from { opacity: 0; transform: translate3d(0, 16px, 0); } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .login__card { animation: rise .8s var(--ease) both; }
  .side { animation: fade .6s var(--ease) both; }
  .panel.is-entering > * { animation: rise .65s var(--ease) both; }
  .panel.is-entering > :nth-child(2) { animation-delay: .06s; }
  .panel.is-entering > :nth-child(3) { animation-delay: .12s; }
  .panel.is-entering > :nth-child(4) { animation-delay: .18s; }
  .panel.is-entering > :nth-child(5) { animation-delay: .24s; }
  .panel.is-entering .tile { animation: rise .7s var(--ease) both; }
  .panel.is-entering .tile:nth-child(2) { animation-delay: .26s; }
  .panel.is-entering .tile:nth-child(3) { animation-delay: .32s; }
  .panel.is-entering .tile:nth-child(1) { animation-delay: .2s; }
  .row { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms + .1s); }
}
@media (prefers-reduced-motion: reduce) {
  .bubble { animation: none; }
  .chat__list { scroll-behavior: auto; }
  .update, .update__media img, .updates__btn { transition: none; }
  .progress__fill, .progress__fill::after { animation: none; transition: none; }
  .progress__fill::after { display: none; }
  .side__indicator, .tile, .btn, .toast, .star, .choice span { transition: none; }
  .tile:hover, .btn:hover, .star:hover { transform: none; }
}

/* ---------- phones & small tablets: sidebar becomes a top bar with scrolling tabs ---------- */
@media (max-width: 860px) {
  .app { display: block; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; gap: 12px; padding: 14px 16px 10px; border-right: 0; border-bottom: 1px solid var(--line); background: rgba(251, 252, 248, .82); }
  .side__top { padding: 0; }
  .side__logo { width: 124px; }
  .side__who, .side > .side__out { display: none; }
  .side__out--mobile { display: grid; place-items: center; width: 40px; height: 40px; margin: 0; padding: 0; border-radius: 50%; }
  .side__project { padding: 0; }
  .side__nav { display: flex; gap: 4px; margin: 0 -16px; padding: 0 16px 2px; overflow-x: auto; scrollbar-width: none; }
  .side__nav::-webkit-scrollbar { display: none; }
  .side__nav button { flex: none; height: 40px; padding: 0 14px; gap: 8px; font-size: 14px; }
  .side__nav button svg { width: 18px; height: 18px; }
  .content { padding: 28px 16px 80px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile--feature { grid-column: 1 / -1; }
  .card { padding: 22px 18px; }
  .viewer__frame { height: 62vh; }
  .chat { height: calc(100dvh - 230px); min-height: 420px; border-radius: 20px; }
  .bubble { max-width: 88%; }
  .updates__nav { display: none; }
  .viewer__link { padding: 28px 22px; }
  .row { flex-wrap: wrap; }
}
