/* Studio admin + client portal — same design language as the website */
/* Rows of actions (buttons and links side by side). Defined first so specific rows can tune the gap. */
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
:root {
  /* LIGHT theme, the same language as the website (public/assets/css/style.css). The names are historical:
     --ink* are SURFACES (--ink the page, --ink-2 cards and panels, both white and told apart by a thin line; --ink-3 and --ink-4 the off-white paper for raised or nested blocks), --cream* and --muted are TEXT (black, grey). */
  --ink: #ffffff; --ink-2: #ffffff; --ink-3: #f6f5f2; --ink-4: #efede8; --paper: #f6f5f2;
  --cream: #141414; --cream-2: #444444; --muted: #636363;
  /* Gold. --gold and --gold-2 are dark enough for small text on white and on the paper panels (AA).
     --gold-fill is the website's champagne accent: lines, bars, dots, large display type only. */
  --gold: #7f6334; --gold-2: #6b5229; --gold-fill: #a8854d; --gold-light: #d9bf8c; --gold-btn: #8a6c3c;
  --gold-soft: rgba(168,133,77,.1); --on-gold: #ffffff;
  --line: rgba(168,133,77,.42); --line-2: rgba(20,20,20,.12); --line-3: rgba(20,20,20,.24);
  --ok: #2e6b3e; --warn: #96500a; --bad: #a83a2a; --info: #2f5f85;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2,.7,.1,1);
  color-scheme: light;
}
/* Media surfaces that stay dark (the picture viewer) get the old dark values back, so every rule inside
   them keeps reading light on dark. Add the class or selector here, never hard-code light text. */
dialog.iv, .on-dark {
  --ink: #0d0d0d; --ink-2: #151515; --ink-3: #1e1e1e; --ink-4: #2a2a2a;
  --cream: #f2f2f2; --cream-2: #c8c8c8; --muted: #a0a0a0;
  --gold: #c8a96a; --gold-2: #e3c995; --gold-fill: #c8a96a; --gold-btn: #c8a96a; --on-gold: #0d0d0d;
  --line: rgba(200,169,106,.3); --line-2: rgba(255,255,255,.14); --line-3: rgba(255,255,255,.3);
  --ok: #8fb38a; --warn: #e0a95b; --bad: #d98a73; --info: #8fb0c9;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--cream); font: 400 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--gold-2); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
button { font: inherit; }
.eyebrow { font-size: .66rem; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); margin: 0 0 .8rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: 600 .68rem var(--sans); letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; padding: 1em 1.6em; border: 1px solid var(--gold-fill); cursor: pointer; transition: all .3s var(--ease); background: transparent; color: var(--cream); white-space: nowrap; }
.btn-gold { background: var(--gold-btn); border-color: var(--gold-btn); color: var(--on-gold); }
.btn-gold:hover:not(:disabled) { background: var(--gold-2); border-color: var(--gold-2); }
.btn-ghost { border-color: var(--line-3); }
.btn-ghost:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-2); }
.btn-danger { border-color: rgba(168,58,42,.5); color: var(--bad); }
.btn-danger:hover { background: rgba(168,58,42,.12); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-mini { font: 500 .62rem var(--sans); letter-spacing: .18em; text-transform: uppercase; padding: .55em .9em; border: 1px solid var(--line); background: transparent; color: var(--cream-2); cursor: pointer; border-radius: 999px; }
.btn-mini:hover { border-color: var(--gold); color: var(--cream); }
.link-btn { background: none; border: 0; color: var(--gold-2); cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* Layout */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.grid-main > *, .grid-2 > * { min-width: 0; }
.side { background: var(--paper); border-right: 1px solid var(--line-2); padding: 1.6rem 1.2rem; display: flex; flex-direction: column; gap: 2rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--cream); }
.brand-mono { width: 40px; height: 40px; flex: none; border-radius: 0; border: 1px solid currentColor; display: grid; place-items: center; font-family: var(--serif); font-size: 1.15rem; letter-spacing: .02em; color: var(--cream); }
.brand b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; }
.brand small { display: block; font-size: .54rem; font-weight: 500; letter-spacing: .16em; white-space: nowrap; text-transform: uppercase; color: var(--gold); }
.side nav { display: grid; gap: .2rem; }
.side nav a { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border-radius: 0; text-decoration: none; color: var(--cream-2); font-size: .9rem; }
.side nav a:hover { background: rgba(20,20,20,.04); color: var(--cream); }
.side nav a.active { background: var(--gold-soft); color: var(--gold-2); box-shadow: inset 2px 0 0 var(--gold-fill); }
.side nav svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; }
.side-foot { margin-top: auto; display: grid; gap: .8rem; font-size: .8rem; color: var(--muted); }
.main { min-width: 0; padding: 2.2rem clamp(1rem, 3vw, 3rem) 5rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.page-head .crumb { font-size: .78rem; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: .6rem; }
.page-head .crumb:hover { color: var(--gold-2); }
.topbar { display: none; }

.lang { display: flex; gap: .3rem; align-items: center; color: var(--muted); font-size: .7rem; }
.lang button { background: none; border: 0; color: var(--muted); cursor: pointer; font: 500 .7rem var(--sans); letter-spacing: .18em; padding: .3rem; }
.lang button[aria-pressed="true"] { color: var(--gold-2); }

/* Cards & grids */
.card { background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 2px; padding: 1.5rem; }
.card + .card { margin-top: 1.2rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { font-size: 1.35rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.grid-main { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.2rem; align-items: start; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.kpi { background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 2px; padding: 1.2rem 1.4rem; text-decoration: none; color: inherit; }
.kpi:hover { border-color: var(--line); }
.kpi b { display: block; font-family: var(--serif); font-size: 2.6rem; font-weight: 400; color: var(--gold-btn); line-height: 1.1; }
.kpi span { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-top: 1px solid var(--line-2); }
.list li:first-child { border-top: 0; }
.list a, .list .row { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; text-decoration: none; color: inherit; align-items: center; }
.list a:hover { color: var(--gold-2); }
.list .sub { font-size: .8rem; color: var(--muted); }
.empty { color: var(--muted); font-style: italic; font-family: var(--serif); font-size: 1.1rem; padding: .6rem 0; }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: 2px; background: var(--ink-2); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-weight: 500; font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding: .9rem 1rem; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { padding: .85rem 1rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: rgba(20,20,20,.025); }
td .sub { display: block; font-size: .78rem; color: var(--muted); }

.toolbar { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.2rem; }
.toolbar input[type=search] { flex: 1; min-width: 200px; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { font: 500 .62rem var(--sans); letter-spacing: .16em; text-transform: uppercase; padding: .6rem .9rem; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--cream-2); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }

/* Badges */
.badge { display: inline-block; font: 500 .6rem var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: .35rem .65rem; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; color: var(--cream-2); }
.st-visit_scheduled, .st-discovery { color: var(--info); }
.st-designing { color: var(--gold-2); }
.st-awaiting_approval, .st-final_payment { color: var(--warn); }
.st-changes_requested { color: var(--bad); }
.st-approved, .st-completed { color: var(--ok); }
.st-in_production, .st-delivery_scheduled, .st-installing { color: var(--cream-2); }
.st-on_hold, .st-cancelled { color: var(--muted); }
.stage-lead { color: var(--warn); } .stage-qualified { color: var(--info); } .stage-client { color: var(--ok); } .stage-inactive, .stage-lost { color: var(--muted); }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.2rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
label.f { display: grid; gap: .4rem; font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
input, select, textarea {
  width: 100%; background: #ffffff; color: var(--cream); border: 1px solid var(--line-3); border-radius: 0;
  padding: .75rem .9rem; font: 400 .95rem var(--sans); letter-spacing: normal; text-transform: none; transition: border-color .2s;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
.checks { display: flex; flex-wrap: wrap; gap: .4rem; }
.checks label { display: inline-flex; gap: .4rem; align-items: center; font-size: .8rem; letter-spacing: 0; text-transform: none; color: var(--cream-2); border: 1px solid var(--line-2); border-radius: 999px; padding: .35rem .8rem; cursor: pointer; }
.checks input { width: auto; accent-color: var(--gold); }
.form-actions { display: flex; gap: .8rem; justify-content: flex-end; margin-top: 1.4rem; flex-wrap: wrap; }
.sec-title { font-size: .66rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin: 1.6rem 0 .9rem; grid-column: 1 / -1; }
.sec-title:first-child { margin-top: 0; }
.err { color: var(--bad); font-size: .85rem; min-height: 1.2em; margin: .6rem 0 0; }

/* Auth screens */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,.55), var(--ink) 75%), url("/assets/img/studio-drawing.jpg") center/cover; }
.auth-card { width: min(440px, 100%); background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 2px; padding: 2.4rem 2rem; backdrop-filter: blur(10px); }
.auth-card .brand { justify-content: center; margin-bottom: 1.8rem; }
.auth-card h1 { text-align: center; font-size: 2.2rem; margin-bottom: .5rem; }
.auth-card .lead { text-align: center; color: var(--cream-2); font-size: .95rem; margin-bottom: 1.8rem; }
.auth-card form { display: grid; gap: 1rem; }
.auth-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 1.6rem; font-size: .8rem; }
.auth-foot a { color: var(--muted); text-decoration: none; }

/* Project: inputs */
.dropzone { display: block; border: 1px dashed var(--line); border-radius: 2px; padding: 1.4rem; text-align: center; color: var(--cream-2); cursor: pointer; transition: all .2s; font-size: .9rem; }
.dropzone.drag, .dropzone:hover { border-color: var(--gold); background: rgba(168,133,77,.07); }
.dropzone svg { width: 28px; height: 28px; stroke: var(--gold); fill: none; stroke-width: 1.4; margin: 0 auto .5rem; display: block; }
.capture { display: grid; gap: 1.1rem; }
.capture-block { border-top: 1px solid var(--line-2); padding-top: 1.1rem; }
.capture-block:first-child { border-top: 0; padding-top: 0; }
.capture-block h4 { font-family: var(--sans); font-size: .7rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: .3rem; }
.capture-block p { font-size: .85rem; color: var(--muted); margin-bottom: .8rem; }
.inputs { display: grid; gap: .8rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; }
.photo-grid figure { margin: 0; position: relative; aspect-ratio: 1; border-radius: 2px; overflow: hidden; background: var(--ink-3); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.photo-grid .x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--cream); cursor: pointer; font-size: .9rem; line-height: 1; opacity: 0; transition: opacity .2s; }
.photo-grid figure:hover .x, .photo-grid .x:focus { opacity: 1; }
@media (hover: none) { .photo-grid .x { opacity: 1; } }
.input-item { border: 1px solid var(--line-2); border-radius: 2px; padding: .9rem 1rem; background: var(--ink); }
.input-item header { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .5rem; font-size: .75rem; color: var(--muted); }
.input-item header b { font-weight: 500; letter-spacing: .16em; text-transform: uppercase; font-size: .62rem; color: var(--gold); }
.input-item .txt { white-space: pre-wrap; font-size: .9rem; color: var(--cream-2); max-height: 220px; overflow: auto; }
.input-item audio { width: 100%; height: 36px; margin-bottom: .5rem; }
.input-item .acts { display: flex; gap: .4rem; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite; vertical-align: -2px; margin-right: .4rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Generate */
.gen-box { border: 1px solid var(--line); border-radius: 2px; padding: 1.4rem; background: linear-gradient(160deg, rgba(168,133,77,.09), transparent 70%); }
.gen-box p { color: var(--cream-2); font-size: .9rem; }
.demo-note { font-size: .8rem; color: var(--warn); border: 1px solid rgba(150,80,10,.35); border-radius: 2px; padding: .6rem .8rem; margin-bottom: 1rem; }
.progress { margin-top: 1rem; }
.progress-bar { height: 6px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width .6s var(--ease); }
.progress p { margin: .6rem 0 0; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--gold-2); }
.feedback-item { border-left: 2px solid var(--bad); padding: .4rem 0 .4rem 1rem; margin: .8rem 0; }
.feedback-item.approve { border-color: var(--ok); }
.feedback-item p { margin: .2rem 0 0; white-space: pre-wrap; color: var(--cream-2); }
.feedback-item small { color: var(--muted); }

/* Version tabs (V1, V2 …) */
.vtabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.vtab { font: 500 .66rem var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: .6rem 1rem; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--cream-2); cursor: pointer; display: inline-flex; gap: .4rem; align-items: center; }
.vtab[aria-selected="true"] { border-color: var(--gold); color: var(--gold-2); background: rgba(168,133,77,.09); }
.vtab .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.vtab .dot.sent { background: var(--ok); } .vtab .dot.gen { background: var(--gold-2); animation: pulse 1.2s infinite; } .vtab .dot.fail { background: var(--bad); }
@keyframes pulse { 50% { opacity: .3; } }
.version-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.version-head h3 { font-size: 1.6rem; }

/* Version view */
.vv-summary { font-family: var(--serif); font-size: 1.45rem; line-height: 1.35; color: var(--cream); margin-bottom: .8rem; }
.vv-notes { color: var(--cream-2); margin: 0 0 .7rem; }
.vv-notes strong { color: var(--gold-2); font-weight: 500; letter-spacing: .02em; }
.vv-changes { border: 1px solid var(--line); border-radius: 2px; padding: .9rem 1.1rem; margin: 1rem 0; background: rgba(168,133,77,.07); }
.vv-changes b { font-weight: 500; font-size: .64rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.vv-changes p { margin: .3rem 0 0; color: var(--cream-2); }
.vv-tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line-2); margin: 1.4rem 0 1.2rem; overflow-x: auto; scrollbar-width: none; }
.vv-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: .8rem 1rem; color: var(--muted); font: 500 .66rem var(--sans); letter-spacing: .2em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.vv-tabs button[aria-selected="true"] { color: var(--gold-2); border-color: var(--gold); }
.vv-sketch { margin: 0; background: #ffffff; padding: 10px; border-radius: 2px; box-shadow: 0 20px 50px rgba(20,20,20,.117); transform: rotate(-.4deg); }
.vv-sketch img { width: 100%; cursor: zoom-in; }
.vv-sketch figcaption { color: #5d5d5d; font-family: var(--serif); font-style: italic; text-align: center; padding-top: .5rem; }
.vv-3d { position: relative; aspect-ratio: 16/10; border-radius: 2px; overflow: hidden; background: #ebe8e2; border: 1px solid var(--line-2); }
.vv-3d-canvas, .vv-3d-canvas canvas { width: 100% !important; height: 100% !important; display: block; touch-action: none; }
.vv-3d-bar { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: .8rem; align-items: center; }
.vv-3d-variants, .vv-3d-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.sw-btn { display: inline-flex; gap: .45rem; align-items: center; padding: .35rem .75rem .35rem .4rem; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--cream-2); cursor: pointer; font-size: .78rem; }
.sw-btn i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(20,20,20,.2); }
.sw-btn[aria-pressed="true"] { border-color: var(--gold); color: var(--cream); }
.vv-hint { font-size: .8rem; color: var(--muted); text-align: center; margin: .8rem 0 0; }
.vv-panel .compare + .compare { margin-top: 1rem; }
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.mat-card { border: 1px solid var(--line-2); border-radius: 2px; overflow: hidden; background: var(--ink); transition: border-color .3s, transform .3s; }
.mat-card[role=button] { cursor: pointer; }
.mat-card[role=button]:hover { transform: translateY(-3px); border-color: var(--line); }
.mat-card.selected { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.mat-card.approved { border-color: var(--ok); }
.mat-img { position: relative; aspect-ratio: 3/2; background: var(--ink-3); }
.mat-img img { width: 100%; height: 100%; object-fit: cover; }
.mat-fallback { width: 100%; height: 100%; }
.mat-flag { position: absolute; top: .6rem; left: .6rem; font-size: .56rem; letter-spacing: .2em; text-transform: uppercase; background: rgba(255,255,255,.9); color: var(--gold-2); padding: .3rem .6rem; border-radius: 999px; }
.mat-flag.ok { left: auto; right: .6rem; color: var(--ok); }
.mat-body { padding: 1rem 1.1rem 1.2rem; }
.mat-body h4 { font-size: 1.2rem; margin: .5rem 0 .3rem; }
.mat-body p { font-size: .85rem; color: var(--cream-2); margin: 0; }
.mat-sw { display: flex; gap: .3rem; }
.mat-sw i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(20,20,20,.18); }
.mat-pick { display: inline-block; margin-top: .8rem; font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.vv-specs { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 2rem; }
.vv-specs div { padding: .8rem 0; border-top: 1px solid var(--line-2); }
.vv-specs dt { font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: .2rem; }
.vv-specs dd { margin: 0; font-family: var(--serif); font-size: 1.1rem; }
.vv-internal { margin-top: 1.4rem; border: 1px dashed var(--line); border-radius: 2px; padding: 1rem 1.2rem; font-size: .88rem; color: var(--cream-2); }
.vv-internal b { font-weight: 500; font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.vv-internal h5 { font-size: .75rem; font-weight: 500; margin: .8rem 0 .2rem; color: var(--cream); }
.vv-internal ul { margin: 0; padding-left: 1.1rem; }
.lightbox-img { max-height: 80vh; margin: 0 auto; }

/* Compare slider */
.compare { position: relative; overflow: hidden; border-radius: 2px; border: 1px solid var(--line-2); touch-action: pan-y; background: var(--ink-3); }
.compare-img { display: block; width: 100%; height: auto; aspect-ratio: 3/2; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.compare-after-layer { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-after-layer .compare-img { height: 100%; }
.compare-label { position: absolute; top: .8rem; padding: .35rem .7rem; font-size: .56rem; letter-spacing: .22em; text-transform: uppercase; background: rgba(255,255,255,.9); color: var(--cream); border-radius: 999px; pointer-events: none; }
.compare-after { left: .8rem; color: var(--gold-2); }
.compare-before { right: .8rem; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: var(--gold-2); transform: translateX(-1px); pointer-events: none; }
.compare-handle i { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--gold); box-shadow: 0 6px 20px rgba(20,20,20,.117); }
.compare-handle i::before, .compare-handle i::after { content: ""; position: absolute; top: 50%; border: 6px solid transparent; transform: translateY(-50%); }
.compare-handle i::before { left: 6px; border-right-color: var(--ink); }
.compare-handle i::after { right: 6px; border-left-color: var(--ink); }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }

/* Activity */
.timeline-list { list-style: none; margin: 0; padding: 0; }
.timeline-list li { position: relative; padding: 0 0 1rem 1.4rem; font-size: .88rem; color: var(--cream-2); }
.timeline-list li::before { content: ""; position: absolute; left: 3px; top: .5rem; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.timeline-list li::after { content: ""; position: absolute; left: 6px; top: 1.1rem; bottom: 0; width: 1px; background: var(--line-2); }
.timeline-list li:last-child::after { display: none; }
.timeline-list time { display: block; font-size: .72rem; color: var(--muted); }

/* Portal */
.portal-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1rem, 4vw, 3rem); background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-2); }
.portal-top .right { display: flex; align-items: center; gap: 1.2rem; }
.portal-main { width: min(1120px, 100% - 32px); margin: 0 auto; padding: 2.5rem 0 6rem; }
.p-hero { margin-bottom: 2.4rem; }
.p-hero h1 { margin-bottom: .4rem; }
.p-hero p { color: var(--cream-2); }
.p-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.p-card { display: block; text-decoration: none; color: inherit; border: 1px solid var(--line-2); border-radius: 2px; overflow: hidden; background: var(--ink-2); transition: transform .4s var(--ease), border-color .4s; }
.p-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.p-card-img { aspect-ratio: 3/2; background: linear-gradient(135deg, var(--ink-3), var(--ink-4)); display: grid; place-items: center; overflow: hidden; }
.p-card-img img { width: 100%; height: 100%; object-fit: cover; }
.p-card-img .ph { font-family: var(--serif); font-style: italic; color: var(--muted); }
.p-card-body { padding: 1.2rem 1.4rem 1.4rem; }
.p-card-body h3 { margin: .6rem 0 .3rem; }
.tracker { display: grid; grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); gap: .4rem; margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: s; }
.tracker li { position: relative; padding-top: 1.4rem; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-align: center; }
.tracker li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 2px; background: var(--line-2); }
.tracker li.done::before { background: var(--gold); }
.tracker li.now::before { background: linear-gradient(90deg, var(--gold), var(--gold-2)); box-shadow: 0 0 12px rgba(168,133,77,.3); }
.tracker li.done, .tracker li.now { color: var(--cream); }
.decision { border: 1px solid var(--gold); border-radius: 2px; padding: 1.6rem; background: linear-gradient(160deg, rgba(168,133,77,.108), transparent 70%); margin-top: 1.6rem; }
.decision h3 { font-size: 1.6rem; margin-bottom: .4rem; }
.decision .row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
.notice { border-radius: 2px; padding: 1rem 1.2rem; border: 1px solid var(--line); background: rgba(168,133,77,.07); margin: 1rem 0; }
.notice.ok { border-color: rgba(46,107,62,.5); background: rgba(46,107,62,.08); }

/* Modal & toasts */
.app-modal { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); border: 1px solid var(--line); border-radius: 2px; padding: 0; background: var(--ink-2); color: var(--cream); }
.app-modal.wide { width: min(1100px, calc(100% - 32px)); }
.app-modal::backdrop { background: rgba(20,20,20,.429); backdrop-filter: blur(4px); }
.app-modal-inner { padding: 1.6rem; }
.app-modal h2 { margin-bottom: 1rem; }
.app-modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.4rem; flex-wrap: wrap; }
.secret { font-family: ui-monospace, Menlo, monospace; font-size: 1.1rem; background: var(--ink); border: 1px solid var(--line); border-radius: 2px; padding: .8rem 1rem; letter-spacing: .06em; color: var(--gold-2); word-break: break-all; }
.toasts { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); display: grid; gap: .5rem; z-index: 100; }
/* The toast is one of the few deep black pieces, like the quiet black bands of the website: it must be seen over a white page. */
.toast { background: #141414; border: 1px solid #141414; color: #ffffff; padding: .7rem 1.4rem; line-height: 1.4; border-radius: 2px; font-size: .88rem; box-shadow: 0 10px 30px rgba(20,20,20,.18); transition: opacity .5s, transform .5s; }
.toast.error { border-color: #e08a78; box-shadow: inset 3px 0 0 #e08a78, 0 10px 30px rgba(20,20,20,.18); }
.toast.out { opacity: 0; transform: translateY(8px); }
.loading { color: var(--muted); padding: 3rem 0; text-align: center; }

@media (max-width: 1100px) {
  .grid-main { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; padding: .8rem 1rem; gap: 1rem; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line-2); }
  .side .brand small, .side .brand b { display: none; }
  .side nav { display: flex; gap: .2rem; }
  .side nav a { padding: .55rem .7rem; white-space: nowrap; font-size: .8rem; }
  .side nav a span { display: none; }
  .side nav a.active span { display: inline; }
  .side-foot { margin: 0 0 0 auto; display: flex; align-items: center; gap: .8rem; }
  .side-foot .who { display: none; }
  .grid-2, .form-grid, .form-grid.three, .vv-specs { grid-template-columns: 1fr; }
  .main { padding-top: 1.4rem; }
  .tracker { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 1rem; }
  td, th { padding: .7rem .7rem; }
  .hide-sm { display: none; }
}
@media (max-width: 640px) {
  .portal-top { padding: .8rem 16px; }
  .portal-top .brand > span:last-child { display: none; }
  .portal-top .right { gap: .9rem; font-size: .85rem; }
}

/* ================= Motion ================= */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-8px); } }
@keyframes glow { 50% { box-shadow: 0 0 0 6px rgba(168,133,77,.072); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes stripes { to { background-position: 40px 0; } }

/* page & content entrance */
#view > *, .portal-main > *, .auth-card { animation: fadeUp .55s var(--ease) both; }
#view > *:nth-child(2), .portal-main > *:nth-child(2) { animation-delay: .06s; }
#view > *:nth-child(3), .portal-main > *:nth-child(3) { animation-delay: .12s; }
#view > *:nth-child(4), .portal-main > *:nth-child(4) { animation-delay: .18s; }
.kpis > *, .grid-2 > *, .p-list > *, .mat-grid > *, .grid-main > * > .card { animation: fadeUp .6s var(--ease) both; }
.kpis > *:nth-child(2), .grid-2 > *:nth-child(2), .p-list > *:nth-child(2), .mat-grid > *:nth-child(2), .grid-main > * > .card:nth-child(2) { animation-delay: .07s; }
.kpis > *:nth-child(3), .grid-2 > *:nth-child(3), .p-list > *:nth-child(3), .mat-grid > *:nth-child(3), .grid-main > * > .card:nth-child(3) { animation-delay: .14s; }
.kpis > *:nth-child(4), .grid-2 > *:nth-child(4), .p-list > *:nth-child(4), .mat-grid > *:nth-child(4) { animation-delay: .21s; }
tbody tr { animation: fadeIn .45s var(--ease) both; }
tbody tr:nth-child(2) { animation-delay: .03s; } tbody tr:nth-child(3) { animation-delay: .06s; } tbody tr:nth-child(4) { animation-delay: .09s; } tbody tr:nth-child(n+5) { animation-delay: .12s; }
.input-item, .photo-grid figure, .feedback-item, .timeline-list li, .notice { animation: fadeUp .45s var(--ease) both; }
.vv-panel:not([hidden]) { animation: fadeIn .4s var(--ease); }
[data-vbody] > * { animation: fadeIn .45s var(--ease); }
.app-modal[open] { animation: modalIn .35s var(--ease); }
.app-modal[open]::backdrop { animation: fadeIn .3s ease; }
.toast { animation: fadeUp .35s var(--ease); }
.tracker li.now::before { animation: glow 2s ease-in-out infinite; }
.card, .kpi, .btn, .chip, .vtab, .mat-card, .input-item { transition: border-color .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease); }
.badge { transition: color .4s, border-color .4s; }

/* busy buttons */
.is-busy { position: relative; pointer-events: none; }
.btn.is-busy, .btn-mini.is-busy, .link-btn.is-busy, .chip.is-busy { color: transparent !important; }
.btn.is-busy::after, .btn-mini.is-busy::after, .link-btn.is-busy::after, .chip.is-busy::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  border: 2px solid rgba(20,20,20,.25); border-top-color: var(--gold-2); animation: spin .8s linear infinite;
}
.btn-gold.is-busy::after { border-color: rgba(255,255,255,.35); border-top-color: var(--on-gold); }
.btn:disabled.is-busy { opacity: 1; }
select.is-busy { opacity: .6; }

/* skeleton */
.skel { background: linear-gradient(90deg, var(--ink-2) 0%, var(--ink-4) 50%, var(--ink-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 2px; }
.skel-title { height: 42px; width: 50%; margin-bottom: 1rem; }
.skel-line { height: 14px; margin-bottom: 2rem; }
.skel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; }
.skel-card { height: 180px; border-radius: 2px; }

/* ================= Live generation panel ================= */
.gen-live { border: 1px solid var(--line); border-radius: 2px; padding: 1.3rem 1.4rem; background: linear-gradient(160deg, rgba(168,133,77,.072), rgba(255,255,255,.2) 60%); }
.gen-live-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.gen-live-head b { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; }
.gen-live-head .live { display: inline-flex; align-items: center; gap: .45rem; font-size: .6rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-2); margin-right: .7rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #d35a4a; box-shadow: 0 0 0 0 rgba(211,90,74,.6); animation: livePulse 1.6s infinite; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 8px rgba(211,90,74,0); } 100% { box-shadow: 0 0 0 0 rgba(211,90,74,0); } }
.gen-elapsed { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; color: var(--muted); }
.gen-bar { position: relative; height: 10px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.gen-bar i {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px; transition: width 1.2s var(--ease);
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  box-shadow: 0 0 18px rgba(168,133,77,.27);
}
.gen-bar i::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: repeating-linear-gradient(-45deg, rgba(168,133,77,.16) 0 10px, transparent 10px 20px); background-size: 40px 100%; animation: stripes 1s linear infinite;
}
.gen-pct { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin: .45rem 0 1.1rem; }
.gen-pct b { color: var(--gold-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.gen-stages { list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid; gap: .5rem; }
.gen-stage { display: grid; grid-template-columns: 30px 1fr auto; gap: .8rem; align-items: center; padding: .65rem .8rem; border-radius: 2px; border: 1px solid transparent; transition: all .5s var(--ease); }
.gen-stage .ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--muted); font-size: .8rem; transition: all .5s var(--ease); }
.gen-stage h5 { margin: 0; font-family: var(--sans); font-weight: 500; font-size: .85rem; color: var(--cream-2); }
.gen-stage p { margin: 0; font-size: .75rem; color: var(--muted); }
.gen-stage .cnt { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.gen-stage.active { border-color: var(--line); background: rgba(168,133,77,.07); }
.gen-stage.active .ic { border-color: var(--gold); }
.gen-stage.active .ic::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--gold-2); animation: spin .8s linear infinite; }
.gen-stage.active h5 { color: var(--cream); }
.gen-stage.done .ic { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.gen-stage.done .ic::before { content: "✓"; font-weight: 600; }
.gen-stage.failed .ic { border-color: var(--bad); color: var(--bad); }
.gen-stage.failed .ic::before { content: "!"; }
.gen-stage.pending { opacity: .55; }
.gen-log { background: var(--ink); border: 1px solid var(--line-2); border-radius: 2px; padding: .8rem .9rem; max-height: 190px; overflow-y: auto; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .76rem; line-height: 1.65; scroll-behavior: smooth; }
.gen-log p { margin: 0; color: var(--cream-2); animation: slideIn .4s var(--ease) both; }
.gen-log time { color: var(--muted); margin-right: .7rem; }
.gen-log p.new .txt::after { content: "▍"; color: var(--gold-2); margin-left: 2px; animation: blink 1s step-end infinite; }
.gen-log p.ok { color: var(--gold-2); }
.gen-log p.bad { color: var(--bad); }
.version-error { border: 1px solid rgba(168,58,42,.4); border-radius: 2px; padding: 1rem 1.2rem; color: var(--bad); background: rgba(168,58,42,.06); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .is-busy::after, .spinner, .gen-stage.active .ic::before { animation-duration: .8s !important; animation-iteration-count: infinite !important; }
}
.net-bar { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200; pointer-events: none; opacity: 0; transition: opacity .3s; overflow: hidden; }
.net-bar::before { content: ""; position: absolute; top: 0; bottom: 0; width: 35%; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); animation: netbar 1.1s ease-in-out infinite; }
.net-bar.on { opacity: 1; }
@keyframes netbar { from { left: -35%; } to { left: 100%; } }
.grid-2 > .card + .card, .grid-main > .card + .card { margin-top: 0; }

/* ================= Schedule ================= */
.sch-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.sch-kpis > * { animation: fadeUp .55s var(--ease) both; }
.sch-kpis > *:nth-child(2) { animation-delay: .06s; } .sch-kpis > *:nth-child(3) { animation-delay: .12s; }
.sch-toolbar { justify-content: space-between; }
.sch-nav { display: flex; align-items: center; gap: .4rem; }
.sch-nav b { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; margin-left: .6rem; }
[data-body] { transition: opacity .25s; }
.sch-fade { opacity: .35; }
.sch-week { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); border: 1px solid var(--line-2); border-radius: 2px; background: var(--ink-2); overflow: hidden; animation: fadeIn .4s var(--ease); }
.sch-hours { display: flex; flex-direction: column; border-right: 1px solid var(--line-2); }
.sch-corner { height: 64px; border-bottom: 1px solid var(--line-2); }
.sch-hours span:not(.sch-corner) { font-size: .64rem; color: var(--muted); text-align: right; padding: 0 .5rem; transform: translateY(-.45em); font-variant-numeric: tabular-nums; }
.sch-col { border-right: 1px solid var(--line-2); min-width: 0; }
.sch-col:last-child { border-right: 0; }
.sch-col.closed .sch-lane { background: repeating-linear-gradient(-45deg, transparent 0 8px, rgba(20,20,20,.025) 8px 16px); }
.sch-day { height: 64px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.sch-day b { font-weight: 500; font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.sch-day span { font-family: var(--serif); font-size: 1.35rem; line-height: 1; }
.sch-day small { font-size: .6rem; color: var(--gold); }
.sch-day small.last { color: var(--warn); } .sch-day small.full { color: var(--bad); }
.sch-col.is-today .sch-day span { color: var(--ink); background: var(--gold); border-radius: 999px; padding: .1rem .5rem; }
.sch-lane { position: relative; background-image: linear-gradient(to bottom, var(--line-2) 1px, transparent 1px); background-size: 100% var(--px); }
.sch-open { position: absolute; left: 0; right: 0; background: rgba(20,20,20,.032); border-top: 1px dashed rgba(20,20,20,.2); border-bottom: 1px dashed rgba(20,20,20,.2); pointer-events: none; }
.sch-free { position: absolute; left: 4px; right: 4px; border: 1px dashed transparent; border-radius: 2px; background: transparent; color: transparent; font-size: .62rem; cursor: pointer; transition: all .2s; z-index: 1; }
.sch-lane:hover .sch-free { color: rgba(20,20,20,.62); }
.sch-free:hover { border-color: var(--gold); color: var(--gold-2) !important; background: rgba(168,133,77,.09); }
.sch-ev { position: absolute; left: 3px; right: 3px; z-index: 2; text-align: left; border: 0; border-left: 3px solid var(--gold); border-radius: 2px; padding: .3rem .45rem; background: rgba(168,133,77,.16); color: var(--cream); cursor: pointer; overflow: hidden; display: flex; flex-direction: column; gap: 1px; transition: transform .2s var(--ease), box-shadow .2s; animation: fadeUp .4s var(--ease) both; }
.sch-ev:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(20,20,20,.117); z-index: 3; }
.sch-ev b { font-weight: 500; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch-ev span { font-size: .64rem; color: var(--cream-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch-ev.web { border-left-color: var(--info); background: rgba(143,176,201,.18); }
.sch-ev.delivery { border-left-color: var(--ok); background: rgba(46,107,62,.2); }
.sch-row.delivery { border-left-color: var(--ok); }
.sch-ev.block { border-left-color: var(--muted); background: repeating-linear-gradient(-45deg, rgba(133,133,133,.22) 0 6px, rgba(133,133,133,.12) 6px 12px); }
.sch-ev.st-completed { opacity: .6; } .sch-ev.st-no_show { opacity: .5; border-left-color: var(--bad); }
.sch-now { position: absolute; left: 0; right: 0; height: 2px; background: #d35a4a; z-index: 4; pointer-events: none; }
.sch-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #d35a4a; }
.sch-legend { display: flex; gap: .5rem 1rem; flex-wrap: wrap; align-items: center; margin-top: .8rem; }
.sch-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.lg.visit { background: var(--gold); } .lg.web { background: var(--info); } .lg.block { background: var(--muted); } .lg.free { border: 1px dashed var(--gold); }
.sch-group { margin-bottom: 1.4rem; animation: fadeUp .45s var(--ease) both; }
.sch-group h4 { font-family: var(--sans); font-weight: 500; font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin: 0 0 .6rem; }
.sch-row { width: 100%; display: grid; grid-template-columns: 90px 1fr auto; gap: 1rem; align-items: center; text-align: left; padding: .9rem 1.1rem; margin-bottom: .5rem; border: 1px solid var(--line-2); border-left: 3px solid var(--gold); border-radius: 2px; background: var(--ink-2); color: var(--cream); cursor: pointer; font: inherit; transition: all .25s var(--ease); }
.sch-row:hover { border-color: var(--line); transform: translateX(3px); }
.sch-row.block { border-left-color: var(--muted); }
.sch-time { font-family: var(--serif); font-size: 1.25rem; display: flex; flex-direction: column; line-height: 1.1; }
.sch-time small, .sch-what small { font-family: var(--sans); font-size: .72rem; color: var(--muted); }
.sch-what { display: flex; flex-direction: column; min-width: 0; }
.sch-what b { font-weight: 500; }
.sch-tags { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.sch-detail .sch-kind { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 0 0 .4rem; }
.sch-when { font-family: var(--serif); font-size: 1.5rem; line-height: 1.25; margin: 0 0 1rem; }
.sch-when::first-letter { text-transform: uppercase; }
.sch-when small { font-family: var(--sans); font-size: .85rem; color: var(--muted); }
.sch-dl dd a { color: var(--gold-2); }
.sch-resched { margin-top: 1.2rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 2px; background: rgba(20,20,20,.04); }
.sch-resched h5, .sch-h5 { font-family: var(--sans); font-size: .66rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin: 0 0 .8rem; }
.sch-h5 { margin-top: 1.4rem; }
.sch-check { display: flex; align-items: center; gap: .6rem; margin: .9rem 0; font-size: .88rem; color: var(--cream-2); cursor: pointer; }
.sch-check input { width: auto; accent-color: var(--gold); }
.sch-emails .row { padding: .5rem 0; }
.sch-hours-edit { display: grid; gap: .45rem; }
.sch-hrow { display: grid; grid-template-columns: 170px 120px 12px 120px; gap: .6rem; align-items: center; }
.sch-hrow input[type=time] { padding: .5rem .6rem; }
.sch-hrow input:disabled { opacity: .35; }
@media (max-width: 860px) {
  .sch-kpis { grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
  .sch-kpis .kpi b { font-size: 1.7rem; }
  .sch-week { grid-template-columns: 36px repeat(7, minmax(56px, 1fr)); overflow-x: auto; }
  .sch-row { grid-template-columns: 72px 1fr; }
  .sch-tags { grid-column: 1 / -1; justify-content: flex-start; }
  .sch-hrow { grid-template-columns: 1fr 1fr 10px 1fr; }
  .sch-hrow .sch-check { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .sch-kpis .kpi span, .sch-dash .kpi span { font-size: .56rem; letter-spacing: .1em; line-height: 1.5; display: block; }
  .sch-kpis .kpi { padding: .9rem .8rem; }
  .sch-time { white-space: nowrap; font-size: 1.1rem; }
  .sch-row { grid-template-columns: 88px 1fr; }
}

/* ================= Voice recorder ================= */
.voice { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.1rem; padding: .9rem 1rem .9rem .9rem; border: 1px solid var(--line-2); border-radius: 999px; background: var(--ink); transition: border-color .4s var(--ease), background .4s var(--ease), box-shadow .4s var(--ease); }
.voice[data-state="recording"] { border-color: rgba(211,90,74,.55); background: linear-gradient(90deg, rgba(211,90,74,.1), rgba(255,255,255,.2) 60%); box-shadow: 0 0 0 4px rgba(211,90,74,.06); }
.voice[data-state="processing"] { border-color: var(--line); }
.mic { position: relative; width: 58px; height: 58px; flex: none; border-radius: 50%; border: 1px solid var(--gold); background: rgba(168,133,77,.09); color: var(--gold-2); cursor: pointer; display: grid; place-items: center; padding: 0;
  transition: background .35s var(--ease), border-color .35s var(--ease), transform .2s var(--ease), color .35s; }
.mic:hover:not(:disabled) { background: rgba(168,133,77,.16); transform: scale(1.04); }
.mic:active:not(:disabled) { transform: scale(.96); }
.mic:disabled { cursor: default; }
.mic > span { grid-area: 1 / 1; }
.mic-ic { display: grid; place-items: center; transition: opacity .25s var(--ease), transform .35s var(--ease); }
.mic-ic svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.stop-ic { width: 18px; height: 18px; border-radius: 2px; background: #ffffff; opacity: 0; transform: scale(.3) rotate(-45deg); transition: opacity .25s var(--ease), transform .4s cubic-bezier(.3,1.5,.5,1); }
.mic-spin { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(20,20,20,.25); border-top-color: var(--gold-2); opacity: 0; animation: spin .8s linear infinite; transition: opacity .25s; }
.mic-ring { position: absolute; inset: -1px; border-radius: 50%; pointer-events: none; opacity: 0; border: 2px solid rgba(211,90,74,.55);
  transform: scale(calc(1 + var(--lvl, 0) * .55)); transition: transform .09s linear, opacity .3s; }
.voice[data-state="recording"] .mic { background: #c0473b; border-color: #c0473b; color: #ffffff; }
.voice[data-state="recording"] .mic-ic { opacity: 0; transform: scale(.4); }
.voice[data-state="recording"] .stop-ic { opacity: 1; transform: none; }
.voice[data-state="recording"] .mic-ring { opacity: 1; }
.voice[data-state="recording"] .mic::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 1px solid rgba(211,90,74,.35); animation: micPulse 1.8s ease-out infinite; pointer-events: none; }
.voice[data-state="starting"] .mic-ic, .voice[data-state="processing"] .mic-ic { opacity: 0; transform: scale(.4); }
.voice[data-state="starting"] .mic-spin, .voice[data-state="processing"] .mic-spin { opacity: 1; }
@keyframes micPulse { from { transform: scale(1); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.voice-main { min-width: 0; display: grid; gap: .35rem; }
.voice-top { display: flex; align-items: center; flex-wrap: wrap; gap: .1rem .55rem; min-width: 0; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; transition: background .3s; }
.voice[data-state="recording"] .rec-dot { background: #e0584a; animation: blink 1.2s step-end infinite; }
.rec-time { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95rem; font-variant-numeric: tabular-nums; color: var(--cream); min-width: 3.4ch; }
.voice-label { font-size: .8rem; line-height: 1.35; color: var(--muted); flex: 1 1 150px; min-width: 0; }
.voice[data-state="recording"] .voice-label { color: var(--cream-2); }
.wave { width: 100%; height: 30px; display: block; }
.voice-cancel { opacity: 0; transform: translateX(6px); transition: opacity .3s, transform .3s var(--ease); }
.voice[data-state="recording"] .voice-cancel { opacity: 1; transform: none; }
.voice-cancel[hidden] { display: inline-block !important; visibility: hidden; }
.voice-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-top: .6rem; }
.voice-foot p { margin: 0; flex: 1; min-width: 200px; }
.voice-foot p.bad { color: var(--bad); } .voice-foot p.warn { color: var(--warn); } .voice-foot p.ok { color: var(--ok); }
[data-audio-status].bad { color: var(--bad); } [data-audio-status].ok { color: var(--ok); }
.mic-select { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--muted); max-width: 100%; }
.mic-select svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.6; flex: none; }
.mic-select select { padding: .4rem 1.8rem .4rem .7rem; font-size: .8rem; border-radius: 999px; max-width: 260px; }
label.btn.is-busy { color: transparent !important; pointer-events: none; }
label.btn.is-busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid rgba(20,20,20,.25); border-top-color: var(--gold-2); animation: spin .8s linear infinite; }
label.btn { position: relative; }
@media (max-width: 560px) { .voice { border-radius: 2px; grid-template-columns: auto 1fr; } .voice-cancel { grid-column: 1 / -1; justify-self: end; } }

/* Version view: open-in-viewer affordances */
.vv-tabbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.vv-tabbar .vv-tabs { flex: 1 1 auto; min-width: 0; }
.vv-viewer-btn, .vv-expand { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--line); background: rgba(255,255,255,.9); color: var(--gold-2);
  font: 500 .6rem var(--sans); letter-spacing: .2em; text-transform: uppercase; padding: .6rem .9rem; border-radius: 999px; cursor: pointer; transition: all .3s var(--ease); }
.vv-viewer-btn { margin-bottom: .6rem; }
.vv-viewer-btn:hover, .vv-expand:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.vv-viewer-btn svg, .vv-expand svg, .vv-zoom svg { width: 15px; height: 15px; flex: none; }
.vv-expand { position: absolute; z-index: 3; bottom: .8rem; right: .8rem; backdrop-filter: blur(6px); }
.vv-sketch[data-open] { cursor: zoom-in; }
.mat-img[data-open] { cursor: zoom-in; overflow: hidden; }
.mat-img img { transition: transform .8s var(--ease); }
.mat-img[data-open]:hover img { transform: scale(1.04); }
.vv-zoom { position: absolute; z-index: 2; bottom: .6rem; right: .6rem; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.9); color: var(--gold-2); opacity: 0; transform: scale(.85); transition: all .3s var(--ease); }
.mat-img[data-open]:hover .vv-zoom, .mat-img[data-open]:focus-visible .vv-zoom { opacity: 1; transform: none; }
@media (hover: none) { .vv-zoom { opacity: 1; transform: none; } }
.mat-actions { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .9rem; flex-wrap: wrap; }
button.mat-pick { margin: 0; border: 1px solid var(--gold); background: transparent; border-radius: 999px; padding: .55rem .95rem; cursor: pointer; font: 500 .6rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); transition: all .3s var(--ease); }
button.mat-pick:hover { background: rgba(168,133,77,.126); }
button.mat-pick.on { background: var(--gold); color: var(--ink); }

/* Full-screen design viewer */
.dv { width: min(1480px, calc(100vw - 24px)); height: calc(100dvh - 24px); max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 2px;
  background: var(--ink); color: var(--cream); overflow: hidden; }
.dv::backdrop { background: rgba(20,20,20,.484); backdrop-filter: blur(6px); }
.dv[open] { animation: modalIn .4s var(--ease); }
.dv[open]::backdrop { animation: fadeIn .3s ease; }
.dv.closing { animation: dvOut .22s ease forwards; }
.dv.closing::backdrop { animation: fadeOut .22s ease forwards; }
@keyframes dvOut { to { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes fadeOut { to { opacity: 0; } }
.dv-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); height: 100%; width: 100%; }
.dv-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem .8rem 1.4rem; border-bottom: 1px solid var(--line-2); }
.dv-title { min-width: 0; display: flex; flex-direction: column; }
.dv-title small { font-size: .58rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.dv-title b { font: 400 1.35rem/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-tools { display: flex; align-items: center; gap: .8rem; flex: none; }
.dv-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.dv-seg button { border: 0; background: none; color: var(--cream-2); padding: .45rem .85rem; border-radius: 999px; cursor: pointer; font: 500 .58rem var(--sans); letter-spacing: .18em; text-transform: uppercase; transition: all .3s var(--ease); }
.dv-seg button[aria-pressed=true] { background: var(--gold); color: var(--ink); }
.dv-count { font-size: .72rem; letter-spacing: .12em; color: var(--muted); font-variant-numeric: tabular-nums; }
.dv-x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--cream); font-size: 1.5rem; line-height: 1; cursor: pointer; transition: all .3s var(--ease); }
.dv-x:hover { border-color: var(--gold); color: var(--gold-2); transform: rotate(90deg); }
.dv-main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 0; }
.dv-stage-wrap { position: relative; min-height: 0; padding: 1.2rem 3.6rem; display: flex; background: radial-gradient(ellipse at center, var(--ink-2) 0%, var(--ink) 75%); }
.dv-stage { flex: 1; min-width: 0; min-height: 0; position: relative; }
.dv-frame { position: absolute; border-radius: 2px; overflow: hidden; background: var(--ink-3); box-shadow: 0 30px 80px rgba(20,20,20,.143);
  opacity: 1; transform: none; transition: opacity .6s cubic-bezier(.4,0,.2,1), transform .9s var(--ease); }
.dv-frame.dv-next { opacity: 0; transform: scale(1.012); }
.dv-frame.dv-leaving { pointer-events: none; box-shadow: none; }
.dv-frame.dv-leaving.dv-fade { opacity: 0; transform: scale(.992); transition: opacity .5s ease, transform .6s var(--ease); }
.dv-frame.compare { border: 1px solid var(--line-2); }
.dv-frame .compare-img, .dv-img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.dv-frame.paper .dv-img { object-fit: contain; background: #e9e9e9; }
.dv-frame.compare .compare-handle i { width: 52px; height: 52px; }
.dv-empty { display: grid; place-items: center; }
.dv-empty span { background: rgba(255,255,255,.9); padding: .5rem 1rem; border-radius: 999px; font-size: .8rem; }
.dv-nav { position: absolute; top: 50%; z-index: 4; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.9);
  color: var(--gold-2); font-size: 1.6rem; line-height: 1; cursor: pointer; transition: all .3s var(--ease); }
.dv-nav:hover { background: var(--gold); color: var(--ink); }
.dv-nav.prev { left: .7rem; } .dv-nav.next { right: .7rem; }
.dv-rail { border-left: 1px solid var(--line-2); overflow-y: auto; padding: 1rem .8rem 1.4rem; background: var(--ink-2); overscroll-behavior: contain; }
.dv-group + .dv-group { margin-top: 1.2rem; }
.dv-group h6 { margin: 0 0 .6rem .4rem; font: 500 .58rem var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.dv-list { display: flex; flex-direction: column; gap: .45rem; }
.dv-item { position: relative; display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left; padding: .45rem; border-radius: 2px; border: 1px solid transparent;
  background: none; color: var(--cream); cursor: pointer; transition: all .3s var(--ease); animation: slideIn .4s var(--ease) both; }
.dv-item:hover { background: var(--ink-3); }
.dv-item[aria-current=true] { background: var(--ink-3); border-color: var(--gold); }
.dv-thumb { width: 84px; aspect-ratio: 3/2; flex: none; border-radius: 2px; overflow: hidden; background: var(--ink-4); }
.dv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dv-thumb i { display: block; width: 100%; height: 100%; }
.dv-meta { min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.dv-meta b { font: 400 1.05rem/1.2 var(--serif); }
.dv-meta small { font-size: .55rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); }
.dv-meta .mat-sw { margin-top: .2rem; } .dv-meta .mat-sw i { width: 13px; height: 13px; }
.dv-badge { position: absolute; top: .3rem; left: .3rem; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--ink); font-size: .7rem; display: grid; place-items: center; animation: modalIn .3s var(--ease); }
.dv-info { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; padding: .9rem 1.4rem; border-top: 1px solid var(--line-2); min-height: 96px; }
.dv-text { min-width: 0; animation: fadeUp .45s var(--ease); }
.dv-text h3 { font-size: 1.4rem; } .dv-text h3 small { font: 500 .55rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); margin-left: .4rem; vertical-align: middle; }
.dv-text p { margin: .2rem 0 0; font-size: .86rem; color: var(--cream-2); max-width: 70ch; }
.dv-text .dv-hint { font-size: .72rem; color: var(--muted); }
.dv-text .dv-note { font-size: .74rem; color: var(--gold-2); }
.dv-actions { display: flex; align-items: center; gap: .8rem; flex: none; }
.dv-chosen { font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); animation: fadeIn .3s ease; }
.dv-chosen.ok { color: var(--ok); }
@media (max-width: 820px) {
  .dv { width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .dv-top { padding: .6rem .6rem .6rem 1rem; }
  .dv-title b { font-size: 1.1rem; }
  .dv-count { display: none; }
  .dv-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .dv-stage-wrap { padding: .6rem; }
  .dv-rail { min-width: 0; }
  .dv-top { min-width: 0; }
  .dv-title { flex: 1 1 auto; }
  /* With the before / after switch the header takes two rows: the whole title, then the switch and the close button. */
  .dv-design .dv-top:has(.dv-seg:not([hidden])) { flex-wrap: wrap; row-gap: .5rem; }
  .dv-design .dv-top:has(.dv-seg:not([hidden])) .dv-title { flex: 1 1 100%; }
  .dv-design .dv-top:has(.dv-seg:not([hidden])) .dv-tools { flex: 1 1 100%; justify-content: space-between; }
  .dv-nav { width: 38px; height: 38px; margin-top: -19px; font-size: 1.3rem; }
  .dv-nav.prev { left: .9rem; } .dv-nav.next { right: .9rem; }
  .dv-rail { border-left: 0; border-top: 1px solid var(--line-2); display: flex; gap: 1rem; overflow-x: auto; overflow-y: hidden; padding: .7rem .8rem; }
  .dv-group + .dv-group { margin-top: 0; }
  .dv-group h6 { margin-left: .1rem; white-space: nowrap; }
  .dv-list { flex-direction: row; }
  .dv-item { flex-direction: column; align-items: stretch; gap: .35rem; width: 104px; flex: none; padding: .3rem; }
  .dv-thumb { width: 100%; }
  .dv-meta b { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dv-meta small, .dv-meta .mat-sw { display: none; }
  .dv-info { flex-direction: column; align-items: stretch; gap: .6rem; padding: .7rem 1rem calc(.8rem + env(safe-area-inset-bottom)); }
  .dv-text p:not(.dv-note) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .dv-actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .dv[open], .dv-item, .dv.closing { animation: none; } .dv-frame { transition: none; } }

/* Studio 3D editor */
.btn-mini.gold { border-color: var(--gold); color: var(--gold-2); }
.btn-mini.gold:hover { background: var(--gold); color: var(--ink); }
.btn-mini.danger { border-color: rgba(168,58,42,.5); color: var(--bad); }
.btn-mini[aria-pressed=true] { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn-mini:disabled { opacity: .35; cursor: default; }
.me .dv-tools .btn { padding: .75em 1.2em; }
.me-ic { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--cream); font-size: 1.1rem; cursor: pointer; transition: all .3s var(--ease); }
.me-ic:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-2); }
.me-ic:disabled { opacity: .3; cursor: default; }
.me-main { grid-template-columns: minmax(0, 1fr) 380px; }
.me-short { display: none; }
.me-keep { padding: 0 .4rem; font-size: .74rem; color: var(--cream-2); }
.me-stage { position: relative; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; background: #ebe8e2; }
.me-canvas { position: relative; min-height: 0; }
.me-canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.me-add { position: absolute; top: .9rem; left: .9rem; right: .9rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; pointer-events: none; }
.me-add > * { pointer-events: auto; }
.me-add span { font-size: .56rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); margin-right: .3rem; }
.me-add button { border: 1px solid var(--line); background: rgba(255,255,255,.9); color: var(--cream); border-radius: 999px; padding: .42rem .8rem; font: 400 .74rem var(--sans); cursor: pointer; backdrop-filter: blur(6px); transition: all .25s var(--ease); }
.me-add button:hover { border-color: var(--gold); color: var(--gold-2); transform: translateY(-1px); }
.me-bar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .7rem .9rem; border-top: 1px solid var(--line-2); }
.me-size { margin-left: auto; font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.me-hint { margin: 0; padding: 0 .9rem .7rem; font-size: .72rem; color: var(--muted); }
.me-panel { display: flex; flex-direction: column; padding: 0; }
.me-tabs { display: flex; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: var(--ink-2); z-index: 1; }
.me-tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: .9rem .4rem; font: 500 .6rem var(--sans); letter-spacing: .2em; text-transform: uppercase; cursor: pointer; transition: all .3s var(--ease); }
.me-tabs button[aria-selected=true] { color: var(--gold-2); border-bottom-color: var(--gold); }
.me-body { padding: 1rem; overflow-y: auto; flex: 1; animation: fadeIn .3s ease; }
.me-units { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.me-chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .05rem; border: 1px solid var(--line-2); background: var(--ink); color: var(--cream); border-radius: 2px; padding: .4rem .65rem; font: 400 .8rem var(--sans); cursor: pointer; transition: all .25s var(--ease); }
.me-chip small { font-size: .52rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.me-chip[aria-pressed=true] { border-color: var(--gold); background: rgba(168,133,77,.108); }
.me-chip.sw { flex-direction: row; align-items: center; gap: .45rem; }
.me-chip.sw i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(20,20,20,.2); }
.me-sec { border-top: 1px solid var(--line-2); padding-top: 1rem; margin-top: 1rem; display: grid; gap: .7rem; animation: fadeUp .35s var(--ease); }
.me-sec h6 { margin: 0; font: 500 .58rem var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.me-sec h6 small { letter-spacing: .08em; text-transform: none; color: var(--muted); font-weight: 300; margin-left: .3rem; }
.me-row { display: flex; gap: .6rem; align-items: flex-end; }
.me-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.me-f { position: relative; display: grid; gap: .3rem; min-width: 0; }
.me-f.grow { flex: 1; }
.me-f span { font-size: .56rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-f i { position: absolute; right: .55rem; bottom: .55rem; font-style: normal; font-size: .62rem; color: var(--muted); pointer-events: none; }
.me input[type=text], .me input[type=number], .me select, .me textarea { width: 100%; min-width: 0; background: var(--ink); border: 1px solid var(--line-2); color: var(--cream); border-radius: 2px; padding: .5rem .6rem; font: 400 .85rem var(--sans); transition: border-color .25s; }
.me input[type=number] { padding-right: 1.9rem; -moz-appearance: textfield; }
.me input::-webkit-inner-spin-button { opacity: .4; }
.me input:focus, .me select:focus, .me textarea:focus { outline: none; border-color: var(--gold); }
.me-check { display: flex; align-items: center; gap: .5rem; font-size: .82rem; padding-bottom: .55rem; cursor: pointer; white-space: nowrap; }
.me-check input { accent-color: var(--gold); width: 16px; height: 16px; }
.me-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.me-fronts { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.me-front { position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 84px auto; gap: .35rem; align-items: center; padding: .35rem .35rem .35rem .8rem; border: 1px solid var(--line-2); border-radius: 2px; background: var(--ink); animation: slideIn .3s var(--ease); }
.me-front .me-fvis { position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--gold); opacity: .7; }
.me-front input[type=number] { padding-right: .4rem; }
.me-front select, .me-front input { font-size: .78rem; padding: .4rem .45rem; }
.me-fbtns { display: flex; gap: 2px; }
.me-fbtns button { width: 26px; height: 28px; border: 1px solid var(--line-2); background: none; color: var(--cream-2); border-radius: 2px; cursor: pointer; transition: all .2s; }
.me-fbtns button:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-2); }
.me-fbtns button:disabled { opacity: .25; cursor: default; }
.me-addf { display: flex; flex-wrap: wrap; gap: .3rem; }
.me-addf button { border: 1px dashed var(--line); background: none; color: var(--cream-2); border-radius: 999px; padding: .32rem .65rem; font: 400 .72rem var(--sans); cursor: pointer; transition: all .2s; }
.me-addf button:hover { border-style: solid; border-color: var(--gold); color: var(--gold-2); }
.me-colors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.me-color { display: flex; align-items: center; gap: .55rem; border: 1px solid var(--line-2); border-radius: 2px; padding: .4rem .55rem; cursor: pointer; font-size: .8rem; }
.me-color input { width: 30px; height: 30px; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; }
.me-color input::-webkit-color-swatch-wrapper { padding: 0; } .me-color input::-webkit-color-swatch { border: 1px solid rgba(20,20,20,.25); border-radius: 50%; }
.me-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; justify-self: start; }
.me-seg button { border: 0; background: none; color: var(--cream-2); padding: .4rem .9rem; border-radius: 999px; cursor: pointer; font: 500 .58rem var(--sans); letter-spacing: .16em; text-transform: uppercase; transition: all .3s var(--ease); }
.me-seg button[aria-pressed=true] { background: var(--gold); color: var(--ink); }
.me-empty { color: var(--muted); font-size: .8rem; text-align: center; margin: .6rem 0; }
.me-pending { display: flex; gap: 1rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 2px; padding: .8rem; margin-bottom: 1rem; background: rgba(168,133,77,.07); animation: fadeUp .4s var(--ease); }
.me-pending img { width: 120px; aspect-ratio: 3/2; object-fit: cover; border-radius: 2px; flex: none; }
.me-pending b { font: 400 1.1rem var(--serif); }
.me-pending p { margin: .2rem 0; font-size: .85rem; }
.gen-box.locked { border-color: rgba(46,107,62,.45); background: rgba(46,107,62,.06); }
.gen-box.locked h3 { color: var(--ok); }
@media (max-width: 900px) {
  .me-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(240px, 42dvh) minmax(0, 1fr); }
  .me .dv-top { gap: .5rem; }
  .me .dv-tools { gap: .35rem; min-width: 0; }
  .me .dv-title { flex: 1; }
  .me-long, .me .dv-tools .btn[data-save=draft] { display: none; }
  .me-short { display: inline; }
  .me-ic { width: 34px; height: 34px; }
  .me-add, .me-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .me-add > *, .me-bar > * { flex: none; }
  .me-bar { padding: .5rem .6rem; }
  .me-body { padding: .8rem; }
  .me-grid3 { gap: .35rem; }
  .me-front { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) 70px auto; }
  .me .dv-tools .btn { padding: .7em .9em; font-size: .56rem; letter-spacing: .14em; }
  .me .dv-title small { display: none; }
  .me-add { top: .5rem; left: .5rem; right: .5rem; } .me-add span { display: none; }
  .me-add button { padding: .32rem .6rem; font-size: .68rem; }
  .me-hint, .me-size { display: none; }
  .me-panel { border-top: 1px solid var(--line-2); }
}

/* Sketches: the scanned original and the refined drawing, cross-fading in one frame */
.vv-sk-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin: 0 0 1rem; }
.vv-sk-seg button { border: 0; background: none; color: var(--cream-2); padding: .5rem 1rem; border-radius: 999px; cursor: pointer; font: 500 .6rem var(--sans); letter-spacing: .18em; text-transform: uppercase; transition: all .35s var(--ease); }
.vv-sk-seg button[aria-pressed=true] { background: var(--gold); color: var(--ink); }
.vv-sk-stack { display: grid; }
.vv-sk-stack > .vv-sketch { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: rotate(-.4deg) translateY(6px); transition: opacity .6s cubic-bezier(.4,0,.2,1), transform .8s var(--ease), visibility 0s .6s; }
.vv-sk-stack > .vv-sketch.on { opacity: 1; visibility: visible; transform: rotate(-.4deg); transition: opacity .6s cubic-bezier(.4,0,.2,1), transform .8s var(--ease), visibility 0s; }
.vv-sketch.raw { background: #f1f1f1; padding: 0; overflow: hidden; transform: rotate(.5deg); box-shadow: 0 1px 0 rgba(168,133,77,.036) inset, 0 24px 60px rgba(20,20,20,.13); }
.vv-sk-stack > .vv-sketch.raw.on { transform: rotate(.5deg); }
.vv-sketch.raw figcaption { padding: .6rem 1rem .8rem; background: #e9e9e9; }

/* Approval celebration (portal) */
.celebrate { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 2px; overflow: hidden auto;
  color: var(--cream); background: radial-gradient(120% 70% at 50% 0%, #ffffff 0%, var(--ink-2) 55%, var(--ink) 100%); box-shadow: 0 40px 120px rgba(20,20,20,.156); }
.celebrate::backdrop { background: rgba(20,20,20,.451); backdrop-filter: blur(8px); }
.celebrate[open] { animation: celIn .9s cubic-bezier(.16,1,.3,1) both; }
.celebrate[open]::backdrop { animation: fadeIn .6s ease both; }
.celebrate.closing { animation: celOut .38s ease forwards; }
.celebrate.closing::backdrop { animation: fadeOut .38s ease forwards; }
@keyframes celIn { from { opacity: 0; transform: translateY(28px) scale(.94); } }
@keyframes celOut { to { opacity: 0; transform: translateY(12px) scale(.97); } }
.cel-inner { padding: 2.6rem 2.2rem 2.2rem; text-align: center; }
.cel-seal { position: relative; width: 120px; height: 120px; margin: 0 auto 1.4rem; }
.cel-seal svg { position: relative; z-index: 1; width: 100%; height: 100%; overflow: visible; }
.cel-seal circle, .cel-seal path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cel-ring { stroke: var(--gold); stroke-width: 1.6; stroke-dasharray: 327; stroke-dashoffset: 327; transform: rotate(-90deg); transform-origin: 60px 60px; animation: celDraw 1.1s cubic-bezier(.65,0,.35,1) .35s forwards; }
.cel-ring2 { stroke: rgba(20,20,20,.34); stroke-width: 1; stroke-dasharray: 277; stroke-dashoffset: 277; transform: rotate(90deg); transform-origin: 60px 60px; animation: celDraw 1.1s cubic-bezier(.65,0,.35,1) .55s forwards; }
.cel-check { stroke: var(--gold-2); stroke-width: 3; stroke-dasharray: 64; stroke-dashoffset: 64; animation: celDraw .55s cubic-bezier(.65,0,.35,1) 1.2s forwards; }
@keyframes celUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes celDraw { to { stroke-dashoffset: 0; } }
.cel-seal::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: radial-gradient(circle, rgba(168,133,77,.16), rgba(168,133,77,0) 70%); opacity: 0; animation: celGlow 2.8s ease-in-out 1.5s infinite; }
@keyframes celGlow { 0%, 100% { opacity: 0; transform: scale(.9); } 45% { opacity: 1; transform: scale(1.18); } }
.cel-seal i { position: absolute; left: 50%; top: 50%; width: 2px; height: 12px; margin: -6px 0 0 -1px; border-radius: 2px; background: linear-gradient(var(--gold-2), rgba(168,133,77,0));
  opacity: 0; transform: rotate(var(--a)) translateY(-40px); animation: celRay var(--d) cubic-bezier(.16,1,.3,1) 1.45s forwards; }
@keyframes celRay { 0% { opacity: 0; transform: rotate(var(--a)) translateY(-44px) scaleY(.4); } 35% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-78px) scaleY(1); } }
.cel-eyebrow, .cel-title, .cel-lead, .cel-note, .cel-btn { opacity: 0; animation: celUp .8s cubic-bezier(.16,1,.3,1) forwards; }
.cel-eyebrow { animation-delay: 1.35s; margin-bottom: .6rem; }
.cel-title { font-size: clamp(1.9rem, 6vw, 2.5rem); font-weight: 300; animation-delay: 1.45s; }
.cel-lead { margin: .8rem auto 0; max-width: 34ch; color: var(--cream-2); animation-delay: 1.55s; }
.cel-steps { list-style: none; display: flex; justify-content: center; gap: 0; margin: 1.8rem 0 1.6rem; padding: 0; }
.cel-steps li { position: relative; flex: 1; font-size: .54rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding-top: 1.35rem;
  opacity: 0; animation: celUp .6s cubic-bezier(.16,1,.3,1) forwards; animation-delay: calc(1.7s + var(--i) * .12s); }
.cel-steps li span { position: absolute; top: 0; left: 50%; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; border: 1px solid var(--line); background: var(--ink); }
.cel-steps li:not(:last-child)::after { content: ""; position: absolute; top: 5px; left: calc(50% + 9px); right: calc(-50% + 9px); height: 1px; background: var(--line-2); }
.cel-steps li.done { color: var(--cream-2); }
.cel-steps li.done span { background: var(--gold); border-color: var(--gold); }
.cel-steps li.done::after { background: var(--gold); }
.cel-steps li.next { color: var(--gold-2); }
.cel-steps li.next span { border-color: var(--gold-2); animation: celNext 1.8s ease-in-out 2.3s infinite; }
@keyframes celNext { 0%, 100% { box-shadow: 0 0 0 0 rgba(168,133,77,.3); } 60% { box-shadow: 0 0 0 7px rgba(168,133,77,0); } }
.cel-note { display: flex; gap: .9rem; align-items: flex-start; text-align: left; border: 1px solid var(--line); border-radius: 2px; padding: .9rem 1rem; background: rgba(168,133,77,.07); animation-delay: 2.25s; }
.cel-note p { margin: 0; font-size: .88rem; color: var(--cream-2); }
.cel-note b { color: var(--cream); font-weight: 400; }
.cel-bell { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-2); border: 1px solid var(--line); }
.cel-bell svg { width: 17px; height: 17px; transform-origin: 50% 20%; animation: celBell 1s ease 2.6s 1; }
@keyframes celBell { 20% { transform: rotate(14deg); } 40% { transform: rotate(-11deg); } 60% { transform: rotate(7deg); } 80% { transform: rotate(-3deg); } }
.cel-btn { margin-top: 1.5rem; min-width: 60%; animation-delay: 2.4s; }
@media (max-width: 480px) { .cel-inner { padding: 2rem 1.3rem 1.5rem; } .cel-steps li { font-size: .48rem; letter-spacing: .08em; } }
@media (prefers-reduced-motion: reduce) {
  .celebrate[open], .cel-eyebrow, .cel-title, .cel-lead, .cel-note, .cel-btn, .cel-steps li, .cel-ring, .cel-ring2, .cel-check { animation-duration: .01s !important; animation-delay: 0s !important; }
  .cel-seal i, .cel-seal::before { display: none; }
}

/* Approved banner on the project page */
.approved-card { display: flex; gap: 1.1rem; align-items: center; padding: 1.2rem 1.4rem; margin: 0 0 1.2rem; border: 1px solid rgba(20,20,20,.34); border-radius: 2px;
  background: linear-gradient(110deg, rgba(168,133,77,.09), rgba(20,20,20,.025) 60%); animation: fadeUp .7s var(--ease) both; }
.approved-card .eyebrow { margin: 0 0 .25rem; }
.approved-card h3 { font-size: 1.4rem; }
.approved-card p:last-child { margin: .25rem 0 0; font-size: .88rem; color: var(--cream-2); }
.approved-seal { flex: none; width: 46px; height: 46px; }
.approved-seal svg { width: 100%; height: 100%; }
.approved-seal circle, .approved-seal path { fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.approved-seal path { stroke: var(--gold-2); stroke-width: 2.2; }

/* Status steps (studio) */
.stg-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.stg-head .badge { font-size: .62rem; }
.stg-wait { font-size: .78rem; color: var(--muted); font-style: italic; }
.stg-summary { margin: 1rem 0 1.4rem; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: 2px; background: rgba(20,20,20,.04); animation: fadeUp .5s var(--ease) both; }
.stg-summary p { margin: .2rem 0; font-size: .9rem; }
.stg-summary b { font-weight: 500; color: var(--cream); }
.stg-ok { color: var(--ok); }
.stg-opts { margin: .3rem 0 0; padding-left: 1.2rem; font-size: .88rem; color: var(--cream-2); }
.stg-alert { margin-top: .7rem; padding: .7rem .9rem; border-left: 3px solid var(--warn); background: rgba(150,80,10,.08); border-radius: 0 2px 2px 0; }
.stg-alert p { margin: .2rem 0 .5rem; font-style: italic; }
.stg-sheet[open] { animation: modalIn .35s var(--ease); }
.stg-sheet.closing { animation: dvOut .2s ease forwards; }
.stg-sheet .app-modal-inner { max-height: calc(100dvh - 40px); overflow-y: auto; }
.stg-lead { color: var(--cream-2); font-size: .92rem; margin: -.3rem 0 1.1rem; }
.stg-body { display: grid; gap: 1rem; }
.stg-body > .stg-lead { margin-bottom: 0; }
.stg-notify { margin: 0; }
.stg-conflict { margin-top: 1rem; padding: .8rem 1rem; border: 1px solid rgba(150,80,10,.5); border-radius: 2px; background: rgba(150,80,10,.08); font-size: .88rem; animation: fadeUp .35s var(--ease); }
.stg-conflict ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.stg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; }
.stg-card { position: relative; text-align: left; display: grid; gap: .25rem; padding: .9rem 1rem; border-radius: 2px; border: 1px solid var(--line-2); background: var(--ink); color: var(--cream); cursor: pointer; transition: all .3s var(--ease); animation: fadeUp .4s var(--ease) both; }
.stg-card:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-2px); }
.stg-card b { font: 400 1.1rem var(--serif); }
.stg-card small { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.stg-card em { position: absolute; top: .6rem; right: .7rem; font-style: normal; font-size: .5rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-2); }
.stg-card.rec { border-color: var(--gold); background: rgba(168,133,77,.072); }
.stg-card.cur { opacity: .55; cursor: default; }
.stg-card.neg b { color: var(--bad); }
.stg-versions { display: grid; gap: .5rem; }
.stg-ver { display: grid; grid-template-columns: auto 72px 1fr; align-items: center; gap: .8rem; padding: .5rem .7rem; border: 1px solid var(--line-2); border-radius: 2px; cursor: pointer; }
.stg-ver:has(input:checked) { border-color: var(--gold); background: rgba(168,133,77,.07); }
.stg-ver img, .stg-ver > span:empty { width: 72px; aspect-ratio: 3/2; object-fit: cover; border-radius: 2px; background: var(--ink-3); }
.stg-ver b { display: block; font: 400 1.05rem var(--serif); } .stg-ver small { color: var(--muted); font-size: .76rem; }
.stg-ver input, .stg-var input { accent-color: var(--gold); }
.stg-vars { display: flex; flex-wrap: wrap; gap: .4rem; }
.stg-var { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .75rem; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; font-size: .85rem; }
.stg-var:has(input:checked) { border-color: var(--gold); background: rgba(168,133,77,.09); }
.stg-var i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(20,20,20,.2); }
.stg-quick { display: flex; flex-wrap: wrap; gap: .35rem; align-self: end; }

/* Delivery date picker */
.dp { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.2rem; }
.dp-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: .8rem; margin-bottom: .8rem; }
.dp-dur { max-width: 160px; }
.dp-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; margin-bottom: .9rem; }
.dp-opt { position: relative; text-align: left; display: grid; gap: .15rem; padding: .6rem .7rem; border-radius: 2px; border: 1px dashed var(--line); background: none; color: var(--cream-2); cursor: pointer; transition: all .25s var(--ease); }
.dp-opt span { font-size: .5rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.dp-opt b { font-weight: 400; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-opt i { position: absolute; top: .3rem; right: .45rem; font-style: normal; opacity: 0; transition: opacity .2s; }
.dp-opt.set { border-style: solid; color: var(--cream); background: rgba(168,133,77,.07); }
.dp-opt.set i { opacity: .6; } .dp-opt.set i:hover { opacity: 1; color: var(--bad); }
.dp-opt.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.dp-cal { border: 1px solid var(--line-2); border-radius: 2px; padding: .7rem; background: var(--ink); }
.dp-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.dp-cal-head b { font: 400 1.1rem var(--serif); text-transform: capitalize; }
.dp-cal-head button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--cream); cursor: pointer; }
.dp-cal-head button:hover { border-color: var(--gold); }
.dp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.dp-wd { text-align: center; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: .2rem 0; }
.dp-cell { position: relative; aspect-ratio: 1; min-width: 0; border-radius: 2px; border: 1px solid transparent; background: var(--ink-3); color: var(--cream); cursor: pointer; font-size: .82rem; transition: all .2s var(--ease); }
.dp-cell:hover:not(:disabled) { border-color: var(--gold); }
.dp-cell.out { opacity: .35; }
.dp-cell.closed { background: repeating-linear-gradient(-45deg, var(--ink-2) 0 5px, var(--ink-3) 5px 10px); color: var(--muted); }
.dp-cell:disabled { opacity: .2; cursor: default; }
.dp-cell.sel { border-color: var(--cream-2); }
.dp-cell.picked { background: var(--gold); color: var(--ink); font-weight: 500; }
.dp-cell em { position: absolute; top: 2px; right: 4px; font-style: normal; font-size: .55rem; font-weight: 600; }
.dp-cell .dots { position: absolute; left: 0; right: 0; bottom: 1px; font-style: normal; font-size: .6rem; letter-spacing: 1px; color: var(--warn); line-height: 1; }
.dp-cell.picked .dots { color: var(--ink); }
.dp-day { border: 1px solid var(--line-2); border-radius: 2px; padding: .9rem 1rem; min-height: 100%; background: var(--ink); }
.dp-day.anim { animation: fadeUp .35s var(--ease); }
.dp-day h4 { font: 400 1.25rem var(--serif); margin: 0 0 .3rem; text-transform: capitalize; }
.dp-day h5 { margin: .9rem 0 .4rem; font: 500 .56rem var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.dp-busy { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; font-size: .84rem; }
.dp-busy li { display: flex; gap: .6rem; padding: .35rem .55rem; border-radius: 2px; background: rgba(150,80,10,.08); border-left: 2px solid var(--warn); }
.dp-busy span { color: var(--cream-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dp-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: .3rem; }
.dp-time { padding: .45rem 0; border-radius: 2px; border: 1px solid var(--line-2); background: none; color: var(--cream); cursor: pointer; font-variant-numeric: tabular-nums; font-size: .82rem; transition: all .2s var(--ease); }
.dp-time:hover:not(:disabled) { border-color: var(--gold); }
.dp-time:disabled { opacity: .25; text-decoration: line-through; cursor: default; }
.dp-time.on { background: var(--gold); color: var(--ink); border-color: var(--gold); }
@media (max-width: 760px) { .dp { grid-template-columns: 1fr; } .dp-opts { grid-template-columns: 1fr; } }

/* Stage card (portal) */
.stc { display: flex; gap: 1.2rem; align-items: flex-start; padding: 1.5rem 1.6rem; margin: 0 0 1.4rem; border: 1px solid var(--line); border-radius: 2px;
  background: linear-gradient(120deg, rgba(168,133,77,.09), rgba(20,20,20,.025) 60%); animation: fadeUp .7s var(--ease) both; }
.stc-ic { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--gold); display: grid; place-items: center; color: var(--gold-2); }
.stc-ic svg { width: 22px; height: 22px; }
.stc-main { flex: 1; min-width: 0; }
.stc .eyebrow { margin-bottom: .3rem; }
.stc h3 { font-size: 1.6rem; }
.stc p { margin: .4rem 0 0; color: var(--cream-2); }
.stc-big { font: 400 1.3rem var(--serif); color: var(--cream) !important; }
.stc-note { margin: 1rem 0 0; padding: .8rem 1rem; border-left: 2px solid var(--gold); background: rgba(255,255,255,.9); border-radius: 0 2px 2px 0; }
.stc-note p { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--cream); }
.stc-note cite { display: block; margin-top: .3rem; font-style: normal; font-size: .72rem; color: var(--gold-2); }
.stc-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .7rem; margin: 1.2rem 0; }
.stc-opt { position: relative; display: grid; justify-items: center; gap: .1rem; padding: 1.1rem .8rem 1rem; border-radius: 2px; border: 1px solid var(--line-2); background: var(--ink); color: var(--cream); cursor: pointer;
  transition: all .35s var(--ease); animation: fadeUp .5s var(--ease) both; animation-delay: calc(.15s + var(--i) * .08s); }
.stc-opt:hover { border-color: var(--gold); transform: translateY(-3px); }
.stc-opt[aria-checked=true] { border-color: var(--gold); background: rgba(168,133,77,.108); box-shadow: 0 0 0 1px var(--gold), 0 18px 40px rgba(20,20,20,.091); }
.stc-wd { font-size: .58rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.stc-day { font: 300 2.6rem/1 var(--serif); }
.stc-month { font-size: .8rem; color: var(--cream-2); text-transform: capitalize; }
.stc-time { margin-top: .45rem; font-size: .85rem; font-variant-numeric: tabular-nums; }
.stc-check { position: absolute; top: .55rem; right: .6rem; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--ink); font-size: .7rem; display: grid; place-items: center; opacity: 0; transform: scale(.5); transition: all .3s var(--ease); }
.stc-opt[aria-checked=true] .stc-check { opacity: 1; transform: none; }
.stc-actions { gap: 1rem; align-items: center; }
.stc-other { margin-top: 1rem; animation: fadeUp .35s var(--ease); }
.stc-sent { color: var(--ok) !important; font-size: .85rem; }
@media (max-width: 560px) {
  .stc { flex-direction: column; padding: 1.2rem; }
  .stc-opts { grid-template-columns: 1fr; }
  .stc-opt { grid-template-columns: 58px 1fr; justify-items: start; align-items: center; column-gap: 1rem; row-gap: 0; padding: .9rem 1rem; }
  .stc-day { grid-column: 1; grid-row: 1 / 4; justify-self: center; font-size: 2.4rem; }
  .stc-wd, .stc-month, .stc-time { grid-column: 2; }
  .stc-time { margin-top: .15rem; }
}

/* 3D editor: interior fittings */
.me-presets { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.me-presets span { font-size: .52rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-right: .2rem; }
.me-presets button { border: 1px solid var(--line); background: rgba(168,133,77,.07); color: var(--cream); border-radius: 999px; padding: .32rem .7rem; font: 400 .72rem var(--sans); cursor: pointer; transition: all .2s var(--ease); }
.me-presets button:hover { border-color: var(--gold); color: var(--gold-2); }
.me-presets button.clear { background: none; border-style: dashed; color: var(--muted); }
.me-secs { display: inline-flex; flex-wrap: wrap; gap: .25rem; margin-left: .3rem; }
.me-chip.small { padding: .28rem .6rem; font-size: .7rem; flex-direction: row; }
.me-inner .me-front { grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "ic name btns" "ic vals vals"; row-gap: .35rem; padding: .45rem .45rem .45rem .7rem; }
.me-inner .me-ic-t { grid-area: ic; align-self: start; padding-top: .15rem; }
.me-inner .me-iname { grid-area: name; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.me-inner .me-fbtns { grid-area: btns; }
.me-ivals { grid-area: vals; display: flex; gap: .35rem; flex-wrap: wrap; }
.me-ivals select { width: auto; font-size: .74rem !important; padding: .35rem .4rem !important; }
.me-ivals .me-mini { width: 92px; }
.me-ic-t { color: var(--gold-2); font-size: .95rem; text-align: center; }
.me-mini { position: relative; display: block; }
.me-mini span { position: absolute; left: .45rem; top: 50%; transform: translateY(-50%); font-size: .62rem; color: var(--muted); pointer-events: none; }
.me-mini input { padding-left: 1.3rem !important; padding-right: .3rem !important; }
.btn-mini.on { background: var(--gold); color: var(--ink); border-color: var(--gold); }

/* Public pages: survey link and certificate verification */
.pub-page { background: radial-gradient(120% 60% at 50% 0%, var(--ink-2) 0%, var(--ink) 60%); min-height: 100vh; }
.pub-top { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem clamp(1rem, 4vw, 3rem); }
.pub-top .brand { display: flex; align-items: center; gap: .7rem; color: var(--cream); text-decoration: none; font: 400 1.05rem var(--serif); letter-spacing: .14em; text-transform: uppercase; }
.pub-top .mono { width: 40px; height: 40px; border-radius: 0; border: 1px solid currentColor; display: grid; place-items: center; font: 400 1.15rem var(--serif); color: var(--cream); letter-spacing: .02em; }
.pub-main { max-width: 640px; margin: 0 auto; padding: 1.5rem 16px 4rem; }
.pub-main.wide { max-width: 1180px; }
.pub-card { padding: clamp(1.5rem, 5vw, 2.8rem); border: 1px solid var(--line); border-radius: 2px; background: linear-gradient(160deg, rgba(168,133,77,.072), rgba(255,255,255,.9) 45%); animation: fadeUp .7s var(--ease) both; }
.pub-card h1 { font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 300; }
.pub-lead { color: var(--cream-2); margin: .7rem 0 1.6rem; }

/* Star rating */
.sv-stars { display: inline-flex; gap: .15rem; }
.sv-stars button { width: 30px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink-4); transition: transform .2s var(--ease), color .2s; }
.sv-stars button svg { width: 100%; height: 100%; fill: currentColor; stroke: rgba(20,20,20,.34); stroke-width: .8; }
.sv-stars button.on { color: var(--gold); }
.sv-stars button:hover { transform: scale(1.12); }
.sv-stars button.pop { animation: svPop .45s var(--ease); }
@keyframes svPop { 40% { transform: scale(1.35) rotate(-8deg); } }
.sv-stars.big { gap: .4rem; }
.sv-stars.big button { width: 54px; height: 54px; animation: fadeUp .5s var(--ease) both; animation-delay: calc(var(--i) * .06s); }
.sv-overall { text-align: center; padding: .6rem 0 1rem; }
.sv-caption { margin: .5rem 0 0; font: italic 400 1.35rem var(--serif); color: var(--gold-2); min-height: 1.6em; }
.sv-more { display: grid; gap: .8rem; }
.sv-more.sv-reveal { animation: fadeUp .5s var(--ease) both; }
.sv-more h4 { margin: .8rem 0 0; font: 500 .6rem var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.sv-aspects { display: grid; gap: .3rem; }
.sv-aspect { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .35rem .2rem; border-bottom: 1px solid var(--line-2); }
.sv-aspect span { font-size: .92rem; }
.sv-yn { display: inline-flex; gap: .4rem; flex-wrap: wrap; }
.sv-yn button { border: 1px solid var(--line); background: none; color: var(--cream); border-radius: 999px; padding: .5rem 1.2rem; cursor: pointer; transition: all .25s var(--ease); font: 400 .88rem var(--sans); }
.sv-yn button[aria-checked=true] { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.sv-quote { font-size: .86rem; }
.sv-static { display: inline-flex; gap: 2px; vertical-align: middle; }
.sv-static i { width: 16px; height: 16px; color: var(--ink-4); }
.sv-static i.on { color: var(--gold); }
.sv-static svg { width: 100%; height: 100%; fill: currentColor; }
.sv-answer { display: grid; gap: .5rem; animation: fadeUp .5s var(--ease) both; }
.sv-answer-head { display: flex; align-items: center; gap: .7rem; }
.sv-answer-head .sv-static i { width: 26px; height: 26px; }
.sv-answer-head b { font: italic 400 1.3rem var(--serif); color: var(--gold-2); }
.sv-aspect-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.sv-aspect-list li { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; color: var(--cream-2); }
.sv-rec { margin: 0; color: var(--ok); font-size: .9rem; }
.sv-done { width: 96px; height: 96px; margin: 0 auto 1rem; }
.sv-done svg, .cv-seal svg { width: 100%; height: 100%; overflow: visible; }
.sv-done circle, .sv-done path, .cv-seal circle, .cv-seal path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sv-done .cel-check, .cv-seal .cel-check { animation-delay: .7s; }

/* Certificate verification */
.cv-badge { display: flex; gap: 1.2rem; align-items: center; margin: .5rem 0 1.8rem; animation: fadeUp .7s var(--ease) both; }
.cv-seal { flex: none; width: 78px; height: 78px; }
.cv-seal .cel-ring { stroke: var(--ok); } .cv-seal .cel-check { stroke: var(--ok); }
.cv-badge h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 300; }
.cv-badge .pub-lead { margin: .3rem 0 0; }
.cv-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.2rem, 3vw, 2.5rem); align-items: start; }
.cv-paper { margin: 0; padding: 12px; background: #e6e6e6; border-radius: 2px; box-shadow: 0 40px 90px rgba(20,20,20,.143); transform: rotate(-.6deg); animation: fadeUp .9s var(--ease) .15s both; }
.cv-paper img { width: 100%; height: auto; display: block; }
.cv-record { animation: fadeUp .8s var(--ease) .25s both; }
.cv-ids { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: 0 0 1rem; }
.cv-ids div { padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 2px; background: rgba(168,133,77,.07); }
.cv-ids dt, .cv-fields dt { font: 500 .55rem var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.cv-ids dd { margin: .2rem 0 0; font: 400 1.05rem var(--serif); }
.cv-compare { font-size: .85rem; color: var(--cream-2); font-style: italic; }
.cv-fields { margin: 0; display: grid; gap: 0; }
.cv-fields div { padding: .65rem 0; border-top: 1px solid var(--line-2); }
.cv-fields dd { margin: .15rem 0 0; font: 400 1.1rem var(--serif); color: var(--cream); }
.cv-dl { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.4rem 0 0; }
.cv-vis { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.cv-vis h4 { margin: 0 0 .6rem; font: 500 .6rem var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.cv-state { text-align: center; max-width: 560px; margin: 3rem auto; }
.cv-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line); font-size: 1.6rem; margin-bottom: 1rem; }
.cv-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cv-state.private .cv-icon { color: var(--gold-2); border-color: var(--gold); }
.cv-state.bad .cv-icon { color: var(--bad); border-color: rgba(168,58,42,.5); }
.cv-code { font: italic 1.2rem var(--serif); color: var(--muted); }
.cv-skel { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.cv-skel span { height: 520px; border-radius: 2px; background: linear-gradient(90deg, var(--ink-2), var(--ink-3), var(--ink-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@media (max-width: 820px) { .cv-grid, .cv-skel { grid-template-columns: 1fr; } .cv-paper { transform: none; } }
@media (max-width: 560px) { .cv-ids { grid-template-columns: 1fr 1fr; } .cv-ids div:first-child { grid-column: 1 / -1; } .cv-badge { align-items: flex-start; } .cv-seal { width: 56px; height: 56px; } }

/* Portal: certificate + survey on a completed project */
.fin { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.2rem; margin: 0 0 1.4rem; }
.fin > section { padding: 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: 2px; background: linear-gradient(140deg, rgba(168,133,77,.072), rgba(255,255,255,.6) 60%); animation: fadeUp .7s var(--ease) both; }
.fin-cert { display: flex; gap: 1.2rem; align-items: flex-start; }
.fin-thumb { flex: none; width: 150px; padding: 6px; background: #e6e6e6; border-radius: 2px; box-shadow: 0 16px 40px rgba(20,20,20,.117); transform: rotate(-1.2deg); transition: transform .4s var(--ease); }
.fin-thumb:hover { transform: rotate(0) scale(1.03); }
.fin-thumb img { width: 100%; display: block; }
.fin-body { min-width: 0; }
.fin-body h3 { font-size: 1.4rem; } .fin-body h4 { font: 400 1.25rem var(--serif); margin: 0; }
.fin-no { margin: .3rem 0; font: italic 1rem var(--serif); color: var(--cream-2); }
.fin-actions { gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .7rem; }
.fin-link { margin: .6rem 0 0; }
.fin-vis { margin-top: 1rem; }
.fin-vis > span { display: block; font: 500 .55rem var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: .4rem; }
.fin-vis .sv-yn button { padding: .35rem .8rem; font-size: .78rem; }
.fin-vis p { margin: .4rem 0 0; }
.fin-survey h3 { font-size: 1.4rem; margin-bottom: .6rem; }
.fin-survey .sv-stars.big button { width: 42px; height: 42px; }
.small-cert .fin-thumb { width: 96px; }
.fin-sv { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line-2); }
@media (max-width: 860px) { .fin { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .fin-cert { flex-direction: column; } .fin-thumb { width: 60%; } }

/* Studio: reviews */
.rv-top { display: grid; grid-template-columns: 220px minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.rv-score { display: grid; justify-items: center; align-content: center; gap: .3rem; text-align: center; }
.rv-score > b { font: 300 3.4rem/1 var(--serif); color: var(--gold-2); }
.rv-score .sv-static i { width: 20px; height: 20px; }
.rv-score span { font-size: .8rem; color: var(--muted); }
.rv-dist div { display: grid; grid-template-columns: 34px 1fr 28px; align-items: center; gap: .6rem; margin: .35rem 0; font-size: .85rem; }
.rv-dist i { height: 8px; border-radius: 999px; background: var(--ink-3); position: relative; overflow: hidden; }
.rv-dist i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--gold); border-radius: inherit; animation: rvGrow .9s var(--ease) both; }
@keyframes rvGrow { from { width: 0; } }
.rv-dist b { font-weight: 400; text-align: right; color: var(--cream-2); }
.rv-aspects div { display: flex; justify-content: space-between; padding: .45rem 0; border-bottom: 1px solid var(--line-2); font-size: .9rem; }
.rv-aspects b { font: 400 1.15rem var(--serif); color: var(--gold-2); }
.rv-list { display: grid; gap: .7rem; }
.rv-item { padding: 1rem 1.2rem; border: 1px solid var(--line-2); border-radius: 2px; background: var(--ink-2); animation: fadeUp .45s var(--ease) both; }
.rv-item header { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; }
.rv-item header a { color: var(--cream); text-decoration: none; }
.rv-comment { margin: .5rem 0; font: italic 1.1rem var(--serif); color: var(--cream); }
.rv-quote { color: var(--ok); }
.rv-acts { display: flex; gap: .4rem; justify-content: flex-end; }
.rv-item p { margin: .25rem 0; }
@media (max-width: 900px) { .rv-top { grid-template-columns: 1fr; } }

/* Native controls (date/time pickers, spinners, scrollbars, select arrows) drawn for a dark page, with the calendar
   and clock icons in gold so they stay visible on the dark fields. */
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"], input[type="week"] { color-scheme: light; }
input::-webkit-calendar-picker-indicator { filter: invert(72%) sepia(38%) saturate(520%) hue-rotate(2deg) brightness(115%); opacity: 1; cursor: pointer; transition: opacity .2s; }
input::-webkit-calendar-picker-indicator:hover { filter: invert(80%) sepia(40%) saturate(600%) hue-rotate(2deg) brightness(125%); }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { filter: invert(1) opacity(.55); }

/* ---------- Proposal (studio) ---------- */
.pe-status { margin: 0 0 .8rem; font-size: .9rem; color: var(--cream-2); }
.pe-status.st-signed { color: var(--ok); }
.pe-status.st-refinement, .pe-status.st-declined { color: var(--warn); }
.pe-sum { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .8rem; }
.pe-sum div { padding: .6rem .8rem; border: 1px solid var(--line-2); border-radius: 2px; }
.pe-sum span { display: block; font: 500 .55rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.pe-sum b { font: 400 1.25rem var(--serif); }
.pe-sig { padding: .6rem .8rem; border-left: 2px solid var(--ok); background: rgba(46,107,62,.07); border-radius: 0 2px 2px 0; margin-bottom: .8rem; }
.pe-sig p { margin: .1rem 0; }
.pe-acts { gap: .5rem; flex-wrap: wrap; align-items: center; }
.pe-pays { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line-2); display: grid; gap: .5rem; }
.pe-pays h4 { margin: 0; font: 500 .58rem var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.pe-pay { padding: .65rem .8rem; border: 1px solid var(--line-2); border-radius: 2px; }
.pe-pay > div:first-child { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pe-pay .badge { margin-left: auto; }
.pe-pay.st-reported { border-color: rgba(150,80,10,.55); background: rgba(150,80,10,.06); animation: glow 2.4s ease-in-out infinite; }
.pe-pay.st-confirmed { border-color: rgba(46,107,62,.45); }
.pe-pay p { margin: .3rem 0; }
.pe-pay .row { gap: .4rem; margin-top: .4rem; }
.pe-editor .dv-tools { gap: .7rem; }
.pe-saved { font-size: .72rem; color: var(--muted); min-width: 60px; text-align: right; }
.pe-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 0; }
.pe-left, .pe-right { overflow-y: auto; padding: 1.2rem 1.4rem 2rem; min-height: 0; }
.pe-left { border-right: 1px solid var(--line-2); display: grid; gap: .8rem; align-content: start; }
.pe-left h4, .pe-right h4 { margin: .4rem 0 0; font: 500 .6rem var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.pe-items { display: grid; gap: .35rem; }
.pe-row { display: grid; grid-template-columns: minmax(0, 1fr) 54px 104px 104px 26px; gap: .4rem; align-items: start; }
.pe-row.head { font-size: .56rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.pe-row input { width: 100%; min-width: 0; background: var(--ink); border: 1px solid var(--line-2); color: var(--cream); border-radius: 2px; padding: .45rem .55rem; font: 400 .86rem var(--sans); }
.pe-row input:focus { outline: none; border-color: var(--gold); }
.pe-descs { display: grid; gap: 3px; }
.pe-descs .pe-detail { font-size: .76rem; color: var(--cream-2); border-style: dashed; }
.pe-row b { font-weight: 400; text-align: right; padding-top: .45rem; font-variant-numeric: tabular-nums; }
.pe-del { width: 26px; height: 32px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; }
.pe-del:hover { color: var(--bad); }
.pe-disc { display: grid; grid-template-columns: 1.4fr 1fr; gap: .5rem; }
.pe-disc span, .pe-left .f > span, .pe-pct span { font-size: .56rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.pe-disc input, .pe-left input, .pe-left textarea { background: var(--ink); border: 1px solid var(--line-2); color: var(--cream); border-radius: 2px; padding: .5rem .6rem; font: 400 .88rem var(--sans); width: 100%; }
.pe-totals { display: grid; gap: .25rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 2px; background: rgba(20,20,20,.04); }
.pe-totals div { display: flex; justify-content: space-between; font-size: .88rem; color: var(--cream-2); font-variant-numeric: tabular-nums; }
.pe-totals .big { font: 400 1.35rem var(--serif); color: var(--cream); border-top: 1px solid var(--line); padding-top: .4rem; margin-top: .2rem; }
.pe-plan { display: grid; gap: .5rem; }
.pe-pct { max-width: 200px; }
.pe-ctools { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .8rem; }
.pe-ctools h4 { margin: 0 !important; }
.pe-ctools .dv-seg { margin-left: auto; }
.pe-md { width: 100%; min-height: 60vh; background: var(--ink); border: 1px solid var(--line-2); color: var(--cream); border-radius: 2px; padding: 1rem; font: 400 .86rem/1.6 ui-monospace, Menlo, Consolas, monospace; resize: vertical; }
.pe-empty { display: grid; justify-items: center; gap: 1rem; text-align: center; padding: 3rem 1rem; border: 1px dashed var(--line); border-radius: 2px; color: var(--cream-2); }
.pe-legal { margin: .8rem 0 0; font-size: .74rem; color: var(--muted); font-style: italic; }
@media (max-width: 960px) { .pe-main { grid-template-columns: 1fr; overflow-y: auto; } .pe-left, .pe-right { overflow: visible; } .pe-left { border-right: 0; border-bottom: 1px solid var(--line-2); } .pe-row { grid-template-columns: minmax(0, 1fr) 44px 86px 26px; } .pe-row b { display: none; } .pe-row.head span:nth-child(4) { display: none; } }

/* Documents as paper: the agreement and the invoice */
.doc-md, .pq-paper { background: #ffffff; border: 1px solid var(--line-2); color: #191919; border-radius: 2px; padding: clamp(1.4rem, 4vw, 3rem) clamp(1.2rem, 4vw, 3.2rem); box-shadow: 0 18px 50px rgba(20,20,20,.08); font: 400 .95rem/1.65 var(--sans); }
.doc-md h2 { font: 400 2rem/1.2 var(--serif); color: #191919; margin: 0 0 .6rem; }
.doc-md h3 { font: 500 1.25rem var(--serif); color: #191919; margin: 1.6rem 0 .5rem; padding-bottom: .3rem; border-bottom: 1px solid #cacaca; }
.doc-md h4 { font: 500 .95rem var(--sans); margin: 1rem 0 .3rem; }
.doc-md p { margin: 0 0 .75rem; }
.doc-md ul { margin: 0 0 .9rem; padding-left: 1.2rem; }
.doc-md li { margin: .25rem 0; }
.doc-md li::marker { color: #a8854d; }
.doc-md em { font-family: var(--serif); font-size: 1.08em; }
.doc-md strong { font-weight: 500; }
.pq-paper .doc-md { box-shadow: none; padding: 0; }
.inv { color: #191919; }
.inv-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding-bottom: 1rem; border-bottom: 1px solid #cacaca; }
.inv-head > div:first-child { display: grid; grid-template-columns: auto 1fr; column-gap: .7rem; align-items: center; }
.inv-mono { grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #a8854d; display: grid; place-items: center; font: italic 1.1rem var(--serif); color: #a8854d; }
.inv-head b { font: 400 1.15rem var(--serif); } .inv-head small { font-size: .72rem; color: #5d5d5d; }
.inv-no { text-align: right; } .inv-no h2 { font: 400 2.2rem/1 var(--serif); margin: 0; } .inv-no p { margin: .15rem 0 0; font-size: .8rem; color: #5d5d5d; }
.inv-parties { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; padding: 1rem 0; font-size: .82rem; line-height: 1.5; }
.inv h6 { margin: 0 0 .3rem; font: 500 .55rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #a8854d; }
.inv-parties p { margin: 0; }
.inv-items { width: 100%; border-collapse: collapse; font-size: .86rem; }
.inv-items th { text-align: left; font: 500 .55rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #a8854d; background: #e9e9e9; padding: .5rem .6rem; }
.inv-items th:not(:first-child), .inv-items td:not(:first-child) { text-align: right; white-space: nowrap; }
.inv-items td { padding: .6rem; border-bottom: 1px solid #e3e3e3; vertical-align: top; font-variant-numeric: tabular-nums; }
.inv-items td b { font-weight: 500; } .inv-items td small { display: block; color: #5d5d5d; font-size: .76rem; }
.inv-totals { margin: .8rem 0 0 auto; width: min(320px, 100%); display: grid; gap: .25rem; font-size: .86rem; }
.inv-totals div { display: flex; justify-content: space-between; color: #5d5d5d; font-variant-numeric: tabular-nums; }
.inv-totals .big { font: 500 1.35rem var(--serif); color: #191919; border-top: 1.5px solid #a8854d; padding-top: .4rem; }
.inv-plan { margin-top: 1.2rem; padding: .9rem 1rem; background: #efefef; border-radius: 2px; font-size: .86rem; }
.inv-plan div { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; }
@media (max-width: 600px) { .inv-parties { grid-template-columns: 1fr; } .inv-items th:nth-child(2), .inv-items td:nth-child(2), .inv-items th:nth-child(3), .inv-items td:nth-child(3) { display: none; } }

/* ---------- Business page ---------- */
.biz { display: grid; gap: 1.2rem; }
.biz-grid { margin-top: .8rem; }
.biz-full { grid-column: 1 / -1; }
.biz-need { font-style: normal; color: var(--warn); font-size: .56rem; letter-spacing: .12em; margin-left: .3rem; }
.biz-tpl .card-head .row { gap: .6rem; align-items: center; }
.biz-ph { display: flex; flex-wrap: wrap; gap: .3rem; margin: .6rem 0 .8rem; }
.biz-ph .chip { font: 400 .68rem ui-monospace, Menlo, monospace; letter-spacing: 0; text-transform: none; padding: .25rem .55rem; }
.biz-md { min-height: 70vh; }
.biz-preview { max-height: 75vh; overflow-y: auto; }

/* ---------- Proposal (portal) ---------- */
.pq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.4rem; align-items: stretch; margin: 0 0 1.4rem; border: 1px solid var(--line); border-radius: 2px; overflow: hidden;
  background: linear-gradient(135deg, rgba(168,133,77,.09), rgba(255,255,255,.7) 60%); animation: fadeUp .7s var(--ease) both; }
.pq-wait, .pq-signed { grid-template-columns: 1fr; }
.pq-img { min-height: 260px; background: var(--ink-3); }
.pq-img img { width: 100%; height: 100%; object-fit: cover; }
.pq-body { padding: 1.6rem 1.7rem; }
.pq-body h3 { font-size: 1.8rem; }
.pq-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: 1rem 0; }
.pq-facts dt { font: 500 .55rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.pq-facts dd { margin: .2rem 0 0; font: 400 1.15rem var(--serif); }
.pq-acts { gap: .8rem; align-items: center; flex-wrap: wrap; margin-top: .6rem; }
.pq-pays { display: grid; gap: .5rem; margin: 1.2rem 0; }
.pq-pay { padding: .7rem .9rem; border: 1px solid var(--line-2); border-radius: 2px; background: rgba(255,255,255,.9); }
.pq-pay > div { display: flex; justify-content: space-between; gap: 1rem; } .pq-pay span { font: 400 1.15rem var(--serif); }
.pq-pay p { margin: .2rem 0 0; color: var(--cream-2); }
.pq-pay.st-due { border-color: var(--gold); } .pq-pay.st-confirmed p { color: var(--ok); } .pq-pay.st-reported p { color: var(--gold-2); }
.pq-how { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 2px; background: rgba(168,133,77,.07); display: grid; gap: .4rem; justify-items: start; }
.pq-how p { margin: 0; }
.pq-interac { font-size: 1rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pq-interac b { font: 400 1.2rem var(--serif); color: var(--gold-2); }
.pq-how .btn { margin-top: .6rem; }
@media (max-width: 760px) { .pq { grid-template-columns: 1fr; } .pq-img { min-height: 200px; } .pq-facts { grid-template-columns: 1fr 1fr; } }
.pq-viewer .dv-tools { gap: .7rem; }
.pq-main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 0; }
.pq-doc { overflow-y: auto; padding: clamp(1rem, 3vw, 2.5rem); min-height: 0; background: radial-gradient(ellipse at top, var(--ink-3), var(--ink-2) 70%); }
.pq-doc > * { max-width: 860px; margin: 0 auto; }
.pq-in { animation: fadeUp .45s var(--ease) both; }
.pq-side { border-left: 1px solid var(--line-2); padding: 1.4rem 1.2rem; display: flex; flex-direction: column; gap: .7rem; background: var(--ink-2); overflow-y: auto; }
.pq-side .btn { width: 100%; }
.pq-decline { align-self: center; font-size: .82rem; color: var(--muted); }
.pq-cool { margin-top: .4rem; }
.pq-hash { margin-top: auto; font-size: .7rem; color: var(--muted); } .pq-hash code { font-size: .7rem; color: var(--cream-2); }
.pq-cover { display: grid; gap: 1rem; }
.pq-hero { margin: 0; border-radius: 2px; overflow: hidden; box-shadow: 0 30px 70px rgba(20,20,20,.13); }
.pq-hero img { width: 100%; display: block; }
.pq-cover h2 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 300; }
.pq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.4rem; padding: 1.2rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pq-grid h6 { margin: 0 0 .3rem; font: 500 .55rem var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.pq-grid p { margin: 0; }
.pq-choice { display: flex; align-items: center; gap: .35rem; font: 400 1.2rem var(--serif); }
.pq-choice i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(20,20,20,.2); }
.pq-choice b { font-weight: 400; margin-left: .3rem; }
.pq-big { font: 400 1.8rem var(--serif) !important; color: var(--gold-2); }
.pq-sketch { margin: 0; justify-self: center; width: min(420px, 100%); padding: 8px; background: #f1f1f1; transform: rotate(-1deg); box-shadow: 0 20px 50px rgba(20,20,20,.117); }
.pq-sketch img { width: 100%; display: block; }
@media (max-width: 860px) { .pq-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; } .pq-side { border-left: 0; border-top: 1px solid var(--line-2); } .pq-viewer .dv-seg button { padding: .4rem .6rem; } .pq-grid { grid-template-columns: 1fr; } }
.pq-sign .app-modal-inner { max-height: calc(100dvh - 40px); overflow-y: auto; }
.pq-steps { list-style: none; counter-reset: s; margin: 1rem 0; padding: 0; display: grid; gap: 1rem; }
.pq-steps > li { counter-increment: s; position: relative; padding-left: 2.4rem; display: grid; gap: .6rem; }
.pq-steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold-2); display: grid; place-items: center; font: 400 .9rem var(--serif); }
.pq-pad { position: relative; height: 150px; border-radius: 2px; background: #f7f7f7; border: 1px solid var(--line); overflow: hidden; }
.pq-pad canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.pq-pad-hint { position: absolute; left: 1rem; bottom: .7rem; font: italic .9rem var(--serif); color: #8a6c3c; pointer-events: none; border-top: 1px solid #cacaca; padding-top: .2rem; width: calc(100% - 2rem); }
.pq-pad .btn-mini { position: absolute; top: .5rem; right: .5rem; color: #5d5d5d; border-color: #cacaca; }
.pq-code { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.pq-code input { width: 150px; text-align: center; font: 400 1.4rem var(--serif); letter-spacing: .4em; background: var(--ink); border: 1px solid var(--line); color: var(--cream); border-radius: 2px; padding: .45rem .6rem; }
.pq-topics { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.pq-viewer .dv-shell { min-width: 0; }
@media (max-width: 640px) {
  .pq-viewer .dv-top { flex-wrap: wrap; gap: .5rem; }
  .pq-viewer .dv-title { flex: 1 1 100%; min-width: 0; }
  .pq-viewer .dv-tools { flex: 1 1 100%; justify-content: space-between; }
  .pq-main { grid-template-rows: minmax(0, 1fr) auto; }
  .pq-doc { padding: .8rem; }
  .pq-side { padding: .9rem 1rem; gap: .4rem; }
  .pq-side .pq-cool, .pq-side > .small.muted:not(.pq-cool) { display: none; }
  .inv-head { flex-direction: column; }
  .inv-head > div:last-child { text-align: left; }
}
.toasts[popover] { inset: auto auto 1.2rem 50%; margin: 0; padding: 0; border: 0; background: none; overflow: visible; color: inherit; }
.toasts { pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { pointer-events: auto; text-align: center; }
/* Phones: messages at the top. At the bottom they sat behind the floating tab bar of Safari on iOS 26 (and the
   toolbar of other phone browsers), blurred and cut: "Saved" looked broken on one iPhone and fine on another. */
@media (hover: none) and (pointer: coarse), (max-width: 640px) {
  .toasts, .toasts[popover] { top: calc(env(safe-area-inset-top, 0px) + .8rem); bottom: auto; }
  .toast { animation-name: fadeDown; border-color: var(--gold-fill); box-shadow: 0 14px 40px rgba(20,20,20,.22); }
  .toast.error { border-color: #e08a78; }
  .toast.out { transform: translateY(-8px); }
}
@keyframes fadeDown { from { opacity: 0; transform: translateY(-12px); } }
/* Proposal editor: the send checklist, the Agreement / Invoice panes, phones */
.pe-editor .dv-shell { grid-template-rows: auto auto minmax(0, 1fr); }
.pe-ready { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; padding: .55rem 1.4rem; border-bottom: 1px solid var(--line-2); background: rgba(168,133,77,.07); font-size: .8rem; }
.pe-ready-t { font: 500 .58rem var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.pe-need { display: inline-flex; align-items: center; gap: .35rem; color: var(--cream-2); }
.pe-need::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--gold); }
a.pe-need { color: var(--gold-2, var(--gold)); text-decoration: underline; text-underline-offset: 3px; }
.pe-ready-ok { color: var(--ok); }
.pe-editor [data-send]:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(.4); }
.pe-panes { margin-bottom: .9rem; }
.pe-right .pq-paper { font-size: .9rem; }
@media (max-width: 960px) {
  .pe-main { display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .pe-left, .pe-right { overflow: visible; min-height: auto; padding: 1rem; }
}
@media (max-width: 640px) {
  .pe-editor .dv-top { flex-wrap: wrap; gap: .5rem; padding: .6rem .8rem; }
  .pe-editor .dv-title { flex: 1 1 calc(100% - 60px); }
  .pe-editor .dv-tools { flex: 1 1 100%; justify-content: flex-end; }
  .pe-editor .dv-tools .btn { flex: 1; }
  .pe-ready { padding: .5rem 1rem; }
  .pe-ctools { gap: .5rem; }
  .pe-ctools .dv-seg { margin-left: 0; }
  .pe-ctools [data-src] { flex: 1 1 100%; }
  .pe-disc { grid-template-columns: 1fr; }
  .pe-row { grid-template-columns: minmax(0, 1fr) 40px 78px 22px; gap: .3rem; }
  .pe-left .form-grid { grid-template-columns: 1fr; }
}
.vv-lead { margin: 0 0 1rem; color: var(--cream-2); font-size: .92rem; max-width: 62ch; }
/* Design viewer on a phone held sideways: edge to edge, the image as large as possible, arrows on the image,
   a slim rail of options and a one-line footer with the choice. */
@media (max-height: 520px) and (orientation: landscape) {
  .dv { width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .dv-top { padding: .35rem calc(.6rem + env(safe-area-inset-right)) .35rem calc(1rem + env(safe-area-inset-left)); gap: .6rem; }
  .dv-title small { font-size: .5rem; }
  .dv-title b { font-size: 1rem; }
  .dv-seg button { padding: .35rem .7rem; }
  .dv-x { width: 34px; height: 34px; font-size: 1.25rem; }
  .dv-count { display: none; }
  .dv-main { grid-template-columns: minmax(0, 1fr) 150px; }
  .dv-stage-wrap { padding: .4rem .5rem .4rem calc(.5rem + env(safe-area-inset-left)); }
  .dv-nav { width: 36px; height: 36px; margin-top: -18px; font-size: 1.2rem; }
  .dv-nav.prev { left: calc(1rem + env(safe-area-inset-left)); } .dv-nav.next { right: 1rem; }
  .dv-rail { padding: .5rem calc(.5rem + env(safe-area-inset-right)) .5rem .5rem; }
  .dv-group h6 { font-size: .5rem; margin-bottom: .4rem; }
  .dv-list { gap: .35rem; }
  .dv-item { flex-direction: column; align-items: stretch; gap: .25rem; padding: .25rem; }
  .dv-thumb { width: 100%; }
  .dv-meta b { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dv-meta small, .dv-meta .mat-sw { display: none; }
  .dv-info { min-height: 0; padding: .4rem calc(.8rem + env(safe-area-inset-right)) calc(.4rem + env(safe-area-inset-bottom)) calc(1rem + env(safe-area-inset-left)); gap: .8rem; }
  .dv-text h3 { font-size: 1.05rem; }
  .dv-text p { display: none; }
  .dv-text p.dv-note { display: block; font-size: .66rem; }
  .dv-actions .btn { padding: .6em 1.1em; }
}
.dv-nav { transition: left .45s var(--ease), background .3s, color .3s; }
/* Agreement out of date */
.pe-stale { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--warn, #a9a9a9); border-left-width: 3px; border-radius: 2px; background: rgba(150,80,10,.08); }
.pe-stale b { font: 400 1.1rem var(--serif); color: var(--cream); }
.pe-stale p { margin: .3rem 0 0; font-size: .86rem; color: var(--cream-2); max-width: 60ch; }
.pe-stale-acts { display: flex; gap: .5rem; flex-wrap: wrap; }
.doc-md.is-stale { opacity: .55; filter: grayscale(.3); }
.pe-stale-card { border-color: var(--warn, #a9a9a9); margin-bottom: .8rem; }
@media (max-width: 640px) { .pe-stale-acts, .pe-stale-acts .btn { width: 100%; } }
/* Signing location: asked on request, recorded by the server, then locked */
.pq-geo { margin-top: .7rem; }
.pq-geo-ask { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.pq-geo-ask .btn { display: inline-flex; align-items: center; gap: .5rem; }
.pq-geo-done { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 2px; background: rgba(168,133,77,.07); animation: fadeIn .4s ease; }
.pq-geo-done b { display: block; font-weight: 500; font-size: .92rem; }
.pq-geo-done small { color: var(--muted); font-size: .74rem; }
.pq-geo-pin { color: var(--gold); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); flex: none; }
.pq-geo-lock { margin-left: auto; font-size: .9rem; opacity: .7; }
/* A private certificate seen by its owner or the studio */
.cv-private { display: flex; gap: .9rem; align-items: flex-start; margin: 0 0 1.4rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 2px; background: rgba(168,133,77,.07); }
.cv-private b { display: block; font: 400 1.1rem var(--serif); color: var(--cream); }
.cv-private p { margin: .25rem 0 0; font-size: .88rem; color: var(--cream-2); }

/* Studio notes */
.nt-list { display: grid; gap: 1.1rem; }
.nt { display: grid; gap: .8rem; transition: opacity .3s; }
.nt.off { opacity: .6; }
.nt-head { display: flex; gap: 1rem; align-items: center; }
.nt-title { flex: 1; min-width: 0; background: none; border: 0; border-bottom: 1px solid transparent; color: var(--cream); font: 400 1.35rem var(--serif); padding: .2rem 0; }
.nt-title:focus { outline: none; border-bottom-color: var(--gold); }
.nt-body { width: 100%; background: var(--ink); border: 1px solid var(--line-2); border-radius: 2px; color: var(--cream); padding: .8rem .9rem; font: 400 .92rem/1.6 var(--sans); resize: vertical; }
.nt-body:focus { outline: none; border-color: var(--gold); }
.nt-switch { display: inline-flex; align-items: center; gap: .45rem; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.nt-switch input { accent-color: var(--gold); }
.nt-imgs { display: flex; flex-wrap: wrap; gap: .6rem; }
.nt-imgs figure { position: relative; margin: 0; width: 96px; height: 96px; border-radius: 2px; overflow: hidden; border: 1px solid var(--line-2); }
.nt-imgs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nt-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--cream); cursor: pointer; line-height: 1; }
.nt-add { width: 96px; height: 96px; border: 1px dashed var(--line); border-radius: 2px; display: grid; place-items: center; align-content: center; gap: .2rem; color: var(--gold); cursor: pointer; text-align: center; }
.nt-add span { font-size: 1.4rem; line-height: 1; } .nt-add small { font-size: .62rem; color: var(--muted); }
.nt-add.busy { opacity: .5; pointer-events: none; }
.nt-foot { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.nt-uses { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; flex: 1; }
.nt-empty ul { margin: .4rem 0 1rem; padding-left: 1.1rem; color: var(--cream-2); line-height: 1.7; }

/* Materials list (studio only) */
.mt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.mt-head h3 { margin: .2rem 0; }
.mt-opts { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin: .9rem 0 1.1rem; }
.mt-opts .chip i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .4rem; vertical-align: -1px; }
.mt-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.mt-tiles div { border: 1px solid var(--line-2); border-radius: 2px; padding: .7rem .9rem; background: var(--ink-2); }
.mt-tiles span { display: block; font-size: .56rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.mt-tiles b { font: 400 1.5rem var(--serif); }
.mt-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .7rem; margin-bottom: .6rem; }
.mt-box { border: 1px solid var(--line-2); border-radius: 2px; padding: .8rem 1rem; }
.mt-box.warn { border-color: var(--warn, #a9a9a9); background: rgba(150,80,10,.06); }
.mt-box h5 { margin: 0 0 .3rem; font: 500 .58rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.mt-box ul { margin: 0; padding-left: 1rem; font-size: .86rem; color: var(--cream-2); line-height: 1.55; }
.mt-cat { margin-top: 1.3rem; }
.mt-cat h4 { margin: 0 0 .4rem; font: 400 1.15rem var(--serif); color: var(--cream); }
.mt-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(90px, .7fr) minmax(0, 1.6fr) 90px; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--line-2); align-items: start; }
.mt-row.sug { background: linear-gradient(90deg, rgba(20,20,20,.04), transparent); }
.mt-name b { display: block; font-weight: 500; font-size: .92rem; }
.mt-name small, .mt-qty small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.45; margin-top: .15rem; }
.mt-tag { font-style: normal; font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-left: .4rem; }
.mt-qty b { font: 400 1.15rem var(--serif); } .mt-qty span { font-size: .8rem; color: var(--cream-2); }
.mt-buy { display: grid; gap: .35rem; }
.mt-link { display: block; text-decoration: none; padding: .35rem .6rem; border: 1px solid var(--line-2); border-radius: 2px; transition: border-color .2s, background .2s; }
.mt-link:hover { border-color: var(--gold); background: rgba(168,133,77,.07); }
.mt-link span { color: var(--gold-2, var(--gold)); font-size: .78rem; font-weight: 500; }
.mt-link span i { font-style: normal; color: var(--muted); font-weight: 400; }
.mt-link small { display: block; color: var(--cream-2); font-size: .72rem; line-height: 1.35; }
.mt-link.search { border-style: dashed; }
.mt-est { text-align: right; font-variant-numeric: tabular-nums; color: var(--cream); }
.mt-cut { margin-top: 1.2rem; border: 1px solid var(--line-2); border-radius: 2px; padding: .8rem 1rem; }
.mt-cut summary { cursor: pointer; font: 400 1.05rem var(--serif); }
.mt-sheets p { margin: .25rem 0; font-size: .86rem; color: var(--cream-2); }
.mt-unit { margin-top: .9rem; }
.mt-unit h5 { margin: 0 0 .3rem; font-size: .86rem; font-weight: 500; }
.mt-unit table { width: 100%; border-collapse: collapse; font-size: .8rem; font-variant-numeric: tabular-nums; }
.mt-unit td { padding: .22rem .4rem; border-bottom: 1px solid var(--line-2); }
.mt-ass { margin: .5rem 0 0; padding-left: 1rem; font-size: .84rem; color: var(--cream-2); line-height: 1.6; }
.mt-stores { margin-top: 1.2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem; }
.mt-stores h5 { grid-column: 1 / -1; margin: 0; font: 500 .58rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.mt-stores a { text-decoration: none; border: 1px solid var(--line-2); border-radius: 2px; padding: .6rem .8rem; }
.mt-stores a b { display: block; color: var(--cream); font-weight: 500; font-size: .86rem; } .mt-stores a small { color: var(--muted); font-size: .74rem; }
.mt-working, .mt-empty { display: grid; justify-items: center; gap: .6rem; padding: 2.4rem 1rem; text-align: center; color: var(--cream-2); border: 1px dashed var(--line); border-radius: 2px; }
.mt-working .spinner { width: 28px; height: 28px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: mtSpin 1s linear infinite; }
@keyframes mtSpin { to { transform: rotate(360deg); } }
/* The list sits in a column of the project page: it adapts to its own width, not the screen's. */
.mt-root { container-type: inline-size; }
@container (max-width: 760px) {
  .mt-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mt-row { grid-template-columns: minmax(0, 1fr) auto; gap: .4rem .8rem; }
  .mt-name { grid-column: 1; grid-row: 1; }
  .mt-est { grid-column: 2; grid-row: 1; }
  .mt-qty { grid-column: 1 / -1; grid-row: 2; }
  .mt-qty small { display: inline; margin-left: .4rem; }
  .mt-buy { grid-column: 1 / -1; grid-row: 3; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}
/* The area table (Quadro de áreas) */
.ar-table { width: 100%; border-collapse: collapse; font-size: .84rem; font-variant-numeric: tabular-nums; }
.ar-table th { text-align: left; font: 500 .56rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); padding: .3rem .4rem; border-bottom: 1px solid var(--line); }
.ar-table td { padding: .32rem .4rem; border-bottom: 1px solid var(--line-2); }
.ar-table td:last-child, .ar-table th:last-child { text-align: right; white-space: nowrap; }
.ar-table tfoot td { border-bottom: 0; font-weight: 500; color: var(--cream); }
.ar-table tr.ar-open td { color: var(--muted); font-style: italic; }
.ar-level h4 small { font: 400 .78rem var(--sans); }
@container (max-width: 520px) { .ar-table .ar-c3 { display: none; } .ar-table tfoot td:first-child { font-size: .78rem; } }
/* The massing viewer: hover label and level toggles */
.hv-tip { position: absolute; pointer-events: none; z-index: 2; display: grid; gap: .1rem; padding: .4rem .6rem; border-radius: 2px; background: rgba(255,255,255,.9); border: 1px solid var(--line); color: var(--cream); font: 400 .78rem var(--sans); max-width: 220px; }
.hv-tip b { font-weight: 500; } .hv-tip span { color: var(--cream-2); font-size: .72rem; }
.vv-levels { display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.vv-levels .btn-mini[aria-pressed=true] { border-color: var(--gold); color: var(--gold-2); background: var(--gold-soft); }
/* The plan editor */
.me-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.pl .me-sec h4 { margin: 0 0 .5rem; font: 400 1.05rem var(--serif); }
.pl-built b { display: block; padding-top: .45rem; font: 400 1rem var(--serif); }
.pl-add { align-items: flex-end; }
.me-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(20,20,20,.25); vertical-align: -1px; margin-right: .3rem; }
.pl-svg { width: 100%; height: auto; max-height: 280px; display: block; margin: .6rem 0; background: #efefef; border-radius: 2px; }
.pl-lot { fill: #e7e7e7; stroke: #5d5d5d; stroke-width: .08; }
.pl-sb { fill: none; stroke: #a8854d; stroke-width: .06; stroke-dasharray: .3 .2; }
.pl-street { fill: #5d5d5d; font: .55px var(--sans); text-anchor: middle; }
.pl-room { cursor: pointer; }
.pl-room rect { stroke: #313131; stroke-width: .06; }
.pl-room.on rect { stroke: #c0392b; stroke-width: .16; }
.pl-room text { fill: #313131; font: 600 .5px var(--sans); text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
@media (max-width: 640px) { .nt-uses { flex: 1 1 100%; } .nt-foot { justify-content: space-between; } .nt-imgs figure, .nt-add { width: 84px; height: 84px; } }

/* ---------------- Studio assistant ---------------- */
.as-page { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 1.2rem; height: calc(100dvh - 4.4rem); min-height: 520px; margin: -.6rem 0 -3.4rem; }
.as-side { display: flex; flex-direction: column; gap: .8rem; min-height: 0; border: 1px solid var(--line-2); border-radius: 2px; padding: .9rem; background: var(--ink-2); }
.as-new { width: 100%; }
.as-threads { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: .2rem; margin: 0 -.3rem; padding: 0 .3rem; }
.as-th { position: relative; display: flex; align-items: center; border-radius: 2px; transition: background .2s; }
.as-th:hover, .as-th.on { background: var(--ink-3); }
.as-th.on { box-shadow: inset 2px 0 0 var(--gold); }
.as-th button[data-open] { flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: var(--cream); padding: .55rem .6rem; cursor: pointer; }
.as-th b { display: block; font-weight: 400; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-th small { color: var(--muted); font-size: .68rem; }
.as-th-x { opacity: 0; border: 0; background: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 0 .5rem; }
.as-th:hover .as-th-x, .as-th.on .as-th-x { opacity: 1; }
.as-teach { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--line); border-radius: 2px; background: none; color: var(--gold-2, var(--gold)); padding: .65rem .8rem; cursor: pointer; font: 500 .62rem var(--sans); letter-spacing: .16em; text-transform: uppercase; transition: border-color .2s, background .2s; }
.as-teach:hover { border-color: var(--gold); background: rgba(168,133,77,.07); }
.as-teach svg, .as-av svg, .as-orb svg, .as-launch svg, .as-icon svg, .as-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.as-main { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line-2); border-radius: 2px; background: radial-gradient(ellipse at top, var(--ink-2), var(--ink) 70%); overflow: hidden; }
.as-top { display: flex; align-items: center; gap: .8rem; padding: .9rem 1.3rem; border-bottom: 1px solid var(--line-2); }
.as-top h1 { font-size: 1.35rem; margin: 0; }
.as-side-toggle { display: none; border: 1px solid var(--line-2); background: none; color: var(--cream); border-radius: 2px; width: 36px; height: 36px; cursor: pointer; }
.as-chatbox { flex: 1; min-height: 0; display: flex; }
.as-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.as-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.as-msgs { max-width: 820px; margin: 0 auto; padding: 1.4rem 1.3rem 1rem; display: grid; gap: 1.2rem; }
.as-chat.compact .as-msgs { padding: 1rem; }
.as-msg { display: flex; gap: .7rem; animation: fadeUp .35s var(--ease) both; }
.as-msg.user { justify-content: flex-end; }
.as-bubble { max-width: 82%; background: var(--ink-4, #252525); border: 1px solid var(--line-2); border-radius: 2px; padding: .7rem .95rem; }
.as-bubble p { margin: 0; line-height: 1.55; }
.as-bubble img { display: block; max-width: 220px; max-height: 180px; border-radius: 2px; margin-bottom: .4rem; object-fit: cover; }
.as-av { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); border: 1px solid var(--line); background: rgba(168,133,77,.072); }
.as-body { min-width: 0; flex: 1; }
.as-md { line-height: 1.65; color: var(--cream); font-size: .95rem; }
.as-md p { margin: 0 0 .7rem; } .as-md p:last-child { margin-bottom: 0; }
.as-md ul { margin: .2rem 0 .8rem; padding-left: 1.1rem; } .as-md li { margin: .2rem 0; }
.as-md h2, .as-md h3, .as-md h4 { font-size: 1.1rem; margin: .8rem 0 .4rem; }
.as-md a { color: var(--gold-2, var(--gold)); text-underline-offset: 3px; }
.as-md strong { color: var(--cream); font-weight: 600; }
.as-steps { margin-bottom: .45rem; font-size: .74rem; color: var(--muted); }
.as-steps summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: .35rem; }
.as-steps summary::before { content: "✓"; color: var(--gold); }
.as-steps ul { margin: .35rem 0 0; padding-left: 1.1rem; }
.as-tools { margin-top: .35rem; opacity: 0; transition: opacity .2s; }
.as-msg:hover .as-tools { opacity: 1; }
.as-copy { border: 0; background: none; color: var(--muted); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; padding: .2rem 0; }
.as-live { list-style: none; margin: .3rem 0 0; padding: 0; display: grid; gap: .25rem; font-size: .84rem; color: var(--muted); }
.as-live li::before { content: "✓ "; color: var(--gold); }
.as-live li.now { color: var(--cream-2); }
.as-live li.now::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: .45rem; border-radius: 50%; background: var(--gold); animation: asPulse 1.1s ease-in-out infinite; vertical-align: 1px; }
@keyframes asPulse { 50% { opacity: .25; transform: scale(.7); } }
/* Proposed actions */
.as-act { margin-top: .8rem; border: 1px solid var(--line); border-radius: 2px; padding: .9rem 1rem; background: rgba(20,20,20,.04); display: grid; gap: .5rem; }
.as-act.done { border-color: var(--ok, #8fbf8a); background: rgba(143,191,138,.05); }
.as-act.off { opacity: .55; }
.as-act-k { margin: 0; font: 500 .6rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.as-act-k .ok { color: var(--ok, #8fbf8a); font-weight: 500; }
.as-act-to { margin: 0; font-size: .82rem; color: var(--cream-2); }
.as-act-subj { margin: 0; font-weight: 500; }
.as-act-body { white-space: pre-wrap; font-size: .88rem; color: var(--cream-2); line-height: 1.55; }
.as-act-subj-in, .as-act-body-in { width: 100%; background: var(--ink); border: 1px solid var(--line-2); border-radius: 2px; color: var(--cream); padding: .5rem .65rem; font: 400 .9rem/1.55 var(--sans); }
.as-act-subj-in { font-weight: 500; }
.as-act-subj-in:focus, .as-act-body-in:focus { outline: none; border-color: var(--gold); }
/* Empty state */
.as-empty { text-align: center; padding: 2.4rem 0 1rem; display: grid; justify-items: center; gap: .5rem; }
.as-orb { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); border: 1px solid var(--line); background: radial-gradient(circle, rgba(168,133,77,.16), transparent 70%); animation: asGlow 3.2s ease-in-out infinite; }
.as-orb svg { width: 28px; height: 28px; }
@keyframes asGlow { 50% { box-shadow: 0 0 34px rgba(168,133,77,.168); } }
.as-empty h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: .4rem 0 0; }
.as-empty > p { max-width: 52ch; margin: 0 0 .8rem; }
.as-prompts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .55rem; width: 100%; text-align: left; }
.as-prompt { border: 1px solid var(--line-2); border-radius: 2px; background: var(--ink-2); color: var(--cream); padding: .75rem .9rem; cursor: pointer; transition: border-color .2s, transform .2s, background .2s; font: 400 .88rem/1.35 var(--sans); }
.as-prompt:hover { border-color: var(--gold); transform: translateY(-1px); background: var(--ink-3); }
.as-prompt.mine { border-color: var(--line); background: rgba(168,133,77,.07); }
.as-prompt b { font-weight: 400; }
/* Composer */
.as-composer { padding: .7rem 1rem calc(.8rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); background: rgba(255,255,255,.9); }
.as-inputrow { max-width: 820px; margin: 0 auto; display: flex; align-items: flex-end; gap: .4rem; border: 1px solid var(--line); border-radius: 2px; background: var(--ink); padding: .35rem .4rem .35rem .5rem; transition: border-color .2s, box-shadow .2s; }
.as-inputrow:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(168,133,77,.072); }
.as-inputrow textarea { flex: 1; min-width: 0; resize: none; border: 0; background: none; color: var(--cream); font: 400 .95rem/1.5 var(--sans); padding: .45rem .3rem; max-height: 200px; }
.as-inputrow textarea:focus { outline: none; }
.as-icon { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: 50%; cursor: pointer; transition: color .2s, background .2s; }
.as-icon:hover { color: var(--gold); background: rgba(168,133,77,.072); }
.as-icon.rec { color: #ffffff; background: #b4483b; animation: asPulse 1.2s ease-in-out infinite; }
.as-icon.busy { opacity: .5; pointer-events: none; }
.as-send { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--gold); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: transform .2s, opacity .2s; }
.as-send:hover { transform: scale(1.05); } .as-send:disabled { opacity: .4; cursor: default; transform: none; }
.as-hint { max-width: 820px; margin: .35rem auto 0; font-size: .68rem; color: var(--muted); text-align: center; }
.as-files { max-width: 820px; margin: 0 auto .5rem; display: flex; gap: .4rem; }
.as-file { position: relative; } .as-file img { width: 58px; height: 58px; object-fit: cover; border-radius: 2px; border: 1px solid var(--line-2); display: block; }
.as-file button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--ink-4, #252525); color: var(--cream); cursor: pointer; line-height: 1; }
/* Launcher and drawer */
.as-launch { position: fixed; right: calc(1.2rem + env(safe-area-inset-right)); bottom: calc(1.2rem + env(safe-area-inset-bottom)); z-index: 50; width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--gold-fill); background: #ffffff; color: var(--gold-2, var(--gold)); display: grid; place-items: center; cursor: pointer; box-shadow: 0 12px 34px rgba(20,20,20,.13), 0 0 0 0 rgba(168,133,77,.21); animation: asLaunch 3.6s ease-in-out infinite; transition: transform .25s var(--ease); }
.as-launch:hover { transform: translateY(-2px) scale(1.04); }
.as-launch svg { width: 24px; height: 24px; }
@keyframes asLaunch { 50% { box-shadow: 0 12px 34px rgba(20,20,20,.13), 0 0 0 8px rgba(168,133,77,0); } 0% { box-shadow: 0 12px 34px rgba(20,20,20,.13), 0 0 0 0 rgba(168,133,77,.18); } }
.as-drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(480px, 100vw); height: 100dvh; max-height: none; padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--ink); color: var(--cream); animation: asIn .35s var(--ease); }
.as-drawer::backdrop { background: rgba(20,20,20,.303); backdrop-filter: blur(2px); }
.as-drawer.closing { animation: asOut .2s ease forwards; }
@keyframes asIn { from { transform: translateX(30px); opacity: 0; } }
@keyframes asOut { to { transform: translateX(30px); opacity: 0; } }
.as-dr-shell { display: flex; flex-direction: column; height: 100%; }
.as-dr-top { display: flex; align-items: center; gap: .6rem; padding: .8rem .9rem; border-bottom: 1px solid var(--line-2); }
.as-dr-top > div { flex: 1; min-width: 0; } .as-dr-top b { display: block; font: 400 1.15rem var(--serif); } .as-dr-top small { color: var(--muted); font-size: .72rem; }
.as-dr-top .dv-x { width: 34px; height: 34px; font-size: 1.3rem; }
.as-dr-chat { flex: 1; min-height: 0; display: flex; }
.as-chat.compact .as-prompts { grid-template-columns: 1fr; }
.as-chat.compact .as-empty { padding-top: 1.4rem; }
/* Teach dialog */
.as-teach-dlg { width: min(860px, calc(100vw - 24px)); }
.as-teach-body { overflow-y: auto; padding: 1.2rem 1.4rem 2rem; display: grid; gap: .9rem; align-content: start; }
.as-add { display: flex; gap: .5rem; flex-wrap: wrap; }
.as-add input { flex: 1; min-width: 200px; background: var(--ink); border: 1px solid var(--line-2); border-radius: 2px; color: var(--cream); padding: .6rem .75rem; font: 400 .9rem var(--sans); }
.as-add input:focus, .as-list input:focus, .as-list textarea:focus, .as-skill input:focus, .as-skill textarea:focus { outline: none; border-color: var(--gold); }
.as-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.as-list li { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.as-list textarea, .as-list input { flex: 1; min-width: 180px; background: var(--ink); border: 1px solid var(--line-2); border-radius: 2px; color: var(--cream); padding: .5rem .7rem; font: 400 .9rem/1.5 var(--sans); resize: vertical; }
.as-src { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.as-skills { display: grid; gap: .8rem; }
.as-skill { display: grid; gap: .5rem; } .as-skill.off { opacity: .6; }
.as-skill-h { display: flex; gap: .6rem; align-items: center; }
.as-skill-h input[data-k=name] { flex: 1; background: none; border: 0; border-bottom: 1px solid transparent; color: var(--cream); font: 400 1.2rem var(--serif); }
.as-skill input, .as-skill textarea { background: var(--ink); border: 1px solid var(--line-2); border-radius: 2px; color: var(--cream); padding: .5rem .65rem; font: 400 .9rem/1.5 var(--sans); width: 100%; }
.as-skill .as-skill-h input[data-k=name] { background: none; border: 0; border-bottom: 1px solid transparent; padding: .2rem 0; }
.as-notes-link a { color: var(--gold-2, var(--gold)); }
@media (max-width: 860px) {
  .as-page { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 7rem); margin: -1rem -.4rem -4rem; position: relative; }
  .as-side { position: absolute; z-index: 5; inset: 3.6rem .6rem auto .6rem; max-height: 70%; box-shadow: 0 20px 60px rgba(20,20,20,.156); display: none; }
  .as-page.side-open .as-side { display: flex; }
  .as-side-toggle { display: inline-grid; place-items: center; }
  .as-bubble { max-width: 90%; }
  .as-prompts { grid-template-columns: 1fr 1fr; }
  .as-hint { display: none; }
  .as-launch { right: calc(.9rem + env(safe-area-inset-right)); bottom: calc(.9rem + env(safe-area-inset-bottom)); width: 50px; height: 50px; }
}
@media (max-width: 480px) { .as-prompts { grid-template-columns: 1fr; } .as-msgs { padding: 1rem .8rem; } }
@media (prefers-reduced-motion: reduce) { .as-launch, .as-orb, .as-live li.now::before { animation: none; } }
.as-threads { grid-template-columns: minmax(0, 1fr); }
.as-inputrow { align-items: center; }
.as-inputrow textarea { min-height: 0; height: 40px; width: auto; margin: 0; box-shadow: none; }
.as-drawer { max-width: none; }
.as-dr-btn { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--cream); display: grid; place-items: center; font-size: 1.05rem; line-height: 1; text-decoration: none; cursor: pointer; transition: border-color .2s, color .2s; }
.as-dr-btn:hover { border-color: var(--gold); color: var(--gold-2, var(--gold)); }

/* ---------- Assistant: reminders in the sidebar, morning brief settings ---------- */
.as-rems { border-top: 1px solid var(--line-2); padding-top: .7rem; max-height: 34%; overflow-y: auto; }
.as-rems h6 { margin: 0 0 .4rem; font: 500 .58rem var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.as-rems ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.as-rems li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .5rem; align-items: start; padding: .4rem .3rem; border-radius: 2px; }
.as-rems li:hover { background: var(--ink-3); }
.as-rems li:hover .as-th-x { opacity: 1; }
.as-rems li b { display: block; font-weight: 400; font-size: .84rem; line-height: 1.35; overflow-wrap: anywhere; }
.as-rems li small { color: var(--muted); font-size: .66rem; }
.as-rems li.due small { color: var(--gold-2); }
.as-rem-ok { width: 22px; height: 22px; margin-top: .1rem; border-radius: 50%; border: 1px solid var(--line); background: none; color: transparent; cursor: pointer; font-size: .7rem; line-height: 1; transition: all .2s; }
.as-rem-ok:hover { border-color: var(--gold); color: var(--gold); }
.as-brief { display: grid; gap: 1rem; }
.as-brief .chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.as-brief .row { display: flex; gap: .6rem; flex-wrap: wrap; }
@media (hover: none) { .as-rems .as-th-x { opacity: 1; } }

/* ---------- Proposal editor: suggested price ---------- */
.pe-addrow { display: flex; gap: .5rem; flex-wrap: wrap; }
.pe-sg { border: 1px solid var(--line); border-radius: 2px; padding: 1rem 1.1rem; background: rgba(20,20,20,.04); display: grid; gap: .55rem; }
.pe-sg p { margin: 0; }
.pe-sg-head { display: flex; align-items: center; gap: .6rem; }
.pe-sg-head b { font: 500 .6rem var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.pe-sg-head .pe-del { margin-left: auto; }
.pe-sg-total { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.pe-sg-total .big { font: 400 1.9rem/1.1 var(--serif); color: var(--gold-2); }
.pe-sg-note { color: var(--cream-2); border-left: 2px solid var(--gold); padding-left: .6rem; }
.pe-sg-comps summary { cursor: pointer; font-size: .78rem; color: var(--cream-2); }
.pe-sg-comps ul, .pe-sg-lines { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .25rem; font-size: .82rem; }
.pe-sg-comps li, .pe-sg-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .6rem; align-items: baseline; }
.pe-sg-lines li { grid-template-columns: minmax(0, 1fr) auto; border-bottom: 1px dashed var(--line-2); padding-bottom: .2rem; }
.pe-sg-comps li span:first-child, .pe-sg-lines li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-sg .row { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
@media (max-width: 520px) { .pe-sg-comps li { grid-template-columns: minmax(0, 1fr) auto; } .pe-sg-comps li .muted { display: none; } }

/* ---------- Platform requests ---------- */
.rq-bar { display: flex; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.2rem; }
.rq-bar .chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.rq-bar .chip b { font-weight: 500; opacity: .85; margin-left: .2rem; }
.rq-to { border: 1px solid var(--line-2); background: none; color: var(--muted); border-radius: 999px; padding: .5rem .9rem; font: 400 .78rem var(--sans); cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-to b { color: var(--cream-2); font-weight: 400; }
.rq-to:hover { border-color: var(--gold); }
.rq-list { display: grid; gap: .6rem; }
.rq-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center; text-align: left; color: inherit; font: inherit; cursor: pointer; padding: 1rem 1.2rem; width: 100%; }
.rq-row:hover { border-color: var(--line); }
.rq-main b { display: block; font-weight: 400; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-main small { color: var(--muted); font-size: .72rem; }
.rq-main .hi { color: var(--cream-2); font-style: normal; }
.rq-kind { font: 500 .56rem var(--sans); letter-spacing: .16em; text-transform: uppercase; padding: .35rem .6rem; border-radius: 2px; border: 1px solid var(--line-2); color: var(--cream-2); white-space: nowrap; }
.rq-kind.k-bug { border-color: rgba(150,80,10,.45); color: var(--cream-2); }
.rq-kind.k-feature { border-color: var(--line); color: var(--gold-2); }
.rq-st { font: 500 .56rem var(--sans); letter-spacing: .16em; text-transform: uppercase; padding: .4rem .7rem; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line-2); color: var(--cream-2); }
.rq-st.st-in_progress { border-color: var(--gold); color: var(--gold-2); }
.rq-st.st-qa { background: rgba(90,140,200,.14); border-color: rgba(120,165,220,.5); color: var(--info); }
.rq-row.qa-mine { border-color: rgba(120,165,220,.55); }
.rq-qa-note { display: block; width: 100%; text-align: left; margin: 0 0 .8rem; padding: .8rem 1rem; border: 1px solid rgba(120,165,220,.5); border-radius: 2px; background: rgba(90,140,200,.1); color: var(--info); font: 500 .9rem var(--sans); cursor: pointer; }
.rq-qa { border: 1px solid rgba(120,165,220,.5); background: rgba(90,140,200,.08); border-radius: 2px; padding: 1rem 1.1rem; }
.rq-qa h5 { margin-top: 0; }
.rq-qa p { margin: .2rem 0 .8rem; }
.rq-qa.wait p { margin: 0; color: var(--cream-2); }
.rq-qa .row { flex-wrap: wrap; gap: .5rem; }
.rq-qa-f { margin: .2rem 0 .6rem; }
.rq-qa-f textarea { width: 100%; }
.rq-qa .rq-shots { margin-bottom: .8rem; }
.rq-qa .rq-qa-actions { margin-bottom: .4rem; }
.rq-qa [data-qa-hint] { margin: 0; }
/* Questions from the developer on the card, and the requests settings */
.rq-pills { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.rq-wait { font: 500 .56rem var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: .4rem .7rem; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line-2); color: var(--muted); }
.rq-wait.mine { border-color: var(--gold); color: var(--gold-2); background: rgba(168,133,77,.09); }
.rq-ask-note { border-color: var(--gold); background: rgba(168,133,77,.09); color: var(--gold-2); }
.rq-ask { border: 1px solid var(--gold); background: rgba(168,133,77,.07); border-radius: 2px; padding: 1rem 1.1rem; }
.rq-q { display: grid; gap: .6rem; padding: .8rem 0; border-top: 1px solid var(--line-2); }
.rq-q:first-of-type { border-top: 0; }
.rq-q-text { font-size: 1rem; color: var(--cream); overflow-wrap: anywhere; }
.rq-opts { display: grid; gap: .45rem; }
.rq-opt { display: flex; gap: .7rem; align-items: flex-start; padding: .65rem .8rem; border: 1px solid var(--line-2); border-radius: 2px; cursor: pointer; min-height: 44px; }
.rq-opt:has(input:checked) { border-color: var(--gold); background: rgba(168,133,77,.072); }
.rq-opt input { width: 18px; height: 18px; min-height: 0; padding: 0; margin: .15rem 0 0; flex: none; accent-color: var(--gold); }
@media (max-width: 640px) { .rq-row .rq-pills { grid-column: 1 / -1; justify-content: flex-start; } }
.rq-opt span { display: grid; gap: .15rem; min-width: 0; overflow-wrap: anywhere; }
.rq-opt b { font-weight: 400; }
.rq-opt small { color: var(--muted); font-size: .76rem; }
.rq-rec { font: 500 .54rem var(--sans); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .45rem; justify-self: start; white-space: nowrap; }
.rq-other, .rq-q textarea { width: 100%; }
.rq-q-done { display: block; font-weight: 400; color: var(--cream-2); }
.rq-set .rq-set-sec { display: grid; gap: .5rem; margin: 1.2rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line-2); }
.rq-set h5 { margin: 0; font: 500 .6rem var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.rq-set p { margin: 0; }
.rq-set .row { display: flex; gap: .4rem; flex-wrap: wrap; }
.rq-key { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.rq-key code { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; word-break: break-all; background: var(--ink); border: 1px solid var(--gold); border-radius: 2px; padding: .55rem .7rem; font: 400 .78rem/1.4 ui-monospace, Menlo, monospace; color: var(--cream); user-select: all; }
.rq-warn { color: var(--warn); }.rq-hist-imgs { display: flex; gap: .4rem; flex-wrap: wrap; margin: .3rem 0; }
.rq-hist-imgs img { width: 72px; height: 54px; object-fit: cover; border-radius: 2px; border: 1px solid var(--line-2); }
.rq-hist .rq-note { display: block; margin: .2rem 0 .3rem; color: var(--cream); white-space: pre-wrap; }
.rq-st.st-done { background: rgba(46,107,62,.15); border-color: rgba(46,107,62,.45); color: var(--ok); }
.rq-empty { text-align: center; padding: 3rem 1.5rem; }
.rq-empty h3 { font: 400 1.6rem var(--serif); margin: 0 0 .4rem; }
.rq-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.rq-kbtn { display: grid; gap: .25rem; text-align: left; border: 1px solid var(--line-2); border-radius: 2px; background: none; color: var(--cream); padding: .8rem .9rem; cursor: pointer; font: inherit; transition: border-color .2s, background .2s; }
.rq-kbtn b { font-weight: 400; font-size: .92rem; } .rq-kbtn small { color: var(--muted); font-size: .72rem; line-height: 1.35; }
.rq-kbtn[aria-pressed="true"] { border-color: var(--gold); background: rgba(168,133,77,.081); }
.rq-new .chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.rq-shots { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.rq-shots .as-file img { width: 84px; height: 84px; }
.rq-add { width: 84px; height: 84px; }
.rq-detail { width: min(860px, calc(100vw - 24px)); }
.rq-body { overflow-y: auto; padding: 1.2rem 1.4rem 2rem; display: grid; gap: 1.2rem; align-content: start; min-height: 0; }
.rq-body section { display: grid; gap: .5rem; }
.rq-body h5 { margin: 0; font: 500 .6rem var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.rq-body p { margin: 0; }
.rq-status { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.rq-desc { font-size: .95rem; line-height: 1.6; overflow-wrap: anywhere; }
.rq-ph { display: flex; gap: .4rem .8rem; align-items: center; flex-wrap: wrap; }
.rq-ph .row { display: flex; gap: .4rem; margin-left: auto; }
.rq-prompt { margin: 0; background: var(--ink); border: 1px solid var(--line-2); border-radius: 2px; padding: 1rem; max-height: 46vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 .78rem/1.55 ui-monospace, Menlo, monospace; color: var(--cream-2); }
.rq-hist { margin: 0; padding-left: 1.1rem; font-size: .8rem; color: var(--cream-2); display: grid; gap: .2rem; }
/* ---- Platform requests, round 2: tabs, status steps, proposal (rqp), Brainstorm (rqb), Radar (rqr), Indicadores (rqm) ---- */
.rqx-tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin: 0 0 1.2rem; border-bottom: 1px solid var(--line-2); }
.rqx-tab { padding: .6rem .9rem; color: var(--muted); text-decoration: none; font: 500 .72rem var(--sans); letter-spacing: .14em; text-transform: uppercase; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.rqx-tab[aria-current="page"] { color: var(--gold-2); border-bottom-color: var(--gold); }
.rqx-steps-wrap { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.rqx-steps { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; margin: 0; padding: 0; flex: 1 1 auto; min-width: 0; }
.rqx-steps li { font: 500 .56rem var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: .35rem .6rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.rqx-steps li.past { color: var(--cream-2); }
.rqx-steps li.on { border-color: var(--gold); background: rgba(168,133,77,.108); color: var(--gold-2); }
.rqx-origin { color: var(--gold-2); margin: 0; }
.rqx-move-list { display: grid; gap: .4rem; margin: 1rem 0; }
.rqx-move-opt { display: grid; gap: .15rem; text-align: left; border: 1px solid var(--line-2); border-radius: 2px; background: none; color: var(--cream); padding: .65rem .8rem; font: inherit; cursor: pointer; }
.rqx-move-opt small { color: var(--muted); font-size: .74rem; }
.rqx-move-opt[aria-pressed="true"] { border-color: var(--gold); background: rgba(168,133,77,.081); }
.rqx-move-opt:disabled { opacity: .55; cursor: not-allowed; }
.rq-st.st-awaiting_approval { border-color: var(--gold); background: rgba(168,133,77,.108); color: var(--gold-2); }
.rq-st.st-in_development { border-color: rgba(173,173,173,.45); color: var(--cream-2); }
.rq-st.st-awaiting_deploy { border-color: rgba(120,165,220,.35); color: var(--info); }
.rqp { border: 1px solid var(--line-2); border-radius: 2px; padding: 1rem 1.1rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; min-width: 0; }
.rqp-pairs, .rqp-decide, .rqp-full { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.rq-body { grid-template-columns: minmax(0, 1fr); }
.rqp.decide { border-color: var(--gold); background: rgba(20,20,20,.04); }
.rqp-head { display: flex; gap: .6rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.rqp-name { margin: 0; font: 400 1.35rem/1.3 var(--serif); overflow-wrap: anywhere; }
.rqp-st { font: 500 .56rem var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: .35rem .65rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--cream-2); }
.rqp-st.d-waiting { border-color: var(--gold); color: var(--gold-2); }
.rqp-st.d-approved { border-color: rgba(46,107,62,.45); color: var(--ok); }
.rqp-st.d-changes, .rqp-st.d-simpler { border-color: rgba(150,80,10,.45); color: var(--warn); }
.rqp-brief b { font-weight: 500; }
.rqp-brief ul { margin: .3rem 0 0; padding-left: 1.1rem; display: grid; gap: .2rem; }
.rqp-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.rqp-facts div { border: 1px solid var(--line-2); border-radius: 2px; padding: .6rem .8rem; display: grid; gap: .1rem; min-width: 0; }
.rqp-facts small { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; }
.rqp-facts b { font-weight: 400; font-size: 1rem; overflow-wrap: anywhere; }
.rqp-facts .risk-high { color: var(--bad); } .rqp-facts .risk-low { color: var(--ok); }
.rqp-pairs { display: grid; gap: 1rem; }
.rqp-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.rqp-tag { display: inline-block; font: 500 .56rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.rqp-tag.after { color: var(--gold-2); }
.rqp-shot { display: grid; gap: .3rem; width: 100%; padding: 0; border: 1px solid var(--line-2); border-radius: 2px; background: var(--ink); color: var(--cream-2); cursor: zoom-in; overflow: hidden; text-align: left; font: inherit; }
.rqp-shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.rqp-shot small { padding: 0 .6rem .5rem; font-size: .74rem; }
.rqp-shot.none { aspect-ratio: 16 / 10; place-items: center; cursor: default; color: var(--muted); font-size: .8rem; }
.rqp-decide { display: grid; gap: .6rem; }
.rqp-decide textarea { width: 100%; }
.rqp-full summary, .rqp-older summary, .rqr-ev summary { cursor: pointer; color: var(--gold-2); font-size: .85rem; }
.rqp-full { display: grid; gap: 1rem; }
.rqp-full section { margin-top: .8rem; }
.rqp-full h6 { margin: 0 0 .3rem; font: 500 .6rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.rqp-md { font-size: .9rem; overflow-wrap: anywhere; }
.rqp-md h1, .rqp-md h2, .rqp-md h3 { font: 400 1.05rem var(--serif); margin: .8rem 0 .3rem; }
.rqp-table-wrap { overflow-x: auto; }
.rqp-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.rqp-table th, .rqp-table td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.rqp-table th { font: 500 .56rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.rqp-table td small { display: block; color: var(--muted); font-size: .72rem; }
.rqp-table tr.tot td { font-weight: 500; color: var(--cream); }
.rqp-rates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
@media (max-width: 640px) { .rqp-pair, .rqp-facts { grid-template-columns: minmax(0, 1fr); } }
.rqb { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 1rem; min-height: 60vh; }
.rqb-side { display: grid; gap: .8rem; align-content: start; }
.rqb-scope { display: flex; gap: .4rem; flex-wrap: wrap; }
.rqb-list { display: grid; gap: .4rem; max-height: 62vh; overflow-y: auto; }
.rqb-item { display: grid; gap: .1rem; text-align: left; border: 1px solid var(--line-2); border-radius: 2px; background: var(--ink-2); color: var(--cream); padding: .6rem .75rem; cursor: pointer; font: inherit; min-width: 0; }
.rqb-item b { font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rqb-item small { color: var(--muted); font-size: .72rem; }
.rqb-item.on { border-color: var(--gold); }
.rqb-conv { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; gap: .6rem; background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 2px; padding: 1rem; min-width: 0; max-height: 78vh; }
.rqb-conv-head { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.rqb-conv-head .row { gap: .4rem; margin-left: auto; }
.rqb-title { display: grid; min-width: 0; flex: 1 1 200px; }
.rqb-title b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rqb-title small { color: var(--muted); font-size: .72rem; }
.rqb-back { display: none; }
.rqb-ro { font: 500 .56rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: .3rem .6rem; }
.rqb-made { margin: 0; color: var(--gold-2); }
.rqb-msgs { overflow-y: auto; display: grid; gap: .8rem; align-content: start; padding-right: .2rem; min-height: 0; }
.rqb-msg { max-width: 86%; border: 1px solid var(--line-2); border-radius: 2px; padding: .6rem .8rem; display: grid; gap: .4rem; overflow-wrap: anywhere; }
.rqb-msg p { margin: 0; }
.rqb-msg.person { justify-self: end; background: rgba(168,133,77,.072); border-color: var(--line); }
.rqb-msg.team { border-color: rgba(120,165,220,.45); }
.rqb-msg.refused { opacity: .75; }
.rqb-who { color: var(--muted); font-size: .7rem; }
.rqb-md { font-size: .92rem; }
.rqb-md p { margin: 0 0 .4rem; }
.rqb-wait { font-size: .74rem; color: var(--gold-2); }
.rqb-wait.refused { color: var(--cream-2); }
.rqb-ready { margin: 0; font-size: .8rem; color: var(--ok); }
.rqb-q { border-top: 0; padding: .2rem 0 0; }
.rqb-qdone { display: grid; gap: .1rem; font-size: .8rem; color: var(--cream-2); }
.rqb-qdone b { font-weight: 400; }
.rqb-qdone small { color: var(--muted); }
.rqb-shots { display: flex; gap: .5rem; flex-wrap: wrap; }
.rqb-shots button { display: grid; gap: .2rem; width: 180px; max-width: 100%; padding: 0; border: 1px solid var(--line-2); border-radius: 2px; background: none; color: var(--cream-2); cursor: zoom-in; overflow: hidden; text-align: left; font: inherit; }
.rqb-shots img { width: 100%; height: 110px; object-fit: cover; }
.rqb-shots small { padding: 0 .4rem .3rem; font-size: .7rem; }
.rqb-compose { display: grid; gap: .5rem; }
.rqb-compose textarea { width: 100%; min-height: 72px; max-height: 40vh; resize: vertical; }
.rqb-compose .row { justify-content: space-between; align-items: center; }
.rqb-hello { text-align: center; padding: 2rem 1rem; display: grid; gap: .6rem; justify-items: center; align-content: center; }
.rqb-hello h3 { font: 400 1.5rem var(--serif); margin: 0; }
@media (max-width: 860px) {
  .rqb { grid-template-columns: minmax(0, 1fr); }
  .rqb.has-conv .rqb-side { display: none; }
  .rqb:not(.has-conv) .rqb-conv { display: none; }
  .rqb-back { display: inline-flex; }
  .rqb-conv { max-height: none; }
  .rqb-msgs { max-height: 62vh; }
  .rqb-msg { max-width: 100%; }
}
@media (max-height: 520px) and (orientation: landscape) { .rqb-msgs { max-height: 55vh; } .rqb-conv { max-height: none; } }
.rqr { display: grid; gap: 1rem; }
.rqr-bar { display: flex; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.rqr-bar p { margin: 0; flex: 1 1 260px; }
.rqr-list { display: grid; gap: .8rem; }
.rqr-card { display: grid; gap: .5rem; }
.rqr-card h3 { margin: 0; font: 400 1.2rem/1.3 var(--serif); overflow-wrap: anywhere; }
.rqr-card p { margin: 0; overflow-wrap: anywhere; }
.rqr-card p b { font-weight: 500; }
.rqr-top { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.rqr-imp { font: 500 .56rem var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: .35rem .6rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--cream-2); }
.rqr-imp.i-high { border-color: var(--gold); color: var(--gold-2); }
.rqr-check { color: var(--muted); }
.rqr-ev ul { margin: .5rem 0 0; padding-left: 1rem; display: grid; gap: .5rem; font-size: .84rem; }
.rqr-ev small { display: block; color: var(--muted); font-size: .7rem; }
.rqr-ev q { color: var(--cream-2); }
.rqm { display: grid; gap: 1rem; }
.rqm-filters { display: flex; gap: .6rem 1.2rem; flex-wrap: wrap; }
.rqm-filters .chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.rqm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; }
.rqm-tile { display: grid; gap: .2rem; align-content: start; background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 2px; padding: .9rem 1rem; text-align: left; color: var(--cream); font: inherit; }
.rqm-tile.link { cursor: pointer; } .rqm-tile.link:hover { border-color: var(--gold); }
.rqm-tile small { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }
.rqm-tile b { font: 400 1.6rem/1.2 var(--serif); }
.rqm-tile span { color: var(--muted); font-size: .74rem; }
.rqm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: .8rem; }
.rqm-grid { align-items: start; }
.rqm-grid .card, .rqr-list .card { margin: 0; }
.rqp-decide .btn { white-space: normal; text-align: left; max-width: 100%; }
.rqm-grid .card, .rqm-returns { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; align-content: start; padding: 1.1rem; min-width: 0; }
.rqm-grid h4, .rqm-returns h4 { margin: 0; font: 500 .6rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.rqm-h5 { margin: .4rem 0 0; font: 500 .56rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.rqm-bars { display: grid; gap: .35rem; }
.rqm-bar { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) auto; gap: .5rem; align-items: center; font-size: .78rem; }
.rqm-bar .lbl { color: var(--cream-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rqm-bar .track { height: 8px; background: var(--ink); border-radius: 2px; overflow: hidden; }
.rqm-bar .track i { display: block; height: 100%; background: var(--gold); border-radius: 0 2px 2px 0; }
.rqm-bar .val { color: var(--cream); min-width: 3.5rem; text-align: right; }
.rqm-kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem .8rem; font-size: .82rem; }
.rqm-kv span { color: var(--cream-2); } .rqm-kv b { font-weight: 400; }
.rqm-weeks { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; height: 110px; align-items: end; }
.rqm-weeks span { display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100%; align-items: end; text-align: center; }
.rqm-weeks i { display: block; background: var(--gold); border-radius: 2px 2px 0 0; min-height: 2px; }
.rqm-weeks small { font-size: .66rem; color: var(--muted); }
.rqm-stuck { margin: 0; padding-left: 1rem; display: grid; gap: .3rem; font-size: .8rem; }
.rqm-stuck small { color: var(--muted); }
.rqm-id { border: 0; background: none; color: var(--gold-2); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }
.rqm-returns { display: grid; gap: .6rem; }
.rqm-sec-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.rq-foot { display: flex; justify-content: flex-end; }
@media (max-width: 640px) {
  .rq-row { grid-template-columns: minmax(0, 1fr) auto; gap: .4rem .8rem; padding: .9rem 1rem; }
  .rq-row .rq-kind { grid-column: 1 / -1; justify-self: start; }
  .rq-kinds { grid-template-columns: 1fr; }
  .rq-kbtn { padding: .65rem .8rem; }
  .rq-to { width: 100%; text-align: left; }
  .rq-body { padding: 1rem 1rem 1.6rem; }
  .rq-ph .row { margin-left: 0; }
}
div.f { display: grid; gap: .4rem; align-content: start; }
div.f > span { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.as-brief .nt-switch { justify-self: start; }
.rq-new .app-modal-inner { display: grid; gap: 1rem; }
.rq-new .app-modal-inner > .eyebrow, .rq-new .app-modal-inner > h2, .rq-new .app-modal-inner > .stg-lead, .rq-new .rq-kinds { margin-bottom: 0; }
.rq-new .app-modal-inner > h2 { margin-top: 0; }
.rq-detail .dv-shell { grid-template-columns: minmax(0, 1fr); }
.rq-body { grid-template-columns: minmax(0, 1fr); }
.rq-body > * { min-width: 0; }
.pe-sg-head { flex-wrap: wrap; }
.as-teach-dlg .dv-shell { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 760px) {
  .as-teach-dlg .dv-top { flex-wrap: wrap; row-gap: .6rem; }
  .as-teach-dlg .dv-tools { flex: 1 1 100%; min-width: 0; }
  .as-teach-dlg .dv-tools .dv-seg { flex: 1; min-width: 0; flex-wrap: wrap; border-radius: 2px; }
  .as-teach-dlg .dv-tools .dv-seg button { flex: none; }
}
.as-audio { display: block; width: 100%; min-width: 220px; height: 36px; margin-top: .5rem; }

/* ---------- Cut plans ---------- */
.cp-groups { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.cp-groups .chip b { font-weight: 500; opacity: .85; margin-left: .25rem; }
.cp-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.cp-sum div { border: 1px solid var(--line-2); border-radius: 2px; padding: .7rem .9rem; }
.cp-sum span { display: block; font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.cp-sum b { font: 400 1.6rem/1.2 var(--serif); color: var(--gold-2); }
.cp-meta { margin: .6rem 0; }
.cp-alert { margin: .4rem 0; padding: .55rem .8rem; border-left: 2px solid var(--warn); background: rgba(150,80,10,.08); color: var(--cream); font-size: .86rem; }
.cp-sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: .9rem; margin-top: .8rem; }
.cp-sheet { padding: 1rem; display: grid; gap: .6rem; }
.cp-sheet header { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.cp-sheet header .btn-mini { margin-left: auto; }
.cp-draw { border: 0; background: none; padding: 0; cursor: zoom-in; display: block; width: 100%; }
.cp-svg { display: block; width: 100%; height: auto; }
.cp-board { fill: #313131; }
.cp-trim { fill: none; stroke: var(--gold); stroke-width: 3; stroke-dasharray: 14 10; opacity: .6; }
.cp-hatch { stroke: rgba(255,255,255,.18); stroke-width: 6; }
.cp-off.ok rect { stroke: rgba(150,200,140,.6); stroke-width: 4; }
.cp-off.ok .cp-hatch { stroke: rgba(150,200,140,.35); }
.cp-offt { fill: #b7d6ae; font: 500 34px var(--sans); text-anchor: middle; dominant-baseline: middle; }
.cp-piece rect:first-child { fill: #ebebeb; stroke: #151515; stroke-width: 3; }
.cp-grainfill { pointer-events: none; }
.cp-grain { fill: none; stroke: rgba(116,116,116,.35); stroke-width: 2.5; }
.cp-lbl { fill: #151515; font-family: var(--sans); font-weight: 600; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.cp-dim { fill: #494949; font-family: var(--sans); text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.cp-piece { cursor: pointer; }
.cp-piece.on rect:first-child { fill: #e0e0e0; stroke: var(--gold); stroke-width: 8; }
.cp-strip { fill: var(--gold); font: 600 34px var(--sans); text-anchor: end; dominant-baseline: middle; }
.cp-axis { fill: var(--muted); font: 32px var(--sans); text-anchor: middle; }
.cp-steps summary, .cp-parts summary { cursor: pointer; font-size: .82rem; color: var(--cream-2); }
.cp-steps ol { margin: .5rem 0 0; padding-left: 1.3rem; font-size: .84rem; display: grid; gap: .25rem; }
.cp-parts { margin-top: 1rem; }
.cp-parts table { width: 100%; border-collapse: collapse; font-size: .84rem; margin-top: .5rem; }
.cp-parts th { text-align: left; font: 500 .58rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: .3rem .4rem; }
.cp-parts td { padding: .35rem .4rem; border-top: 1px solid var(--line-2); }
.cp-tag { font-style: normal; font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 .4rem; }
.cp-full { width: min(1400px, calc(100vw - 16px)); }
.cp-full .dv-shell { grid-template-columns: minmax(0, 1fr); }
.cp-full-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 0; overflow: hidden; }
.cp-canvas { overflow: auto; padding: 1rem; touch-action: pan-x pan-y pinch-zoom; }
.cp-zoom { min-width: 100%; }
.cp-side { border-left: 1px solid var(--line-2); padding: 1rem; overflow-y: auto; display: grid; gap: .5rem; align-content: start; }
.cp-side h4 { margin: 0; font: 400 1.2rem var(--serif); }
.cp-side h5 { margin: .6rem 0 0; font: 500 .58rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.cp-side p { margin: 0; }
.cp-side ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .2rem; }
.mt-cp { margin-top: 1.4rem; border-top: 1px solid var(--line-2); padding-top: 1.2rem; }
.mt-cp-head { display: flex; gap: 1rem; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: .8rem; }
.mt-cp-head h4 { margin: 0; font: 400 1.4rem var(--serif); }
.mt-cp-head .row { display: flex; gap: .5rem; flex-wrap: wrap; }
.mt-cp-head select { background: var(--ink); color: var(--cream); border: 1px solid var(--line-2); border-radius: 2px; padding: .5rem; }
.cpp-settings { margin-bottom: 1.2rem; display: grid; gap: .6rem; }
.cpp-settings h3 { margin: 0; }
.cpp-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cpp-list { display: grid; gap: .6rem; }
.cpp-row { display: flex; gap: 1rem; align-items: center; text-decoration: none; color: inherit; padding: 1rem 1.2rem; }
.cpp-row:hover { border-color: var(--line); }
.cpp-main { flex: 1; min-width: 0; }
.cpp-main b { display: block; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpp-main small { color: var(--muted); }
.cpp-n { color: var(--gold-2); font-size: .85rem; white-space: nowrap; }
.cpp-new .app-modal-inner { display: grid; gap: 1rem; }
.cpp-new .app-modal-inner > h2, .cpp-new .app-modal-inner > .eyebrow, .cpp-new .stg-lead { margin: 0; }
.cpp-pieces { display: grid; gap: .45rem; margin-bottom: .5rem; }
.cpp-piece { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 64px auto 26px; gap: .4rem; align-items: center; }
.cpp-piece input:not([type=checkbox]) { background: var(--ink); border: 1px solid var(--line-2); border-radius: 2px; color: var(--cream); padding: .5rem .6rem; font: 400 .9rem var(--sans); width: 100%; min-width: 0; margin: 0; }
.cpp-grain { display: flex; gap: .3rem; align-items: center; font-size: .72rem; color: var(--muted); white-space: nowrap; }
.cpp-link, .cpp-input { margin-bottom: 1rem; }
.cpp-input summary { cursor: pointer; }
@media (max-width: 760px) {
  .cp-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-full-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .cp-side { border-left: 0; border-top: 1px solid var(--line-2); max-height: 38vh; }
  .cpp-piece { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 56px 26px; }
  .cpp-piece input[name=name] { grid-column: 1 / -1; }
  .cpp-grain { grid-column: 1 / 3; }
}
.as-pin[aria-pressed="true"] { color: var(--gold-2); background: rgba(168,133,77,.126); border-radius: 50%; }
.as-where { display: block; margin-top: .35rem; font-size: .7rem; color: var(--muted); }
.as-sources { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .6rem; }
.as-sources span { font: 500 .56rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-right: .2rem; }
.as-sources a { font-size: .74rem; color: var(--gold-2); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .6rem; text-decoration: none; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-act-pieces { list-style: none; margin: .4rem 0; padding: 0; display: grid; gap: .2rem; font-size: .84rem; }
.as-act-pieces li { display: flex; gap: .6rem; align-items: baseline; border-bottom: 1px dashed var(--line-2); padding-bottom: .2rem; }
.as-act-pieces li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-act-pieces em { font-style: normal; font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-2); }
/* The message box shrinks with the screen: a textarea's natural width (cols) must not widen the chat. */
.as-main, .as-chat, .as-composer { min-width: 0; }
.as-inputrow textarea { width: 0; flex: 1 1 0; }
@media (max-width: 420px) { .as-inputrow { gap: .15rem; } .as-inputrow .as-icon { width: 34px; } }

/* ---------- Project sketches ---------- */
.sk-head { flex-wrap: wrap; gap: .8rem; }
.sk-head .row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.sk-list { display: grid; gap: .8rem; }
.sk-item { border: 1px solid var(--line-2); border-radius: 2px; padding: .9rem 1rem; display: grid; gap: .5rem; }
.sk-item.base { border-color: var(--gold); box-shadow: inset 0 0 0 1px rgba(168,133,77,.15); }
.sk-item header, .sk-row header { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.sk-item p, .sk-row p { margin: 0; }
.sk-base { font-style: normal; font: 500 .56rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); background: var(--gold); border-radius: 999px; padding: .25rem .6rem; }
.sk-pick { margin-left: auto; font-size: .72rem; color: var(--muted); display: flex; gap: .3rem; align-items: center; cursor: pointer; }
.sk-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.sk-pair figure { margin: 0; }
.sk-pair img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; border: 1px solid var(--line-2); cursor: zoom-in; display: block; background: #efefef; }
.sk-pair figcaption { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: .25rem; }
.sk-compare-bar { display: flex; gap: .6rem; align-items: center; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 2px; margin-bottom: .8rem; font-size: .85rem; }
.sk-cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.sk-cmp-col { display: grid; gap: .5rem; align-content: start; }
.sk-cmp-col h4 { margin: 0; }
.sk-cmp-col p { margin: 0; }
.sk-cmp-col img { width: 100%; border-radius: 2px; border: 1px solid var(--line-2); }
@media (max-width: 640px) { .sk-cmp { grid-template-columns: 1fr; } }

/* Brand chips (suppliers) */
.cat-brands { display: flex; gap: .3rem; flex-wrap: wrap; }
.cat-brand { font-size: .7rem; border: 1px solid var(--line); color: var(--gold-2); border-radius: 999px; padding: .1rem .55rem; }

/* ---- Suppliers, quote requests and orders (studio only) ---- */
.sup-tabs { margin: 0 0 1.2rem; }
.sup-tabs .chip { text-decoration: none; display: inline-block; }
.sup-orders, .sup-cards { display: grid; gap: .6rem; grid-template-columns: minmax(0, 1fr); }
.sup-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: .8rem; }
.sup-row { display: flex; gap: 1rem; align-items: center; justify-content: space-between; text-decoration: none; color: inherit; padding: 1rem 1.2rem; }
.sup-row:hover { border-color: var(--line); }
.sup-main { display: grid; gap: .2rem; min-width: 0; }
.sup-main b, .sup-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-main small { color: var(--muted); }
.sup-side { display: flex; gap: .7rem; align-items: center; flex-shrink: 0; }
.sup-st { font: 500 .6rem var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: .3rem .55rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--cream-2); white-space: nowrap; }
.sup-st.st-quote_requested, .sup-st.st-in_discussion { border-color: var(--info); color: var(--info); }
.sup-st.st-quote_received { border-color: var(--gold); color: var(--gold-2); }
.sup-st.st-order_approved, .sup-st.st-supplier_paid, .sup-st.st-received { border-color: var(--ok); color: var(--ok); }
.sup-st.st-cancelled { opacity: .6; }
.sup-internal { border: 1px dashed var(--line-2); border-radius: 2px; padding: .55rem .8rem; color: var(--muted); margin: 0 0 1rem; }
.sup-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.sup-grid > div { display: grid; gap: 1.2rem; min-width: 0; }
@media (max-width: 900px) { .sup-grid { grid-template-columns: minmax(0, 1fr); } .sup-grid > div:last-child { order: -1; } }
.sup-quotes, .sup-itemlist, .sup-msgs, .sup-proj, .sup-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.sup-quotes li { border: 1px solid var(--line-2); border-radius: 2px; padding: .7rem .9rem; display: grid; gap: .3rem; }
.sup-quotes li > div { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.sup-quotes li p { margin: 0; }
.sup-quotes li.old { opacity: .6; }
.sup-quotes li.old b { text-decoration: line-through; }
.sup-itemlist li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .6rem; font-size: .88rem; border-bottom: 1px solid var(--line-2); padding-bottom: .45rem; }
.sup-itemlist li small, .sup-pick small { display: block; color: var(--muted); font-size: .76rem; }
.sup-msg { display: grid; gap: .15rem; width: 100%; text-align: left; background: transparent; border: 1px solid var(--line-2); border-radius: 2px; padding: .65rem .85rem; color: inherit; font: inherit; cursor: pointer; }
.sup-msg:hover { border-color: var(--line); }
.sup-msg small, .sup-snip { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-body { white-space: pre-wrap; word-break: break-word; max-height: 50vh; overflow: auto; background: var(--ink); border: 1px solid var(--line-2); border-radius: 2px; padding: .8rem; font: 400 .85rem/1.5 var(--sans); }
.sup-steps { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .35rem; }
.sup-steps li { position: relative; padding-left: 1.4rem; font-size: .85rem; color: var(--muted); }
.sup-steps li::before { content: ""; position: absolute; left: 0; top: .35rem; width: .6rem; height: .6rem; border-radius: 50%; border: 1px solid var(--line); }
.sup-steps li.done { color: var(--cream-2); }
.sup-steps li.done::before { background: var(--gold); border-color: var(--gold); }
.sup-steps li.cur { color: var(--cream); font-weight: 500; }
.sup-hist li { display: grid; gap: .1rem; font-size: .85rem; border-left: 2px solid var(--line-2); padding-left: .7rem; }
.sup-card header { display: flex; gap: .6rem; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.sup-card p { margin: .3rem 0; }
.sup-gmail code { word-break: break-all; font-size: .78rem; }
.sup-steps-txt { padding-left: 1.2rem; display: grid; gap: .3rem; }
.sup-items { display: grid; gap: .35rem; max-height: 46vh; overflow: auto; }
.sup-pick { display: flex; gap: .6rem; align-items: flex-start; font-size: .86rem; padding: .35rem 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.sup-pick input { margin-top: .2rem; }
.sup-line { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: .4rem; }
@media (max-width: 600px) { .sup-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; } .sup-line [name=name] { grid-column: 1 / -1; } }
.sup-proj li a { display: flex; gap: .8rem; justify-content: space-between; align-items: center; text-decoration: none; color: inherit; border: 1px solid var(--line-2); border-radius: 2px; padding: .6rem .8rem; }
.sup-proj li a > span:first-child { display: grid; min-width: 0; }
.sup-proj small { color: var(--muted); }
@media (max-width: 600px) { .sup-row, .sup-proj li a { flex-wrap: wrap; } .sup-itemlist li { grid-template-columns: minmax(0, 1fr); gap: .1rem; } }
.sup-pick input[type=checkbox] { width: auto; flex: none; min-height: 0; }
.sup-pick > span { flex: 1 1 auto; text-align: left; min-width: 0; }
.sup-new .form-grid, .sup-status .form-grid { margin-bottom: .7rem; }
.sup-status label.f, .sup-new label.f { margin-bottom: .7rem; }

/* ---- Design studies: list and study pages ---- */
.st-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.st-card { display: grid; gap: .6rem; padding: .7rem; text-decoration: none; color: inherit; }
.st-card:hover { border-color: var(--line); }
.st-thumb, .st-big, .st-vthumb { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 2px; background: #efefef; }
.st-card > * { min-width: 0; }
.st-empty { display: grid; place-items: center; color: var(--muted); width: 100%; box-sizing: border-box; overflow: hidden; }
.st-empty svg { width: 64px; height: 64px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.st-vthumb.st-empty svg { width: 32px; height: 32px; }
.st-meta { display: grid; gap: .15rem; min-width: 0; }
.st-meta small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-links { color: var(--gold-2) !important; }
.st-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.st-side { display: grid; gap: 1.2rem; min-width: 0; }
@media (max-width: 900px) { .st-layout { grid-template-columns: minmax(0, 1fr); } }
.st-hero p { margin: .6rem 0 0; }
.st-versions, .st-links-list, .st-proj { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.st-versions li, .st-proj li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: .8rem; align-items: start; border-bottom: 1px solid var(--line-2); padding-bottom: .7rem; }
.st-versions small, .st-proj small { display: block; }
.st-used { color: var(--gold-2); }
.st-vthumb { width: 96px; }
.st-links-list li { border: 1px solid var(--line-2); border-radius: 2px; padding: .7rem .8rem; display: grid; gap: .4rem; }
.st-chk { display: inline-flex; gap: .4rem; align-items: center; font-size: .85rem; cursor: pointer; }
.st-chk input { width: auto; min-height: 0; }
.st-proj .row select, .st-links-list select, [data-linkp] { background: var(--ink); color: var(--cream); border: 1px solid var(--line-2); border-radius: 2px; padding: .4rem .5rem; font: 400 .85rem var(--sans); max-width: 100%; }

/* ---- Design studies: the plan editor with its real 3D (full window) ---- */
html.ds-open, html.ds-open body { overflow: hidden; }
.ds { position: fixed; inset: 0; z-index: 900; display: grid; grid-template-rows: auto auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); background: var(--ink); color: var(--cream); font: 400 13px var(--sans); }
.ds button { font: inherit; color: inherit; }
.ds-top { display: flex; align-items: center; gap: .7rem; padding: .5rem .8rem; padding-top: max(.5rem, env(safe-area-inset-top)); padding-left: max(.8rem, env(safe-area-inset-left)); padding-right: max(.8rem, env(safe-area-inset-right)); border-bottom: 1px solid var(--line); min-width: 0; }
.ds-title { display: grid; min-width: 0; flex: 1 1 auto; }
.ds-title b { font: 400 1.25rem var(--serif); letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-title small { color: var(--muted); font-size: .72rem; letter-spacing: .08em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255,255,255,.9); cursor: pointer; font-size: 1rem; line-height: 1; transition: border-color .2s, color .2s; }
.ds-ic:hover { border-color: var(--gold); color: var(--gold-2); }
.ds-b { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid rgba(20,20,20,.28); background: transparent; padding: .55rem .9rem; border-radius: 999px; cursor: pointer; font: 500 .62rem var(--sans) !important; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }
.ds-b:hover { border-color: var(--gold); color: var(--gold-2); }
.ds-b.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.ds-b.gold:hover { background: var(--gold-2); color: var(--ink); }
.ds-b.small { padding: .4rem .7rem; }
.ds-b[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.ds-acts, .ds-hist { display: flex; align-items: center; gap: .5rem; flex: none; }
.ds-short { display: none; }
.ds-b svg.ds-short { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.ds-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px; flex: none; background: rgba(255,255,255,.9); }
.ds-seg button { border: 0; background: none; border-radius: 999px; padding: .4rem .8rem; cursor: pointer; font: 500 .6rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--cream-2); white-space: nowrap; }
.ds-seg button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.ds-seg.small button { padding: .32rem .65rem; }
.ds-menu { position: relative; }
.ds-menu summary { list-style: none; }
.ds-menu summary::-webkit-details-marker { display: none; }
.ds-menu-list { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 5; display: grid; min-width: 260px; background: #ffffff; border: 1px solid var(--line); border-radius: 2px; padding: .35rem; box-shadow: 0 18px 40px rgba(20,20,20,.117); }
.ds-menu-list button { text-align: left; background: none; border: 0; padding: .65rem .8rem; border-radius: 2px; cursor: pointer; font-size: .85rem; }
.ds-menu-list button:hover { background: rgba(168,133,77,.07); color: var(--gold-2); }
.ds-tools { display: flex; align-items: center; gap: .3rem; padding: .4rem .8rem; padding-left: max(.8rem, env(safe-area-inset-left)); padding-right: max(.8rem, env(safe-area-inset-right)); border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: thin; min-width: 0; }
.ds-tool { flex: none; display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .75rem; border: 1px solid transparent; border-radius: 2px; background: none; cursor: pointer; color: var(--cream-2); font-size: .8rem !important; }
.ds-tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.ds-tool:hover { color: var(--cream); border-color: var(--line-2); }
.ds-tool[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-2); background: rgba(200,169,106,.08); }
.ds-sep { flex: none; width: 1px; height: 22px; background: var(--line-2); margin: 0 .4rem; }
.ds-levels { display: flex; gap: .3rem; flex: none; }
.ds-lv { flex: none; border: 1px solid var(--line-2); background: none; border-radius: 999px; padding: .35rem .8rem; cursor: pointer; font-size: .78rem !important; color: var(--cream-2); white-space: nowrap; }
.ds-lv[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-2); }
.ds-lv.add { width: 30px; padding: .35rem 0; }
.ds-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 300px; min-height: 0; }
.ds[data-mode="plan"] .ds-main { grid-template-columns: minmax(0, 1fr) 300px; }
.ds[data-mode="3d"] .ds-main { grid-template-columns: minmax(0, 1fr) 300px; }
.ds[data-mode="plan"] .ds-3d, .ds[data-mode="3d"] .ds-plan { display: none; }
.ds-plan { position: relative; min-height: 0; min-width: 0; background: #f4f2ee; overflow: hidden; }
.ds-svg { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; cursor: default; }
.ds-plan[data-tool="rect"] .ds-svg, .ds-plan[data-tool="poly"] .ds-svg, .ds-plan[data-tool="measure"] .ds-svg { cursor: crosshair; }
.ds-plan[data-tool="door"] .ds-svg, .ds-plan[data-tool="window"] .ds-svg { cursor: copy; }
.ds-svg text { pointer-events: none; font-family: var(--sans); }
.ds-svg .g1 { stroke: #ebe7df; fill: none; }
.ds-svg .g2 { stroke: #dcd6cb; fill: none; }
.ds-svg .below { fill: none; stroke: #a59b8a; }
.ds-svg .room { fill-opacity: .42; cursor: move; }
.ds-svg .room.on { fill-opacity: .62; }
.ds-svg .outline { fill: none; stroke: #c8a96a; pointer-events: none; }
.ds-svg .wall { fill: #262626; cursor: pointer; }
.ds-svg .wall.outer { fill: #1d1d1d; }
.ds-svg .wall.on { fill: #a8854d; }
.ds-svg .gap { fill: #f4f2ee; }
.ds-svg .ln { stroke: #262626; }
.ds-svg .arc { fill: none; stroke: #7b705e; }
.ds-svg .op { cursor: ew-resize; }
.ds-svg .op .hit { fill: transparent; }
.ds-svg .op.on .ln, .ds-svg .op.on .arc { stroke: #a8854d; }
.ds-svg .op.on .gap { fill: #f7ecd6; }
.ds-svg .piece rect { fill: #fffdf8; fill-opacity: .92; stroke: #8f846f; }
.ds-svg .piece.has3d rect { stroke: #a8854d; }
.ds-svg .piece.on rect { stroke: #a8854d; fill: #fff6e3; }
.ds-svg .piece { cursor: move; }
.ds-svg .front { stroke: #b59a68; }
.ds-svg .pn { fill: #6b604d; text-anchor: middle; }
.ds-svg .rn { fill: #1b1b1b; text-anchor: middle; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.ds-svg .ra { fill: #8a6c3a; text-anchor: middle; }
.ds-svg .dim line { stroke: #a8854d; }
.ds-svg .dt { fill: #8a6c3a; text-anchor: middle; }
.ds-svg .el { fill: #6b5a35; text-anchor: middle; }
.ds-svg .he { fill: #ffffff; stroke: #a8854d; cursor: move; }
.ds-svg .hv { fill: #c8a96a; stroke: #ffffff; cursor: grab; }
.ds-svg .pv { fill: rgba(200,169,106,.18); stroke: #a8854d; }
.ds-svg polyline.pv { fill: none; }
.ds-svg .pv.bad { stroke: #c0473b; fill: rgba(192,71,59,.12); }
.ds-svg .pt { fill: #1b1b1b; text-anchor: middle; font-weight: 500; }
.ds-svg .pp { fill: #ffffff; stroke: #a8854d; }
.ds-svg .pp.first { fill: #c8a96a; }
.ds-svg .ms { stroke: #2f6f8f; fill: #2f6f8f; }
.ds-svg .cur { fill: #c8a96a; }
.ds-float { position: absolute; z-index: 2; display: flex; gap: .35rem; align-items: center; }
.ds-zoom { top: .7rem; right: .7rem; flex-direction: column; }
.ds-zoom .ds-ic { background: rgba(255,255,255,.92); color: #1b1b1b; border-color: #d6cfc3; }
.ds-hint { position: absolute; left: .7rem; top: .7rem; right: 3.6rem; margin: 0; font-size: .72rem; line-height: 1.45; color: #5d5547; pointer-events: none; max-width: 56ch; }
.ds-3d { position: relative; min-height: 0; min-width: 0; background: #ebe8e2; border-left: 1px solid var(--line-2); overflow: hidden; touch-action: none; }
.ds-3d .ds-gl { display: block; width: 100% !important; height: 100% !important; }
.ds-3dbar { top: .7rem; left: .7rem; right: .7rem; flex-wrap: wrap; }
.ds-3dbar .ds-seg { background: rgba(255,255,255,.9); }
.ds-3dbar .ds-b { background: rgba(255,255,255,.9); color: var(--cream); }
.ds-3dbar .ds-b[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.ds-3dbar .ds-ic { color: var(--cream); background: rgba(255,255,255,.9); }
.ds-hint3d { top: auto; bottom: .7rem; color: #3f3a32; }
.ds-walkpad { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); z-index: 2; display: grid; gap: .5rem; }
.ds-walkpad[hidden] { display: none; }
.ds-walkpad button { width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(20,20,20,.34); background: rgba(255,255,255,.9); color: var(--gold-2); font-size: 1.1rem; cursor: pointer; touch-action: none; }
.ds-wait { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: #5d5547; }
.ds-side { min-height: 0; overflow-y: auto; padding: 1rem 1rem 2rem; border-left: 1px solid var(--line-2); background: var(--ink-2); display: grid; align-content: start; gap: .75rem; }
.ds-h { margin: 0; font: 500 .62rem var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.ds-name { margin: 0; font: 400 1.3rem var(--serif); }
.ds-muted { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.ds-big { margin: 0; font: 400 1.7rem var(--serif); color: var(--cream); display: grid; }
.ds-big small { font: 400 .72rem var(--sans); color: var(--muted); letter-spacing: .04em; }
.ds-f { display: grid; gap: .3rem; font-size: .72rem; color: var(--cream-2); min-width: 0; }
.ds-f span { letter-spacing: .06em; }
.ds-f input, .ds-f select { width: 100%; min-width: 0; background: #ffffff; color: var(--cream); border: 1px solid var(--line-2); border-radius: 2px; padding: .5rem .6rem; font: 400 .9rem var(--sans); min-height: 0; }
.ds-f input:focus, .ds-f select:focus { outline: none; border-color: var(--gold); }
.ds-f input:disabled { opacity: .6; }
.ds-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .6rem; }
.ds-chk { display: flex; gap: .5rem; align-items: center; font-size: .82rem; color: var(--cream-2); cursor: pointer; }
.ds-chk input { width: auto; min-height: 0; accent-color: var(--gold); }
.ds-side .row { gap: .45rem; }
.ds-mat { border: 1px solid var(--line-2); border-radius: 2px; }
.ds-mat > summary { list-style: none; display: flex; gap: .7rem; align-items: center; padding: .5rem .6rem; cursor: pointer; }
.ds-mat > summary::-webkit-details-marker { display: none; }
.ds-mat > summary > span:last-child { display: grid; min-width: 0; }
.ds-mat > summary small { color: var(--muted); font-size: .68rem; letter-spacing: .06em; }
.ds-mat > summary b { font-weight: 400; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-mat[open] > summary { border-bottom: 1px solid var(--line-2); }
.ds-mat > :not(summary) { margin-left: .6rem; margin-right: .6rem; }
.ds-swatch { flex: none; width: 30px; height: 30px; border-radius: 2px; border: 1px solid rgba(20,20,20,.18); }
.ds-sws { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; margin-top: .6rem; }
.ds-sw { display: grid; gap: .2rem; justify-items: center; background: none; border: 1px solid transparent; border-radius: 2px; padding: .3rem .1rem; cursor: pointer; min-width: 0; }
.ds-sw span { width: 100%; aspect-ratio: 1; border-radius: 2px; border: 1px solid rgba(20,20,20,.15); }
.ds-sw small { font-size: .6rem; color: var(--cream-2); text-align: center; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ds-sw.on, .ds-sw:hover { border-color: var(--gold); }
.ds-sub { margin: .7rem 0 .3rem; font: 500 .58rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.ds-board small { display: block; color: var(--muted); font-size: .66rem; margin: .3rem 0; }
.ds-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.ds-chip { border: 1px solid rgba(20,20,20,.2); border-radius: 999px; padding: .3rem .6rem; font-size: .66rem !important; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-chip.on { outline: 2px solid var(--gold); outline-offset: 1px; }
.ds-custom { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: .7rem .6rem .7rem !important; font-size: .78rem; color: var(--cream-2); }
.ds-custom input { width: 44px; height: 30px; padding: 0; border: 1px solid var(--line-2); border-radius: 2px; background: none; }
.ds-under { border-top: 1px solid var(--line-2); padding-top: .6rem; display: grid; gap: .5rem; }
.ds-under summary { cursor: pointer; font-size: .82rem; color: var(--cream-2); }
.ds-file { display: inline-block; cursor: pointer; }
.ds-3dstate p { margin: 0 0 .4rem; font-size: .82rem; }
.ds-ok { color: var(--ok); }
.ds-check { border-top: 1px solid var(--line-2); padding-top: .8rem; display: grid; gap: .35rem; }
.ds-check .ds-st { margin: 0; font-size: .82rem; }
.ds-check.ok .ds-st { color: var(--ok); }
.ds-check.bad .ds-st { color: var(--warn); }
.ds-err { margin: 0; font-size: .8rem; color: var(--bad); padding-left: .8rem; border-left: 2px solid rgba(217,138,115,.5); }
.st-legacy { color: var(--warn) !important; }
.st-legacy-card { margin-bottom: 1.2rem; border-color: rgba(224,169,91,.4); }
.st-legacy-card p { margin: .4rem 0 0; }
.st-sum { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .35rem; }
.st-sum li { display: flex; flex-wrap: wrap; gap: .2rem .7rem; font-size: .85rem; }
.st-sum li span { color: var(--muted); }
/* Phones and narrow windows: one view at a time (plan or 3D), the panel under it. */
@media (max-width: 900px) {
  .ds-wide { display: none; }
  .ds-top { flex-wrap: wrap; gap: .5rem .6rem; }
  .ds-title { flex: 1 1 0; }
  .ds-top .ds-seg { order: 2; }
  .ds-acts { order: 3; margin-left: auto; }
  .ds-hist { order: 1; }
  .ds-long { display: none; }
  .ds-short { display: inline; }
  .ds-b svg.ds-short { display: block; }
  .ds-menu summary.ds-b { padding: .5rem .6rem; }
  .ds-plan .ds-hint { display: none; }
  .ds-main, .ds[data-mode="plan"] .ds-main, .ds[data-mode="3d"] .ds-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .ds-side { border-left: 0; border-top: 1px solid var(--line); max-height: 40vh; padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
  .ds-3d { border-left: 0; }
  .ds-tool span { display: none; }
  .ds-tool { padding: .45rem .55rem; }
  .ds-hint { font-size: .66rem; }
}
@media (max-width: 420px) {
  .ds-b { padding: .5rem .7rem; letter-spacing: .12em; }
  .ds-seg button { padding: .38rem .6rem; letter-spacing: .1em; }
}
/* Landscape phones: the panel beside the view, a compact header, no hint over the plan. */
@media (max-height: 520px) and (orientation: landscape) {
  .ds-top { flex-wrap: nowrap; padding-top: .3rem; padding-bottom: .3rem; }
  .ds-title { flex: 1 1 auto; }
  .ds-title b { font-size: 1rem; }
  .ds-title small { display: none; }
  .ds-tools { padding-top: .2rem; padding-bottom: .2rem; }
  .ds-main, .ds[data-mode="plan"] .ds-main, .ds[data-mode="3d"] .ds-main { grid-template-columns: minmax(0, 1fr) 250px; grid-template-rows: minmax(0, 1fr); }
  .ds-side { max-height: none; border-top: 0; border-left: 1px solid var(--line-2); padding-right: max(1rem, env(safe-area-inset-right)); padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
  .ds-hint { display: none; }
  .ds-3dbar { gap: .25rem; }
}

/* ---- Studio → Website ---- */
.web-where { margin: 1rem 0 .5rem; font: 500 .62rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); }
.web-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: .8rem; }
.web-slot { margin: 0; border: 1px solid var(--line-2); border-radius: 2px; overflow: hidden; display: grid; }
.web-slot.replaced { border-color: var(--gold); }
.web-slot img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; background: var(--ink-3); }
.web-slot figcaption { padding: .6rem .7rem; display: grid; gap: .3rem; }
.web-slot small { color: var(--muted); }
.web-up { cursor: pointer; }
.web-projects { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.web-projects li { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: .9rem; align-items: center; border: 1px solid var(--line-2); border-radius: 2px; padding: .6rem; }
.web-projects li.draft { border-style: dashed; }
.web-projects img, .web-nocover { width: 120px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 2px; display: grid; place-items: center; background: var(--ink-3); color: var(--muted); font-size: .75rem; text-align: center; }
.web-pmain { display: grid; gap: .2rem; min-width: 0; }
.web-pmain b, .web-pmain small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-pmain small { color: var(--muted); }
@media (max-width: 700px) { .web-projects li { grid-template-columns: 96px minmax(0, 1fr); } .web-projects li .row { grid-column: 1 / -1; } .web-projects img, .web-nocover { width: 96px; } }
.web-pic { display: grid; gap: .4rem; justify-items: start; }
.web-pic img, .web-pic > span { width: 200px; max-width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 2px; background: var(--ink-3); display: grid; place-items: center; color: var(--muted); font-size: .8rem; }
.web-pic label { cursor: pointer; }
.web-pairs { display: grid; gap: .8rem; }
.web-pair { border: 1px solid var(--line-2); border-radius: 2px; padding: .7rem; display: grid; gap: .5rem; }
.web-pair-pics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.web-pair-pics small { color: var(--muted); display: block; margin-bottom: .3rem; }
.web-edit .form-grid, .web-edit label.f { margin-bottom: .7rem; }
.sk-grid { display: inline-flex; gap: .4rem; align-items: center; font-size: .78rem; color: var(--muted); }
.sk-grid select { background: var(--ink); color: var(--cream); border: 1px solid var(--line-2); border-radius: 2px; padding: .3rem .4rem; font: 400 .8rem var(--sans); }

/* Assistant: location and microphone chips, the live level on the microphone */
.as-chips { max-width: 820px; margin: .45rem auto 0; display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; }
.as-chips[hidden] { display: none; }
.as-chip { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; min-width: 0; padding: .25rem .4rem .25rem .65rem; border: 1px solid var(--line-2); border-radius: 999px; background: var(--ink); color: var(--cream-2); font: 400 .75rem var(--sans); }
.as-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.as-chip.on { border-color: rgba(20,20,20,.34); color: var(--gold-2); }
.as-chip.warn { border-color: rgba(180,72,59,.6); color: var(--bad); white-space: normal; }
.as-chip.warn > span { white-space: normal; }
.as-chip button { flex: none; background: none; border: 0; color: inherit; cursor: pointer; font: inherit; padding: .1rem .35rem; border-radius: 999px; }
.as-chip button:hover { background: rgba(168,133,77,.108); }
button.as-chip { cursor: pointer; padding-right: .65rem; }
button.as-chip:hover { border-color: var(--gold); }
.as-icon.rec { box-shadow: 0 0 0 calc(var(--lvl, 0) * 10px) rgba(180,72,59,.35); transition: box-shadow .08s linear; }
.mic-list { display: grid; gap: .4rem; margin: .8rem 0; }
.mic-opt { display: flex; gap: .6rem; align-items: center; border: 1px solid var(--line-2); border-radius: 2px; padding: .6rem .8rem; cursor: pointer; }
.mic-opt:has(input:checked) { border-color: var(--gold); }
.mic-opt input { width: auto; min-height: 0; }
.mic-meter { height: 8px; border-radius: 999px; background: var(--ink-3); overflow: hidden; }
.mic-meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-light), var(--gold-fill)); transition: width .06s linear; }
.mic-pick [data-heard].ok { color: var(--ok); }
/* Platform requests: create with the assistant */
.rq-ai textarea { width: 100%; box-sizing: border-box; margin: .4rem 0 .9rem; }
.rq-ai-voice { display: flex; gap: .9rem; align-items: center; border: 1px solid var(--line-2); border-radius: 2px; padding: .8rem; margin-bottom: .8rem; }
.rq-ai-mic { flex: none; width: 58px; height: 58px; border-radius: 50%; border: 1px solid var(--gold); background: rgba(168,133,77,.09); color: var(--gold-2); display: grid; place-items: center; cursor: pointer; }
.rq-ai-mic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.rq-ai-mic.rec { background: #b4483b; border-color: #b4483b; color: #ffffff; animation: asPulse 1.2s ease-in-out infinite; }
.rq-ai-mic:disabled { opacity: .5; }
.rq-ai-vtext { flex: 1; min-width: 0; display: grid; gap: .4rem; }
.rq-ai-vtext b { font-weight: 500; font-size: .9rem; }
.rq-ai-micname { justify-self: start; background: none; border: 1px solid var(--line-2); border-radius: 999px; color: var(--cream-2); padding: .2rem .6rem; font: 400 .75rem var(--sans); cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-ai-shots { cursor: pointer; }
/* Website: pictures made by the image assistant. */
.web-slot .row { flex-wrap: wrap; gap: .35rem; }
.web-genph { display: grid; place-items: center; gap: .3rem; width: 200px; max-width: 100%; aspect-ratio: 3 / 2; border: 1px dashed var(--gold); border-radius: 2px; background: rgba(168,133,77,.07); color: var(--gold-2); font: 400 .82rem var(--sans); cursor: pointer; padding: .6rem; text-align: center; }
.web-genph span { font-size: 1.4rem; }
.web-genph:hover { background: rgba(168,133,77,.126); }
.web-pic .row { flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.web-ai-result { margin: .2rem 0 .9rem; }
.web-ai-result img { display: block; width: 100%; max-height: 52vh; object-fit: contain; border-radius: 2px; background: var(--ink-3); }
.web-ai-result .row { margin-top: .6rem; gap: .7rem; flex-wrap: wrap; align-items: center; }
.web-ai-result .spinner { display: block; margin: 2.5rem auto; }
.web-ai-result.loading img { opacity: .4; }
.web-ai-keep { display: flex; align-items: center; gap: .5rem; font-size: .85rem; margin: 0 0 .4rem; cursor: pointer; }
.web-ai-keep img { width: 46px; height: 32px; object-fit: cover; border-radius: 2px; }
.web-ai .web-ai-keep { display: flex; justify-content: flex-start; text-align: left; }
.web-ai .web-ai-keep input { width: auto; flex: none; margin: 0; }
.web-ai .web-ai-keep span { flex: 1; min-width: 0; }

/* Picture viewer (everywhere a picture is opened): full screen, in place. */
dialog.iv { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(7,7,7,.96); color: var(--cream); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
dialog.iv:not([open]) { display: none; }
dialog.iv::backdrop { background: rgba(20,20,20,.495); }
.iv-top { display: flex; align-items: center; gap: 1rem; padding: .7rem 1rem calc(.7rem) calc(1rem + env(safe-area-inset-left)); }
.iv-cap { flex: 1; min-width: 0; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-n { color: var(--muted); font-size: .8rem; }
.iv-x { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--line); background: var(--ink-2); color: var(--cream); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.iv-stage { position: relative; min-height: 0; margin: 0 1rem; }
.iv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .3s ease; background: transparent; }
.iv-img.in { opacity: 1; }
.iv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid var(--line); background: rgba(17,17,17,.85); color: var(--cream); font-size: 1.8rem; line-height: 1; cursor: pointer; z-index: 2; }
.iv-nav.prev { left: max(.6rem, env(safe-area-inset-left)); }
.iv-nav.next { right: max(.6rem, env(safe-area-inset-right)); }
.iv-strip { display: flex; gap: .4rem; overflow-x: auto; padding: .6rem 1rem calc(.8rem + env(safe-area-inset-bottom)); justify-content: center; }
.iv-strip button { flex: none; width: 64px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 2px; background: #ffffff; cursor: pointer; overflow: hidden; }
.iv-strip button[aria-current="true"] { border-color: var(--gold); }
.iv-strip img { width: 100%; height: 100%; object-fit: contain; display: block; }
@media (max-width: 760px) { .iv-strip { justify-content: flex-start; } .iv-stage { margin: 0; } }

/* How a fast sketch was decided. */
.sk-decided { margin: .3rem 0 .5rem; font-size: .8rem; }
.sk-decided summary { cursor: pointer; color: var(--gold-2); }
.sk-decided ul { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .2rem .9rem; }
.sk-decided li { display: flex; gap: .4rem; align-items: baseline; min-width: 0; }
.sk-decided li span { color: var(--muted); }
.sk-decided li b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-decided li em { color: var(--muted); font-style: normal; font-size: .72rem; }

/* Blocking notice while a recording is written down */
.busy-block { border: 1px solid var(--line); border-radius: 2px; padding: 0; background: var(--ink-2); color: var(--cream); width: min(380px, calc(100% - 32px)); }
.busy-block:focus, .busy-block:focus-visible { outline: none; }
.busy-block::backdrop { background: rgba(20,20,20,.451); backdrop-filter: blur(4px); }
.busy-block-inner { display: grid; justify-items: center; gap: .7rem; padding: 2rem 1.6rem; text-align: center; }
.busy-block-inner b { font-family: var(--serif, inherit); font-weight: 400; font-size: 1.15rem; }
.busy-block-inner p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.busy-ring { width: 38px; height: 38px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite; }

/* Proof of payment: picked in the portal, opened from the Studio */
.proof-f { display: grid; gap: .4rem; font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.proof-pick { margin: 0; }
.proof-btn { display: inline-flex; align-items: center; gap: .55rem; padding: .8rem 1.1rem; border: 1px dashed var(--line); border-radius: 2px; background: var(--ink); color: var(--cream-2); cursor: pointer; font-size: .86rem; letter-spacing: 0; text-transform: none; transition: border-color .3s var(--ease), color .3s var(--ease); width: 100%; }
.proof-btn:hover, .proof-btn:focus-within { border-color: var(--gold); color: var(--gold-2); }
.proof-btn[hidden], .proof-file[hidden] { display: none; }
.proof-file { display: flex; align-items: center; gap: .8rem; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 2px; background: var(--ink); }
.proof-thumb { width: 48px; height: 48px; flex: none; border-radius: 2px; overflow: hidden; background: var(--ink-3); display: grid; place-items: center; font-size: .62rem; letter-spacing: .14em; color: var(--gold-2); }
.proof-thumb img { width: 100%; height: 100%; object-fit: cover; }
.proof-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; color: var(--cream); letter-spacing: 0; text-transform: none; }
.proof-x { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--cream); font-size: 1.2rem; cursor: pointer; }
.proof-x:hover { border-color: var(--bad); color: var(--bad); }
.proof-f > .proof-hint { display: block; margin-top: .4rem; font-size: .74rem; color: var(--muted); letter-spacing: 0; text-transform: none; }
.pe-proof { display: inline-flex; align-items: center; gap: .6rem; margin: .4rem 0; padding: .3rem .8rem .3rem .3rem; border: 1px solid var(--line); border-radius: 2px; background: var(--ink); color: var(--cream); cursor: pointer; font-size: .8rem; }
.pe-proof:hover { border-color: var(--gold); }
.pe-proof img, .pe-proof-pdf { width: 40px; height: 40px; border-radius: 2px; object-fit: cover; display: grid; place-items: center; background: var(--ink-3); font-size: .6rem; letter-spacing: .12em; color: var(--gold-2); }
.pe-proof-frame { width: 100%; height: min(75dvh, 900px); border: 0; border-radius: 2px; background: #ffffff; }
.pp-report > .form-grid, .pp-report > .f { margin-bottom: 1rem; }
.pp-report > .stg-lead { margin-bottom: 1.2rem; }

/* Sketches: the current one open with one picture; the earlier ones folded away */
.sk-main { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line-2); border-radius: 2px; overflow: hidden; background: #fafafa; cursor: zoom-in; }
.sk-main img { display: block; width: 100%; height: auto; }
.sk-zoom { position: absolute; right: .6rem; bottom: .6rem; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.9); color: var(--cream); font-size: 1rem; }
.sk-main:hover .sk-zoom { background: var(--gold); color: var(--ink); }
.sk-drawing { display: flex; align-items: center; margin: 0; }
.sk-older { border: 1px solid var(--line-2); border-radius: 2px; padding: .2rem .9rem; }
.sk-older > summary { cursor: pointer; padding: .6rem 0; font-size: .85rem; color: var(--cream-2); }
.sk-older-list { display: grid; gap: .6rem; padding-bottom: .8rem; }
.sk-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: .8rem; align-items: start; padding-top: .6rem; border-top: 1px solid var(--line-2); }
.sk-row .sk-thumb { display: block; width: 120px; aspect-ratio: 16 / 11; padding: 0; border: 1px solid var(--line-2); border-radius: 2px; overflow: hidden; background: #efefef; cursor: zoom-in; }
.sk-row .sk-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sk-row-body { display: grid; gap: .3rem; min-width: 0; }
.sk-row-body header { flex-wrap: wrap; }
.sk-units { margin: .3rem 0; color: var(--cream-2); }
@media (max-width: 520px) { .sk-row { grid-template-columns: 84px minmax(0, 1fr); } .sk-row .sk-thumb { width: 84px; } }

/* Settings: the AI service (provider, keys, models in use) */
.ai-card { grid-column: 1 / -1; min-width: 0; }
.ai-prov { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: .4rem 0; }
.ai-prov button { display: grid; gap: .2rem; text-align: left; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 2px; background: var(--ink); color: var(--cream); cursor: pointer; transition: border-color .3s var(--ease); }
.ai-prov button b { font: 400 1.15rem var(--serif); }
.ai-prov button span { font-size: .74rem; color: var(--muted); }
.ai-prov button[aria-checked=true] { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.ai-prov button[aria-checked=true] b::after { content: " ✓"; color: var(--gold-2); }
.ai-prov button:disabled { cursor: default; opacity: .8; }
.ai-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: .8rem; }
.ai-key { border: 1px solid var(--line-2); border-radius: 2px; padding: .9rem 1rem; display: grid; gap: .6rem; min-width: 0; }
.ai-key h4 { margin: 0; font: 400 1.05rem var(--serif); }
.ai-key .form-actions { flex-wrap: wrap; margin-top: 0; }
.ai-test-out { margin: 0; min-height: 1em; }
.ai-test-out.ok { color: var(--ok); } .ai-test-out.warn { color: var(--gold-2); } .ai-test-out.bad { color: var(--bad); }
.ai-models-h { margin: 1.4rem 0 .2rem; font: 400 1.1rem var(--serif); }
.ai-models { display: grid; border: 1px solid var(--line-2); border-radius: 2px; overflow: hidden; margin-top: .6rem; }
.ai-mrow { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: .8rem; align-items: center; padding: .55rem .9rem; border-top: 1px solid var(--line-2); font-size: .82rem; }
.ai-mrow.head { border-top: 0; font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); background: var(--ink); }
.ai-mrow code { font-size: .78rem; color: var(--cream-2); word-break: break-all; }
.ai-mrow > span { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.ai-mrow input { padding: .45rem .6rem; font-size: .8rem; font-family: ui-monospace, Menlo, monospace; }
.ai-mrow i { font-style: normal; flex: none; width: 1.1em; text-align: center; }
.ai-mrow i.ok { color: var(--ok); } .ai-mrow i.no { color: var(--bad); }
@media (max-width: 760px) {
  .ai-prov, .ai-keys { grid-template-columns: minmax(0, 1fr); }
  .ai-mrow { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
  .ai-mrow.head { display: none; }
  .ai-mrow > span:nth-child(2)::before { content: "OpenRouter"; font-size: .58rem; letter-spacing: .14em; color: var(--muted); min-width: 5.5rem; }
  .ai-mrow > span:nth-child(3)::before { content: "Integralis"; font-size: .58rem; letter-spacing: .14em; color: var(--muted); min-width: 5.5rem; }
}

/* Settings: model checks */
.ai-chk-bar { align-items: center; gap: .6rem; flex-wrap: wrap; margin: .6rem 0; }
.ai-chk-img { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--cream-2); }
.ai-chk-img input { width: auto; }
.ai-chk { margin-top: 1rem; }
.ai-chk-h { margin: 0 0 .4rem; font-size: .86rem; display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.ai-chk-h .ok, .ai-chk-t .ok { color: var(--ok); } .ai-chk-h .bad, .ai-chk-t .bad { color: var(--bad); }
.ai-chk-t .ai-mrow > span:first-child { flex-direction: column; align-items: flex-start; gap: .15rem; }
.ai-chk-t .ai-mrow > span { flex-wrap: wrap; }
.ai-chk-t code { font-size: .72rem; color: var(--muted); }
.ai-chk-pic { width: 44px; height: 44px; object-fit: cover; border-radius: 2px; border: 1px solid var(--line-2); }
@media (max-width: 760px) { .ai-chk-t .ai-mrow > span:nth-child(n)::before { content: none; } }

/* Project page: the flow bar of the Estudo (Sketches → Generate the study) */
.pflow { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .4rem; margin: 1rem 0 1.2rem; padding: .5rem; border: 1px solid var(--line); border-radius: 2px; background: var(--ink-2); overflow-x: auto; scrollbar-width: thin; }
.pflow button { display: flex; align-items: center; gap: .6rem; flex: 1 1 0; min-width: 170px; padding: .55rem .8rem; border: 1px solid transparent; border-radius: 2px; background: none; color: var(--cream-2); text-align: left; cursor: pointer; transition: background .3s var(--ease), border-color .3s var(--ease); }
.pflow button:hover { background: var(--ink-3); }
.pflow button[aria-selected=true] { background: var(--ink-3); border-color: var(--gold); color: var(--cream); }
.pflow .n { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); font-size: .78rem; }
.pflow button.done .n { background: var(--ok); border-color: var(--ok); color: var(--ink); }
.pflow button[aria-selected=true] .n { border-color: var(--gold); }
.pflow .tx { display: grid; min-width: 0; }
.pflow .tx b { font: 400 1rem var(--serif); white-space: nowrap; }
.pflow .tx small { font-size: .7rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pflow-sep { color: var(--muted); flex: none; }
.pflow-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .6rem; margin: .8rem 0 1.4rem; }
.pflow-next:empty { display: none; }
.pflow-next p { margin: 0; flex: 1 1 220px; }
.pstep[hidden] { display: none; }
@media (max-width: 640px) {
  .pflow { margin: .8rem -4px 1rem; }
  .pflow button { min-width: 0; padding: .45rem .5rem; gap: .4rem; }
  .pflow .tx b { font-size: .88rem; white-space: normal; line-height: 1.15; }
  .pflow button:not([aria-selected=true]) .tx small { display: none; }
  .pflow-sep { display: none; }
  .pflow-next .btn { flex: 1 1 100%; }
}

/* Recording strip (assistant composer and voice boxes): time, live waveform, Discard and Done. */
.rec-strip { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; grid-template-areas: "dot time wave x done" "label label label label label"; align-items: center; gap: .3rem .6rem; padding: .55rem .6rem .5rem .85rem; border: 1px solid rgba(211,90,74,.55); border-radius: 2px; background: linear-gradient(90deg, rgba(211,90,74,.14), rgba(255,255,255,.35) 70%); box-shadow: 0 0 0 4px rgba(211,90,74,.06); }
.rec-strip[hidden] { display: none; }
.rec-strip-dot { grid-area: dot; width: 10px; height: 10px; border-radius: 50%; background: #e0584a; animation: blink 1.2s step-end infinite; }
.rec-strip-time { grid-area: time; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1rem; font-variant-numeric: tabular-nums; color: var(--cream); min-width: 3.4ch; }
.rec-strip-wave { grid-area: wave; width: 100%; height: 30px; display: block; min-width: 0; }
.rec-strip-x { grid-area: x; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--cream-2); font-size: 1.3rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.rec-strip-done { grid-area: done; display: inline-flex; align-items: center; gap: .45rem; min-height: 36px; padding: 0 .9rem; border-radius: 999px; border: 0; background: #c0473b; color: #ffffff; font: 500 .82rem var(--sans); cursor: pointer; white-space: nowrap; }
.rec-strip-sq { width: 10px; height: 10px; border-radius: 2px; background: #ffffff; }
.rec-strip-label { grid-area: label; font-size: .74rem; line-height: 1.35; color: var(--cream-2); min-width: 0; }
.rec-strip-label:empty { display: none; }
.as-composer .rec-strip { max-width: 820px; margin: 0 auto .1rem; }
.as-composer.recording .as-inputrow { display: none; }
.rq-ai-voice + .rec-strip { margin: -.3rem 0 .8rem; }
.rq-ai-voice.recording .mic-meter { display: none; }
@media (max-width: 380px) { .rec-strip { gap: .3rem .45rem; padding-left: .7rem; } .rec-strip-done { padding: 0 .7rem; } }

/* ---- Studio → Team ---- */
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: .9rem; }
.tm-card { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; align-items: start; padding: 1.1rem 1.2rem; }
.tm-card.off { opacity: .6; }
.tm-main { display: grid; gap: .25rem; min-width: 0; }
.tm-main b { font-weight: 500; font-size: 1.02rem; }
.tm-title { color: var(--cream-2); font-size: .9rem; }
.tm-meta { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.tm-main small { overflow-wrap: anywhere; }
.tm-you { font: 500 .62rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); margin-left: .3rem; }
.tm-acts { grid-column: 1 / -1; display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .4rem; }
.tm-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 500 .9rem var(--sans); letter-spacing: .04em; color: var(--on-gold); background: var(--gold); flex: none; }
.tm-av.sm { width: 24px; height: 24px; font-size: .62rem; }
.tm-av.xs { width: 20px; height: 20px; font-size: .55rem; border: 1px solid var(--ink); margin-left: -4px; }
.tm-group, .tm-owner, .tm-offb { font: 500 .58rem var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: .28rem .55rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--cream-2); }
.tm-owner { border-color: var(--gold); color: var(--gold-2); }
.tm-offb { border-color: rgba(211,90,74,.5); color: var(--bad); }
.g-management { --g: #7f6334; } .g-construction { --g: #5c5c5c; } .g-engineering { --g: #4f5a55; } .g-interiors { --g: #8a5a3c; } .g-architecture { --g: #2f5f85; } .g-office { --g: #5b4a8a; } .g-other { --g: #636363; }
.tm-av[class*="g-"] { background: var(--g); }
.tm-group[class*="g-"] { border-color: color-mix(in srgb, var(--g) 60%, transparent); color: var(--g); }
.tm-sub { margin: 1.6rem 0 .8rem; font-weight: 400; }
.tm-groups { margin-top: 1.6rem; }
.tm-groups h3 { margin: 0 0 .3rem; font-weight: 400; }
.tm-groups dl { display: grid; gap: .55rem; margin: .9rem 0 0; }
.tm-groups dl div { display: grid; grid-template-columns: 170px 1fr; gap: .8rem; align-items: baseline; }
.tm-groups dd { margin: 0; color: var(--cream-2); font-size: .9rem; }
@media (max-width: 560px) { .tm-groups dl div { grid-template-columns: 1fr; gap: .25rem; } }
.tm-pw { display: grid; gap: .3rem; margin: .8rem 0; padding: 1rem; border: 1px solid var(--line-2); border-radius: 2px; background: var(--ink); }
.tm-pw code { font-size: 1.05rem; color: var(--gold-2); overflow-wrap: anywhere; }
.pteam { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: -.4rem 0 1.2rem; }
.pt-label { font: 500 .6rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-right: .2rem; }
.pt-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .3rem .2rem .25rem; border: 1px solid var(--line-2); border-radius: 999px; font-size: .82rem; }
.pt-chip button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 .3rem; }
.pt-add { position: relative; display: inline-flex; align-items: center; padding: .3rem .75rem; border: 1px dashed var(--line); border-radius: 999px; color: var(--gold-2); font-size: .8rem; cursor: pointer; }
.pt-add select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.pt-mini { display: inline-flex; margin-left: .55rem; padding-left: 4px; vertical-align: middle; }
.side-foot .who { gap: .1rem; }
@media (min-width: 901px) { .side-foot .who { display: inline-grid; } }
.side-foot .who b { font-weight: 500; }
.side-foot .who small { color: var(--muted); font-size: .72rem; }

/* ---- Interiors: projects, mood boards, specification schedule ---- */
.in-sub { margin: 1.4rem 0 .7rem; font-weight: 400; }
.in-list { display: grid; gap: .6rem; }
.in-proj { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.2rem; text-decoration: none; color: inherit; }
.in-proj:hover { border-color: var(--gold); }
.in-proj-main { display: grid; gap: .2rem; min-width: 0; }
.in-proj-main b { font-weight: 500; }
.in-proj-main small { color: var(--muted); }
.in-proj-n { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; font-size: .78rem; color: var(--gold-2); }
.in-proj-n span { white-space: nowrap; }
.toolbar input[type=search] { max-width: 280px; }
.in-tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line-2); margin-bottom: 1.2rem; overflow-x: auto; }
.in-tabs button { border: 0; background: none; color: var(--muted); padding: .7rem 1rem; font: 500 .72rem var(--sans); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.in-tabs button[aria-selected="true"] { color: var(--gold-2); border-bottom-color: var(--gold); }
.in-tabs button span { margin-left: .3rem; color: var(--muted); }
.mb-bar { margin-bottom: 1rem; }
.mb-bar .chip small { color: var(--muted); margin-left: .2rem; letter-spacing: 0; text-transform: none; }
.mb-bar .chip[aria-pressed="true"] small { color: inherit; }
.mb-bar .chip.add { border-style: dashed; }
.mb-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #8fbf8a; margin-left: .3rem; vertical-align: 1px; }
.mb-board { padding: 1.3rem; }
.mb-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.mb-head h2, .mb-head h3 { margin: 0; font-weight: 400; }
.mb-head .row { flex-wrap: wrap; gap: .4rem; align-items: center; }
.mb-notes { margin: .5rem 0 0; color: var(--cream-2); max-width: 70ch; }
.mb-palette { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 1rem 0; }
.mb-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: .3rem .35rem .3rem .75rem; font: 500 .72rem var(--sans); letter-spacing: .04em; border: 1px solid rgba(20,20,20,.14); }
.mb-chip > span { padding-right: .4rem; }
.mb-chip button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0 .35rem; }
.mb-add { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.mb-add .btn { padding: .55rem .9rem; font-size: .66rem; }
.mb-up { cursor: pointer; }
.mb-grid { columns: 4 220px; column-gap: .9rem; }
.mb-grid.over, .mb-empty.over { outline: 2px dashed var(--gold); outline-offset: 4px; }
.mb-empty { border: 1px dashed var(--line); border-radius: 2px; padding: 2.4rem 1rem; text-align: center; color: var(--muted); }
.mb-item { break-inside: avoid; margin: 0 0 .9rem; border: 1px solid var(--line-2); border-radius: 2px; overflow: hidden; background: var(--ink); display: grid; }
.mb-item.r-love { border-color: rgba(168,133,77,.7); }
.mb-item.r-no { opacity: .65; }
.mb-img { display: block; border: 0; padding: 0; background: none; cursor: zoom-in; width: 100%; }
.mb-img img { display: block; width: 100%; height: auto; }
.mb-sw { min-height: 120px; display: grid; align-content: end; gap: .1rem; padding: .8rem; }
.mb-sw b { font-weight: 500; font-size: .92rem; }
.mb-sw small { font-family: ui-monospace, Menlo, monospace; font-size: .74rem; opacity: .85; }
.mb-note { padding: 1rem; font-family: var(--serif, Georgia, serif); font-style: italic; color: var(--cream); }
.mb-note b { display: block; font-style: normal; font-family: var(--sans); font-weight: 500; margin-bottom: .3rem; }
.mb-note p { margin: 0; line-height: 1.5; }
.mb-cap { padding: .6rem .8rem .2rem; display: grid; gap: .15rem; }
.mb-cap b { font-weight: 500; font-size: .86rem; }
.mb-cap small { color: var(--muted); font-size: .76rem; }
.mb-react { margin: .4rem .8rem 0; padding: .45rem .6rem; border-radius: 2px; font-size: .76rem; display: grid; gap: .2rem; }
.mb-react.r-love { background: rgba(168,133,77,.14); color: var(--gold-2); }
.mb-react.r-no { background: rgba(146,146,146,.14); color: var(--cream-2); }
.mb-react q { font-style: italic; color: var(--cream); }
.mb-acts { display: flex; flex-wrap: wrap; gap: .25rem; padding: .5rem .6rem .6rem; }
.mb-acts button { border: 1px solid var(--line-2); background: none; color: var(--cream-2); border-radius: 999px; padding: .25rem .55rem; font: 500 .66rem var(--sans); cursor: pointer; }
.mb-acts button:hover { border-color: var(--gold); color: var(--gold-2); }
.in-colour { display: flex; gap: .5rem; align-items: center; }
.in-colour input[type=color] { width: 52px; height: 42px; padding: 2px; border-radius: 2px; flex: none; }
.sc-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.sc-sum > div { border: 1px solid var(--line-2); border-radius: 2px; padding: .8rem 1rem; display: grid; gap: .2rem; }
.sc-sum small { font: 500 .58rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.sc-sum b { font: 400 1.4rem var(--serif, Georgia, serif); color: var(--cream); }
.sc-sum em { font-size: .72rem; color: var(--warn); font-style: normal; }
.sc-tools { justify-content: space-between; flex-wrap: wrap; gap: .6rem; }
.sc-room { margin: 1.2rem 0; }
.sc-room h3 { font-weight: 400; margin: 0 0 .5rem; }
.sc-room h3 small { color: var(--muted); font-size: .8rem; margin-left: .4rem; }
.sc-list { display: grid; gap: .45rem; }
.sc-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 54px 120px 70px 130px auto; gap: .8rem; align-items: center; border: 1px solid var(--line-2); border-radius: 2px; padding: .55rem .7rem; background: var(--ink); }
.sc-row.st-cancelled { opacity: .55; }
.sc-row.st-cancelled .sc-main b { text-decoration: line-through; }
.sc-thumb img, .sc-thumb i { width: 52px; height: 52px; border-radius: 2px; object-fit: cover; display: block; }
.sc-thumb i.none { background: var(--ink-3); }
.sc-main { display: grid; gap: .15rem; min-width: 0; }
.sc-main b { font-weight: 500; }
.sc-main small { color: var(--muted); font-size: .76rem; overflow-wrap: anywhere; }
.sc-main .sc-notes { color: var(--cream-2); }
.sc-qty, .sc-price, .sc-lead { display: grid; gap: .1rem; font-size: .86rem; }
.sc-qty > small, .sc-price > small:first-child, .sc-lead > small { font: 500 .54rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sc-price small:not(:first-child) { color: var(--muted); font-size: .7rem; }
.sc-status select { padding: .4rem 1.6rem .4rem .6rem; font-size: .78rem; border-radius: 999px; width: 100%; }
.sc-acts { display: flex; gap: .3rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 900px) {
  .sc-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-row { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "th main main" "qty price lead" "st st acts"; }
  .sc-thumb { grid-area: th; } .sc-main { grid-area: main; } .sc-qty { grid-area: qty; } .sc-price { grid-area: price; } .sc-lead { grid-area: lead; } .sc-status { grid-area: st; } .sc-acts { grid-area: acts; justify-self: end; }
}
@media (max-width: 560px) { .mb-grid { columns: 2 140px; column-gap: .6rem; } .mb-board { padding: 1rem; } .in-proj { flex-direction: column; align-items: flex-start; } .in-proj-n { justify-content: flex-start; } }
/* The client area */
.mbp { margin-top: 2.4rem; }
.mbp h2 { font-weight: 400; margin: .2rem 0 .3rem; }
.mbp .mb-board { margin-top: 1rem; }
.mb-you { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; padding: .6rem .7rem .7rem; }
.mb-you button[data-react] { border: 1px solid var(--line-2); background: none; color: var(--cream-2); border-radius: 999px; padding: .35rem .7rem; font: 500 .72rem var(--sans); cursor: pointer; }
.mb-you button[data-react="love"][aria-pressed="true"] { background: rgba(168,133,77,.2); border-color: rgba(168,133,77,.8); color: var(--cream); }
.mb-you button[data-react="no"][aria-pressed="true"] { background: rgba(146,146,146,.2); border-color: var(--muted); }
.mb-you q { flex-basis: 100%; font-style: italic; font-size: .8rem; color: var(--cream-2); }
.mb-you .link-btn { font-size: .74rem; padding: .2rem .1rem; text-align: left; }
/* Interiors, second round: schedule flags, budgets, sending to the client, the punch list, the client's approvals */
.in-alert { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e0584a; margin-left: .2rem; vertical-align: 1px; }
.in-proj-n .late { color: var(--bad); } .in-proj-n .wait { color: var(--info); }
.chip.warn { border-color: rgba(211,90,74,.5); color: var(--bad); }
.sc-row { grid-template-columns: 22px 52px minmax(0, 1fr) 54px 130px 70px 130px auto; }
.sc-row.is-late { border-color: rgba(211,90,74,.45); }
.sc-pick input { width: 18px; height: 18px; min-height: 0; accent-color: var(--gold); }
.sc-flags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
.sc-flag { font: 500 .58rem var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: .22rem .5rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--cream-2); }
.sc-flag.late { border-color: rgba(211,90,74,.55); color: var(--bad); }
.sc-flag.ok { border-color: rgba(46,107,62,.5); color: var(--ok); }
.sc-flag.wait { border-color: rgba(120,165,220,.5); color: var(--info); }
.sc-cnote { font-style: italic; font-size: .78rem; color: var(--cream); }
.sc-margin { color: var(--ok) !important; }
.sc-sum em { display: block; }
.sc-sum em.over { color: var(--bad); } .sc-sum em.wait { color: var(--info); font-style: normal; font-size: .72rem; }
.sc-room h3 { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.sc-room h3 .btn-mini { margin-left: auto; }
.sc-budget { display: inline-flex; align-items: center; gap: .5rem; font: 400 .78rem var(--sans); color: var(--muted); }
.sc-budget.over { color: var(--bad); }
.sc-bar { width: 90px; height: 6px; border-radius: 999px; background: var(--ink-3); overflow: hidden; display: inline-block; }
.sc-bar i { display: block; height: 100%; background: var(--gold); }
.sc-budget.over .sc-bar i { background: #d06a5a; }
.sc-sendbar { position: sticky; top: .5rem; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; padding: .7rem .9rem; margin: 0 0 1rem; border: 1px solid var(--gold); border-radius: 2px; background: var(--ink-2, #181818); }
.sc-hint { margin: 0 0 .6rem; }
.in-clip { display: flex; gap: .5rem; margin-bottom: .2rem; }
.in-clip input { flex: 1; min-width: 0; }
.in-more { border: 1px solid var(--line-2); border-radius: 2px; padding: .6rem .9rem; margin: .4rem 0 .8rem; }
.in-more summary { cursor: pointer; font: 500 .66rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); }
.in-more[open] summary { margin-bottom: .7rem; }
.in-check { flex-direction: row; align-items: center; gap: .5rem; }
.in-check input { width: 18px; height: 18px; min-height: 0; }
.pl-add h3, .pl-list h3 { margin: 0 0 .3rem; font-weight: 400; }
.pl-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto auto; gap: .5rem; margin-top: .7rem; align-items: center; }
.pl-photo { cursor: pointer; white-space: nowrap; }
.pl-list { margin-top: 1.3rem; display: grid; gap: .45rem; }
.pl-row { display: grid; grid-template-columns: 26px auto minmax(0, 1fr) 170px auto; gap: .7rem; align-items: center; border: 1px solid var(--line-2); border-radius: 2px; padding: .55rem .7rem; background: var(--ink); }
.pl-row.done { opacity: .6; }
.pl-row.done .pl-main b { text-decoration: line-through; }
.pl-check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--gold); }
.pl-img { border: 0; padding: 0; background: none; cursor: zoom-in; }
.pl-img img { width: 52px; height: 52px; object-fit: cover; border-radius: 2px; display: block; }
.pl-main { display: grid; gap: .15rem; min-width: 0; }
.pl-main b { font-weight: 500; }
.pl-main small { color: var(--muted); font-size: .76rem; }
.pl-who select { padding: .4rem 1.6rem .4rem .6rem; font-size: .78rem; border-radius: 999px; width: 100%; }
@media (max-width: 900px) {
  .sc-row { grid-template-columns: 22px 52px minmax(0, 1fr) auto; grid-template-areas: "pk th main main" "qty qty price lead" "st st st acts"; }
  .sc-pick { grid-area: pk; }
  .pl-fields { grid-template-columns: 1fr 1fr; } .pl-fields input[name=text] { grid-column: 1 / -1; }
  .pl-row { grid-template-columns: 26px auto minmax(0, 1fr) auto; } .pl-who { grid-column: 3 / 4; }
}
/* The client area: approving pieces */
.sel { margin-top: 2.4rem; }
.sel h2 { font-weight: 400; margin: .2rem 0 .3rem; }
.sel-room { font-weight: 400; margin: 1.2rem 0 .6rem; }
.sel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: .9rem; }
.sel-card { padding: 0; overflow: hidden; display: grid; }
.sel-card.d-approved { border-color: rgba(46,107,62,.55); }
.sel-card.d-declined { opacity: .75; }
.sel-img { display: block; border: 0; padding: 0; background: var(--ink-3); cursor: zoom-in; aspect-ratio: 4 / 3; width: 100%; }
.sel-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sel-body { padding: .9rem 1rem 1rem; display: grid; gap: .3rem; }
.sel-body b { font-weight: 500; }
.sel-body small { color: var(--muted); }
.sel-price { margin: .2rem 0; font: 400 1.15rem var(--serif, Georgia, serif); }
.sel-price small { font: 400 .76rem var(--sans); }
.sel-done { margin: 0; font-size: .82rem; } .sel-done.approved { color: var(--ok); } .sel-done.declined { color: var(--cream-2); }
.sel-done q { font-style: italic; }
.sel-acts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.sel-acts .btn { padding: .6rem 1rem; font-size: .66rem; }

/* A room restyled with the board: before and after */
.mb-render { position: relative; }
.mb-ba { position: absolute; left: .5rem; bottom: .5rem; display: inline-flex; border-radius: 999px; overflow: hidden; border: 1px solid rgba(20,20,20,.25); background: rgba(255,255,255,.9); }
.mb-ba button { border: 0; background: none; color: var(--cream-2); font: 500 .6rem var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: .35rem .65rem; cursor: pointer; }
.mb-ba button[aria-pressed="true"] { background: var(--gold); color: var(--on-gold); }
.mb-tag { position: absolute; right: .5rem; top: .5rem; font: 500 .56rem var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: .3rem .55rem; border-radius: 999px; background: rgba(255,255,255,.9); color: var(--gold-2); }
.rs-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; margin: .4rem 0 1rem; max-height: 40vh; overflow-y: auto; }
.rs-photo { position: relative; cursor: pointer; border-radius: 2px; overflow: hidden; border: 2px solid transparent; }
.rs-photo input { position: absolute; opacity: 0; }
.rs-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.rs-photo:has(input:checked) { border-color: var(--gold); }
.rs-cost { font-size: .8rem; color: var(--warn); border: 1px solid rgba(150,80,10,.35); border-radius: 2px; padding: .6rem .8rem; }
.mb-tag { max-width: calc(100% - 1rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ================= App de celular, Voltar e Avançar, Visita (mobile agent) ================= */
/* Voltar / Avançar: two discreet arrows at the top left (nav-trail.js) */
.trail { display: inline-flex; gap: .3rem; flex: none; }
.trail-btn { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--cream-2); cursor: pointer; }
.trail-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.trail-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-2); }
.trail-btn:disabled { opacity: .28; cursor: default; }
.side > .trail { margin: -1rem 0 -.6rem; }
.portal-left { display: flex; align-items: center; gap: 1rem; min-width: 0; }
@media (max-width: 860px) { .side > .trail { margin: 0; } }
/* The question about unsaved changes: three answers that wrap on a phone */
.unsaved-ask .app-modal-actions { flex-wrap: wrap; }
@media (max-width: 520px) { .unsaved-ask .app-modal-actions .btn { flex: 1 1 100%; } .unsaved-ask .app-modal-actions [data-unsaved-save] { order: -1; } }
/* "Adicionar à tela inicial" (pwa.js): in the page, never fixed to an edge */
.pwa-hint { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem 1rem; margin: 0 0 1.4rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 2px; background: rgba(168,133,77,.07); }
.pwa-hint img { border-radius: 2px; flex: none; }
.pwa-hint > div:first-of-type { flex: 1 1 12rem; min-width: 0; }
.pwa-hint b { font-weight: 500; color: var(--gold-2); }
.pwa-hint p { margin: .1rem 0 0; font-size: .85rem; color: var(--cream-2); }
.pwa-steps { margin: .8rem 0 0; padding-left: 1.2rem; display: grid; gap: .45rem; color: var(--cream-2); }
/* The Studio as the installed app on a phone: safe areas, the menu row gives way to the bottom tab bar */
.tabbar { display: none; }
@media (max-width: 860px) {
  html.is-app .side { padding-top: calc(.8rem + env(safe-area-inset-top)); padding-left: calc(1rem + env(safe-area-inset-left)); padding-right: calc(1rem + env(safe-area-inset-right)); position: sticky; top: 0; z-index: 30; }
  html.is-app .side nav, html.is-app .side-foot { display: none; }
  html.is-app .main { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
  html.is-app .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    padding: .35rem env(safe-area-inset-right) calc(.35rem + env(safe-area-inset-bottom)) env(safe-area-inset-left); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line-2); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: .15rem; padding: .35rem .2rem; border: 0; background: none; color: var(--muted); text-decoration: none; font: 400 .66rem var(--sans); letter-spacing: .02em; cursor: pointer; min-width: 0; }
  .tabbar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
  .tabbar [data-tab="more"] svg { fill: currentColor; stroke: none; }
  .tabbar .active { color: var(--gold-2); }
  /* The assistant's round button sits above the bar, never over Mais */
  html.is-app .as-launch { bottom: calc(4.9rem + env(safe-area-inset-bottom)); }
}
@media (max-height: 520px) and (orientation: landscape) {
  html.is-app .tabbar a, html.is-app .tabbar button { display: flex; justify-content: center; align-items: center; gap: .4rem; padding: .25rem .2rem; font-size: .7rem; }
  html.is-app .tabbar svg { width: 18px; height: 18px; }
  html.is-app .main { padding-bottom: calc(3.6rem + env(safe-area-inset-bottom)); }
  html.is-app .as-launch { bottom: calc(3.4rem + env(safe-area-inset-bottom)); }
}
/* "Mais": every other area, as a sheet over the tab bar */
.tb-more { width: 100%; max-width: none; margin: auto 0 0; padding: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: var(--ink-2); color: var(--cream); max-height: 85dvh; overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom); animation: fadeUp .22s ease forwards; }
.tb-more::backdrop { background: rgba(20,20,20,.303); }
.tb-more-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem calc(1.2rem + env(safe-area-inset-right)) .4rem calc(1.2rem + env(safe-area-inset-left)); }
.tb-more-head b { font: 400 1.3rem var(--serif); }
.tb-more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .4rem; padding: .4rem calc(1rem + env(safe-area-inset-right)) .8rem calc(1rem + env(safe-area-inset-left)); }
.tb-more-grid a { display: grid; justify-items: center; gap: .3rem; padding: .8rem .3rem; border-radius: 2px; color: var(--cream-2); text-decoration: none; font-size: .78rem; text-align: center; background: rgba(20,20,20,.025); }
.tb-more-grid a.active { color: var(--gold-2); background: rgba(168,133,77,.108); }
.tb-more-grid svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.tb-more-foot { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem 1.4rem; padding: .8rem calc(1.2rem + env(safe-area-inset-right)) 1.2rem calc(1.2rem + env(safe-area-inset-left)); border-top: 1px solid var(--line-2); font-size: .85rem; }
/* The client area as the installed app: safe areas */
html.is-app .portal-top { padding-top: calc(.8rem + env(safe-area-inset-top)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
@media (max-width: 640px) { .portal-left { gap: .6rem; } }
/* Visita: the site visit capture (visit-capture.js) */
.vc-root { max-width: 760px; }
.vc-net { margin: 0 0 1rem; padding: .7rem .9rem; border-radius: 2px; border: 1px solid rgba(150,80,10,.35); color: var(--warn, #afafaf); font-size: .85rem; }
.vc-today { margin-bottom: 1rem; }
.vc-today .sec-title { margin: 0 0 .4rem; }
.vc-project select { font-size: 1rem; }
.vc-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; margin: 1.2rem 0 1rem; }
.vc-act { display: grid; justify-items: center; align-content: center; gap: .3rem; min-height: 132px; padding: 1rem .6rem; border: 1px solid var(--line); border-radius: 2px; background: rgba(168,133,77,.07); color: var(--cream); text-align: center; cursor: pointer; font: inherit; }
.vc-act svg { width: 34px; height: 34px; fill: none; stroke: var(--gold-2); stroke-width: 1.4; }
.vc-act b { font-weight: 500; font-size: .95rem; }
.vc-act small { color: var(--muted); font-size: .72rem; line-height: 1.3; }
.vc-act:hover:not(.is-off) { border-color: var(--gold); }
.vc-act.is-off { opacity: .6; }
.vc-act.is-off small { color: var(--cream); }
.vc-act.rec { border-color: var(--bad, #c0614f); background: rgba(192,97,79,.12); }
.vc-act.rec svg { stroke: var(--bad, #e08a78); animation: blink 1.2s steps(2) infinite; }
.vc-root .rec-strip { margin-bottom: 1rem; }
.vc-note { margin-bottom: 1rem; }
.vc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.vc-list li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: .8rem; padding: .5rem 0; border-bottom: 1px solid var(--line-2); }
.vc-list li.empty { display: block; border: 0; }
.vc-list li.bad .vc-st { color: var(--bad, #e08a78); }
.vc-list img, .vc-ico { width: 48px; height: 48px; border-radius: 2px; object-fit: cover; display: grid; place-items: center; background: rgba(20,20,20,.04); }
.vc-ico svg { width: 22px; height: 22px; fill: none; stroke: var(--gold-2); stroke-width: 1.5; }
.vc-list b { display: block; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-list small { display: block; color: var(--muted); font-size: .75rem; }
@media (max-width: 420px) { .vc-actions { gap: .5rem; } .vc-act { min-height: 116px; padding: .8rem .3rem; } .vc-act small { display: none; } }
@media (max-height: 520px) and (orientation: landscape) { .vc-act { min-height: 88px; padding: .6rem .4rem; } .vc-act svg { width: 26px; height: 26px; } }

/* ---- Settings (public/admin/settings.js): cfg- ---- */
.cfg-root .btn-sm, .nf-root .btn-sm, .nf-push .btn-sm { padding: .55rem 1rem; font-size: .62rem; }
.cfg-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.4rem 0 1.2rem; }
.cfg-tabs a { padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 999px; color: var(--cream-2); text-decoration: none; font-size: .8rem; white-space: nowrap; }
.cfg-tabs a[aria-selected=true] { background: rgba(168,133,77,.126); border-color: var(--gold); color: var(--gold-2); }
.cfg-ro { margin-top: 0; }
.cfg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; align-items: start; }
.cfg-wide { grid-column: 1 / -1; }
.cfg-card { display: grid; gap: .7rem; min-width: 0; }
.cfg-card > p, .cfg-card .ai-key > p { margin: 0; }
.cfg-narrow { max-width: 640px; margin-bottom: 1.2rem; }
.cfg-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.cfg-head h3, .cfg-head h4 { margin: 0; }
.cfg-st { display: inline-flex; align-items: center; gap: .4rem; font: 500 .6rem var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: .32rem .65rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.cfg-st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cfg-st-connected { color: var(--ok); border-color: rgba(46,107,62,.5); }
.cfg-st-error { color: var(--bad); border-color: rgba(168,58,42,.5); }
.cfg-last { margin: 0; }
.cfg-last.bad, .cfg-card .bad, .cfg-models-out.bad { color: var(--bad); }
.cfg-last q, .ai-test-out q { font-style: italic; overflow-wrap: anywhere; }
.cfg-seg { justify-self: start; }
.cfg-seg button { border: 0; background: none; color: var(--cream-2); padding: .4rem 1rem; border-radius: 999px; cursor: pointer; font-size: .8rem; }
.cfg-seg button[aria-pressed=true] { background: var(--gold); color: var(--ink); }
.cfg-check { display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--cream-2); }
.cfg-check input { width: auto; flex: none; margin: 0; }
.form-grid .cfg-check { grid-column: 1 / -1; justify-content: flex-start; }
.cfg-copy { display: flex; align-items: center; gap: .5rem; margin: .4rem 0; min-width: 0; }
.cfg-copy code { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-size: .74rem; background: var(--ink); border: 1px solid var(--line-2); border-radius: 2px; padding: .4rem .6rem; color: var(--cream-2); }
.cfg-copy .btn-mini { flex: none; }
.cfg-help { border-top: 1px solid var(--line-2); padding-top: .6rem; }
.cfg-help summary { cursor: pointer; color: var(--gold-2); font-size: .82rem; list-style: none; }
.cfg-help summary::-webkit-details-marker { display: none; }
.cfg-help summary::before { content: "? "; display: inline-grid; place-items: center; width: 1.2rem; height: 1.2rem; margin-right: .3rem; border: 1px solid currentColor; border-radius: 50%; font-size: .7rem; }
.cfg-help h4 { margin: .8rem 0 .3rem; font: 400 1.05rem var(--serif); }
.cfg-help ol { margin: .6rem 0; padding-left: 1.3rem; display: grid; gap: .55rem; font-size: .84rem; line-height: 1.5; color: var(--cream-2); }
.cfg-help a { color: var(--gold-2); white-space: nowrap; }
.cfg-tips { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .78rem; color: var(--muted); display: grid; gap: .3rem; }
.cfg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .84rem; }
.cfg-list li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.cfg-models .ai-mrow input { flex: 1 1 auto; min-width: 0; width: 100%; }
@media (max-width: 860px) { .cfg-grid { grid-template-columns: minmax(0, 1fr); } .ai-keys { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .cfg-models .ai-mrow > span:first-child { font-weight: 500; }
  .ai-prov { grid-template-columns: minmax(0, 1fr); }
}
/* AI usage and cost: au- */
.au { display: grid; gap: .6rem; min-width: 0; }
.au > p { margin: 0; }
.au-month { display: flex; align-items: center; gap: .5rem; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.au-month select { width: auto; }
.au-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-top: .4rem; }
.au-tiles > div { border: 1px solid var(--line-2); border-radius: 2px; padding: .8rem 1rem; display: grid; gap: .2rem; min-width: 0; }
.au-tiles small { font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.au-tiles b { font: 400 1.5rem var(--serif); color: var(--cream); overflow-wrap: anywhere; }
.au-tiles span { font-size: .74rem; color: var(--muted); }
.au-days { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding: .6rem .2rem 0; border-bottom: 1px solid var(--line-2); overflow-x: auto; }
.au-day { flex: 1 0 14px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .2rem; }
.au-day i { display: block; width: 100%; max-width: 22px; background: var(--gold); border-radius: 2px 2px 0 0; opacity: .85; }
.au-day small { font-size: .55rem; color: var(--muted); }
.au-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.4rem; }
.au-t { display: grid; border: 1px solid var(--line-2); border-radius: 2px; overflow: hidden; }
.au-r { display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 1fr); gap: .8rem; align-items: center; padding: .5rem .9rem; border-top: 1px solid var(--line-2); font-size: .82rem; }
.au-r:first-child { border-top: 0; }
.au-r > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-r > span:nth-child(2) { color: var(--muted); font-size: .74rem; }
.au-r > span:last-child { text-align: right; }
.au-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
@media (max-width: 760px) { .au-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .au-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- Notifications (public/admin/notifications.js): nf- ---- */
.side-bell { position: absolute; top: 1.85rem; right: 1rem; }
.nf-bell { position: relative; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--cream-2); cursor: pointer; }
.nf-bell:hover, .nf-bell[aria-expanded=true] { border-color: var(--gold); color: var(--gold-2); }
.nf-bell svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nf-count { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 2px; background: var(--gold); color: var(--ink); font: 600 .62rem/18px var(--sans); text-align: center; }
.nf-panel { position: fixed; z-index: 60; width: min(380px, calc(100vw - 16px)); max-height: min(520px, calc(100vh - 90px)); display: flex; flex-direction: column; background: var(--ink-2); border: 1px solid var(--line); border-radius: 2px; box-shadow: 0 18px 50px rgba(20,20,20,.117); overflow: hidden; }
.nf-ph { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line-2); }
.nf-ph b { font: 400 1.1rem var(--serif); }
.nf-panel .nf-list { overflow-y: auto; flex: 1 1 auto; }
.nf-list { list-style: none; margin: 0; padding: 0; }
.nf-item a { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: .7rem; align-items: start; padding: .75rem 1rem; text-decoration: none; color: var(--cream-2); border-top: 1px solid var(--line-2); }
.nf-item:first-child a { border-top: 0; }
.nf-item a:hover { background: rgba(20,20,20,.032); }
.nf-dot { width: 8px; height: 8px; margin-top: .4rem; border-radius: 50%; }
.nf-item.unread .nf-dot { background: var(--gold); }
.nf-item.unread b { color: var(--cream); }
.nf-text { display: grid; gap: .15rem; min-width: 0; }
.nf-text b { font-weight: 400; font-size: .86rem; line-height: 1.4; overflow-wrap: anywhere; }
.nf-text small { font-size: .7rem; color: var(--muted); }
.nf-empty { padding: 1.2rem 1rem; color: var(--muted); font-size: .84rem; text-align: center; }
.nf-more { display: block; padding: .7rem 1rem; text-align: center; border-top: 1px solid var(--line-2); color: var(--gold-2); font-size: .8rem; text-decoration: none; }
.nf-page { padding: 0; overflow: hidden; }
.nf-page .row { padding: .8rem 1rem; border-top: 1px solid var(--line-2); }
@media (max-width: 860px) { .side-bell { position: static; flex: none; order: 0; } }
@media (max-width: 640px) { .nf-panel { left: 8px !important; right: 8px; width: auto; } }

/* ================= Mensagens (public/admin/messages.js): inbox + one conversation frame ================= */
.ms-page { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 1.2rem; height: calc(100dvh - 4.4rem); min-height: 480px; margin: -.6rem 0 -3.4rem; }
.ms-side { display: flex; flex-direction: column; gap: .7rem; min-height: 0; min-width: 0; }
.ms-side-head h1 { font-size: 2rem; }
.ms-side-head .eyebrow { margin-bottom: .3rem; }
.ms-filters { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.ms-filters .chip { padding: .45rem .7rem; }
.ms-filters select { width: auto; flex: 1 1 120px; min-width: 0; padding: .4rem 2rem .4rem .7rem; font-size: .8rem; }
.ms-search { padding: .55rem .8rem; font-size: .9rem; }
.ms-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: .3rem; }
.ms-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .7rem; align-items: start; padding: .7rem .75rem; border-radius: 2px; text-decoration: none; color: var(--cream-2); border: 1px solid transparent; }
.ms-item:hover { background: rgba(20,20,20,.032); }
.ms-item.on { background: rgba(168,133,77,.108); border-color: var(--line); }
.ms-item.unread b { color: var(--cream); font-weight: 500; }
.ms-av { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--gold-2); }
.ms-av svg, .ms-ch svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.ms-item-main { display: grid; gap: .15rem; min-width: 0; }
.ms-item-top { display: flex; justify-content: space-between; gap: .6rem; min-width: 0; }
.ms-item-top b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-item-top time { font-size: .72rem; color: var(--muted); flex: none; }
.ms-item-sub { display: flex; gap: .3rem; flex-wrap: wrap; }
.ms-item-prev { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-tag { font-size: .68rem; letter-spacing: .04em; padding: .1rem .5rem; border-radius: 999px; border: 1px solid var(--line); color: var(--gold-2); text-decoration: none; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ms-tag.off { border-color: var(--line-2); color: var(--muted); }
.ms-unread { min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: .72rem; font-weight: 500; display: inline-grid; place-items: center; }
.ms-empty { padding: 1.2rem .4rem; color: var(--muted); font-size: .9rem; display: grid; gap: .8rem; justify-items: start; }
.ms-main { min-width: 0; min-height: 0; }
.ms-blank { height: 100%; display: grid; place-content: center; justify-items: center; gap: 1rem; border: 1px dashed var(--line-2); border-radius: 2px; text-align: center; padding: 2rem; }
.ms-blank-ic { display: flex; gap: .6rem; color: var(--gold); }
.ms-blank-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.ms-frame { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 2px; overflow: hidden; }
.ms-top { display: flex; align-items: center; gap: .8rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line-2); min-width: 0; }
.ms-back { display: none; text-decoration: none; color: var(--cream-2); font-size: 1.2rem; padding: .2rem .4rem; }
.ms-who { min-width: 0; flex: 1; display: grid; gap: .2rem; }
.ms-who > b { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-who-line { display: flex; gap: .4rem; align-items: center; overflow-x: auto; white-space: nowrap; scrollbar-width: none; font-size: .8rem; color: var(--muted); }
.ms-who-line::-webkit-scrollbar { display: none; }
.ms-ch { display: inline-flex; align-items: center; gap: .3rem; color: var(--cream-2); font-size: .78rem; }
.ms-ch svg { width: 15px; height: 15px; }
.ms-actions { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.ms-msgs { list-style: none; margin: 0; padding: 1.1rem 1.1rem .6rem; overflow-y: auto; display: flex; flex-direction: column; gap: .55rem; overscroll-behavior: contain; }
.ms-b { max-width: min(72%, 560px); padding: .55rem .8rem .35rem; border-radius: 2px; background: var(--ink-3); border: 1px solid var(--line-2); align-self: flex-start; overflow-wrap: anywhere; }
.ms-b.out { align-self: flex-end; background: rgba(168,133,77,.117); border-color: var(--line); }
.ms-b-t { font-size: .93rem; line-height: 1.5; }
.ms-b-k { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 0 0 .2rem; }
.ms-b-meta { margin: .2rem 0 0; font-size: .68rem; color: var(--muted); text-align: right; }
.ms-b-err { margin: .2rem 0 0; font-size: .75rem; color: var(--bad); }
.ms-st-read, .ms-st-delivered { color: var(--gold-2); }
.ms-st-failed { color: var(--bad); font-weight: 600; }
.ms-img { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; margin-bottom: .3rem; }
.ms-img img { max-height: 260px; width: auto; border-radius: 2px; }
.ms-b audio, .ms-b video { max-width: 100%; margin-bottom: .3rem; }
.ms-b video { max-height: 260px; border-radius: 2px; }
.ms-doc { display: inline-block; margin-bottom: .3rem; }
.ms-miss { margin: 0 0 .2rem; font-size: .82rem; color: var(--muted); font-style: italic; }
.ms-note { align-self: center; max-width: min(86%, 620px); padding: .5rem .8rem; border: 1px dashed rgba(150,80,10,.5); border-radius: 2px; background: rgba(150,80,10,.06); font-size: .88rem; }
.ms-note-k { margin: 0 0 .2rem; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--warn); }
.ms-compose { border-top: 1px solid var(--line-2); padding: .55rem .8rem .7rem; display: grid; gap: .45rem; }
.ms-win { margin: 0; font-size: .74rem; color: var(--muted); }
.ms-win.bad { color: var(--warn); }
.ms-modes { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.ms-modes .chip { padding: .35rem .65rem; font-size: .58rem; }
.ms-modes-sp { flex: 1; }
.ms-input { display: flex; gap: .5rem; align-items: flex-end; min-width: 0; }
.ms-input textarea { width: 0; flex: 1 1 0; min-width: 0; min-height: 0; height: 42px; max-height: 160px; resize: none; padding: .6rem .8rem; font-size: .95rem; }
.ms-compose.note .ms-input textarea { background: rgba(150,80,10,.08); border-color: rgba(150,80,10,.45); }
.ms-send { padding: .85em 1.2em; flex: none; }
.ms-attach { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 2px; cursor: pointer; color: var(--cream-2); }
.ms-attach:hover { border-color: var(--gold); color: var(--gold-2); }
.ms-attach svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.ms-attach:has(input:disabled) { opacity: .35; cursor: not-allowed; }
.ms-draft { align-self: stretch; border: 1px solid var(--gold); border-radius: 2px; padding: .6rem .7rem; background: rgba(168,133,77,.07); display: grid; gap: .45rem; margin-top: .3rem; }
.ms-draft-k { margin: 0; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); }
.ms-draft-k .muted { text-transform: none; letter-spacing: 0; }
.ms-draft textarea { min-height: 0; height: auto; font-size: .92rem; resize: vertical; }
.ms-draft .row .btn { padding: .7em 1.1em; }
.ms-prev { max-height: 50vh; margin: 0 auto .8rem; border-radius: 2px; }
.ms-tpl-fields { display: grid; gap: .6rem; margin: .8rem 0; }
.ms-tpl-prev { white-space: pre-wrap; padding: .7rem .9rem; border-radius: 2px; background: var(--ink-3); border: 1px solid var(--line-2); font-size: .9rem; }
/* The client page */
.ms-cl { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.ms-cl a { display: grid; gap: .2rem; text-decoration: none; color: var(--cream-2); padding: .6rem .7rem; border: 1px solid var(--line-2); border-radius: 2px; }
.ms-cl a:hover { border-color: var(--line); }
.ms-cl-h { margin: 0; display: flex; gap: .5rem; align-items: center; }
.ms-cl-h b { font-weight: 400; color: var(--cream); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-cl-h time { font-size: .72rem; color: var(--muted); }
.ms-cl-m { margin: 0; font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.ms-cl-m.out { padding-left: 1rem; color: var(--cream-2); }
/* Configurações: the Meta card */
.ms-cfg fieldset { border: 1px solid var(--line-2); border-radius: 2px; padding: .8rem 1rem 1rem; margin: 0 0 .9rem; min-width: 0; }
.ms-cfg legend { padding: 0 .4rem; font-size: .8rem; color: var(--cream-2); }
.ms-cfg .form-grid { margin-bottom: .6rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: start; }
.ms-lab { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem; }
.ms-secret { display: grid; gap: .25rem; justify-items: start; }
.ms-secret label.f { width: 100%; }
.ms-set { text-transform: none; letter-spacing: 0; font-size: .72rem; color: var(--muted); margin-left: .3rem; }
.ms-set.ok { color: var(--ok); }
.ms-cfg .ok, .ms-diag .ok { color: var(--ok); }
.ms-cfg .bad, .ms-diag .bad { color: var(--bad); }
.ms-hooks, .ms-diag { margin-top: 1rem; display: grid; gap: .6rem; }
.ms-hooks h4, .ms-diag h4 { font-family: var(--sans); font-weight: 500; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin: 0; }
.ms-url { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: .6rem; align-items: center; font-size: .82rem; }
.ms-url code { overflow-x: auto; white-space: nowrap; padding: .3rem .5rem; background: var(--ink-3); border-radius: 2px; font-size: .78rem; }
.ms-code { display: inline-block; padding: .5rem .7rem; background: var(--ink-3); border-radius: 2px; word-break: break-all; cursor: copy; }
.ms-diag-ch { border: 1px solid var(--line-2); border-radius: 2px; padding: .7rem .9rem; }
.ms-diag-h { margin: 0 0 .4rem; }
.ms-diag ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .86rem; }
.ms-diag li { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); gap: .3rem; overflow-wrap: anywhere; }
.ms-diag li b { font-weight: 500; color: var(--cream); }
.ms-ok { color: var(--ok); } .ms-bad { color: var(--bad); font-weight: 600; } .ms-wait { color: var(--muted); }
.ms-log ul { margin-top: .4rem; font-size: .8rem; color: var(--muted); }
@media (max-width: 1100px) { .ms-page { grid-template-columns: 280px minmax(0, 1fr); } .ms-b { max-width: 84%; } }
@media (max-width: 860px) {
  .ms-page { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 7rem); min-height: 0; margin: -1rem -.4rem -4rem; }
  .ms-page.has-open .ms-side { display: none; }
  .ms-page:not(.has-open) .ms-main { display: none; }
  .ms-back { display: block; }
  .ms-top { padding: .55rem .7rem; gap: .5rem; flex-wrap: wrap; }
  .ms-actions { width: 100%; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .ms-actions .btn-mini { white-space: nowrap; }
  .ms-msgs { padding: .8rem .7rem .4rem; }
  .ms-b { max-width: 88%; }
  .ms-url { grid-template-columns: minmax(0, 1fr) auto; }
  .ms-url > span { grid-column: 1 / -1; }
}
/* The assistant's round button would sit on the send button. */
body:has(.ms-page.has-open) .as-launch { display: none; }
html.is-app .ms-page { height: calc(100dvh - 9rem - env(safe-area-inset-bottom) - env(safe-area-inset-top)); }
@media (max-height: 520px) and (orientation: landscape) {
  .ms-page { height: calc(100dvh - 5.2rem); min-height: 0; margin-top: -.8rem; }
  .ms-side-head { display: none; }
  .ms-who > b { font-size: 1.05rem; }
  .ms-top { flex-wrap: nowrap; }
  .ms-actions { width: auto; }
  .ms-win { display: none; }
  .ms-compose { padding: .35rem .6rem .45rem; gap: .3rem; }
  .ms-modes .ms-modes-sp { display: none; }
  .ms-compose { grid-template-columns: auto minmax(0, 1fr); align-items: end; }
  .ms-compose > .ms-win { grid-column: 1 / -1; }
  .ms-modes .chip { padding: .25rem .55rem; }
  .ms-input textarea, .ms-attach { height: 36px; }
  .ms-attach { width: 36px; }
  .ms-send { padding: .6em 1em; }
  .ms-img img { max-height: 150px; }
}

/* ---- Crescimento (growth): forms, marketing, social posts; portal forms (pf-) ---- */
.gr-tabs { margin: -1rem 0 1.4rem; }
.gr-tabs .chip { text-decoration: none; }
.gr-bar { margin-bottom: 1.2rem; }
.gr-h { font-size: 1.2rem; margin: 0 0 .8rem; }
.gr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.gr-form.off { opacity: .6; }
.gr-form h3 { margin-bottom: .3rem; overflow-wrap: anywhere; }
.gr-req { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .8rem 0; }
.gr-req-main, .gr-req > span:first-child { min-width: 0; flex: 1 1 260px; overflow-wrap: anywhere; }
.gr-req .row { gap: .5rem; align-items: center; padding: 0; justify-content: flex-end; }
.gr-reqs .gr-req-main a, .gr-reqs .gr-req a { display: inline; padding: 0; }
.gr-st-sent, .gr-st-draft { color: var(--warn); }
.gr-st-answered, .gr-st-published, .gr-st-manual { color: var(--ok); }
.gr-st-approved, .gr-st-sending, .gr-st-publishing { color: var(--info); }
.gr-st-revoked, .gr-st-expired { color: var(--muted); }
.gr-st-failed { color: var(--bad); }
.gr-client .gr-consent { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; border-top: 1px solid var(--line-2); margin-top: .6rem; padding-top: .9rem; }
.gr-check { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--cream-2); cursor: pointer; }
.gr-check input { width: auto; }
.gr-hint { display: block; margin-top: .4rem; text-transform: none; letter-spacing: 0; font-size: .8rem; }
.gr-sheet div.f > span { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.gr-sheet div.f { display: grid; gap: .4rem; }
.gr-link code { display: block; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 2px; background: var(--ink); overflow-wrap: anywhere; font-size: .85rem; color: var(--gold-2); }
.gr-answers { margin: 0; display: grid; gap: .2rem; }
.gr-answers dt { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-top: .9rem; }
.gr-answers dd { margin: 0; overflow-wrap: anywhere; }
/* The sheet: header and actions stay, the middle scrolls */
dialog.gr-sheet { width: min(640px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 2px; background: var(--ink-2); color: var(--cream); overflow: hidden; }
dialog.gr-sheet.wide { width: min(960px, calc(100% - 32px)); }
dialog.gr-sheet::backdrop { background: rgba(20,20,20,.385); }
.gr-sheet-in { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); min-width: 0; }
.gr-sheet-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.3rem 1.5rem .8rem; border-bottom: 1px solid var(--line-2); }
.gr-sheet-top h2 { font-size: 1.5rem; overflow-wrap: anywhere; }
.gr-sheet-top .eyebrow { margin-bottom: .3rem; }
.gr-x { border: 0; background: none; color: var(--cream-2); font-size: 1.8rem; line-height: 1; cursor: pointer; padding: 0; width: 40px; height: 40px; border-radius: 50%; flex: none; }
.gr-x:focus:not(:focus-visible) { outline: none; }
.gr-sheet-body { overflow-y: auto; padding: 1.1rem 1.5rem; min-width: 0; display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.gr-sheet-foot { justify-content: flex-end; padding: .9rem 1.5rem 1.1rem; border-top: 1px solid var(--line-2); }
.gr-q { border: 1px solid var(--line-2); border-radius: 2px; padding: .9rem; display: grid; gap: .7rem; margin-bottom: .8rem; min-width: 0; }
.gr-q-head { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.gr-q-head select { width: auto; flex: 1 1 160px; }
.gr-q-moves { display: flex; gap: .3rem; margin-left: auto; }
.gr-q details summary { cursor: pointer; margin-bottom: .5rem; }
.gr-stats { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: .8rem; }
.gr-stats > div { border: 1px solid var(--line-2); border-radius: 2px; padding: .7rem 1rem; min-width: 120px; flex: 1 1 120px; }
.gr-stats b { display: block; font: 400 1.8rem var(--serif); color: var(--gold-2); }
.gr-stats span { font-size: .75rem; color: var(--muted); }
.gr-drafts { margin-bottom: 1.4rem; display: grid; gap: 1rem; }
.gr-draft { border-color: var(--line); display: grid; gap: .7rem; }
.gr-draft-part { display: grid; gap: .5rem; }
.gr-draft-part .badge { justify-self: start; }
.gr-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.gr-part { border: 1px solid var(--line-2); border-radius: 2px; padding: .9rem; display: grid; gap: .7rem; min-width: 0; margin: 0; }
.gr-part legend { padding: 0 .4rem; color: var(--gold); font-size: .8rem; }
.gr-aud { color: var(--gold-2); font-size: .9rem; margin: 0; }
.gr-camps a { gap: 1rem; }
/* Calendar */
.gr-cal-head { justify-content: space-between; align-items: center; }
.gr-cal-head h3 { text-align: center; }
.gr-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.gr-wd { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: .3rem; }
.gr-day { min-height: 96px; border: 1px solid var(--line-2); border-radius: 2px; padding: .3rem; display: grid; align-content: start; gap: .25rem; min-width: 0; }
.gr-day.empty { border-color: transparent; }
.gr-day.today { border-color: var(--gold); }
.gr-dn { font-size: .75rem; color: var(--muted); }
.gr-post { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: .3rem; padding: .2rem; border: 1px solid currentColor; border-radius: 2px; background: var(--ink); font-size: .66rem; text-align: left; cursor: pointer; min-width: 0; }
.gr-post img { width: 26px; height: 26px; object-fit: cover; border-radius: 2px; }
.gr-post span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cream-2); }
.gr-cal-list { display: none; }
.gr-li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: .8rem; align-items: center; width: 100%; padding: .7rem 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.gr-li img { width: 48px; height: 48px; object-fit: cover; border-radius: 2px; }
.gr-li > span:nth-child(2) { overflow-wrap: anywhere; }
.gr-so section[data-conn] { margin-top: 1.4rem; }
.gr-post-ed { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.2rem; }
.gr-frame { aspect-ratio: 4 / 5; border: 1px solid var(--line-2); border-radius: 2px; overflow: hidden; display: grid; place-items: center; background: var(--ink); text-align: center; padding: 0; }
.gr-frame img { width: 100%; height: 100%; object-fit: cover; }
.gr-thumbs { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .6rem; }
.gr-thumb { padding: 0; border: 2px solid transparent; border-radius: 2px; background: none; cursor: pointer; }
.gr-thumb[aria-pressed="true"] { border-color: var(--gold); }
.gr-thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 2px; }
.gr-post-fields { display: grid; gap: .8rem; align-content: start; min-width: 0; }
@media (max-width: 760px) {
  .gr-parts, .gr-post-ed { grid-template-columns: minmax(0, 1fr); }
  .gr-frame { aspect-ratio: auto; max-height: 280px; }
  .gr-grid { display: none; }
  .gr-cal-list { display: block; }
  dialog.gr-sheet, dialog.gr-sheet.wide { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .gr-sheet-in { max-height: calc(100dvh - 18px); }
  .gr-sheet-top, .gr-sheet-body, .gr-sheet-foot { padding-left: 1rem; padding-right: 1rem; }
}
@media (max-height: 520px) and (orientation: landscape) {
  dialog.gr-sheet, dialog.gr-sheet.wide { width: calc(100% - 16px - env(safe-area-inset-left) - env(safe-area-inset-right)); max-height: calc(100dvh - 8px); border-radius: 2px; }
  .gr-sheet-in { max-height: calc(100dvh - 10px); }
  .gr-sheet-top { padding: .5rem 1rem; }
  .gr-sheet-top h2 { font-size: 1.15rem; }
  .gr-sheet-foot { padding: .45rem 1rem; }
  .gr-sheet-foot .btn { padding: .6em 1.1em; }
  .gr-frame { max-height: 200px; }
}
/* Client portal: forms */
.pf-block { margin-top: 2.4rem; }
.pf-block h2 { margin-bottom: 1rem; }
.pf-list { display: grid; gap: .7rem; }
.pf-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border: 1px solid var(--line-2); border-radius: 2px; text-decoration: none; color: inherit; background: var(--ink-2); }
.pf-item:hover { border-color: var(--gold); }
.pf-item span:first-child { min-width: 0; overflow-wrap: anywhere; }
.pf-item small { display: block; color: var(--muted); }
.pf-wait { color: var(--warn); }
.pf-done { color: var(--ok); }
.pf-page { max-width: 720px; }
.pf-page h1 { margin-bottom: .6rem; overflow-wrap: anywhere; }
.pf-page .crumb { font-size: .8rem; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 1rem; }
.pf-desc { color: var(--cream-2); white-space: pre-line; }
.pf-form { display: grid; gap: 1.3rem; margin-top: 1.4rem; }
.pf-q { border: 0; margin: 0; padding: 0; display: grid; gap: .45rem; min-width: 0; }
.pf-q.bad { border-left: 3px solid var(--bad); padding-left: .8rem; }
.pf-q legend, .pf-q > label { font-weight: 400; color: var(--cream); padding: 0; margin-bottom: .2rem; }
.pf-req { font-size: .7rem; color: var(--gold); letter-spacing: .1em; text-transform: uppercase; }
.pf-help { color: var(--muted); font-size: .85rem; }
.pf-opts { display: grid; gap: .2rem; }
.pf-opt { display: flex; gap: .7rem; align-items: center; padding: .45rem 0; cursor: pointer; }
.pf-opt input { width: 20px; height: 20px; flex: none; accent-color: var(--gold); }
.pf-answers { margin: 1.2rem 0 0; }
.pf-answers dt { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-top: 1rem; }
.pf-answers dd { margin: .2rem 0 0; overflow-wrap: anywhere; }

/* Caixa de entrada (public/admin/inbox.js) and Google Agenda (public/admin/gcal.js) */
.ibx-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 0 0 1rem; }
.ibx-tools input[type=search] { flex: 1 1 260px; min-width: 0; }
.ibx-tools select { flex: 0 1 260px; min-width: 0; }
.ibx-filters { flex: 1 1 100%; }
.ibx-banner { margin-bottom: 1rem; }
.ibx-banner.warn { border-color: var(--warn); }
.ibx-split { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.ibx-list, .ibx-read { min-width: 0; border: 1px solid var(--line-2); border-radius: 2px; background: var(--ink-2); }
.ibx-list { max-height: calc(100vh - 230px); overflow-y: auto; }
.ibx-read { padding: 1.2rem 1.4rem; min-height: 320px; }
.ibx-threads { list-style: none; margin: 0; padding: 0; }
.ibx-th { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line-2); background: none; color: var(--cream-2); padding: .75rem .9rem; cursor: pointer; }
.ibx-th:hover { background: var(--ink-3); }
.ibx-th.on { background: var(--ink-4); box-shadow: inset 3px 0 0 var(--gold); }
.ibx-th.unread { color: var(--cream); }
.ibx-th.unread .ibx-th-subj { font-weight: 500; }
.ibx-th.unread .ibx-th-top b::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: .4rem; vertical-align: middle; }
.ibx-th-top { display: flex; gap: .5rem; align-items: baseline; min-width: 0; }
.ibx-th-top b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
.ibx-th-top time { font-size: .75rem; color: var(--muted); flex: none; }
.ibx-th-subj, .ibx-th-snip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.ibx-th-snip { font-size: .8rem; color: var(--muted); }
.ibx-tags, .ibx-links { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .25rem; }
.ibx-tags .badge, .ibx-links .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ibx-links { margin: .2rem 0 .8rem; }
.ibx-head h2 { font-size: 1.5rem; overflow-wrap: anywhere; margin-bottom: .3rem; }
.ibx-back { display: none; margin-bottom: .6rem; }
.ibx-msgs { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; margin: 1.2rem 0; }
.ibx-msg { border: 1px solid var(--line-2); border-radius: 2px; padding: .8rem 1rem; background: var(--ink); }
.ibx-msg.out { border-color: var(--line); background: rgba(168,133,77,.07); }
.ibx-msg header { display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: baseline; }
.ibx-msg header time { margin-left: auto; }
.ibx-msg > p { margin: .1rem 0 .6rem; overflow-wrap: anywhere; }
.ibx-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95rem; line-height: 1.55; }
.ibx-atts { list-style: none; padding: .6rem 0 0; margin: .6rem 0 0; border-top: 1px solid var(--line-2); display: grid; gap: .3rem; }
.ibx-atts li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; overflow-wrap: anywhere; }
.ibx-draft { border-color: var(--gold); margin-bottom: 1rem; }
.ibx-draft-k { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.ibx-draft .f, .ibx-reply .f { margin-bottom: .7rem; }
.ibx-pick { padding: 3rem 1rem; text-align: center; }
.ibx-acc { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line-2); }
.ibx-google { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.ibx-google h4 { font-size: 1.2rem; margin-bottom: .5rem; }
.ibx-google code { overflow-wrap: anywhere; font-size: .8rem; }
.ibx-test { margin-top: .8rem; font-size: .88rem; }
.ibx-test ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.ibx-test li.ok { color: var(--ok); } .ibx-test li.failed { color: var(--bad); } .ibx-test li.warning { color: var(--warn); }
.sch-gbusy { position: absolute; left: 3px; right: 3px; z-index: 1; border-radius: 2px; background: repeating-linear-gradient(135deg, rgba(133,133,133,.22) 0 6px, rgba(133,133,133,.1) 6px 12px); border: 1px solid rgba(133,133,133,.35); color: var(--cream-2); font-size: .66rem; padding: 1px 4px; overflow: hidden; pointer-events: none; }
.sch-gbusy span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg.gbusy { background: rgba(133,133,133,.35); }
.gcal-conf { border-color: var(--warn); margin-bottom: 1rem; }
.gcal-conf ul { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .8rem; }
.gcal-conf li p { margin: 0 0 .4rem; }
.gcal-dlg .f, .gcal-dlg .sch-check { margin-bottom: .6rem; }
@media (max-width: 899px) {
  .ibx-split { display: block; }
  .ibx-list { max-height: none; }
  .ibx-read { display: none; padding: 1rem; }
  .ibx-split.reading .ibx-list { display: none; }
  .ibx-split.reading .ibx-read { display: block; }
  .ibx-back { display: inline-flex; }
}

/* ---- Financeiro (fin-), Análises (an-), Apresentações (pz-), Avaliações: testimonials (rvt-) ---- */
.fin-period { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; margin-bottom: 1rem; }
.fin-range { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.fin-range input { width: auto; min-width: 0; }
.fin-tabs { margin-bottom: 1.2rem; }
button.kpi { font: inherit; text-align: left; cursor: pointer; color: inherit; }
.fin-kpis .kpi b, .an-kpis .kpi b { font-size: clamp(1.15rem, 4.4vw, 1.7rem); white-space: nowrap; }
.fin-kpis .kpi b.neg, .fin-table .neg, .fin-line .neg, .an-root .neg { color: var(--bad); }
.fin-table .pos, .fin-line .pos { color: var(--ok); }
.fin-late { color: var(--bad); font-style: normal; }
.fin-note { color: var(--warn); font-size: .9rem; margin: 0 0 1rem; }
.fin-table td.r, .fin-table th.r, .an-root td.r, .an-root th.r { text-align: right; white-space: nowrap; }
.fin-table td.expense { color: var(--cream-2); }
.fin-table td.income { color: var(--ok); }
.fin-table tr.late td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.fin-table tr.cur td { background: rgba(168,133,77,.07); }
.badge.fin-ok { color: var(--ok); } .badge.fin-bad { color: var(--bad); } .badge.fin-warn { color: var(--warn); }
.fin-chart { overflow-x: auto; margin: 0 0 1rem; }
.fin-chart svg { display: block; max-width: none; }
.fin-chart text { fill: var(--muted); font: 10px var(--sans); }
.fin-bar-in { fill: var(--ok); } .fin-bar-out { fill: var(--bad); }
.fin-bar-in.exp, .fin-bar-out.exp { opacity: .35; }
.fin-legend { display: inline-flex; gap: .4rem .8rem; align-items: center; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }
.fin-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.fin-legend i.in { background: var(--ok); } .fin-legend i.out { background: var(--bad); } .fin-legend i.exp { background: var(--muted); opacity: .5; }
.fin-cats div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(60px, 2fr) auto; gap: .8rem; align-items: center; padding: .35rem 0; font-size: .9rem; }
.fin-cats i { height: 8px; border-radius: 999px; background: var(--ink-3); position: relative; overflow: hidden; }
.fin-cats i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--gold); border-radius: inherit; }
.fin-cats b { font-weight: 400; color: var(--cream-2); white-space: nowrap; }
.fin-pay { display: grid; gap: .5rem; }
.fin-pay-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: .8rem; align-items: center; padding: .7rem .9rem; border: 1px solid var(--line-2); border-radius: 2px; }
.fin-pay-row.late { border-color: rgba(168,58,42,.5); }
.fin-pay-main { all: unset; cursor: pointer; display: grid; min-width: 0; }
.fin-pay-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
.fin-pay-main small { color: var(--muted); }
.fin-pay-due { font-size: .82rem; color: var(--cream-2); white-space: nowrap; }
.fin-pay-row.late .fin-pay-due { color: var(--bad); }
.fin-pay-amt { font-weight: 400; white-space: nowrap; }
.fin-import .btn { cursor: pointer; }
.fin-lines { display: grid; gap: .8rem; }
.fin-line header { display: flex; justify-content: space-between; gap: 1rem; }
.fin-line header b { font: 400 1.3rem var(--serif); }
.fin-desc { margin: .3rem 0 .6rem; overflow-wrap: anywhere; }
.fin-sugs { display: grid; gap: .4rem; margin-bottom: .6rem; }
.fin-sug { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .55rem .7rem; border: 1px dashed var(--line-2); border-radius: 2px; }
.fin-sug.best { border-style: solid; border-color: var(--line); }
.fin-sug span { display: grid; min-width: 0; }
.fin-sug small { color: var(--muted); }
.fin-rc { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .8rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line-2); }
.fin-rc:last-child { border-bottom: 0; }
.fin-rc > span:first-child { display: grid; min-width: 0; }
.fin-rc small { color: var(--muted); }
.fin-access { display: grid; gap: .4rem; }
.fin-acc { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.fin-acc span { display: grid; } .fin-acc small { color: var(--muted); } .fin-acc em { color: var(--gold-2); font-size: .8rem; }
.fin-acc.off { opacity: .5; }
.fin-acc input { width: 20px; height: 20px; }
.fin-form .chips label.chip { cursor: pointer; }
.fin-form .chips label.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.fin-lbl { display: block; font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.fin-form label.f em, .rvt-root em { text-transform: none; letter-spacing: 0; font-style: normal; opacity: .7; }
.fin-proof .row { margin: .3rem 0; }
.fin-proof .btn-mini { cursor: pointer; }
@media (max-width: 760px) {
  .fin-pay-row { grid-template-columns: minmax(0, 1fr) auto; }
  .fin-pay-due { grid-column: 1; }
  .fin-rc { grid-template-columns: minmax(0, 1fr) auto; }
  .fin-rc .row { grid-column: 1 / -1; }
  .fin-sug { flex-wrap: wrap; }
  .fin-form.form-grid { grid-template-columns: minmax(0, 1fr); }
}

.an-story { border-left: 2px solid var(--gold); padding: .2rem 0 .2rem 1rem; margin: 0 0 1.2rem; }
.an-story p { margin: 0 0 .5rem; font: 400 1.15rem/1.5 var(--serif); color: var(--cream); }
.an-story ul { margin: 0; padding-left: 1.1rem; color: var(--cream-2); }
.an-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.an-grid h4 { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 0 0 .6rem; }
.an-months div { display: grid; grid-template-columns: minmax(70px, 1.2fr) minmax(40px, 2fr) auto; gap: .6rem; align-items: center; font-size: .85rem; padding: .2rem 0; }
.an-bar { display: block; height: 8px; border-radius: 999px; background: var(--ink-3); position: relative; overflow: hidden; }
.an-bar::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--gold); border-radius: inherit; }
td .an-bar { margin-top: .3rem; max-width: 160px; }
.an-root tr[data-href] { cursor: pointer; }
.an-wait { display: flex; align-items: center; gap: .6rem; color: var(--cream-2); }
.an-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--gold); animation: anSpin .9s linear infinite; }
@keyframes anSpin { to { transform: rotate(360deg); } }
.an-history { display: grid; gap: .3rem; }
.an-hist { all: unset; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .6rem; border-radius: 2px; }
.an-hist.on, .an-hist:hover { background: rgba(168,133,77,.09); }
.an-hist small { color: var(--muted); }
@media (max-width: 760px) { .an-grid { grid-template-columns: minmax(0, 1fr); } }

.pz-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.pz-card { display: grid; gap: .4rem; text-decoration: none; color: inherit; }
.pz-card b { font: 400 1.3rem var(--serif); }
.pz-card small { color: var(--muted); }
.pz-flags { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.pz-title { font: 400 2rem/1.2 var(--serif); background: none; border: 0; border-bottom: 1px solid transparent; color: var(--cream); padding: .1rem 0; width: 100%; max-width: 640px; }
.pz-title:focus { outline: none; border-bottom-color: var(--gold); }
.pz-status { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; align-items: center; margin-bottom: 1rem; }
.pz-status .sch-check { margin: 0; }
.pz-ed { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.pz-slides { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; position: sticky; top: 1rem; }
.pz-slides li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border: 1px solid var(--line-2); border-radius: 2px; background: var(--ink-2); }
.pz-slides li.on { border-color: var(--gold); }
.pz-slides li.hid { opacity: .55; }
.pz-sl { all: unset; cursor: pointer; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 0 .5rem; padding: .55rem .6rem; min-width: 0; }
.pz-sl span { grid-row: span 2; color: var(--gold-2); font: 400 1.1rem var(--serif); }
.pz-sl b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pz-sl small { color: var(--muted); font-size: .72rem; }
.pz-sl-acts { display: flex; gap: 2px; padding-right: .3rem; }
.pz-sl-acts button { border: 0; background: none; color: var(--cream-2); width: 26px; height: 26px; border-radius: 2px; cursor: pointer; }
.pz-sl-acts button:hover { background: rgba(168,133,77,.108); }
.pz-slides li.pz-add { display: block; border-style: dashed; }
.pz-add select { width: 100%; border: 0; background: transparent; }
.pz-main h4 { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 1.4rem 0 .6rem; }
.pz-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; }
.pz-img { position: relative; display: grid; gap: .2rem; cursor: pointer; border: 2px solid transparent; border-radius: 2px; padding: 2px; }
.pz-img.on { border-color: var(--gold); }
.pz-img input { position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; }
.pz-img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 2px; display: block; }
.pz-img small { font-size: .68rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pz-rows input { width: 100%; min-width: 60px; }
.pz-rows tbody tr { cursor: default; }
.pz-item { border: 1px solid var(--line-2); border-radius: 2px; padding: .8rem; margin-bottom: .6rem; }
.pz-item .sch-check { align-self: end; }
.pz-fee { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; gap: .5rem; margin-bottom: .4rem; }
.pz-link { display: flex; gap: .5rem; }
.pz-link input { flex: 1; min-width: 0; }
@media (max-width: 860px) {
  .pz-ed { display: block; }
  .pz-slides { position: static; margin-bottom: 1rem; grid-auto-flow: column; grid-auto-columns: minmax(200px, 70%); overflow-x: auto; padding-bottom: .4rem; }
  .pz-slides li { grid-template-columns: minmax(0, 1fr); }
  .pz-sl-acts { padding: 0 .4rem .4rem; }
  .pz-title { font-size: 1.5rem; }
  .pz-fee { grid-template-columns: minmax(0, 1fr) 110px auto; }
}

.rvt-intro p { margin: 0 0 .8rem; }
.rvt-intro .sch-check { margin: 0; }
.rvt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1rem; margin-top: 1rem; }
.rvt-item { display: grid; gap: .5rem; align-content: start; }
.card.rvt-item + .card.rvt-item { margin-top: 0; }
.rvt-item header { display: flex; justify-content: space-between; gap: .8rem; align-items: start; }
.rvt-item header span { display: grid; } .rvt-item header small { color: var(--muted); }
.rvt-item header > .sv-static, .rvt-item header > :last-child:not(span) { flex: none; display: inline-flex; }
.rvt-item blockquote { margin: 0; font: 400 1.15rem/1.45 var(--serif); color: var(--cream); overflow-wrap: anywhere; }
.rvt-item.st-hidden { opacity: .6; }
.badge.rvt-approved { color: var(--ok); } .badge.rvt-pending { color: var(--warn); }
.rvt-google { display: grid; gap: .8rem; max-width: 640px; }
.rvt-preview { white-space: pre-wrap; overflow-wrap: anywhere; font: 400 .9rem/1.5 var(--sans); color: var(--cream-2); background: var(--ink-3); border-radius: 2px; padding: .8rem 1rem; max-height: 40vh; overflow-y: auto; }

/* ---------- Furniture library (picker and the modeller tray) ---------- */
.lib-dialog .app-modal-inner { max-width: 900px; }
.lib-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; margin: .4rem 0 .8rem; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; max-height: 56vh; overflow-y: auto; padding: .1rem; }
.lib-item { display: grid; gap: .2rem; justify-items: center; text-align: center; background: rgba(20,20,20,.025); border: 1px solid var(--line); border-radius: 2px; padding: .6rem .5rem; cursor: pointer; color: inherit; font: inherit; min-width: 0; }
.lib-item:hover { border-color: var(--gold); }
.lib-item img { width: 96px; height: 96px; object-fit: contain; background: #f1f1f1; border-radius: 2px; }
.lib-item b { font-weight: 500; font-size: .86rem; line-height: 1.25; overflow-wrap: anywhere; }
.lib-item small { color: var(--muted); font-size: .72rem; }
.lib-item .lib-cr { font-size: .64rem; opacity: .8; }
.lib-note { margin-top: .6rem; }
@media (max-width: 640px) { .lib-bar { grid-template-columns: minmax(0, 1fr); } .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 42vh; } }
.sk-furn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; margin-top: .4rem; max-height: 320px; overflow-y: auto; }
.sk-furni { display: grid; gap: .1rem; justify-items: center; text-align: center; background: var(--ink); border: 1px solid var(--line-2); border-radius: 2px; padding: .35rem; cursor: pointer; color: inherit; font: inherit; min-width: 0; }
.sk-furni:hover { border-color: var(--gold); }
.sk-furni img { width: 56px; height: 56px; object-fit: contain; background: #f1f1f1; border-radius: 2px; }
.sk-furni b { font-size: .7rem; font-weight: 500; overflow-wrap: anywhere; }
.sk-furni small { font-size: .62rem; opacity: .7; }

/* ---------- Plan and 3D tab of a version ---------- */
.p3-actions { margin: .6rem 0 1rem; }
.p3-levels { list-style: none; padding: 0; margin: .8rem 0; display: grid; gap: .5rem; }
.p3-levels > li { border: 1px solid var(--line); border-radius: 2px; padding: .65rem .8rem; display: grid; gap: .3rem; }
.p3-head { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
.p3-st { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; border: 1px solid currentColor; border-radius: 999px; padding: .1rem .5rem; }
.p3-ok .p3-st { color: var(--ok); } .p3-bad .p3-st, .p3-err { color: var(--bad); }
.p3-err { margin: 0; overflow-wrap: anywhere; }
.p3-levels .btn-mini { justify-self: start; }

/* ---------- 3D models of the furniture library ---------- */
.glb-dialog .app-modal-inner { max-width: 960px; width: 100%; }
.glb-canvas { height: min(62vh, 560px); border-radius: 2px; overflow: hidden; background: #f2f2f2; position: relative; display: grid; place-items: center; }
.glb-canvas canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.lib-cell { position: relative; display: grid; }
.lib-3d { position: absolute; top: .4rem; right: .4rem; font: 600 .62rem var(--sans); letter-spacing: .1em; text-transform: uppercase; background: var(--ink); color: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .55rem; cursor: pointer; }
.lib-3d:hover { border-color: var(--gold); }
.lib-3d[disabled] { opacity: .7; cursor: progress; }
.lib-3d.has { background: var(--cream); color: var(--ink); }
/* Studio menu on a phone (browser): the brand, bell and arrows stay put on the first row; only the menu scrolls, on its own row */
@media (max-width: 860px) {
  html:not(.is-app) .side { flex-wrap: wrap; align-content: flex-start; align-self: start; overflow: visible; row-gap: .5rem; padding: .6rem 1rem .4rem; }
  html:not(.is-app) .side nav { order: 10; flex: 1 0 100%; overflow-x: auto; margin: 0 -1rem; padding: 0 1rem .2rem; scroll-padding-inline: 1rem; scrollbar-width: none; overscroll-behavior-x: contain; }
  html:not(.is-app) .side nav::-webkit-scrollbar { display: none; }
}
/* Settings → Integrations: the Meta channels card spans the page, its four groups two by two, so no column is left
   with a long empty stretch beside it; a single key field (Tripo3D) takes the card's whole width. */
@media (min-width: 1100px) {
  .cfg-wide .ms-cfg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.2rem; align-items: start; }
  .cfg-wide .ms-cfg > .form-actions { grid-column: 1 / -1; }
  .cfg-wide .ms-hooks { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 52rem; }
}
[data-tripo-fields] { grid-template-columns: minmax(0, 1fr); }

/* ---------------- The project workspace (public/admin/project/, public/portal/workspace.js) ---------------- */
.pw-root, .pw-pane { min-width: 0; }
.pw-head { margin-bottom: 1rem; }
.pw-head-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.pw-head-actions, .pw-head-actions > *, .pw-head .stg-head { min-width: 0; max-width: 100%; }
/* A long next-step label wraps on a phone instead of widening the page. */
@media (max-width: 860px) { .pw-head .btn { white-space: normal; text-align: center; line-height: 1.5; } }
.pw-facts { display: flex; flex-wrap: wrap; gap: .6rem 2.2rem; margin: 0 0 1.2rem; padding: .9rem 1.2rem; border: 1px solid var(--line-2); border-radius: 2px; background: var(--ink-2); }
.pw-facts div { min-width: 0; }
.pw-facts dt, .pw-meta dt, .pw-money dt { font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.pw-facts dd { margin: .1rem 0 0; font: 400 1.3rem var(--serif); color: var(--cream); }
.pw-facts dd small { font: 300 .74rem var(--sans); color: var(--muted); margin-left: .5rem; }
.pw-h2 { font-size: 1.5rem; margin: 2rem 0 .3rem; }
.pw-lead { margin: 0 0 1.1rem; max-width: 80ch; font-size: .92rem; }
.pw-top { align-items: start; margin-bottom: 1.2rem; }
.pw-pane > .card + .card, .pw-pane > div + .card, .pw-pane > div > .card + .card, .pw-pane > div > .grid-2 + .card { margin-top: 1.2rem; }
.pw-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.2rem; margin: 0 0 1.1rem; }
.pw-bar > p { margin: 0; flex: 1 1 320px; max-width: 80ch; font-size: .92rem; }
.pw-warn, .pw-meta dd.late, .pw-rows small.late { color: var(--warn); }

/* The rail of phases: one line that scrolls sideways when it does not fit. */
.pw-rail { display: flex; align-items: stretch; gap: .35rem; margin: 0 0 1rem; padding: .45rem; list-style: none; border: 1px solid var(--line); border-radius: 2px; background: var(--ink-2); overflow-x: auto; scrollbar-width: thin; }
.pw-rail-item { display: flex; align-items: center; gap: .55rem; flex: 1 0 172px; max-width: 250px; padding: .5rem .7rem; border: 1px solid transparent; border-radius: 2px; background: none; color: var(--cream-2); text-align: left; }
button.pw-rail-item { cursor: pointer; transition: background .3s var(--ease), border-color .3s var(--ease); }
button.pw-rail-item:hover { background: var(--ink-3); }
.pw-rail-item .n { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); font-size: .72rem; color: var(--muted); }
.pw-rail-item .tx { display: grid; min-width: 0; }
.pw-rail-item .tx b { font: 400 .98rem/1.15 var(--serif); color: var(--cream-2); }
.pw-rail-item .tx small { font-size: .66rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-rail-item.is-in_progress .n { border-color: var(--cream-2); color: var(--cream); }
.pw-rail-item.is-with_client .n { border-color: var(--gold); color: var(--gold-2); }
.pw-rail-item.is-changes_requested .n { border-color: var(--warn); color: var(--warn); }
.pw-rail-item.is-approved .n, .pw-rail-item.is-done .n { background: var(--ok); border-color: var(--ok); color: var(--ink); }
.pw-rail-item.is-not_started .tx b { color: var(--muted); }
.pw-rail-item.late .tx small { color: var(--warn); }
.pw-rail-item[aria-current="step"] { background: var(--ink-3); border-color: var(--gold); }
.pw-rail-item[aria-current="step"] .tx b { color: var(--cream); }
.pw-rail-empty { margin: .3rem .6rem; }
.pw-rail-label { margin: 1.2rem 0 .5rem; }

/* Tabs */
.pw-tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line-2); margin: 0 0 1.4rem; overflow-x: auto; scrollbar-width: none; }
.pw-tabs::-webkit-scrollbar { display: none; }
.pw-tabs button { position: relative; flex: none; border: 0; background: none; color: var(--muted); padding: .85rem .7rem; font: 500 .66rem var(--sans); letter-spacing: .13em; text-transform: uppercase; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.pw-tabs button:hover { color: var(--cream); }
.pw-tabs button[aria-selected="true"] { color: var(--gold-2); border-bottom-color: var(--gold); }
.pw-tabs i { position: absolute; top: .55rem; right: .3rem; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }

/* Status pills */
.pw-st, .pw-dst { display: inline-block; font: 500 .56rem var(--sans); letter-spacing: .13em; text-transform: uppercase; padding: .3rem .55rem; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; color: var(--muted); }
.pw-st.is-in_progress, .pw-dst.is-issued, .pw-dst.is-co-hired, .pw-dst.is-co-in_progress, .pw-dst.is-ap-in_review { color: var(--cream-2); }
.pw-st.is-with_client, .pw-dst.is-sent, .pw-dst.is-co-received { color: var(--gold-2); }
.pw-st.is-changes_requested, .pw-dst.is-commented, .pw-dst.is-ap-notice { color: var(--warn); }
.pw-st.is-approved, .pw-st.is-done, .pw-dst.is-approved, .pw-dst.is-co-coordinated, .pw-dst.is-ap-approved, .pw-dst.is-ap-permit { color: var(--ok); }

/* Overview */
.pw-att { list-style: none; margin: 0; padding: 0; }
.pw-att li + li { border-top: 1px solid var(--line-2); }
.pw-att button, .pw-dl-mini button, .pw-rows button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; border: 0; background: none; color: var(--cream); text-align: left; cursor: pointer; font: inherit; }
.pw-att button > span, .pw-dl-mini button > span:first-child, .pw-rows button > span:first-child { display: grid; min-width: 0; gap: .1rem; }
.pw-att small, .pw-dl-mini small, .pw-rows small { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.pw-att em { font-style: normal; color: var(--muted); flex: none; }
.pw-att li.warn button > span { border-left: 2px solid var(--warn); padding-left: .7rem; }
.pw-att button:hover, .pw-dl-mini button:hover, .pw-rows button:hover { color: var(--gold-2); }
.pw-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0 0 1rem; }
.pw-money dd { margin: .15rem 0 0; font: 400 1.5rem var(--serif); color: var(--gold-2); overflow-wrap: anywhere; }
.pw-dl-mini, .pw-rows, .pw-tl-plain { list-style: none; margin: 0; padding: 0; }
.pw-dl-mini li + li, .pw-rows li + li, .pw-tl-plain li + li { border-top: 1px solid var(--line-2); }
.pw-dl-mini b, .pw-rows b { font-weight: 400; }
.pw-tl-plain li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem 0; }
.pw-tl { display: grid; gap: .35rem; }
.pw-tl-scale { display: flex; justify-content: space-between; margin-left: min(240px, 38%); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pw-tl-row { display: grid; grid-template-columns: min(240px, 38%) minmax(0, 1fr); align-items: center; gap: 0; }
.pw-tl-name { display: grid; text-align: left; border: 0; background: none; color: var(--cream); cursor: pointer; padding: .3rem .8rem .3rem 0; min-width: 0; font: inherit; }
.pw-tl-name b { font: 400 1rem/1.2 var(--serif); }
.pw-tl-name small { font-size: .68rem; color: var(--muted); }
.pw-tl-name:hover b { color: var(--gold-2); }
.pw-tl-track { position: relative; height: 30px; border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); background: repeating-linear-gradient(90deg, transparent 0, transparent calc(12.5% - 1px), rgba(20,20,20,.032) calc(12.5% - 1px), rgba(20,20,20,.032) 12.5%); }
.pw-tl-track i { position: absolute; border-radius: 2px; }
.pw-tl-track .plan { top: 5px; height: 20px; border: 1px solid rgba(20,20,20,.34); }
.pw-tl-track .real { top: 10px; height: 10px; background: var(--cream-2); }
.pw-tl-track .real.is-with_client { background: var(--gold); }
.pw-tl-track .real.is-changes_requested { background: var(--warn); }
.pw-tl-track .real.is-approved, .pw-tl-track .real.is-done { background: var(--ok); }
.pw-tl-track.today::after { content: ""; position: absolute; top: -3px; bottom: -3px; left: var(--today); width: 1px; background: var(--gold); }
.pw-tl-row.late .pw-tl-name small { color: var(--warn); }
.pw-tl-legend { display: flex; flex-wrap: wrap; gap: 1.2rem; margin: .7rem 0 0; font-size: .74rem; color: var(--muted); }
.pw-tl-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.pw-tl-legend i { display: inline-block; width: 22px; height: 10px; border-radius: 2px; }
.pw-tl-legend .plan { border: 1px solid rgba(20,20,20,.34); }
.pw-tl-legend .real { background: var(--cream-2); }
.pw-tl-legend .now { width: 1px; height: 14px; background: var(--gold); border-radius: 0; }

/* Phase cards */
.pw-phase { scroll-margin-top: 4.2rem; }
.pw-phase.current { border-color: var(--line); }
.pw-phase.flash { animation: pwFlash 1.5s var(--ease); }
@keyframes pwFlash { from { box-shadow: 0 0 0 2px var(--gold); } to { box-shadow: 0 0 0 2px transparent; } }
.pw-phase-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .8rem 1rem; margin-bottom: 1rem; }
.pw-phase-title { display: flex; gap: .8rem; align-items: flex-start; min-width: 0; flex: 1 1 280px; }
.pw-phase-title .n { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); font-size: .8rem; color: var(--gold-2); }
.pw-phase-title h3 { font-size: 1.5rem; }
.pw-phase-title p { margin: .25rem 0 0; }
.pw-phase-acts { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.pw-move { display: inline-flex; gap: .25rem; }
.pw-st-select { width: auto; min-width: 11.5rem; padding: .45rem 2rem .45rem .8rem; font-size: .8rem; border-radius: 999px; }
.pw-st-select.is-with_client { border-color: var(--gold); color: var(--gold-2); }
.pw-st-select.is-changes_requested { border-color: var(--warn); color: var(--warn); }
.pw-st-select.is-approved, .pw-st-select.is-done { border-color: var(--ok); color: var(--ok); }
.pw-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem 1.4rem; margin: 0 0 1rem; padding: .9rem 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.pw-meta dd { margin: .15rem 0 0; font-size: .92rem; color: var(--cream-2); }
.pw-notes { font-size: .88rem; color: var(--cream-2); margin: 0 0 1rem; white-space: pre-line; }
.pw-notes b { font: 500 .6rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-right: .4rem; }
.pw-sent { margin: 0 0 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 2px; font-size: .9rem; }
.pw-sent p { margin: 0; }
.pw-sent p + p { margin-top: .4rem; }
.pw-sent b { font-weight: 400; color: var(--cream); }
.pw-answer.approve b { color: var(--ok); }
.pw-answer.changes b { color: var(--warn); }
.pw-dl-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin: 1rem 0 .4rem; }
.pw-dl-head h4 { font-size: 1.15rem; }
.pw-send.btn { padding: .7em 1.2em; }
.pw-dls { list-style: none; margin: 0; padding: 0; }
.pw-dl { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .6rem 1rem; padding: .8rem 0; border-top: 1px solid var(--line-2); }
.pw-dl-main { display: flex; gap: .8rem; min-width: 0; flex: 1 1 300px; }
.pw-dl-main > div { display: grid; gap: .15rem; min-width: 0; }
.pw-dl-main b { font-weight: 400; overflow-wrap: anywhere; }
.pw-dl-main small, .pw-revs small { font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.pw-dl-code { flex: none; min-width: 4.6rem; font: 500 .66rem var(--sans); letter-spacing: .12em; color: var(--gold-2); padding-top: .25rem; }
.pw-dl-side { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.pw-file { cursor: pointer; }
.pw-shared { font-size: .78rem; color: var(--gold-2); margin: 0 0 .6rem; }
small.pw-shared { margin: 0; }
.pw-revs summary { cursor: pointer; font-size: .78rem; color: var(--cream-2); }
.pw-revs ul { list-style: none; margin: .4rem 0 0; padding: 0 0 0 .8rem; border-left: 1px solid var(--line-2); display: grid; gap: .4rem; }
.pw-revs li { display: grid; }
.pw-revs a { font-size: .86rem; overflow-wrap: anywhere; }

/* Sheets (forms in a dialog): the title and the actions stay in view, the fields scroll. */
.pw-sheet { overflow: hidden; }
.pw-sheet[open] { animation: modalIn .35s var(--ease); }
.pw-sheet.closing { animation: dvOut .2s ease forwards; }
.pw-sheet-form { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
.pw-sheet-form > header { padding: 1.5rem 1.6rem .9rem; flex: none; }
.pw-sheet-form > header .eyebrow { margin-bottom: .35rem; }
.pw-sheet-form > header h2 { margin: 0; overflow-wrap: anywhere; }
.pw-sheet-body { padding: .2rem 1.6rem 1rem; overflow-y: auto; min-height: 0; display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.pw-sheet-form > footer { margin: 0; padding: .9rem 1.6rem 1.3rem; border-top: 1px solid var(--line-2); flex: none; }
.pw-sheet-del { margin-right: auto; }
.pw-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.2rem; align-items: start; }
.pw-fields .full { grid-column: 1 / -1; }
.card > .pw-fields { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.pw-fields textarea { min-height: 0; }
.pw-fields .sch-check { margin: 0; text-transform: none; letter-spacing: 0; }
.pw-checkf > span:first-child { display: block; }
.pw-unit { position: relative; display: block; }
.pw-unit input { padding-right: 2.6rem; }
.pw-unit i { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); font-style: normal; font-size: .74rem; letter-spacing: .04em; text-transform: none; color: var(--muted); pointer-events: none; }
.pw-pick { list-style: none; margin: .2rem 0 0; padding: 0; display: grid; gap: .1rem; }
.pw-pick .sch-check { margin: .35rem 0; align-items: flex-start; text-transform: none; letter-spacing: 0; }
.pw-pick .sch-check > span { display: grid; min-width: 0; }
.pw-pick small { font-size: .78rem; color: var(--muted); }
.pw-pick-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; }
.pw-pick-photos label { position: relative; aspect-ratio: 1; border-radius: 2px; overflow: hidden; cursor: pointer; background: var(--ink-3); }
.pw-pick-photos img { width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: opacity .25s; }
.pw-pick-photos input { position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; accent-color: var(--gold); z-index: 1; }
.pw-pick-photos input:checked + img { opacity: 1; }

/* Tables: the briefing's rooms, the fees by phase */
.pw-table-wrap { overflow-x: auto; margin: 0 -2px; }
.pw-rooms, .pw-fees { width: 100%; border-collapse: collapse; min-width: 520px; }
.pw-rooms th, .pw-fees th { font: 500 .58rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); text-align: left; padding: .4rem .35rem; white-space: nowrap; }
.pw-rooms td, .pw-fees td { padding: .25rem .35rem; border-top: 1px solid var(--line-2); vertical-align: middle; }
.pw-rooms .n, .pw-fees .n { text-align: right; width: 5.2rem; }
.pw-rooms th:first-child { width: 42%; }
.pw-fees .n { width: 9.5rem; white-space: nowrap; }
.pw-rooms .n input, .pw-fees .n input { text-align: right; }
.pw-rooms input, .pw-fees input { padding: .5rem .6rem; }
.pw-rooms .x { width: 2.4rem; text-align: right; }
.pw-fees td:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; padding: .7rem .35rem; }
.pw-fees td b { font-weight: 400; }
.pw-fees tfoot td { font-weight: 500; padding: .8rem .35rem; border-top: 1px solid var(--line); }

/* Partners and approvals */
.pw-co-notes { color: var(--cream-2) !important; }
.pw-ap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 2rem; }
.pw-ap-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .4rem; }
.pw-ap-head h4 { font-size: 1.15rem; }
.pw-rrt { margin: .2rem 0 .6rem; }
.pw-inline { display: flex; gap: .5rem; align-items: center; }
.pw-inline input { flex: 1 1 0; min-width: 0; width: 0; }
.pw-rrt small { text-transform: none; letter-spacing: 0; font-size: .78rem; }

/* Site reports */
.pw-report .card-head { align-items: flex-start; }
.pw-share { margin: 0; font-size: .8rem; }
.pw-progress { color: var(--cream-2); }
.pw-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .5rem; margin: .6rem 0 1rem; }
.pw-photos figure { margin: 0; position: relative; aspect-ratio: 1; border-radius: 2px; overflow: hidden; background: var(--ink-3); }
.pw-photos figure > button:first-child { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pw-photos img { width: 100%; height: 100%; object-fit: cover; }
.pw-photos .x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--cream); cursor: pointer; line-height: 1; }
.pw-add-photo { display: grid; place-items: center; aspect-ratio: 1; border: 1px dashed var(--line); border-radius: 2px; background: none; color: var(--gold-2); cursor: pointer; text-align: center; padding: .4rem; font: 500 .6rem/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.pw-add-photo:hover { border-color: var(--gold); }
.pw-issues { list-style: none; margin: 0; padding: 0; }
.pw-issue { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .9rem; padding: .7rem 0; border-top: 1px solid var(--line-2); }
.pw-issue > div:not(.pw-issue-acts) { display: grid; gap: .1rem; flex: 1 1 240px; min-width: 0; }
.pw-issue b { font-weight: 400; overflow-wrap: anywhere; }
.pw-issue small { font-size: .78rem; color: var(--muted); }
.pw-issue.solved b { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(20,20,20,.25); }
.pw-issue.late small { color: var(--warn); }
.pw-issue-acts { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.pw-thumb { width: 48px; height: 48px; flex: none; padding: 0; border: 0; border-radius: 2px; overflow: hidden; background: var(--ink-3); cursor: zoom-in; }
.pw-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Tasks and minutes */
.pw-tasks { list-style: none; margin: 0; padding: 0; }
.pw-tasks li { display: flex; align-items: flex-start; gap: .7rem; padding: .6rem 0; border-top: 1px solid var(--line-2); }
.pw-tasks li:first-child { border-top: 0; }
.pw-tasks li > button, .pw-tasks li > a { display: grid; gap: .1rem; flex: 1 1 0; min-width: 0; text-align: left; border: 0; background: none; color: var(--cream); cursor: pointer; padding: 0; font: inherit; text-decoration: none; }
.pw-tasks b { font-weight: 400; overflow-wrap: anywhere; }
.pw-tasks small { font-size: .78rem; color: var(--muted); }
.pw-tasks li.late small { color: var(--warn); }
.pw-tasks li.done b { color: var(--muted); text-decoration: line-through; }
.pw-check { display: grid; place-items: center; width: 26px; height: 26px; flex: none; cursor: pointer; }
.pw-check input { width: 18px; height: 18px; accent-color: var(--gold); }
.pw-meeting, .pw-c-report { padding: 1rem 0; border-top: 1px solid var(--line-2); }
.pw-meeting:first-of-type, .pw-c-report:first-of-type { border-top: 0; padding-top: 0; }
.pw-meeting header, .pw-c-report header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .6rem 1rem; margin-bottom: .6rem; }
.pw-meeting .eyebrow, .pw-c-report .eyebrow, .pw-report .eyebrow { margin-bottom: .25rem; }
.pw-meeting h4, .pw-c-report h4 { font-size: 1.25rem; }
.pw-meeting header p { margin: .2rem 0 0; }
.pw-meeting p { font-size: .92rem; color: var(--cream-2); }
.pw-meeting p b { font: 500 .6rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.pw-actions { list-style: none; margin: 0; padding: 0; }
.pw-actions li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .8rem; padding: .45rem 0; border-top: 1px solid var(--line-2); font-size: .92rem; }
.pw-actions li > span:first-child { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.pw-mine { margin-bottom: 1.2rem; }

/* The projects list */
.pw-list-ph { display: block; font-size: .9rem; }
.pw-only-sm { display: none !important; }
@media (max-width: 860px) { td .pw-only-sm { display: block !important; color: var(--gold-2) !important; } }
.pw-filter { display: inline-flex; align-items: center; gap: .6rem; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.pw-filter select { width: auto; min-width: 13rem; padding: .5rem 2rem .5rem .8rem; font-size: .84rem; text-transform: none; letter-spacing: 0; }

/* The client area */
.pw-crail .pw-rail-item { cursor: default; }
.pw-c-h2 { font-size: 1.6rem; margin: 0 0 .8rem; }
#ws-wait:not(:empty) { margin-bottom: 2rem; }
.pw-c-study { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.2rem; }
.pw-c-phase { margin-top: 1rem; }
.pw-c-phase .eyebrow { margin-bottom: .3rem; }
.pw-c-docs { list-style: none; margin: .8rem 0 0; padding: 0; }
.pw-c-docs li { border-top: 1px solid var(--line-2); }
.pw-c-docs a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; text-decoration: none; color: var(--cream); }
.pw-c-docs a > span:first-child { display: grid; min-width: 0; }
.pw-c-docs b { font-weight: 400; overflow-wrap: anywhere; }
.pw-c-docs small { font-size: .78rem; color: var(--muted); }
.pw-c-docs a:hover b { color: var(--gold-2); }
.pw-c-group + .pw-c-group { margin-top: 1.4rem; }
.pw-c-group h4 { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; font-size: 1.2rem; }

@media (max-width: 860px) {
  .pw-facts { gap: .6rem 1.4rem; padding: .8rem 1rem; }
  .pw-facts dd { font-size: 1.1rem; }
  .pw-rail { margin-left: -4px; margin-right: -4px; }
  .pw-rail-item { min-width: 138px; flex: 0 0 auto; }
  .pw-tabs { margin-left: -4px; margin-right: -4px; }
  .pw-tabs button { padding: .8rem .7rem; }
  .pw-ap, .pw-money { grid-template-columns: minmax(0, 1fr); }
  .pw-money { gap: .6rem; }
  .pw-money > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
  .pw-money dd { font-size: 1.25rem; margin: 0; text-align: right; }
  .pw-tl-row, .pw-tl-scale { grid-template-columns: minmax(0, 1fr); margin-left: 0; }
  .pw-tl-name { padding: .5rem 0 .15rem; display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; }
  .pw-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1rem; }
  .pw-phase-acts { width: 100%; }
  .pw-st-select { flex: 1 1 11rem; }
  .pw-dl-side, .pw-issue-acts { width: 100%; }
  .pw-dl-head .row { width: 100%; }
  .pw-dl-head .row > * { flex: 1 1 auto; }
  .pw-filter { width: 100%; }
  .pw-filter select { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 640px) {
  .pw-fields { grid-template-columns: minmax(0, 1fr); }
  .card > .pw-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pw-sheet-form > header { padding: 1.2rem 1.1rem .7rem; }
  .pw-sheet-body { padding: .2rem 1.1rem .9rem; }
  .pw-sheet-form > footer { padding: .8rem 1.1rem 1rem; }
  .pw-sheet-form > footer .btn { flex: 1 1 auto; }
  .pw-sheet-del { flex: 0 0 auto !important; }
}
/* Phones on their side: the sheet uses the whole height, compactly. */
@media (max-height: 520px) and (orientation: landscape) {
  .pw-sheet { width: calc(100% - 16px); max-height: calc(100dvh - 12px); }
  .pw-sheet-form { max-height: calc(100dvh - 14px); }
  .pw-sheet-form > header { padding: .7rem 1.1rem .4rem; }
  .pw-sheet-form > header h2 { font-size: 1.25rem; }
  .pw-sheet-form > header .eyebrow { display: none; }
  .pw-sheet-body { padding: .2rem 1.1rem .6rem; }
  .pw-sheet-form > footer { padding: .5rem 1.1rem .6rem; }
  .pw-sheet-form > footer .btn { padding: .7em 1.2em; }
  .pw-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Custos da obra (wb-): Project → Custos da obra, Settings → Custos de obra, the client area card, the editor's live figure ---- */
.wb-root > .card + .card, .wb-cfg > .card + .card { margin-top: 1.2rem; }
.wb-sub { margin: .2rem 0 0; max-width: 78ch; }
.wb-hide { display: none !important; }
.wb-warn { border-color: rgba(150,80,10,.45); background: rgba(150,80,10,.06); font-size: .9rem; }
.wb-root h4, .wb-c h4, .wb-cfg h4, .wb-actuals h4, .wb-sg-group, .wb-im-bad { font: 500 .62rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6rem; }
.wb-root .n, .wb-c .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wb-live-dot { display: inline-flex; align-items: center; gap: .45rem; font: 500 .58rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-2); }
.wb-live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-fill); }
.wb-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem 1.2rem; align-items: end; margin-bottom: 1.3rem; }
.wb-controls .wb-wide { grid-column: span 2; }
.wb-figure { padding: 1.1rem 1.3rem; background: var(--ink-3); border-left: 2px solid var(--gold-fill); margin-bottom: 1.2rem; }
.wb-figure .eyebrow, .wb-c-part > .eyebrow { margin-bottom: .4rem; }
.wb-figure p.small { margin: 0 0 .15rem; }
.wb-range { font-family: var(--serif); font-size: clamp(1.55rem, 4.4vw, 2.5rem); line-height: 1.15; margin: 0 0 .45rem; color: var(--cream); overflow-wrap: anywhere; }
.wb-range span { font-size: .6em; color: var(--muted); font-style: italic; }
.wb-kind { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: .6rem; padding: .55rem .35rem; border-bottom: 1px solid var(--line-2); font-size: .92rem; }
.wb-kind.head, .wb-item.head, .wb-month.head, .wb-rate.head { font: 500 .58rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.wb-scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 2rem; margin: 1.3rem 0 .4rem; }
.wb-scope ul { margin: 0; padding-left: 1.1rem; font-size: .88rem; color: var(--cream-2); }
.wb-scope li { margin-bottom: .25rem; }
.wb-ref { margin: .9rem 0 0; max-width: 90ch; }
/* Estimated, budgeted, contracted, paid: one bar each on the same scale; the bracket is the estimate's range. */
.wb-cmp-rows { list-style: none; margin: 0 0 .9rem; padding: 0; display: grid; gap: .75rem; }
.wb-cmp-rows li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) 9.5rem; align-items: center; gap: .9rem; }
.wb-cmp-rows .k { font: 500 .62rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.wb-cmp-rows .track { position: relative; height: 14px; background: var(--ink-3); }
.wb-cmp-rows .bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 2px 2px 0; background: var(--gold-fill); }
.wb-cmp-rows .bar.estimated { background: #9a9a9a; }
.wb-cmp-rows .bar.contracted { background: var(--gold-2); }
.wb-cmp-rows .bar.paid { background: var(--cream); }
.wb-cmp-rows .range { position: absolute; top: -4px; bottom: -4px; border-left: 1px solid var(--cream-2); border-right: 1px solid var(--cream-2); background: rgba(20,20,20,.07); z-index: 1; }
.wb-cmp-rows b { font-weight: 500; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wb-note { background: var(--ink-3); padding: 1rem 1.2rem; margin-top: 1rem; }
.wb-note p { margin: 0 0 .7rem; font-size: .92rem; }
/* The budget by item */
.wb-item { display: grid; grid-template-columns: minmax(0, 1fr) 7rem 7.5rem 8.5rem 8.8rem auto; gap: .8rem; align-items: center; padding: .6rem .35rem; border-bottom: 1px solid var(--line-2); }
.wb-item.head { border-bottom-color: var(--line-3); }
.wb-item.head .q, .wb-item.head .p, .wb-item.head .s { font-size: inherit; }
.wb-month.head .n.n { white-space: normal; line-height: 1.35; }
.wb-item .d b { font-weight: 500; display: block; overflow-wrap: anywhere; }
.wb-item .d small { display: block; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.wb-item .q, .wb-item .p, .wb-item .s { text-align: right; font-variant-numeric: tabular-nums; font-size: .9rem; }
.wb-item em { font-style: normal; font-size: .78rem; color: var(--warn); }
.wb-group h4 { display: flex; justify-content: space-between; gap: 1rem; background: var(--ink-3); padding: .55rem .6rem; margin: 1rem 0 0; color: var(--cream-2); }
.wb-group h4 b { font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.wb-group ul, .wb-stages, .wb-prices, .wb-im-list, .wb-c-groups { list-style: none; margin: 0; padding: 0; }
.wb-status { width: auto; min-width: 0; padding: .35rem 1.8rem .35rem .7rem; font-size: .78rem; border-radius: 999px; }
.wb-status.is-contracted { border-color: var(--gold); color: var(--gold-2); }
.wb-status.is-paid { border-color: var(--ok); color: var(--ok); }
.wb-totals { margin: 1.1rem 0 0; display: grid; gap: .35rem; justify-content: end; }
.wb-totals > div { display: flex; gap: 1.5rem; justify-content: space-between; align-items: baseline; min-width: min(100%, 23rem); }
.wb-totals dt { color: var(--muted); font-size: .88rem; }
.wb-totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.wb-totals .total { border-top: 1px solid var(--line); padding-top: .5rem; margin-top: .2rem; }
.wb-totals .total dt { color: var(--cream); }
.wb-totals .total dd { font: 400 1.5rem var(--serif); }
.wb-pct { white-space: nowrap; }
.wb-pct input { width: 4.2rem; padding: .3rem .5rem; text-align: right; display: inline-block; }
/* The schedule */
.wb-phys { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; align-items: baseline; margin: 0 0 .9rem; }
.wb-phys b { font: 400 1.4rem var(--serif); }
.wb-phys span { color: var(--muted); font-size: .88rem; }
.wb-stages { margin-bottom: 1.3rem; }
.wb-stage { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 3.4rem auto; gap: .8rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line-2); }
.wb-c .wb-stage { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 3.4rem; }
.wb-stage-head b { display: block; font-weight: 500; overflow-wrap: anywhere; }
.wb-stage-head small { color: var(--muted); font-size: .78rem; }
.wb-stage-track { position: relative; height: 12px; background: var(--ink-3); }
.wb-stage-bar { position: absolute; top: 0; bottom: 0; background: rgba(168,133,77,.3); border-radius: 2px; overflow: hidden; }
.wb-stage-bar i { display: block; height: 100%; background: var(--gold-btn); }
.wb-stage-pct { text-align: right; font-size: .86rem; font-variant-numeric: tabular-nums; }
.wb-sched-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
.wb-sched-grid .wb-curve { max-width: 760px; }
.wb-month { display: grid; grid-template-columns: 4.4rem minmax(36px, 1fr) repeat(4, minmax(0, 7.2rem)); gap: .8rem; align-items: center; padding: .42rem 0; border-bottom: 1px solid var(--line-2); font-size: .84rem; }
.wb-month .bars { display: grid; gap: 2px; }
.wb-bar { display: block; height: 6px; border-radius: 0 2px 2px 0; }
.wb-bar.plan, .wb-legend i.plan { background: var(--gold-fill); }
.wb-bar.paid, .wb-legend i.paid { background: var(--cream); }
.wb-curve { width: 100%; height: auto; display: block; overflow: visible; }
.wb-curve .grid { stroke: var(--line-2); stroke-width: 1; }
.wb-curve .tick { font: 11px var(--sans); fill: var(--muted); }
.wb-curve .end { font: 500 11.5px var(--sans); fill: var(--cream-2); }
.wb-curve path { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.wb-curve path.plan { stroke: var(--gold-fill); }
.wb-curve path.paid { stroke: var(--cream); }
.wb-curve circle { stroke: var(--ink); stroke-width: 2; }
.wb-curve circle.plan { fill: var(--gold-fill); }
.wb-curve circle.paid { fill: var(--cream); }
.wb-curve .hit { fill: transparent; }
.wb-legend { display: flex; flex-wrap: wrap; gap: .3rem 1.3rem; font-size: .78rem; color: var(--cream-2); margin: .5rem 0 0; }
.wb-legend i { display: inline-block; width: 14px; height: 3px; margin-right: .45rem; vertical-align: middle; }
.wb-client .sch-check small { display: block; }
/* Forms: the stage's months, the pasted spreadsheet, the draft from the study */
.wb-actuals { margin-top: .4rem; }
.wb-actuals h4 { margin: .6rem 0 .2rem; }
.wb-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; white-space: pre; overflow-x: auto; }
.wb-im-list { margin: .6rem 0; max-height: 38vh; overflow-y: auto; }
.wb-im-list li { display: grid; grid-template-columns: 4.8rem minmax(0, 1fr); gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line-2); }
.wb-im-list .ln { color: var(--muted); font-size: .76rem; padding-top: .15rem; }
.wb-im-list b { font-weight: 500; display: block; overflow-wrap: anywhere; }
.wb-im-list small { display: block; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.wb-im-list.bad b { color: var(--bad); }
.wb-im-bad { margin: 1.2rem 0 0; }
.wb-sg-group { margin: 1.1rem 0 0; padding-bottom: .4rem; border-bottom: 1px solid var(--line-3); }
.wb-sg-line { display: grid; grid-template-columns: auto minmax(0, 1fr) 8rem 8.5rem; gap: .7rem; align-items: start; padding: .7rem 0; border-bottom: 1px solid var(--line-2); }
.wb-sg-pick input { width: 18px; height: 18px; accent-color: var(--gold); margin-top: .75rem; }
.wb-sg-main small { display: block; font-size: .76rem; color: var(--muted); margin-top: .28rem; overflow-wrap: anywhere; }
.wb-sg-main small.wb-sg-price { color: var(--gold-2); }
.wb-sg-main small.wb-sg-noprice, .wb-sg-line.open .wb-sg-main small:first-of-type { color: var(--warn); }
.wb-sg-n span { display: block; font: 500 .56rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-sg-n input { text-align: right; }
/* Settings → Custos de obra */
.wb-rate { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: .6rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--line-2); }
.wb-rate.head span { text-align: right; padding-right: .8rem; }
.wb-rate .k { font-size: .92rem; }
.wb-rate .k small { display: block; color: var(--muted); font-size: .72rem; }
.wb-rate label span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.wb-rate input { text-align: right; font-variant-numeric: tabular-nums; }
.wb-cfg-fields { margin-top: 1.2rem; }
.wb-cfg h4.wb-cfg-h { margin: 1.8rem 0 .3rem; color: var(--cream-2); }
.wb-cfg-en summary { cursor: pointer; color: var(--gold-2); font-size: .85rem; margin: 1rem 0 0; }
.wb-price { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr) 5rem 8rem 11.5rem auto; gap: .6rem; align-items: end; padding: .65rem 0; border-bottom: 1px solid var(--line-2); }
.wb-price label span { display: block; font: 500 .56rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem; }
/* The client area */
.wb-c-part + .wb-c-part { border-top: 1px solid var(--line-2); margin-top: 1.5rem; padding-top: 1.5rem; }
.wb-c-groups li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line-2); }
.wb-c-groups b { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wb-c-groups .sub { color: var(--muted); }
.wb-c-groups .total { border-bottom: 0; border-top: 1px solid var(--line); margin-top: -1px; }
.wb-c-groups .total b { font: 400 1.4rem var(--serif); }
.wb-c-foot { margin: 1.4rem 0 0; max-width: 80ch; }
/* The design studies editor: the works estimate of the plan being drawn, under the title */
.ds-title small.wb-live { color: var(--gold-2); letter-spacing: .03em; white-space: normal; line-height: 1.3; }
/* A month or date field never sets the width of its column (it stuck out of the card on a phone). */
.wb-cfg label, .wb-cfg input, .wb-actuals label, .wb-actuals input { min-width: 0; }
.wb-price input[type="month"] { padding-left: .6rem; padding-right: .4rem; }
.wb-month .m { white-space: nowrap; }
@media (max-height: 520px) and (orientation: landscape) { .wb-im-list { max-height: none; } }
@media (max-width: 900px) {
  .wb-item { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.15fr); gap: .35rem .7rem; padding: .8rem .2rem; }
  .wb-item .q, .wb-item .p, .wb-item .s { font-size: .86rem; }
  .wb-item.head { display: none; }
  .wb-item .d { grid-column: 1 / -1; }
  .wb-item .q, .wb-item .p, .wb-item .s { text-align: left; }
  .wb-item .q::before, .wb-item .p::before, .wb-item .s::before { content: attr(data-l); display: block; font: 500 .54rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .wb-item .wb-status { grid-column: 1 / 3; justify-self: start; }
  .wb-item > .btn-mini { justify-self: end; }
  .wb-price { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wb-price .d { grid-column: 1 / -1; grid-row: 1; }
  .wb-price > .btn-mini { justify-self: end; grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .wb-controls .wb-wide { grid-column: 1 / -1; }
  .wb-kind { grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .8rem; }
  .wb-kind.head { display: none; }
  .wb-kind span:nth-child(4) { grid-row: 1; grid-column: 2; }
  .wb-kind span:nth-child(2), .wb-kind span:nth-child(3) { font-size: .78rem; color: var(--muted); text-align: left; }
  .wb-kind span:nth-child(3) { text-align: right; }
  .wb-kind span:nth-child(3)::after { content: "/m²"; }
  .wb-scope, .wb-cfg .wb-cfg-two { grid-template-columns: minmax(0, 1fr); }
  .wb-cmp-rows li { grid-template-columns: minmax(0, 1fr) auto; gap: .3rem .8rem; }
  .wb-cmp-rows .track { grid-column: 1 / -1; grid-row: 2; }
  .wb-stage, .wb-c .wb-stage { grid-template-columns: minmax(0, 1fr) auto auto; gap: .4rem .7rem; }
  .wb-stage-track { grid-column: 1 / -1; grid-row: 2; }
  .wb-month { grid-template-columns: 4.5rem minmax(24px, 1fr) repeat(2, minmax(0, 5.5rem)); gap: .5rem; font-size: .8rem; }
  .wb-month .cum { display: none; }
  .wb-totals { justify-content: stretch; }
  .wb-sg-line { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); }
  .wb-sg-main { grid-column: 2 / -1; }
  .wb-sg-n:nth-of-type(2) { grid-column: 2; }
  .wb-rate { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .8rem 0; }
  .wb-rate.head { display: none; }
  .wb-rate .k { grid-column: 1 / -1; }
  .wb-rate label span { position: static; width: auto; height: auto; clip-path: none; display: block; font: 500 .56rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
}

/* ---- The assistant in the project workspace (ax-): drafts a person accepts, edits or discards ---- */
.ax-btn { display: inline-flex; align-items: center; gap: .6em; }
.ax-btn > span[aria-hidden] { color: var(--gold); font-size: 1.15em; line-height: 1; letter-spacing: 0; }
.btn-gold.ax-btn > span[aria-hidden], .btn-mini.gold.ax-btn:hover > span[aria-hidden] { color: inherit; }
.ax-mark { margin: 0 0 .5rem; font: 500 .62rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; }
.ax-mark em { font-style: normal; letter-spacing: .08em; color: var(--warn); border: 1px solid rgba(150,80,10,.4); border-radius: 999px; padding: .15em .7em; }
.ax-draft { border: 1px solid var(--line); border-radius: 2px; background: var(--ink-3); padding: 1rem 1.1rem; display: grid; gap: .8rem; grid-template-columns: minmax(0, 1fr); }
.ax-draft-head h4 { font-size: 1.2rem; }
.ax-draft-head p { margin: .3rem 0 0; }
.ax-lines { list-style: none; margin: 0; padding: 0; background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 2px; }
.ax-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .7rem .9rem; border-top: 1px solid var(--line-2); }
.ax-line:first-child { border-top: 0; }
.ax-line-main { flex: 1 1 240px; min-width: 0; display: grid; gap: .15rem; }
.ax-line-main b { font-weight: 400; overflow-wrap: anywhere; }
.ax-line-main small { font-size: .78rem; color: var(--muted); }
.ax-line-main q, .ax-deadline q { font-size: .82rem; color: var(--cream-2); font-style: italic; quotes: "“" "”"; overflow-wrap: anywhere; }
.ax-line-main input { width: 100%; }
.ax-line-acts { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.ax-line .ax-x { width: 2.1em; height: 2.1em; padding: 0; border-radius: 50%; font-size: .8rem; letter-spacing: 0; line-height: 1; }
.ax-line.is-text { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
.ax-line-label { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.ax-before { border-left: 2px solid var(--line-3); padding-left: .8rem; color: var(--muted); font-size: .9rem; }
.ax-before p { margin: 0; }
.ax-before small, .ax-after small { display: block; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem; }
.ax-after { display: block; }
.ax-after textarea { width: 100%; min-height: 0; }
.ax-missing { border-left: 2px solid var(--warn); padding: .1rem 0 .1rem .8rem; font-size: .86rem; color: var(--cream-2); }
.ax-missing b { font-weight: 500; color: var(--warn); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; }
.ax-missing ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.ax-note { margin: 0; }
.ax-draft-foot { justify-content: flex-end; }
.ax-dialog { overflow: hidden; }
.ax-dialog.closing { animation: dvOut .2s ease forwards; }
.ax-dialog-inner { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
.ax-dialog-inner > header { padding: 1.5rem 1.6rem .8rem; flex: none; }
.ax-dialog-inner > header .eyebrow { margin-bottom: .35rem; }
.ax-dialog-inner > header h2 { margin: 0; overflow-wrap: anywhere; }
.ax-dialog-inner > header p { margin: .4rem 0 0; }
.ax-dialog-body { padding: .2rem 1.6rem 1.4rem; overflow-y: auto; min-height: 0; display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.ax-dialog-body > p { margin: 0; }
.ax-dialog-inner > footer { margin: 0; padding: .9rem 1.6rem 1.3rem; border-top: 1px solid var(--line-2); flex: none; }
.ax-dialog-body .ax-draft { border: 0; background: none; padding: 0; }
.ax-rec { display: flex; flex-wrap: wrap; gap: .7rem; }
.ax-upload { cursor: pointer; }
.ax-dialog [data-status].bad { color: var(--bad); }
.ax-tools { display: grid; gap: .6rem; justify-items: start; grid-template-columns: minmax(0, 1fr); margin: -.3rem 0 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line-2); }
.ax-quick { display: flex; gap: .5rem; align-items: center; width: 100%; }
.ax-quick input { flex: 1 1 0; width: 0; min-width: 0; }
.ax-quick .btn-mini { flex: none; }
.ax-said { margin: 0; overflow-wrap: anywhere; }
div.ax-said ul { margin: 0; padding-left: 1.1rem; font-size: .88rem; color: var(--cream-2); text-transform: none; letter-spacing: 0; }
div.ax-said small { color: var(--muted); }
.ax-meta { display: block; font-size: .76rem; color: var(--muted); }
.ax-open { border-left: 2px solid var(--line); padding-left: .8rem; }
.ax-source summary { cursor: pointer; font-size: .86rem; color: var(--gold-2); }
.ax-source audio { display: block; width: 100%; margin: .6rem 0; }
.ax-source textarea { width: 100%; margin-top: .6rem; text-transform: none; letter-spacing: 0; }
.ax-transcript { margin: .6rem 0 0; font-size: .86rem; color: var(--cream-2); max-height: 14rem; overflow-y: auto; overflow-wrap: anywhere; }
.ax-inline { margin: .6rem 0 0; display: grid; gap: .5rem; justify-items: start; }
.pw-rows li > .ax-inline { margin: -.3rem 0 .7rem; }
.pw-rows button.ax-btn { display: inline-flex; width: auto; justify-content: flex-start; gap: .45em; padding: .55em .9em; border: 1px solid var(--line); border-radius: 999px; color: var(--cream-2); font: 500 .62rem var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.pw-rows button.ax-btn:hover { border-color: var(--gold); color: var(--cream); background: none; }
.ax-pick select { width: 100%; }
.ax-quote { margin: 0; border-left: 2px solid var(--line); padding-left: .9rem; }
.ax-quote small { font-size: .7rem; color: var(--muted); }
.ax-quote p { margin: .2rem 0 0; font-family: var(--serif); font-size: 1.1rem; line-height: 1.4; overflow-wrap: anywhere; }
.ax-reply textarea { width: 100%; text-transform: none; letter-spacing: 0; }
.ax-reply small { text-transform: none; letter-spacing: 0; }
.ax-deadline { border: 1px solid var(--line); border-radius: 2px; padding: .7rem .9rem; display: grid; gap: .25rem; }
.ax-deadline b { font: 500 .62rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.ax-deadline small { color: var(--muted); }
.ax-now { margin-bottom: 1.4rem; }
.ax-now .card-head { margin-bottom: .8rem; }
.ax-now .chip { padding: .45rem .8rem; }
.ax-text { margin: 0 0 1rem; font-family: var(--serif); font-size: 1.22rem; line-height: 1.45; max-width: 70ch; overflow-wrap: anywhere; }
.ax-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.6rem; }
.ax-cols h4 { font: 500 .62rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: .45rem; }
.ax-list { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; font-size: .9rem; color: var(--cream-2); }
.ax-list li { overflow-wrap: anywhere; }
.ax-list b { font-weight: 500; color: var(--cream); }
.ax-list li.late b { color: var(--warn); }
.ax-week { list-style: none; padding-left: 0; }
.ax-week small { color: var(--muted); margin-right: .4rem; }
.ax-foot { margin: 1rem 0 0; padding-top: .8rem; border-top: 1px solid var(--line-2); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.ax-focus-h { font: 500 .62rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.ax-focus { font-style: normal; font-size: .68rem; letter-spacing: .06em; border: 1px solid var(--line); border-radius: 999px; padding: .05em .6em; color: var(--gold-2); margin-right: .2rem; }
.ax-focus.is-client { border-color: var(--line-3); color: var(--cream-2); }
@media (max-width: 860px) {
  .ax-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .ax-dialog-inner > header { padding: 1.1rem 1.1rem .6rem; }
  .ax-dialog-body { padding: .2rem 1.1rem 1.1rem; }
  .ax-dialog-inner > footer { padding: .8rem 1.1rem 1rem; }
  .ax-line-acts { width: 100%; }
  .ax-draft-foot .btn { flex: 1 1 100%; white-space: normal; }
  .ax-quick { flex-wrap: wrap; }
  .ax-quick input { flex: 1 1 100%; width: 100%; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .ax-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 12px); }
  .ax-dialog-inner { max-height: calc(100dvh - 14px); }
  .ax-dialog-inner > header { padding: .7rem 1.1rem .4rem; }
  .ax-dialog-inner > header .eyebrow { display: none; }
  .ax-dialog-inner > header h2 { font-size: 1.25rem; }
  .ax-dialog-inner > header p { display: none; }
  .ax-dialog-body { padding: .2rem 1.1rem .8rem; }
  .ax-dialog-inner > footer { padding: .5rem 1.1rem .6rem; }
}

/* ---- Obra em campo (fw-): the site diary, the builder's questions, samples and materials, the weekly summary
   and the visit report drafted by the assistant. Sections of the Obra tab scroll sideways on a phone (.fw-seg is
   listed in strip-active.js). ---- */
.fw-seg { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin: 1.8rem 0 1.3rem; padding-bottom: 2px; }
.fw-seg::-webkit-scrollbar { display: none; }
.fw-seg button { flex: none; display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--line-2); background: none; color: var(--cream-2); padding: .62rem .95rem; border-radius: 999px; font: 500 .64rem var(--sans); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.fw-seg button:hover { border-color: var(--gold); color: var(--cream); }
.fw-seg button[aria-selected="true"] { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-2); }
.fw-seg .n { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 .4em; border-radius: 999px; background: var(--gold-btn); color: var(--on-gold); font-size: .6rem; letter-spacing: 0; }
.fw-filter { margin: 0 0 1rem; }
.fw-filter .n { font-weight: 700; letter-spacing: 0; }
.fw-pane > .card, .fw-pane > article.card, .fw-days > .card { margin-bottom: 1rem; }
.fw-st.is-gold { color: var(--gold-2); } .fw-st.is-ok { color: var(--ok); } .fw-st.is-warn { color: var(--warn); } .fw-st.is-bad { color: var(--bad); } .fw-st.is-off { color: var(--muted); }
.fw-on { display: inline-block; width: 7px; height: 7px; margin-left: .45rem; border-radius: 50%; background: var(--ok); vertical-align: middle; }
.fw-inline { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted); }
.fw-inline select { width: auto; min-width: 9.5rem; padding-top: .5rem; padding-bottom: .5rem; }
.fw-mark { font: 500 .62rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); margin: 0 0 .45rem; }
.fw-mark em { font-style: normal; color: var(--warn); }
.fw-draft { border: 1px solid var(--line); background: var(--gold-soft); border-radius: 2px; padding: .9rem 1rem; margin: 0 0 1.1rem; overflow-wrap: anywhere; }
.fw-draft > p:last-child, .fw-draft > .row:last-child { margin-bottom: 0; }
.fw-draft [data-text] { white-space: pre-wrap; }
.fw-missing { margin: .6rem 0; font-size: .85rem; color: var(--warn); }
.fw-missing ul { margin: .2rem 0 0; padding-left: 1.1rem; }
.fw-suggest > p { margin: .5rem 0 0; }
.fw-checks { display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; }
.fw-checks .sch-check { margin: .2rem 0; text-transform: none; letter-spacing: 0; }
.fw-quote { margin: .5rem 0 0; padding: .1rem 0 .1rem .9rem; border-left: 2px solid var(--line); color: var(--cream-2); overflow-wrap: anywhere; }
/* The diary: a month on the left, its days on the right; one column on a phone. */
.fw-diary { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.fw-cal { border: 1px solid var(--line-2); border-radius: 2px; padding: 1rem; background: var(--ink-2); position: sticky; top: 1rem; }
.fw-cal-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .7rem; }
.fw-cal-head b { font: 400 1.15rem var(--serif); }
.fw-cal-head b::first-letter { text-transform: uppercase; }
.fw-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.fw-cal-grid small { text-align: center; font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-bottom: .2rem; }
.fw-cal-grid button { position: relative; aspect-ratio: 1; border: 1px solid transparent; background: none; color: var(--cream-2); font: 400 .82rem var(--sans); cursor: pointer; border-radius: 2px; padding: 0; }
.fw-cal-grid button:hover:not(:disabled) { border-color: var(--line); }
.fw-cal-grid button:disabled { opacity: .4; cursor: default; }
.fw-cal-grid button.has { background: var(--gold-soft); color: var(--cream); font-weight: 600; }
.fw-cal-grid button.today { border-color: var(--gold); }
.fw-cal-grid button i { position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold-fill); transform: translateX(-50%); }
.fw-cal-grid button i.rain, .fw-cal-grid button i.storm { background: var(--info); }
.fw-cal-note { margin: .7rem 0 0; }
.fw-meta { margin: .25rem 0 0; overflow-wrap: anywhere; }
.fw-crew { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .9rem; }
.fw-crew span { border: 1px solid var(--line-2); border-radius: 999px; padding: .2rem .7rem; font-size: .78rem; color: var(--cream-2); }
.fw-crew b { font-weight: 600; color: var(--cream); }
.fw-crew-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: .5rem; margin-bottom: .45rem; }
.fw-blocks { margin: 0 0 .7rem; display: grid; gap: .85rem; }
.fw-blocks dt { font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.fw-blocks dd { margin: .15rem 0 0; overflow-wrap: anywhere; }
.fw-blocks .occurrences dd { border-left: 2px solid var(--warn); padding-left: .7rem; }
/* Questions, samples and summaries: one card each. */
.fw-item-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .6rem 1rem; }
.fw-item-head > div { flex: 1 1 240px; min-width: 0; }
.fw-item-head .eyebrow { margin-bottom: .3rem; }
.fw-item-head h3 { overflow-wrap: anywhere; }
.fw-q { margin: .9rem 0; overflow-wrap: anywhere; }
.fw-flags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .8rem; }
.fw-flags span { border: 1px solid currentColor; color: var(--warn); border-radius: 999px; padding: .2rem .6rem; font: 500 .56rem var(--sans); letter-spacing: .13em; text-transform: uppercase; }
.fw-answer { border-left: 2px solid var(--gold-fill); padding: .2rem 0 .2rem .9rem; margin: .9rem 0; overflow-wrap: anywhere; }
.fw-answer .eyebrow { margin-bottom: .3rem; }
.fw-answer p:last-child { margin-bottom: 0; }
.fw-files { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.fw-file { display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; border: 1px solid var(--line-2); border-radius: 2px; padding: .25rem .55rem; font-size: .8rem; }
.fw-file a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fw-file button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 .1rem; }
.fw-acts { margin-top: .9rem; gap: .5rem; }
.pw-photos.fw-small { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); margin: .5rem 0 .6rem; }
.fw-client { border: 1px solid var(--line); background: var(--gold-soft); border-radius: 2px; padding: .8rem 1rem; margin: .8rem 0; }
.fw-client .eyebrow { margin-bottom: .25rem; }
.fw-client p { margin: 0; }
.fw-link input[readonly] { font-size: .82rem; }
/* Visão geral: the counts and the latest lines of the two logs. */
.fw-ov { margin-bottom: 1.2rem; }
.fw-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 0 0 .8rem; }
.fw-nums dt { font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.fw-nums dd { margin: .1rem 0 0; font: 400 1.7rem var(--serif); color: var(--gold-2); }
.fw-nums .warn dd { color: var(--warn); }
.fw-late { color: var(--warn); font-size: .85rem; margin: 0 0 .6rem; }
.fw-log { list-style: none; margin: 0; padding: 0; }
.fw-log li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--line-2); }
.fw-log li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.fw-dash { margin-bottom: 1.2rem; }
.fw-dash-lead { margin: -.5rem 0 .4rem; }
/* Visita: the report card and the review of the assistant's draft (phone first). */
.vc-report { margin-top: 1rem; }
.vc-report-why { color: var(--warn); margin: .7rem 0 0; }
.vc-root.vc-reviewing > :not(.fw-review) { display: none; }
.fw-rv textarea { min-height: 0; }
.fw-rv-sec { margin: 1.6rem 0 0; padding-top: 1.3rem; border-top: 1px solid var(--line-2); }
.fw-rv-sec h3 { margin-bottom: .3rem; }
.fw-rv-issues, .fw-rv-solved, .fw-rv-questions { list-style: none; margin: .7rem 0; padding: 0; display: grid; gap: .7rem; }
.fw-rv-issue { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .7rem; border: 1px solid var(--line-2); border-radius: 2px; padding: .75rem; }
.fw-rv-issue .pw-thumb { width: 64px; height: 64px; }
.fw-rv-fields { flex: 1 1 220px; min-width: 0; display: grid; gap: .45rem; }
.fw-rv-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 160px); gap: .45rem; }
.fw-rv-solved .sch-check { align-items: flex-start; margin: 0; }
.fw-rv-solved .sch-check input { margin-top: .3rem; }
.fw-rv-solved span { display: grid; gap: .1rem; min-width: 0; overflow-wrap: anywhere; }
.fw-rv-solved b { font-weight: 400; }
.fw-rv-solved small { color: var(--gold-2); font-size: .78rem; }
.fw-rv-questions li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; border-left: 2px solid var(--warn); padding: .2rem 0 .2rem .8rem; }
.fw-rv-questions li > span:first-child { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.fw-rv-actions { margin: 1.3rem 0 2.5rem; justify-content: flex-end; }
.fw-rv-done h2 { margin-bottom: .5rem; }
/* The client area. */
.fw-more { margin-top: .4rem; border-top: 1px solid var(--line-2); }
.fw-more summary { cursor: pointer; color: var(--gold-2); font-size: .85rem; padding: .7rem 0; }
.fw-c-sample .pw-photos { margin-top: .9rem; }
@media (max-width: 900px) {
  .fw-diary { grid-template-columns: 270px minmax(0, 1fr); gap: 1rem; }
  .fw-cal { position: static; }
}
@media (max-width: 700px) {
  .fw-diary { grid-template-columns: minmax(0, 1fr); }
  .fw-cal { max-width: 440px; }
}
@media (max-width: 640px) {
  .fw-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fw-rv-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fw-rv-line input[type="date"] { grid-column: 1 / -1; }
  .fw-rv-actions .btn { flex: 1 1 auto; }
  .fw-inline { flex-wrap: wrap; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .fw-cal { max-width: 360px; }
  .fw-seg { margin: 1.1rem 0 1rem; }
}

/* ---- Horas, equipe e rentabilidade (public/admin/hours.js, project/finance.js): hr- ---- */
/* The timer, in the Studio's bar on every page */
.hr-timer { display: block; flex: none; }
.side > .hr-timer { margin: -1rem 0 -.8rem; }
.hr-timer button { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .5rem .7rem; border: 1px solid var(--line-2); border-radius: 2px; background: var(--ink-2); color: var(--cream-2); cursor: pointer; text-align: left; font: inherit; }
.hr-timer button:hover { border-color: var(--gold); color: var(--gold-2); }
.hr-timer svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.hr-timer-tx { display: grid; min-width: 0; line-height: 1.25; }
.hr-timer-tx b { font: 500 .95rem var(--sans); font-variant-numeric: tabular-nums; color: var(--gold-2); }
.hr-timer-tx b:empty { display: none; }
.hr-timer-tx small { font-size: .78rem; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-timer.on button { border-color: var(--gold-fill); background: var(--gold-soft); }
.hr-timer.on svg { color: var(--gold-2); animation: hrPulse 2s ease-in-out infinite; }
.hr-timer.on .hr-timer-tx small { font-size: .7rem; color: var(--muted); }
@keyframes hrPulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .hr-timer.on svg { animation: none; } }
@media (max-width: 860px) {
  .side > .hr-timer { margin: 0; }
  .hr-timer button { width: auto; padding: 0 .55rem; height: 32px; border-radius: 999px; gap: .35rem; }
  .hr-timer svg { width: 16px; height: 16px; }
  .hr-timer-tx small { display: none; }
  .hr-timer-tx b { font-size: .78rem; }
  .hr-timer:not(.on) button { width: 32px; padding: 0; justify-content: center; }
}
/* Forms in the sheets */
.hr-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.2rem; }
.hr-form .full { grid-column: 1 / -1; }
.hr-form p { margin: 0; }
.hr-form textarea { min-height: 0; }
.hr-time { display: flex; align-items: center; gap: .4rem; }
.hr-time input { width: 4.4rem; min-width: 0; text-align: right; padding-left: .5rem; padding-right: .5rem; }
.hr-time i { font-style: normal; font-size: .8rem; letter-spacing: 0; text-transform: none; color: var(--muted); }
.hr-live { display: grid; gap: .2rem; text-align: center; padding: .6rem 0 .2rem; }
.hr-live b { font: 400 2.6rem var(--serif); font-variant-numeric: tabular-nums; color: var(--gold-btn); line-height: 1; }
.hr-live span { color: var(--muted); font-size: .85rem; }
.hr-basis { margin: 0; font-size: .82rem; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.hr-basis b { font-weight: 500; color: var(--cream-2); }
/* The page */
.hr-tabs { margin-bottom: 1.2rem; }
.hr-bar { display: flex; align-items: center; justify-content: space-between; gap: .8rem 1.2rem; flex-wrap: wrap; margin-bottom: 1rem; }
.hr-weeknav { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.hr-weeknav b { font: 400 1.2rem var(--serif); }
.hr-who { display: inline-flex; align-items: center; gap: .6rem; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.hr-who select { width: auto; min-width: 12rem; padding: .5rem 2rem .5rem .8rem; font-size: .84rem; text-transform: none; letter-spacing: 0; }
.hr-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0 0 1.2rem; }
.hr-stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hr-stats > div { border: 1px solid var(--line-2); border-radius: 2px; background: var(--ink-2); padding: .9rem 1.1rem; min-width: 0; }
.hr-stats dt { font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.hr-stats dd { margin: .15rem 0 0; font: 400 1.5rem var(--serif); color: var(--gold-2); overflow-wrap: anywhere; }
.hr-stats small { display: block; font-size: .76rem; color: var(--muted); }
.hr-stats .neg, .hr-rank .neg, .hr-pf .neg, .hr-dg-list li > span.neg { color: var(--bad); }
.hr-pf .hr-stats > div { background: var(--ink-3); border-color: transparent; }
.hr-meter, .hr-burn { position: relative; height: 6px; margin-top: .5rem; background: var(--ink-4); border-radius: 0; }
.hr-meter i, .hr-burn i { display: block; height: 100%; background: var(--gold-fill); }
.hr-meter i.is-bad, .hr-burn i.is-bad { background: var(--bad); }
.hr-burn i.is-warn { background: var(--warn); }
.hr-burn b { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--cream); }
.hr-chip { display: inline-block; font-size: .68rem; line-height: 1.2; padding: .22rem .55rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--cream-2); white-space: nowrap; }
.hr-chip.warn { border-color: rgba(150,80,10,.4); color: var(--warn); }
.hr-chip.bad { border-color: rgba(168,58,42,.45); color: var(--bad); }
.hr-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: .9rem 0 0; font-size: .76rem; color: var(--muted); }
.hr-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: .45rem; vertical-align: -1px; background: var(--ink-4); border: 1px solid var(--line-3); }
.hr-legend .is-bad::before { background: rgba(168,58,42,.16); border-color: var(--bad); }
.hr-legend .is-ok::before { background: rgba(46,107,62,.14); border-color: var(--ok); }
.hr-legend .is-warn::before { background: rgba(150,80,10,.12); border-color: var(--warn); }
.hr-legend .is-free::before { background: var(--ink-2); }
.hr-legend .bar::before { width: 18px; height: 6px; background: var(--gold-fill); border: 0; vertical-align: 1px; }
/* Suggestions of the week */
.hr-sug { border-color: var(--line); }
.hr-sug-list { list-style: none; margin: 0; padding: 0; }
.hr-sug-list > li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem; padding: 1rem 0; border-top: 1px solid var(--line-2); }
.hr-sug-pick { padding-top: .15rem; }
.hr-sug-pick input { width: 18px; height: 18px; accent-color: var(--gold-btn); }
.hr-sug-main { display: grid; gap: .55rem; min-width: 0; }
.hr-sug-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin: 0; }
.hr-sug-head b { font: 400 1.1rem var(--serif); }
.hr-sug-fields { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1.1fr) auto; gap: .5rem; align-items: center; }
.hr-sug-fields select, .hr-sug-note { padding: .5rem .7rem; font-size: .88rem; }
.hr-sug-fields select { padding-right: 1.8rem; }
.hr-sug-fields .hr-time input { width: 3.6rem; padding-top: .5rem; padding-bottom: .5rem; }
.hr-sug-actions { margin-top: .8rem; padding-top: 1rem; border-top: 1px solid var(--line-2); }
/* The weekly sheet, the people table and the allocation grid: wide tables scroll inside their own box */
.hr-sheet-wrap { overflow-x: auto; margin: 0 -2px; }
.hr-sheet, .hr-people, .hr-grid { width: 100%; border-collapse: collapse; }
.hr-sheet { min-width: 640px; }
/* (the global table rules give every row a pointer, a hover and a line under each cell: not here) */
.hr-sheet th, .hr-sheet td, .hr-people th, .hr-people td, .hr-grid th, .hr-grid td { border-bottom: 0; }
.hr-sheet thead th, .hr-people thead th, .hr-grid thead th { border-bottom: 1px solid var(--line-2); }
.hr-sheet tbody tr, .hr-people tbody tr, .hr-grid tbody tr, .hr-pf-table tbody tr { cursor: default; }
.hr-sheet tbody tr:hover td, .hr-people tbody tr:hover td, .hr-grid tbody tr:hover td, .hr-pf-table tbody tr:hover td { background: none; }
.hr-sheet tbody tr:hover td.today { background: var(--gold-soft); }
.hr-sheet tbody th, .hr-sheet tfoot th, .hr-sheet thead th:first-child, .hr-grid tbody th, .hr-grid thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--ink-2); }
.hr-sheet th, .hr-people th, .hr-grid th { font: 500 .58rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); text-align: left; padding: .45rem .4rem; white-space: nowrap; }
.hr-sheet thead th small, .hr-grid thead th small { display: block; font-size: .62rem; letter-spacing: .04em; text-transform: none; }
.hr-sheet tbody th, .hr-people tbody th, .hr-grid tbody th, .hr-sheet tfoot th { text-transform: none; letter-spacing: 0; font-size: .92rem; color: var(--cream); white-space: normal; min-width: 9rem; }
.hr-sheet tbody th b, .hr-people tbody th b, .hr-grid tbody th b { display: block; font-weight: 400; overflow-wrap: anywhere; }
.hr-sheet tbody th small, .hr-people tbody th small, .hr-grid tbody th small { display: block; font-size: .76rem; color: var(--muted); }
.hr-sheet td, .hr-people td { padding: .45rem .4rem; border-top: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
.hr-sheet tbody th, .hr-people tbody th, .hr-grid tbody th { border-top: 1px solid var(--line-2); }
.hr-sheet tbody tr:first-child > *, .hr-people tbody tr:first-child > *, .hr-grid tbody tr:first-child > * { border-top: 0; }
.hr-sheet .n, .hr-people .n { text-align: right; width: 4.4rem; white-space: nowrap; }
.hr-sheet .today { background: var(--gold-soft); }
.hr-sheet tfoot td, .hr-sheet tfoot th { border-top: 1px solid var(--line); font-weight: 500; }
.hr-sheet td b { font-weight: 500; }
.hr-add { width: 28px; height: 28px; padding: 0; border: 1px dashed var(--line-3); border-radius: 50%; background: none; color: var(--muted); cursor: pointer; line-height: 1; }
.hr-add:hover { border-color: var(--gold); color: var(--gold-2); border-style: solid; }
.hr-people { min-width: 460px; }
.hr-people .n { width: 11rem; }
.hr-people input { text-align: right; padding: .5rem .6rem; }
.hr-settings { margin-top: 1.2rem; border-top: 1px solid var(--line-2); padding-top: 1rem; }
.hr-settings summary { cursor: pointer; font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.hr-settings .hr-form { margin-top: 1rem; }
.hr-grid { min-width: 780px; table-layout: fixed; }
.hr-grid thead th:first-child { width: 10.5rem; }
.hr-grid thead th.today { color: var(--gold-2); }
.hr-grid td { padding: 3px; border-top: 1px solid var(--line-2); vertical-align: top; }
.hr-cell { display: grid; gap: .15rem; align-content: start; width: 100%; min-height: 5.4rem; padding: .5rem .55rem; border: 1px solid var(--line-2); border-radius: 2px; background: var(--ink-2); color: var(--cream); text-align: left; font: inherit; }
button.hr-cell { cursor: pointer; }
button.hr-cell:hover { border-color: var(--gold); }
.hr-cell > b { font: 400 1.15rem var(--serif); }
.hr-cell > small { font-size: .7rem; color: var(--muted); }
.hr-grid td.is-bad .hr-cell { background: rgba(168,58,42,.07); border-color: rgba(168,58,42,.45); }
.hr-grid td.is-bad .hr-cell > small { color: var(--bad); }
.hr-grid td.is-ok .hr-cell { background: rgba(46,107,62,.06); border-color: rgba(46,107,62,.4); }
.hr-grid td.is-ok .hr-cell > small { color: var(--ok); }
.hr-grid td.is-warn .hr-cell { background: rgba(150,80,10,.05); border-color: rgba(150,80,10,.35); }
.hr-grid td.is-warn .hr-cell > small { color: var(--warn); }
.hr-al { display: flex; justify-content: space-between; gap: .4rem; font-size: .72rem; color: var(--cream-2); min-width: 0; }
.hr-al i { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hr-al em { font-style: normal; flex: none; color: var(--muted); }
.hr-al.more, .hr-logged { font-size: .68rem; color: var(--muted); }
.hr-logged { border-top: 1px dashed var(--line-2); padding-top: .2rem; margin-top: .1rem; }
.hr-al-list { list-style: none; margin: 0; padding: 0; }
.hr-al-list li { display: grid; grid-template-columns: minmax(0, 1fr) 5.5rem auto; gap: .6rem; align-items: center; padding: .5rem 0; border-top: 1px solid var(--line-2); }
.hr-al-list li:first-child { border-top: 0; }
.hr-al-list b { display: block; font-weight: 400; overflow-wrap: anywhere; }
.hr-al-list small { color: var(--muted); font-size: .78rem; }
.hr-al-list input { text-align: right; padding: .5rem .6rem; }
.hr-al-list i { font-style: normal; color: var(--muted); }
.hr-free { list-style: none; margin: 0; padding: 0; }
.hr-free li { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: .3rem 1rem; padding: .55rem 0; border-top: 1px solid var(--line-2); }
.hr-free li:first-child { border-top: 0; }
.hr-free b { font-weight: 400; color: var(--cream-2); }
.hr-free em { font-style: normal; color: var(--muted); font-size: .85rem; }
/* Entries */
.hr-dayh { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 1.2rem 0 .3rem; font: 500 .62rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.card-head + .hr-dayh { margin-top: 0; }
.hr-dayh span { letter-spacing: .04em; text-transform: none; font-size: .8rem; color: var(--muted); }
.hr-entries, .hr-mine { list-style: none; margin: 0; padding: 0; }
.hr-entries li { border-top: 1px solid var(--line-2); }
.hr-entries button { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .65rem .2rem; border: 0; background: none; color: var(--cream); text-align: left; font: inherit; cursor: pointer; }
.hr-entries button:hover:not(:disabled) { background: rgba(20,20,20,.03); }
.hr-entries button:disabled { cursor: default; }
.hr-e-main { display: grid; gap: .1rem; flex: 1 1 0; min-width: 0; }
.hr-e-main b { font-weight: 400; overflow-wrap: anywhere; }
.hr-e-main small { font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.hr-e-time { flex: none; font-variant-numeric: tabular-nums; color: var(--gold-2); }
.hr-mine li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .5rem 0; border-top: 1px solid var(--line-2); }
.hr-mine li:first-child { border-top: 0; }
.hr-mine span { min-width: 0; overflow-wrap: anywhere; }
.hr-mine span small, .hr-mine b small { display: block; font-size: .76rem; color: var(--muted); font-weight: 400; }
.hr-mine b { font-weight: 400; text-align: right; flex: none; }
.hr-adj li { align-items: center; flex-wrap: wrap; }
.hr-adj span { flex: 1 1 12rem; }
/* Projects by margin */
.hr-rank { list-style: none; margin: 0; padding: 0; }
.hr-rank li { border-top: 1px solid var(--line-2); }
.hr-rank a { display: grid; grid-template-columns: 2rem minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, 1.1fr); gap: .4rem 1.1rem; align-items: start; padding: .95rem .2rem; color: var(--cream); text-decoration: none; }
.hr-rank a:hover { background: rgba(20,20,20,.03); }
.hr-rank-n { font: 400 1.4rem var(--serif); color: var(--gold-btn); line-height: 1.2; }
.hr-rank-main { display: grid; gap: .15rem; min-width: 0; }
.hr-rank-main b { font: 400 1.15rem var(--serif); overflow-wrap: anywhere; }
.hr-rank-main small, .hr-rank-num small { font-size: .74rem; color: var(--muted); }
.hr-rank-flags, .hr-pf-flags { display: flex; flex-wrap: wrap; gap: .3rem; }
.hr-rank-flags:empty, .hr-pf-flags:empty { display: none; }
.hr-rank-num { display: grid; gap: .1rem; min-width: 0; }
.hr-rank-num b { font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hr-rank-num b i { font-style: normal; font-weight: 400; font-size: .74rem; color: var(--muted); }
.hr-rank-num .hr-burn { margin: .25rem 0 .15rem; }
/* The project's Financeiro tab */
.hr-recv { display: inline-grid; justify-items: end; gap: 0; padding: .35rem .5rem; border: 1px solid transparent; border-radius: 2px; background: none; color: var(--cream); font: inherit; cursor: pointer; }
.hr-recv:hover { border-color: var(--line-3); }
.hr-recv b { font-weight: 400; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.hr-recv small { font-size: .68rem; color: var(--warn); }
.hr-fin-mode { display: grid; gap: .5rem; margin-top: 1rem; }
.hr-fin-mode label, .hr-target { display: inline-flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.hr-fin-mode select { width: auto; min-width: 15rem; padding: .5rem 2rem .5rem .8rem; font-size: .84rem; text-transform: none; letter-spacing: 0; }
.hr-fin-mode p { margin: 0; }
.hr-target input { width: 8rem; text-align: right; padding: .5rem .6rem; font-size: .9rem; letter-spacing: 0; }
.hr-pf-table td:first-child { align-items: center; }
.hr-pf-table .n { width: auto; vertical-align: top; padding-top: .7rem; padding-bottom: .7rem; }
.hr-pf-table .n small { display: block; font-size: .72rem; color: var(--muted); }
.hr-pf-table .n .hr-burn { margin: .3rem 0 0 auto; width: 100%; min-width: 5rem; }
.hr-pf-table .n.neg small { color: inherit; }
/* The weekly digest */
.hr-dg-text { max-width: 74ch; }
.hr-dg-text p { margin: 0 0 .8em; line-height: 1.7; }
.hr-dg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-top: 1.2rem; align-items: start; }
.hr-dg-grid > .card { margin: 0; }
.hr-dg-list { list-style: none; margin: 0 0 .8rem; padding: 0; }
.hr-dg-list li { display: grid; gap: .15rem; padding: .6rem 0; border-top: 1px solid var(--line-2); }
.hr-dg-list li:first-child { border-top: 0; }
.hr-dg-list a, .hr-dg-who { display: grid; gap: .05rem; color: var(--cream); text-decoration: none; min-width: 0; }
.hr-dg-list a:hover b { color: var(--gold-2); }
.hr-dg-list b { font-weight: 400; overflow-wrap: anywhere; }
.hr-dg-list small { font-size: .76rem; color: var(--muted); }
.hr-dg-list li > span:last-child { font-size: .85rem; color: var(--cream-2); }
@media (max-width: 1100px) {
  .hr-dg-grid { grid-template-columns: minmax(0, 1fr); }
  .hr-rank a { grid-template-columns: 2rem minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "n main main" ". fees margin" ". hours cost"; }
  .hr-rank-n { grid-area: n; } .hr-rank-main { grid-area: main; }
  .hr-rank-num.is-fees { grid-area: fees; } .hr-rank-num.is-margin { grid-area: margin; } .hr-rank-num.is-hours { grid-area: hours; } .hr-rank-num.is-cost { grid-area: cost; }
  
  .hr-stats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hr-form { grid-template-columns: minmax(0, 1fr); }
  .hr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .hr-stats dd { font-size: 1.2rem; }
  .hr-stats > div { padding: .7rem .8rem; }
  .hr-sug-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hr-sug-list > li { gap: .6rem; }
  .hr-who { width: 100%; }
  .hr-who select { flex: 1 1 0; min-width: 0; }
  .hr-free li { grid-template-columns: minmax(0, 1fr); }
  .hr-fin-mode select { min-width: 0; width: 100%; }
  .hr-fin-mode label { width: 100%; }
  .hr-rank a { grid-template-columns: 1.6rem minmax(0, 1fr) minmax(0, 1fr); gap: .6rem .7rem; grid-template-areas: "n main main" ". fees margin" ". hours hours" ". cost cost"; }
  .hr-people { min-width: 0; }
  .hr-people .n { width: 6.4rem; }
  .hr-people tbody th { min-width: 0; }
  .hr-people th, .hr-people td { padding-left: .2rem; padding-right: .2rem; }
  .hr-people thead th { white-space: normal; letter-spacing: .1em; }
  .hr-grid thead th:first-child { width: 7.2rem; }
  .hr-grid tbody th { min-width: 0; font-size: .85rem; }
  .hr-sheet tbody th, .hr-sheet tfoot th { min-width: 7.5rem; font-size: .85rem; }
  .hr-sug-actions .btn { flex: 1 1 auto; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .hr-live b { font-size: 1.8rem; }
  .hr-form { gap: .6rem 1rem; }
}

/* ---- O cliente no centro (briefing por conversa, passeio 3D, comentários por ambiente): cx- ---- */
.cx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cx-demo { display: inline-block; margin: .4rem 0 0; padding: .3rem .6rem; border: 1px dashed var(--line-3); border-radius: 2px; font-size: .76rem; line-height: 1.4; color: var(--warn); }
.cx-check { display: flex; align-items: flex-start; gap: .6rem; font-size: .9rem; color: var(--cream-2); cursor: pointer; }
.cx-check input { width: 18px; height: 18px; margin-top: .1rem; flex: none; accent-color: var(--gold-btn); }
.cx-quote { margin: 0; padding: .6rem .9rem; border-left: 2px solid var(--gold-fill); background: var(--ink-3); font: italic 400 1.05rem var(--serif); color: var(--cream); overflow-wrap: anywhere; }
/* Speaking instead of typing (client area) */
.cx-voice { display: grid; gap: .5rem; margin: .7rem 0 0; }
.cx-voice-btn { display: inline-flex; align-items: center; gap: .55rem; justify-self: start; min-height: 42px; padding: 0 1.1rem 0 .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--ink-2); color: var(--gold-2); font: 500 .82rem var(--sans); cursor: pointer; }
.cx-voice-btn:hover { border-color: var(--gold); background: var(--gold-soft); }
.cx-voice-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.cx-voice-btn[hidden] { display: none; }
/* The briefing conversation (client area) */
.cx-slot:empty { display: none; }
.cx-slot > .card { margin-top: 1.6rem; border-color: var(--line); scroll-margin-top: 6rem; }
.cx-iv h2, .cx-wk-card h2 { font-size: 1.7rem; margin-bottom: .5rem; }
.cx-iv .cx-iv-q { font-size: 1.9rem; line-height: 1.2; margin: .9rem 0 .4rem; }
.cx-iv textarea, .cx-panel-body textarea, .cx-digest textarea { font-size: 1rem; text-transform: none; letter-spacing: 0; }
.cx-iv .row { margin-top: 1.2rem; }
.cx-iv .cx-iv-nav { justify-content: space-between; }
.cx-iv-bar { height: 3px; background: var(--ink-4); margin: .9rem 0 .5rem; max-width: 420px; }
.cx-iv-bar i { display: block; height: 100%; background: var(--gold-fill); transition: width .4s var(--ease); }
.cx-iv-review { list-style: none; counter-reset: cxq; margin: 1rem 0 0; padding: 0; display: grid; gap: 1rem; }
.cx-iv-review li { counter-increment: cxq; padding: 0 0 1rem 2.2rem; border-bottom: 1px solid var(--line-2); position: relative; min-width: 0; }
.cx-iv-review li::before { content: counter(cxq); position: absolute; left: 0; top: -.15rem; font: 400 1.3rem var(--serif); color: var(--gold-btn); }
.cx-iv-review b { display: block; font-weight: 500; }
.cx-iv-review p { margin: .3rem 0; overflow-wrap: anywhere; }
/* The walk (client area): the card on the project page */
.cx-wk-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.cx-wk-list li { display: flex; align-items: center; justify-content: space-between; gap: .8rem 1.2rem; flex-wrap: wrap; padding: .9rem 0; border-top: 1px solid var(--line-2); }
.cx-wk-list li > div { display: grid; gap: .15rem; min-width: 0; }
.cx-wk-list b { font: 400 1.2rem var(--serif); overflow-wrap: anywhere; }
.cx-wk-list small { color: var(--muted); font-size: .82rem; }
/* The walk, full screen */
.cx-walk { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #ebe8e2; color: var(--cream); overflow: hidden; }
.cx-walk::backdrop { background: #ebe8e2; }
.cx-walk-shell { display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); width: 100%; height: 100%; }
.cx-walk-top { display: flex; align-items: center; gap: .6rem 1rem; flex-wrap: wrap; padding: calc(.7rem + env(safe-area-inset-top)) 1rem .7rem; background: var(--ink-2); border-bottom: 1px solid var(--line-2); }
.cx-walk-title { min-width: 0; flex: 1 1 9rem; }
.cx-walk-title .eyebrow { margin: 0 0 .1rem; }
.cx-walk-title b { display: block; font: 400 1.25rem var(--serif); overflow-wrap: anywhere; }
.cx-walk-tools { display: flex; align-items: center; gap: .5rem .7rem; flex-wrap: wrap; }
.cx-seg { display: inline-flex; border: 1px solid var(--line-3); border-radius: 999px; overflow: hidden; flex: none; }
.cx-seg button { border: 0; background: none; padding: .55rem 1rem; font: 500 .68rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--cream-2); cursor: pointer; }
.cx-seg button[aria-pressed="true"] { background: var(--gold-btn); color: var(--on-gold); }
.cx-walk-level { display: inline-flex; align-items: center; gap: .5rem; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.cx-walk-level[hidden] { display: none; }
.cx-walk-level select { width: auto; padding: .45rem 1.9rem .45rem .7rem; font-size: .84rem; text-transform: none; letter-spacing: 0; }
.cx-walk-x { width: 40px; height: 40px; flex: none; border: 1px solid var(--line-2); border-radius: 50%; background: var(--ink-2); color: var(--cream); font-size: 1.4rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.cx-walk-x:hover { border-color: var(--gold); }
.cx-walk-body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr); min-height: 0; }
.cx-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #ebe8e2; touch-action: none; }
.cx-stage canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; }
.cx-walk-hint { position: absolute; left: 50%; top: .8rem; transform: translateX(-50%); z-index: 3; margin: 0; width: max-content; max-width: min(34rem, calc(100% - 1.6rem)); padding: .5rem .9rem; border-radius: 2px; background: rgba(255,255,255,.9); border: 1px solid var(--line-2); font-size: .82rem; line-height: 1.4; color: var(--cream-2); text-align: center; pointer-events: none; }
.cx-walk-hint[hidden] { display: none; }
.cx-walk-fail { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 2rem; text-align: center; color: var(--muted); }
.cx-pad { position: absolute; left: calc(1rem + env(safe-area-inset-left)); bottom: calc(1.2rem + env(safe-area-inset-bottom)); z-index: 3; display: grid; grid-template-columns: repeat(3, 54px); grid-template-rows: repeat(2, 54px); gap: 6px; touch-action: none; user-select: none; -webkit-user-select: none; }
.cx-pad[hidden] { display: none; }
.cx-pad button { width: 54px; height: 54px; border: 1px solid var(--line-3); border-radius: 50%; background: rgba(255,255,255,.92); color: var(--cream); cursor: pointer; display: grid; place-items: center; padding: 0; touch-action: none; -webkit-touch-callout: none; }
.cx-pad button svg { width: 24px; height: 24px; pointer-events: none; }
.cx-pad button.on, .cx-pad button:active { background: var(--gold-btn); border-color: var(--gold-btn); color: var(--on-gold); }
.cx-pad [data-go="f"] { grid-column: 2; grid-row: 1; }
.cx-pad [data-go="l"] { grid-column: 1; grid-row: 2; }
.cx-pad [data-go="b"] { grid-column: 2; grid-row: 2; }
.cx-pad [data-go="r"] { grid-column: 3; grid-row: 2; }
.cx-panel { width: min(380px, 38vw); background: var(--ink-2); border-left: 1px solid var(--line-2); display: flex; flex-direction: column; min-height: 0; }
.cx-panel[hidden] { display: none; }
.cx-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.2rem .8rem; border-bottom: 1px solid var(--line-2); flex: none; }
.cx-panel-head > div { min-width: 0; }
.cx-panel-head .eyebrow { margin: 0 0 .2rem; }
.cx-panel-head h3 { font-size: 1.5rem; overflow-wrap: anywhere; }
.cx-panel-head p.muted { margin: .2rem 0 0; }
.cx-panel-body { padding: 1rem 1.2rem calc(1.2rem + env(safe-area-inset-bottom)); overflow-y: auto; min-height: 0; flex: 1 1 auto; }
.cx-panel-body textarea { min-height: 0; }
.cx-panel-body .row { margin-top: .9rem; }
.cx-cm-list { list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid; gap: .8rem; grid-template-columns: minmax(0, 1fr); }
.cx-cm { border: 1px solid var(--line-2); border-radius: 2px; padding: .7rem .8rem; background: var(--ink-3); min-width: 0; }
.cx-cm p { margin: 0 0 .3rem; overflow-wrap: anywhere; }
.cx-cm small { color: var(--muted); font-size: .76rem; }
.cx-cm .cx-cm-st { color: var(--gold-2); }
.cx-cm.is-resolved .cx-cm-st { color: var(--ok); }
.cx-cm .stc-note { margin-top: .6rem; }
.cx-cm .stc-note p { font-size: 1rem; }
.cx-cm .link-btn { display: block; margin-top: .4rem; font-size: .8rem; }
.cx-cm-room > .link-btn { display: inline-block; margin-bottom: .5rem; text-align: left; }
.cx-rooms { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
/* Briefing por conversa (Studio) */
.cx-bc-host { margin-bottom: 1.2rem; }
.cx-bc { border-color: var(--line); }
.cx-srcs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.cx-src { border: 1px solid var(--line-2); border-radius: 2px; padding: .9rem 1rem; background: var(--ink-3); display: grid; gap: .35rem; align-content: start; min-width: 0; }
.cx-src.is-new { border-color: var(--gold-fill); background: var(--gold-soft); }
.cx-src b { font: 400 1.1rem var(--serif); }
.cx-src p { margin: 0; }
.cx-src .row { gap: .4rem; margin-top: .3rem; }
.cx-prop { margin-top: 1.3rem; border: 1px solid var(--line); border-radius: 2px; padding: 1.1rem 1.2rem; background: linear-gradient(160deg, rgba(168,133,77,.07), transparent 60%); }
.cx-prop > header { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem 1.2rem; flex-wrap: wrap; margin-bottom: .9rem; }
.cx-prop > header > div:first-child { min-width: 0; flex: 1 1 16rem; }
.cx-prop > header .eyebrow { margin: 0 0 .3rem; }
.cx-prop h4 { font-size: 1.35rem; }
.cx-lines { border-top: 1px solid var(--line-2); }
.cx-line { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) minmax(0, 1.2fr) 15.5rem; gap: .5rem 1.1rem; align-items: start; padding: .8rem 0; border-bottom: 1px solid var(--line-2); }
.cx-line-k { font: 500 .6rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); padding-top: .25rem; }
.cx-line small { display: block; font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .15rem; }
.cx-line p { margin: 0; overflow-wrap: anywhere; }
.cx-line-now p { color: var(--cream-2); }
.cx-line-now i { color: var(--muted); }
.cx-line-new b { font-weight: 500; }
.cx-line-new q { display: block; margin-top: .25rem; font: italic 400 .95rem var(--serif); color: var(--muted); overflow-wrap: anywhere; }
.cx-line-new .cx-line-add { margin: .3rem 0 0; letter-spacing: 0; text-transform: none; font-size: .76rem; color: var(--info); }
.cx-line-acts { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; max-width: 16rem; }
.cx-line-st { font: 500 .6rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ok); padding-top: .25rem; text-align: right; flex: 1 1 auto; }
.cx-line.is-rejected .cx-line-st { color: var(--muted); }
.cx-line.is-rejected .cx-line-new { opacity: .5; }
.cx-unans { margin-top: 1rem; padding: .9rem 1rem; border-left: 2px solid var(--warn); background: var(--ink-3); }
.cx-unans h5, .cx-h5, .cx-wc-room h5 { font: 500 .62rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 0 0 .5rem; }
.cx-unans ul { margin: 0 0 .7rem; padding-left: 1.1rem; }
.cx-unans li { margin: .2rem 0; overflow-wrap: anywhere; }
.cx-said, .cx-more, .cx-wc-done { margin-top: 1rem; border-top: 1px solid var(--line-2); }
.cx-said summary, .cx-more summary, .cx-wc-done summary { cursor: pointer; padding: .7rem 0; color: var(--gold-2); font-size: .85rem; }
.cx-said p { margin: 0 0 .6rem; max-height: 16rem; overflow-y: auto; padding: .7rem .9rem; background: var(--ink-3); font-size: .9rem; line-height: 1.6; overflow-wrap: anywhere; }
.cx-more form { margin-bottom: 1rem; }
.cx-more textarea { min-height: 0; }
.cx-past { list-style: none; margin: 0; padding: 0; }
.cx-past li { display: flex; justify-content: space-between; gap: .4rem 1rem; flex-wrap: wrap; padding: .5rem 0; border-top: 1px solid var(--line-2); }
.cx-pick { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: minmax(0, 1fr); }
.cx-pick label { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem .7rem; border: 1px solid var(--line-2); border-radius: 2px; cursor: pointer; text-transform: none; letter-spacing: 0; font-size: .92rem; color: var(--cream); }
.cx-pick input { width: 18px; height: 18px; margin-top: .15rem; flex: none; accent-color: var(--gold-btn); }
.cx-pick label > span { min-width: 0; overflow-wrap: anywhere; display: block; }
.cx-pick small { display: block; margin-top: .2rem; color: var(--muted); font-size: .76rem; }
.cx-pick audio, .cx-wc-text audio { display: block; width: 100%; max-width: 320px; height: 36px; margin-top: .4rem; }
.cx-conv { border: 0; margin: 0 0 1rem; padding: 0; min-width: 0; }
.cx-conv legend { padding: 0; font-weight: 500; margin-bottom: .3rem; }
.cx-conv legend label { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; }
.cx-conv legend input { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--gold-btn); }
.cx-radio { display: grid; gap: .5rem; margin-top: .3rem; }
.cx-radio label { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem .7rem; border: 1px solid var(--line-2); border-radius: 2px; cursor: pointer; }
.cx-radio input { width: 18px; height: 18px; margin-top: .2rem; accent-color: var(--gold-btn); flex: none; }
.cx-radio b { display: block; font-weight: 500; font-size: .92rem; color: var(--cream); }
.cx-radio small { display: block; color: var(--muted); font-size: .8rem; }
/* Cliente caminhando no projeto (Studio) */
.cx-wc { margin-top: 1.6rem; scroll-margin-top: 5rem; }
.cx-wc-opts { list-style: none; margin: 0; padding: 0; }
.cx-wc-opts li { display: flex; justify-content: space-between; align-items: center; gap: .6rem 1.2rem; flex-wrap: wrap; padding: .75rem 0; border-top: 1px solid var(--line-2); }
.cx-wc-opts li:first-child { border-top: 0; }
.cx-wc-opts li > div { display: grid; gap: .1rem; min-width: 0; }
.cx-wc-opts b { font-weight: 500; overflow-wrap: anywhere; }
.cx-wc-opts small { color: var(--muted); font-size: .8rem; }
.cx-switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-size: .84rem; color: var(--cream-2); }
.cx-switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 999px; border: 1px solid var(--line-3); background: var(--ink-4); position: relative; cursor: pointer; flex: none; transition: background .2s; margin: 0; padding: 0; }
.cx-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgba(20,20,20,.25); transition: transform .2s var(--ease); }
.cx-switch input:checked { background: var(--gold-btn); border-color: var(--gold-btn); }
.cx-switch input:checked::after { transform: translateX(18px); }
.cx-switch input:checked + span { color: var(--gold-2); }
.cx-wc-walk { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.cx-wc-walk > header { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.cx-wc-walk > header > div { min-width: 0; }
.cx-wc-walk h4 { font-size: 1.3rem; overflow-wrap: anywhere; }
.cx-wc-walk > header p { margin: .2rem 0 0; }
.cx-wc-room { margin-top: 1rem; }
.cx-wc-room h5 small { margin-left: .6rem; letter-spacing: .04em; text-transform: none; font-size: .78rem; color: var(--muted); font-weight: 400; }
.cx-wc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; grid-template-columns: minmax(0, 1fr); }
.cx-wc-cm { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem 1.2rem; align-items: start; border: 1px solid var(--line-2); border-left: 2px solid var(--gold-fill); border-radius: 2px; padding: .8rem .9rem; }
.cx-wc-cm.is-reviewing { border-left-color: var(--info); }
.cx-wc-cm.is-resolved { border-left-color: var(--ok); }
.cx-wc-text { min-width: 0; }
.cx-wc-text p { margin: 0 0 .3rem; overflow-wrap: anywhere; }
.cx-wc-reply { margin: .6rem 0 0; padding: .5rem .8rem; border-left: 2px solid var(--line-3); background: var(--ink-3); }
.cx-wc-reply small { display: block; font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.cx-wc-reply p { margin: 0; }
.cx-wc-text .cx-wc-task { margin: .5rem 0 0; font-size: .85rem; }
.cx-wc-task a { color: var(--gold-2); }
.cx-wc-acts { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; max-width: 15rem; }
.cx-wc-acts select { width: auto; padding: .45rem 1.9rem .45rem .7rem; font-size: .82rem; }
.cx-digest { margin: 0 0 1.2rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 2px; background: linear-gradient(160deg, rgba(168,133,77,.07), transparent 60%); }
.cx-digest .eyebrow { margin: 0 0 .3rem; }
.cx-digest h5 { font: 400 1.3rem var(--serif); margin: 0 0 .3rem; }
.cx-digest textarea { font-size: .95rem; line-height: 1.6; }
.cx-digest .row { margin-top: .8rem; }
@media (max-width: 900px) {
  .cx-srcs { grid-template-columns: minmax(0, 1fr); }
  .cx-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cx-line-k { grid-column: 1 / -1; padding-top: 0; }
  .cx-line-acts { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
  .cx-line-st { text-align: left; padding-top: 0; }
  .cx-wc-cm { grid-template-columns: minmax(0, 1fr); }
  .cx-wc-acts { justify-content: flex-start; max-width: none; }
}
/* Phones upright: the room's panel sits under the 3D (which keeps the house in view), the tools under the title. */
@media (max-width: 760px) and (orientation: portrait), (max-width: 560px) {
  .cx-walk-top { padding: calc(.5rem + env(safe-area-inset-top)) .7rem .5rem; gap: .4rem .6rem; }
  .cx-walk-title { order: 1; }
  .cx-walk-x { order: 2; }
  .cx-walk-tools { order: 3; width: 100%; }
  .cx-walk-title .eyebrow { display: none; }
  .cx-walk-level span { display: none; }
  .cx-walk-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .cx-panel { width: auto; max-height: 56dvh; border-left: 0; border-top: 1px solid var(--line); box-shadow: 0 -8px 30px rgba(20,20,20,.1); }
  .cx-walk.has-panel .cx-pad { grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(2, 46px); bottom: .6rem; }
  .cx-walk.has-panel .cx-pad button { width: 46px; height: 46px; }
  .cx-walk-hint { font-size: .76rem; }
  .cx-line { grid-template-columns: minmax(0, 1fr); }
  .cx-prop { padding: .9rem; }
  .cx-prop > header .row { width: 100%; }
  .cx-prop > header .row .btn, .cx-iv-nav .btn { flex: 1 1 auto; }
  .cx-iv .cx-iv-q { font-size: 1.5rem; }
  .cx-wk-list .btn { width: 100%; }
}
/* Phones on their side: one slim bar, the panel beside the 3D. */
@media (max-height: 520px) and (orientation: landscape) {
  .cx-walk-top { padding: .35rem calc(.7rem + env(safe-area-inset-right)) .35rem calc(.7rem + env(safe-area-inset-left)); flex-wrap: nowrap; }
  .cx-walk-title .eyebrow { display: none; }
  .cx-walk-title b { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cx-walk-tools { flex-wrap: nowrap; flex: none; }
  .cx-seg button { padding: .45rem .7rem; }
  .cx-walk-level span { display: none; }
  .cx-walk-x { width: 34px; height: 34px; }
  .cx-panel { width: min(320px, 44vw); }
  .cx-panel-head { padding: .6rem .9rem .5rem; }
  .cx-panel-head h3 { font-size: 1.2rem; }
  .cx-panel-body { padding: .7rem .9rem; }
  .cx-pad { grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(2, 46px); bottom: calc(.6rem + env(safe-area-inset-bottom)); }
  .cx-pad button { width: 46px; height: 46px; }
  .cx-walk-hint { top: .4rem; font-size: .74rem; padding: .35rem .7rem; }
}
.vc-report { margin-bottom: 1rem; }
.fw-rv form > p.muted { margin-top: 1.1rem; }

/* ---- Aditivos, notas e contabilidade (.ad-): contract addenda on the project page and in the client area, the
   service invoices register, the assistant in Financeiro and the accountant's package ---- */
.ad-alerts { display: grid; gap: .8rem; margin: 0 0 1.4rem; }
.ad-alert { display: flex; justify-content: space-between; align-items: center; gap: 1rem 1.6rem; flex-wrap: wrap; padding: 1.1rem 1.3rem; border: 1px solid var(--line); border-left: 3px solid var(--gold-fill); background: var(--gold-soft); border-radius: 2px; }
.ad-alert-tx { flex: 1 1 320px; min-width: 0; }
.ad-alert-tx p { margin: 0 0 .35rem; overflow-wrap: anywhere; }
.ad-alert-tx .eyebrow { margin-bottom: .4rem; }
.ad-alert .row { flex: none; }
.ad-words { margin: .5rem 0; padding: .5rem .8rem; border-left: 2px solid var(--line-3); background: var(--ink-2); font: italic 400 1.05rem/1.45 var(--serif); color: var(--cream-2); overflow-wrap: anywhere; }
.ad-words span { font: 500 .58rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-style: normal; display: block; margin-bottom: .2rem; }
.ad-card { margin-top: 1.6rem; }
.ad-trgs { border: 1px solid var(--line); background: var(--gold-soft); padding: .9rem 1rem; margin: 0 0 1.1rem; border-radius: 2px; display: grid; gap: .5rem; }
.ad-trgs .eyebrow { margin: 0 0 .2rem; }
.ad-trg { display: flex; justify-content: space-between; align-items: center; gap: .6rem 1rem; flex-wrap: wrap; padding-top: .5rem; border-top: 1px solid var(--line-2); }
.ad-trg > span:first-child { flex: 1 1 280px; min-width: 0; overflow-wrap: anywhere; }
.ad-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.ad-item { border: 1px solid var(--line-2); border-radius: 2px; padding: 1rem 1.1rem; background: var(--ink-2); min-width: 0; }
.ad-item.is-signed { border-color: rgba(46,107,62,.35); }
.ad-item.is-adjust, .ad-item.is-declined { border-color: rgba(150,80,10,.4); }
.ad-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.ad-item-head > div { display: grid; min-width: 0; }
.ad-item-head b { font: 400 1.25rem/1.2 var(--serif); overflow-wrap: anywhere; }
.ad-item-head small { color: var(--muted); letter-spacing: .06em; }
.ad-st { flex: none; font: 500 .58rem var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: .32rem .6rem; border-radius: 999px; border: 1px solid currentColor; color: var(--muted); white-space: nowrap; }
.ad-st.is-sent { color: var(--info); } .ad-st.is-signed { color: var(--ok); } .ad-st.is-adjust, .ad-st.is-declined { color: var(--warn); } .ad-st.is-draft { color: var(--gold); }
.ad-line { margin: .35rem 0 .6rem; color: var(--cream-2); }
.ad-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem 1rem; margin: 0 0 .8rem; }
.ad-facts dt { font: 500 .56rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.ad-facts dd { margin: .15rem 0 0; font: 400 1.08rem/1.3 var(--serif); overflow-wrap: anywhere; }
.ad-eff { color: var(--ok); margin: 0 0 .7rem; }
.ad-item code, .ad-viewer code { font-size: .8em; overflow-wrap: anywhere; }
.ad-acts { margin-top: .4rem; }
.ad-legal { margin: 1rem 0 0; }
/* The editor (a sheet: the title and the actions stay, the fields scroll) */
.ad-editor .pw-sheet-body { gap: 1.1rem; }
.ad-why, .ad-clause, .ad-draft { border: 1px solid var(--line-2); background: var(--ink-3); padding: .9rem 1rem; border-radius: 2px; min-width: 0; }
.ad-why p, .ad-clause p { margin: 0 0 .3rem; overflow-wrap: anywhere; }
.ad-clause blockquote { margin: .4rem 0; font: italic 400 1.02rem/1.5 var(--serif); color: var(--cream-2); overflow-wrap: anywhere; }
.ad-ai .row { align-items: center; }
.ad-ai .row .small { flex: 1 1 240px; }
.ad-draft { border-color: var(--line); background: var(--gold-soft); margin-top: .8rem; }
.ad-draft-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ad-draft h6 { font: 500 .58rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: .7rem 0 .25rem; }
.ad-draft .doc-md { box-shadow: none; padding: 0; background: none; }
.ad-draft .doc-md ul { margin: 0; padding-left: 1.1rem; }
.ad-draft p { margin: 0 0 .5rem; overflow-wrap: anywhere; }
.ad-demo { display: inline-block; font: 500 .56rem var(--sans); letter-spacing: .16em; text-transform: uppercase; padding: .28rem .6rem; border: 1px dashed var(--line-3); border-radius: 999px; color: var(--cream-2); background: var(--ink-2); }
.ad-set { border: 1px solid var(--line-2); border-radius: 2px; padding: .9rem 1rem 1rem; margin: 0; min-width: 0; }
.ad-set legend { font: 500 .6rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); padding: 0 .4rem; }
.ad-set .form-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.ad-set > .small, .ad-set > div > .small { margin: .7rem 0 0; }
.ad-sug { display: flex; justify-content: space-between; align-items: center; gap: .7rem; margin-top: .7rem; padding: .55rem .7rem; border: 1px dashed var(--line); border-radius: 2px; }
.ad-sug > span { min-width: 0; overflow-wrap: anywhere; font-size: .9rem; }
.ad-total { color: var(--cream-2); }
.ad-preview { border: 1px solid var(--line-2); border-radius: 2px; padding: .7rem 1rem; min-width: 0; }
.ad-preview summary { cursor: pointer; font: 500 .62rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.ad-doc { margin-top: .8rem; padding: clamp(.8rem, 3vw, 1.6rem); background: var(--ink-3); box-shadow: none; overflow-wrap: anywhere; }
.ad-doc h2 { font-size: 1.5rem; } .ad-doc h3 { font-size: 1.1rem; margin-top: 1.1rem; }
.ad-missing ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.ad-editor footer [disabled] { opacity: .45; cursor: not-allowed; }
/* Client area */
.pq.ad-c { grid-template-columns: minmax(0, 1fr); }
.ad-c .pq-facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
/* Financeiro: service invoices, the assistant, the accountant */
.ad-manual { margin-top: 0; }
.ad-manual-note { color: var(--warn); }
.ad-nfs { display: grid; }
.ad-nf { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .5rem 1rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--line-2); }
.ad-nf:last-child { border-bottom: 0; }
.ad-nf-main { display: grid; min-width: 0; }
.ad-nf-main small { color: var(--muted); overflow-wrap: anywhere; }
.ad-nf-amt { font: 400 1.2rem var(--serif); white-space: nowrap; }
.ad-nf-acts { grid-column: 1 / -1; gap: .5rem; }
.ad-nf-acts label.btn-mini { cursor: pointer; }
.ad-nf-set summary { cursor: pointer; font: 400 1.2rem var(--serif); }
.ad-nf-set form { margin-top: .9rem; }
.ad-remind { align-self: end; }
.ad-as-lead { max-width: 76ch; }
.ad-sugs { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; }
.ad-sugs li { display: grid; grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1fr); gap: .5rem .9rem; align-items: center; padding: .65rem 0; border-bottom: 1px solid var(--line-2); }
.ad-sug-main, .ad-sug-to { display: grid; min-width: 0; }
.ad-sug-main small, .ad-sug-to small { color: var(--muted); overflow-wrap: anywhere; }
.ad-sug-main b, .ad-sug-to b { overflow-wrap: anywhere; font-weight: 500; }
.ad-sug-to { padding-left: .9rem; border-left: 2px solid var(--line); }
.ad-sugs select { min-width: 0; width: 100%; }
.ad-assist .ad-demo, .ad-acc .ad-demo { margin-bottom: .8rem; }
.ad-sum { font: 400 1.25rem/1.5 var(--serif); max-width: 74ch; }
.ad-points { margin: 0 0 1rem; padding-left: 1.1rem; max-width: 76ch; }
.ad-points li { margin-bottom: .35rem; }
.ad-assist input[type=month], .ad-acc input[type=month] { width: auto; min-width: 10.5rem; }
.ad-checks { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; }
.ad-checks > li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .8rem; align-items: start; padding: .75rem 0; border-bottom: 1px solid var(--line-2); }
.ad-checks > li:last-child { border-bottom: 0; }
.ad-chk { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid currentColor; font: 600 .78rem var(--sans); color: var(--ok); }
.ad-checks > li.todo .ad-chk { color: var(--warn); }
.ad-checks ul { margin: .3rem 0 0; padding-left: 1.1rem; color: var(--cream-2); font-size: .9rem; }
.ad-checks ul li { overflow-wrap: anywhere; }
.ad-files { list-style: none; margin: 0 0 .9rem; padding: 0; display: grid; }
.ad-files li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line-2); }
.ad-files li > span { display: grid; min-width: 0; }
.ad-files small { color: var(--muted); }
@media (max-width: 640px) {
  .ad-alert { padding: .9rem 1rem; }
  .ad-alert .row, .ad-alert .row .btn { width: 100%; }
  .ad-item-head { flex-wrap: wrap; }
  .ad-sug { flex-wrap: wrap; }
  .ad-nf { grid-template-columns: minmax(0, 1fr) auto; }
  .ad-nf .badge { grid-column: 1 / -1; justify-self: start; }
  .ad-sugs li { grid-template-columns: auto minmax(0, 1fr); }
  .ad-sugs li > select, .ad-sugs li > .ad-sug-to { grid-column: 2; }
  .ad-checks > li { grid-template-columns: auto minmax(0, 1fr); }
  .ad-checks > li > .btn-mini { grid-column: 2; justify-self: start; }
  .ad-editor footer .btn { flex: 1 1 auto; }
}

/* ---- Legislação pelo endereço (public/admin/project/zoning.js, public/admin/zoning-settings.js) ---- */
.zn-host { margin-top: 1.2rem; }
.zn-host > .zn-two { margin-top: 1.2rem; margin-bottom: 0; }
.zn-card { min-width: 0; }
.zn-state { border-left: 2px solid var(--gold-fill); padding: .1rem 0 .1rem .9rem; margin: 0 0 1.1rem; }
.zn-state p { margin: 0; }
.zn-state p + p { margin-top: .2rem; }
.zn-edited { color: var(--warn); }
.zn-find { display: grid; gap: .7rem; grid-template-columns: minmax(0, 1fr); }
.zn-find > p { margin: 0; }
.zn-search, .zn-manual, .zn-opts, .zn-explain-ask { display: flex; gap: .8rem 1rem; align-items: flex-end; flex-wrap: wrap; }
.zn-search label.f { flex: 1 1 18rem; margin: 0; min-width: 0; }
.zn-manual label.f, .zn-opts label.f { flex: 1 1 12rem; margin: 0; min-width: 0; }
.zn-explain-ask label.f { flex: 0 1 12rem; margin: 0; min-width: 0; }
.zn-search .btn, .zn-manual .btn, .zn-explain-ask .btn, .zn-proposal .btn { white-space: normal; }
.zn-manual { padding-top: .9rem; border-top: 1px solid var(--line-2); }
.zn-result { border: 1px solid var(--line-2); background: var(--ink-3); padding: .8rem 1rem; border-radius: 2px; display: grid; gap: .5rem; grid-template-columns: minmax(0, 1fr); }
.zn-result p { margin: 0; overflow-wrap: anywhere; }
.zn-result.ok { border-color: rgba(46,107,62,.45); }
.zn-result.warn { border-color: rgba(150,80,10,.45); }
.zn-found { display: flex; gap: .9rem; align-items: center; }
.zn-found > div { min-width: 0; }
.zn-lot { width: 56px; height: 56px; flex: none; }
.zn-lot polygon { fill: var(--gold-soft); stroke: var(--gold); stroke-width: 1.5; }
.zn-picks { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.zn-picks li { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.zn-picks li > span { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.zn-proposal { margin-top: 1.2rem; border: 1px solid var(--line); background: var(--ink-3); padding: 1.1rem 1.2rem; border-radius: 2px; display: grid; gap: .8rem; grid-template-columns: minmax(0, 1fr); }
.zn-proposal > header h4 { margin: 0; font: 400 1.3rem var(--serif); }
.zn-proposal > header h4 small { font: 400 .8rem var(--sans); color: var(--muted); margin-left: .4rem; }
.zn-proposal > header .eyebrow { margin: 0 0 .3rem; }
.zn-proposal p { margin: 0; }
.zn-proposal > header p.muted { margin-top: .3rem; }
.zn-proposal > footer { align-items: center; }
.zn-source { font-size: .88rem; overflow-wrap: anywhere; }
.zn-table-wrap { overflow-x: auto; margin: 0 -2px; }
.zn-table { width: 100%; border-collapse: collapse; }
.zn-table th, .zn-table td { padding: .5rem .45rem; border-top: 1px solid var(--line-2); border-bottom: 0; vertical-align: top; text-align: left; font-size: .88rem; white-space: normal; }
.zn-table thead th { border-top: 0; font: 500 .58rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.zn-table tbody th { font: 500 .88rem var(--sans); letter-spacing: 0; text-transform: none; color: var(--cream); }
.zn-table tbody tr { cursor: default; animation: none; }
.zn-table tbody tr:hover td { background: none; }
.zn-table small { display: block; font-size: .78rem; color: var(--muted); margin-top: .15rem; overflow-wrap: anywhere; }
.zn-rows { min-width: 560px; }
.zn-rows td:first-child { width: 1.6rem; }
.zn-rows tbody th { width: 28%; }
.zn-rows td:nth-child(3) { width: 24%; }
.zn-rows input[type=checkbox] { width: auto; margin: .15rem 0 0; }
.zn-rows tr.is-same td, .zn-rows tr.is-same th { color: var(--muted); }
.zn-same { color: var(--muted); }
.zn-miss { color: var(--warn); font-weight: 500; }
.zn-long summary { cursor: pointer; }
.zn-long p { margin: .4rem 0 0; font-size: .82rem; color: var(--cream-2); overflow-wrap: anywhere; }
.zn-check tbody th .zn-st { margin: .3rem 0 0; }
.zn-check tbody th > span:first-child { display: block; }
.zn-check td { width: 30%; }
.zn-st { display: inline-block; font: 500 .56rem var(--sans); letter-spacing: .13em; text-transform: uppercase; padding: .3rem .55rem; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; color: var(--muted); }
.zn-st.is-ok { color: var(--ok); }
.zn-st.is-over { color: var(--bad); }
.zn-st.is-no_data { color: var(--warn); }
.zn-check tr.is-over th { color: var(--bad); }
.zn-study { border-top: 1px solid var(--line-2); padding: .7rem 0; }
.zn-study:first-of-type { border-top: 0; padding-top: 0; }
.zn-study > summary, .zn-vcheck > summary { cursor: pointer; display: flex; align-items: center; gap: .5rem .6rem; flex-wrap: wrap; }
.zn-study > summary b, .zn-vcheck > summary b { margin-right: .3rem; }
.zn-study[open] > summary, .zn-vcheck[open] > summary { margin-bottom: .6rem; }
.zn-vcheck { border: 1px solid var(--line-2); padding: .7rem .9rem; margin: 0 0 1rem; border-radius: 2px; }
.zn-vcheck p { margin: .6rem 0 0; }
.zn-foot, .zn-src { margin: .6rem 0 0; }
.zn-cap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.2rem; margin: 0 0 .9rem; }
.zn-cap dt { font: 500 .58rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.zn-cap dd { margin: .2rem 0 0; font: 400 1.25rem var(--serif); color: var(--cream); }
.zn-cap dd small { display: block; font: 400 .78rem var(--sans); color: var(--muted); margin-top: .1rem; }
.zn-cap dd .muted { font: 400 .9rem var(--sans); }
.zn-missing { color: var(--warn); }
.zn-explain-ask { margin-top: .9rem; }
.zn-explain { margin-top: 1rem; border: 1px solid var(--line-2); padding: .9rem 1rem; border-radius: 2px; background: var(--ink-3); }
.zn-explain.is-draft { border-color: var(--line); }
.zn-explain p { margin: 0 0 .7rem; }
.zn-explain footer { align-items: center; }
.zn-mark { font: 500 .58rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.zn-mark em { font-style: normal; color: var(--warn); margin-left: .5rem; }
.zn-cfg-service { display: grid; gap: .5rem; padding: .2rem 0 .6rem; }
.zn-cfg-service p { margin: 0; }
.zn-city { border-top: 1px solid var(--line-2); padding: .8rem 0 .2rem; min-width: 0; }
.zn-city > summary { cursor: pointer; display: flex; gap: .4rem 1rem; align-items: baseline; flex-wrap: wrap; }
.zn-city[open] > summary { margin-bottom: .7rem; }
.zn-cfg-src { display: grid; gap: .35rem; margin-bottom: .7rem; }
.zn-cfg-src p { margin: 0; }
.zn-cfg-table { min-width: 940px; }
.zn-cfg-table td, .zn-cfg-table th { white-space: nowrap; font-size: .82rem; padding: .4rem .45rem; }
.zn-cfg-table tbody th { font-size: .82rem; }
.zn-cfg-table tbody th small { white-space: normal; min-width: 10rem; max-width: 15rem; }
.zn-src-cell small { white-space: normal; min-width: 7rem; max-width: 14rem; }
.zn-cfg-table tr.is-edited th b, .zn-cfg-table tr.is-custom th b { color: var(--gold-2); }
.zn-table small.zn-flag { color: var(--warn); }
.zn-acts { text-align: right; }
.zn-cfg-table thead th { white-space: normal; vertical-align: bottom; }
/* The proposal in a narrow column (a phone): each line is a block, today beside proposed, nothing scrolls sideways. */
.zn-proposal { container-type: inline-size; }
.zn-rows td[data-l]::before { content: none; }
@container (max-width: 600px) {
  .zn-rows { min-width: 0; display: block; }
  .zn-rows thead { display: none; }
  .zn-rows tbody { display: block; }
  .zn-rows tbody tr { display: grid; grid-template-columns: 1.7rem minmax(0, 1fr) minmax(0, 1fr); gap: .1rem .5rem; padding: .55rem 0; border-top: 1px solid var(--line-2); }
  .zn-rows tbody th, .zn-rows tbody td { border-top: 0; padding: 0; width: auto; overflow-wrap: anywhere; }
  .zn-rows tbody td:first-child { grid-column: 1; grid-row: 1; width: auto; }
  .zn-rows tbody th { grid-column: 2 / -1; grid-row: 1; }
  .zn-rows tbody td:nth-child(3) { grid-column: 2; grid-row: 2; width: auto; }
  .zn-rows tbody td:nth-child(4) { grid-column: 3; grid-row: 2; }
  .zn-rows td[data-l]::before { content: attr(data-l); display: block; font: 500 .54rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .1rem; }
}
@media (max-width: 860px) {
  .zn-cap { grid-template-columns: minmax(0, 1fr); }
  .zn-search .btn, .zn-manual .btn, .zn-explain-ask .btn { flex: 1 1 100%; }
  .zn-proposal { padding: .9rem .8rem; }
}

/* ---- Ligação com os programas de desenho: DXF and IFC out, a DXF under the plan (public/app/cad.js) ---- */
.cad-dlg { overflow: hidden; }
.cad-shell { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); min-width: 0; }
.cad-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.4rem 1.6rem .8rem; flex: none; }
.cad-head > div { min-width: 0; }
.cad-head h2 { margin: 0; }
.cad-head .eyebrow { margin-bottom: .3rem; overflow-wrap: anywhere; }
.cad-tabs { display: flex; padding: 0 1.6rem; border-bottom: 1px solid var(--line-2); flex: none; }
.cad-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: .7rem 1rem .65rem; margin-bottom: -1px; cursor: pointer; font: 500 .66rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cad-tabs button[aria-selected="true"] { color: var(--cream); border-bottom-color: var(--gold-fill); }
.cad-body { overflow-y: auto; min-height: 0; padding: 1.2rem 1.6rem 1.6rem; }
.cad-lead { max-width: 78ch; margin: 0 0 .8rem; }
.cad-sum { color: var(--muted); font-size: .86rem; margin: 0 0 1rem; }
.cad-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.cad-card { border: 1px solid var(--line-2); border-radius: 2px; padding: 1.1rem 1.2rem; display: grid; gap: .7rem; align-content: start; grid-template-columns: minmax(0, 1fr); }
.cad-card h3 { margin: 0; }
.cad-card p { margin: 0; font-size: .88rem; color: var(--cream-2); }
.cad-wide { grid-column: 1 / -1; }
.cad-issue { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: .8rem; align-items: end; }
.cad-know { margin-top: 1rem; font-size: .86rem; }
.cad-know summary { cursor: pointer; color: var(--gold-2); }
.cad-know ul { margin: .6rem 0 0; padding-left: 1.1rem; display: grid; gap: .3rem; color: var(--cream-2); }
.cad-hint { color: var(--muted); font-size: .86rem; margin: 0; }
.cad-warn, .cad-ask { color: var(--warn); }
.cad-warn { font-size: .86rem; margin: 0; }
.cad-bad { color: var(--bad); }
.cad-up { align-items: center; margin-bottom: 1rem; }
.cad-file { cursor: pointer; }
.cad-list { list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid; gap: .4rem; grid-template-columns: minmax(0, 1fr); }
.cad-list li { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--line-2); border-radius: 2px; padding: .25rem .7rem .25rem .2rem; }
.cad-list li.on { border-color: var(--line); background: var(--gold-soft); }
.cad-pickbtn { flex: 1 1 0; min-width: 0; text-align: left; background: none; border: 0; padding: .45rem .6rem; cursor: pointer; display: grid; gap: .1rem; grid-template-columns: minmax(0, 1fr); }
.cad-pickbtn b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.cad-pickbtn small { color: var(--muted); }
.cad-detail { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.cad-stage { border: 1px solid var(--line-2); background: #ffffff; min-height: 140px; display: grid; place-items: center; line-height: 0; }
.cad-stage.picking { cursor: crosshair; outline: 2px solid var(--gold-fill); outline-offset: -1px; }
.cad-pic { position: relative; display: inline-block; max-width: 100%; }
.cad-pic img { display: block; max-width: 100%; max-height: 60vh; width: auto; height: auto; user-select: none; -webkit-user-drag: none; }
.cad-marks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cad-marks circle { fill: var(--gold-fill); stroke: #ffffff; stroke-width: 6; }
.cad-marks line { stroke: var(--gold-fill); }
.cad-wait { line-height: 1.4; color: var(--muted); margin: 0; }
.cad-pickhint { margin: .5rem 0 0; font-size: .88rem; color: var(--gold-2); }
.cad-opts { display: grid; gap: .95rem; grid-template-columns: minmax(0, 1fr); }
.cad-opts p { margin: 0; }
.cad-facts { font-size: .86rem; }
.cad-h, .cad-v-h { margin: 0 0 .4rem !important; font: 500 .66rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); }
.cad-h small { letter-spacing: 0; text-transform: none; color: var(--muted); font-size: .78rem; margin-left: .4rem; }
.cad-scale-row { display: flex; gap: .7rem; align-items: end; flex-wrap: wrap; margin-top: .5rem; }
.cad-scale-row .f { flex: 1 1 170px; min-width: 0; }
.cad-size { margin-top: .5rem !important; font-size: .9rem; }
.cad-layers ul { list-style: none; margin: 0; padding: 0; max-height: 216px; overflow-y: auto; border: 1px solid var(--line-2); border-radius: 2px; }
.cad-layers li + li { border-top: 1px solid var(--line-2); }
.cad-layers label { display: flex; align-items: center; gap: .55rem; padding: .42rem .6rem; cursor: pointer; font-size: .84rem; }
.cad-layers label:hover { background: rgba(20,20,20,.03); }
.cad-layers input, .cad-room-on input { width: auto; min-height: 0; flex: none; margin: 0; accent-color: var(--gold-btn); }
.cad-layers i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.cad-layers span { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.cad-layers small { color: var(--muted); }
.cad-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.cad-actions .btn { white-space: normal; text-align: center; }
.cad-draft { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 1.1rem; display: grid; gap: .7rem; grid-template-columns: minmax(0, 1fr); }
.cad-draft p { margin: 0; }
.cad-draft-head { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.cad-draft-head h3 { margin: 0; }
.cad-draft-head .badge { color: var(--gold-2); }
.cad-rooms { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: minmax(0, 1fr); }
.cad-rooms li { display: grid; grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1fr); gap: .35rem .8rem; align-items: end; border: 1px solid var(--line-2); border-radius: 2px; padding: .7rem .8rem; }
.cad-rooms li.blocked { background: var(--ink-3); }
.cad-room-on { display: flex; align-items: center; gap: .45rem; align-self: center; cursor: pointer; }
.cad-room-meta { grid-column: 2 / -1; font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.cad-room-meta b { color: var(--cream); font-weight: 500; }
.cad-notes { margin: 0; padding-left: 1.1rem; font-size: .84rem; color: var(--cream-2); display: grid; gap: .2rem; }
.cad-draft .btn { white-space: normal; }
.ds-menu-list .cad-menu-more { border-top: 1px solid var(--line-2); border-radius: 0; }
.ds-menu-list [data-cad] { white-space: normal; max-width: min(340px, calc(100vw - 40px)); }
.cad-v { border-top: 1px solid var(--line-2); margin-top: 1.1rem; padding-top: 1rem; display: grid; gap: .6rem; grid-template-columns: minmax(0, 1fr); }
.cad-v p { margin: 0; }
.cad-v-issue { align-items: center; }
.cad-v-issue select { width: auto; max-width: 100%; flex: 0 1 auto; }
.cad-ask-dlg { width: min(420px, calc(100% - 32px)); }
@media (max-width: 760px) {
  .cad-cards, .cad-detail, .cad-issue { grid-template-columns: minmax(0, 1fr); }
  .cad-head { padding: 1.1rem 1.1rem .6rem; }
  .cad-head h2 { font-size: 1.45rem; }
  .cad-tabs { padding: 0 .5rem; }
  .cad-tabs button { padding: .7rem .6rem .65rem; letter-spacing: .1em; }
  .cad-body { padding: 1rem 1.1rem 1.2rem; }
  .cad-rooms li { grid-template-columns: auto minmax(0, 1fr); }
  .cad-rooms li .f { grid-column: 2; }
  .cad-pic img { max-height: 46vh; }
  .cad-actions .btn, .cad-issue .btn { flex: 1 1 100%; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .cad-dlg { width: calc(100% - 16px); max-height: calc(100dvh - 12px); }
  .cad-shell { max-height: calc(100dvh - 14px); }
  .cad-head { padding: .6rem 1.1rem .3rem; padding-left: max(1.1rem, env(safe-area-inset-left)); padding-right: max(1.1rem, env(safe-area-inset-right)); }
  .cad-head .eyebrow { display: none; }
  .cad-head h2 { font-size: 1.25rem; }
  .cad-tabs button { padding: .4rem .8rem .35rem; }
  .cad-body { padding: .8rem 1.1rem 1rem; }
  .cad-pic img { max-height: 64vh; }
}
.ad-card .card-head { flex-wrap: nowrap; align-items: flex-start; }
.ad-card .card-head > div { min-width: 0; max-width: 78ch; }
.ad-card .card-head > .btn-mini { flex: none; white-space: nowrap; }
.ad-card a.btn-mini, .ad-fiscal a.btn-mini, .ad-acc a.btn-mini { text-decoration: none; display: inline-block; }
.ad-draft-md ul { margin: 0; padding-left: 1.1rem; }
.ad-draft-md li { margin-bottom: .25rem; overflow-wrap: anywhere; }
@media (max-width: 640px) { .ad-card .card-head { flex-wrap: wrap; } }
.vc-report-row { gap: .8rem 1.2rem; }
.vc-report-row .fw-inline input { width: auto; padding-top: .55rem; padding-bottom: .55rem; }
