/* GreenDeck, the sales tool. GreenYellow green + yellow. Green = done, yellow = changed, red = stopped. */
:root {
  --bg: #f3f4f1;
  --surface: #ffffff;
  --surface-2: #f8f9f6;
  --ink: #111814;
  --ink-2: #39423c;
  --muted: #69726c;
  --faint: #a3aaa5;
  --line: #e3e6e1;
  --line-2: #cfd5ce;
  --green: #1D5B35;
  --green-2: #154628;
  --green-3: #2f7a4b;
  --green-soft: #e4f0e7;
  --side: #10331f;
  --yellow: #F6CF3A;
  --yellow-soft: #fdf4cf;
  --red: #b42318;
  --red-soft: #fdecea;
  --sh-1: 0 1px 0 rgba(17, 24, 20, .04), 0 1px 3px rgba(17, 24, 20, .07);
  --sh-2: 0 1px 0 rgba(17, 24, 20, .04), 0 12px 32px -14px rgba(17, 24, 20, .24);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--green-3); outline-offset: 2px; border-radius: 8px; }
body.busy { cursor: progress; }

/* ---------- sidebar: GreenYellow green ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; height: 100vh; }
.side { display: flex; flex-direction: column; gap: 2px; padding: 20px 12px 16px; background: var(--side); color: #dfe9e2; min-height: 0; overflow: auto; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 10px 24px; color: #fff; }
.brand > span:last-child { display: flex; flex-direction: column; font-weight: 700; font-size: 18px; letter-spacing: -.02em; line-height: 1.15; }
.brand small { font-size: 12px; font-weight: 500; letter-spacing: 0; color: #9fb8a8; }
.logo { flex: none; width: 36px; height: 36px; border-radius: 11px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 6px 14px -6px rgba(0, 0, 0, .5); }
.mark { flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--yellow); display: grid; place-content: center; gap: 3px; }
.mark i { display: block; width: 14px; height: 3px; border-radius: 2px; background: var(--side); }
.mark i + i { width: 9px; }
.nav-i { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 15px; color: #dfe9e2; transition: background .15s var(--ease); }
.nav-i svg { width: 18px; height: 18px; fill: currentColor; opacity: .85; }
.nav-i:hover { background: rgba(255, 255, 255, .07); }
.nav-i.on { background: rgba(255, 255, 255, .12); color: #fff; }
.side-k { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #86a191; padding: 22px 12px 8px; }
.clients { display: flex; flex-direction: column; gap: 2px; }
.cl { position: relative; display: flex; flex-direction: column; padding: 9px 12px; border-radius: 10px; transition: background .15s var(--ease); }
.cl b { font-weight: 600; font-size: 15px; color: #fff; }
.cl span { font-size: 13px; color: #9fb8a8; }
.cl:hover { background: rgba(255, 255, 255, .07); }
.cl.on { background: rgba(255, 255, 255, .12); }
.cl.on::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--yellow); }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
.me-av { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(140deg, #F9DD6B, #E9B72A 55%, #C9D84E); box-shadow: 0 0 0 2px rgba(255, 255, 255, .1), inset 0 1px 0 rgba(255, 255, 255, .5); display: grid; place-items: center; }
.me-av span { font-size: 12.5px; font-weight: 800; letter-spacing: .02em; color: #163a24; }
.me-av i { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #3ccf6e; box-shadow: 0 0 0 2.5px var(--side); }
.me-t b { display: block; font-size: 14px; line-height: 1.2; color: #fff; }
.me-t small { display: block; font-size: 12px; color: #9fb8a8; }

/* ---------- shared ---------- */
.main { min-width: 0; min-height: 0; }
.view { display: flex; flex-direction: column; height: 100vh; animation: fade .3s var(--ease) both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 32px; background: var(--surface); border-bottom: 1px solid var(--line); }
.head h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
.sub { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.crumb { display: inline-block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.crumb:hover { color: var(--green); }
.crumb::before { content: "\2190  "; }

.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: 12px; font-weight: 650; font-size: 15px; background: var(--ink); color: #fff; white-space: nowrap; transition: transform .12s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), opacity .2s; }
.btn .arr { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--green); box-shadow: 0 2px 0 rgba(0, 0, 0, .2), 0 6px 16px -6px rgba(29, 91, 53, .55); }
.btn.primary:hover { background: var(--green-2); box-shadow: 0 2px 0 rgba(0, 0, 0, .2), 0 10px 22px -8px rgba(29, 91, 53, .6); }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn.ghost:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--faint); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn.big { height: 54px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn.red { background: var(--red); }
.btn .spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn.ghost .spin { border-color: rgba(17, 24, 20, .15); border-top-color: var(--ink); }
.btn.working { pointer-events: none; }
.btn.working .spin { display: block; }
.btn.working .arr { display: none; }
.btn.working .lbl::after { content: "…"; }
.btn:disabled:not(.working) { opacity: .5; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- HOME ---------- */
.new-form { display: flex; align-items: center; gap: 10px; padding: 14px 32px; background: var(--surface); border-bottom: 1px solid var(--line); animation: drop .3s var(--ease) both; }
.new-form input { flex: 1; max-width: 420px; height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: #fff; }
.new-form input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.new-err { color: var(--red); font-size: 14px; }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.home-body { flex: 1; min-height: 0; overflow: auto; padding: 24px 32px 40px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; max-width: 1240px; }
.kpi { padding: 18px 20px; border-radius: 16px; background: var(--surface); box-shadow: var(--sh-1); animation: rise .45s var(--ease) both; }
.kpi:nth-child(2) { animation-delay: .05s; } .kpi:nth-child(3) { animation-delay: .1s; } .kpi:nth-child(4) { animation-delay: .15s; }
.kpi b { display: block; font-size: 30px; line-height: 1.1; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi span { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }
.kpi.good b { color: var(--green); }
.kpi.bad b { color: var(--red); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(480px, 1fr)); gap: 16px; margin-top: 20px; max-width: 1240px; }
.ccard { display: flex; flex-direction: column; gap: 18px; padding: 24px; border-radius: 18px; background: var(--surface); box-shadow: var(--sh-1); border: 1px solid transparent; text-align: left; animation: rise .5s var(--ease) both; transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s; }
.ccard:hover { box-shadow: var(--sh-2); transform: translateY(-2px); border-color: rgba(29, 91, 53, .18); }
.ccard.has-bad { border-color: rgba(180, 35, 24, .3); }
.cc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.cc-top h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.cc-top p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.cc-tr { flex: none; display: flex; align-items: center; gap: 6px; }
.rm { position: relative; display: flex; align-items: center; }
.rm-b { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--faint); opacity: 0; transition: opacity .2s var(--ease), background .15s, color .15s; }
.rm-b svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ccard:hover .rm-b, .rm-b:focus-visible { opacity: 1; }
.rm-b:hover { background: var(--red-soft); color: var(--red); }
.rm-ask { display: none; align-items: center; gap: 6px; padding: 4px 4px 4px 12px; border-radius: 99px; background: var(--red-soft); font-size: 13px; font-weight: 650; color: var(--red); white-space: nowrap; animation: rise .2s var(--ease) both; }
.rm.asking .rm-b { display: none; }
.rm.asking .rm-ask { display: inline-flex; }
.rm-yes, .rm-no { height: 28px; padding: 0 11px; border-radius: 99px; font-size: 13px; font-weight: 700; }
.rm-yes { background: var(--red); color: #fff; }
.rm-no { background: #fff; color: var(--ink-2); }
.ccard.removing { animation: remove .32s var(--ease) both; pointer-events: none; }
@keyframes remove { to { opacity: 0; transform: scale(.96) translateY(6px); } }
@media (hover: none) { .rm-b { opacity: 1; } }
.pill { flex: none; padding: 5px 11px; border-radius: 99px; font-size: 13px; font-weight: 650; background: #eef0ec; color: var(--ink-2); white-space: nowrap; }
.pill.won { background: var(--green-soft); color: var(--green); }
.pill.bad { background: var(--red-soft); color: var(--red); }
.mini { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mini li i { display: block; height: 6px; border-radius: 6px; background: #e6e9e4; }
.mini li.done i { background: var(--green); }
.mini li.cur i { background: linear-gradient(90deg, var(--yellow), #f3dd7d); }
.mini li span { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--faint); }
.mini li.done span { color: var(--ink-2); }
.mini li.cur span { color: var(--ink); }
.cc-figs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.cc-figs div { padding: 14px 14px 0 0; }
.cc-figs div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.cc-figs b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cc-figs span { font-size: 13px; color: var(--muted); }
.cc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
.cc-next { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.ccard.add { align-items: center; justify-content: center; gap: 4px; min-height: 260px; background: transparent; box-shadow: none; border: 2px dashed var(--line-2); color: var(--muted); }
.ccard.add:hover { border-color: var(--green); color: var(--green); background: rgba(29, 91, 53, .03); }
.ccard.add .plus { width: 48px; height: 48px; margin-bottom: 8px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 300; background: var(--surface); box-shadow: var(--sh-1); color: var(--green); transition: transform .3s var(--spring); }
.ccard.add:hover .plus { transform: rotate(90deg) scale(1.08); }
.ccard.add b { font-size: 17px; color: var(--ink); }
.ccard.add span:last-child { font-size: 14px; }

/* ---------- ONGOING CONTRACTS ---------- */
.nav-n { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; background: var(--yellow); color: var(--side); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.nav-n:empty { display: none; }
.ctable { margin-top: 20px; max-width: 1240px; background: var(--surface); border-radius: 18px; box-shadow: var(--sh-1); overflow: hidden; }
.crow { display: grid; grid-template-columns: minmax(220px, 2fr) 110px repeat(5, minmax(0, 1fr)); align-items: center; gap: 12px; padding: 16px 22px; border-top: 1px solid var(--line); animation: rise .45s var(--ease) both; transition: background .15s; }
a.crow:hover { background: var(--surface-2); }
.chead { border-top: 0; padding-top: 14px; padding-bottom: 12px; font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); animation: none; }
.cname b { display: block; font-size: 16px; font-weight: 700; }
.cname small { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cval { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.live { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 99px; background: var(--green-soft); color: var(--green); font-size: 13px; font-weight: 700; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22a050; box-shadow: 0 0 0 0 rgba(34, 160, 80, .5); animation: live 1.8s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(34, 160, 80, .5); } 100% { box-shadow: 0 0 0 8px rgba(34, 160, 80, 0); } }
.crow.fresh { animation: rise .45s var(--ease) both, fresh 2.4s var(--ease) .3s both; }
@keyframes fresh { 0%, 40% { background: var(--yellow-soft); } 100% { background: transparent; } }
.cempty { display: flex; flex-direction: column; gap: 4px; padding: 40px; text-align: center; color: var(--muted); }
.cempty b { font-size: 17px; color: var(--ink); }

.prow { grid-template-columns: minmax(220px, 2fr) 150px repeat(4, minmax(0, 1fr)); }
.wait { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 99px; background: #fff4e5; color: #b45309; font-size: 13px; font-weight: 700; white-space: nowrap; }
.wait::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ea7a12; animation: pulse 1.4s ease-in-out infinite; }

/* ---------- mock e-mail ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: rgba(13, 26, 18, 0); transition: background .22s var(--ease); }
.modal.on { background: rgba(13, 26, 18, .38); }
.mail { width: min(600px, 100%); display: flex; flex-direction: column; border-radius: 18px; background: var(--surface); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); overflow: hidden; opacity: 0; transform: translateY(16px) scale(.98); transition: opacity .22s var(--ease), transform .28s var(--ease); }
.modal.on .mail { opacity: 1; transform: none; }
.mail.sent { animation: fly .65s cubic-bezier(.5, 0, .75, 0) both; }
@keyframes fly { to { opacity: 0; transform: translate(60px, -80px) scale(.6) rotate(-4deg); } }
.mail-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--side); color: #fff; }
.mail-top b { font-size: 15px; }
.mail-x { width: 30px; height: 30px; border-radius: 8px; font-size: 22px; line-height: 1; color: #cfe0d5; }
.mail-x:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.mail-row { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.mail-row span { width: 60px; font-size: 13px; font-weight: 600; color: var(--muted); }
.mail-row input { flex: 1; height: 46px; border: 0; outline: 0; font-size: 15px; background: transparent; }
.mail textarea { border: 0; outline: 0; resize: none; padding: 16px 18px; font: inherit; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.mail-att { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 14px; }
.att { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 600; }
.att i { font-style: normal; font-size: 10px; font-weight: 800; color: #fff; padding: 3px 5px; border-radius: 5px; }
.att i.k-docx { background: #185abd; } .att i.k-pptx { background: #c43e1c; }
.mail-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.mail-note { font-size: 12.5px; color: var(--muted); }
#mail-send .arr { fill: currentColor; stroke: none; width: 16px; height: 16px; }

/* ---------- DEAL ---------- */
.deal-head { padding-bottom: 18px; }
.saved { display: flex; gap: 10px; }
.sk { display: flex; align-items: baseline; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.sk b { font-size: 20px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sk span { font-size: 13px; color: var(--muted); }
.sk.good b { color: var(--green); }
.sk.bad { background: #fff7ed; box-shadow: inset 0 0 0 1px #fbd8b0; }
.sk.bad b { color: #c2620c; }

/* the five steps, across the top */
.stepper { flex: none; list-style: none; margin: 0; padding: 18px 32px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border-bottom: 1px solid var(--line); }
.st { position: relative; display: flex; justify-content: center; }
.st-line { position: absolute; left: calc(-50% + 34px); right: calc(50% + 34px); top: 21px; height: 4px; border-radius: 4px; background: #e6e9e4; overflow: hidden; }
.st-line i { position: absolute; inset: 0; width: 0; background: var(--green); border-radius: 4px; transition: width .7s var(--ease) .1s; }
.st.done .st-line i, .st.cur .st-line i { width: 100%; }
.st-b { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 6px; border-radius: 12px; text-align: center; }
.st-b:disabled { cursor: default; }
.st-dot { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; font-weight: 750; color: var(--faint); background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-2); transition: background .35s var(--ease), box-shadow .35s var(--ease), color .35s, transform .35s var(--spring); }
.st-dot svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.st-dot .ck { stroke-dasharray: 20; stroke-dashoffset: 0; }
.st.pop .st-dot { animation: pop .6s var(--spring); }
.st.pop .st-dot .ck { animation: draw .45s var(--ease) .15s both; }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes draw { from { stroke-dashoffset: 20; } to { stroke-dashoffset: 0; } }
.st-tx b { display: block; font-size: 15px; font-weight: 700; color: var(--faint); transition: color .3s; }
.st-sub { display: block; font-size: 13px; color: var(--faint); white-space: nowrap; transition: color .3s; }
.st.done .st-dot { background: linear-gradient(150deg, #2f8a52, var(--green)); box-shadow: 0 4px 10px -4px rgba(29, 91, 53, .6); }
.st.done .st-tx b { color: var(--ink); }
.st.done .st-sub { color: var(--green); font-weight: 600; }
.st.cur .st-dot { background: #fff; color: var(--green); box-shadow: inset 0 0 0 3px var(--green), 0 0 0 6px rgba(29, 91, 53, .1); animation: ring 2.4s var(--ease) infinite; }
.st.cur .st-dot::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(29, 91, 53, .18); animation: halo 2.4s var(--ease) infinite; }
@keyframes halo { 0% { transform: scale(.85); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
.st.cur .st-tx b { color: var(--ink); }
.st.cur .st-sub { color: var(--ink-2); }
.st.cur.bad .st-dot { background: #fff; color: var(--red); box-shadow: inset 0 0 0 3px var(--red), 0 0 0 6px var(--red-soft); animation: none; }
.st.cur.bad .st-dot::after { display: none; }
@keyframes ring { 0%, 100% { box-shadow: inset 0 0 0 3px var(--green), 0 0 0 6px rgba(29, 91, 53, .1); } 50% { box-shadow: inset 0 0 0 3px var(--green), 0 0 0 9px rgba(29, 91, 53, .06); } }
.st.done .st-b:not(:disabled):hover .st-dot { transform: scale(1.08); }
.st.on:not(.cur) .st-dot { box-shadow: 0 0 0 4px var(--green-soft); }
.st.on:not(.cur) .st-tx b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--green); }

/* action on the left, document on the right */
.body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(360px, 420px) 1fr; gap: 16px; padding: 16px; }
.act { min-height: 0; overflow: auto; background: var(--surface); border-radius: 18px; box-shadow: var(--sh-1); }
.act.past { background: var(--surface-2); }
.act .in { padding: 26px 26px 24px; }
.act .in.out { animation: out .2s var(--ease) both; }
.act .in.in-anim { animation: in .38s var(--ease) both; }
@keyframes out { to { opacity: 0; transform: translateX(-24px); } }
@keyframes in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
.eyebrow { font-size: 13px; font-weight: 650; color: var(--green-3); }
.act h2 { margin: 8px 0 0; font-size: 24px; line-height: 1.22; font-weight: 700; letter-spacing: -.02em; }
.hint { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; }
.figs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.figs.n3 { grid-template-columns: repeat(3, 1fr); }
.fig { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.fig b { display: block; font-size: 20px; line-height: 1.2; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fig b.tick { animation: tick .45s var(--ease); }
@keyframes tick { 0% { color: var(--green-3); transform: translateY(-3px); } 100% { transform: none; } }
.fig span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.price { margin-top: 20px; }
.pfield { display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 20px; border-radius: 16px; border: 2px solid var(--line-2); background: #fff; transition: border-color .15s var(--ease), box-shadow .2s var(--ease); }
.pfield:focus-within { border-color: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.pfield .cur { font-size: 26px; font-weight: 700; color: var(--muted); }
.pfield input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 30px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; background: transparent; }
.pfield .unit { font-size: 15px; color: var(--muted); }
.price .figs { grid-template-columns: repeat(3, 1fr); }
.err { margin: 8px 0 0; color: var(--red); font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.actions .btn.big.primary { flex: 1 1 100%; }
.banner { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 14px 0 6px; padding: 14px 16px; border-radius: 14px; background: var(--red-soft); color: var(--red); font-size: 14px; animation: rise .35s var(--ease) both; }
.banner b { font-weight: 750; }
.banner > span { flex: 1 1 100%; color: #7a1a12; }
.banner .btn { margin-top: 4px; }

/* changes by hand: small, orange, informative */
.changes { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: #fff7ed; box-shadow: inset 0 0 0 1px #fbd8b0; animation: rise .35s var(--ease) both; }
.ch-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ch-h b { font-size: 13px; font-weight: 750; color: #b45309; }
.ch-h span { font-size: 12px; color: #a1622a; }
.changes ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.changes li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #6b4a2b; }
.changes li i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #d6c3ae; }
.changes li.hand i { background: #ea7a12; }
.ch-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ch-w { flex: none; color: #b08b66; font-variant-numeric: tabular-nums; }
.ch-undo { margin-top: 8px; font-size: 12.5px; font-weight: 650; color: #b45309; }
.ch-undo:hover { text-decoration: underline; text-underline-offset: 3px; }

/* the document */
.doc { position: relative; min-height: 0; display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; box-shadow: var(--sh-1); overflow: hidden; }
.doc-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.doc-t { display: flex; align-items: center; gap: 10px; min-width: 0; }
.doc-ic { flex: none; width: 26px; height: 26px; display: grid; place-items: center; }
.doc-ic svg { width: 26px; height: 26px; filter: drop-shadow(0 2px 3px rgba(16, 124, 65, .25)); }
.doc-ic.k-pptx, .doc-ic.k-docx { display: none; }
.doc-ic:empty { display: none; }
.doc-t b { font-size: 16px; white-space: nowrap; }
.doc-t span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-body { flex: 1; min-height: 0; overflow: auto; padding: 14px; }
.doc-body.is-sheet { padding: 10px; overflow: hidden; display: flex; flex-direction: column; }
.doc-body.is-sheet > .sv { flex: 1; min-height: 0; }
.doc-wait { color: var(--muted); padding: 28px; margin: 0; }

.doc-tools { display: flex; align-items: center; gap: 10px; }
.designs { display: flex; padding: 3px; border-radius: 11px; background: #eef0ec; box-shadow: inset 0 0 0 1px var(--line); }
.dz { display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); transition: background .2s var(--ease), color .2s, box-shadow .2s; }
.dz:hover { color: var(--ink); }
.dz.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.dz.working .sw { animation: pulse .8s ease-in-out infinite; }
.sw { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.sw-classic { background: linear-gradient(135deg, #1D5B35 50%, #F6CF3A 50%); }
.sw-dark { background: linear-gradient(135deg, #0F2219 50%, #F6CF3A 50%); }
.sw-clean { background: linear-gradient(135deg, #ffffff 50%, #111814 50%); }

/* the document builds itself */
.doc-body.pre-build { opacity: 0; }
.bd-hide { opacity: 0 !important; transform: translateY(8px); }
.bd-show { transition: opacity .35s var(--ease), transform .45s var(--ease); }
.bd-fig { animation: bd-fig 1.6s var(--ease) both; border-radius: 4px; }
@keyframes bd-fig { 0% { background: rgba(246, 207, 58, .75); } 70% { background: rgba(246, 207, 58, .35); } 100% { background: transparent; } }
.build { position: absolute; right: 18px; top: 64px; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 550; box-shadow: var(--sh-2); opacity: 0; transform: translateY(-8px); transition: opacity .25s var(--ease), transform .3s var(--ease); white-space: nowrap; }
.build.show { opacity: 1; transform: none; }
.build-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); animation: pulse 1s ease-in-out infinite; }
.build.ok .build-dot { background: #4ade80; animation: none; }
@keyframes pulse { 50% { transform: scale(.5); opacity: .5; } }

/* ---------- static copy: start screen while the engine loads ---------- */
.gd-boot { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--side); color: #fff; transition: opacity .4s var(--ease); }
.gd-boot.gone { opacity: 0; pointer-events: none; }
.gd-boot-in { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(360px, 80vw); text-align: center; }
.gd-boot-in .mark { width: 52px; height: 52px; border-radius: 14px; gap: 5px; animation: pop 1.6s var(--spring) infinite alternate; }
.gd-boot-in .mark i { width: 22px; height: 5px; }
.gd-boot-in .mark i + i { width: 14px; }
.gd-boot-in b { font-size: 26px; letter-spacing: -.02em; }
.gd-boot-t { font-size: 14px; color: #9fb8a8; min-height: 21px; }
.gd-boot-bar { width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.gd-boot-bar i { display: block; width: 0; height: 100%; background: var(--yellow); transition: width .6s var(--ease); }
.gd-boot.failed .gd-boot-t { color: #ffb4ab; }

/* ---------- demo tools, toast, sun ---------- */
.demo { position: fixed; left: 16px; bottom: 16px; z-index: 40; display: flex; flex-direction: column; gap: 6px; padding: 12px; width: 200px; background: var(--ink); color: #fff; border-radius: 14px; box-shadow: var(--sh-2); font-size: 13px; }
.demo button { text-align: left; padding: 6px 8px; border-radius: 8px; background: rgba(255, 255, 255, .08); }
.demo button:hover { background: rgba(255, 255, 255, .16); }
.toast { position: fixed; left: calc(50% + 120px); bottom: 26px; z-index: 50; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 15px; box-shadow: var(--sh-2); transition: opacity .2s var(--ease), transform .25s var(--ease); max-width: min(620px, 80vw); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--red); }
.toast.warn { background: #c2620c; }
.sun { position: fixed; z-index: 60; pointer-events: none; animation: sun-rise 2.6s cubic-bezier(.22, .9, .3, 1) both; }
.sun svg { width: 100%; height: 100%; overflow: visible; }
.sun .glow { transform-origin: 100px 100px; animation: sun-glow 2.6s ease-in-out both; }
.sun .rays { transform-origin: 100px 100px; animation: sun-turn 2.6s linear both; }
@keyframes sun-rise { 0% { transform: translateY(26px) scale(.25); opacity: 0; } 22% { opacity: 1; } 45% { transform: translateY(-6px) scale(1); } 78% { transform: translateY(-10px) scale(1); opacity: 1; } 100% { transform: translateY(-18px) scale(.9); opacity: 0; } }
@keyframes sun-glow { 0% { transform: scale(.6); opacity: 0; } 40% { transform: scale(1.1); opacity: 1; } 60% { transform: scale(.95); } 80% { transform: scale(1.08); } 100% { transform: scale(1.2); opacity: 0; } }
@keyframes sun-turn { from { transform: rotate(-20deg); } to { transform: rotate(40deg); } }

@media (max-width: 1150px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .body { grid-template-columns: 340px 1fr; }
  .saved { display: none; }
}
/* ---------- phone ---------- */
.tabbar { display: none; }
@media (max-width: 860px) {
  html, body { height: auto; overflow: auto; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; }
  .app { display: block; height: auto; }
  .side, .demo { display: none !important; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; gap: 4px; height: calc(64px + env(safe-area-inset-bottom)); padding: 7px 10px calc(7px + env(safe-area-inset-bottom)); background: rgba(16, 51, 31, .97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, .4); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 12px; color: #9fb8a8; font-size: 11.5px; font-weight: 650; transition: background .2s var(--ease), color .2s; }
  .tabbar svg { width: 22px; height: 22px; fill: currentColor; }
  .tabbar a.on { color: #fff; background: rgba(255, 255, 255, .1); }
  .tabbar a.on svg { color: var(--yellow); }
  .view { height: auto; min-height: 100vh; }
  .head { padding: calc(14px + env(safe-area-inset-top)) 16px 14px; gap: 12px; }
  .head h1 { font-size: 22px; }
  .sub { font-size: 13px; }
  .head > .btn { height: 40px; padding: 0 14px; font-size: 14px; }
  .new-form { flex-wrap: wrap; padding: 12px 16px; }
  .new-form input { flex: 1 1 100%; max-width: none; font-size: 16px; }
  .home-body { overflow: visible; padding: 14px 14px 20px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px 15px; border-radius: 14px; }
  .kpi b { font-size: 22px; }
  .kpi span { font-size: 12.5px; }
  .cards { grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
  .ccard { padding: 18px; gap: 14px; border-radius: 16px; }
  .cc-top { flex-direction: column; gap: 8px; }
  .cc-top h2 { font-size: 20px; }
  .mini li span { font-size: 11px; }
  .cc-figs b { font-size: 16px; }
  .cc-figs span { font-size: 11.5px; }
  .cc-figs div + div { padding-left: 10px; }
  .cc-tr { width: 100%; justify-content: space-between; }
  .cc-foot { flex-wrap: wrap; }
  .ccard.add { min-height: 140px; }

  .deal-head .saved { display: none; }
  .crumb { margin-bottom: 0; }
  .stepper { position: sticky; top: 0; z-index: 20; padding: 12px 4px 10px; box-shadow: 0 6px 16px -14px rgba(0, 0, 0, .5); }
  .st-line { top: 16px; left: calc(-50% + 22px); right: calc(50% + 22px); height: 3px; }
  .st-dot { width: 34px; height: 34px; font-size: 13px; }
  .st-dot svg { width: 17px; height: 17px; }
  .st.cur .st-dot::after { inset: -6px; }
  .st-b { gap: 6px; padding: 0 2px; }
  .st-tx b { font-size: 12px; }
  .st-sub { display: none; }
  .body { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
  .act { overflow: visible; border-radius: 16px; }
  .act .in { padding: 20px 18px 22px; }
  .act h2 { font-size: 21px; }
  .hint { font-size: 14.5px; }
  .fig { padding: 10px 12px; }
  .fig b { font-size: 17px; }
  .pfield { height: 58px; }
  .pfield input { font-size: 26px; }
  .actions .btn.big { flex: 1 1 100%; height: 52px; }
  .doc { height: 78vh; min-height: 460px; border-radius: 16px; }
  .doc-bar { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .doc-t span { display: none; }
  .doc-tools { width: 100%; justify-content: space-between; gap: 8px; }
  .designs { overflow-x: auto; }
  .dz { padding: 0 10px; }
  .doc-body { padding: 8px; }
  .doc-body.is-sheet { padding: 6px; }
  .build { top: auto; bottom: 12px; left: 12px; right: 12px; justify-content: center; white-space: normal; text-align: center; }

  .ctable { margin-top: 14px; background: transparent; box-shadow: none; overflow: visible; }
  .chead { display: none; }
  .crow, .crow.prow { grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-bottom: 10px; padding: 16px; border-top: 0; border-radius: 16px; background: var(--surface); box-shadow: var(--sh-1); }
  .crow .cname { grid-column: 1 / -1; }
  .cval::before { content: attr(data-k); display: block; margin-bottom: 2px; font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

  .toast { left: 50%; bottom: calc(78px + env(safe-area-inset-bottom)); max-width: calc(100vw - 28px); font-size: 14px; }
  .modal { padding: 0; place-items: end stretch; }
  .mail { width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; transform: translateY(40px); }
  .mail textarea { min-height: 150px; }
  .mail-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .mail-note { font-size: 11.5px; }
  .mail-row input { font-size: 16px; }
}
/* after the start screen fades, the first screen settles in */
body:not(.launched) .view { animation: none; }
body.launched .view { animation: launch .5s var(--ease) both; }
@keyframes launch { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
