:root {
    --ink: #151319;
    --ink-soft: #625e66;
    --paper: #faf9f7;
    --white: #fff;
    --line: #dedbd7;
    --line-dark: #bdb8b2;
    --lilac: #dfcaf7;
    --lilac-soft: #f3ebfc;
    --lilac-dark: #a77bd4;
    --orange: #e73e1a;
    --green: #27714f;
    --green-soft: #e4f1e9;
    --amber: #7c5519;
    --amber-soft: #faedd8;
    --red: #a33328;
    --red-soft: #f9e7e4;
    --shadow: 0 18px 55px rgba(21, 19, 25, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font: 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
    outline: 3px solid rgba(167, 123, 212, .55);
    outline-offset: 2px;
}
[hidden] { display: none !important; }
.muted { color: var(--ink-soft); }
.eyebrow, .kpi-label {
    color: var(--ink-soft);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 75% 20%, var(--lilac-soft), transparent 34%), var(--paper); }
.login-card { width: min(460px, 100%); padding: 46px; border: 1px solid var(--line); border-radius: 24px; background: var(--white); box-shadow: var(--shadow); }
.login-card .eyebrow { margin: 52px 0 8px; }
.login-card h1 { margin: 0; font-size: 42px; line-height: 1; letter-spacing: -.05em; }
.login-card .muted { margin: 14px 0 28px; }
.stack-form { display: grid; gap: 16px; }
.stack-form label, .field { display: grid; gap: 6px; }
.stack-form label > span, .field > span { color: var(--ink-soft); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.stack-form input, .field input, .field textarea, .field select {
    width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--white);
}
.field textarea { min-height: 96px; resize: vertical; }

.app-shell { min-height: 100vh; }
.topbar {
    position: sticky; top: 0; z-index: 50; height: 78px; padding: 0 34px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
    border-bottom: 1px solid var(--line); background: var(--white);
}
.brand { width: fit-content; display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.brand img { width: 35px; height: 42px; object-fit: cover; mix-blend-mode: multiply; }
.brand-word { font-size: 31px; font-weight: 800; line-height: 1; letter-spacing: -1.6px; }
.brand-product { align-self: flex-end; margin-bottom: 3px; padding-left: 8px; border-left: 1px solid var(--line-dark); color: var(--ink-soft); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.brand-large img { width: 45px; height: 54px; }
.brand-large .brand-word { font-size: 38px; }
.brand-large .brand-product { font-size: 15px; }
.client-brand { display: flex; align-items: center; gap: 13px; }
.client-cross { color: var(--line-dark); font-size: 22px; font-weight: 300; }
.flaconi-word { font-size: 22px; font-weight: 700; letter-spacing: -.04em; }
.flaconi-word::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 8px; border-radius: 50%; background: var(--lilac); }
.top-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.updated { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 12px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.avatar { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: var(--lilac); color: var(--ink); font-size: 12px; font-weight: 800; }
.edit-toggle, .menu-button { min-height: 36px; padding: 0 14px; border: 1px solid var(--line-dark); border-radius: 999px; color: var(--ink); background: var(--white); font-size: 10px; font-weight: 800; }
.menu-button { display: none; }

.project-strip { padding: 16px 34px; border-bottom: 1px solid var(--line); background: var(--white); }
.project-switcher { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); max-width: 790px; margin: auto; padding: 4px; border-radius: 15px; background: #f2f0ed; }
.project-pill { min-height: 47px; padding: 8px 15px; display: flex; justify-content: space-between; align-items: center; gap: 18px; border: 0; border-radius: 11px; color: var(--ink-soft); background: transparent; }
.project-pill span { font-weight: 800; }
.project-pill small { font-size: 10px; }
.project-pill.active { color: var(--ink); background: var(--white); box-shadow: 0 4px 15px rgba(21, 19, 25, .08); }
.project-pill.active::before { content: ""; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--lilac-dark); }
.project-pill.active span { margin-left: -7px; }

.layout { max-width: 1600px; margin: auto; display: grid; grid-template-columns: 218px minmax(0, 1fr); }
.sidebar { position: sticky; top: 158px; align-self: start; min-height: calc(100vh - 158px); padding: 38px 20px 28px; border-right: 1px solid var(--line); background: var(--paper); }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { min-height: 46px; padding: 0 12px; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; border: 0; border-radius: 9px; color: var(--ink-soft); background: transparent; text-align: left; font-size: 13px; font-weight: 700; }
.nav-item:hover { color: var(--ink); background: rgba(223, 202, 247, .25); }
.nav-item.active { color: var(--ink); background: var(--lilac); }
.nav-index { opacity: .65; font-size: 10px; font-variant-numeric: tabular-nums; }
.nav-badge, .count-chip { min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 99px; color: var(--white); background: var(--orange); font-size: 10px; font-weight: 800; }
.sidebar-note { margin: 48px 12px 0; padding-top: 19px; display: flex; flex-direction: column; gap: 7px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; }
.sidebar-note strong { color: var(--ink); font-size: 13px; }
.content { min-width: 0; padding: 34px clamp(24px, 4vw, 66px) 80px; }
.content:focus { outline: none; }

.hero { min-height: 342px; padding: 48px clamp(28px, 5vw, 70px); display: grid; grid-template-columns: minmax(0, 1fr) 210px; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--white); }
.hero-meta { display: flex; align-items: center; gap: 16px; color: var(--ink-soft); font-size: 11px; }
.hero h1 { margin: 21px 0 0; font-size: clamp(54px, 7vw, 92px); font-weight: 750; line-height: .92; letter-spacing: -.065em; }
.dot { color: var(--lilac); }
.hero-subtitle { margin: 6px 0 34px; color: var(--ink-soft); font-size: 18px; font-weight: 300; }
.milestone { width: fit-content; padding: 11px 15px; display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-size: 12px; }
.milestone strong { padding-left: 13px; border-left: 1px solid var(--line); }
.milestone span:last-child { color: var(--ink-soft); }
.progress-block { display: flex; flex-direction: column; align-items: center; gap: 15px; color: var(--ink-soft); font-size: 11px; letter-spacing: .11em; text-transform: uppercase; }
.progress-ring { --progress: 0%; position: relative; width: 155px; height: 155px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--lilac-dark) var(--progress), #eeebe7 0); }
.progress-ring::before { content: ""; position: absolute; width: 133px; height: 133px; border-radius: 50%; background: var(--white); }
.progress-ring > div { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.progress-ring strong { color: var(--ink); font-size: 36px; letter-spacing: -.05em; }
.progress-ring strong span { font-size: 15px; }
.progress-ring small { font-size: 9px; letter-spacing: .08em; }

.kpi-grid { margin: 15px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.kpi-card { min-height: 144px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: 0 8px 25px rgba(21, 19, 25, .035); }
.kpi-card.dark { color: var(--white); border-color: var(--ink); background: var(--ink); }
.kpi-card.lilac { border-color: var(--lilac); background: var(--lilac); }
.kpi-card > strong { margin: 14px 0 8px; font-size: clamp(22px, 2vw, 30px); line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.kpi-card > span:last-child { color: var(--ink-soft); font-size: 10px; line-height: 1.45; }
.kpi-card.dark > span:last-child, .dark .kpi-label { color: rgba(255, 255, 255, .55); }
.orange-text { color: var(--orange) !important; }

.dashboard-grid, .site-grid, .questions-layout, .schedule-layout { margin-bottom: 15px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .75fr); gap: 15px; }
.questions-layout, .schedule-layout { grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); }
.panel { padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: 0 8px 25px rgba(21, 19, 25, .025); }
.panel-head { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.panel h2, .panel h3 { margin: 7px 0 0; font-size: 19px; line-height: 1.2; letter-spacing: -.03em; }
.primary-button, .secondary-button, .text-button { min-height: 40px; padding: 0 16px; border-radius: 9px; font-size: 11px; font-weight: 800; }
.primary-button { border: 0; color: var(--white); background: var(--ink); }
.primary-button:hover { background: #302c34; }
.primary-button:disabled { cursor: wait; opacity: .5; }
.secondary-button { border: 1px solid var(--line-dark); color: var(--ink); background: var(--white); }
.text-button { min-height: auto; padding: 4px 0; border: 0; border-radius: 0; color: var(--ink); background: transparent; }
.text-button.danger { color: var(--red); }
.panel-actions { display: flex; align-items: center; gap: 10px; }
.empty-state { padding: 34px; border-radius: 11px; color: var(--ink-soft); background: #f5f3f0; text-align: center; font-size: 11px; }

.section-heading { margin-bottom: 30px; display: grid; grid-template-columns: 42px 1fr; gap: 16px; align-items: start; }
.section-number { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--lilac); font-size: 10px; font-weight: 900; }
.section-heading h1 { margin: 3px 0 9px; font-size: clamp(40px, 6vw, 68px); line-height: .98; letter-spacing: -.06em; }
.section-heading p { max-width: 780px; margin: 0; color: var(--ink-soft); }
.section-heading .eyebrow { grid-column: 2; }
.section-heading > div { grid-column: 2; min-width: 0; }

.cost-bars { display: flex; flex-direction: column; gap: 19px; }
.cost-row { display: grid; grid-template-columns: 195px minmax(120px, 1fr) 125px; align-items: center; gap: 15px; }
.cost-name { display: flex; align-items: center; gap: 10px; }
.cost-name > span:last-child { display: flex; flex-direction: column; }
.cost-name strong { font-size: 11px; }
.cost-name small { color: var(--ink-soft); font-size: 9px; }
.category-dot { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.category-dot.c2, .bar-fill.c2 { background: var(--lilac-dark); }
.category-dot.c3, .bar-fill.c3 { background: var(--orange); }
.bar-track { height: 7px; overflow: hidden; border-radius: 99px; background: #efedea; }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--ink); }
.cost-row > strong { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.category-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-bottom: 15px; }
.category-card { min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; }
.category-card > strong { font-size: 30px; letter-spacing: -.05em; }
.category-card dl { margin: 18px 0 0; }
.category-card dl div { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 10px; }
.category-card dt { color: var(--ink-soft); }
.category-card dd { margin: 0; font-weight: 800; }

.status { width: fit-content; padding: 5px 8px; display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; font-size: 8px; font-weight: 800; letter-spacing: .03em; white-space: nowrap; }
.status.approved, .status.paid, .status.resolved { color: var(--green); background: var(--green-soft); }
.status.reviewing, .status.partial { color: var(--amber); background: var(--amber-soft); }
.status.draft, .status.open { color: var(--ink-soft); background: #efedea; }
.status.rejected { color: var(--red); background: var(--red-soft); }
.status.provisional { color: #6d4e91; background: var(--lilac-soft); }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.data-table th { padding: 10px 12px; border-bottom: 1px solid var(--line-dark); color: var(--ink-soft); text-align: left; text-transform: uppercase; letter-spacing: .08em; font-size: 8px; }
.data-table td { padding: 16px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 10px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td:first-child { min-width: 240px; }
.data-table strong, .data-table small { display: block; }
.data-table small { margin-top: 4px; color: var(--ink-soft); }
.data-table .number { text-align: right; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.category-tag { padding: 5px 8px; display: inline-block; border-radius: 6px; background: var(--lilac-soft); font-size: 8px; font-weight: 800; }
.round-button { width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--white); }
.round-button:hover { color: var(--white); border-color: var(--ink); background: var(--ink); }

.reconcile { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; gap: 10px; }
.reconcile > div { min-height: 120px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; border-radius: 13px; background: #f5f3f0; }
.reconcile > span { text-align: center; color: var(--lilac-dark); font-size: 20px; }
.reconcile small { color: var(--ink-soft); font-size: 9px; }
.reconcile strong { font-size: 16px; }
.reconcile .result { color: var(--white); background: var(--ink); }

.question-thread { padding: 19px 0; border-bottom: 1px solid var(--line); }
.question-thread:last-child { border-bottom: 0; }
.question-head { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.question-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--white); background: var(--ink); font-weight: 900; }
.question-content strong { font-size: 10px; text-transform: lowercase; }
.question-content span { margin-left: 8px; color: var(--ink-soft); font-size: 9px; }
.question-content p { margin: 7px 0 0; font-size: 11px; line-height: 1.6; }
.question-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.reply-list { margin: 14px 0 0 50px; display: grid; gap: 10px; }
.reply { padding: 12px 14px; border-radius: 10px; background: #f5f3f0; }
.reply strong { font-size: 9px; }
.reply span { margin-left: 7px; color: var(--ink-soft); font-size: 8px; }
.reply p { margin: 5px 0 0; font-size: 10px; }
.reply-form { margin: 12px 0 0 50px; display: flex; align-items: end; gap: 9px; }
.reply-form textarea { flex: 1; min-height: 58px; padding: 10px 11px; resize: vertical; border: 1px solid var(--line-dark); border-radius: 8px; }
.ask-card { align-self: start; padding: 28px; border-radius: 18px; color: var(--white); background: var(--ink); }
.ask-card .eyebrow { color: rgba(255,255,255,.45); }
.ask-card h2 { margin: 7px 0 22px; font-size: 24px; }
.ask-card textarea { width: 100%; min-height: 140px; padding: 14px; resize: vertical; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; color: var(--white); background: rgba(255,255,255,.07); }
.ask-card .primary-button { margin-top: 14px; color: var(--ink); background: var(--lilac); }

.schedule-now { min-height: 430px; display: flex; flex-direction: column; justify-content: space-between; }
.schedule-week { font-size: clamp(38px, 5vw, 68px); line-height: .95; letter-spacing: -.07em; }
.schedule-track { margin: 38px 0 30px; display: grid; grid-template-columns: 1fr auto .62fr; align-items: center; }
.schedule-track span:first-child, .schedule-track span:last-child { height: 5px; border-radius: 99px; }
.schedule-track span:first-child { background: var(--lilac-dark); }
.schedule-track span:last-child { background: var(--line); }
.schedule-track i { width: 19px; height: 19px; border: 5px solid var(--white); border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.schedule-current h2 { max-width: 760px; margin: 10px 0 34px; font-size: clamp(25px, 3vw, 42px); line-height: 1.08; letter-spacing: -.045em; }
.schedule-footer { padding-top: 18px; display: grid; grid-template-columns: repeat(2, auto) 1fr; gap: 30px; border-top: 1px solid var(--line); }
.schedule-footer div { display: flex; flex-direction: column; gap: 6px; }
.schedule-footer span { color: var(--ink-soft); font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.schedule-side { display: grid; gap: 15px; }
.schedule-info { min-height: 130px; }
.schedule-info h3 { margin-top: 12px; font-size: 16px; }
.schedule-info p { color: var(--ink-soft); font-size: 10px; }

.weekly-grid { display: grid; gap: 0; }
.weekly-row { padding: 16px 0; display: grid; grid-template-columns: 32px 1fr; gap: 13px; border-bottom: 1px solid var(--line); }
.weekly-row:last-child { border-bottom: 0; }
.weekly-row > span { color: var(--lilac-dark); font-size: 9px; font-weight: 900; }
.weekly-row strong { font-size: 10px; }
.weekly-row p { margin: 5px 0 0; color: var(--ink-soft); font-size: 10px; }
.topic-row { padding: 16px 0; display: grid; grid-template-columns: 75px minmax(0, 1fr) auto auto; align-items: center; gap: 15px; border-top: 1px solid var(--line); }
.topic-row strong { display: block; font-size: 11px; }
.topic-row small { color: var(--ink-soft); font-size: 9px; }
.priority { width: fit-content; padding: 5px 7px; border-radius: 6px; font-size: 8px; font-weight: 800; }
.priority.high { color: var(--red); background: var(--red-soft); }
.priority.normal { color: var(--amber); background: var(--amber-soft); }
.priority.low { color: var(--ink-soft); background: #efedea; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.photo { position: relative; min-height: 180px; display: flex; align-items: flex-end; overflow: hidden; border-radius: 12px; color: var(--white); background: #d8d3cd center/cover; text-decoration: none; }
.photo::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(21,19,25,.8)); }
.photo span { position: relative; z-index: 1; padding: 14px; font-size: 9px; font-weight: 800; }
.dropzone { min-height: 96px; padding: 16px; display: flex; justify-content: center; align-items: center; gap: 12px; border: 1px dashed var(--lilac-dark); border-radius: 12px; background: var(--lilac-soft); }
.dropzone input { max-width: 240px; font-size: 10px; }
.file-list { display: grid; gap: 8px; }
.file-row { padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-radius: 10px; background: #f5f3f0; color: inherit; text-decoration: none; font-size: 10px; }

.invoice-row { padding: 15px 0; display: grid; grid-template-columns: minmax(210px, 1fr) 120px 110px 90px; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); font-size: 10px; }
.invoice-row strong, .invoice-row small { display: block; }
.invoice-row small { margin-top: 3px; color: var(--ink-soft); }
.invoice-row > b { text-align: right; }

.dialog { width: min(760px, calc(100vw - 28px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: var(--white); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(21, 19, 25, .52); backdrop-filter: blur(2px); }
.dialog form { padding: 28px; }
.dialog-head { margin-bottom: 22px; display: flex; justify-content: space-between; gap: 20px; }
.dialog-head h2 { margin: 6px 0 0; font-size: 28px; letter-spacing: -.04em; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field.wide { grid-column: 1 / -1; }
.field.checkbox { display: flex; flex-direction: row; align-items: center; padding: 12px; border-radius: 9px; background: var(--paper); }
.field.checkbox input { width: 18px; min-height: 18px; }
.dialog-actions { margin-top: 22px; display: flex; justify-content: flex-end; gap: 9px; }

.toast { position: fixed; z-index: 200; top: 18px; left: 50%; max-width: min(520px, calc(100vw - 32px)); padding: 12px 18px; transform: translateX(-50%); border-radius: 10px; color: var(--white); background: var(--ink); box-shadow: var(--shadow); font-size: 11px; font-weight: 700; }
.toast.error { background: var(--red); }
.loading { min-height: 55vh; display: grid; place-items: center; color: var(--ink-soft); }

@media (max-width: 1150px) {
    .topbar { grid-template-columns: 1fr auto; }
    .client-brand { display: none; }
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid, .site-grid, .questions-layout, .schedule-layout { grid-template-columns: 1fr; }
    .category-cards { grid-template-columns: 1fr; }
    .reconcile { grid-template-columns: repeat(3, 1fr); }
    .reconcile > span { display: none; }
}

@media (max-width: 900px) {
    .topbar { height: 68px; padding: 0 18px; }
    .updated { display: none; }
    .menu-button { display: inline-block; }
    .project-strip { padding: 10px 14px; }
    .project-switcher { grid-template-columns: repeat(3, 1fr); }
    .project-pill { justify-content: center; min-width: 0; padding: 8px 10px; }
    .project-pill small { display: none; }
    .layout { display: block; }
    .sidebar { position: sticky; top: 68px; z-index: 40; display: none; min-height: 0; padding: 12px 14px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
    .sidebar.open { display: block; }
    .sidebar-note { display: none; }
    .content { padding: 22px 16px 64px; }
    .hero { min-height: 440px; grid-template-columns: 1fr; padding: 35px 28px; }
    .progress-block { align-items: flex-start; margin-top: 28px; }
    .progress-ring { width: 115px; height: 115px; }
    .progress-ring::before { width: 99px; height: 99px; }
}

@media (max-width: 620px) {
    .brand-product, .avatar { display: none; }
    .brand-word { font-size: 26px; }
    .brand img { width: 29px; height: 34px; }
    .edit-toggle { max-width: 106px; padding: 0 10px; font-size: 9px; }
    .project-pill { font-size: 11px; }
    .project-pill.active::before { display: none; }
    .project-pill.active span { margin-left: 0; }
    .login-card { padding: 30px 22px; }
    .login-card h1 { font-size: 34px; }
    .hero { min-height: 425px; border-radius: 18px; }
    .hero-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
    .milestone { width: 100%; grid-template-columns: 1fr; }
    .milestone strong { padding-left: 0; border-left: 0; }
    .kpi-grid { grid-template-columns: 1fr; }
    .panel { padding: 20px; }
    .panel-head { flex-direction: column; align-items: flex-start; }
    .cost-row { grid-template-columns: 1fr 90px; }
    .bar-track { grid-area: 2 / 1 / auto / -1; }
    .cost-row > strong { grid-area: 1 / 2; }
    .section-heading { grid-template-columns: 32px 1fr; gap: 10px; }
    .section-number { width: 32px; height: 32px; }
    .section-heading h1 { font-size: 38px; }
    .reconcile { grid-template-columns: 1fr; }
    .question-head { grid-template-columns: 38px 1fr; }
    .question-actions { grid-column: 2; justify-content: flex-start; }
    .reply-list, .reply-form { margin-left: 0; }
    .reply-form { flex-direction: column; align-items: stretch; }
    .topic-row { grid-template-columns: 70px 1fr; }
    .topic-row > :nth-child(n+3) { grid-column: 2; }
    .photo-grid { grid-template-columns: 1fr; }
    .invoice-row { grid-template-columns: 1fr auto; }
    .invoice-row > :nth-child(3), .invoice-row > :nth-child(4) { grid-column: 2; }
    .form-grid { grid-template-columns: 1fr; }
    .field.wide { grid-column: auto; }
    .dialog form { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
