:root {
    --bg: #f3efe9;
    --panel: #fbf9f6;
    --sand: #e9e3da;
    --ink: #161412;
    --muted: #7d766d;
    --line: rgba(22, 20, 18, 0.12);
    --dark: #121110;
    --on-dark: #efe9e1;
    --on-dark-muted: #9b938a;
    --ok: #4f6b4a;
    --ok-bg: #e3eadf;
    --warn: #8a5a1f;
    --warn-bg: #f2e5cf;
    --bad: #8e3b2e;
    --bad-bg: #f1ddd7;
    --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
    --serif: 'EB Garamond', Garamond, 'Times New Roman', serif;
    --side: 248px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--serif); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
[hidden] { display: none !important; }

/* ---------- Type helpers ---------- */
.display { font-family: var(--display); font-stretch: 125%; font-weight: 700; text-transform: uppercase; letter-spacing: 0.01em; line-height: 0.98; }
.eyebrow { font-family: var(--display); font-stretch: 112%; font-size: 10.5px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.wordmark { font-family: var(--display); font-stretch: 125%; font-weight: 700; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; }
.muted { color: var(--muted); }
.italic { font-style: italic; }
.small { font-size: 14px; }

/* ---------- Buttons & inputs ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--display); font-stretch: 112%; font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
    padding: 12px 20px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease; white-space: nowrap;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); }
.btn.sm { padding: 8px 12px; font-size: 10px; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok:hover { background: transparent; color: var(--ok); }
.btn.danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn.danger:hover { background: var(--bad); color: #fff; }
.btn:disabled { opacity: 0.45; cursor: default; pointer-events: none; }
.link { text-decoration: none; border-bottom: 1px solid currentColor; font-style: italic; }
.field { display: grid; gap: 6px; }
.field > span { font-family: var(--display); font-stretch: 112%; font-size: 10.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.input, select.input, textarea.input {
    width: 100%; background: var(--panel); border: 1px solid var(--line); padding: 11px 12px; font-size: 16px; border-radius: 0; outline: none;
    transition: border-color 0.2s ease;
}
.input:focus { border-color: var(--ink); }
textarea.input { resize: vertical; min-height: 96px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.check input { accent-color: var(--ink); width: 15px; height: 15px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.error { color: var(--bad); font-size: 15px; }

/* ---------- Boot ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot .wordmark { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ---------- Auth screen ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; background: var(--dark); color: #fff; overflow: hidden; }
.auth-art::before { content: ''; position: absolute; inset: 0; background: url('../assets/img/f-1-1.jpg') center / cover; }
.auth.animate .auth-art::before { animation: slow-zoom 14s cubic-bezier(0.2, 0.6, 0.2, 1) both; }
@keyframes slow-zoom { from { transform: scale(1.12); opacity: 0; } 12% { opacity: 1; } to { transform: scale(1); } }
.auth-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0.05) 50%, rgba(0,0,0,0.3)); }
.auth-art > * { position: relative; z-index: 1; }
.auth-art .wordmark { position: absolute; top: 28px; left: 32px; }
.auth-art .caption { position: absolute; left: 32px; right: 32px; bottom: 40px; }
.auth-art h1 { font-size: clamp(30px, 3.6vw, 54px); margin-bottom: 14px; }
.auth-art p { font-style: italic; font-size: 18px; max-width: 420px; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: 60px clamp(24px, 6vw, 90px); }
.auth-panel .back { position: absolute; top: 26px; right: 32px; font-size: 15px; }
.auth-tabs { display: flex; gap: 28px; margin-bottom: 34px; border-bottom: 1px solid var(--line); }
.auth-tabs button { padding: 0 0 12px; font-family: var(--display); font-stretch: 112%; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid transparent; margin-bottom: -1px; }
.auth-tabs button.on { color: var(--ink); border-color: var(--ink); }
.auth h2 { font-size: 30px; margin-bottom: 10px; }
.auth .lead { color: var(--muted); margin-bottom: 28px; }
.auth form { display: grid; gap: 16px; max-width: 420px; }
.auth form .btn { margin-top: 6px; }
.auth .alt { margin-top: 18px; font-size: 15px; color: var(--muted); }
.demo-box { margin-top: 36px; padding: 22px; border: 1px dashed rgba(22,20,18,0.3); max-width: 420px; background: var(--panel); }
.demo-box p { font-size: 15px; color: var(--muted); margin: 8px 0 16px; }
.demo-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-roles button { text-align: left; padding: 12px; border: 1px solid var(--line); background: var(--bg); transition: border-color 0.2s ease; }
.demo-roles button:hover { border-color: var(--ink); }
.demo-roles strong { display: block; font-family: var(--display); font-stretch: 112%; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }
.demo-roles span { font-size: 14px; color: var(--muted); }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--dark); color: var(--on-dark); display: flex; flex-direction: column; padding: 26px 18px 18px; }
.side .wordmark { padding: 0 10px; }
.side .studio { padding: 4px 10px 30px; color: var(--on-dark-muted); }
.side nav { display: grid; gap: 2px; }
.side nav a {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; text-decoration: none; font-size: 16px; color: var(--on-dark-muted);
    border-left: 2px solid transparent; transition: color 0.2s ease, background 0.2s ease;
}
.side nav a:hover { color: var(--on-dark); background: rgba(255,255,255,0.04); }
.side nav a.on { color: var(--on-dark); border-color: var(--on-dark); background: rgba(255,255,255,0.06); }
.side nav .count { font-family: var(--display); font-stretch: 112%; font-size: 10px; font-weight: 600; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; background: var(--on-dark); color: var(--dark); border-radius: 10px; }
.side .spacer { flex: 1; }
.side .me { display: flex; align-items: center; gap: 10px; padding: 14px 10px; border-top: 1px solid rgba(255,255,255,0.1); }
.side .me div { min-width: 0; }
.side .me strong { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .me span { font-size: 13px; color: var(--on-dark-muted); }
.side .side-links { display: flex; justify-content: space-between; padding: 6px 10px 0; font-size: 14px; color: var(--on-dark-muted); }
.side .side-links a, .side .side-links button { text-decoration: none; color: inherit; }
.side .side-links a:hover, .side .side-links button:hover { color: var(--on-dark); }
.demo-flag { margin: 0 10px 16px; padding: 8px 10px; font-size: 13px; line-height: 1.35; color: var(--on-dark-muted); border: 1px dashed rgba(255,255,255,0.2); }
.demo-flag button { color: var(--on-dark); text-decoration: underline; }

.main { min-width: 0; padding: 0 clamp(20px, 3.4vw, 48px) 80px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 40px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.topbar h1 { font-size: clamp(26px, 3vw, 42px); }
.topbar .sub { font-style: italic; color: var(--muted); margin-top: 8px; font-size: 17px; }
.topbar .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.view.animate { animation: view-in 0.5s cubic-bezier(0.2, 0.6, 0.2, 1); }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Cards, KPIs, sections ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 36px; }
.kpi { background: var(--panel); border: 1px solid var(--line); padding: 20px 20px 18px; text-decoration: none; display: block; transition: border-color 0.2s ease, transform 0.2s ease; }
a.kpi:hover { border-color: var(--ink); }
.kpi .eyebrow { display: block; margin-bottom: 14px; }
.kpi strong { font-family: var(--display); font-stretch: 125%; font-weight: 700; font-size: 38px; line-height: 1; }
.kpi small { display: block; margin-top: 8px; color: var(--muted); font-style: italic; font-size: 14px; }
.kpi.alert { border-color: var(--warn); background: var(--warn-bg); }
.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: start; }
.section { margin-bottom: 40px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.section-head h2 { font-family: var(--display); font-stretch: 112%; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.panel { background: var(--panel); border: 1px solid var(--line); }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); font-style: italic; }

/* ---------- Avatars & badges ---------- */
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-family: var(--display); font-stretch: 112%; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; color: #fff; }
.avatar.lg { width: 38px; height: 38px; font-size: 12px; }
.avatars { display: flex; }
.avatars .avatar { border: 2px solid var(--panel); margin-left: -8px; }
.avatars .avatar:first-child { margin-left: 0; }
.badge { display: inline-block; font-family: var(--display); font-stretch: 112%; font-size: 9.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; padding: 4px 8px; background: var(--sand); color: var(--ink); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.dark { background: var(--ink); color: var(--bg); }

/* ---------- Progress ---------- */
.progress { height: 4px; background: var(--sand); position: relative; overflow: hidden; }
.progress i { position: absolute; inset: 0 auto 0 0; background: var(--ink); transition: width 0.8s cubic-bezier(0.2, 0.6, 0.2, 1); }
.stepper { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 26px 0 8px; }
.step { text-align: left; padding: 12px 0 0; border-top: 3px solid var(--sand); font-size: 14px; color: var(--muted); transition: border-color 0.3s ease, color 0.3s ease; }
.step b { display: block; font-family: var(--display); font-stretch: 112%; font-size: 10px; font-weight: 600; letter-spacing: 0.14em; margin-bottom: 2px; }
.step.done { border-color: var(--ink); color: var(--ink); }
.step.now { border-color: var(--ink); color: var(--ink); }
.step.now b::after { content: ' · now'; color: var(--warn); }
button.step:hover { border-color: var(--muted); color: var(--ink); }

/* ---------- Project list ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 7px 12px; border: 1px solid var(--line); font-size: 14px; background: transparent; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.search { max-width: 260px; }
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 64px 1.6fr 1.1fr 1.3fr 0.8fr 0.9fr; gap: 18px; align-items: center; padding: 14px 6px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background 0.2s ease; }
.row:hover { background: var(--panel); }
.row .thumb { width: 64px; height: 64px; object-fit: cover; background: var(--sand); }
.row .thumb.blank { display: grid; place-items: center; font-family: var(--display); font-stretch: 125%; font-weight: 700; color: var(--muted); }
.row h3 { font-family: var(--display); font-stretch: 112%; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 2px; }
.row .stage-cell span { display: block; font-size: 14px; margin-bottom: 6px; }
.row .due.late { color: var(--bad); }
.row-head { font-family: var(--display); font-stretch: 112%; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); padding: 8px 6px; border-bottom: 0; }
.row-head:hover { background: none; }

/* ---------- Client project cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.pcard { background: var(--panel); border: 1px solid var(--line); text-decoration: none; display: flex; flex-direction: column; transition: border-color 0.2s ease; }
.pcard:hover { border-color: var(--ink); }
.pcard .cover { aspect-ratio: 4 / 3; background: var(--sand); overflow: hidden; }
.pcard .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(0.2, 0.6, 0.2, 1); }
.pcard:hover .cover img { transform: scale(1.03); }
.pcard .cover.blank { display: grid; place-items: center; color: var(--muted); font-style: italic; }
.pcard .body { padding: 18px 18px 20px; display: grid; gap: 10px; }
.pcard h3 { font-size: 18px; }
.pcard .meta { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.callout { padding: 10px 12px; background: var(--warn-bg); color: var(--warn); font-size: 15px; }
.callout.ok { background: var(--ok-bg); color: var(--ok); }

/* ---------- Lists ---------- */
.list { list-style: none; }
.list li { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .grow strong { font-weight: 500; }
.list .grow a { text-decoration: none; }
.list .grow a:hover { text-decoration: underline; }
.task-check { width: 18px; height: 18px; border: 1px solid var(--ink); flex: none; display: grid; place-items: center; background: transparent; }
.task-check.on { background: var(--ink); color: var(--bg); }
.task-check.on::after { content: '✓'; font-size: 12px; line-height: 1; }
.done-text { text-decoration: line-through; color: var(--muted); }

/* ---------- Feed ---------- */
.feed { list-style: none; }
.feed li { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed .who { font-weight: 500; }
.feed .when { color: var(--muted); font-size: 13px; }
.feed p { margin-top: 2px; }
.feed .internal { font-size: 13px; color: var(--warn); font-style: italic; }

/* ---------- Project detail ---------- */
.detail-head .eyebrow { display: block; margin-bottom: 10px; }
.detail-head h1 { font-size: clamp(30px, 4.4vw, 60px); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 12px; font-style: italic; color: var(--muted); }
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin: 30px 0 28px; overflow-x: auto; }
.tabs a { padding-bottom: 12px; text-decoration: none; font-family: var(--display); font-stretch: 112%; font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-color: var(--ink); }
.tabs a .badge { margin-left: 6px; padding: 2px 6px; }
.details { list-style: none; border-top: 1px solid var(--line); }
.details li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.details li > span:first-child { color: var(--muted); }
.brief { font-size: 19px; line-height: 1.5; white-space: pre-wrap; }

/* Renders */
.renders { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.render { background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; }
.render .img { aspect-ratio: 4 / 5; background: var(--sand); overflow: hidden; cursor: zoom-in; }
.render .img img { width: 100%; height: 100%; object-fit: cover; }
.render .body { padding: 14px; display: grid; gap: 10px; }
.render .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.render .note { font-size: 14px; font-style: italic; color: var(--bad); }
.render .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.dropzone { border: 1px dashed rgba(22,20,18,0.3); padding: 22px; text-align: center; color: var(--muted); font-style: italic; margin-bottom: 18px; cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease; display: block; }
.dropzone:hover, .dropzone.over { border-color: var(--ink); background: var(--panel); color: var(--ink); }
.dropzone input { display: none; }

/* Messages */
.thread { display: grid; gap: 14px; margin-bottom: 20px; }
.msg { display: flex; gap: 12px; max-width: 720px; }
.msg .bubble { background: var(--panel); border: 1px solid var(--line); padding: 12px 14px; }
.msg.mine { margin-left: auto; flex-direction: row-reverse; }
.msg.mine .bubble { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.msg.mine .when { color: var(--on-dark-muted); }
.msg.internal .bubble { background: var(--warn-bg); border-color: var(--warn-bg); color: var(--ink); }
.msg .when { font-size: 12.5px; color: var(--muted); display: block; margin-bottom: 2px; }
.composer { display: grid; gap: 10px; max-width: 720px; margin-left: auto; }
.composer .row-acts { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Kanban */
.board { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 16px; overflow-x: auto; }
.col { background: var(--sand); padding: 12px; min-height: 300px; transition: background 0.2s ease; }
.col.over { background: #ddd5c9; }
.col h3 { display: flex; justify-content: space-between; font-family: var(--display); font-stretch: 112%; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; padding: 4px 4px 12px; }
.kcard { background: var(--panel); border: 1px solid var(--line); padding: 12px; margin-bottom: 8px; cursor: grab; display: grid; gap: 8px; transition: box-shadow 0.2s ease, transform 0.2s ease; }
.kcard:hover { box-shadow: 0 6px 18px rgba(22,20,18,0.08); }
.kcard.dragging { opacity: 0.4; }
.kcard .foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.kcard .proj { font-family: var(--display); font-stretch: 112%; font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); text-decoration: none; }

/* People */
.people .row { grid-template-columns: 1.6fr 1.2fr 1fr 0.7fr 0.8fr; }
.person { display: flex; gap: 12px; align-items: center; min-width: 0; }
.person div { min-width: 0; }
.person strong { display: block; font-weight: 500; }
.person span { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.pending-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--warn-bg); margin-bottom: 8px; flex-wrap: wrap; }
.pending-card .person { flex: 1; }
.grid-2 .pending-card .person { flex-basis: 100%; }

/* ---------- Modal, lightbox, toast ---------- */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(18,17,16,0.55); display: grid; place-items: center; padding: 20px; animation: fade 0.25s ease; }
.modal { background: var(--bg); width: 100%; max-width: 620px; max-height: calc(100vh - 40px); overflow: auto; padding: 30px; animation: rise 0.35s cubic-bezier(0.2, 0.6, 0.2, 1); }
.modal h2 { font-size: 24px; margin-bottom: 22px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.team-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(14,13,12,0.96); display: grid; place-items: center; padding: 30px; animation: fade 0.25s ease; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
#toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); z-index: 70; background: var(--ink); color: var(--bg); padding: 12px 18px; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); }

/* ---------- Motion ---------- */
/* Lists, cards and tiles rise in one after another when you open a page */
.view.animate :is(.kpis, .cards, .renders, .rows, .list, .feed, .thread, .board, .stepper, .details) > *,
.auth.animate :is(.auth-panel, .auth form, .demo-roles) > * {
    animation: rise-in 0.6s cubic-bezier(0.2, 0.6, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 55ms + 80ms);
}
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } }
.auth.animate .caption { animation: rise-in 1s cubic-bezier(0.2, 0.6, 0.2, 1) 0.3s both; }
/* Progress bars fill up from the left */
.progress i { transform-origin: left center; }
.view.animate .progress i { animation: bar-in 1.2s cubic-bezier(0.2, 0.6, 0.2, 1) 0.35s both; }
@keyframes bar-in { from { transform: scaleX(0); } }
/* Small physical responses */
.pcard, .kpi, .render, .kcard { transition: border-color 0.25s ease, transform 0.35s cubic-bezier(0.2, 0.6, 0.2, 1), box-shadow 0.35s ease; }
.pcard:hover, a.kpi:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(22, 20, 18, 0.08); }
.render:hover { box-shadow: 0 14px 30px rgba(22, 20, 18, 0.08); }
.render .img img { transition: transform 1.2s cubic-bezier(0.2, 0.6, 0.2, 1), opacity 0.6s ease; }
.render:hover .img img { transform: scale(1.03); }
.btn:active, .chip:active, .task-check:active { transform: scale(0.97); }
.task-check { transition: background 0.25s ease, transform 0.15s ease; }
.task-check.on::after { animation: pop 0.35s cubic-bezier(0.2, 0.6, 0.2, 1.4); }
@keyframes pop { from { transform: scale(0); } }
/* Something you just changed glows briefly */
.flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 2px var(--warn); } 100% { box-shadow: 0 0 0 2px transparent; } }
/* Buttons show a spinner while they work */
.btn.busy { color: transparent !important; position: relative; pointer-events: none; }
.btn.busy::after { content: ''; position: absolute; width: 14px; height: 14px; border: 1.5px solid var(--bg); border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
.btn.ghost.busy::after, .btn.danger.busy::after { border-color: var(--ink); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.task-check.busy, [data-act="advance-task"].busy { opacity: 0.4; pointer-events: none; }

/* ---------- Skeleton loading ---------- */
/* Images: soft shimmer until the picture arrives, then a fade */
.img-loading { background: linear-gradient(100deg, #e3ddd4 30%, #f0ebe4 50%, #e3ddd4 70%) 0 0 / 250% 100% !important; animation: shimmer 1.5s ease-in-out infinite; }
.img-loading > img { opacity: 0; }
.pcard .cover img, .render .img img, img.thumb { transition: opacity 0.6s ease, transform 1.2s cubic-bezier(0.2, 0.6, 0.2, 1); }
.skel { background: linear-gradient(100deg, #e3ddd4 30%, #f0ebe4 50%, #e3ddd4 70%) 0 0 / 250% 100%; animation: shimmer 1.5s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 125% 0; } to { background-position: -125% 0; } }
.skel-line { height: 14px; margin: 10px 0; }

/* ---------- Pending account ---------- */
.waiting { max-width: 560px; margin: 12vh auto 0; text-align: center; padding: 0 20px; }
.waiting h1 { font-size: clamp(28px, 4vw, 46px); margin: 16px 0; }
.waiting p { color: var(--muted); font-size: 18px; margin-bottom: 26px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .grid-2 { grid-template-columns: 1fr; }
    .row { grid-template-columns: 56px 1.5fr 1fr 1fr; }
    .row .hide-md { display: none; }
    .people .row { grid-template-columns: 1.6fr 1fr 0.8fr; }
}
@media (max-width: 860px) {
    .auth { grid-template-columns: 1fr; }
    .auth-art { min-height: 220px; }
    .auth-art .caption { bottom: 20px; }
    .auth-art p { display: none; }
    .auth-panel { position: relative; padding-top: 40px; }
    .auth-panel .back { position: static; display: block; margin-bottom: 20px; }
    .shell { grid-template-columns: 1fr; }
    .side { position: sticky; z-index: 20; height: auto; padding: 14px 16px 0; }
    .side .studio, .side .spacer, .side .me, .demo-flag { display: none; }
    .side .wordmark { padding: 0; }
    .side nav { display: flex; overflow-x: auto; gap: 4px; margin: 12px -16px 0; padding: 0 12px; }
    .side nav a { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; padding: 10px 8px; }
    .side nav a.on { border-color: var(--on-dark); background: none; }
    .side .side-links { position: absolute; top: 14px; right: 16px; padding: 0; gap: 14px; }
    .main { padding: 0 16px 60px; }
    .topbar { padding-top: 26px; }
    .stepper { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
    .row { grid-template-columns: 48px 1fr auto; gap: 12px; }
    .row .thumb { width: 48px; height: 48px; }
    .row .hide-sm { display: none; }
    .row-head { display: none; }
    .people .row { grid-template-columns: 1fr auto; }
    .board { grid-template-columns: repeat(3, 82vw); }
    .form-grid, .team-pick { grid-template-columns: 1fr; }
    .modal { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .view, .view *, .auth *, .auth-art::before, .modal, .modal-back, .lightbox, .flash { animation: none !important; }
    .pcard:hover, a.kpi:hover { transform: none; }
}
