/* Amazon Ops / Wall Street edition. Presentation only; no data or calculation changes. */
:root {
  color-scheme: dark;
  --bg: #08090b;
  --bg2: #151719;
  --bg3: #1d1f21;
  --raise: #282a2c;
  --line: #303235;
  --line2: #727477;
  --text: #ffffff;
  --dim: #f0f0f0;
  --faint: #dadada;
  --gold: #f3b65f;
  --gold-soft: #352917;
  --green: #8fe0b7;
  --green-soft: #183329;
  --red: #ffaba7;
  --red-soft: #3f242a;
  --blue: #b0d4f2;
  --blue-soft: #233440;
  --accent-fill: #ffc45c;
  --accent-ink: #211407;
  --note-bg: var(--bg3);
  --note-text: var(--text);
  --note-label: var(--dim);
  --status-reset-bg: #352917;
  --status-reset-text: #ffd287;
  --status-lock-bg: #3f242a;
  --status-lock-text: #ffb5b8;
  --status-ok-bg: #183329;
  --status-ok-text: #b2edcc;
  --shadow: 0 16px 40px -24px #0009;
  --r: 24px;
  --ws-panel: var(--bg2);
  --ws-warm-panel: var(--gold-soft);
  --ws-heading: Montserrat, Inter, system-ui, sans-serif;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f0eb;
  --bg2: #fffefa;
  --bg3: #eeedea;
  --raise: #e5e4e1;
  --line: #c9c6bf;
  --line2: #88847c;
  --text: #1f2023;
  --dim: #383a3e;
  --faint: #53555a;
  --gold: #88520b;
  --gold-soft: #f4e6cd;
  --green: #17633f;
  --green-soft: #dbf3e6;
  --red: #96263c;
  --red-soft: #ffe4e7;
  --blue: #245d8e;
  --blue-soft: #dcecfb;
  --status-reset-bg: #f4e6cd;
  --status-reset-text: #6a4109;
  --status-lock-bg: #ffe4e7;
  --status-lock-text: #922b38;
  --status-ok-bg: #def0e4;
  --status-ok-text: #19533a;
  --shadow: 0 20px 55px -40px #50453124, inset 0 1px 0 #fff;
  --ws-panel: var(--bg2);
  --ws-warm-panel: var(--gold-soft);
}

html { scroll-padding-top: 112px; }
body {
  background: var(--bg);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  padding-bottom: 0;
  line-height: 1.45;
}
::selection { background: var(--accent-fill); color: var(--accent-ink); }
button, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button, a, input, textarea, select, summary { touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
button:disabled { cursor: wait; }
button:active:not(:disabled) { transform: translateY(1px); }
.disp { font-family: var(--ws-heading); }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.wrap { max-width: 1440px; padding: 44px 36px 28px; }
.view { min-width: 0; animation-duration: .3s; }
.top {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-color: var(--line);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.top-inner { max-width: 1512px; padding: 18px 36px; gap: 22px; }
.brand { gap: 13px; flex-shrink: 0; }
.mark {
  width: 47px; height: 47px; flex: 0 0 auto;
  border-radius: 16px;
  border: 1px solid var(--accent-fill);
  background: var(--accent-fill);
  box-shadow: none;
  color: var(--accent-ink);
}
.mark svg { width: 29px; height: 29px; display: block; }
.brand h1 { font: 800 18px/1.2 var(--ws-heading); letter-spacing: -.65px; }
.brand span { display: block; margin-top: 4px; color: var(--gold); font-size: 9px; letter-spacing: .18em; font-weight: 600; }
.nav {
  min-width: 0; gap: 3px; padding: 5px;
  border-radius: 19px;
  background: var(--ws-panel);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 #ffffff05;
}
.nav button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 9px 13px; border-radius: 14px;
  font-size: 12px; font-weight: 600; color: var(--dim); white-space: nowrap;
  transition: background .2s, color .2s;
}
.nav button:hover { color: var(--text); background: var(--bg3); }
.nav button.on {
  color: var(--accent-ink); background: var(--accent-fill);
  box-shadow: none;
}
[data-theme="light"] .nav button.on { color: var(--accent-ink); }
.nav-icon { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.user-tools { gap: 9px; flex-shrink: 0; }
.user-email { max-width: 125px; color: var(--dim); font-size: 11px; }
.signout { color: var(--dim); font-size: 11px; }
.themebtn, .iconbtn, .xbtn {
  background: var(--ws-panel); border: 1px solid var(--line); border-radius: 13px;
  color: var(--dim); box-shadow: inset 0 1px 0 #ffffff03;
}
.themebtn { width: 40px; height: 40px; }
.eyebrow {
  gap: 11px; color: var(--gold); font-size: 10px; font-weight: 700;
  letter-spacing: .2em; line-height: 1.6; margin-bottom: 17px;
}
.eyebrow:before { content: ""; flex: 0 0 32px; height: 1px; background: var(--gold); }
.eyebrow:after { display: none; }
.ws-heading { margin-bottom: 30px; }
.ws-heading h2, .ws-page-heading h2, .tech-head h2, .archive-title {
  font: 750 clamp(28px, 2.8vw, 36px)/1.16 var(--ws-heading);
  letter-spacing: -.045em; margin: 0; color: var(--text);
}
.ws-heading p, .ws-page-heading p, .tech-head p, .archive-copy {
  max-width: 710px; color: var(--dim); font-size: 13px; line-height: 1.65; margin-top: 12px;
}
.ws-heading .eyebrow, .ws-page-heading .eyebrow, .tech-head .eyebrow { margin-bottom: 12px; }
.ws-page-heading { min-width: 0; }
.acc-head { align-items: center; gap: 20px; margin-bottom: 24px; }
.acc-head .eyebrow { margin-bottom: 12px; }
.head-actions { gap: 9px; }

/* A film-inspired cover, with the numbers kept in a high-contrast reading area. */
.ws-hero {
  min-height: 407px; padding: 36px 42px; margin-bottom: 24px;
  border: 1px solid #59503d; border-radius: 30px;
  background: #1a1510 url('./hero-broker.jpg') right 15% / cover no-repeat;
  box-shadow: 0 22px 54px -36px #000, inset 0 0 0 1px #ffe4bf12;
  isolation: isolate;
}
.ws-hero:before {
  content: ""; position: absolute; z-index: -1; inset: 0; width: auto; height: auto;
  background: linear-gradient(90deg, #100e0af2 0%, #100e0aeb 26%, #100e0aad 49%, #100e0a05 75%), linear-gradient(0deg, #0c0b09b3, transparent 50%);
}
.ws-hero:after {
  content: ""; position: absolute; left: 42px; top: 88px; width: 40px; height: 1px;
  background: #f3b65f70;
}
.ws-hero-content { position: relative; z-index: 1; max-width: 640px; }
.ws-kicker { color: #e3b16c; font: 500 10px/1.5 "JetBrains Mono", monospace; letter-spacing: .16em; }
.ws-hero h3 {
  font: 800 clamp(28px, 3.3vw, 45px)/1.09 var(--ws-heading);
  letter-spacing: -.045em; color: #fffaf2; margin: 33px 0 25px;
}
.ws-hero .hero-label { color: #c9beb0; font-size: 11px; letter-spacing: .05em; }
.ws-hero .hero-val { font: 800 clamp(43px, 5.6vw, 66px)/1.05 var(--ws-heading); letter-spacing: -.055em; color: #ffc87b; margin: 6px 0 9px; overflow-wrap: anywhere; }
.ws-hero .hero-sub { color: #b9b0a3; font-size: 11px; line-height: 1.65; max-width: 520px; }
.ws-hero .hero-sub b { color: #eee6d9; font-weight: 600; }
.ws-hero-side {
  position: absolute; right: 30px; bottom: 28px; padding: 10px 14px;
  border: 1px solid #eee3c329; border-radius: 100px; color: #fff1dc;
  background: #100e0a8c; backdrop-filter: blur(10px);
  font: 500 9px/1.5 "JetBrains Mono", monospace; letter-spacing: .16em;
  display: flex; align-items: center; gap: 10px; max-width: calc(100% - 50px);
}
.ws-hero-side b { font-weight: 500; }
.ws-hero-side > :last-child { color: #d5b589; padding-left: 10px; border-left: 1px solid #eee3c329; }
.stats, .ledger-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat {
  min-width: 0; min-height: 158px; padding: 21px 23px; border-radius: 24px;
  background: var(--ws-panel); border-color: var(--line);
  box-shadow: inset 0 1px 0 #ffffff05;
}
.stat:hover { border-color: var(--line2); transform: translateY(-2px); }
.stat .ic { width: 32px; height: 32px; margin-bottom: 18px; border-radius: 10px; font-size: 16px; }
.stat .k { color: var(--dim); font-size: 11px; font-weight: 500; line-height: 1.5; }
.stat .v { font: 750 clamp(24px, 2.6vw, 31px)/1.2 Inter, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.045em; margin-top: 5px; overflow-wrap: anywhere; }
.capital-edit { top: 17px; right: 17px; border-radius: 10px; color: var(--faint); background: var(--bg3); }
.mini { margin-top: 31px; }
.mini > .eyebrow { color: var(--faint); font-size: 9px; margin-bottom: 16px; }
.mini > .eyebrow:after { display: block; margin-left: 8px; }
.mini-row { grid-template-columns: minmax(110px, 1.6fr) repeat(6, minmax(0, 1fr)); gap: 10px; padding: 17px 20px; border-radius: 15px; background: var(--bg2); }
.mini-head { background: transparent; padding-block: 7px; }
.mini-head span { font-size: 9px; color: var(--faint); letter-spacing: .08em; }
.mini .nm { font: 600 13px Inter, sans-serif; }
.cell, .cell.mono { font-size: 12px; }
.ws-dashboard-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 29px 4px 7px; margin-top: 10px; color: var(--faint);
  font: 10px/1.6 "JetBrains Mono", monospace;
}
.ws-dashboard-foot > :first-child { color: var(--gold); text-transform: uppercase; letter-spacing: .11em; }
.ws-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-top: 43px; padding: 20px 2px 4px; border-top: 1px solid var(--line);
  color: var(--faint); font-size: 9px; line-height: 1.8; letter-spacing: .14em; text-transform: uppercase;
}
.ws-footer strong { color: var(--dim); font-weight: 600; }
.ws-footer i { font-style: normal; color: var(--gold); margin-left: 7px; }

/* Buttons and records have the same graphite / warm-metal language as the cover. */
.btn-gold {
  background: var(--accent-fill);
  color: var(--accent-ink); border: 1px solid var(--accent-fill); border-radius: 13px;
  font-weight: 750; padding: 12px 19px; font-size: 12px; min-height: 43px;
  box-shadow: none;
}
.btn-gold:hover { filter: brightness(1.06); box-shadow: none; }
.btn-ghost { border-radius: 13px; background: linear-gradient(145deg, var(--raise), var(--bg3)); font-size: 12px; padding: 11px 13px; min-height: 42px; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line2); background: var(--raise); }
.small-btn { border-radius: 8px; font-size: 10px; padding: 6px 9px; min-height: 28px; background: var(--bg3); }
.grid, .archive-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 355px), 1fr)); gap: 20px; }
.card, .archive-card {
  min-width: 0; padding: 24px; gap: 19px; border-radius: 27px;
  border: 1px solid var(--line); background: var(--ws-panel); box-shadow: inset 0 1px 0 #ffffff05;
}
.card:hover { box-shadow: var(--shadow); border-color: var(--line2); }
.card-top, .archive-card-head { gap: 13px; }
.av {
  width: 48px; height: 48px; border-radius: 15px; background: var(--ws-warm-panel);
  color: var(--gold); border-color: var(--line2); font: 750 18px var(--ws-heading);
}
.nm { font: 750 17px/1.3 var(--ws-heading); letter-spacing: -.025em; }
.loc { margin-top: 5px; color: var(--faint); font-size: 11px; }
.account-status-row { gap: 11px; }
.account-status-control > span, .card-last-four { font-size: 10px; }
.account-status-select { min-height: 36px; border-radius: 10px; border-color: var(--line2); padding: 8px 10px; font: 650 11px Inter, sans-serif; }
.account-status-select[data-status="reset"] { border-color: #efb66b66; }
.account-status-select[data-status="locked"] { border-color: #fb969159; }
.account-status-select[data-status="ok"] { border-color: #75d8ab59; }
.card-last-four { padding: 8px 0; }
.card-last-four b { font-size: 12px; }
.account-note-preview { border-radius: 12px; border-left: 2px solid #b9864466; padding: 12px 14px; background: var(--bg3); font-size: 11.5px; }
.card-fin { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; padding: 17px 0; border-color: var(--line); }
.fin-c { min-width: 0; }
.fin-c .l { color: var(--faint); font-size: 9px; letter-spacing: .045em; line-height: 1.45; }
.fin-c .n { font: 700 16px/1.3 Inter, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.035em; overflow-wrap: anywhere; }
.workflow, .timer, .workflow-modal { border-radius: 16px; background: var(--bg3); border-color: var(--line); }
.workflow { padding: 17px 13px 13px; }
.workflow-step { font-size: 9px; }
.workflow-step i { width: 7px; height: 7px; }
.workflow-action { border-radius: 10px; font-size: 11px; padding-inline: 10px; }
.workflow-note { font-size: 10px; line-height: 1.6; flex-wrap: wrap; }
.workflow-return { border-color: #c3994d50; border-radius: 11px; }
.card-dates { color: var(--faint); font-size: 10px; gap: 10px; flex-wrap: wrap; }
.card-actions .btn-ghost { font-size: 11px; min-height: 39px; }
.empty, .archive-empty { border: 1px dashed var(--line2); border-radius: 27px; background: var(--ws-panel); padding-block: 70px; }
.empty .big { font: 750 22px var(--ws-heading); letter-spacing: -.035em; }
.empty p { line-height: 1.65; color: var(--dim); }
.archive-count { border-radius: 100px; color: var(--dim); padding: 10px 14px; background: var(--ws-panel); }
.archive-badge { font-size: 9px; padding: 6px 9px; border: 1px solid #75d8ab21; }
.archive-resource { border-radius: 13px; }
.archive-fin { gap: 13px; padding-block: 17px; }

/* Accounting keeps dense data readable, with expandable folders intact. */
.ledger-stats { margin-bottom: 25px; }
.ledger-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ledger-panel, .tech-panel {
  min-width: 0; border-radius: 25px; border-color: var(--line); background: var(--ws-panel);
  box-shadow: inset 0 1px 0 #ffffff05;
}
.ledger-title, .tech-panel-head { padding: 22px 23px; border-color: var(--line); gap: 12px; }
.ledger-title, .tech-panel-head h3 { font: 750 15px/1.4 var(--ws-heading); letter-spacing: -.025em; }
.ledger-title span, .tech-panel-head span { font: 11px/1.5 Inter, sans-serif; color: var(--faint); }
.ledger-list, .tech-list { padding: 10px; }
.ledger-row { padding: 16px 13px; gap: 12px; border-radius: 14px; }
.ledger-row .title { font-size: 13px; }
.ledger-row .sub { font-size: 11px; line-height: 1.65; }
.ledger-row .sum { font: 700 16px/1.4 Inter, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.ledger-row .controls { gap: 6px; }
.ledger-row.paid .title, .ledger-row.paid .sub, .ledger-row.paid .sum { opacity: .7; }
.ledger-note { font-size: 11px; line-height: 1.7; padding: 15px 23px; color: var(--dim); }
.expense-folders { padding: 14px; }
.expense-folder { border-radius: 16px; background: var(--bg3); }
.expense-folder-head { padding: 17px 16px; }
.expense-folder-name { font: 650 13px/1.4 Inter, sans-serif; }
.expense-folder-meta { font-size: 10px; line-height: 1.5; }
.expense-folder-sum { font: 700 16px/1.4 Inter, sans-serif; letter-spacing: -.025em; }
.expense-folder-chevron { font-size: 21px; }
.expense-folder-body { background: var(--bg2); }

/* Full-screen workspaces, modals and technical inventory. */
.tech-head { align-items: flex-start; margin-bottom: 28px; gap: 26px; position: relative; isolation: isolate; }
.tech-head:before { content: ""; position: absolute; z-index: -1; right: 0; top: -18px; bottom: -12px; width: 50%; border-radius: 22px; background: url('./desk-detail.jpg') center 55% / cover; opacity: .2; mask-image: linear-gradient(90deg, transparent, #000); pointer-events: none; }
.tech-head > :first-child { min-width: 0; flex: 1; }
.tech-actions { justify-content: flex-end; gap: 8px; max-width: 620px; flex: 1; }
.tech-actions button { min-height: 38px; font-size: 10px; padding: 10px 12px; flex: 0 1 auto; }
.tech-status { margin: 22px 0; gap: 12px; }
.tech-source { background: var(--bg2); border-radius: 14px; padding: 12px 15px; font-size: 11px; line-height: 1.6; }
.tech-dot { width: 6px; height: 6px; box-shadow: 0 0 0 4px var(--red-soft); margin-inline: 2px; flex: none; }
.tech-layout { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tech-panel-head { flex-wrap: wrap; }
.tech-list.scroll { height: clamp(340px, 52vh, 520px); }
.tech-row { padding: 14px 11px; border-radius: 14px; }
.tech-row-main { gap: 10px; flex-wrap: wrap; }
.tech-icon { width: 37px; height: 37px; border-radius: 12px; font: 650 14px Inter, sans-serif; }
.tech-meta { min-width: 100px; }
.tech-title { font-size: 12px; }
.tech-sub, .tech-note { font-size: 10px; }
.tech-row-actions { flex-wrap: wrap; margin-left: auto; gap: 6px; }
.tech-row-actions .small-btn { font-size: 9px; padding: 5px 7px; }
.tech-binding { font-size: 9px; padding: 4px 7px; }
.tech-code { font-size: 17px; letter-spacing: .08em; border-radius: 10px; }
.tech-code-detail { margin-left: 0; border-radius: 13px; }
.tech-code-detail-text, .tech-message-text { line-height: 1.75; font-size: 11px; }
.tech-message { border-radius: 12px; }
.tech-secret-row { flex-wrap: wrap; }
.tech-secret-row input { min-width: 120px; }
.tech-otp-code { font-size: 36px; }
.tech-otp-result { background: linear-gradient(135deg, var(--gold-soft), transparent 80%); }
.tech-quote>div, .tech-modal-result, .resource-choice { border-radius: 15px; }
.tech-result-line { gap: 20px; }
.tech-result-line strong { font-size: 11px; }
.resource-choice-main strong { overflow-wrap: anywhere; }
.scrim { background: #030304c2; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 34px 16px; }
.modal { max-width: 800px; border-radius: 28px; border-color: var(--line2); background: var(--bg2); box-shadow: 0 35px 110px -30px #000b; }
.modal-head { padding: 24px 28px; border-radius: 28px 28px 0 0; background: var(--bg2); }
.modal-head input.title { font: 750 21px/1.3 var(--ws-heading); letter-spacing: -.045em; min-width: 0; }
.modal-head h2, .modal-head h3 { font-family: var(--ws-heading); letter-spacing: -.035em; line-height: 1.3; }
.modal-head .av { border-radius: 14px; }
.modal-body { padding: 26px 28px 30px; }
.modal-foot { padding: 0 28px 28px; gap: 12px; }
.modal-foot .btn-gold { min-height: 46px; }
.modal-foot .btn-ghost { min-height: 46px; }
.sect-t { color: var(--gold); letter-spacing: .13em; font-size: 10px; margin-top: 29px; }
.f-grid, .money-row, .tech-form-grid { gap: 16px; }
.field { min-width: 0; gap: 7px; }
.field label, .tech-field label { color: var(--dim); font-size: 11px; font-weight: 500; }
.field input, .field select, .account-note-field textarea,
.auth-form input, .auth-form textarea,
.tech-field input, .tech-field textarea, .tech-secret-row input {
  min-width: 0; max-width: 100%; min-height: 43px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg3); color: var(--text);
  padding: 12px 13px; font-size: 12px; line-height: 1.5;
  box-shadow: inset 0 1px 2px #00000008;
}
.field input:focus, .field select:focus, .account-note-field textarea:focus,
.auth-form input:focus, .auth-form textarea:focus,
.tech-field input:focus, .tech-field textarea:focus, .tech-secret-row input:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); outline: none;
}
input::placeholder, textarea::placeholder { color: var(--faint); opacity: .85; }
.account-note-field textarea { line-height: 1.7; min-height: 105px; }
.mini-btn { right: 7px; border-radius: 8px; }
.field-hint, .tech-form-hint, .tax-note { line-height: 1.7; font-size: 10px; color: var(--faint); }
.field-inline-actions { gap: 7px; margin-top: 8px; }
.field-inline-actions button { font-size: 9px; }
.field-resource-status { line-height: 1.6; }
.password-history { padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.password-history-add { font-size: 11px; }
.password-history-row > .small-btn { height: 43px; }
.profit-box { border-radius: 13px; border-color: #b8864380; padding: 12px 14px; }
.profit-box .n { font: 750 22px/1.2 Inter, sans-serif; }
.profit-box .l { font-size: 9px; }
.consumable-row { padding: 12px; border-radius: 13px; gap: 8px; grid-template-columns: 1.1fr .65fr 1fr 1.05fr auto; }
.consumable-row input { font-size: 11px; padding: 10px; min-width: 0; border-radius: 9px; }
.folder { border-radius: 17px; padding: 16px; }
.drop { border-radius: 12px; padding: 20px 12px; line-height: 1.6; }
.thumb { border-radius: 11px; }
.thumb .del { opacity: 1; }
.tech-form { padding: 24px 28px; gap: 16px; }
.tech-modal-copy { padding: 0 28px 24px; font-size: 12px; line-height: 1.75; }
.account-otp-card { border-radius: 14px; }
.account-otp-ready code { font-size: 21px; }
.toast { max-width: calc(100vw - 30px); width: max-content; font-size: 12px; line-height: 1.6; border-radius: 16px; padding: 13px 19px; background: var(--raise); }
.toast:not(.on) { visibility: hidden; opacity: 0; pointer-events: none; }
.toast.on { visibility: visible; opacity: 1; }
.live-notice { border-radius: 19px; background: var(--ws-panel); }
.live-notice-title { font-family: var(--ws-heading); font-size: 15px; }
.live-notice-code { color: var(--gold); border-radius: 10px; }

/* Authentication is a private-office spread, not a stock login template. */
.auth-shell { padding: 44px; background: var(--bg); }
.auth-shell:has(.ws-auth-scene) { grid-template-columns: minmax(0, 1.2fr) minmax(350px, 470px); gap: 60px; align-items: center; justify-content: center; padding: 50px max(44px, calc((100vw - 1360px) / 2)); }
.ws-auth-scene {
  width: 100%; align-self: stretch; min-height: 650px; position: relative;
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: 46px; border: 1px solid #524637; border-radius: 32px; overflow: hidden;
  background: #17130f url('./desk-detail.jpg') center / cover no-repeat;
  color: #fff6e9; isolation: isolate;
}
.ws-auth-scene:before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, #0b0907dc 0%, #0b0907ad 33%, #0b090721 75%, #0b0907a8 100%); }
.ws-auth-scene:after { content: "01 / PRIVATE OFFICE"; margin-top: auto; padding-top: 70px; color: #ddbd90; font: 9px/1.7 "JetBrains Mono", monospace; letter-spacing: .2em; }
.ws-auth-tag { font-size: 9px; font-weight: 700; letter-spacing: .2em; color: #f3c184; }
.ws-auth-scene h2 { font: 800 clamp(37px, 4.6vw, 64px)/1.04 var(--ws-heading); letter-spacing: -.055em; margin: 37px 0 20px; max-width: 580px; }
.ws-auth-scene p { max-width: 340px; color: #c8bbac; font-size: 12px; line-height: 1.8; }
.ws-auth-caption { margin-top: auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 50px; color: #ddbd90; font: 9px/1.7 "JetBrains Mono", monospace; letter-spacing: .12em; }
.ws-auth-caption b { font-weight: 500; color: #fff1db; }
.ws-auth-scene:has(.ws-auth-caption):after { display: none; }
.auth-card { width: 100%; max-width: 470px; padding: 38px; border-radius: 29px; background: var(--ws-panel); border-color: var(--line); box-shadow: var(--shadow); }
.auth-brand { gap: 15px; margin-bottom: 32px; }
.auth-brand .mark { width: 53px; height: 53px; border-radius: 17px; }
.auth-brand h2 { font: 800 24px/1.2 var(--ws-heading); letter-spacing: -.05em; }
.auth-brand p { color: var(--faint); font-size: 10px; margin-top: 5px; }
.auth-tabs { border-radius: 14px; padding: 5px; background: var(--bg); margin-bottom: 23px; gap: 4px; }
.auth-tabs button { border-radius: 10px; font-size: 11px; font-weight: 600; min-height: 40px; }
.auth-tabs button.on { background: var(--ws-warm-panel); color: var(--gold); }
.auth-form { gap: 17px; }
.auth-form label { gap: 8px; font-size: 11px; color: var(--dim); }
.auth-form input { min-height: 48px; }
.auth-form .btn-gold { font-size: 13px; padding: 14px 18px; min-height: 49px; margin-top: 7px; }
.auth-message { font-size: 12px; line-height: 1.7; border-radius: 13px; background: var(--bg3); }
.auth-message.err { background: var(--red-soft); border-color: #d46c6266; }
.auth-note { color: var(--faint); font-size: 10px; line-height: 1.8; margin-top: 22px; }

@media (max-width: 1320px) {
  .top-inner { flex-wrap: wrap; gap: 12px 22px; padding: 16px 30px; }
  .brand { margin-right: auto; }
  .user-tools { margin-left: auto; }
  .nav { order: 3; width: 100%; justify-content: center; }
  .nav button { flex: 1; padding-inline: 12px; }
  .wrap { padding-top: 35px; }
  .tech-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tech-panel.wide { grid-column: 1 / -1; }
  .tech-head { flex-direction: column; gap: 19px; }
  .tech-actions { justify-content: flex-start; max-width: none; flex: auto; }
}

@media (max-width: 1000px) {
  .wrap { padding-inline: 26px; }
  .ws-hero { min-height: 390px; }
  .ws-hero:before { background: linear-gradient(90deg, #100e0af0 0%, #100e0ac2 38%, #100e0a44 77%), linear-gradient(0deg, #0c0b09b3, transparent 65%); }
  .ws-hero-content { max-width: 530px; }
  .ws-hero-side { right: 23px; bottom: 22px; }
  .stat { padding: 20px; }
  .stats, .ledger-stats { gap: 13px; }
  .mini-row { gap: 7px; padding-inline: 14px; }
  .cell, .cell.mono { font-size: 10px; }
  .mini-head span { font-size: 8px; }
  .auth-shell:has(.ws-auth-scene) { gap: 26px; padding: 32px; grid-template-columns: minmax(0, 1fr) minmax(330px, 410px); }
  .ws-auth-scene { padding: 32px; min-height: 600px; }
  .ws-auth-scene h2 { font-size: 41px; }
  .auth-card { padding: 30px; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 85px; }
  body { padding-bottom: calc(101px + env(safe-area-inset-bottom, 0px)); }
  /* A filtered ancestor would anchor the fixed mobile dock to the header. */
  .top { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .top-inner { padding: 14px 19px; flex-wrap: nowrap; gap: 9px; }
  .brand { gap: 10px; }
  .brand .mark { width: 39px; height: 39px; border-radius: 13px; }
  .brand .mark svg { width: 25px; height: 25px; }
  .brand h1 { font-size: 16px; letter-spacing: -.65px; }
  .brand span { font-size: 7px; letter-spacing: .17em; margin-top: 4px; }
  .user-email { display: none; }
  .user-tools { gap: 4px; }
  .signout { font-size: 10px; padding: 7px; }
  .themebtn { width: 34px; height: 34px; border-radius: 11px; }
  .nav {
    position: fixed; z-index: 42; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: auto; margin: 0; padding: 6px; display: flex; justify-content: flex-start; gap: 3px;
    background: color-mix(in srgb, var(--bg3) 95%, transparent);
    border: 1px solid var(--line2); border-radius: 24px;
    box-shadow: 0 4px 24px #0005, inset 0 1px 0 #ffffff0a;
    backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav button { flex: 1 0 69px; flex-direction: column; gap: 5px; padding: 10px 7px 9px; min-height: 62px; border-radius: 18px; font-size: 8px; font-weight: 650; }
  .nav-icon { width: 21px; height: 21px; }
  .nav button.on { color: var(--accent-ink); }
  .wrap { padding: 29px 18px 12px; }
  .ws-heading { margin-bottom: 23px; }
  .ws-heading h2, .ws-page-heading h2, .tech-head h2, .archive-title { font-size: clamp(28px, 7vw, 37px); letter-spacing: -.05em; }
  .ws-heading p, .ws-page-heading p, .tech-head p, .archive-copy { font-size: 11px; line-height: 1.75; margin-top: 11px; }
  .eyebrow { font-size: 8px; letter-spacing: .18em; gap: 9px; }
  .eyebrow:before { flex-basis: 23px; }
  .ws-hero { min-height: 392px; padding: 27px 25px 58px; border-radius: 25px; background-position: 63% center; margin-bottom: 18px; }
  .ws-hero:before { background: linear-gradient(90deg, #100e0af0 0%, #100e0ac2 50%, #100e0a5c 100%), linear-gradient(0deg, #0c0b0999, transparent 70%); }
  .ws-hero:after { top: 70px; left: 25px; }
  .ws-kicker { font-size: 8px; letter-spacing: .13em; }
  .ws-hero h3 { font-size: clamp(27px, 7vw, 37px); margin: 31px 0 24px; max-width: 440px; }
  .ws-hero .hero-label { font-size: 10px; }
  .ws-hero .hero-val { font-size: 47px; margin-top: 8px; }
  .ws-hero .hero-sub { font-size: 10px; line-height: 1.8; max-width: 290px; }
  .ws-hero-side { right: auto; left: 25px; bottom: 19px; font-size: 7px; padding: 6px 10px; }
  .ws-hero-side > :last-child { display: none; }
  .stats, .ledger-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .stat { border-radius: 20px; padding: 18px 17px; min-height: 143px; }
  .stat .ic { width: 28px; height: 28px; border-radius: 9px; margin-bottom: 15px; font-size: 14px; }
  .stat .k { font-size: 10px; }
  .stat .v { font-size: 25px; margin-top: 5px; }
  .capital-edit { top: 12px; right: 12px; width: 27px; height: 27px; border-radius: 9px; }
  .mini { margin-top: 22px; }
  .mini-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 19px; gap: 10px; border-radius: 18px; margin-bottom: 10px; }
  .mini-head { display: none; }
  .mini .nm { grid-column: 1 / -1; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 3px; font-size: 13px; }
  .cell, .cell.mono { font-size: 11px; }
  .mini-row .cell:before { content: attr(data-l); display: block; color: var(--faint); font: 9px/1.5 Inter, sans-serif; margin-bottom: 4px; }
  .ws-dashboard-foot { flex-direction: column; align-items: flex-start; gap: 5px; font-size: 9px; padding-top: 22px; }
  .ws-footer { margin-top: 30px; padding-top: 18px; gap: 5px; flex-direction: column; align-items: flex-start; font-size: 7px; }
  .acc-head { align-items: stretch; flex-direction: column; gap: 19px; margin-bottom: 23px; }
  .acc-head > .btn-gold, .acc-head > .btn-ghost { align-self: flex-start; }
  .head-actions { width: 100%; }
  .head-actions .btn-gold, .head-actions .btn-ghost { flex: 1; justify-content: center; }
  .grid, .archive-grid { grid-template-columns: 1fr; gap: 15px; }
  .card, .archive-card { border-radius: 24px; padding: 22px; gap: 18px; }
  .card-fin { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .archive-fin { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fin-c .n { font-size: 16px; }
  .card-dates { font-size: 9px; }
  .ledger-grid, .tech-layout { grid-template-columns: 1fr; gap: 16px; }
  .ledger-title, .tech-panel-head { padding: 20px; font-size: 14px; }
  .ledger-panel, .tech-panel { border-radius: 22px; }
  .ledger-title span, .tech-panel-head span { font-size: 10px; }
  .ledger-row { padding: 15px 11px; }
  .ledger-note { padding: 15px 20px; font-size: 10px; }
  .expense-folders { padding: 10px; }
  .expense-folder-head { padding: 15px 13px; gap: 9px; }
  .expense-folder-name { font-size: 12px; }
  .expense-folder-sum { font-size: 14px; }
  .tech-head { gap: 20px; }
  .tech-actions { gap: 8px; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tech-actions button { font-size: 10px; padding-inline: 7px; justify-content: center; min-height: 39px; }
  .tech-source { font-size: 10px; flex: 1 1 100%; padding: 12px 14px; }
  .tech-panel.wide { grid-column: auto; }
  .tech-row-main { align-items: center; }
  .tech-row-actions { width: auto; }
  .tech-title { font-size: 12px; }
  .tech-list.scroll { height: 370px; }
  .tech-totp { grid-template-columns: 1fr; }
  .tech-totp-form { padding: 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .tech-otp-result { min-height: 200px; }
  .tech-otp-code { font-size: 31px; }
  .tech-form-grid { grid-template-columns: 1fr; }
  .scrim { padding: 14px 9px; }
  .modal { border-radius: 23px; }
  .modal-head { padding: 20px; border-radius: 23px 23px 0 0; gap: 10px; }
  .modal-head input.title { font-size: 19px; }
  .modal-head .av { width: 39px; height: 39px; font-size: 16px; }
  .modal-head h2 { font-size: 19px; }
  .xbtn { width: 33px; height: 33px; border-radius: 10px; }
  .modal-body { padding: 22px 20px; }
  .modal-foot { padding: 0 20px 22px; gap: 8px; }
  .modal-foot .btn-ghost { padding-inline: 15px; }
  .f-grid, .folders, .money-row { grid-template-columns: 1fr; }
  .field input, .field select, .account-note-field textarea, .auth-form input, .auth-form textarea, .tech-field input, .tech-field textarea, .tech-secret-row input { font-size: 16px; min-height: 46px; }
  .password-history { padding: 13px; border-radius: 13px; }
  .password-history-row { gap: 7px; }
  .password-history-row > .small-btn { font-size: 9px; padding-inline: 7px; height: 46px; }
  .password-history-add { font-size: 10px; }
  .consumable-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 9px; padding: 11px; }
  .consumable-row input { font-size: 12px; }
  .consumable-row input:nth-child(1) { grid-column: 1 / 3; }
  .consumable-row input:nth-child(2) { grid-column: 1; }
  .consumable-row input:nth-child(3) { grid-column: 2; }
  .consumable-row input:nth-child(4) { grid-column: 1 / 3; }
  .consumable-row .remove { grid-column: 3; grid-row: 1 / 4; }
  .tech-form { padding: 23px 20px; }
  .tech-modal-copy { padding: 0 20px 22px; }
  .tech-modal-result, .tech-quote, .tech-warning { margin-inline: 20px; }
  .tech-result-line { flex-wrap: wrap; gap: 5px; }
  .tech-result-line strong { text-align: left; }
  .tech-quote strong { font-size: 16px; }
  .live-notices { top: 77px; right: 10px; width: min(370px, calc(100vw - 20px)); }
  .toast { bottom: calc(101px + env(safe-area-inset-bottom, 0px)); padding: 12px 16px; font-size: 11px; }
  .auth-shell { padding: 25px 17px; min-height: 100dvh; }
  .auth-shell:has(.ws-auth-scene) { grid-template-columns: 1fr; gap: 19px; padding: 24px 17px; align-content: center; }
  body:has(.auth-shell:not(.hidden)) { padding-bottom: 0; }
  .ws-auth-scene { min-height: 274px; max-width: 500px; padding: 27px; border-radius: 25px; background-position: center 65%; }
  .ws-auth-scene:before { background: linear-gradient(90deg, #0b0907e5, #0b090783); }
  .ws-auth-tag { font-size: 7px; letter-spacing: .17em; }
  .ws-auth-scene h2 { font-size: 36px; margin: 23px 0 13px; letter-spacing: -.055em; }
  .ws-auth-scene p { font-size: 10px; max-width: 255px; }
  .ws-auth-scene:after { font-size: 7px; padding-top: 24px; }
  .ws-auth-caption { font-size: 7px; padding-top: 24px; }
  .auth-card { padding: 28px 25px; border-radius: 25px; max-width: 500px; }
  .auth-brand { margin-bottom: 25px; }
  .auth-brand h2 { font-size: 22px; }
  .auth-brand .mark { width: 45px; height: 45px; border-radius: 15px; }
  .auth-note { font-size: 10px; }
}

@media (max-width: 380px) {
  .wrap { padding-inline: 13px; }
  .top-inner { padding-inline: 14px; }
  .brand h1 { font-size: 15px; }
  .brand span { font-size: 6px; }
  .card, .archive-card { padding: 18px; }
  .ws-hero { padding-inline: 22px; }
  .ws-hero:after, .ws-hero-side { left: 22px; }
  .ws-hero h3 { font-size: 27px; }
  .stat { padding: 16px 14px; }
  .stat .v { font-size: 23px; }
  .nav button { flex-basis: 64px; }
}

/* Compact cover and a readable, full-width working portfolio. */
.wrap { max-width: 1232px; padding-top: 28px; }
.ws-banner {
  width: 100%; min-height: 260px; margin: 0; padding: 28px max(36px, calc((100% - 1440px) / 2));
  border-width: 0 0 1px; border-radius: 0; box-shadow: none;
  background-position: right 15%;
}
#app:has(#view-dash:not(.on)) > .ws-banner { display: none; }
.ws-banner:before { background: linear-gradient(90deg, #0d0d0cf5, #0d0d0ce0 26%, #0d0d0c55 60%, #0d0d0c10), linear-gradient(0deg, #08090b88, transparent 65%); }
.ws-banner:after { display: none; }
.ws-banner .ws-hero-content { max-width: 650px; }
.ws-banner h2 { margin: 9px 0 17px; font: 750 clamp(22px, 2.2vw, 32px)/1.2 var(--ws-heading); letter-spacing: -.04em; color: #fffaf2; }
.ws-banner .hero-label { font-size: 13px; color: #ded5c8; }
.ws-banner .hero-val { font-size: clamp(38px, 4vw, 52px); margin: 4px 0 8px; }
.ws-banner .hero-sub { font-size: 13px; color: #c5beb4; }
.ws-banner .ws-hero-side { right: max(36px, calc((100% - 1440px) / 2)); bottom: 22px; }
.ws-page-heading p, .tech-head p, .archive-copy { font-size: 15px; }
.nav button { font-size: 13px; }
.user-email, .signout { font-size: 13px; }
.btn-gold, .btn-ghost { font-size: 14px; min-height: 44px; }
.small-btn { font-size: 12px; min-height: 34px; padding: 7px 10px; }
.stat { min-height: 146px; }
.stat .k { font-size: 13px; }
.mini-head span, .mini > .eyebrow { font-size: 11px; }
.cell, .cell.mono, .mini .nm { font-size: 14px; }

#acc-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
#view-acc > .acc-head {
  position: relative; isolation: isolate; overflow: hidden; min-height: 166px;
  padding: 26px 28px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--bg2); align-items: center;
}
#view-acc > .acc-head:before {
  content: ''; position: absolute; z-index: -1; inset: 0;
  background: url('./hero-broker.jpg') 75% 28% / cover no-repeat;
  opacity: .52; pointer-events: none;
}
#view-acc > .acc-head:after {
  content: ''; position: absolute; z-index: -1; inset: 0;
  background: linear-gradient(90deg, var(--bg2) 8%, color-mix(in srgb, var(--bg2) 96%, transparent) 37%, color-mix(in srgb, var(--bg2) 12%, transparent) 75%, color-mix(in srgb, var(--bg2) 75%, transparent));
  pointer-events: none;
}
#view-acc .ws-page-heading h2 { font-size: 36px; }
#view-acc .ws-page-heading p { margin-top: 8px; }
#view-acc .acc-head > .btn-gold { align-self: flex-end; box-shadow: 0 5px 20px #0003; }
.account-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 24px; padding: 22px 26px 14px; border-radius: 18px; align-items: center;
  position: relative;
}
.account-card:before { content: ''; position: absolute; top: -1px; left: 26px; width: 52px; height: 2px; background: var(--gold); border-radius: 2px; }
.account-summary { display: contents; }
.account-summary > .card-top { grid-column: 1; grid-row: 1; }
.account-summary > .account-status-row { grid-column: 2; grid-row: 1; justify-content: flex-end; gap: 24px; }
.account-summary > .account-note-preview { grid-column: 1 / -1; grid-row: 3; margin-top: 16px; }
.account-body { grid-column: 1 / -1; grid-row: 2; min-width: 0; border: 0; padding: 0; margin-top: 20px; }
.account-caption, .account-section-label { font-size: 12px; font-weight: 600; color: var(--faint); }
.account-caption { display: block; margin: 0 0 4px; }
.account-card .card-top { align-items: center; gap: 13px; }
.account-card .av { width: 48px; height: 48px; font-size: 20px; border-radius: 14px; }
.nm { font-size: 20px; white-space: normal; overflow-wrap: anywhere; }
.loc { color: var(--dim); font-size: 13px; line-height: 1.5; }
.account-card .nm { font-size: 21px; }
.account-card .meta { display: block; text-align: left; }
.account-card .meta .account-caption { display: inline; color: var(--text); font: 650 21px/1.3 var(--ws-heading); letter-spacing: -.025em; margin: 0 6px 0 0; }
.account-card .meta .nm { display: inline; }
.account-card .meta .loc { display: block; margin-top: 4px; }
.account-status-row { align-items: flex-end; gap: 12px 18px; }
.account-status-control > span { font-size: 12px; color: var(--dim); }
.account-status-select { min-height: 40px; min-width: 128px; font-size: 13px; padding: 8px 10px; }
.card-last-four { font-size: 12px; padding: 0 0 3px; display: grid; gap: 4px; }
.card-last-four b { font-size: 14px; color: var(--text); }
.account-note-preview { color: var(--dim); font-size: 14px; line-height: 1.7; padding: 14px 16px; -webkit-line-clamp: 4; }
.account-note-preview:before { content: 'Заметка'; display: block; margin-bottom: 5px; color: var(--faint); font-size: 11px; font-weight: 600; }
.account-card .card-fin { grid-template-columns: repeat(5, minmax(0, 1fr)); border: 0; padding: 17px 20px; gap: 20px; background: var(--bg); border-radius: 12px; align-items: start; }
.account-card .card-fin .fin-profit { padding-left: 18px; border-left: 1px solid var(--line); }
.account-card .card-fin .fin-profit .l { color: var(--gold); }
.account-card .fin-profit:has(.fin-hint) { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; }
.account-card .fin-profit:has(.fin-hint) .l { grid-column: 1 / -1; }
.account-card .fin-profit .fin-hint { margin-top: 0; }
.fin-c .l { color: var(--dim); font-size: 12px; letter-spacing: 0; text-transform: none; margin-bottom: 7px; }
.fin-c .n { font-size: 22px; line-height: 1.25; }
.fin-hint { display: block; margin-top: 5px; font-size: 11px; color: var(--faint); }
.account-progress { border: 0; padding-top: 18px; }
.account-section-label { margin-bottom: 12px; }
.account-card .workflow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; border: 0; padding: 0; background: none; }
.account-card .workflow-steps { grid-column: 1 / -1; counter-reset: stage; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; margin: 0; padding: 2px 0; }
.account-card .workflow-step { position: relative; counter-increment: stage; color: var(--dim); gap: 8px; font-size: 12px; line-height: 1.4; text-align: center; padding: 0 3px; }
.account-card .workflow-step:not(:first-child):before { content: ''; position: absolute; top: 11px; left: calc(-50% + 14px); right: calc(50% + 14px); height: 1px; background: var(--line2); pointer-events: none; }
.account-card .workflow-step.done:before, .account-card .workflow-step.current:before { background: var(--green); }
.account-card .workflow-step i { display: grid; place-items: center; width: 23px; height: 23px; margin: 0 auto 7px; border: 1px solid var(--line2); background: var(--bg2); border-radius: 7px; box-shadow: none; font-style: normal; }
.account-card .workflow-step i:after { content: counter(stage); font: 600 11px Inter, sans-serif; }
.account-card .workflow-step.current { color: var(--gold); font-weight: 650; }
.account-card .workflow-step.current i { background: var(--gold-soft); border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.account-card .workflow-step.done { color: var(--green); }
.account-card .workflow-step.done i { border-color: var(--green); background: var(--green-soft); }
.account-card .workflow-step.done i:after { content: '✓'; }
.workflow-note { font-size: 13px; gap: 3px 12px; color: var(--dim); }
.account-card .workflow-note { flex-direction: row; align-items: baseline; justify-content: flex-start; margin-top: 0; }
.account-card .workflow-note b { font-size: 13px; font-weight: 600; }
.workflow-note b { color: var(--text); }
.workflow-note b.pos { color: var(--green); }
.workflow-actions { gap: 8px; margin-top: 14px; }
.account-card .workflow-actions { justify-content: flex-end; flex-wrap: wrap; margin-top: 0; max-width: 400px; }
.account-card .workflow-action { flex: 0 1 auto; width: auto; min-height: 40px; margin: 0; padding: 9px 14px; }
.account-card .workflow-back { flex: 0 0 40px; min-height: 40px; }
.account-card .workflow:has(.timer) { grid-template-columns: minmax(0, 1fr); }
.account-card .timer { width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; }
.account-card .timer + .workflow-actions { max-width: none; }
.workflow-action { font-size: 13px; min-height: 42px; }
.workflow-return { padding: 10px 12px; }
.account-card .workflow-return { margin-top: 0; background: none; border: 0; border-left: 2px solid var(--gold); border-radius: 0; padding: 2px 0 2px 12px; }
.workflow-return strong, .workflow-return span, .timer-top > span { font-size: 13px; }
.account-footer { grid-column: 1 / -1; grid-row: 4; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 10px; margin-top: 16px; border-top: 1px solid var(--line); }
.card-dates { color: var(--dim); font-size: 12px; gap: 24px; }
.card-dates b { color: var(--faint); font-weight: 500; }
.card-actions .btn-ghost { font-size: 13px; min-height: 42px; }
.account-footer .card-actions { min-width: 0; }
.account-footer .danger { flex: 0 0 44px; padding: 10px; color: var(--faint); }
.archive-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 410px), 1fr)); align-items: start; }
.archive-resource span { white-space: normal; overflow-wrap: anywhere; font-size: 13px; }
.archive-badge { font-size: 11px; }

/* One type scale for bookkeeping, technical inventory, access and edit forms. */
.ledger-title, .tech-panel-head h3 { font-size: 18px; }
.ledger-title span, .tech-panel-head span { font-size: 12px; }
.ledger-row .title { font-size: 15px; }
.ledger-row .sub { font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
.ledger-row .sum { font-size: 19px; }
.ledger-row.paid { opacity: 1; }
.ledger-row.paid .title, .ledger-row.paid .sub, .ledger-row.paid .sum { opacity: 1; color: var(--faint); }
.ledger-note, .expense-folder-meta { font-size: 12px; }
.expense-folder-name { font-size: 15px; }
.expense-folder-sum { font-size: 19px; }
.tech-head:before { opacity: .12; }
.tech-actions { max-width: 760px; }
.tech-actions button { font-size: 13px; min-height: 42px; }
.tech-source { font-size: 13px; }
.tech-title { font-size: 14px; }
.tech-sub, .tech-note, .tech-binding { font-size: 12px; }
.tech-row-actions .small-btn { font-size: 12px; min-height: 34px; padding: 7px 10px; }
#tech-emails .tech-row-main, #tech-numbers .tech-row-main { display: grid; grid-template-columns: 37px minmax(0, 1fr); align-items: start; gap: 10px 12px; }
#tech-emails .tech-title, #tech-numbers .tech-title { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
#tech-emails .tech-row-actions, #tech-numbers .tech-row-actions { grid-column: 2; width: auto; margin: 0; justify-content: flex-start; }
.tech-list.scroll:has(> .tech-empty) { height: auto; min-height: 190px; }
.tech-code-detail-text, .tech-message-text { font-size: 13px; }
.tech-empty, .ledger-empty, .archive-empty { font-size: 14px; line-height: 1.7; }
#view-users .ledger-grid { align-items: start; }
#users-list .ledger-row { grid-template-columns: minmax(0, 1fr) auto; }
#users-list .sum { font-size: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; background: var(--bg3); }
.field label, .tech-field label, .auth-form label { font-size: 13px; }
.field input, .field select, .account-note-field textarea, .auth-form input, .auth-form textarea, .tech-field input, .tech-field textarea, .tech-secret-row input { font-size: 14px; min-height: 46px; }
.field-hint, .tech-form-hint, .tax-note, .tech-result-line strong, .profit-box .l { font-size: 12px; }
.sect-t { font-size: 12px; }
.field-inline-actions button, .consumable-row input { font-size: 13px; }
.auth-tabs button, .auth-note, .auth-brand p, .tech-modal-copy { font-size: 13px; }

@media (max-width: 760px) {
  .ws-banner { min-height: 244px; padding: 24px 20px; background-position: 65% 18%; border-radius: 0; margin: 0; }
  .ws-banner:before { background: linear-gradient(90deg, #0d0d0cee, #0d0d0cbb 55%, #0d0d0c66); }
  .ws-banner h2 { font-size: 23px; max-width: 310px; margin: 11px 0 17px; }
  .ws-banner .hero-val { font-size: 39px; }
  .ws-banner .hero-sub { font-size: 12px; max-width: 300px; }
  .ws-banner .ws-hero-side { display: none; }
  .wrap { padding-top: 26px; }
  .ws-page-heading p, .tech-head p, .archive-copy { font-size: 14px; }
  .nav button { font-size: 9px; }
  .signout { font-size: 11px; }
  .stat .k { font-size: 12px; }
  .stat .v { font-size: 25px; }
  .mini .nm, .cell, .cell.mono { font-size: 14px; }
  .mini-row .cell:before { font-size: 11px; }
  #view-acc > .acc-head { padding: 22px 20px; min-height: 200px; gap: 18px; align-items: stretch; }
  #view-acc > .acc-head:before { background-position: 70% 30%; opacity: .35; }
  #view-acc > .acc-head:after { background: linear-gradient(90deg, var(--bg2), color-mix(in srgb, var(--bg2) 60%, transparent)); }
  #view-acc .ws-page-heading h2 { font-size: 30px; }
  #view-acc .acc-head > .btn-gold { align-self: flex-start; }
  .account-card { grid-template-columns: minmax(0, 1fr); padding: 18px 18px 12px; gap: 0; }
  .account-card .card-top { align-items: flex-start; }
  .account-card .meta .account-caption { display: block; font: 500 12px/1.5 Inter, sans-serif; color: var(--dim); margin: 0 0 4px; }
  .account-card .meta .nm { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 19px; line-height: 1.35; }
  .account-summary > .account-status-row { grid-column: 1; grid-row: 2; margin-top: 16px; justify-content: space-between; }
  .account-body { grid-row: 3; margin-top: 18px; }
  .account-summary > .account-note-preview { grid-row: 4; }
  .account-card .card-fin { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; padding: 16px; }
  .account-card .card-fin .fin-profit { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; display: grid; grid-template-columns: 1fr auto; column-gap: 12px; }
  .account-card .card-fin .fin-profit .n { grid-column: 2; grid-row: 1 / 3; }
  .account-card .card-fin .fin-profit:has(.fin-hint) { grid-template-columns: 1fr auto; }
  .account-card .card-fin .fin-profit:has(.fin-hint) .l { grid-column: 1; }
  .account-card .card-fin .fin-profit .fin-hint { margin-top: 0; }
  .account-card .workflow { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .account-card .workflow-steps { grid-column: 1; grid-template-columns: repeat(7, minmax(90px, 1fr)); overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 10px; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
  .account-card .workflow-actions { justify-content: flex-start; max-width: none; }
  .account-footer { grid-row: 5; gap: 10px; margin-top: 16px; }
  .account-footer .card-dates { width: 100%; }
  .card-dates { gap: 12px; }
  .fin-c .n { font-size: 21px; }
  .fin-c .l { font-size: 11px; }
  .ledger-title, .tech-panel-head h3 { font-size: 17px; }
  .tech-actions button { font-size: 12px; min-height: 44px; }
  .tech-row { padding: 15px 10px; }
  .field input, .field select, .account-note-field textarea, .auth-form input, .auth-form textarea, .tech-field input, .tech-field textarea, .tech-secret-row input, .consumable-row input { font-size: 16px; }
  .archive-resource { flex-wrap: wrap; }
  .archive-resource span { flex: 1; min-width: 0; }
  .archive-resource .small-btn { margin-left: auto; }
}

/* Graphite and gold; emphasis comes from type and spacing, not nested panels. */
.top { background: var(--bg); border-color: var(--line); }
.nav { background: var(--bg2); border-color: var(--line); }
.nav button { color: var(--dim); font-size: 14px; font-weight: 600; }
.nav button.on { color: var(--gold); background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold); }
.nav button:hover:not(.on) { color: var(--text); background: var(--raise); }
.btn-ghost, .small-btn, .themebtn, .iconbtn, .xbtn, .capital-edit {
  background: var(--bg3); color: var(--text); border-color: var(--line); box-shadow: none;
}
.btn-ghost, .btn-gold, .card-actions .btn-ghost { font-size: 14px; font-weight: 600; }
.btn-gold { border-radius: 10px; padding: 10px 16px; min-height: 42px; }
.small-btn { font-size: 13px; }
.btn-ghost:hover, .small-btn:hover { background: var(--bg3); border-color: var(--gold); color: var(--text); }
.btn-gold:disabled, .btn-ghost:disabled, .account-status-select:disabled { opacity: 1; color: var(--faint); background: var(--bg3); border-color: var(--line); cursor: wait; }
.card, .archive-card, .stat, .ledger-panel, .tech-panel, .auth-card { background: var(--bg2); box-shadow: none; border-color: var(--line); }
.card:hover { box-shadow: none; border-color: var(--line); }
.stat, .ledger-panel, .tech-panel, .archive-card { border-radius: 18px; }
.ledger-title, .tech-panel-head { padding: 18px 20px; }
.av { background: var(--gold-soft); color: var(--gold); border-color: var(--gold); }
.account-caption, .account-section-label, .account-status-control > span, .card-last-four { color: var(--faint); font-size: 12px; font-weight: 500; }
.account-section-label { color: var(--dim); margin-bottom: 12px; }
.account-caption { margin-bottom: 2px; }
.account-status-select { font-size: 13px; color: var(--text); background: var(--bg3); border-color: var(--line2); min-height: 40px; }
.account-status-select[data-status="reset"] { background: var(--status-reset-bg); color: var(--status-reset-text); border-color: var(--gold); }
.account-status-select[data-status="locked"] { background: var(--status-lock-bg); color: var(--status-lock-text); border-color: var(--red); }
.account-status-select[data-status="ok"] { background: var(--status-ok-bg); color: var(--status-ok-text); border-color: var(--green); }
.account-status-select option { color: var(--text); background: var(--bg2); }
.card-last-four b { font-size: 13px; font-weight: 600; }
.loc, .card-dates, .workflow-note { font-size: 13px; color: var(--dim); font-weight: 500; }
.card-dates b { color: var(--dim); }
.account-note-preview { background: none; color: var(--note-text); border-left: 2px solid var(--gold); border-radius: 0; font-size: 14px; font-weight: 500; line-height: 1.5; padding: 1px 0 1px 12px; -webkit-line-clamp: 3; }
.account-note-preview:before { color: var(--faint); font-size: 12px; font-weight: 500; margin-bottom: 4px; }
.account-summary > .account-note-preview { display: block; padding: 10px 12px; border-left: 2px solid var(--gold); background: var(--bg3); border-radius: 0 8px 8px 0; font-size: 13px; max-height: 5.5em; overflow: hidden; }
.account-summary > .account-note-preview:before { display: inline; margin-right: 12px; }
.fin-c { background: none; border: 0; border-radius: 0; padding: 0; }
.fin-c .l { color: var(--dim); font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.fin-c .n { color: var(--text); font-size: 25px; font-weight: 700; letter-spacing: -.035em; }
.archive-fin { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fin-hint { color: var(--faint); font-size: 12px; font-weight: 500; }
.account-card .workflow-step { font-size: 12px; color: var(--dim); font-weight: 500; line-height: 1.5; }
.account-card .workflow-step i { background: var(--bg2); color: var(--text); border-color: var(--line2); }
.account-card .workflow-step i:after { font-size: 11px; }
.account-card .workflow-step.current { color: var(--gold); }
.account-card .workflow-step.current { font-weight: 600; }
.account-card .workflow-step.current i { background: var(--accent-fill); color: var(--accent-ink); border-color: var(--accent-fill); box-shadow: none; }
.account-card .workflow-step.done { color: var(--green); }
.account-card .workflow-step.done i { background: var(--status-ok-bg); color: var(--status-ok-text); border-color: var(--status-ok-bg); }
.workflow-actions .workflow-action:not(:disabled) { background: var(--gold-soft); color: var(--status-reset-text); border-color: var(--gold); font-size: 13px; font-weight: 600; justify-content: center; }
.workflow-actions .workflow-action:hover:not(:disabled) { background: var(--accent-fill); color: var(--accent-ink); }
.account-footer .card-actions .btn-ghost { font-size: 13px; min-height: 38px; padding: 8px 12px; background: none; border-color: var(--line); }
.account-footer .card-actions .btn-ghost:hover { background: var(--bg3); border-color: var(--line2); }
.account-footer .card-actions .danger { flex-basis: 38px; padding: 8px; border-color: transparent; }
.workflow-return { background: var(--gold-soft); border-color: var(--gold); }
.workflow-return strong, .workflow-return span { font-size: 13px; }
.account-footer .danger { color: var(--dim); }
.account-footer .danger:hover { color: var(--red); border-color: var(--red); }
.stat .k { color: var(--dim); font-size: 13px; font-weight: 500; }
.stat .v { font-size: 32px; color: var(--text); }
.mini-head { background: var(--bg3); border: 1px solid var(--line); padding-block: 14px; }
.mini-head span { color: var(--dim); font-size: 12px; font-weight: 700; }
.mini-row:not(.mini-head) .cell { color: var(--text); font-weight: 600; }
.ledger-title, .tech-panel-head { background: var(--bg3); color: var(--text); }
.ledger-title span, .tech-panel-head span, .expense-folder-meta { color: var(--dim); font-size: 13px; font-weight: 500; }
.ledger-row .title, .expense-folder-name { font-size: 16px; }
.ledger-row .sub, .ledger-note, .tech-sub, .tech-note { font-size: 14px; color: var(--dim); font-weight: 500; }
.ledger-row .sum, .expense-folder-sum { font-size: 22px; }
.ledger-row .title { white-space: normal; overflow-wrap: anywhere; }
.ledger-row { border-bottom: 1px solid var(--line); }
.ledger-row:last-child { border-bottom: 0; }
.tech-loading { opacity: 1; cursor: progress; pointer-events: none; }
.tech-title { font-size: 16px; color: var(--text); font-weight: 700; }
.tech-code, .live-notice-code { background: var(--accent-fill); color: var(--accent-ink); border-color: var(--accent-fill); }
.tech-icon.mail-ok { border-color: var(--green); }
.tech-icon.mail-bad { border-color: var(--red); }
.tech-icon.mail-wait { border-color: var(--gold); }
.tech-binding, .archive-badge { color: var(--status-ok-text); background: var(--status-ok-bg); border-color: var(--status-ok-bg); }
.tech-binding.free { color: var(--note-text); background: var(--note-bg); }
.tech-row-actions .small-btn, .tech-actions button { font-size: 13px; }
.field label, .tech-field label, .auth-form label { font-size: 14px; color: var(--dim); font-weight: 600; }
.field input, .field select, .account-note-field textarea, .auth-form input, .auth-form textarea, .tech-field input, .tech-field textarea, .tech-secret-row input, .consumable-row input { background: var(--bg3); color: var(--text); font-size: 16px; font-weight: 500; border-color: var(--line2); }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
.field-hint, .tech-form-hint, .tax-note, .field-resource-status, .profit-box .l { font-size: 13px; font-weight: 600; }
.field-inline-actions button { font-size: 13px; min-height: 36px; }
.profit-box { border-color: var(--gold); background: var(--gold-soft); }
.password-history { background: var(--bg3); }
.auth-tabs { border: 1px solid var(--line); }
.auth-tabs button.on { background: var(--accent-fill); color: var(--accent-ink); }
.auth-message.err { border-color: var(--red); }
.auth-note, .auth-brand p { color: var(--dim); }
.ws-banner { border-color: var(--line); }
.ws-banner:before { background: linear-gradient(90deg, #08090bff 0%, #08090bf0 28%, #08090b60 65%, #08090b15), linear-gradient(0deg, #08090b80, transparent 70%); }
.ws-banner h2 { color: #ffffff; }
.ws-banner .ws-kicker, .ws-banner .hero-val { color: var(--accent-fill); }
.ws-banner .hero-label, .ws-banner .hero-sub, .ws-banner .hero-sub b { color: #ffffff; font-weight: 600; }
.ws-hero-side { background: #08090be8; color: #ffffff; border-color: #727477; }
.ws-hero-side > :last-child { color: #dadada; border-color: #727477; }
.ws-auth-scene { border-color: var(--line2); }
.ws-auth-scene:before { background: linear-gradient(180deg, #08090bf2, #08090bbb 45%, #08090b4d); }
.ws-auth-tag, .ws-auth-caption, .ws-auth-scene:after { color: var(--accent-fill); }
.ws-auth-scene p, .ws-auth-caption b { color: #ffffff; font-weight: 600; }
.ws-footer { color: var(--dim); }
.ws-footer { margin-top: 26px; padding-top: 18px; border-color: var(--line); }
.ws-page-heading p, .tech-head p, .archive-copy, .auth-note, .auth-brand p, .small-btn, .tech-empty, .ledger-empty, .archive-empty { font-weight: 500; }
@media (max-width: 760px) {
  .nav button { font-size: 10px; }
  .ws-banner:before { background: linear-gradient(90deg, #08090bfa, #08090be0 55%, #08090b88); }
  .fin-c .l { font-size: 12px; }
  .fin-c .n { font-size: 23px; }
  .stat .v { font-size: 28px; }
  .stat .k { font-size: 13px; }
  .tech-actions button { font-size: 13px; }
  .mini-head { display: none; }
  .mini-row .cell:before { color: var(--dim); font-size: 12px; }
  .password-history-row > .small-btn, .password-history-add { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .stat:hover, .btn-gold:hover { transform: none; }
}
