/* MARLOSS portal — studio (dark navy) and client (light) themes, one component set */
@font-face { font-family: "Futura"; src: url(/assets/fonts/futura-book.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Futura"; src: url(/assets/fonts/futura-book-italic.ttf) format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Futura"; src: url(/assets/fonts/futura-medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Futura"; src: url(/assets/fonts/futura-bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --slate: #405f74; --navy: #133145; --gold: #f3d97a; --gold-ink: #6b5410;
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --pill: 999px;
  --ease: cubic-bezier(.2, .8, .2, 1); --fast: 140ms; --med: 220ms;
  --font: "Futura", "Futura PT", "Century Gothic", system-ui, sans-serif;
}
/* studio: deep navy */
.studio-theme {
  --bg: #0d2433; --surface: #133145; --surface-2: #183a51; --surface-3: #1e4560; --line: rgba(255,255,255,.1); --line-2: rgba(255,255,255,.2);
  --text: #fff; --text-2: rgba(255,255,255,.8); --text-3: rgba(255,255,255,.58); --accent: var(--gold); --accent-ink: #132a38;
  --ok: #8fd6ae; --warn: #f3c08a; --bad: #f6a597; --info: #9cc8e3; --field: rgba(255,255,255,.05); --shadow: 0 16px 40px rgba(0,0,0,.35);
  color-scheme: dark;
}
/* client: calm light */
.client-theme {
  --bg: #f3f5f6; --surface: #ffffff; --surface-2: #f6f8f9; --surface-3: #edf1f3; --line: #dfe5e8; --line-2: #c9d3d9;
  --text: #16212a; --text-2: #3e4d57; --text-3: #66757f; --accent: var(--slate); --accent-ink: #fff;
  --ok: #23804f; --warn: #a76515; --bad: #b4433b; --info: #2b6c96; --field: #fff; --shadow: 0 12px 30px rgba(19,49,69,.12);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html { scrollbar-gutter: stable; }
html.lock { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-wrap: break-word; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--gold); color: #132a38; }
.wm { display: block; background: currentColor; -webkit-mask: url(/assets/marloss-wordmark.svg) no-repeat left center / contain; mask: url(/assets/marloss-wordmark.svg) no-repeat left center / contain; aspect-ratio: 2616 / 360; }
.num { font-variant-numeric: tabular-nums; }
.t2 { color: var(--text-2); } .t3 { color: var(--text-3); }
.label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; color: var(--text-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hide { display: none !important; }

/* ---------- buttons ---------- */
.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  font-size: 13.5px; font-weight: 500; letter-spacing: .02em; white-space: nowrap; user-select: none; transition: background var(--fast), border-color var(--fast), color var(--fast), transform var(--fast); }
.btn:hover { border-color: var(--text-3); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); background: var(--accent); }
.btn.quiet { border-color: transparent; color: var(--text-2); }
.btn.quiet:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { color: var(--accent); font-weight: 500; font-size: 13.5px; }
.link-btn:hover { text-decoration: underline; }

/* ---------- fields ---------- */
.fld { display: grid; gap: 6px; min-width: 0; }
.fld > label, .fld > .lab { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.fld input, .fld select, .fld textarea, .input { width: 100%; min-height: 42px; background: var(--field); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 9px 12px; outline: 0;
  transition: border-color var(--fast), box-shadow var(--fast); }
.fld textarea { min-height: 90px; resize: vertical; line-height: 1.6; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.fld select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.fld select option { background: var(--surface); color: var(--text); }
.fld small, .help { font-size: 12.5px; color: var(--text-3); }
.fld.err input, .fld.err textarea { border-color: var(--bad); }
.fld .errtext { font-size: 12.5px; color: var(--bad); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 720px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; line-height: 1.5; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; color: var(--text-2); user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { position: relative; width: 36px; height: 20px; border-radius: var(--pill); background: var(--line-2); transition: background var(--med); flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform var(--med) var(--ease); }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.card > header, .card-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card > header h2, .card-h h2 { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.card-b { padding: 16px 18px; display: grid; gap: 14px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; margin: 0; }
.meta dt { color: var(--text-3); } .meta dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: var(--pill); border: 1px solid var(--line-2); color: var(--text-2); font-size: 13px; transition: background var(--fast), color var(--fast), border-color var(--fast); }
.chip:hover { border-color: var(--text-3); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .n { opacity: .6; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border-radius: var(--pill); font-size: 12px; font-weight: 500; white-space: nowrap; background: color-mix(in srgb, currentColor 13%, transparent); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.b-draft { color: var(--text-3); } .b-sent, .b-viewed, .b-new, .b-info { color: var(--info); } .b-partial, .b-changes, .b-due, .b-awaiting, .b-client_signed { color: var(--warn); }
.b-approved, .b-paid, .b-signed, .b-ok, .b-converted, .b-replied { color: var(--ok); } .b-overdue, .b-declined, .b-void, .b-bad { color: var(--bad); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 500; border: 1px solid var(--line-2); color: var(--text-2); }
.empty { padding: 44px 20px; text-align: center; color: var(--text-3); display: grid; gap: 12px; justify-items: center; }
.empty b { color: var(--text); font-size: 16px; font-weight: 500; }
.sk { display: block; background: var(--surface-2); border-radius: 6px; height: 14px; }
.notice { padding: 12px 14px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--text); font-size: 14px; border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.notice.info { background: color-mix(in srgb, var(--info) 12%, transparent); border-color: color-mix(in srgb, var(--info) 30%, transparent); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; min-width: 640px; }
.t th { text-align: left; font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr.click { cursor: pointer; transition: background var(--fast); }
.t tbody tr.click:hover { background: var(--surface-2); }
.t .r { text-align: right; }
.who b { display: block; font-weight: 500; } .who small { color: var(--text-3); font-size: 13px; }

/* save status */
.save { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); white-space: nowrap; }
.save i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.save[data-state="dirty"] i { background: var(--text-3); }
.save[data-state="saving"] i { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
.save[data-state="failed"] { color: var(--bad); } .save[data-state="failed"] i { background: var(--bad); }
@keyframes pulse { 50% { opacity: .3; } }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 300; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 18px; background: #fff; color: #132a38; padding: 12px 16px 12px 18px; border-radius: var(--r); font-weight: 500; font-size: 14px; box-shadow: 0 14px 34px rgba(0,0,0,.28); animation: tin var(--med) var(--ease); }
.toast.err { background: #fff2ef; color: #7d2a20; }
.toast button { color: var(--slate); font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.toast.out { animation: tout 170ms ease forwards; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
@keyframes tout { to { opacity: 0; transform: translateY(6px); } }
.flash { animation: flash 1.4s var(--ease); }
@keyframes flash { 0% { background: color-mix(in srgb, var(--gold) 22%, transparent); } 100% { background: transparent; } }

/* drawer */
.drawer { position: fixed; inset: 0; z-index: 200; visibility: hidden; overflow: hidden; }
.drawer-bg { position: absolute; inset: 0; background: rgba(9, 25, 35, .5); opacity: 0; transition: opacity var(--med); }
.drawer-pane { position: absolute; right: 12px; top: 12px; bottom: 12px; width: min(540px, calc(100% - 24px)); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 28px; overflow: auto; overscroll-behavior: contain;
  box-shadow: var(--shadow); transform: translateX(24px); opacity: 0; transition: transform var(--med) var(--ease), opacity var(--med); }
.drawer.wide .drawer-pane { width: min(760px, calc(100% - 24px)); }
.drawer.on { visibility: visible; } .drawer.on .drawer-bg { opacity: 1; } .drawer.on .drawer-pane { transform: none; opacity: 1; }
.drawer-x { position: absolute; right: 18px; top: 18px; color: var(--text-3); font-size: 13px; padding: 6px 10px; border-radius: var(--r-sm); }
.drawer-x:hover { background: var(--surface-2); color: var(--text); }
.drawer-body { display: grid; gap: 16px; }
.drawer-body h3 { margin: 0 60px 0 0; font-size: 20px; font-weight: 700; letter-spacing: .03em; }
@media (max-width: 640px) { .drawer-pane { right: 0; top: auto; bottom: 0; width: 100%; max-height: 92vh; border-radius: var(--r-lg) var(--r-lg) 0 0; } }

/* ---------- app shell (both portals) ---------- */
.top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 22px; height: 64px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wm { width: 108px; flex: none; color: var(--text); }
.nav { display: flex; gap: 2px; height: 100%; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; display: flex; align-items: center; padding: 0 12px; color: var(--text-2); text-decoration: none; white-space: nowrap; font-size: 14.5px; transition: color var(--fast); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); }
.nav .count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 6px; margin-left: 7px; border-radius: var(--pill); background: var(--gold); color: #132a38; font-size: 11px; font-weight: 700; }
.top-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
#who { display: block; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
main.page { max-width: 1360px; margin: 0 auto; padding: 30px 24px 100px; }
.view { display: none; } .view.on { display: block; animation: vin var(--med) var(--ease); }
@keyframes vin { from { opacity: 0; } }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.head > div:first-child { min-width: 0; }
.head h1 { overflow-wrap: anywhere; margin: 0; font-size: 27px; font-weight: 700; letter-spacing: .02em; line-height: 1.2; }
.head p { margin: 4px 0 0; color: var(--text-2); }
.back { display: inline-flex; gap: 6px; color: var(--text-3); text-decoration: none; margin-bottom: 12px; font-size: 14px; }
.back:hover { color: var(--text); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.split .side { position: sticky; top: 84px; display: grid; gap: 16px; }
@media (max-width: 1120px) { .split { grid-template-columns: minmax(0, 1fr); } .split .side { position: static; } }
@media (max-width: 720px) { .top { flex-wrap: wrap; height: auto; padding: 10px 14px 0; gap: 4px 12px; } .top .nav { order: 3; flex: 1 0 100%; height: 42px; margin: 0 -8px; } .top-right { min-height: 44px; } .top .wm { width: 92px; } main.page { padding: 22px 14px 90px; } .head h1 { font-size: 23px; } }

/* KPIs + pipeline + feed */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--slate); border-radius: var(--r); padding: 18px 20px; display: grid; gap: 4px; }
.kpi b { font-size: 26px; font-weight: 700; } .kpi small { color: rgba(255,255,255,.75); font-size: 13px; } .kpi .label { color: rgba(255,255,255,.8); }
@media (max-width: 960px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .kpis { gap: 10px; } .kpi { padding: 14px 14px; } .kpi b { font-size: 20px; } }
.pipe { display: grid; grid-template-columns: repeat(6, 1fr); }
.pipe div { padding: 14px 18px; display: grid; gap: 2px; border-right: 1px solid var(--line); } .pipe div:last-child { border-right: 0; }
.pipe b { font-size: 22px; } .pipe small { color: var(--text-3); font-size: 13px; }
@media (max-width: 960px) { .pipe { grid-template-columns: repeat(3, 1fr); } .pipe div:nth-child(3) { border-right: 0; } }
.cols { display: grid; grid-template-columns: 7fr 5fr; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.feed { list-style: none; margin: 0; padding: 4px 0; }
.feed li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; padding: 12px 18px; align-items: start; }
.feed li + li { border-top: 1px solid var(--line); }
.feed .ic { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.feed .ic.ok { color: var(--ok); } .feed .ic.warn { color: var(--warn); } .feed .ic.gold { color: var(--gold); }
.feed p { margin: 0; } .feed small { color: var(--text-3); }
.feed li.new { animation: flash 1.8s var(--ease); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 14px 18px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.list li + li { border-top: 1px solid var(--line); }
.list p { margin: 0; } .list small { color: var(--text-3); } .list li > div { min-width: 0; }

/* proposal editor */
.steps { display: flex; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 18px; overflow-x: auto; }
.steps > div { flex: 1; min-width: 118px; padding: 12px 16px; display: grid; gap: 2px; font-size: 13px; color: var(--text-3); border-right: 1px solid var(--line); }
.steps > div:last-child { border-right: 0; } .steps b { font-weight: 500; color: var(--text-2); }
.steps .done { color: var(--ok); } .steps .done b { color: var(--text); } .steps .now { background: var(--surface-2); color: var(--accent); } .steps .now b { color: var(--text); }
.sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; transition: border-color var(--fast); }
.sec:focus-within { border-color: var(--line-2); }
.sec-h { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.sec-h input.title { flex: 1; min-width: 0; background: transparent; border: 1px solid transparent; border-radius: var(--r-sm); padding: 6px 8px; font-weight: 700; font-size: 16px; outline: 0; }
.sec-h input.title:focus { border-color: var(--line-2); background: var(--field); }
.sec-h .tools { display: flex; gap: 2px; }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--text-3); font-size: 15px; transition: background var(--fast), color var(--fast); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); } .icon-btn.danger:hover { color: var(--bad); }
.sec-b { padding: 14px 16px; display: grid; gap: 12px; }
.lines { width: 100%; border-collapse: collapse; }
.lines th { text-align: left; font-size: 11.5px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); padding: 6px; border-bottom: 1px solid var(--line); }
.lines td { padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lines input, .lines select { width: 100%; min-height: 36px; background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 5px 8px; outline: 0; transition: border-color var(--fast), background var(--fast); }
.lines input:hover, .lines select:hover { border-color: var(--line); }
.lines input:focus, .lines select:focus { border-color: var(--accent); background: var(--field); }
.lines select option { background: var(--surface); }
.lines .r, .lines .r input { text-align: right; }
.lines tr.leaving { opacity: 0; transition: opacity 160ms; }
.lines .desc { font-size: 12.5px; color: var(--text-3); padding-left: 8px; }
.totals { display: grid; gap: 7px; font-size: 14px; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; }
.totals .g { font-size: 21px; font-weight: 700; padding-top: 10px; border-top: 1px solid var(--line-2); margin-top: 4px; }
.sbar { display: grid; grid-template-columns: 110px 1fr 56px; gap: 10px; align-items: center; font-size: 13px; }
.sbar > span:first-child { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbar .t { height: 7px; border-radius: var(--pill); background: var(--surface-3); overflow: hidden; } .sbar .t i { display: block; height: 100%; background: var(--gold); border-radius: var(--pill); transition: width .6s var(--ease); }
.linkrow { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); } .linkrow:first-child { border-top: 0; padding-top: 0; }
.linkrow code { font: 13px var(--font); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread { display: grid; gap: 10px; }
.msg { padding: 10px 14px; border-radius: var(--r); background: var(--surface-2); font-size: 14px; max-width: 88%; }
.msg.mine { justify-self: end; background: color-mix(in srgb, var(--slate) 70%, var(--surface)); color: #fff; }
.msg small { display: block; font-size: 12px; opacity: .75; margin-top: 3px; }

/* catalog */
.catgrid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .catgrid { grid-template-columns: minmax(0, 1fr); } }
.vnav { display: grid; gap: 2px; }
.vnav button { text-align: left; padding: 10px 14px; border-radius: var(--r-sm); color: var(--text-2); display: flex; justify-content: space-between; gap: 8px; transition: background var(--fast), color var(--fast); }
.vnav button:hover { background: var(--surface-2); }
.vnav button[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
@media (max-width: 900px) { .vnav { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; } .vnav::-webkit-scrollbar { display: none; } .vnav button { flex: none; white-space: nowrap; padding: 8px 12px; border: 1px solid var(--line); } .vnav button[aria-current="true"] { box-shadow: inset 0 -2px 0 var(--accent); } }

/* paper documents (agreement, invoice) — always light */
.paper { background: #fff; color: #16212a; border-radius: var(--r); padding: clamp(24px, 5vw, 52px); box-shadow: var(--shadow); font-size: 14.5px; line-height: 1.7; border: 1px solid #e3e8eb; }
.paper .wm { width: 140px; color: #16212a; margin-bottom: 26px; }
.paper h1 { margin: 0 0 6px; font-size: 24px; font-weight: 700; letter-spacing: .02em; line-height: 1.25; }
.paper h4 { margin: 22px 0 6px; font-size: 13.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.paper p { margin: 0 0 8px; }
.paper .ag-kicker { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #66757f; font-weight: 500; margin: 0 0 6px; }
.paper .ag-meta { color: #66757f; font-size: 13px; }
.paper table { width: 100%; border-collapse: collapse; }
.paper th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: #66757f; font-weight: 500; padding: 8px 4px; border-bottom: 1.5px solid #16212a; }
.paper td { padding: 10px 4px; border-bottom: 1px solid #e3e8eb; vertical-align: top; }
.paper .r { text-align: right; }
.paper .ph { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 26px; font-size: 14px; }
.paper .pt { margin: 20px 0 0 auto; max-width: 320px; display: grid; gap: 6px; }
.paper .pt > div { display: flex; justify-content: space-between; gap: 12px; }
.paper .pt .g { font-weight: 700; font-size: 18px; border-top: 2px solid #16212a; padding-top: 8px; }
.paper .box { margin-top: 26px; padding: 16px 18px; background: #f3f5f6; border-radius: var(--r-sm); font-size: 14px; }
.paper .sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 32px; }
.paper .sig { border-top: 1.5px solid #16212a; padding-top: 8px; font-size: 13px; }
.paper .sig .s { font-style: italic; font-size: 26px; min-height: 40px; line-height: 1.4; }
.paper .cert { margin-top: 30px; padding: 16px 18px; border: 1px solid #e3e8eb; border-radius: var(--r-sm); font-size: 12.5px; color: #3e4d57; display: grid; gap: 4px; }
.paper .cert b { color: #16212a; }
@media (max-width: 640px) { .paper .sigs { grid-template-columns: 1fr; } }

/* client portal specifics */
.next { background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: 26px 28px; display: flex; justify-content: space-between; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 20px; }
.next h2 { margin: 0 0 4px; font-size: 21px; font-weight: 700; }
.next p { margin: 0; color: rgba(255,255,255,.78); max-width: 52ch; }
.next .btn { background: var(--gold); color: #132a38; border-color: var(--gold); min-height: 46px; padding: 0 22px; font-size: 14.5px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 18px 1fr auto; gap: 12px; padding: 13px 18px; align-items: start; }
.timeline li + li { border-top: 1px solid var(--line); }
.timeline .d { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; border: 2px solid var(--line-2); }
.timeline .d.ok { background: var(--ok); border-color: var(--ok); } .timeline .d.now { background: var(--gold); border-color: #c9a93a; }
.timeline small { color: var(--text-3); }
.cover { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--navy); color: #fff; padding: clamp(26px, 5vw, 48px); margin-bottom: 22px; }
.cover .label { color: rgba(255,255,255,.75); }
.cover h1 { overflow-wrap: anywhere; margin: 10px 0 6px; font-size: clamp(28px, 4.4vw, 46px); line-height: 1.1; font-weight: 700; }
.cover p { margin: 0; color: rgba(255,255,255,.82); }
.cover dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 28px; margin: 26px 0 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.2); }
.cover dt { font-size: 12px; color: rgba(255,255,255,.7); } .cover dd { margin: 2px 0 0; font-weight: 500; }
.psec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 4vw, 34px); margin-bottom: 16px; scroll-margin-top: 84px; }
.psec h2 { margin: 0 0 14px; font-size: 22px; font-weight: 700; }
.prose { max-width: 70ch; font-size: 15.5px; } .prose p { margin: 0 0 10px; } .prose ul, .prose ol { margin: 0 0 10px; padding-left: 22px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; margin-top: 8px; }
.gallery figure { margin: 0; display: grid; gap: 6px; align-content: start; }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); background: var(--line); }
.gallery figcaption { font-size: 13.5px; color: var(--text-2); }
.gallery.ed { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.gallery.ed figure { grid-template-columns: 1fr auto; }
.gallery.ed img { grid-column: 1 / -1; }
.phases { list-style: none; margin: 8px 0 0; padding: 0; }
.phases li { display: grid; grid-template-columns: 100px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.phases li:first-child { border-top: 0; }
.phases .n { color: var(--accent); font-weight: 500; font-size: 13.5px; }
.phases h3 { margin: 0 0 2px; font-size: 16.5px; font-weight: 500; }
@media (max-width: 640px) { .phases li { grid-template-columns: 1fr; gap: 2px; } }
.items { margin-top: 6px; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); transition: opacity var(--med); }
.item.off { opacity: .45; }
.item .nm { font-weight: 500; } .item .ds { font-size: 13.5px; color: var(--text-3); }
.item .amt { font-variant-numeric: tabular-nums; font-weight: 500; text-align: right; min-width: 96px; }
.opt { font-size: 11.5px; font-weight: 500; color: var(--accent); border: 1px solid currentColor; border-radius: var(--pill); padding: 1px 8px; margin-left: 8px; }
.ptotals { margin: 18px 0 0 auto; max-width: 400px; }
.secfoot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; padding: 14px 16px; background: var(--surface-2); border-radius: var(--r); }
.signwrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.signbox { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.signbox h3 { margin: 0; font-size: 17px; font-weight: 700; }
.progress { display: flex; gap: 6px; } .progress span { flex: 1; height: 4px; border-radius: var(--pill); background: var(--line); } .progress span.on { background: var(--accent); }
.sigpreview { font-style: italic; font-size: 32px; min-height: 52px; border-bottom: 1.5px solid var(--text); padding: 2px 2px 4px; overflow-wrap: anywhere; line-height: 1.4; }
.stamp { display: inline-block; justify-self: start; border: 2.5px solid var(--ok); color: var(--ok); padding: 6px 16px; border-radius: 8px; font-weight: 700; letter-spacing: .28em; transform: rotate(-3deg); animation: stamp .45s var(--ease); }
@keyframes stamp { from { transform: rotate(-3deg) scale(1.5); opacity: 0; } }
@media (max-width: 960px) { .signwrap { grid-template-columns: minmax(0, 1fr); } .signbox { position: static; } }
.payopt { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--r); }
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate .box { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 34px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.gate .wm { width: 130px; color: var(--text); }
.gate h1 { margin: 0; font-size: 21px; font-weight: 700; }

/* diagnostics */
.dgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.dstat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 4px; }
.dstat b { font-size: 24px; font-weight: 700; }
.dstat.bad b { color: var(--bad); } .dstat.ok b { color: var(--ok); }
@media (max-width: 960px) { .dgrid { grid-template-columns: 1fr 1fr; } }
.stack-trace { font: 12px/1.5 ui-monospace, Menlo, monospace; white-space: pre-wrap; background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; max-height: 220px; overflow: auto; color: var(--text-2); }
.ev { display: grid; grid-template-columns: 92px 92px 1fr; gap: 12px; padding: 9px 18px; font-size: 13.5px; border-top: 1px solid var(--line); }
.ev:first-child { border-top: 0; }
.ev .k-error, .ev .k-rejection, .ev .k-rage, .ev .k-fetch { color: var(--bad); } .ev .k-slow, .ev .k-longtask { color: var(--warn); } .ev .k-vital { color: var(--ok); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media print {
  .top, .side, .signbox, .no-print, .toasts, .drawer, .secfoot, .next, .nav { display: none !important; }
  body { background: #fff; } main.page, .cmain { padding: 0; max-width: none; }
  .split, .signwrap { display: block; } .paper { box-shadow: none; border: 0; padding: 0; }
  .view:not(.on), .cview:not(.on) { display: none !important; }
}

/* ---------- branded agreement ---------- */
.paper .agreement { counter-reset: none; }
.paper:has(.agreement) > .wm { display: none; }
.ag-head { margin: calc(-1 * clamp(24px, 5vw, 52px)) calc(-1 * clamp(24px, 5vw, 52px)) 30px; padding: 0 clamp(24px, 5vw, 52px) 26px; border-bottom: 1px solid #e3e8eb; }
.ag-band { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #133145; color: #fff; margin: 0 calc(-1 * clamp(24px, 5vw, 52px)) 30px; padding: 22px clamp(24px, 5vw, 52px); border-radius: 12px 12px 0 0; }
.ag-wm { display: block; width: 150px; aspect-ratio: 2616 / 360; background: #fff; -webkit-mask: url(/assets/marloss-wordmark.svg) no-repeat left center / contain; mask: url(/assets/marloss-wordmark.svg) no-repeat left center / contain; }
.ag-tag { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.75); font-weight: 500; }
.paper .ag-head h1 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: .01em; margin: 2px 0 8px; }
.ag-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 22px 0 0; background: #e3e8eb; border: 1px solid #e3e8eb; border-radius: 10px; overflow: hidden; }
.ag-facts div { background: #f6f8f9; padding: 12px 14px; }
.ag-facts dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #66757f; font-weight: 500; }
.ag-facts dd { margin: 3px 0 0; font-weight: 500; color: #16212a; }
.paper .cl { padding: 2px 0 6px; break-inside: avoid; }
.paper .cl h4 { color: #405f74; }
.paper .ag-note { background: #f1f5f7; border-left: 3px solid #405f74; padding: 12px 14px; border-radius: 0 8px 8px 0; color: #24323b; }
.ag-phases { width: 100%; border-collapse: collapse; margin: 10px 0 4px; font-size: 14px; } .ag-phases th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #66757f; font-weight: 500; padding: 6px 8px 6px 0; border-bottom: 1px solid #e3e8eb; }
.ag-phases td { padding: 8px 8px 8px 0; border-bottom: 1px solid #eef1f3; font-variant-numeric: tabular-nums; } .ag-phases td + td, .ag-phases th + th { text-align: right; }
.ag-foot { margin-top: 30px; padding-top: 14px; border-top: 1px solid #e3e8eb; font-size: 12px; color: #66757f; }
.paper .sig { border-top: 1.5px solid #133145; }
.paper .cert { background: #f6f8f9; border: 0; border-left: 3px solid #23804f; }
@media (max-width: 640px) { .ag-facts { grid-template-columns: 1fr 1fr; } .ag-tag { display: none; } }
@media print {
  .paper { font-size: 12.5px; }
  .ag-band, .ag-facts div, .paper .ag-note, .paper .cert { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .paper .cl { break-inside: avoid; }
  @page { margin: 16mm 14mm; }
}

/* ---------- invoice paper (shared Wave-style layout) ---------- */
.paper .inv-sum { color: #4c5b66; font-size: 14px; }
.paper .inv-k { display: block; color: #66757f; font-size: 12.5px; letter-spacing: .04em; margin-bottom: 2px; }
.paper .inv-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin: 4px 0 26px; padding-top: 18px; border-top: 1px solid #e3e8eb; }
.paper .inv-meta { display: grid; grid-template-columns: auto auto; gap: 2px 14px; margin: 0; font-size: 14px; }
.paper .inv-meta dt { text-align: right; font-weight: 600; }
.paper .inv-meta dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.paper .inv-lines td b { font-weight: 600; }
.paper .inv-d { color: #66757f; font-size: 13px; white-space: pre-line; }
.paper .inv-notes { margin-top: 22px; white-space: normal; }
.paper .inv-foot { margin-top: 26px; padding-top: 14px; border-top: 1px solid #e3e8eb; text-align: center; color: #66757f; font-size: 13px; }

/* ---------- invoice editor ---------- */
.ie { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.ie-prev { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; overscroll-behavior: contain; border-radius: var(--r); }
.ie-prev .paper { font-size: 13.5px; }
.ie-tabs { display: none; }
.ie-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.ie-meta { display: grid; gap: 10px; }
.ie-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px 118px 110px 36px; gap: 8px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ie-row .amt { padding-top: 10px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.ie-row .sub { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 8px; }
.ie-row textarea { min-height: 40px; resize: vertical; }
.ie-cols { display: grid; grid-template-columns: minmax(0, 1fr) 84px 118px 110px 36px; gap: 8px; font-size: 12.5px; color: var(--text-3); letter-spacing: .04em; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.ie-cols span:nth-child(n+2) { text-align: right; }
.ie-pick { position: relative; }
.ie-sugg { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow); max-height: 300px; overflow: auto; }
.ie-sugg button { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; border-bottom: 1px solid var(--line); }
.ie-sugg button:last-child { border-bottom: 0; }
.ie-sugg button[aria-selected="true"], .ie-sugg button:hover { background: var(--surface-2); }
.ie-sugg small { display: block; opacity: .7; }
.ie-tot { display: grid; grid-template-columns: auto 140px; gap: 8px 16px; justify-content: end; margin-top: 16px; font-variant-numeric: tabular-nums; }
.ie-tot span:nth-child(even) { text-align: right; }
.ie-tot .g { font-weight: 700; font-size: 17px; }
.ie-save { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); }
@media (max-width: 1100px) {
  .ie { grid-template-columns: minmax(0, 1fr); }
  .ie-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
  .ie[data-tab="edit"] .ie-prev, .ie[data-tab="preview"] .ie-form { display: none; }
  .ie-prev { position: static; max-height: none; }
}
@media (max-width: 640px) {
  .ie-head { grid-template-columns: minmax(0, 1fr); }
  .ie-cols { display: none; }
  .ie-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; }
  .ie-row .ie-pick { grid-column: 1 / -1; }
  .ie-row .amt { grid-column: 1 / 3; text-align: left; padding-top: 0; }
  .ie-row .sub { grid-template-columns: minmax(0, 1fr); }
}

/* long item lists: rows off screen skip layout and paint until scrolled to */
.pk-item { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); content-visibility: auto; contain-intrinsic-size: auto 60px; }
.ie-sugg { overscroll-behavior: contain; }

.split > [inert]{opacity:.72}
.gate.reauth { position: fixed; inset: 0; z-index: 300; min-height: 0; background: rgba(9, 18, 27, .55); }
/* long unbroken words (links, serials) never push a page or invoice sideways on a phone */
.prose, .item .nm, .item .desc, .card-b, .inv, .drawer-body, .msg, td { overflow-wrap: anywhere; }

/* ---------- client portal, 2026-10-30 redesign (mockup: docs/mockups/2026-10-30-portal-proposal.html) ---------- */
.client-theme {
  --bg: #f3f1ec; --surface: #ffffff; --surface-2: #f8f7f3; --surface-3: #efece5; --line: rgba(19,49,69,.12); --line-2: rgba(19,49,69,.22);
  --text: #133145; --text-2: #3d5466; --text-3: #66798a; --accent: var(--slate); --ok: #2f7a55; --wait: #a7801c;
  --shadow: 0 1px 2px rgba(19,49,69,.06), 0 12px 32px -14px rgba(19,49,69,.22); --gold-text: #3a2f05;
}
.client-theme :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.client-theme .top { background: rgba(19,49,69,.94); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px); border-bottom: 0; color: #fff; }
.client-theme .top .wm { color: #fff; }
.client-theme .nav a { color: rgba(255,255,255,.72); font-size: 13.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.client-theme .nav a:hover, .client-theme .nav a[aria-current] { color: #fff; }
.client-theme .nav a[aria-current]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px; background: var(--gold); }
.client-theme #who { color: rgba(255,255,255,.75) !important; }
.client-theme .head h1, .ov-head h1 { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
main.page.bleed { max-width: none; padding: 0; }

.px-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1.5px solid transparent; font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: transform var(--fast) var(--ease), background var(--med) var(--ease), box-shadow var(--med) var(--ease); }
.px-btn:active { transform: scale(.98); }
.px-btn.gold { background: var(--gold); color: var(--gold-text); box-shadow: 0 8px 22px -10px rgba(243,217,122,.9); }
.px-btn.gold:hover { background: #f7e39a; }
.px-btn.ghost { color: var(--text); border-color: var(--line-2); background: transparent; }
.px-btn.ghost:hover { background: var(--surface-2); }
.px-btn.sm { min-height: 38px; padding: 0 14px; font-size: 12.5px; border-radius: 10px; }
.px-btn.block { width: 100%; }
.px-btn.grow { flex: 1; }
.px-btn[disabled] { opacity: .55; pointer-events: none; }
.px-link { color: var(--text-2); font-weight: 500; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.px-link:hover { color: var(--text); }

.px-hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; min-height: min(560px, 72vh); display: flex; align-items: flex-end; background: var(--navy); }
.px-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transform: scale(1.04); animation: px-settle 1.6s var(--ease) forwards; }
@keyframes px-settle { to { transform: none; } }
.px-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(19,49,69,.15) 0%, rgba(19,49,69,.5) 40%, rgba(19,49,69,.96) 100%); }
.px-hero-in { width: 100%; max-width: 1240px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 40px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
.px-for { margin: 0 0 10px; font-size: 15px; font-weight: 500; color: rgba(255,255,255,.88); }
.px-hero h1 { margin: 0; font-size: clamp(30px, 5vw, 62px); line-height: 1.03; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; max-width: 18ch; text-wrap: balance; overflow-wrap: anywhere; }
.px-sub { margin: 10px 0 0; color: rgba(255,255,255,.85); }
.px-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.px-meta span { font-size: 13.5px; padding: 6px 12px; border-radius: 8px; background: rgba(255,255,255,.13); backdrop-filter: blur(6px); }
.px-meta b { font-weight: 500; color: rgba(255,255,255,.7); margin-right: 6px; }
.px-totalcard { min-width: 280px; padding: 20px 22px; border-radius: 16px; background: rgba(19,49,69,.55); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.18); }
.px-totalcard small { display: block; font-size: 13px; color: rgba(255,255,255,.75); }
.px-totalcard .big { font-size: 34px; font-weight: 700; line-height: 1.15; margin: 2px 0 4px; }
.px-totalcard p { margin: 0 0 14px; font-size: 13.5px; color: rgba(255,255,255,.78); }
.px-totalcard .px-state.ok { color: #9fe3bd; }
.px-totalcard .px-btn.ghost { color: #fff; border-color: rgba(255,255,255,.4); }

.px-progress { max-width: 1240px; margin: 0 auto; padding: 18px clamp(16px, 4vw, 40px); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.px-progress p { margin: 0; font-size: 14.5px; color: var(--text-2); } .px-progress p b { color: var(--text); }
.px-progress .px-link { margin-left: auto; }
.px-segs { display: flex; gap: 6px; flex: 1; min-width: 160px; max-width: 420px; }
.px-segs i { height: 6px; flex: 1; border-radius: 6px; background: var(--line-2); transition: background .3s var(--ease); }
.px-segs i.on { background: var(--ok); }

.px-body { max-width: 1240px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 120px; display: grid; grid-template-columns: 200px minmax(0, 1fr) 300px; gap: clamp(20px, 3vw, 40px); align-items: start; }
.px-toc { position: sticky; top: 92px; display: grid; gap: 2px; }
.px-toc a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-size: 14px; line-height: 1.3; transition: background var(--med) var(--ease); }
.px-toc a:hover { background: var(--surface-2); }
.px-toc a.cur { background: var(--surface); color: var(--text); font-weight: 500; box-shadow: var(--shadow); }
.px-dot { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-2); flex: none; display: inline-grid; place-items: center; }
.px-dot.ok { background: var(--ok); border-color: var(--ok); }
.px-dot.ok::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.px-dot.info { border-style: dashed; }
.px-dot.cur { border-color: var(--gold); background: rgba(243,217,122,.35); }

.px-sec { scroll-margin-top: 96px; margin-bottom: 52px; }
.px-sec > h2 { margin: 0 0 6px; font-size: clamp(22px, 2.4vw, 29px); line-height: 1.15; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.px-rule { width: 44px; height: 3px; border-radius: 3px; background: var(--gold); margin: 0 0 18px; }
.px-sec .prose { color: var(--text-2); max-width: 65ch; font-size: 16px; line-height: 1.7; }
.px-sec .prose > p:first-child { font-size: 17.5px; }
.px-ask { margin-top: 10px; }
.px-thread { margin-top: 14px; }
.px-phases { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.px-phases li { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 16px 18px; }
.px-phases h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.px-phases p { margin: 6px 0 0; color: var(--text-2); font-size: 15px; }
.px-steps { list-style: none; margin: 12px 0 0; padding: 0; } .px-steps li { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }

.px-gal { display: grid; gap: 8px; border-radius: 16px; overflow: hidden; }
.px-gal.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16 / 8; }
.px-gal.n3 button:first-child { grid-row: span 2; }
.px-gal.n2 { grid-template-columns: 1fr 1fr; aspect-ratio: 16 / 5; } .px-gal.n1 { aspect-ratio: 16 / 9; }
.px-gal button { position: relative; overflow: hidden; display: block; background: #0f1d27; padding: 0; }
.px-gal img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.px-gal button:hover img { transform: scale(1.04); }
.px-gal .more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(19,49,69,.55); color: #fff; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 14px; }
.px-cap { font-size: 13.5px; color: var(--text-3); margin: 10px 0 0; }

.px-phase { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.px-ph-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 22px 24px; align-items: start; }
.px-ph-head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.px-ph-head .prose { margin-top: 6px; font-size: 15px; } .px-ph-head .prose > p:first-child { font-size: 15px; } .px-ph-head .prose p { margin: 0; }
.px-ph-price { text-align: right; } .px-ph-price b { display: block; font-size: 25px; font-weight: 700; } .px-ph-price small { color: var(--text-3); font-size: 13px; }
.px-lines { border-top: 1px solid var(--line); }
.px-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.px-line .nm { font-weight: 500; overflow-wrap: anywhere; } .px-line .ds { font-size: 14px; color: var(--text-3); margin-top: 2px; overflow-wrap: anywhere; } .px-line .amt { font-weight: 500; }
.px-more summary { list-style: none; cursor: pointer; padding: 14px 24px; font-weight: 500; font-size: 14.5px; color: var(--accent); display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.px-more summary::-webkit-details-marker { display: none; }
.px-more summary svg { transition: transform .25s var(--ease); } .px-more[open] summary svg { transform: rotate(180deg); }
.px-opts { padding: 18px 24px 6px; background: var(--surface-2); }
.px-opts h4 { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.px-opt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); margin-bottom: 12px; cursor: pointer; transition: border-color var(--med) var(--ease), box-shadow var(--med) var(--ease); }
.px-opt:hover { border-color: var(--line-2); }
.px-opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(64,95,116,.16); }
.px-opt .nm { display: block; font-weight: 500; } .px-opt .ds { display: block; font-size: 13.5px; color: var(--text-3); } .px-opt .amt { font-weight: 700; }
.px-sw { position: relative; width: 44px; height: 26px; flex: none; }
.px-sw input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.px-sw i { position: absolute; inset: 0; border-radius: 26px; background: #c9d2d9; transition: background var(--med) var(--ease); pointer-events: none; }
.px-sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s var(--ease); }
.px-sw input:checked + i { background: var(--ok); } .px-sw input:checked + i::after { transform: translateX(18px); }
.px-sw input:focus-visible + i { outline: 3px solid var(--gold); outline-offset: 2px; }
.px-sw input:disabled { cursor: default; }
.px-ph-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 16px 24px; border-top: 1px solid var(--line); }
.px-ph-foot.flat { padding: 16px 0 0; border-top: 0; }
.px-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.px-state { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.px-state.ok { color: var(--ok); } .px-state.warn { color: var(--wait); }
.px-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--wait); }

.px-side { position: sticky; top: 92px; display: grid; gap: 14px; }
.px-card { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 20px; }
.px-card h3 { margin: 0 0 12px; font-size: 14.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.px-sum { display: grid; }
.px-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14.5px; color: var(--text-2); }
.px-row span:first-child { min-width: 0; overflow-wrap: anywhere; }
.px-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; color: var(--text); font-weight: 700; font-size: 19px; }
.px-row.dep { font-size: 13.5px; color: var(--text-3); }
.px-card [data-sidecta] { margin-top: 14px; }
.px-delta { font-size: 12.5px; color: var(--ok); font-weight: 500; opacity: 0; transition: opacity .3s var(--ease); min-height: 18px; }
.px-delta.show { opacity: 1; }
.px-contact { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 16px; }
.px-contact p { margin: 0; flex: 1; min-width: 150px; font-size: 14px; color: var(--text-2); display: grid; }
.px-contact b { color: var(--text); font-weight: 500; }
.px-contact a:not(.px-btn) { color: var(--text-2); text-decoration: none; overflow-wrap: anywhere; } .px-contact a:not(.px-btn):hover { color: var(--text); text-decoration: underline; }
.px-av { width: 38px; height: 38px; border-radius: 11px; background: var(--slate); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; letter-spacing: .04em; flex: none; }
.px-fine { font-size: 13px; color: var(--text-3); max-width: 72ch; margin: 8px 0 0; }

.px-mbar { display: none; position: sticky; bottom: 0; z-index: 40; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(243,241,236,.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); align-items: center; gap: 12px; justify-content: space-between; }
.px-mbar small { display: block; font-size: 12.5px; color: var(--text-3); } .px-mbar b { font-size: 19px; }

.px-scrim { position: fixed; inset: 0; z-index: 190; background: rgba(10,24,34,.5); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.px-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 191; width: min(460px, 100%); background: var(--surface); color: var(--text); box-shadow: -30px 0 60px -20px rgba(0,0,0,.4); transform: translateX(100%); transition: transform .38s var(--ease); display: flex; flex-direction: column; visibility: hidden; }
.px-open .px-scrim { opacity: 1; pointer-events: auto; }
.px-open .px-panel { transform: none; visibility: visible; }
.px-pan-h { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.px-pan-h h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.px-x { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; color: var(--text-2); }
.px-x:hover { background: var(--surface-2); }
.px-steps-bar { display: flex; gap: 6px; padding: 16px 24px 0; }
.px-steps-bar span { flex: 1; font-size: 12.5px; font-weight: 500; color: var(--text-3); padding-top: 10px; border-top: 3px solid var(--line-2); transition: color .2s, border-color .2s; }
.px-steps-bar span.on { color: var(--text); border-color: var(--gold); } .px-steps-bar span.done { color: var(--ok); border-color: var(--ok); }
.px-pan-b { padding: 20px 24px; overflow: auto; flex: 1; overscroll-behavior: contain; }
.px-pan-f { padding: 16px 24px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 10px; }
.px-p { margin: 0 0 14px; color: var(--text-2); }
.px-fld { display: grid; gap: 6px; margin-bottom: 14px; }
.px-fld label { font-size: 14px; font-weight: 500; }
.px-fld input { min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface-2); padding: 0 14px; font-size: 16px; }
.px-fld input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(64,95,116,.2); }
.px-err { font-size: 13px; color: #b4433b; min-height: 18px; }
.px-sig { border-radius: 14px; border: 1.5px dashed var(--line-2); background: var(--surface-2); min-height: 96px; display: grid; place-items: center; font-style: italic; font-size: 32px; padding: 10px; text-align: center; overflow-wrap: anywhere; }
.px-sig.empty { font-size: 15px; font-style: normal; color: var(--text-3); }
.px-check { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--text-2); margin: 16px 0 4px; cursor: pointer; }
.px-check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ok); flex: none; }
.px-done { text-align: center; padding: 24px 0 6px; }
.px-done h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.px-done > p { color: var(--text-2); margin: 6px 0 0; }
.px-seal { width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 22px; background: var(--ok); display: grid; place-items: center; }
.px-seal::after { content: ""; width: 28px; height: 14px; border: 4px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(2px, -3px); }
.px-nextlist { text-align: left; margin-top: 22px; display: grid; gap: 10px; }
.px-nextlist > div { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14.5px; }
.px-nextlist b { display: block; font-weight: 500; color: var(--text); } .px-nextlist span:last-child { color: var(--text-2); }

.px-lb { position: fixed; inset: 0; z-index: 210; background: rgba(8,16,22,.95); display: grid; place-items: center; padding: 30px 70px; }
.px-lb[hidden] { display: none; }
.px-lb figure { margin: 0; display: grid; justify-items: center; max-height: 100%; }
.px-lb img { max-width: 100%; max-height: 82vh; border-radius: 12px; }
.px-lb figcaption { color: rgba(255,255,255,.82); margin-top: 14px; text-align: center; }
.px-lb .px-x { position: absolute; top: 16px; right: 16px; color: #fff; } .px-lb .px-x:hover { background: rgba(255,255,255,.12); }
.px-nv { position: absolute; top: 50%; width: 48px; height: 48px; border-radius: 14px; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; transform: translateY(-50%); }
.px-nv:hover { background: rgba(255,255,255,.24); } .px-nv.prev { left: 14px; } .px-nv.next { right: 14px; }

/* overview */
.ov-head { margin-bottom: 24px; } .ov-head h1 { margin: 0; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.1; } .ov-head p { margin: 6px 0 0; color: var(--text-2); }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; }
.ov-next { position: relative; isolation: isolate; overflow: hidden; border-radius: 20px; color: #fff; min-height: 260px; display: flex; align-items: flex-end; text-decoration: none; background: var(--navy); }
.ov-next img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--ease); }
.ov-next:hover img { transform: scale(1.03); }
.ov-next::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(19,49,69,.95), rgba(19,49,69,.6) 60%, rgba(19,49,69,.25)); }
.ov-next > div { padding: 28px; }
.ov-next h2 { margin: 0 0 6px; font-size: 25px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ov-next p { margin: 0 0 18px; color: rgba(255,255,255,.84); max-width: 46ch; }
.ov-tl { list-style: none; margin: 0; padding: 0; }
.ov-tl li { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; padding: 10px 0; align-items: start; position: relative; }
.ov-tl li:not(:last-child)::before { content: ""; position: absolute; left: 10px; top: 34px; bottom: -8px; width: 2px; background: var(--line); }
.ov-tl .px-dot { width: 22px; height: 22px; border-radius: 7px; }
.ov-tl b { display: block; font-weight: 500; } .ov-tl small { color: var(--text-3); font-size: 13.5px; } .ov-tl em { font-style: normal; font-size: 13.5px; color: var(--text-3); }

@media (max-width: 1100px) { .px-body { grid-template-columns: minmax(0, 1fr) 290px; } .px-toc { display: none; } }
@media (max-width: 760px) {
  .px-hero-in { grid-template-columns: 1fr; } .px-totalcard { min-width: 0; } .px-hero { min-height: 520px; }
  .px-body { grid-template-columns: 1fr; padding-bottom: 40px; } .px-side { position: static; } .px-side .px-card { display: none; }
  .px-mbar { display: flex; } .ov-grid { grid-template-columns: 1fr; }
  .px-ph-head, .px-line, .px-ph-foot, .px-opts, .px-more summary { padding-left: 18px; padding-right: 18px; }
  .px-ph-head { grid-template-columns: 1fr; gap: 0; } .px-ph-head > div:first-child { display: contents; } .px-ph-head h2 { order: 1; overflow-wrap: normal; hyphens: none; }
  .px-ph-price { order: 2; text-align: left; display: flex; align-items: baseline; gap: 8px; margin-top: 6px; } .px-ph-head .prose { order: 3; margin-top: 10px; }
  .px-lb { padding: 20px 12px; } .px-nv { top: auto; bottom: 20px; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .px-hero img { animation: none; transform: none; } .px-panel, .px-scrim, .px-gal img, .ov-next img { transition: none; } }
@media print { .px-hero { min-height: 0; color: #133145; } .px-hero img, .px-hero::after, .px-toc, .px-side, .px-mbar, .px-panel, .px-scrim, .px-lb, .px-actions, .px-progress .px-link, [data-herocta] { display: none !important; } .px-hero-in { grid-template-columns: 1fr; } .px-body { grid-template-columns: 1fr; } .px-meta span { background: none; padding: 0; } }

/* ---------- vision first (option A) and the confidentiality guard ---------- */
.px-hero-cta { margin-top: 22px; }
.px-conf { margin: 14px 0 0; font-size: 13px; color: rgba(255,255,255,.72); max-width: 60ch; }
.px-side .px-card[data-reveal] { opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .5s, transform .5s; }
.px-side .px-card[data-reveal].on { opacity: 1; transform: none; pointer-events: auto; }
.px-mbar[data-reveal] { transform: translateY(110%); transition: transform .4s; }
.px-mbar[data-reveal].on { transform: none; }
html.guard-on .view[data-v="proposal"] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.guard-on .view[data-v="proposal"] :is(input, textarea) { -webkit-user-select: text; user-select: text; }
html.guard-on .view[data-v="proposal"] img { -webkit-user-drag: none; pointer-events: none; }
.px-gal button, .px-lb figure, .px-hero { position: relative; }
.px-gal button::after, .px-lb figure::after, .px-hero::before { content: ""; position: absolute; inset: 0; background: var(--wm) repeat; pointer-events: none; z-index: 2; }
.px-lb figure::after { bottom: 2.4em; }
html.guard-veil.guard-on .view[data-v="proposal"] { filter: blur(22px); transition: filter .15s; }
.guard-note { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(19,49,69,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.guard-note[hidden] { display: none; }
.guard-note .box { max-width: 440px; background: #133145; color: #fff; border: 1px solid rgba(243,217,122,.5); border-radius: 16px; padding: 24px 24px 20px; }
.guard-note h2 { margin: 0 0 8px; font-size: 20px; letter-spacing: .06em; text-transform: uppercase; }
.guard-note p { margin: 0 0 18px; color: rgba(255,255,255,.82); font-size: 15px; line-height: 1.5; }
@media print {
  html.guard-on body > * { display: none !important; }
  html.guard-on body::after { content: "Printing this proposal is not permitted. This attempt has been logged and MARLOSS has been notified."; display: block; padding: 40px; font: 500 18px/1.5 Futura, sans-serif; color: #133145; }
}

/* Studio preview of the client page */
.px-preview { position: sticky; top: 0; z-index: 60; background: var(--gold, #f3d97a); color: #133145; font-weight: 500; font-size: 13.5px; letter-spacing: .02em; text-align: center; padding: 8px 16px; }
