/* KWIBA® Studio — private system. Builds on style.css (tokens, font, theme toggle). */

.st-body { background: var(--bg); }
.st-body [hidden] { display: none !important; }

/* ---------- Sign in ---------- */
.st-auth { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 48px var(--margin); }
.st-auth__card { width: min(400px, 100%); }
.st-auth__mark { display: inline-block; width: 52px; color: var(--fg); }
.st-auth__mark svg, .st-head__mark svg { display: block; width: 100%; height: auto; fill: currentColor; }
.st-auth__title { font-weight: 300; font-size: var(--t-h3); letter-spacing: -0.02em; margin: 28px 0 4px; }
.st-auth__title sup { font-size: .4em; vertical-align: 1.1em; }
.st-auth__sub { margin: 0 0 32px; color: var(--mute); }
.st-auth__note { margin: 0 0 4px; color: var(--fg-2); font-size: var(--t-small); }
.st-auth__msg { min-height: 1.4em; margin: 18px 0 0; font-size: var(--t-small); color: var(--fg); }
.st-form { display: grid; gap: 14px; }

/* ---------- Fields & buttons ---------- */
.st-field { display: grid; gap: 6px; min-width: 0; }
.st-field > span { font-size: var(--t-micro); color: var(--mute); }
.st-field > em { font-style: normal; font-size: var(--t-micro); color: var(--mute); }
.st-field input, .st-field select, .st-field textarea {
  font: inherit; font-size: var(--t-small); color: var(--fg); background: var(--bg);
  border: 1px solid var(--rule); border-radius: 0; padding: 10px 12px; width: 100%; min-width: 0;
  transition: border-color .2s;
}
.st-field textarea { resize: vertical; line-height: 1.45; }
.st-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.st-field input:focus, .st-field select:focus, .st-field textarea:focus { outline: none; border-color: var(--fg); }
.st-field--s { max-width: 140px; }
.st-check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-small); cursor: pointer; padding-top: 18px; }
.st-check input { width: 16px; height: 16px; accent-color: var(--fg); }

.st-btn {
  font: inherit; font-size: var(--t-small); color: var(--fg); background: transparent; cursor: pointer;
  border: 1px solid var(--rule); padding: 9px 16px; border-radius: 999px; white-space: nowrap;
  transition: border-color .2s, background .2s, color .2s;
}
.st-btn:hover { border-color: var(--fg); }
.st-btn--solid { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.st-btn--solid:hover { opacity: .85; }
.st-btn:disabled { opacity: .5; cursor: wait; }
.st-link { font: inherit; font-size: var(--t-small); background: none; border: 0; padding: 0; color: var(--fg); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; justify-self: start; }
.st-x { font: inherit; font-size: 18px; line-height: 1; background: none; border: 0; color: var(--mute); cursor: pointer; padding: 6px; }
.st-x:hover { color: var(--fg); }
.st-file { position: relative; overflow: hidden; }
.st-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- App frame ---------- */
.st-head {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px;
  padding: 0 var(--margin); height: var(--header-h); background: var(--bg); border-bottom: 1px solid var(--rule);
}
.st-head__mark { width: 30px; color: var(--fg); flex: none; }
.st-nav { display: flex; gap: 22px; font-size: var(--t-small); overflow-x: auto; scrollbar-width: none; }
.st-nav a { color: var(--mute); text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; white-space: nowrap; }
.st-nav a:hover, .st-nav a.is-active { color: var(--fg); border-color: var(--fg); }
.st-head__right { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: var(--t-small); }
.st-save { color: var(--mute); min-width: 56px; text-align: right; }
.st-main { padding: clamp(28px, 4vw, 64px) var(--margin) 120px; max-width: 1600px; margin: 0 auto; }

.st-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(24px, 3vw, 44px); }
.st-page-head__r { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.st-h1 { font-weight: 300; font-size: var(--t-h2); letter-spacing: -0.03em; line-height: 1; margin: 0; }
.st-h2 { font-weight: 300; font-size: var(--t-lead); letter-spacing: -0.015em; margin: 0 0 18px; }
.st-main > .st-h2 { margin-top: clamp(36px, 4vw, 60px); }
.st-back { display: inline-block; margin-bottom: 18px; font-size: var(--t-small); }
.st-help { color: var(--mute); font-size: var(--t-small); margin: -8px 0 18px; }
.st-empty { color: var(--mute); font-size: var(--t-small); margin: 0; }
.st-sum { margin: 16px 0 0; font-size: var(--t-small); color: var(--fg-2); }
.st-sum b { font-weight: 300; color: var(--fg); }

.st-seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; }
.st-seg button { font: inherit; font-size: var(--t-micro); background: none; border: 0; color: var(--mute); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.st-seg button.is-on { background: var(--fg); color: var(--bg); }
.st-seg--tabs { margin-bottom: 24px; }

.st-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.st-stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 28px; }
.st-stat { display: grid; gap: 8px; padding: 20px 20px 24px 0; border-bottom: 1px solid var(--rule); }
.st-stat + .st-stat { padding-left: 20px; border-left: 1px solid var(--rule); }
.st-stat strong { font-weight: 300; font-size: var(--t-h3); letter-spacing: -0.02em; line-height: 1.05; }
.st-stat em { font-style: normal; font-size: var(--t-micro); color: var(--mute); }

.st-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 72px); margin-top: clamp(40px, 5vw, 72px); }
.st-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.st-list li { display: flex; align-items: center; border-bottom: 1px solid var(--rule); }
.st-list a { flex: 1; display: grid; grid-template-columns: 110px 1fr auto; gap: 16px; align-items: center; padding: 14px 0; color: var(--fg); text-decoration: none; font-size: var(--t-small); min-width: 0; }
.st-cols section:last-child .st-list a { grid-template-columns: 1fr auto 90px; }
.st-docs a { grid-template-columns: 1fr auto 140px; }
.st-list a:hover { color: var(--fg-2); }
.st-list small { display: block; color: var(--mute); font-size: var(--t-micro); margin-top: 2px; }
.st-date { color: var(--mute); font-variant-numeric: tabular-nums; }
.st-date.is-late { color: #b3261e; }
.st-num { text-align: right; font-variant-numeric: tabular-nums; }
.st-tag { font-size: var(--t-micro); border: 1px solid var(--rule); border-radius: 999px; padding: 3px 10px; color: var(--fg-2); justify-self: start; white-space: nowrap; }
.st-tag.is-ok { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.st-table-wrap { overflow-x: auto; }
.st-table { width: 100%; border-collapse: collapse; font-size: var(--t-small); }
.st-table th { text-align: left; font-weight: 300; color: var(--mute); font-size: var(--t-micro); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
.st-table td { padding: 16px 12px 16px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.st-table .r { text-align: right; font-variant-numeric: tabular-nums; }
.st-table tbody tr { cursor: pointer; }
.st-table tbody tr:hover td { color: var(--fg-2); }

.st-card { border-top: 1px solid var(--rule); padding: 26px 0 34px; }
.st-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.st-card__head .st-h2 { margin: 0; }
.st-card .st-field + .st-field { margin-top: 14px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 18px; }
.st-grid .st-field + .st-field { margin-top: 0; }
.st-card .st-grid + .st-field, .st-card .st-field + .st-grid { margin-top: 14px; }
.st-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }

.st-phases, .st-exps { display: grid; gap: 10px; }
.st-phase, .st-exp, .st-item { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px dashed var(--rule); }
.st-phase > .st-field, .st-exp > .st-field, .st-item > .st-field { flex: 1 1 150px; margin: 0 !important; }
.st-phase > .st-field--s, .st-exp > .st-field--s, .st-item > .st-field--s { flex: 0 1 130px; }
.st-phase .st-check { padding-bottom: 10px; }
.st-phase.is-paid input:not([type=checkbox]) { color: var(--mute); }
.st-phase__act { display: flex; align-items: center; gap: 6px; padding-bottom: 2px; }
.st-exp.is-off { opacity: .45; }
.st-item { margin-bottom: 12px; }

.st-month { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.st-month strong { font-weight: 300; font-size: var(--t-lead); min-width: 9em; text-align: center; }

.st-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.st-swatch { display: grid; justify-items: center; gap: 6px; font: inherit; font-size: var(--t-micro); color: var(--mute); background: none; border: 0; cursor: pointer; padding: 0; }
.st-swatch i { display: block; width: 44px; height: 44px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px var(--rule); }
.st-swatch.is-on i { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--fg); }
.st-swatch.is-on { color: var(--fg); }
.st-swatch--custom input { width: 44px; height: 44px; border: 0; padding: 0; border-radius: 50%; background: none; cursor: pointer; }
.st-swatch--custom input::-webkit-color-swatch-wrapper { padding: 0; }
.st-swatch--custom input::-webkit-color-swatch { border-radius: 50%; border: 1px solid var(--rule); }

.st-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.st-tool { font: inherit; text-align: left; color: var(--fg); background: none; border: 0; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 22px 22px 26px; cursor: pointer; display: grid; align-content: start; gap: 10px; min-height: 230px; transition: background .2s; }
.st-tool:hover { background: var(--surface); }
.st-tool h2 { font-weight: 300; font-size: var(--t-h3); letter-spacing: -0.02em; margin: 18px 0 0; }
.st-tool p { margin: 0; font-size: var(--t-small); color: var(--fg-2); }
.st-tool .link { align-self: end; margin-top: 14px; font-size: var(--t-small); }
.st-tool.is-soon { cursor: default; color: var(--mute); }
.st-tool.is-soon:hover { background: none; }
.st-tool.is-soon p { color: var(--mute); }

.st-editor { display: grid; grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); gap: clamp(24px, 3vw, 56px); align-items: start; }
.st-editor__form .st-card:first-child { border-top: 0; padding-top: 0; }
.st-editor__preview { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; overflow-x: hidden; background: var(--surface); padding: 20px; }
.st-editor__preview > div { position: relative; }
.st-preview { width: 210mm; transform-origin: top left; display: grid; gap: 8mm; }
.st-preview .doc-page { box-shadow: 0 1px 6px rgba(0,0,0,.12); }

.st-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--fg); color: var(--bg); padding: 12px 18px; font-size: var(--t-small); border-radius: 4px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 50; max-width: calc(100% - 32px); }
.st-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .st-editor { grid-template-columns: 1fr; }
  .st-editor__preview { position: static; max-height: none; }
  .st-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .st-head { gap: 16px; height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
  .st-nav { order: 3; width: 100%; }
  .st-head__right { gap: 14px; }
  .st-head__right .theme-toggle__text { display: none; }
  .st-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .st-stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .st-cols { grid-template-columns: 1fr; }
  .st-list a { grid-template-columns: 90px 1fr auto; gap: 10px; }
  .st-tools { grid-template-columns: 1fr; }
  .st-tool { min-height: 0; }
  .st-editor__preview { padding: 10px; }
}

/* =====================================================================
   Documents — one A4 system for invoice, NDA, contract and proposal.
   Everything is set in Lausanne and measured in millimetres.
   ===================================================================== */
.doc-page {
  --cover: #231f1d; --cover-ink: #d6ccc6;
  position: relative; width: 210mm; height: 297mm; overflow: hidden;
  background: #fff; color: #1a1a1a;
  font-family: "TWK Lausanne", "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 300;
  font-size: 3.35mm; line-height: 1.45; letter-spacing: -0.005em;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.doc-page *, .doc-page *::before, .doc-page *::after { box-sizing: border-box; }
.doc-page svg { fill: currentColor; }

/* Footer (all pages) */
.doc-foot { position: absolute; left: 14mm; right: 14mm; bottom: 10mm; display: flex; justify-content: space-between; gap: 10mm; font-size: 2.6mm; color: #8a8a8a; }
.doc-foot--big { font-size: 7mm; letter-spacing: -0.02em; color: inherit; align-items: flex-end; }
.doc-foot--big span:last-child { font-size: 2.6mm; letter-spacing: 0; opacity: .7; }

/* Covers */
.doc-cover { background: var(--cover); color: var(--cover-ink); padding: 8mm 14mm 0; }
.doc-cover .doc-foot { color: var(--cover-ink); opacity: .75; }
.doc-cover .doc-foot--big { opacity: 1; }
.doc-cover__title { margin: 0; font-weight: 300; line-height: .9; letter-spacing: -0.045em; font-size: 40mm; }
.doc-cover__title span { display: table; white-space: nowrap; }
.doc-cross { position: absolute; left: 14mm; right: 14mm; top: 202mm; height: 12mm; }
.doc-cross i:first-child { position: absolute; left: 0; right: 0; top: 50%; border-top: .2mm solid currentColor; opacity: .28; }
.doc-cross i:last-child { position: absolute; left: 50%; top: 0; bottom: 0; border-left: .2mm solid currentColor; opacity: .28; }
.doc-cover__mark { position: absolute; left: 14mm; top: 222mm; width: 12mm; }
.doc-cover__mark svg { display: block; width: 100%; height: auto; }
.doc-thanks__about { position: absolute; left: calc(50% + 4mm); right: 14mm; top: 222mm; margin: 0; font-size: 2.8mm; opacity: .75; }

/* Inner pages */
.doc-inner { padding: 14mm 14mm 0; }
.doc-body { height: calc(297mm - 14mm - 22mm); overflow: hidden; }
.doc-h { font-weight: 300; font-size: 10mm; letter-spacing: -0.03em; line-height: 1; margin: 0 0 12mm; }
.doc-lead { font-size: 4.6mm; line-height: 1.3; letter-spacing: -0.012em; margin: 0 0 5mm; }
.doc-mute { color: #8a8a8a; }
.doc-page p { margin: 0 0 3mm; }
.doc-page b { font-weight: 300; }

/* Label column + content column (proposal & agreements) */
.doc-row { display: grid; grid-template-columns: 52mm 1fr; gap: 8mm; padding: 5mm 0 6mm; border-top: .2mm solid #d9d9d9; }
.doc-row:first-of-type { border-top: 0; padding-top: 0; }
.doc-row__l { font-size: 3mm; color: #1a1a1a; }
.doc-row__r > :last-child { margin-bottom: 0; }
.doc-ul { list-style: none; margin: 0 0 3mm; padding: 0; columns: 2; column-gap: 8mm; }
.doc-ul li { padding: 1.4mm 0; border-bottom: .2mm solid #ececec; break-inside: avoid; }
.doc-row h5 { font-weight: 300; font-size: 3mm; color: #8a8a8a; margin: 5mm 0 1mm; }
.doc-steps { list-style: none; margin: 0; padding: 0; }
.doc-steps li { display: grid; grid-template-columns: 9mm 1fr; padding: 2.2mm 0; border-bottom: .2mm solid #ececec; }
.doc-steps li span { color: #8a8a8a; font-size: 2.8mm; padding-top: .4mm; }
.doc-ol { margin: 0; padding-left: 5mm; }
.doc-ol li { padding: 1mm 0; }
.doc-big { font-size: 9mm; letter-spacing: -0.03em; line-height: 1; margin-bottom: 2mm !important; }
.doc-price { font-size: 14mm; letter-spacing: -0.035em; line-height: 1; margin-bottom: 4mm !important; display: flex; align-items: flex-start; gap: 2.5mm; }
.doc-price span { font-size: 3.2mm; letter-spacing: 0; color: #8a8a8a; padding-top: 1.5mm; }
.doc-terms { margin: 0; }
.doc-terms div { display: grid; grid-template-columns: 18mm 1fr; padding: 1.6mm 0; border-bottom: .2mm solid #ececec; }
.doc-terms dt { font-size: 4.2mm; letter-spacing: -0.02em; line-height: 1.1; }
.doc-terms dd { margin: 0; padding-top: .6mm; }
.doc-letter { max-width: 120mm; font-size: 3.7mm; line-height: 1.5; }
.doc-signoff { margin-top: 8mm; display: grid; gap: .6mm; }
.doc-signoff span:last-child { color: #8a8a8a; font-size: 3mm; }
.doc-sig { display: block; width: 26mm; color: #1a1a1a; margin: 0 0 1mm; }
.doc-sig svg { display: block; width: 100%; height: auto; }

/* Agreements (NDA, contract) */
.doc-sec { display: grid; grid-template-columns: 52mm 1fr; gap: 8mm; padding: 4.2mm 0 4.6mm; border-top: .2mm solid #d9d9d9; }
.doc-sec h3 { margin: 0; font-weight: 300; font-size: 3.35mm; line-height: 1.45; display: grid; grid-template-columns: 8mm 1fr; }
.doc-sec h3 span { color: #8a8a8a; }
.doc-sec > div > :last-child { margin-bottom: 0; }
.doc-li { display: grid; grid-template-columns: 7mm 1fr; padding: .7mm 0; }
.doc-li > span:first-child { color: #8a8a8a; }
.doc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; margin-top: 3mm; }
.doc-party h4 { margin: 0 0 1.5mm; font-weight: 300; font-size: 3mm; color: #8a8a8a; }
.doc-party dl { margin: 0; }
.doc-party dl div { display: grid; grid-template-columns: 17mm 1fr; padding: 1.3mm 0; border-bottom: .2mm solid #ececec; min-height: 7mm; }
.doc-party dt { color: #8a8a8a; font-size: 2.9mm; padding-top: .3mm; }
.doc-party dd { margin: 0; }
.doc-sign .doc-party dl div { min-height: 11mm; align-items: end; }
.doc-sign .doc-sig { width: 22mm; margin: -3mm 0 0; }

/* Invoice — clean statement layout, /K top right */
.doc-invoice__head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8mm; }
.doc-invoice__head .doc-h { margin: 0; }
.doc-invoice__mark { display: block; width: 15mm; margin-top: .5mm; }
.doc-invoice__mark svg { display: block; width: 100%; height: auto; }
.doc-kv { margin: 0; }
.doc-kv div { display: grid; grid-template-columns: 34mm 1fr; padding: .35mm 0; }
.doc-kv dt { color: #8a8a8a; }
.doc-kv dd { margin: 0; }
.doc-addrs { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; margin-top: 10mm; }
.doc-addr h4 { margin: 0 0 1.6mm; font-weight: 300; font-size: 3.35mm; }
.doc-addr p { margin: 0; color: #3a3a3a; }
.doc-invoice__due { font-size: 6.4mm; letter-spacing: -0.02em; line-height: 1.2; margin: 13mm 0 2mm !important; }
.doc-invoice__note { color: #3a3a3a; }
.doc-table { width: 100%; border-collapse: collapse; margin-top: 16mm; }
.doc-table th { font-weight: 300; font-size: 2.8mm; color: #1a1a1a; text-align: left; padding: 0 0 1.8mm; border-bottom: .35mm solid #1a1a1a; }
.doc-table td { padding: 2.4mm 0; vertical-align: top; }
.doc-table .r { text-align: right; width: 34mm; font-variant-numeric: tabular-nums; }
.doc-totals { margin: 4mm 0 0 auto; width: 50%; }
.doc-totals div { display: flex; justify-content: space-between; gap: 6mm; padding: 1.1mm 0; border-top: .2mm solid #e3e3e3; font-variant-numeric: tabular-nums; }
.doc-totals dd { margin: 0; }
.doc-totals__due { font-size: 4mm; letter-spacing: -0.01em; border-top-color: #1a1a1a !important; padding-top: 2mm !important; }
.doc-invoice__pay { margin-top: 14mm; width: 50%; }
.doc-invoice__pay h4 { margin: 0 0 1.6mm; font-weight: 300; font-size: 3.35mm; }
.doc-foot--rule { bottom: 12mm; padding-top: 4mm; border-top: .2mm solid #e3e3e3; color: #1a1a1a; }

/* ---------- Print: only the document ---------- */
#print-root { display: none; }
@page { size: A4; margin: 0; }
@media print {
  body.is-printing > *:not(#print-root) { display: none !important; }
  body.is-printing { background: #fff; }
  body.is-printing #print-root { display: block; }
  #print-root .doc-page { break-after: page; page-break-after: always; box-shadow: none; }
  #print-root .doc-page:last-child { break-after: auto; page-break-after: auto; }
}

/* ---------- Password fields: View / Hide ---------- */
.st-pass { position: relative; display: block; }
.st-pass input { padding-right: 64px; }
.st-eye { position: absolute; right: 1px; top: 1px; bottom: 1px; padding: 0 14px; font: inherit; font-size: var(--t-micro); color: var(--mute); background: var(--bg); border: 0; cursor: pointer; }
.st-eye:hover, .st-eye:focus-visible { color: var(--fg); }

/* ---------- Choose-your-password popup ---------- */
.st-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px 16px; background: rgba(20, 20, 20, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.st-modal__card { width: min(420px, 100%); background: var(--bg); padding: 32px 32px 28px; border: 1px solid var(--rule); }
.st-modal__card .st-help { margin: 0 0 20px; }

/* Creative brief, handover checklist */
.doc-q { margin: 0 0 5mm; break-inside: avoid; }
.doc-q p { margin: 0 0 1mm; }
.doc-answer { height: 8mm; border-bottom: .2mm solid #d9d9d9; }
.doc-sub { font-weight: 300; font-size: 3mm; color: #8a8a8a; margin: 4mm 0 1.2mm; }
.doc-sub:first-child { margin-top: 0; }
.doc-check { display: grid; grid-template-columns: 7mm 1fr; padding: .9mm 0; }
.doc-check > span:first-child { display: block; width: 3.2mm; height: 3.2mm; border: .25mm solid #8a8a8a; margin-top: .8mm; }

/* ---------- People, avatars, Verified ---------- */
.st-me { display: inline-flex; align-items: center; gap: 0; }
.st-me__photo, .st-me__mark { width: 34px; height: 34px; border-radius: 50%; flex: none; object-fit: cover; }
.st-me__photo { background: #fff; }
.st-me__mark { background: #000; color: #ececec; display: grid; place-items: center; margin-left: -8px; box-shadow: 0 0 0 2px var(--bg); }
.st-me__mark svg { width: 17px; height: auto; fill: currentColor; }
.st-me__text { display: grid; line-height: 1.15; margin-left: 10px; font-size: var(--t-small); }
.st-me__text small { color: var(--mute); font-size: var(--t-micro); }
.st-me__text b { font-weight: 400; }
.st-avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); color: var(--fg-2); font-size: 13px; overflow: hidden; flex: none; border: 1px solid var(--rule); }
.st-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-avatar--s { width: 30px; height: 30px; font-size: 11px; }
.st-avatar--m { width: 52px; height: 52px; font-size: 15px; }
.st-avatar--l { width: 64px; height: 64px; font-size: 19px; }
.st-avatar-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; flex: none; }
.st-avatar-btn:hover .st-avatar { border-color: var(--fg); }
.st-who { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.st-who > span { min-width: 0; }
.st-who--big { gap: 18px; }
.st-verified { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 8px; vertical-align: middle; color: var(--fg); padding: 0; flex: none; }   /* the verified seal, in the studio's ink */
.st-verified svg { width: 100%; height: 100%; display: block; fill: currentColor; }
.st-people, .st-links, .st-notes { display: grid; gap: 14px; }
.st-person, .st-link-row, .st-note { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px dashed var(--rule); }
.st-person > .st-field, .st-link-row > .st-field { flex: 1 1 150px; margin: 0 !important; }
.st-note > .st-field { margin: 0 !important; flex: 1 1 280px; }
.st-note > .st-field--s { flex: 0 1 150px; }
.st-actions--gap { margin-top: 16px; }
.st-help + .st-field, .st-field + .st-help { margin-top: 10px; }
/* files */
.st-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.st-file { position: relative; display: grid; gap: 6px; align-content: start; }
.st-file__thumb { aspect-ratio: 4 / 3; border: 1px solid var(--rule); background: var(--surface); padding: 0; cursor: pointer; display: grid; place-items: center; overflow: hidden; color: var(--mute); font: inherit; font-size: var(--t-small); }
.st-file__thumb img { width: 100%; height: 100%; object-fit: cover; }
.st-file__thumb:hover { border-color: var(--fg); }
.st-file small { color: var(--mute); font-size: var(--t-micro); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-file .st-field > span:empty { display: none; }
.st-file .st-field select { padding: 6px 10px; }
.st-file .st-x { position: absolute; top: 2px; right: 2px; background: var(--bg); border-radius: 50%; width: 26px; height: 26px; padding: 0; line-height: 24px; }
/* expense icons */
.st-ico-btn { border: 0; background: none; padding: 0; cursor: pointer; flex: none; align-self: flex-end; margin-bottom: 4px; }
.st-ico { --bg: #f0f0ee; --fg: #3a3a3a; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--bg); color: var(--fg); font-size: 13px; letter-spacing: -.02em; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.st-ico img { width: 100%; height: 100%; object-fit: cover; }
.st-ico svg { width: 20px; height: 20px; fill: currentColor; }
.st-ico--default { --bg: var(--surface); --fg: var(--mute); }
.st-ico--person { border-radius: 50%; --bg: var(--surface); --fg: var(--fg-2); }
.st-ico-btn:hover .st-ico { box-shadow: inset 0 0 0 1px var(--fg); }
/* Today */
.st-todaycard { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; justify-content: space-between; padding: 18px 0; margin-bottom: 24px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--fg); text-decoration: none; }
.st-todaycard strong { font-weight: 300; font-size: var(--t-lead); letter-spacing: -.01em; }
.st-addtask { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 4px 0 30px; }
.st-addtask .st-field { flex: 0 1 220px; }
.st-addtask .st-field--grow { flex: 1 1 280px; }
.st-addtask .st-field--s { flex: 0 1 150px; }
.st-addtask--small { margin: 18px 0 8px; }
.st-h3 { font-weight: 400; font-size: var(--t-micro); color: var(--mute); letter-spacing: .02em; margin: 22px 0 8px; text-transform: uppercase; }
.st-h2--gap { margin-top: 34px; }
.st-tasks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.st-task { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: var(--t-small); }
.st-task__text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.st-task.is-done .st-task__text { color: var(--mute); text-decoration: line-through; }
.st-task__client { color: var(--mute); font-size: var(--t-micro); border: 1px solid var(--rule); border-radius: 999px; padding: 2px 10px; text-decoration: none; white-space: nowrap; }
.st-task__client:hover { color: var(--fg); border-color: var(--fg); }
.st-tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--mute); background: none; padding: 0; cursor: pointer; display: grid; place-items: center; flex: none; color: transparent; transition: background-color .2s, border-color .2s; }
.st-tick svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st-tick:hover { border-color: var(--fg); }
.st-tick[aria-checked="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.st-list--plain a { grid-template-columns: 90px 1fr auto; }

/* Signature: photo and /K circle overlap, same size; opens a small menu with Sign out */
.st-me { position: relative; }
.st-me__btn { display: inline-flex; align-items: center; gap: 12px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: var(--fg); }
.st-me__circles { display: inline-flex; align-items: center; flex: none; }
.st-me .st-me__photo, .st-me .st-me__mark { width: 38px; height: 38px; min-width: 38px; min-height: 38px; max-width: 38px; max-height: 38px; border-radius: 50%; flex: none; box-sizing: border-box; }
.st-me .st-me__photo { object-fit: cover; background: #fff; position: relative; z-index: 1; }
.st-me .st-me__mark { margin-left: -14px; position: relative; z-index: 2; background: #000; color: #ececec; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.st-me .st-me__mark svg { width: 19px; height: auto; fill: currentColor; }
.st-me__btn:hover .st-me__photo, .st-me.is-open .st-me__photo { box-shadow: 0 0 0 1px var(--fg); }
.st-me__text { font-size: var(--t-small); }
.st-me__menu { position: absolute; right: 0; top: calc(100% + 14px); z-index: 80; min-width: 220px; padding: 16px 18px; background: var(--bg); border: 1px solid var(--rule); display: none; gap: 14px; font-size: var(--t-small); }
.st-me.is-open .st-me__menu { display: grid; }
.st-me__who { display: grid; gap: 2px; color: var(--mute); font-size: var(--t-micro); }
.st-me__who b { font-weight: 400; color: var(--fg); font-size: var(--t-small); overflow-wrap: anywhere; }
.st-me__menu .st-link { justify-self: start; }
@media (max-width: 760px) { .st-me__text { display: none; } .st-me__menu { right: -8px; } }

/* Signature circles: exactly as in the website footer — 44px, one after another with a small space */
.st-me__circles { gap: 6px; }
.st-me .st-me__photo, .st-me .st-me__mark { width: 44px; height: 44px; min-width: 44px; min-height: 44px; max-width: 44px; max-height: 44px; }
.st-me .st-me__mark { margin-left: 0; box-shadow: inset 0 0 0 1px #3a3a3a; }
.st-me .st-me__mark svg { width: 52%; }
.st-me .st-me__photo { background: #fff; }
.st-me__btn:hover .st-me__photo, .st-me.is-open .st-me__photo { box-shadow: none; }
.st-me__btn:hover .st-me__mark, .st-me.is-open .st-me__mark { box-shadow: inset 0 0 0 1px #8a8a8a; }

/* Signature: a little smaller than the footer circles */
.st-me__circles { gap: 5px; }
.st-me .st-me__photo, .st-me .st-me__mark { width: 36px; height: 36px; min-width: 36px; min-height: 36px; max-width: 36px; max-height: 36px; }

/* Letterhead letter */
.doc-lh__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10mm; padding-bottom: 6mm; margin-bottom: 18mm; border-bottom: .2mm solid #d9d9d9; }
.doc-lh__mark { width: 13mm; flex: none; color: #1a1a1a; }
.doc-lh__mark svg { display: block; width: 100%; height: auto; }
.doc-lh__co { text-align: right; font-size: 2.9mm; line-height: 1.55; color: #8a8a8a; }
.doc-lh__co b { font-weight: 300; color: #1a1a1a; }
.doc-lh__meta { display: grid; gap: .6mm; margin-bottom: 12mm; font-size: 3.2mm; }
.doc-lh__subject { font-weight: 300; font-size: 6.4mm; letter-spacing: -.025em; line-height: 1.1; margin: 0 0 9mm; }
.doc-lh__p { max-width: 140mm; font-size: 3.7mm; line-height: 1.6; margin: 0 0 4.5mm; }
.doc-lh__greet { margin-bottom: 8mm; }
.doc-lh__sign { margin-top: 12mm; }
.doc-lh.is-single .doc-foot span:last-child { visibility: hidden; }

/* People */
.st-help--top { margin: -10px 0 26px; max-width: 46em; }
.st-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 22px; }
.st-pro { border: 1px solid var(--rule); padding: 20px 20px 22px; display: grid; gap: 14px; align-content: start; }
.st-pro__top { display: flex; align-items: center; gap: 16px; }
.st-pro__paid { display: grid; gap: 2px; margin-right: auto; }
.st-pro__paid strong { font-weight: 300; font-size: var(--t-lead); letter-spacing: -.01em; }
/* Search */
.st-searchbtn { display: inline-flex; align-items: center; gap: 8px; color: var(--mute); }
.st-searchbtn kbd { font: inherit; font-size: var(--t-micro); border: 1px solid var(--rule); border-radius: 5px; padding: 0 6px; line-height: 1.6; }
.st-search { position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.35); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 0; }
.st-search[hidden] { display: none; }
.st-search__card { width: min(620px, 100%); background: var(--bg); border: 1px solid var(--rule); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.st-search__input { width: 100%; font: inherit; font-size: var(--t-lead); padding: 20px 22px; border: 0; border-bottom: 1px solid var(--rule); background: var(--bg); color: var(--fg); outline: none; border-radius: 0; }
.st-search__list { list-style: none; margin: 0; padding: 6px 0; max-height: 50vh; overflow: auto; }
.st-search__list li { display: flex; align-items: center; gap: 14px; padding: 11px 22px; cursor: pointer; font-size: var(--t-small); }
.st-search__list li.is-on { background: var(--surface); }
.st-search__t { flex: none; width: 84px; font-size: var(--t-micro); color: var(--mute); text-transform: uppercase; letter-spacing: .04em; }
.st-search__main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-search__main small { display: block; color: var(--mute); font-size: var(--t-micro); }
.st-search__alt { flex: none; font-size: var(--t-micro); border: 1px solid var(--rule); border-radius: 999px; padding: 3px 10px; color: var(--fg-2); text-decoration: none; }
.st-search__alt:hover { border-color: var(--fg); color: var(--fg); }
.st-search__none { color: var(--mute); cursor: default !important; }
.st-search__hint { margin: 0; padding: 10px 22px 14px; font-size: var(--t-micro); color: var(--mute); border-top: 1px solid var(--rule); }
/* Meeting mode */
.st-meet__bar { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 22px; font-size: var(--t-small); }
.st-meet__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.st-meet__head .st-who { font-size: var(--t-h2); letter-spacing: -.03em; font-weight: 300; line-height: 1.05; }
.st-meet__head .st-verified { width: 24px; height: 24px; }
.st-meet__meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: var(--t-lead); color: var(--fg-2); }
.st-meet__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 56px); align-items: start; }
.st-meet__col .st-card:first-child { border-top: 0; padding-top: 24px; }
.st-pc { display: flex; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: var(--t-body); }
.st-pc > span { display: grid; gap: 1px; min-width: 0; }
.st-pc small { color: var(--mute); font-size: var(--t-small); }
.st-pc a { color: var(--fg); text-decoration: none; font-size: var(--t-small); overflow-wrap: anywhere; }
.st-pc a:hover { text-decoration: underline; }
.st-pay { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 14px; align-items: center; padding: 12px 0; width: 100%; font-size: var(--t-small); }
.st-tick--static { cursor: default; }
.st-list--docs li { gap: 12px; }
.st-list--big a { grid-template-columns: 1fr auto auto; padding: 20px 0; font-size: var(--t-body); }
.st-files--big { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.st-meet__pdfs { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.st-meet__log { margin-top: 24px; display: grid; gap: 14px; }
.st-meet__log p { margin: 4px 0 0; font-size: var(--t-small); color: var(--fg-2); }
.st-viewer { position: fixed; inset: 0; z-index: 130; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 4vw; cursor: zoom-out; }
.st-viewer[hidden] { display: none; }
.st-viewer img { max-width: 100%; max-height: 92vh; object-fit: contain; }
.st-viewer .st-x { position: absolute; top: 18px; right: 22px; color: #fff; font-size: 30px; }
@media (max-width: 900px) { .st-meet__grid { grid-template-columns: 1fr; } .st-pgrid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .st-searchbtn kbd { display: none; } }

/* Roster */
.st-ro__link input { width: 100%; max-width: 620px; font: inherit; font-size: var(--t-small); padding: 12px 14px; border: 1px solid var(--rule); border-radius: 10px; background: transparent; color: var(--fg); margin-bottom: 14px; }
.st-ro__bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px; margin: 28px 0 22px; padding-top: 26px; border-top: 1px solid var(--rule); }
.st-ro__find { flex: 1 1 260px; max-width: 460px; }
.st-ro__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 22px; align-items: start; }
.st-ro { border: 1px solid var(--rule); padding: 20px 20px 22px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.st-ro.is-archived { opacity: .6; }
.st-ro__top { display: flex; align-items: flex-start; gap: 12px; }
.st-ro__sel { padding-top: 6px; }
.st-ro__who { flex: 1; min-width: 0; }
.st-ro__name { font-size: var(--t-lead); font-weight: 300; letter-spacing: -0.015em; margin: 0; }
.st-ro__new { font-size: var(--t-micro); border: 1px solid var(--fg); border-radius: 999px; padding: 2px 8px; margin-left: 8px; vertical-align: middle; }
.st-ro__role { margin: 4px 0 0; color: var(--mute); font-size: var(--t-small); }
.st-ro__star { font: inherit; font-size: 20px; background: none; border: 0; color: var(--mute); cursor: pointer; padding: 2px 6px; }
.st-ro__star.is-on, .st-ro__star:hover { color: var(--fg); }
.st-ro__skills { margin: 0; font-size: var(--t-small); line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.st-ro__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 0; }
.st-ro__meta dt { font-size: var(--t-micro); color: var(--mute); }
.st-ro__meta dd { margin: 2px 0 0; font-size: var(--t-small); overflow-wrap: anywhere; }
.st-ro__acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.st-ro__view { display: grid; gap: 8px; }
.st-ro__pdf { width: 100%; height: min(70vh, 640px); border: 1px solid var(--rule); background: var(--bg); }
.st-ro__img { width: 100%; height: auto; display: block; border: 1px solid var(--rule); }
@media (max-width: 900px) { .st-ro__list { grid-template-columns: 1fr; } }
.st-ro__photo { flex: none; width: 72px; height: 72px; padding: 0; border: 1px solid var(--rule); border-radius: 50%; overflow: hidden; background: var(--surface, #eee); cursor: zoom-in; }
.st-ro__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.st-copy { font: inherit; font-size: inherit; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--fg); padding: 0; cursor: copy; text-align: left; overflow-wrap: anywhere; }
.st-copy:hover { opacity: .65; }

.st-ro__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.st-chip { font-size: var(--t-micro); padding: 4px 10px; border: 1px solid var(--rule); border-radius: 999px; }
.st-ro__intro { margin: 0; font-size: var(--t-small); line-height: 1.55; color: var(--mute); overflow-wrap: anywhere; }
.st-ro__name .st-verified { margin-left: 8px; }

.st-chip--link { text-decoration: none; color: inherit; }
.st-chip--link:hover { border-color: var(--fg); }
.st-ro__ask { border-left: 2px solid var(--fg); padding: 2px 0 2px 12px; font-size: var(--t-small); }
.st-ro__ask p { margin: 4px 0 0; color: var(--mute); }
.st-btn.is-on { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.st-ro__sent { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px; font-size: var(--t-small); }
.st-ro__sent p { margin: 0; }
.st-ro__sent b { font-weight: 400; }
.st-ro__sent small { color: var(--mute); }
.st-ans { display: inline-block; font-size: var(--t-micro); padding: 2px 9px; border: 1px solid var(--rule); border-radius: 999px; margin-right: 6px; color: var(--mute); }
.st-ans--yes { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.st-ans--maybe { border-color: var(--fg); color: var(--fg); }
.st-ans--no { text-decoration: line-through; }
.st-proj { display: grid; gap: 14px; }
.st-proj__row { border: 1px solid var(--rule); padding: 16px 18px; display: grid; gap: 8px; justify-items: start; }
.st-proj__top { display: flex; align-items: baseline; gap: 14px; justify-content: space-between; width: 100%; }
.st-proj__top h3 { margin: 0; font-weight: 300; font-size: var(--t-lead); letter-spacing: -0.015em; }
.st-proj__date { color: var(--mute); font-size: var(--t-small); }
.st-proj__tally { margin: 0; }
.st-proj__names { margin: 0; font-size: var(--t-small); color: var(--mute); }
.st-proj__names b { font-weight: 400; color: var(--fg); }
.st-ov { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); overflow: auto; }
.st-dialog { width: min(100%, 560px); max-height: 92vh; overflow: auto; display: grid; gap: 14px; background: var(--bg); border: 1px solid var(--rule); border-radius: 16px; padding: 26px; box-shadow: 0 24px 80px rgba(0, 0, 0, .18); }
.st-dialog .st-help { margin: -4px 0 4px; }
.st-error { margin: 0; color: #c4553f; font-size: var(--t-small); }

/* ---------- Links (short links) ---------- */
.st-lk { border-top: 1px solid var(--rule); padding: 20px 0; display: grid; gap: 6px; }
.st-lk.is-ended .st-lk__short, .st-lk.is-ended .st-lk__to { opacity: .5; }
.st-lk__main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.st-lk__short { border: 0; background: none; padding: 0; font: inherit; font-size: 20px; letter-spacing: -0.01em; color: var(--fg); cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.st-lk__note { color: var(--mute); }
.st-lk__to { color: var(--mute); font-size: 13px; overflow-wrap: anywhere; }
.st-lk__meta { color: var(--mute); font-size: 13px; }
.st-lk .st-actions { margin-top: 8px; }
.st-lk__new { margin-top: 22px; border-top: 1px solid var(--fg); padding-top: 18px; display: grid; gap: 10px; }
.st-lk__newrow { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.st-lk__newrow strong { font-weight: 400; font-size: 24px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
#lk-hint { margin: 16px 0 14px; }
#lk-err { margin: 0 0 14px; }
