/* Animated illustrations, copied from the Cubicle Quote app (E:\CubicleQuote\src\proposal\proposal.css).
   Pictures are generated into the pages by tools/gen-art.mjs. Keep in sync with that file when the app's art changes. */

:root { --warn: #8a4b08; --warn-soft: #fff4e0; }

/* ---- Website layout for the "without vs with" cards ---- */
.vs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.vs-card {
  display: grid; align-content: start; gap: 14px; padding: 14px; border-radius: var(--radius-card);
  background: var(--panel); border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.vs-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); border-color: #cfd9bd; }
.vs-pics { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vs-pics .art { max-width: none; }
.vs-badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: var(--accent); border: 3px solid var(--panel);
  font: 400 15px/1 var(--font-display); letter-spacing: .04em;
  transition: transform .35s var(--ease);
}
.vs-card:hover .vs-badge { transform: translate(-50%, -50%) rotate(-12deg) scale(1.12); }
.vs-text { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 14px; line-height: 1.45; }
.vs-text p { padding: 10px 12px; border-radius: 12px; }
.vs-text small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.vs-now { background: var(--panel-2); color: var(--muted); }
.vs-then { background: rgba(158, 255, 0, .12); color: var(--text-2); font-weight: 500; }
.vs-then small { color: var(--accent-text); }
@media (max-width: 960px) { .vs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .vs-grid { grid-template-columns: 1fr; } }

/* ---- Phone section ---- */
.phone-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.phone-wrap { display: grid; justify-items: center; gap: 4px; padding-top: 14px; }
@media (max-width: 860px) { .phone-grid { grid-template-columns: 1fr; } }

/* ---- Tablet and laptop (same dark screen look as the phone) ---- */
.devices-row { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(24px, 4vw, 48px); align-items: end; margin-top: clamp(48px, 7vw, 88px); }
.device { margin: 0; display: grid; gap: 16px; min-width: 0; }
.device figcaption { display: grid; gap: 2px; text-align: center; font-size: 14px; color: var(--muted); }
.device figcaption b { color: var(--text); font-size: 16px; }
@media (max-width: 860px) { .devices-row { grid-template-columns: 1fr; } }

.tab-screen, .lap-screen {
  position: relative; overflow: hidden; color: #fff; font-family: var(--font-sans);
  background: linear-gradient(#171a14, #0d0f0b);
}
.dv-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 10px; color: #a9ae9f; text-transform: uppercase; letter-spacing: .1em; }
.dv-top span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dv-live { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pm-live 1.6s ease-in-out infinite; }
.dv-toast {
  position: absolute; left: 50%; top: 10px; transform: translate(-50%, -140%); opacity: 0;
  background: #fff; color: var(--text); font-size: 11px; font-weight: 600; padding: 7px 12px; border-radius: 10px; white-space: nowrap;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.6); transition: transform .4s var(--ease), opacity .3s;
}
.dv-toast.show { transform: translate(-50%, 0); opacity: 1; }

/* Tablet: landscape, thick rounded bezel */
.tab { width: 100%; max-width: 480px; justify-self: center; padding: 14px; border-radius: 26px; background: #22262d; box-shadow: inset 0 0 0 2px #3a3f48, 0 30px 50px -28px rgba(17,24,39,.55); }
.tab-screen { aspect-ratio: 4 / 3; border-radius: 12px; padding: 10px 12px; display: grid; grid-template-rows: auto 1fr; gap: 8px; }
.tab-body { display: grid; grid-template-columns: 1.45fr 1fr; grid-template-rows: auto 1fr; gap: 8px; min-height: 0; }
.tab-cats { grid-column: 1; display: flex; gap: 5px; flex-wrap: wrap; }
.tab-cats span { font-size: 9.5px; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.06); color: #c3cddb; }
.tab-cats span.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.tab-tiles { grid-column: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; align-content: start; }
.tab-tiles span { display: grid; gap: 2px; align-content: end; min-height: 52px; padding: 7px; border-radius: 9px; font-size: 9.5px; line-height: 1.2; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.06); transition: background .2s, transform .2s, border-color .2s; }
.tab-tiles b { font-family: "Barlow Condensed", var(--font-sans); font-size: 13px; color: var(--accent); }
.tab-tiles span.tap { background: rgba(158,255,0,.18); border-color: var(--accent); transform: scale(.94); }
.tab-cart { grid-column: 2; grid-row: 1 / 3; display: grid; grid-template-rows: auto 1fr auto auto; gap: 6px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); min-height: 0; }
.tab-cart small, .lap-card small, .lap-kpis small { font-size: 8.5px; text-transform: uppercase; letter-spacing: .1em; color: #a9ae9f; }
.tab-lines { display: grid; gap: 4px; align-content: start; overflow: hidden; }
.tab-lines li { display: flex; justify-content: space-between; gap: 6px; font-size: 9.5px; padding: 4px 6px; border-radius: 6px; background: rgba(255,255,255,.05); animation: rise .35s var(--ease); }
.tab-total { display: grid; }
.tab-total b { font-family: "Barlow Condensed", var(--font-sans); font-weight: 700; font-size: 24px; line-height: 1; color: var(--accent); }
.tab-pay { text-align: center; font-size: 10px; font-weight: 600; padding: 7px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); transition: transform .2s; }
.tab-pay.press { transform: scale(.94); }

/* Laptop: lid + screen + base */
.lap { width: 100%; max-width: 620px; justify-self: center; }
.lap-lid { margin: 0 7%; padding: 10px 10px 14px; border-radius: 16px 16px 4px 4px; background: #22262d; box-shadow: inset 0 0 0 2px #3a3f48; }
.lap-screen { aspect-ratio: 16 / 10; border-radius: 6px; display: grid; grid-template-columns: 26px 1fr; }
.lap-base { height: 14px; border-radius: 2px 2px 14px 14px; background: linear-gradient(#cfd4da, #9aa1aa); position: relative; box-shadow: 0 24px 40px -22px rgba(17,24,39,.6); }
.lap-base::before { content: ""; position: absolute; left: 50%; top: 0; width: 18%; height: 5px; transform: translateX(-50%); border-radius: 0 0 8px 8px; background: #8b929b; }
.lap-side { display: grid; align-content: start; gap: 8px; padding: 10px 7px; background: #111827; }
.lap-side i { height: 12px; border-radius: 4px; background: rgba(255,255,255,.1); }
.lap-side i.on { background: var(--accent); }
.lap-main { display: grid; grid-template-rows: auto auto 1fr; gap: 8px; padding: 10px 12px; min-width: 0; min-height: 0; }
.lap-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lap-kpis div, .lap-card { padding: 7px 9px; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); min-width: 0; }
.lap-kpis b { display: block; font-family: "Barlow Condensed", var(--font-sans); font-weight: 700; font-size: clamp(13px, 2.2vw, 19px); line-height: 1.1; color: var(--accent); white-space: nowrap; }
.lap-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 6px; min-height: 0; }
.lap-card { display: grid; align-content: start; gap: 4px; }
.lap-bars { display: flex; align-items: flex-end; gap: 4px; height: clamp(54px, 9vw, 92px); }
.lap-bars i { flex: 1; height: var(--h); border-radius: 3px 3px 1px 1px; background: rgba(158,255,0,.3); transform-origin: 50% 100%; transition: transform .9s cubic-bezier(.2,.8,.2,1.1); }
.lap-bars i:nth-child(n) { transition-delay: calc(var(--i, 0) * 60ms); }
.lap-bars i.now { background: var(--accent); }
.lap-branch { display: grid; grid-template-columns: 46px 1fr; align-items: center; gap: 6px; font-size: 8.5px; color: #c3cddb; }
.lap-branch i { height: 6px; width: var(--w); border-radius: 3px; background: var(--cube-sky); transform-origin: 0 50%; transition: transform 1s var(--ease) .3s; }
.lap-low { display: flex; justify-content: space-between; gap: 6px; font-size: 8.5px; color: #c3cddb; }
.lap-low em { font-style: normal; font-weight: 600; color: #fcbe5a; transition: opacity .3s 1.2s; }

/* Before playing (script present and not yet in view): charts empty */
.lap.js:not(.play) .lap-bars i { transform: scaleY(0); }
.lap.js:not(.play) .lap-branch i { transform: scaleX(0); }
.lap.js:not(.play) .lap-low em { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .lap-bars i, .lap-branch i, .lap-low em { transition: none; } .dv-live { animation: none; } }
@media (max-width: 520px) { .lap-screen { aspect-ratio: auto; } .lap .dv-top span:last-child { display: none; } .lap-grid { grid-template-columns: 1fr; } .tab { padding: 10px; border-radius: 20px; } .tab-tiles span { min-height: 42px; } .tab-cats span:nth-child(n+4) { display: none; } }

/* ---- From the Quote app ---- */
.art { display: block; width: 100%; max-width: 240px; height: auto; margin: 0 auto; border-radius: 10px; background: #fbfbf8; }
.art-then { background: #fbfff3; }
.art * { transform-box: fill-box; }
/* Generic moves. The resting state of every shape is its finished look (used in print and reduced motion). */
.a-tilt { transform-origin: 50% 100%; animation: a-tilt 3.5s ease-in-out infinite; }
.a-bob { animation: a-bob 2.2s ease-in-out infinite; }
.a-brow { animation: a-brow 3.5s ease-in-out infinite; }
.a-blink { transform-origin: 50% 50%; animation: a-blink 4.2s infinite; }
.a-sweat { animation: a-sweat 2.6s ease-in infinite both; }
.a-q { transform-origin: 50% 100%; animation: a-q 2.8s ease-out infinite both; }
.a-spin { transform-origin: 50% 100%; animation: a-spin 2.4s linear infinite; }
.a-spin-slow { transform-origin: 50% 100%; animation: a-spin 28.8s linear infinite; }
.a-rot { transform-origin: 50% 50%; animation: a-spin 3s linear infinite; }
.a-pop { transform-origin: 50% 50%; animation: a-pop 4s ease-out infinite both; }
.a-grow { transform-origin: 50% 100%; animation: a-grow 4s ease-out infinite both; }
.a-draw { stroke-dasharray: 1; animation: a-draw 4s linear infinite both; }
.a-fly { animation: a-fly 2.7s ease-in infinite both; }
.a-slide { animation: a-slide 4s ease-out infinite both; }
.a-print { animation: a-print 4s ease-out infinite both; }
.a-twinkle { transform-origin: 50% 50%; animation: a-twinkle 1.8s ease-in-out infinite both; }
.a-pulse { transform-origin: 50% 50%; animation: a-pulse .9s ease-in-out infinite alternate; }
.a-ring { transform-origin: 50% 100%; animation: a-ring 2s ease-in-out infinite; }
.a-swing { transform-origin: 50% 0; animation: a-swing 2.4s ease-in-out infinite alternate; }
.a-wobble { transform-origin: 50% 100%; animation: a-wobble 1.6s ease-in-out infinite alternate; }
.a-scan { animation: a-scan 3s ease-in-out infinite alternate; }
.a-beam { animation: a-beam 1.2s ease-in-out infinite alternate; }
.a-flicker { transform-origin: 50% 100%; animation: a-flicker 1.4s steps(1) infinite; }
.a-shrink { transform-origin: 0 50%; animation: a-shrink 3s ease-in-out infinite; }
.a-drop { animation: a-drop 1.2s ease-in infinite; }
.a-level { transform-origin: 0 50%; animation: a-level 4s ease-in-out infinite; }
.a-toggle { animation: a-toggle 3s infinite; }
.a-tap { animation: a-tap 3.6s infinite; }
.a-status { animation: a-status 3.6s infinite both; }
.a-flip { transform-origin: 50% 0; animation: a-flip 3s ease-in infinite; }
.a-flash { opacity: .5; animation: a-flash 1.3s infinite; }
@keyframes a-tilt { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(4deg); } }
@keyframes a-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes a-brow { 0%, 40%, 100% { transform: translateY(0); } 50%, 80% { transform: translateY(-2px); } }
@keyframes a-blink { 0%, 46%, 50%, 100% { transform: scaleY(1); } 48% { transform: scaleY(.1); } }
@keyframes a-sweat { 0% { opacity: 0; transform: translateY(0); } 20%, 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(9px); } }
@keyframes a-q { 0% { opacity: 0; transform: translateY(4px) scale(.7); } 25% { opacity: 1; transform: translateY(0) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px) rotate(12deg); } }
@keyframes a-spin { to { transform: rotate(360deg); } }
@keyframes a-pop { 0% { opacity: 0; transform: scale(0); } 10% { opacity: 1; transform: scale(1.18); } 16%, 88% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(.6); } }
@keyframes a-grow { 0% { transform: scaleY(0); } 22%, 92% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes a-draw { 0% { stroke-dashoffset: 1; opacity: 1; } 35%, 90% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes a-fly { 0% { opacity: 0; transform: none; } 12% { opacity: 1; transform: none; } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--fx, 30px), var(--fy, -40px)) rotate(var(--fr, 40deg)); } }
@keyframes a-slide { 0% { opacity: 0; transform: translateX(var(--sx, 30px)); } 18%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes a-print { 0% { transform: translateY(30px); } 40%, 90% { transform: none; opacity: 1; } 100% { transform: none; opacity: 0; } }
@keyframes a-twinkle { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1.1) rotate(20deg); } }
@keyframes a-pulse { from { transform: scale(1); } to { transform: scale(1.14); } }
@keyframes a-ring { 0%, 45%, 100% { transform: rotate(0); } 5%, 15%, 25%, 35% { transform: rotate(10deg); } 10%, 20%, 30%, 40% { transform: rotate(-10deg); } }
@keyframes a-swing { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
@keyframes a-wobble { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
@keyframes a-scan { from { transform: translateX(-12px); } to { transform: translateX(8px); } }
@keyframes a-beam { from { transform: translateY(-14px); } to { transform: translateY(14px); } }
@keyframes a-flicker { 0% { transform: scaleY(.4); } 25% { transform: scaleY(1); } 50% { transform: scaleY(.6); } 75% { transform: scaleY(.9); } }
@keyframes a-shrink { 0%, 15% { transform: scaleX(1); } 60%, 85% { transform: scaleX(.3); } 100% { transform: scaleX(1); } }
@keyframes a-drop { 0% { opacity: 0; transform: translateY(-4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(6px); } }
@keyframes a-level { 0%, 100% { transform: scaleX(1); } 30% { transform: scaleX(.55); } 60% { transform: scaleX(.8); } }
@keyframes a-toggle { 0%, 45% { opacity: 1; } 50%, 95% { opacity: .3; } }
@keyframes a-tap { 0%, 14%, 100% { fill: #dfe8d0; } 5% { fill: #9eff00; } }
@keyframes a-status { 0% { fill: #c9ccc0; } 35% { fill: #f2c14e; } 70%, 100% { fill: #4c9a1a; } }
@keyframes a-flash { 0%, 30%, 100% { opacity: 0; } 36%, 52% { opacity: .55; } 58% { opacity: 0; } 64%, 74% { opacity: .55; } }
@keyframes a-flip { 0%, 55% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-12px) rotate(-10deg); } }

/* The bill writer (handBills "without"): one 7s loop, write four lines, pause, new page. */
.art-hand { animation: art-write 7s linear infinite; }
.art-scribble { transform-origin: 100% 100%; animation: art-scribble .22s ease-in-out infinite alternate; }
.art-line { stroke-dasharray: 1; animation: 7s linear infinite; }
.art-line1 { animation-name: art-line1; }
.art-line2 { animation-name: art-line2; }
.art-line3 { animation-name: art-line3; }
.art-line4 { animation-name: art-line4; }
@keyframes art-scribble { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
@keyframes art-write {
  0% { transform: translate(0, 0); } 18% { transform: translate(36px, 0); }
  21% { transform: translate(0, 6px); } 39% { transform: translate(36px, 6px); }
  42% { transform: translate(0, 12px); } 57% { transform: translate(28px, 12px); }
  60% { transform: translate(20px, 18px); } 74% { transform: translate(40px, 18px); }
  80%, 94% { transform: translate(48px, 2px); } 100% { transform: translate(0, 0); }
}
@keyframes art-line1 { 0% { stroke-dashoffset: 1; opacity: 1; } 18%, 90% { stroke-dashoffset: 0; opacity: 1; } 95%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes art-line2 { 0%, 21% { stroke-dashoffset: 1; opacity: 1; } 39%, 90% { stroke-dashoffset: 0; opacity: 1; } 95%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes art-line3 { 0%, 42% { stroke-dashoffset: 1; opacity: 1; } 57%, 90% { stroke-dashoffset: 0; opacity: 1; } 95%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes art-line4 { 0%, 60% { stroke-dashoffset: 1; opacity: 1; } 74%, 90% { stroke-dashoffset: 0; opacity: 1; } 95%, 100% { stroke-dashoffset: 0; opacity: 0; } }

/* Still pictures (reduced motion; print has the same rule). */
@media (prefers-reduced-motion: reduce) {
  .art * { animation: none !important; }
  .art-hand { transform: translate(40px, 18px); }
}

.pm { position: relative; width: min(300px, 82vw); margin: 0; }
.pm-svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .18)); }
.pm-bar { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .8s cubic-bezier(.2, .8, .2, 1.1) var(--d, 0s); }
.pm-line { stroke-dasharray: 1; transition: stroke-dashoffset 1.3s ease .6s; }
.pm-dot { transition: opacity .3s ease var(--d, 0s); }
.pm-seg { transition: stroke-dasharray .9s ease var(--d, 0s), stroke-dashoffset .9s ease; }
.pm.live .pm-seg { transition-delay: 0s; }
.pm-num { transform-box: fill-box; transform-origin: 0 70%; }
.pm-num[text-anchor="end"] { transform-origin: 100% 70%; }
.pm-num.flash { animation: pm-flash .7s ease-out; }
@keyframes pm-flash { 0% { transform: scale(1); } 35% { transform: scale(1.08); fill: #fff; } 100% { transform: scale(1); } }
.pm-live { transform-box: fill-box; transform-origin: center; animation: pm-live 1.6s ease-in-out infinite; }
@keyframes pm-live { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.pm-toast { opacity: 0; transform: translateY(-16px); transition: opacity .35s ease, transform .35s ease; pointer-events: none; }
.pm-toast.show { opacity: 1; transform: none; }
.pm.js:not(.play) .pm-bar { transform: scaleY(0); }
.pm.js:not(.play) .pm-line { stroke-dashoffset: 1; }
.pm.js:not(.play) .pm-dot { opacity: 0; }
.pm.js:not(.play) .pm-seg { stroke-dasharray: 0 100; }
@media (min-width: 820px) { .pm { width: 280px; } }
@media (prefers-reduced-motion: reduce) { .pm-bar, .pm-line, .pm-dot, .pm-seg { transition: none; } .pm-live { animation: none; } }
.example { position: absolute; top: -10px; right: 12px; background: var(--warn-soft); color: var(--warn); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; }
.pm .example { top: -8px; left: 50%; right: auto; transform: translateX(-50%); z-index: 1; }
.vs-pics .ba-art { display: block; }
