:root {
  /* FTK brand: obsidian, emerald and gold */
  --bg: #0A1620; --panel: #0E1F2B; --panel2: #13293A; --line: rgba(199, 154, 58, .16); --line-strong: rgba(199, 154, 58, .4);
  --text: #E8EDF0; --muted: #8CA3B2; --muted2: #5E7183;
  --accent: #19E5A0; --accent-ink: #04120C; --accent-soft: rgba(25, 229, 160, .14); --glow: rgba(25, 229, 160, .45);
  --gold: #C79A3A; --danger: #ff6b6b; --ok: #19E5A0; --radius: 3px;
  --head: 'Big Shoulders Display', system-ui, sans-serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--body); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; letter-spacing: .01em; line-height: 1.3; margin: 0 0 .6em; }
a { color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn { font: inherit; font-weight: 600; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .9rem; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { color: var(--danger); }
.btn.small { padding: .25rem .6rem; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
input, textarea, select { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .55rem .7rem; }
textarea { resize: vertical; min-height: 4.5rem; }
label { display: block; font-size: .85rem; color: var(--muted); margin: .9rem 0 .25rem; }
.hint { font-size: .8rem; color: var(--muted); margin: .25rem 0 0; }
.err { color: var(--danger); font-size: .9rem; min-height: 1.3em; margin: .5rem 0 0; }
.ok { color: var(--ok); }

/* app chrome */
.bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: var(--panel); }
.bar .logo { font-family: var(--head); font-weight: 700; letter-spacing: .08em; font-size: .85rem; color: var(--accent); margin-right: auto; text-decoration: none; }
.badge { display: inline-block; min-width: 1.4em; padding: 0 .4em; margin-left: .4em; border-radius: 99px; background: var(--danger); color: #fff; font-size: .75rem; text-align: center; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "tabs cost" "stage panel"; gap: .7rem 1rem; padding: 1rem; max-width: 90%; margin: 0 auto; }
.layout > .offices { grid-area: tabs; margin: 0; align-self: center; }
.layout > .costbox { grid-area: cost; }
.layout > .stage { grid-area: stage; min-width: 0; }
.layout > .panel { grid-area: panel; }
.costbox { display: flex; align-items: center; justify-content: space-between; gap: .8rem; font: inherit; color: var(--text); text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .45rem .9rem; cursor: pointer; }
.costbox:hover { border-color: var(--accent); }
.costbox small { display: block; color: var(--muted); font-size: .75rem; line-height: 1.2; }
.costbox b { font-size: 1.15rem; line-height: 1.2; }
.costbox .meta { color: var(--muted); font-size: .8rem; text-align: right; }
.stage canvas { display: block; width: 100%; aspect-ratio: 480 / 300; border: 4px solid var(--line); border-radius: 8px; background: #000; touch-action: manipulation; }
.stage canvas.smooth { image-rendering: auto; box-shadow: 0 0 30px rgba(68, 210, 255, .15); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.chip { display: inline-flex; align-items: center; gap: .45rem; font: inherit; font-size: .85rem; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: .3rem .8rem .3rem .5rem; cursor: pointer; }
.chip i { width: .8rem; height: .8rem; border-radius: 50%; background: var(--c); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--panel2); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; min-height: 420px; align-self: start; }
.panel h2 { font-size: .85rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 0 .2rem; margin: .8rem 0; border-bottom: 1px solid var(--line); }
.tabs button { font: inherit; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: .4rem .55rem; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.log { height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; padding: .2rem; }
.msg { max-width: 90%; padding: .5rem .7rem; border-radius: 10px; background: var(--panel2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.msg.system { align-self: center; background: none; color: var(--muted); font-size: .8rem; font-style: italic; }
.send { display: flex; gap: .5rem; margin-top: .6rem; }
.send input { flex: 1; }
.rule { display: flex; gap: .5rem; align-items: start; justify-content: space-between; padding: .5rem; background: var(--panel2); border-radius: var(--radius); margin-bottom: .4rem; font-size: .88rem; }
.empty { color: var(--muted); text-align: center; margin-top: 3rem; }
.tag { font-size: .72rem; padding: .1rem .5rem; border-radius: 99px; background: var(--panel2); color: var(--muted); }
.tag.warn { background: #5a3b00; color: #ffd28a; }

dialog { color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem; width: min(720px, 94vw); max-height: 90vh; }
dialog::backdrop { background: rgba(0, 0, 0, .65); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.card { text-align: left; font: inherit; color: var(--text); background: var(--bg); border: 2px solid var(--line); border-radius: 8px; padding: .8rem; cursor: pointer; }
.card[aria-pressed="true"] { border-color: var(--accent); }
.card[disabled] { opacity: .45; cursor: not-allowed; }
.card b { display: block; margin: .3rem 0 .15rem; }
.card small { color: var(--muted); display: block; }
.card .dot { display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; background: var(--c); }
.presets { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.row { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1rem; flex-wrap: wrap; }
.approval { border: 1px solid var(--line); border-radius: 8px; padding: .8rem; margin-bottom: .8rem; background: var(--bg); }
.approval textarea { min-height: 7rem; }

@media (max-width: 960px) { .layout { grid-template-columns: 1fr; grid-template-areas: "tabs" "cost" "stage" "panel"; } }

/* landing + auth pages */
.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 420px); gap: 2rem; align-items: center; max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; }
.hero h1 { font-size: clamp(1.2rem, 3.2vw, 2rem); }
.hero p { color: var(--muted); max-width: 54ch; }
.auth { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem; }
.auth-page { max-width: 420px; margin: 8vh auto; padding: 0 1rem; }
.features { max-width: 1200px; margin: 0 auto; padding: 0 1rem 3rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.features .card { cursor: default; }
footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 2rem 1rem; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
.hero canvas { display: block; width: 100%; aspect-ratio: 480 / 300; border: 4px solid var(--line); border-radius: 8px; margin: 1rem 0 .6rem; }
.hero canvas.smooth { image-rendering: auto; }
[hidden] { display: none !important; }

.offices { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.otab { font: inherit; font-size: .85rem; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .35rem .8rem; cursor: pointer; }
.otab[aria-pressed="true"] { color: var(--text); border-color: var(--accent); background: var(--panel2); }
.otab.add { border-style: dashed; }
.otab small { color: var(--muted); }
.otab.incoming { animation: pulse 1s ease-in-out infinite; border-color: var(--accent); }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(255, 184, 79, .35); } }
@media (prefers-reduced-motion: reduce) { .otab.incoming { animation: none; } }
.stage canvas { image-rendering: auto; background: #05070f; }

.stage canvas { width: 100%; max-width: calc((100vh - 170px) * var(--ar, 1.45)); margin-inline: auto; }

.check { display: flex; gap: .5rem; align-items: center; margin: .3rem 0; color: var(--text); font-size: .9rem; }
.check input { width: auto; }
.sub { font-family: var(--body); font-size: .8rem; font-weight: 600; color: var(--muted); margin: .9rem 0 .2rem; }
textarea.doc { min-height: 12rem; font-family: ui-monospace, monospace; font-size: .85rem; }
.row.inline { margin: 0; flex-wrap: nowrap; }

.card.scene { padding: 0; overflow: hidden; }
.card.scene img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card.scene b, .card.scene small { padding: 0 .8rem; }
.card.scene small { padding-bottom: .7rem; }
.report { margin: .5rem 0 0; padding: .5rem .7rem; border-left: 3px solid var(--accent); background: var(--panel2); border-radius: var(--radius); }
.report:empty { display: none; }
.report p { margin: .15rem 0 0; overflow-wrap: anywhere; }

.otab.drop { border-color: #7cffb2; box-shadow: 0 0 0 3px rgba(124, 255, 178, .35); color: var(--text); }
.stage canvas.dragging { cursor: grabbing; }

.panelhead { display: flex; justify-content: space-between; align-items: start; gap: .6rem; }
.panelhead h2 { margin: 0 0 .5em; }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
#confirmDlg { width: min(480px, 94vw); }
#confirmDlg p { color: var(--muted); }
#confirmDlg .report { color: var(--text); }

.convbar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .6rem; }
.convbar select { flex: 1 1 100%; width: 100%; }
.check.small { font-size: .8rem; color: var(--muted); margin: 0 0 0 auto; }
.btn.link { margin-top: .4rem; display: block; background: none; border-color: transparent; color: var(--accent); text-decoration: underline; padding: 0; }

.rule.quote { flex-wrap: wrap; align-items: center; }
.rule.quote small { color: var(--muted); }
.qline { display: grid; grid-template-columns: minmax(0, 1fr) 5.5rem 7.5rem auto; gap: .4rem; margin-bottom: .4rem; }
.label.mini, label.mini { display: inline-block; margin-right: .8rem; }
label.mini input { width: 7.5rem; margin-top: .2rem; }
.margins label.mini input { width: 5.5rem; }
input[type="color"] { width: 4rem; height: 2.2rem; padding: .15rem; }

/* language picker (header, landing, account) */
.langmenu { position: relative; display: inline-block; }
.langbtn { display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-size: .85rem; font-weight: 600; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: .32rem .6rem .32rem .55rem; cursor: pointer; transition: border-color .15s, background .15s; }
.langbtn:hover, .langbtn[aria-expanded="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--panel2) 80%, var(--accent) 20%); }
.langico, .langchev, .langcheck { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.langchev { width: 14px; height: 14px; opacity: .7; transition: transform .15s; }
.langbtn[aria-expanded="true"] .langchev { transform: rotate(180deg); }
.langcode { font-size: .72rem; letter-spacing: .08em; color: var(--muted); }
.langbtn .langcode { color: var(--text); }
.langlist { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 11.5rem; margin: 0; padding: .3rem; list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgb(0 0 0 / .45); }
.langitem { display: flex; align-items: center; gap: .7rem; padding: .5rem .65rem; border-radius: 8px; cursor: pointer; outline: none; }
.langitem .langcode { width: 1.6rem; font-weight: 700; }
.langitem .langname { flex: 1; }
.langitem:hover, .langitem.active, .langitem:focus-visible { background: var(--panel2); }
.langitem[aria-selected="true"] { color: var(--accent); }
.langitem[aria-selected="true"] .langcode { color: var(--accent); }
.langcheck { color: var(--accent); }
.bar .langmenu { margin-left: .2rem; }
.auth .langmenu { display: block; margin: 0 0 .8rem; text-align: right; }
@media (prefers-reduced-motion: reduce) { .langchev, .langbtn { transition: none; } }
.warnbox { border-color: var(--danger, #ff6b6b); }

/* CRM board */
#crm { width: min(1200px, 96vw); max-width: none; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: .6rem; overflow-x: auto; padding: .4rem 0 .8rem; }
.bcol { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; min-height: 120px; }
.bcol h4 { margin: 0 0 .5rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.lcard { display: flex; flex-direction: column; gap: .15rem; width: 100%; text-align: left; font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .6rem; margin-bottom: .45rem; cursor: pointer; }
.lcard:hover { border-color: var(--accent); }
.lcard span, .lcard small { color: var(--muted); font-size: .78rem; }
.lcard.dnc { opacity: .55; border-style: dashed; }
.integ { margin: 1rem 0; border-top: 1px solid var(--line); padding-top: .6rem; }

/* =========================================================== FTK design layer =========================================================== */
body { font-family: var(--body); background-color: var(--bg); background-image: radial-gradient(1100px 560px at 85% -8%, rgba(25, 229, 160, .09), transparent 60%), radial-gradient(900px 500px at -5% 105%, rgba(199, 154, 58, .07), transparent 60%); background-attachment: fixed; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 800; text-transform: uppercase; letter-spacing: .03em; line-height: 1.05; }
h2 { font-size: 1.5rem; } h3 { font-size: 1.15rem; }
a { color: var(--accent); text-underline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--panel2); border: 2px solid var(--bg); border-radius: 6px; } ::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* buttons: square, mono, uppercase */
.btn, .langbtn { font-family: var(--mono); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.btn { border-radius: 2px; background: transparent; border: 1px solid var(--line-strong); padding: .62rem 1.1rem; transition: border-color .15s, color .15s, box-shadow .15s, background .15s; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { color: var(--accent-ink); box-shadow: 0 0 0 1px var(--accent), 0 0 22px var(--glow); }
.btn.small { padding: .38rem .7rem; font-size: .66rem; }
.btn.danger { color: var(--danger); border-color: rgba(255, 107, 107, .35); }
.btn.danger:hover { border-color: var(--danger); color: var(--danger); background: rgba(255, 107, 107, .08); }
.btn.danger.solid { background: var(--danger); color: #1a0505; }
.btn.link { font-family: var(--body); text-transform: none; letter-spacing: 0; font-weight: 600; }
.btn[disabled] { opacity: .45; }

/* fields */
input, textarea, select { border-radius: 3px; background: var(--bg); border: 1px solid var(--line); font-family: var(--body); transition: border-color .15s, box-shadow .15s; }
input:hover, textarea:hover, select:hover { border-color: var(--line-strong); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label { font-family: var(--mono); font-size: .66rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-top: 1.05rem; }
label.check, .check { font-family: var(--body); font-size: .9rem; text-transform: none; letter-spacing: 0; }
.hint { color: var(--muted); } .sub { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-top: 1.4rem; }
.err { font-family: var(--body); }
.tag { font-family: var(--mono); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; border-radius: 2px; border: 1px solid var(--line); background: var(--panel2); padding: .12rem .5rem; }
.tag.warn { background: rgba(199, 154, 58, .14); color: var(--gold); border-color: var(--line-strong); }
.badge { font-family: var(--mono); background: var(--accent); color: var(--accent-ink); font-weight: 700; border-radius: 2px; }

/* surfaces */
.panel, .costbox, dialog, .auth, .approval, .bcol, .card { border-color: var(--line); border-radius: 4px; }
.panel, .costbox, .auth { background: linear-gradient(180deg, rgba(19, 41, 58, .55), rgba(14, 31, 43, .92)); }
.panel { position: relative; padding: 1.2rem; }
.panel::before, .auth::before { content: ''; position: absolute; left: -1px; top: -1px; width: 38px; height: 2px; background: var(--accent); box-shadow: 0 0 10px var(--glow); }
.auth { position: relative; }
.panel h2 { font-size: 1.7rem; margin-bottom: .3em; }
.costbox:hover, .lcard:hover, .card:hover:not([disabled]) { border-color: var(--accent); }
.costbox small { font-family: var(--mono); font-size: .6rem; letter-spacing: .09em; text-transform: uppercase; }
.costbox b { font-family: var(--head); font-size: 1.6rem; letter-spacing: .02em; }
.costbox .meta { font-family: var(--mono); font-size: .66rem; }
dialog { background: linear-gradient(180deg, #112636, var(--panel)); border: 1px solid var(--line-strong); border-radius: 4px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
dialog::backdrop { background: rgba(4, 10, 15, .72); backdrop-filter: blur(4px); }
dialog h2 { font-size: 1.9rem; }
.card { background: var(--bg); border-width: 1px; }
.card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 24px rgba(25, 229, 160, .12); }
.card b { font-family: var(--head); font-size: 1.15rem; text-transform: uppercase; letter-spacing: .03em; }
.approval, .report, .rule { background: rgba(19, 41, 58, .6); }
.report { border-left-color: var(--accent); }
.rule { border: 1px solid var(--line); border-radius: 3px; }
.warnbox { border: 1px solid rgba(255, 107, 107, .5); background: rgba(255, 107, 107, .07); }
.msg { border-radius: 3px; background: var(--panel2); border: 1px solid var(--line); }
.msg.user { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 500; }

/* header */
.bar { gap: .5rem; padding: .7rem 1.25rem; background: rgba(10, 22, 32, .85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.logo { display: inline-flex; align-items: center; gap: .65rem; margin-right: auto; text-decoration: none; }
.bar .logo { font-family: var(--head); font-weight: 800; font-size: 1.35rem; letter-spacing: .06em; color: var(--text); }
.logo img { width: 38px; height: 38px; display: block; }
.logo em { font-style: normal; color: var(--gold); margin-left: .25rem; }
.bar .btn.small { border-color: var(--line); }

/* tabs and chips */
.tabs { border-bottom: 1px solid var(--line); gap: 0 .1rem; }
.tabs button { font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; padding: .55rem .6rem; transition: color .15s; }
.tabs button:hover { color: var(--text); } .tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.otab, .chip { font-family: var(--mono); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; border-radius: 2px; border: 1px solid var(--line); background: rgba(14, 31, 43, .7); transition: border-color .15s, color .15s, background .15s; }
.otab:hover, .chip:hover { border-color: var(--line-strong); color: var(--text); }
.otab[aria-pressed="true"], .chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.otab { padding: .45rem .9rem; } .chip { padding: .35rem .8rem .35rem .55rem; } .chip i { border-radius: 1px; }
.otab.incoming { border-color: var(--accent); } @keyframes pulse { 50% { box-shadow: 0 0 0 4px var(--accent-soft); } }
.otab.drop { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* the isometric office: only its frame changes, never the picture */
.stage canvas, .hero canvas { border: 1px solid var(--line-strong); border-radius: 4px; background: #04090e; box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 60px rgba(25, 229, 160, .07); }
.stage canvas.smooth { box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 60px rgba(25, 229, 160, .07); }

/* language menu in the new style */
.langbtn { border-radius: 2px; background: transparent; border-color: var(--line); padding: .38rem .6rem; }
.langbtn:hover, .langbtn[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.langlist { border-radius: 4px; border-color: var(--line-strong); background: #0d2030; }
.langitem { border-radius: 2px; font-size: .9rem; } .langitem .langcode { font-family: var(--mono); }
.langitem:hover, .langitem.active, .langitem:focus-visible { background: var(--accent-soft); }
.langitem[aria-selected="true"], .langitem[aria-selected="true"] .langcode, .langcheck { color: var(--accent); }

/* CRM */
.bcol { background: rgba(10, 22, 32, .7); } .bcol h4 { font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; color: var(--gold); }
.lcard { border-radius: 3px; background: var(--panel); } .lcard b { font-family: var(--body); font-weight: 700; }

/* ---------------------------------------------------------- landing ---------------------------------------------------------- */
.topnav { display: flex; align-items: center; justify-content: space-between; max-width: 1240px; margin: 0 auto; padding: 1.1rem 1.25rem; }
.topnav .logo { font-family: var(--head); font-weight: 800; font-size: 1.5rem; letter-spacing: .06em; color: var(--text); margin: 0; }
.topnav .logo img { width: 46px; height: 46px; }
.landing .hero { max-width: 1240px; padding: 3rem 1.25rem 2rem; gap: 3.5rem; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 430px); align-items: start; }
.eyebrow { display: flex; align-items: center; gap: .9rem; margin: 0 0 1.4rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.eyebrow::before { content: ''; width: 34px; height: 1px; background: var(--gold); }
.hero h1 { font-size: clamp(3rem, 8.2vw, 6.4rem); line-height: .93; letter-spacing: .015em; margin: 0 0 1.6rem; }
.hero h1 span { display: block; }
.hero h1 .l1 { font-weight: 500; } .hero h1 .l2 { font-weight: 800; } .hero h1 .l3 { font-weight: 800; color: var(--gold); }
.hero p.lead { color: var(--muted); font-size: 1.08rem; line-height: 1.7; max-width: 52ch; }
.cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 2.2rem; }
.cta .btn { padding: .95rem 1.7rem; font-size: .76rem; }
.cta a.btn { text-decoration: none; display: inline-block; }
.hero .demo { position: relative; }
.hero .demo::before, .hero .demo::after { content: ''; position: absolute; width: 22px; height: 22px; border: 1px solid var(--gold); pointer-events: none; z-index: 1; }
.hero .demo::before { top: 6px; left: 6px; border-right: 0; border-bottom: 0; } .hero .demo::after { bottom: 52px; right: 6px; border-left: 0; border-top: 0; }
.hero canvas { margin: 0 0 .8rem; }
.auth { padding: 1.6rem; } .auth .tabs { margin-top: 0; }
.features { max-width: 1240px; padding: 3rem 1.25rem 4rem; gap: 0; border-top: 1px solid var(--line); margin-top: 2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.features .card { background: transparent; border: 0; border-right: 1px solid var(--line); border-radius: 0; padding: 1.6rem 1.8rem; }
.features .card:last-child { border-right: 0; }
.features .card .n { display: block; font-family: var(--mono); font-size: .68rem; letter-spacing: .2em; color: var(--gold); margin-bottom: .9rem; }
.features .card b { font-size: 1.5rem; margin: 0 0 .5rem; } .features .card small { color: var(--muted); font-size: .92rem; line-height: 1.6; }
footer { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; border-top: 1px solid var(--line); }
footer a { color: var(--muted); }
.auth-page .auth h1 { font-size: 2.4rem; }
@media (max-width: 860px) { .landing .hero { grid-template-columns: 1fr; gap: 2rem; padding-top: 1.5rem; } .features .card { border-right: 0; border-bottom: 1px solid var(--line); } .features .card:last-child { border-bottom: 0; } }
@media (prefers-reduced-motion: reduce) { .btn, input, .otab, .chip { transition: none; } }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus { -webkit-text-fill-color: var(--text); caret-color: var(--text); box-shadow: 0 0 0 100px var(--bg) inset; transition: background-color 9999s; }
#crm .row { align-items: center; } #crm .row input { flex: 1 1 16rem; width: auto; }

/* =========================================================== Phone layout =========================================================== */
.menubtn, .viewtoggle, .agentlist, .sheetclose { display: none; }
@media (max-width: 720px) {
  html { -webkit-text-size-adjust: 100%; }
  body { -webkit-tap-highlight-color: transparent; }
  body.sheet { overflow: hidden; }
  input, textarea, select { font-size: 16px; } /* iOS zooms the page on focus below 16px */
  .btn, .otab, .tabs button { min-height: 44px; }
  .btn.small { min-height: 40px; }

  /* header: logo + menu, the rest folds into a drawer */
  .bar { position: sticky; top: 0; z-index: 20; padding: max(.5rem, env(safe-area-inset-top)) 1rem .5rem; gap: .4rem; }
  .menubtn { display: inline-flex; align-items: center; margin-left: auto; }
  .bar .logo { margin-right: 0; }
  .bar > .btn:not(.menubtn) { display: none; width: 100%; justify-content: flex-start; text-align: left; }
  .bar.open > .btn:not(.menubtn) { display: flex; }
  .bar.open { flex-direction: row; }
  .bar.open .logo { flex: 1; }

  .layout { padding: .6rem .8rem calc(1rem + env(safe-area-inset-bottom)); max-width: none; gap: .5rem; }
  .offices { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 0; padding-bottom: .2rem; }
  .offices::-webkit-scrollbar { display: none; }
  .otab { white-space: nowrap; flex: none; }

  /* list / scene */
  .viewtoggle { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: .7rem; border: 1px solid var(--line-strong); border-radius: 2px; overflow: hidden; }
  .viewtoggle button { font: inherit; font-family: var(--mono); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; min-height: 44px; color: var(--muted); background: transparent; border: 0; cursor: pointer; }
  .viewtoggle button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
  .chips { display: none; }
  body[data-view="list"] .stage canvas { display: none; }
  body[data-view="scene"] .agentlist { display: none; }
  body[data-view="list"] .agentlist { display: flex; flex-direction: column; gap: .5rem; }
  .agentcard { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 64px; text-align: left; font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: .7rem .8rem; cursor: pointer; flex-wrap: wrap; }
  .agentcard:active { background: var(--panel2); }
  .agentcard i { width: 1rem; height: 1rem; border-radius: 3px; background: var(--c); flex: none; }
  .agentcard .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .agentcard .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .agentcard .who small { color: var(--muted); }
  .agentcard .badge { margin: 0; }
  .hirebtn { width: 100%; min-height: 48px; }

  /* agent panel becomes a full-height sheet */
  .layout > .panel { display: none; }
  .layout > .panel.has-desk { display: block; background: var(--panel); position: fixed; inset: 0; z-index: 30; min-height: 0; border-radius: 0; border: 0; overflow-y: auto; overscroll-behavior: contain; padding: max(.8rem, env(safe-area-inset-top)) 1rem calc(1rem + env(safe-area-inset-bottom)); }
  .sheetclose { display: inline-flex; align-items: center; min-height: 44px; margin: 0 0 .4rem -.4rem; padding: 0 .6rem; font: inherit; font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); background: none; border: 0; cursor: pointer; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .log { height: min(46dvh, 420px); }
  .costbox { padding: .4rem .7rem; }

  /* dialogs: full screen */
  dialog[open] { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border-radius: 0; border: 0; overflow-y: auto; padding: max(1rem, env(safe-area-inset-top)) 1rem calc(1rem + env(safe-area-inset-bottom)); }
  dialog:not(#crm) > .row { position: sticky; bottom: calc(-1rem - env(safe-area-inset-bottom)); background: var(--panel); padding: .7rem 0; }
  .cards { grid-template-columns: 1fr 1fr; }

  /* landing */
  .landing .topnav { flex-wrap: wrap; gap: .5rem; }
  .landing .hero { padding-inline: 1rem; }
  .landing .hero .cta, .landing .cta { flex-direction: column; }
  .landing .cta .btn { width: 100%; text-align: center; justify-content: center; }
}

/* scene zoom wrapper (touch pinch / pan); looks identical to the bare canvas at 100% */
.stage .zoomwrap { position: relative; overflow: hidden; width: 100%; max-width: calc((100vh - 170px) * var(--ar, 1.45)); margin-inline: auto; border-radius: 8px; }
.stage .zoomwrap canvas { max-width: none; margin: 0; transform-origin: 0 0; }
.zoomctl { display: none; }
@media (max-width: 720px) {
  .stage .zoomwrap { max-width: none; }
  body[data-view="list"] .zoomwrap { display: none; }
  .zoomctl { display: flex; flex-direction: column; gap: 4px; position: absolute; right: 8px; bottom: 8px; z-index: 2; }
  .zoomctl button { width: 40px; height: 40px; font: inherit; font-size: 1.1rem; color: var(--text); background: rgba(10, 22, 32, .85); border: 1px solid var(--line-strong); border-radius: 2px; cursor: pointer; }
  .zoomctl button:active { border-color: var(--accent); color: var(--accent); }
}
@media (max-width: 720px) { .stage { display: flex; flex-direction: column; } .viewtoggle { order: -1; } }

/* phone tab bar */
.tabbar { display: none; }
@media (max-width: 720px) {
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--panel); border-top: 1px solid var(--line-strong); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; font: inherit; font-family: var(--mono); font-size: .58rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: none; border: 0; cursor: pointer; }
  .tabbar button:active, .tabbar button[aria-current="true"] { color: var(--accent); }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .badge { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; min-width: 1.3em; font-size: .65rem; font-family: var(--body); }
  .layout { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
  body.sheet .tabbar { display: none; }
}
@media (max-width: 720px) {
  .board { grid-auto-columns: 82%; scroll-snap-type: x mandatory; scrollbar-width: none; gap: .5rem; margin-inline: -1rem; padding-inline: 1rem; scroll-padding-inline: 1rem; }
  .board::-webkit-scrollbar { display: none; }
  .bcol { scroll-snap-align: start; min-height: 40dvh; }
}
@media (max-width: 720px) { .auth .row { justify-content: stretch; } .auth .row .btn { flex: 1; min-height: 48px; } }

/* Company profile dialog */
.cfield { margin-bottom: 10px; }
.cfield .src { display: block; min-height: 1em; margin-top: 2px; color: var(--muted, #8CA3B2); font-size: .75rem; }
.cfield .inline { display: flex; gap: 8px; }
.cfield .inline input { flex: 1; min-width: 0; }
.cfield textarea, .cfield select { width: 100%; }

/* Guide dialog and the "?" button of an agent */
#help details { margin: 6px 0; padding: 8px 12px; border: 1px solid var(--line, #1f3a4d); border-radius: 8px; background: rgba(255,255,255,.02); }
#help summary { cursor: pointer; font-weight: 600; }
#help summary small { color: var(--muted, #8CA3B2); font-weight: 400; margin-left: 6px; }
#help details[open] > summary { margin-bottom: 6px; }
#help h3 { margin: 18px 0 6px; }
#help h4 { margin: 12px 0 4px; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #8CA3B2); }
#help ul, #help ol { margin: 4px 0 4px 1.2em; padding: 0; }
#help li { margin: 3px 0; }
.helpbtn { min-width: 2.2em; border-radius: 999px; }
.panelhead .headbtns { display: inline-flex; align-items: center; gap: 6px; flex-wrap: nowrap; }

/* =========================================================== Landing sections =========================================================== */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.topnav { gap: 1.2rem; }
.topnav .logo { margin-right: auto; }
.sitenav { display: flex; align-items: center; gap: 1.5rem; }
.sitenav a { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color .15s; }
.sitenav a:hover { color: var(--accent); }
.sitenav .navcta { color: var(--accent-ink); background: var(--accent); padding: .5rem .9rem; border-radius: 2px; font-weight: 700; }
.sitenav .navcta:hover { color: var(--accent-ink); box-shadow: 0 0 0 1px var(--accent), 0 0 18px var(--glow); }
.landing [id] { scroll-margin-top: 1rem; }

.sec { max-width: 1240px; margin: 0 auto; padding: 4.5rem 1.25rem 1rem; border-top: 1px solid var(--line); }
.sec-head { max-width: 62ch; margin-bottom: 2.2rem; }
.sec-head .eyebrow { margin-bottom: 1rem; }
.sec h2 { font-family: var(--head); font-weight: 800; text-transform: uppercase; letter-spacing: .015em; line-height: 1; font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0 0 1rem; }
.sec h2 em { font-style: normal; color: var(--gold); }
.sec-intro { color: var(--muted); font-size: 1.05rem; line-height: 1.7; margin: 0; }

.tiles { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tiles.four { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tiles.three { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.tile { background: var(--bg); padding: 1.8rem 1.6rem 2rem; }
.tile .n { display: block; font-family: var(--mono); font-size: .7rem; letter-spacing: .2em; color: var(--gold); margin-bottom: 1.4rem; }
.tile h3 { font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: 1.45rem; margin: 0 0 .6rem; }
.tile p { color: var(--muted); line-height: 1.65; margin: 0; }
.tile ul { list-style: none; padding: 0; margin: 1.1rem 0 0; display: grid; gap: .55rem; }
.tile li { position: relative; padding-left: 1.2rem; color: var(--text); font-size: .93rem; line-height: 1.5; }
.tile li::before { content: ''; position: absolute; left: 0; top: .6em; width: .55rem; height: 1px; background: var(--accent); }

.scenes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 0; }
.scenes figure { margin: 0; border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.scenes img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.scenes figcaption { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); padding: .8rem 1rem; }

.faq { max-width: 860px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.2rem 2rem 1.2rem 0; font-weight: 600; font-size: 1.05rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); font-family: var(--mono); color: var(--accent); font-size: 1.2rem; }
.faq details[open] summary::after { content: '–'; }
.faq summary:hover { color: var(--accent); }
.faq details p { color: var(--muted); line-height: 1.7; margin: 0 0 1.3rem; max-width: 64ch; }

.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; padding-bottom: 4.5rem; }
.cta-band > div:first-child { max-width: 52ch; }
.cta-band .cta { margin: 0; }

.sitefoot { text-align: left; border-top: 1px solid var(--line); padding: 3rem 1.25rem 2rem; color: var(--muted); }
.foot-grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.foot-brand .logo { font-family: var(--head); font-weight: 800; font-size: 1.3rem; letter-spacing: .06em; color: var(--text); margin-bottom: .8rem; }
.foot-brand p { margin: 0; max-width: 32ch; line-height: 1.6; font-size: .9rem; }
.sitefoot h4 { font-family: var(--mono); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 0 0 .9rem; font-weight: 400; }
.sitefoot .foot-grid > div:not(.foot-brand) { display: grid; gap: .55rem; align-content: start; }
.sitefoot a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.sitefoot a:hover { color: var(--accent); }
.foot-legal { max-width: 1240px; margin: 2.2rem auto 0; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .78rem; }

@media (max-width: 860px) {
  .sitenav a:not(.navcta) { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .sec { padding-top: 3rem; }
}
.tile.soon { opacity: .6; }
.tile .n i { font-style: normal; margin-left: .6rem; padding: .1rem .45rem; border: 1px solid var(--line-strong); color: var(--muted); letter-spacing: .12em; text-transform: uppercase; font-size: .62rem; }

/* two-factor sign-in */
.secret { font-family: var(--mono); letter-spacing: .08em; word-break: break-all; background: var(--bg); border: 1px solid var(--line); padding: .6rem .8rem; margin: .4rem 0; white-space: pre-wrap; user-select: all; }
.secbox input { max-width: 14rem; }

.qr { display: block; width: 200px; height: 200px; margin: .6rem 0; background: #fff; border-radius: 4px; }

/* First impact: guided start screen, choice grid and one-step hiring form (hire.js) */
body.start .layout > .offices, body.start .layout > .costbox, body.start .layout > .stage, body.start .layout > .panel { display: none; }
body.start .layout { display: block; max-width: 1120px; }
.start { display: flex; flex-direction: column; gap: 1.6rem; padding: 1.4rem 0 3rem; }
.start[hidden] { display: none; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.step { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.step.now { background: var(--accent-soft); border-color: var(--accent); }
.step-n { flex: none; width: 28px; height: 28px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; background: var(--panel2); color: var(--text); }
.step.todo:first-child .step-n { background: var(--gold); color: #1b1405; }
.step.now .step-n, .step.done .step-n { background: var(--accent); color: var(--accent-ink); }
.step-t { display: flex; flex-direction: column; min-width: 0; }
.step-t b { font-weight: 600; }
.step-t small, .step-t a { font-size: .9rem; color: var(--muted); }
.step-t a { color: var(--accent); }
.start-h { font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.1; margin: 0; }
.start-sub { margin: -.8rem 0 0; font-size: 1.1rem; color: var(--muted); max-width: 42rem; }
.start-more { margin: 0; color: var(--muted); }
.tasks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.task { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .7rem; text-align: left; font: inherit; color: var(--text); padding: 1.4rem; min-height: 11rem; border-radius: 16px; background: var(--panel); border: 2px solid var(--line); cursor: pointer; }
.task:hover:not([disabled]) { border-color: var(--accent); }
.task.popular { border-color: var(--accent); }
.task[disabled] { opacity: .5; cursor: not-allowed; }
.task-ico { flex: none; width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 20%, transparent); }
.task-ico.big { width: 56px; height: 56px; border-radius: 14px; }
.task-title { font-family: var(--head); font-size: 1.45rem; line-height: 1.15; }
.task-blurb { color: var(--muted); font-size: 1rem; }
.task-foot { margin-top: auto; width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.task-foot small { color: var(--muted2); font-size: .9rem; }
.task-free { font-size: .85rem; font-weight: 600; color: var(--accent); }
.badge-pop { position: absolute; top: .9rem; right: .9rem; padding: .15rem .6rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .75rem; font-weight: 700; }
dialog.choose { width: min(1040px, 96vw); }
dialog.hire { width: min(1040px, 96vw); padding: 1.2rem 1.4rem 1.6rem; border-radius: 16px; }
.hire-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.hire-back { display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; text-decoration: none; }
.hire-body { display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: flex-start; }
.hire-side { flex: 1 1 280px; display: flex; flex-direction: column; gap: .9rem; padding: 1.4rem; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.hire-side h2 { margin: 0; font-size: 1.7rem; }
.hire-side p { margin: 0; color: var(--muted); }
.hire-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.hire-side li { display: flex; gap: .6rem; align-items: flex-start; }
.hire-side li svg { flex: none; color: var(--accent); margin-top: 2px; }
.hire-form { flex: 2 1 460px; display: flex; flex-direction: column; gap: 1.3rem; padding: 1.6rem; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.hire-form .field { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.hire-form .field > label, .hire-form legend { margin: 0; padding: 0; font-size: 1rem; font-weight: 600; color: var(--text); }
.hire-form legend span { font-weight: 400; color: var(--muted); }
.hire-form .field > small { color: var(--muted); }
.hire-form input:not([type=checkbox]):not([type=radio]) { min-height: 48px; border-radius: 10px; font-size: 1rem; }
.hire-form input[type=checkbox], .hire-form input[type=radio] { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.hire-form .chk { display: flex; align-items: center; gap: .8rem; min-height: 44px; margin: 0; font-size: 1rem; color: var(--text); }
.opt { display: flex; gap: .8rem; align-items: flex-start; margin: 0; padding: .85rem 1rem; border-radius: 12px; border: 2px solid var(--line); background: transparent; color: var(--text); font-size: 1rem; cursor: pointer; }
.opt.on { border-color: var(--accent); background: var(--accent-soft); }
.opt input { margin-top: 2px; }
.opt span { display: flex; flex-direction: column; }
.opt small { color: var(--muted); font-size: .9rem; }
.hire-plan { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: .6rem; }
.hire-adv { border-top: 1px solid var(--line); padding-top: 1rem; }
.hire-adv summary { cursor: pointer; color: var(--muted); font-weight: 500; min-height: 44px; display: flex; align-items: center; }
.hire-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.hire-price { display: flex; flex-direction: column; }
.hire-price b { font-size: 1.4rem; }
.hire-price small { color: var(--muted); font-size: .9rem; }
.hire-how { font-size: .85rem; }
.hire-go { min-height: 52px; padding: 0 1.8rem; border-radius: 12px; font-size: 1.05rem; font-weight: 700; }
@media (max-width: 860px) { .tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); } .steps { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .tasks { grid-template-columns: 1fr; } .task { min-height: 0; } .hire-form { padding: 1.1rem; } .hire-go { width: 100%; } }
.hire-form label, .hire-form legend, .hire-form summary, .hire-form small, .hire-form b, .hire-side p, .hire-side li, .hire-back { font-family: var(--body); text-transform: none; letter-spacing: 0; }
.hire-form .field > label, .hire-form legend { font-size: 1rem; }
.hire-form .opt b { font-size: 1rem; font-weight: 600; }
.hire-side h2 { font-family: var(--head); }

/* Populated office: scene/list toggle, team column, table view */
.costbox, .chips { display: none; }
.stagehead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .8rem; }
.stagehead h1 { margin: 0; font-size: 1.9rem; }
.viewtoggle { display: flex; padding: 4px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); margin: 0; }
.viewtoggle button { font: inherit; font-family: var(--body); font-size: .95rem; font-weight: 600; text-transform: none; letter-spacing: 0; min-height: 44px; padding: 0 1.1rem; border-radius: 8px; color: var(--muted); background: transparent; border: 0; cursor: pointer; }
.viewtoggle button[aria-pressed="true"] { background: var(--panel2); color: var(--text); }
body[data-view="list"] .stage canvas, body[data-view="list"] .zoomwrap { display: none; }
body[data-view="scene"] .agentlist { display: none; }
body[data-view="list"] .agentlist { display: flex; flex-direction: column; gap: .5rem; }
.agenttable { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.agenttable th { text-align: left; font-size: .85rem; font-weight: 600; color: var(--muted); padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.agenttable td { padding: .3rem 1rem; border-bottom: 1px solid var(--line); min-height: 48px; }
.agenttable tr:last-child td { border-bottom: 0; }
.agenttable tr.sel { background: var(--accent-soft); }
.linkbtn { display: inline-flex; align-items: center; gap: .7rem; min-height: 48px; font: inherit; font-weight: 600; color: var(--text); background: none; border: 0; cursor: pointer; padding: 0; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 22%, transparent); }
.okcard { display: flex; flex-direction: column; align-items: flex-start; gap: .7rem; padding: 1.2rem; margin-bottom: 1rem; border-radius: 16px; background: rgba(199, 154, 58, .12); border: 1px solid var(--line-strong); }
.okcard h2 { margin: 0; font-size: 1.35rem; color: #f3d9a0; }
.okcard p { margin: 0; color: #e6d3a6; }
.okcard .btn { min-height: 44px; background: var(--gold); border-color: var(--gold); color: #1b1405; }
.team { display: flex; flex-direction: column; padding: 1.2rem; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.team h2 { margin: 0 0 .5rem; font-size: 1.35rem; }
.team-row { display: flex; align-items: center; gap: .8rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.team-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.team-sub { color: var(--muted); font-size: .9rem; }
.team-row .btn { min-height: 44px; padding: 0 1rem; border-radius: 10px; }
.team-cta { min-height: 48px; margin-top: 1rem; border-radius: 12px; font-weight: 700; }
.spend { margin: .8rem .3rem 0; color: var(--muted); font-size: .9rem; }
.panel:not(.has-desk) { min-height: 0; padding: 0; background: none; border: 0; }
@media (min-width: 721px) { .agentcard, .hirebtn { display: none; } }
@media (max-width: 720px) { .agenttable { display: none; } .stagehead { order: -1; margin-bottom: .4rem; } }

/* Header: sector selector, work navigation as plain text, help and the account menu */
.bar { gap: 1.2rem; }
.bar .logo { margin-right: 0; font-size: 1.3rem; }
.barbody { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; min-width: 0; }
.sectorbtn { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 .9rem; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--panel2); color: var(--text); font: 500 .95rem var(--body); cursor: pointer; }
.sectorbtn:hover { border-color: var(--accent); }
.mainnav { display: flex; flex-wrap: wrap; gap: .25rem; flex: 1 1 auto; }
.mainnav button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .9rem; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font: 500 .95rem/1 var(--body); text-transform: none; letter-spacing: 0; cursor: pointer; }
.mainnav button:hover { color: var(--text); background: var(--panel); }
.mainnav button[aria-current="page"] { background: var(--panel2); color: var(--text); font-weight: 600; }
.mainnav .badge { font-family: var(--body); background: var(--gold); color: #1b1405; border-radius: 99px; margin-left: .5rem; }
.barend { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.circle { width: 44px; height: 44px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 600 1rem var(--body); cursor: pointer; }
.circle:hover { border-color: var(--accent); }
.avatarbtn { border: 0; background: var(--panel2); }
.popwrap { position: relative; }
.popmenu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 14rem; z-index: 40; display: flex; flex-direction: column; gap: 2px; padding: .4rem; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-strong); box-shadow: 0 18px 50px rgba(0, 0, 0, .55); }
.popmenu[hidden] { display: none; }
.popmenu.right { left: auto; right: 0; }
.popmenu button { display: flex; align-items: center; min-height: 44px; padding: 0 .8rem; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: 500 .95rem var(--body); text-align: left; cursor: pointer; }
.popmenu button:hover { background: var(--panel2); }
.popmenu button[aria-checked="true"] { color: var(--accent); font-weight: 600; }
.menulang { padding: .2rem .4rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: .2rem 0; }
@media (max-width: 720px) {
  .barbody { display: none; flex-direction: column; align-items: stretch; flex-basis: 100%; }
  .bar.open .barbody { display: flex; }
  .mainnav { flex-direction: column; }
  .mainnav button, .sectorbtn { width: 100%; justify-content: flex-start; }
  .barend { margin-left: 0; }
  .popmenu { position: static; box-shadow: none; }
  .bar.open { flex-wrap: wrap; }
}
.team-cta, .okcard .btn, .team-row .btn, .hire-go, .hire-top .btn { font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 1rem; }
@media (max-width: 720px) { .stagehead .viewtoggle { order: 0; } }

/* ---- agent sheet: "Prima di cominciare", conversations menu, proof cards ---- */
.okcard.prep { margin: .8rem 0; }
.prep-list { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .5rem; }
.prep-list li { display: flex; align-items: center; gap: .6rem; min-height: 44px; font: 400 .95rem/1.3 var(--body); text-transform: none; letter-spacing: 0; }
.prep-list li.done .prep-text { color: var(--muted); text-decoration: line-through; }
.prep-mark { width: 1.4rem; text-align: center; color: var(--gold); flex: none; }
.prep-text { flex: 1; } .prep-text small { color: var(--muted); }
.convbar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.convbar select { flex: 1; min-width: 0; }
.convmenu { position: relative; margin-left: auto; }
.convmenu summary { cursor: pointer; min-height: 36px; display: inline-flex; align-items: center; padding: 0 .6rem; color: var(--muted); font: 400 .85rem var(--body); text-transform: none; letter-spacing: 0; }
.convmenu[open] { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.deliv { align-self: stretch; margin: .5rem 0; padding: .7rem .9rem; border: 1px solid var(--gold); border-radius: 10px; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; font: 400 .95rem/1.3 var(--body); text-transform: none; letter-spacing: 0; }
.log .presets { margin-top: .6rem; }
.adv { margin: 1rem 0; } .adv summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font: 600 .95rem var(--body); text-transform: none; letter-spacing: 0; }
.hire-card { margin: .8rem 0; padding: .7rem .9rem; border: 1px dashed var(--gold); border-radius: 10px; font: 400 .95rem var(--body); text-transform: none; letter-spacing: 0; }
.hire-card a { color: var(--gold); font-weight: 600; }
.hire-extras { margin: .6rem 0; padding-left: 1.1rem; color: var(--muted); font: 400 .9rem/1.4 var(--body); text-transform: none; letter-spacing: 0; }
.cgroup { border: 0; margin: 1.2rem 0 0; padding: 0; } .cgroup legend { font: 700 1.05rem var(--body); text-transform: none; letter-spacing: 0; padding: 0 0 .3rem; }
.accsec { margin: 1.2rem 0 0; } .accsec h3 { font: 700 1.05rem var(--body); text-transform: none; letter-spacing: 0; color: var(--text); margin: 0 0 .4rem; }
.dangerlink { color: var(--danger, #ff6b6b); font: 600 .95rem var(--body); text-transform: none; letter-spacing: 0; }
.qhead { font: 600 .8rem var(--body); color: var(--muted); text-transform: none; letter-spacing: 0; }
.qtotals { margin: .8rem 0; padding: .8rem 1rem; border: 1px solid var(--line, rgba(255,255,255,.14)); border-radius: 10px; font: 400 .95rem var(--body); text-transform: none; letter-spacing: 0; display: grid; gap: .3rem; }
.qtotals div { display: flex; justify-content: space-between; } .qtotals .grand { font-size: 1.15rem; border-top: 1px solid var(--line, rgba(255,255,255,.14)); padding-top: .4rem; } .qtotals small { color: var(--muted); }
.dropzone { display: grid; gap: .2rem; text-align: center; padding: 1.4rem 1rem; margin: .6rem 0; border: 2px dashed var(--gold); border-radius: 12px; cursor: pointer; font: 400 .95rem var(--body); text-transform: none; letter-spacing: 0; min-height: 44px; }
.dropzone small { color: var(--muted); } .dropzone.over, .dropzone:focus-visible { background: rgba(212,175,55,.1); outline: none; }

/* ---- second review: one visual style, back to the team, row actions, phone ---- */
/* plain text everywhere (the bar already is): tabs, labels, tags, buttons, headings */
.tabs button, label, .tag, .btn, .otab, .viewtoggle button, .chip, .tabbar button, .sheetclose, legend, summary, th, .panel h2, .panel h3, .stagehead h1, dialog h2, dialog h3, .okcard h2, .okcard h3, .team h2 {
  font-family: var(--body); text-transform: none; letter-spacing: 0; }
.tabs button { font-size: .95rem; font-weight: 500; } .tabs button[aria-selected="true"] { font-weight: 700; }
label { font-size: .9rem; color: var(--muted); font-weight: 500; }
label.check, label.opt, label.chk { color: var(--text); }
.tag { font-size: .8rem; font-weight: 500; }
.btn { font-size: .95rem; font-weight: 600; }
.panel h2, .stagehead h1, dialog h2, .okcard h2, .team h2 { font-weight: 700; font-size: 1.5rem; line-height: 1.2; }
.panel h3, dialog h3, .okcard h3 { font-weight: 700; font-size: 1.05rem; }
.panelhead h2 { font-size: 1.5rem; margin: 0 0 .4em; }
/* the office as one title, with rename and menu */
.officehead { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.officehead h1 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.circle.small { width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); font-size: 1.2rem; }
.circle.small:hover { color: var(--text); background: var(--panel2); }
@media (hover: none) { .circle.small { width: 44px; height: 44px; } }
.titleedit { font: 700 1.5rem var(--body); min-width: 12ch; }
/* back to the team: on desktop too */
.sheetclose { display: inline-flex; align-items: center; min-height: 44px; margin: -.3rem 0 .4rem -.6rem; padding: 0 .6rem; border: 0; background: transparent; color: var(--accent); font: 600 .95rem var(--body); cursor: pointer; }
.sheetclose:hover { text-decoration: underline; }
/* team rows: two actions, always visible */
.team-row { cursor: pointer; } .team-row:hover { background: rgba(255,255,255,.03); }
.team-state { color: var(--muted); font-size: .85rem; } .team-state.warn { color: var(--gold); }
.iconbtn { width: 44px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.rowacts { display: inline-flex; gap: .4rem; justify-content: flex-end; }
.agenttable tr { cursor: pointer; } .agenttable th.acts, .agenttable td.acts { width: 1%; text-align: right; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* checklist folded to one line */
.okcard.prep summary { cursor: pointer; font: 700 1rem var(--body); min-height: 44px; display: flex; align-items: center; }
.okcard.prep:not([open]) { padding-top: .2rem; padding-bottom: .2rem; }
/* hire form: the advanced block reads as clickable */
.hire-adv summary, .adv summary { cursor: pointer; color: var(--accent); }
.hire-adv summary::before, .adv summary::before { content: '▸ '; } .hire-adv[open] summary::before, .adv[open] summary::before { content: '▾ '; }
.task-here { display: block; margin-top: .3rem; font-size: .85rem; color: var(--gold); }
/* history rows of Da approvare */
.hist { display: block; } .hist summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.histtext { white-space: pre-wrap; font: 400 .95rem/1.5 var(--body); margin: .4rem 0; max-height: 14rem; overflow: auto; }
.deliv.old { display: block; }
/* phone: one layout. Header = logo + avatar; the bottom bar and its "Altro" sheet do the rest */
@media (max-width: 720px) {
  .barbody { display: flex !important; flex-direction: row; flex: 1; justify-content: flex-end; flex-basis: auto; }
  .mainnav, #helpBtn { display: none; }
  .agentlist { display: none !important; }
  .layout > .panel:not(.has-desk) { display: block; }
  body[data-view="scene"] .layout > .panel:not(.has-desk) { margin-top: .6rem; }
  .tabbar button { font-family: var(--body); font-size: .75rem; text-transform: none; letter-spacing: 0; }
  .tabbar .badge { background: var(--gold); color: #1b1405; }
  .layout { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
}
.moresheet { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; }
.moreinner { width: 100%; max-height: 80vh; overflow-y: auto; background: var(--panel); border-radius: 18px 18px 0 0; padding: .6rem 1rem calc(1rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 2px; }
.morehead { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.moreitem { min-height: 52px; text-align: left; padding: 0 .6rem; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font: 500 1rem var(--body); cursor: pointer; }
.morelang { padding: .6rem 0; }
@media (min-width: 721px) { .moresheet { display: none; } }
.okcard.prep .btn:not(.primary) { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.okcard.prep .btn:not(.primary):hover { border-color: var(--gold); }

/* third review */
.draftbox { min-height: 14rem; line-height: 1.5; resize: vertical; }
.holes { color: var(--gold); font: 600 .9rem var(--body); margin: .4rem 0; }
dialog h3 { margin-top: 1.6rem; }
.tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
.tabs button { padding-left: .7rem; padding-right: .7rem; white-space: nowrap; flex: none; }
.okcard.prep summary { list-style: none; width: 100%; } .okcard.prep summary::-webkit-details-marker { display: none; }
.okcard.prep summary::after { content: '▾'; margin-left: auto; color: var(--gold); } .okcard.prep:not([open]) summary::after { content: '▸'; }
dialog > .msg { position: sticky; top: 0; z-index: 5; }

/* fourth review */
.tabs.more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
.approval .row.actions { position: sticky; bottom: 0; z-index: 2; margin: .6rem -.2rem 0; padding: .6rem .2rem; background: var(--panel); border-top: 1px solid var(--line); }
.hint .linkbtn { color: var(--accent); text-decoration: underline; padding: 0 .2rem; min-height: 0; }

/* fifth review */
.msg .mdp { margin: 0 0 .5rem; } .msg .mdp:last-child { margin-bottom: 0; } .msg .mdlist { margin: 0 0 .5rem; padding-left: 1.2rem; }
.toast { display: flex; align-items: center; gap: .6rem; margin: .5rem 0 1rem; padding: .7rem 1rem; border-radius: 10px; background: #1d2b36; border: 1px solid var(--line-strong); color: var(--text); font: 500 .95rem/1.35 var(--body); text-transform: none; letter-spacing: 0; }
.toast.ok { background: #123a2a; border-color: #2dd4a7; color: #e6fff6; }
.toast-ico { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #2dd4a7; color: #062019; font-weight: 800; }

/* sixth review */
.pendingline { margin: .4rem 0 0; color: var(--gold); font: 600 .9rem var(--body); text-transform: none; letter-spacing: 0; }
.pendingline .linkbtn { color: var(--accent); text-decoration: underline; min-height: 0; padding: 0 .2rem; }

/* seventh review: phone scene */
.scenenotice { display: none; margin: 0 0 .5rem; color: var(--gold); font: 600 .9rem var(--body); text-transform: none; letter-spacing: 0; }
.scenenotice .linkbtn { color: var(--accent); text-decoration: underline; min-height: 0; padding: 0 .2rem; }
@media (max-width: 720px) {
  body[data-view="scene"] .scenenotice:not([hidden]) { display: block; }
  .zoomctl { position: static; flex-direction: row; justify-content: flex-end; margin-top: 6px; }
  body[data-view="list"] .zoomctl { display: none; }
}
.scenelegend { display: none; margin: .5rem 0 0; color: var(--muted); font: 400 .8rem var(--body); text-transform: none; letter-spacing: 0; }
.dotkey { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin: 0 .2rem 0 .6rem; vertical-align: -1px; }
.dotkey.warn { background: #f2b84b; } .dotkey.work { background: #2dd4a7; } .dotkey.ok { background: #8fa3b1; }
@media (max-width: 720px) { body[data-view="scene"] .scenelegend { display: block; } }
