/* finesse · register=product · A=ink-teal/lilac · B=700/400 · C=workspace-sidebar
 * D=native-controls · E=matte-ledger · SOUL=4 SPECTACLE=1 DENSITY=8 */
:root {
  color-scheme: light;
  --bg: #f6f5fa;
  --surface: #fefeff;
  --navigation: #fbfaff;
  --ink: #211c35;
  --muted: #625d73;
  --quiet: #767084;
  --line: #e8e4ef;
  --line-strong: #d9d3e5;
  --violet: #5745c4;
  --violet-dark: #4534ab;
  --violet-soft: #efecff;
  --green: #226452;
  --green-bg: #eaf6f0;
  --amber: #785111;
  --amber-bg: #fff5df;
  --red: #a42e4a;
  --red-bg: #faedf1;
  --radius: 15px;
  --shadow: 0 1px 2px #25203808;
  --font: "Instrument Sans", "Inter", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font: 14px/1.55 var(--font);
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
[hidden] { display: none !important; }
a { color: var(--violet); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}
label { display: block; }
small { font-size: .86rem; }
p, ul { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); letter-spacing: -.045em; font-weight: 730; }
h2 { font-size: 1.19rem; letter-spacing: -.02em; }
h3 { font-size: 1rem; }
.muted, .sub { color: var(--muted); }
.sub { font-size: .91rem; }
.mono { font-variant-numeric: tabular-nums; }
.skip-link { position: fixed; top: 8px; left: 8px; transform: translateY(-150%); z-index: 10; background: var(--surface); padding: 10px; }
.skip-link:focus { transform: none; }
.startup { display: grid; min-height: 100dvh; place-items: center; color: var(--muted); }
.frame { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { background: var(--navigation); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; min-height: 0; }
.brand { display: flex; align-items: center; gap: 12px; padding: 25px 19px 23px; }
.brand b { display: block; font-size: 1.18rem; letter-spacing: .025em; }
.brand small { display: block; color: var(--muted); }
.logo { display: inline-grid; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px; place-content: center; grid-auto-flow: column; gap: 3px; background: #32246b; box-shadow: 0 5px 12px #35257832; }
.logo i { width: 3px; background: #f6f0ff; border-radius: 6px; align-self: center; }
.logo i:nth-child(1), .logo i:nth-child(5) { height: 8px; opacity: .7; }
.logo i:nth-child(2), .logo i:nth-child(4) { height: 15px; opacity: .86; }
.logo i:nth-child(3) { height: 22px; }
.navigation { overflow: auto; padding: 0 12px 12px; }
.nav-section { font-size: .8rem; font-weight: 650; color: var(--quiet); margin: 17px 9px 7px; }
.nav-button { display: flex; gap: 10px; align-items: center; text-align: left; width: 100%; min-height: 41px; padding: 8px 10px; margin: 2px 0; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #403950; }
.nav-button:hover { background: #f3f0fa; }
.nav-button[aria-current="page"] { background: var(--violet-soft); color: #4937a9; border-color: #e7e1fb; font-weight: 700; }
.nav-glyph { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: 0 0 20px; font-size: 16px; font-family: "Segoe UI Symbol", sans-serif; }
.nav-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 12px; display: flex; gap: 8px; align-items: center; }
.nav-footer .sub { display: block; }
.avatar-mark { width: 35px; height: 35px; background: #eae5fa; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; color: #4e389e; font-weight: 720; }
.nav-footer .icon-button { margin-left: auto; }
.workarea, main { min-width: 0; }
.topbar { height: 66px; background: var(--navigation); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 28px; }
.topbar > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.crumb { color: var(--muted); font-size: .88rem; padding-left: 12px; border-left: 1px solid var(--line-strong); }
.workspace-select { min-width: 120px; max-width: 226px; }
.content { max-width: 1400px; padding: 29px 30px 44px; margin: 0 auto; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 0 22px; }
.page-head p { margin-top: 8px; color: var(--muted); }
.kicker { display: block; margin-bottom: 7px; color: var(--violet); font-weight: 700; letter-spacing: .02em; font-size: .83rem; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 100px; background: #efedf5; color: #514963; padding: 3px 9px; font-size: .81rem; font-weight: 650; white-space: nowrap; vertical-align: middle; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.good { background: var(--green-bg); color: var(--green); }
.pill.wait { background: var(--amber-bg); color: var(--amber); }
.pill.bad { background: var(--red-bg); color: var(--red); }
.pill.active { background: var(--violet-soft); color: var(--violet-dark); }
.button, .icon-button { min-height: 36px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 12px; background: var(--surface); color: var(--ink); font-weight: 650; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.button:hover:not(:disabled), .icon-button:hover:not(:disabled) { background: #f7f4fd; border-color: #bfb4da; }
.button.primary { background: var(--violet); border-color: var(--violet); color: var(--surface); }
.button.primary:hover:not(:disabled) { background: var(--violet-dark); border-color: var(--violet-dark); }
.button.link { background: transparent; border-color: transparent; color: var(--violet); padding-inline: 6px; }
.button.danger { color: var(--red); }
.icon-button { min-width: 36px; padding: 5px 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px; border-bottom: 1px solid var(--line); }
.card-header h2 + p { margin-top: 4px; }
.card-inner { padding: 17px 18px; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(295px, 340px); gap: 18px; align-items: start; }
.source-card { padding: 13px; }
.stage { min-height: clamp(282px, 31vw, 420px); display: grid; place-items: center; position: relative; overflow: hidden; border-radius: 10px; color: #f7f4ff; text-align: center; background: radial-gradient(ellipse at 48% 28%, #332752 0, #231c3a 50%, #211a36 75%); isolation: isolate; }
.stage::before { position: absolute; content: ""; z-index: -1; inset: 0; background-image: linear-gradient(#ffffff0a 1px, transparent 1px), linear-gradient(90deg, #ffffff0a 1px, transparent 1px); background-size: 28px 28px; mask-image: radial-gradient(ellipse at center, #111827 12%, transparent 86%); }
.stage[data-drag="true"] { outline: 2px dashed #e5ddff; outline-offset: -9px; }
.stage.has-video { display: flex; align-items: stretch; justify-content: center; background: #181225; }
.stage video { width: 100%; object-fit: contain; display: block; max-height: 420px; }
.stage-tools { position: absolute; top: 10px; left: 10px; max-width: calc(100% - 20px); z-index: 1; padding: 5px 9px; background: #211a37e9; border-radius: 5px; font-size: .83rem; color: #ece5ff; overflow-wrap: anywhere; }
.drop-message { padding: 25px 15px; }
.drop-message h2 { color: #f9f5ff; font-size: 1.4rem; margin: 16px 0 5px; }
.drop-message p { color: #d0c6e2; margin-bottom: 15px; }
.drop-message small { display: block; margin-top: 13px; color: #b7aacd; }
.drop-message .button { min-height: 40px; border-color: transparent; }
.wave { display: flex; gap: 5px; align-items: center; justify-content: center; height: 54px; }
.wave i { display: block; width: 4px; border-radius: 3px; background: #b8a0ff; height: 28px; box-shadow: 0 0 11px #baa7f948; }
.wave i:nth-child(6n+1) { height: 12px; opacity: .56; }
.wave i:nth-child(6n+2) { height: 22px; opacity: .73; }
.wave i:nth-child(6n+3) { height: 35px; opacity: .85; }
.wave i:nth-child(6n+4) { height: 48px; }
.wave i:nth-child(6n+5) { height: 35px; opacity: .79; }
.wave i:nth-child(6n) { height: 22px; opacity: .59; }
.source-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 3px 1px 5px; gap: 8px; min-height: 48px; }
.source-foot > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.workflow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 13px 15px; margin-top: 12px; color: var(--muted); }
.workflow span { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; }
.workflow b { width: 22px; height: 22px; border: 1px solid #e0d9ed; border-radius: 50%; display: grid; place-items: center; background: #f9f7fe; color: var(--violet-dark); font-size: .75rem; }
.workflow .complete b { background: var(--violet); border-color: var(--violet); color: white; }
.workflow .connector { color: #8a809b; }
.settings-body { padding: 16px; display: grid; gap: 15px; }
.settings label > span:first-child, .field > span:first-child, .label-text { display: block; font-weight: 650; font-size: .89rem; margin-bottom: 5px; }
.label-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.label-line .label-text { margin: 0; }
input:not([type="checkbox"]):not([type="file"]), select, textarea { width: 100%; padding: 8px 9px; min-height: 37px; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
textarea { resize: vertical; min-height: 94px; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #777189; }
.checkline { display: flex; align-items: start; gap: 8px; color: var(--muted); font-size: .88rem; cursor: pointer; }
.checkline input { accent-color: var(--violet); margin: .25em 0 0; width: 16px; height: 16px; flex: 0 0 16px; }
.settings .checkline span { margin: 0; font-weight: 450; }
.language-list { display: grid; gap: 7px; }
.target { padding: 9px; background: #faf8fe; border: 1px solid #eae5f6; border-radius: 8px; min-width: 0; }
.target-top { display: flex; justify-content: space-between; gap: 6px; }
.target-name { font-size: .93rem; line-height: 1.35; overflow-wrap: anywhere; }
.target .actions { margin-top: 5px; }
.target .button { min-height: 30px; padding: 4px 7px; font-size: .82rem; }
.target .icon-button { min-height: 27px; min-width: 27px; font-weight: 500; padding: 0; align-self: start; }
.field-empty { border: 1px dashed var(--line-strong); border-radius: 8px; padding: 10px; color: var(--muted); font-size: .88rem; }
.summary { padding: 14px 16px 16px; background: #fbfaff; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.totals { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.totals strong { font-size: 1.23rem; color: #392c83; }
.summary > .button { display: flex; width: 100%; min-height: 43px; }
.status-text { margin-top: 7px; font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }
.hint-panel { border: 1px solid #e9e2fb; background: #f8f5ff; border-radius: 10px; padding: 10px 13px; margin-bottom: 13px; color: #554779; }
.recent { margin-top: 18px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; vertical-align: top; }
thead th { font-size: .79rem; font-weight: 690; color: var(--muted); background: #fbfaff; }
tbody tr + tr { border-top: 1px solid var(--line); }
.row-title { color: var(--ink); font-weight: 680; overflow-wrap: anywhere; }
.row-title + small { display: block; margin-top: 2px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 26px 12px; }
.empty p { margin: 4px 0; }
.table-scroll .button { min-height: 30px; padding: 4px 8px; font-size: .85rem; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar input, .toolbar select { width: auto; min-width: 120px; max-width: 100%; }
.table-panels { display: grid; gap: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat { padding: 16px; }
.stat strong { font-size: 1.6rem; line-height: 1.25; display: block; margin-top: 4px; font-variant-numeric: tabular-nums; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(208px,1fr)); gap: 13px; }
.asset-card { overflow: hidden; }
.asset-card img, .asset-card video { width: 100%; height: 140px; object-fit: contain; display: block; background: #211932; }
.asset-card .card-inner { padding: 12px; overflow-wrap: anywhere; }
.asset-card .actions { margin-top: 7px; }
.video-preview { width: 100%; aspect-ratio: 16 / 9; max-height: 340px; object-fit: contain; background: #191326; border-radius: 9px; }
.clip-list { display: grid; gap: 9px; }
.clip { display: grid; gap: 7px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.form-grid .wide { grid-column: 1 / -1; }
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 20% 15%, #e9e2ff, var(--bg) 58%); }
.login { max-width: 430px; width: 100%; padding: 20px; }
.login .brand { padding: 0 0 15px; }
.login form { display: grid; gap: 14px; margin-top: 17px; }
.device-trust { display:flex; gap:8px; align-items:center; margin:13px 0 5px; font-size:13px; cursor:pointer; }
.device-trust input[type=checkbox] { width:16px; height:16px; min-height:0; flex-shrink:0; }
#device-check[hidden] { display:none; }
.notice { position: fixed; bottom: 18px; right: 18px; z-index: 5; max-width: min(420px, calc(100vw - 36px)); padding: 10px 14px; background: #2c2148; color: white; border-radius: 9px; box-shadow: 0 6px 25px #23163933; }
.notice.error { background: #812a45; }
dialog { width: min(calc(100vw - 28px), 690px); max-height: calc(100dvh - 30px); padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 15px; box-shadow: 0 18px 80px #24173342; }
dialog::backdrop { background: #241a3d70; }
.dialog-head { display: flex; gap: 12px; justify-content: space-between; align-items: center; position: sticky; inset-block-start: 0; z-index: 2; background: var(--surface); padding: 15px 18px; border-bottom: 1px solid var(--line); }
.dialog-body { display: grid; gap: 13px; padding: 16px 18px 19px; }
.dialog-body > [role="alert"], #form-error { color: var(--red); }
.dialog-sticky { position: sticky; top: 67px; display: grid; gap: 8px; padding: 2px 0 9px; background: var(--surface); z-index: 1; }
.picker-list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.picker-button { display: flex; justify-content: space-between; align-items: center; text-align: left; gap: 8px; width: 100%; }
.picker-button small { color: var(--muted); white-space: normal; }
.picker-button[aria-pressed="true"] { color: var(--violet-dark); background: var(--violet-soft); border-color: #d8cef4; }
.voice-card { display: grid; gap: 5px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; }
.voice-card .row-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.voice-card audio { width: 100%; height: 33px; }
.timeline { display: grid; padding-left: 19px; color: var(--muted); gap: 6px; }
.timeline time { color: var(--quiet); }
details > summary { cursor: pointer; font-weight: 650; color: var(--violet-dark); }
.form-tail { padding-top: 5px; display: flex; justify-content: end; flex-wrap: wrap; gap: 8px; }
.mobile-menu { display: none; }
@media (max-width: 1100px) {
  .frame { grid-template-columns: 190px minmax(0,1fr); }
  .content { padding: 23px 20px 38px; }
  .topbar { padding: 0 19px; }
  .studio-grid { grid-template-columns: minmax(0,1fr) minmax(270px, 305px); gap: 13px; }
}
@media (max-width: 870px) {
  .frame { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 4; width: 226px; transform: translateX(-101%); transition: transform .15s ease; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax #1d143c60; }
  .mobile-menu { display: inline-flex; }
  .topbar { height: 57px; }
}
@media (max-width: 650px) {
  .content { padding: 19px 12px 29px; }
  .topbar { padding: 0 10px; }
  .topbar > div { gap: 7px; }
  .crumb, .topbar .desk-label { display: none; }
  .workspace-select { min-width: 105px; max-width: 50vw; }
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .source-card { padding: 9px; }
  .stage { min-height: 245px; }
  .page-head { align-items: start; }
  .page-head p { font-size: .92rem; }
  .page-head .button { min-height: 34px; padding: 5px 7px; }
  .workflow { display: none; }
  .card-header { padding: 13px; }
  .card-inner { padding: 13px; }
  .dialog-body, .dialog-head { padding-inline: 13px; }
  .stat { padding: 10px; }
  .stat strong { font-size: 1.4rem; }
  .stat-grid { gap: 6px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
}

/* The two portals share controls. Only the management pages use the teal accounting palette. */
html,body { overflow-x: clip; }
.staff { --violet:#126558; --violet-dark:#0a5148; --violet-soft:#e2f3ee; --navigation:#f8fbfa;
  --line:#dce6e3; --ink:#192f31; --muted:#536968; --line-strong:#c8d7d5; --bg:#f3f7f6; --radius:13px; }
.staff .logo { background:#124f49; }
.staff .nav-button[aria-current="page"], .staff .avatar-mark { color:#10584c; background:#e4f2ed; border-color:#d4e9df; }
.staff .nav-button:hover,.staff .button:not(.primary):hover { background:#edf6f1; }
.staff .nav-section { color:#617574; }
.staff th { background:#f5f9f7; }
.staff td,.staff th { vertical-align:middle; font-variant-numeric:tabular-nums; }
.staff th,.staff td:not(:first-child) { white-space:nowrap; }
.staff td small { display:block; }
.staff .card,.staff .table-panels,.dialog-body > *,.form-grid > * { min-width:0; }
.credit-detail { margin:-4px 0 10px; overflow-wrap:anywhere; }
.finance-stack .table-scroll { border-radius:0 0 12px 12px; }
.price-rule { background:#143e3b; color:#f5fffa; border-radius:15px; display:grid; grid-template-columns:1.12fr 1fr 1fr; padding:22px 0; margin-bottom:18px; }
.price-rule > div { padding:0 26px; min-width:0; }
.price-rule > div + div { border-left:1px solid #ffffff30; }
.price-rule span,.price-rule p { display:block; font-size:.9rem; color:#c7ded7; }
.price-rule strong { font-size:1.65rem; letter-spacing:-.02em; display:block; margin:3px 0; line-height:1.5; font-variant-numeric:tabular-nums; }
.price-rule div:first-child strong { color:#c8efc9; }
.price-grid td,.price-grid th { white-space:nowrap; padding:9px 12px; text-align:right; }
.price-grid td:first-child,.price-grid th:first-child { text-align:left; }
.price-grid td:nth-child(4),.price-grid th:nth-child(4) { background:#ecf7f1; color:#145c4c; }
.price-grid tr:hover { background:#f4f9f7; }
.point-ink { color:#155f55; font-variant-numeric:tabular-nums; }
.duration-box { display:flex; gap:7px; align-items:center; flex-shrink:0; font-size:.92rem; }
.duration-box input { width:84px; text-align:center; }
.compute-note { margin:-3px 2px 6px; }
.quote-strip { background:#eaf6f1; color:#174f43; border-radius:9px; padding:12px 15px; line-height:1.8; }
.error-copy { color:var(--red); }
.staff .dialog-body { grid-template-columns:minmax(0,1fr); }
.staff .table-scroll { max-width:100%; }
.staff .login { max-width:420px; }
.staff td:first-child { min-width:108px; overflow-wrap:anywhere; }
.staff .dialog-body p { overflow-wrap:anywhere; }
@media (max-width:700px) {
  .staff .card-header,.staff .page-head { flex-wrap:wrap; gap:10px; }
  .price-rule { grid-template-columns:1fr 1fr; padding:14px 0; gap:12px 0; }
  .price-rule > div { padding:0 14px; }
  .price-rule > div:first-child { grid-column:1/-1; }
  .price-rule > div:nth-child(2) { border-left:0; }
  .price-rule strong { font-size:1.16rem; }
  .staff .stat-grid { grid-template-columns:minmax(0,1fr); }
  .staff .stat { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; }
  .staff .stat strong { margin:0; font-size:1.15rem; }
  .staff .table-scroll .button,.staff .button,.staff .page-head .button { min-height:44px; }
  .staff .card-header > div { min-width:0; }
  .price-grid td:first-child,.price-grid th:first-child { position:sticky; left:0; background:var(--surface); }
}

.staff { background:var(--bg); color:var(--ink); }
.staff .hint-panel { color:#315953; background:#eef6f4; border-color:#d2e5e0; }
.duration-box { white-space:nowrap; }
.duration-box input[type="number"]:not([type="file"]) { width:86px; flex:0 0 86px; }
.narrow-help { display:none; }
@media (max-width:1100px) { .narrow-help { display:block; } }
.biz-stack { display:grid; gap:17px; grid-template-columns:minmax(0,1fr); }
.biz-stack .price-rule { margin:0; }
.biz-stack .price-rule strong { overflow-wrap:anywhere; }
.biz-stack .price-rule .loss,.staff .price-rule div:first-child strong.loss { color:#ffbd9b; }
.biz-stack .metric-row { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
.biz-stack .metric-row>div { padding:14px 18px; overflow-wrap:anywhere; }
.metric-row strong { display:block; margin-top:5px; font-size:1.16rem; font-variant-numeric:tabular-nums; }
.biz-stack .month-picker { width:auto; max-width:100%; }
.biz-stack .loss { color:#ab3b26; }
.biz-stack .wide-note { white-space:normal; min-width:140px; max-width:360px; overflow-wrap:anywhere; }
.biz-stack .status-text { margin:0; padding:10px 18px; }
.biz-stack .plan-summary { background:var(--violet-soft); color:var(--violet-dark); padding:18px; border-radius:10px; }
.plan-summary strong { font-size:1.4rem; display:block; font-variant-numeric:tabular-nums; }
.plan-summary span { display:block; margin-top:4px; }
.biz-stack .card + .card { margin-top:0; }
.biz-stack .form-grid { padding:18px; }
.biz-stack .stat-grid { margin-bottom:0; }
.biz-stack td .actions { flex-wrap:nowrap; }
.checkline span small { display:block; margin-top:3px; font-weight:400; }
.biz-stack .quick { display:flex; flex-wrap:wrap; gap:8px; padding:0 18px 15px; }
@media (max-width:760px) {
 .biz-stack .metric-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .biz-stack .metric-row>div { padding:12px; }
 .biz-stack .form-grid { grid-template-columns:minmax(0,1fr); padding:12px; }
 .biz-stack .quick { padding-inline:12px; }
 .biz-stack .price-rule strong { font-size:1.13rem; }
 .biz-stack .month-picker { min-width:0; }
}
.staff .page-head input.month-picker[type="month"] { flex:0 0 auto; width:170px; max-width:100%; }
.biz-stack td small { display:block; }
.stress-result { display:grid; gap:10px; }
.stress-result .quote-strip.loss { color:#872f1f; background:#fff0e8; }
.stress-result .quote-strip strong { display:block; font-size:1.35rem; }
.stress-result .metric-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
@media(max-width:720px) {
  .biz-stack .table-scroll table,.biz-stack .table-scroll tbody,.biz-stack .table-scroll tr { display:block; width:100%; min-width:0; }
  .biz-stack .table-scroll thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .biz-stack .table-scroll tr { padding:9px 13px; border-bottom:1px solid var(--line); }
  .biz-stack .table-scroll td,.staff .biz-stack td:first-child { display:block; padding:5px 0 5px 36%; text-align:right; border:0; white-space:normal; min-width:0; overflow-wrap:anywhere; position:relative; }
  .biz-stack .table-scroll td::before { content:attr(data-label); position:absolute; left:0; top:5px; max-width:35%; color:var(--muted); font-size:.85rem; text-align:left; }
  .biz-stack td .actions { justify-content:flex-end; flex-wrap:wrap; }
  .biz-stack .wide-note { min-width:0; }
  .biz-stack .table-scroll tr:last-child { border:0; }
  .biz-stack .table-scroll td:has(.button)::before { top:15px; }
  .staff .page-head input.month-picker[type="month"] { width:100%; }
}

.ledger-model { display:block; margin-top:3px; }
@media (max-width:720px) {
  body:not(.staff) .table-scroll :is(table,tbody) { display:block; width:100%; min-width:0; }
  body:not(.staff) .table-scroll thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  body:not(.staff) .table-scroll tr { display:block; padding:12px 14px; }
  body:not(.staff) .table-scroll td { display:grid; grid-template-columns:minmax(75px,30%) minmax(0,1fr); gap:5px 10px; padding:5px 0; text-align:right; overflow-wrap:anywhere; align-items:center; }
  body:not(.staff) .table-scroll td::before { content:attr(data-label); color:var(--muted); text-align:left; font-size:.87em; grid-column:1; grid-row:1; }
  body:not(.staff) .table-scroll td > * { grid-column:2; justify-self:end; max-width:100%; }
  body:not(.staff) .table-scroll .button { min-height:38px; }
  body:not(.staff) [data-jobs-list] .table-scroll tr { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px 10px; align-items:center; padding:15px 13px; }
  body:not(.staff) [data-jobs-list] .table-scroll td { display:block; padding:0; min-width:0; text-align:left; }
  body:not(.staff) [data-jobs-list] td > * { justify-self:auto; }
  body:not(.staff) [data-jobs-list] td::before { display:none; }
  body:not(.staff) [data-jobs-list] td:first-child { grid-column:1 / -1; }
  body:not(.staff) [data-jobs-list] td:first-child small { font-size:.88em; }
  body:not(.staff) [data-jobs-list] td:nth-child(2) { grid-column:1; grid-row:2; }
  body:not(.staff) [data-jobs-list] td:nth-child(3) { grid-column:2; grid-row:2; justify-self:end; }
  body:not(.staff) [data-jobs-list] td:nth-child(4) { grid-column:1; grid-row:3; font-weight:650; }
  body:not(.staff) [data-jobs-list] td:nth-child(5) { grid-column:1; grid-row:4; color:var(--muted); font-size:.85em; }
  body:not(.staff) [data-jobs-list] td:last-child { grid-column:2; grid-row:3 / span 2; justify-self:end; }
  body:not(.staff) [data-jobs-list] .button[data-action="open-job"] { min-height:42px; min-width:70px; }
}
