/* An estimate open in CCC ONE: its layout and colours, measured off a recording of the real screen,
 * and none of its logos or names. The real panel (overlay.js) docks on it exactly as it does in a
 * shop. 1280x800, never scaled from inside: the homepage moves the camera by transforming the iframe.
 */
* { box-sizing: border-box; }
html, body { margin: 0; width: 1280px; height: 800px; overflow: hidden; background: #e8edee;
  font: 13px/1.4 Roboto, "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif; color: #212121;
  -webkit-font-smoothing: antialiased; touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; flex: none; }
.scr { position: absolute; inset: 0; display: grid; grid-template-columns: 56px 1fr; grid-template-rows: 40px 1fr; }

/* the rail, full height, menu above the rest */
.rail { grid-row: 1 / -1; background: #fff; border-right: 1px solid #e0e0e0; display: flex; flex-direction: column;
        align-items: center; color: #616161; }
.rail > * { width: 56px; height: 40px; display: grid; place-items: center; }
.rail .ham { height: 40px; }
.rail .on { background: #ececec; color: #176bca; box-shadow: inset 3px 0 0 #176bca; }

/* the workfile bar */
.wf { display: flex; align-items: center; gap: 20px; padding: 0 16px 0 18px; background: #176bca; color: #fff; }
.wf .ic { display: flex; gap: 22px; }
.wf h1 { flex: 1; margin: 0; text-align: center; font-size: 13.5px; font-weight: 400; letter-spacing: .01em; }

/* the estimate */
.main { display: grid; grid-template-rows: 40px 34px 1fr auto; min-height: 0; position: relative; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 14px; background: #f3f3f3;
       border-bottom: 1px solid #e3e3e3; }
.top .sel { display: flex; align-items: center; gap: 46px; font-size: 16px; color: #424242; }
.top .acts { display: flex; gap: 26px; color: #424242; font-size: 11.5px; }
.top .acts span { display: flex; align-items: center; gap: 6px; }
.bar2 { display: grid; grid-template-columns: 1fr auto; align-items: stretch; padding: 0 18px 0 200px; background: #f3f3f3;
        box-shadow: 0 2px 0 #b0a7be; position: relative; z-index: 1; }
.tabs { display: flex; align-items: stretch; }
.tab { display: flex; align-items: center; gap: 12px; padding: 0 12px; font-size: 11.5px; color: #424242; }
.tab.on { background: #81589f; color: #fff; }
.tab b { display: inline-grid; place-items: center; width: 14px; height: 14px; font-size: 10px; font-weight: 500;
         background: #fff; color: #81589f; }
.tab b.g { background: #2e9e4d; color: #fff; }
.tab b.o { background: #f08a00; color: #fff; }
.total { display: grid; justify-items: center; align-content: center; gap: 3px; padding-right: 220px; font-size: 18px;
         color: #424242; font-variant-numeric: tabular-nums; }
.total i { display: block; width: 80px; height: 1px; background: #d0d0d0; position: relative; }
.total i::after { content: ""; position: absolute; left: 60px; top: -2px; width: 5px; height: 5px; border-radius: 50%;
                  background: #616161; }
.total.up #total { color: #0d7a3c; }

.work { min-height: 0; overflow: hidden; padding: 30px 0 0; }
.card { width: 812px; margin: 0 0 0 200px; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .12); height: 100%;
        display: flex; flex-direction: column; }
.gridbox { flex: 1; overflow: hidden; scroll-behavior: auto; }
.grid { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; table-layout: fixed; }
.grid th { position: sticky; top: 0; z-index: 1; background: #f3f3f3; text-align: left; font-size: 11px; font-weight: 500;
           letter-spacing: .03em; color: #616161; padding: 13px 8px; }
.grid td { height: 36px; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #212121;
           font-size: 13px; }
.grid col.est { width: 46px; } .grid col.n { width: 46px; } .grid col.q { width: 56px; } .grid col.p { width: 104px; }
.grid col.l { width: 70px; } .grid col.pt { width: 66px; }
.grid .r { text-align: right; }
.grid td.n { color: #5c5c5c; text-align: center; }
.grid tr.h td { height: 34px; font-size: 11px; font-weight: 500; letter-spacing: .03em; color: #6b6b6b; padding-top: 6px; }
.grid tr.h td span { display: flex; align-items: center; gap: 10px; }
.grid tr.h td span::after { content: ""; flex: 1; border-top: 1.5px dotted #c8c8c8; }
.grid tbody tr:not(.h) { cursor: default; }
.grid tbody tr:not(.h):hover td { background: #f7f7f7; }
.grid tr.sel td { background: #e3eefb !important; }
.grid tr.add td { background: #D2F7F0; font-weight: 500; }
.grid tr.add td:first-child { box-shadow: inset 4px 0 0 #14B8A6; }
.grid tr.add.in td { animation: in .5s ease-out both; }
@keyframes in { from { background: #fff; } 35% { background: #7EEADB; } to { background: #D2F7F0; } }
/* CCC shows a line's note as blue text directly beneath the line. */
.grid tr.note td { height: 24px; padding-top: 0; padding-bottom: 6px; color: #1565c0; font-size: 12.5px; }
.grid tr.note td:first-child { box-shadow: inset 4px 0 0 #14B8A6; }
.grid tr.note span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 860px; }
.grid tr.note.in td { animation: notein .5s ease-out both; }
@keyframes notein { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
/* CCC's inline row editor, which a manual line goes in through */
.grid tr.edit td { background: #eef4fc; height: auto; padding-top: 6px; padding-bottom: 6px; }
.grid tr.edit .ed { display: grid; grid-template-columns: 70px 1fr 70px 60px 60px; gap: 8px; }
.grid tr.edit .ed i, .grid tr.edit .ed b { font-style: normal; font-weight: 400; border-bottom: 1px solid #9e9e9e; padding: 4px 2px;
                                           color: #9e9e9e; font-size: 12px; }
.grid tr.edit .ed b { color: #212121; }
.grid tr.edit .edbar { display: flex; gap: 18px; justify-content: flex-end; margin-top: 8px; font-size: 11px; color: #1565c0; }
.grid tr.edit .edbar em { font-style: normal; }
.grid tr.edit .edbar strong { background: #1565c0; color: #fff; padding: 2px 12px; font-weight: 500; }
.chips { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 10px; background: #ece4f3; margin-top: 18px; }
.chips span { padding: 5px 14px; background: #d9cbe6; color: #3f2b54; font-size: 11px; }

/* the parts panel under the estimate */
.parts { background: #f2f2f2; border-top: 1px solid #d6d6d6; height: 216px; position: relative;
         transition: height .5s cubic-bezier(.65,0,.35,1); overflow: hidden; }
.parts.low { height: 44px; }
.parts .grip { width: 30px; height: 3px; border-radius: 2px; background: #9e9e9e; margin: 5px auto 0; }
.parts-hd { display: flex; align-items: center; gap: 14px; height: 36px; padding: 0 16px 0 10px; }
.parts-hd .chip { display: flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 14px; background: #fff;
                  box-shadow: 0 1px 2px rgb(0 0 0 / .18); color: #424242; font-size: 11px; }
.parts-hd .chip svg { color: #176bca; }
.parts-hd .res { margin-left: auto; display: flex; align-items: center; gap: 6px; color: #616161; font-size: 11px; }
.parts-hd .back[hidden] { display: none; }
.parts-hd .back { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #424242; }
.groups { display: grid; grid-template-columns: repeat(5, 1fr) 140px; padding: 6px 14px 0 18px; background: #fff;
          height: calc(100% - 44px); }
.groups ul { list-style: none; margin: 0; padding: 0; display: contents; }
.groups .cols { display: grid; grid-template-columns: repeat(5, 1fr); grid-auto-rows: 31px; grid-column: 1 / 6;
                grid-auto-flow: column; grid-template-rows: repeat(6, 31px); }
.groups .side { display: grid; grid-auto-rows: 31px; border-left: 1px solid #e0e0e0; padding-left: 14px; align-content: start; }
.groups li { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: #424242; letter-spacing: .01em;
             white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.groups .cols li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: #e3e3e3; }
.groups .cols li.on::before { background: #176bd0; }
.groups li:hover { color: #176bca; }

.drill { background: #fff; height: calc(100% - 44px); display: flex; flex-direction: column; }
.drill[hidden], .groups[hidden] { display: none; }
.sect, .prow { display: grid; grid-template-columns: 40px 1fr 110px 70px 70px 230px; align-items: center; padding: 0 14px 0 18px; }
.sect { height: 28px; font-size: 10.5px; letter-spacing: .03em; color: #616161; }
.sect span:first-child { grid-column: 1 / 3; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.sect span:nth-child(n+2) { text-align: right; }
.prows { flex: 1; overflow: hidden; }
.prow { height: 30px; font-size: 12.5px; color: #212121; }
.prow > span:nth-child(1) { color: #616161; text-align: center; }
.prow > span:nth-child(2) { border-left: 3px solid #f5b400; padding-left: 10px; }
.prow > span:nth-child(n+3):nth-child(-n+5) { text-align: right; font-variant-numeric: tabular-nums; }
.prow .ops { display: flex; justify-content: flex-end; gap: 16px; font-size: 11px; font-weight: 500; color: #176bca;
             letter-spacing: .04em; visibility: hidden; }
.prow.hot { background: #dce8f8; }
.prow.hot .ops { visibility: visible; }
.prow .ops b { padding: 2px 6px; border-radius: 3px; font-weight: 500; }
.prow .ops b.go { background: #176bca; color: #fff; }
.hnotes { height: 26px; display: flex; align-items: center; gap: 22px; padding: 0 18px; background: #f3f3f3;
          font-size: 11px; color: #424242; }

/* CCC's dialogs: grey veil, white sheet */
.veil { position: absolute; inset: 0; z-index: 30; background: rgb(66 66 66 / .45); opacity: 0; pointer-events: none;
        transition: opacity .25s; }
.veil.open { opacity: 1; pointer-events: auto; }
.pc { position: absolute; z-index: 31; left: 300px; top: 92px; width: 640px; height: 470px; background: #fff;
      box-shadow: 0 10px 40px rgb(0 0 0 / .3); display: flex; flex-direction: column; padding: 22px 22px 0;
      opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s; pointer-events: none; }
.pc.open { opacity: 1; transform: none; }
/* While its OK is pressed, the dialog stands in front of the auditor panel, which would cover the button. */
.pc.front { z-index: 2147483645; }
.pc h2 { margin: 0 0 14px; font-size: 18px; font-weight: 400; color: #1565c0; }
.pc .q { display: flex; align-items: center; justify-content: space-between; width: 290px; height: 32px; padding: 0 10px;
         border: 1px solid #9e9e9e; border-radius: 3px; font-size: 13px; margin-bottom: 18px; }
.pc .q svg { color: #1565c0; }
.pc table { width: 100%; border-collapse: collapse; font-size: 12px; }
.pc th { background: #f3f3f3; color: #616161; font-weight: 500; font-size: 10.5px; letter-spacing: .03em; text-align: left;
         padding: 10px 8px; }
.pc td { padding: 9px 8px; border-bottom: 1px solid #eee; }
.pc tr.on td { background: #1565c0; color: #fff; }
.pc .r { text-align: right; }
.pc .rows { flex: 1; overflow: hidden; }
.pc footer { display: flex; align-items: center; justify-content: space-between; height: 54px; margin: 0 -22px;
             padding: 0 22px; background: #f3f3f3; font-size: 12px; color: #1565c0; }
.pc footer b { padding: 7px 20px; background: #1565c0; color: #fff; font-weight: 500; border-radius: 2px; }
.pc footer b.go { background: #0d47a1; }

/* The grid reloading after a part-code OK: CCC empties it and shows its cloud until the lines are back. */
.card { position: relative; }
.reload { position: absolute; inset: 40px 0 0; z-index: 2; display: grid; place-items: center; background: #fff; opacity: 0;
          pointer-events: none; transition: opacity .2s; }
.reload.on { opacity: 1; }

/* What a press on the screen around the panel says: this part of CCC is not in the sample. */
.toast { position: absolute; z-index: 40; left: 50%; bottom: 300px; transform: translate(-50%, 8px); padding: 9px 16px;
         background: #323232; color: #fff; border-radius: 4px; font-size: 13px; opacity: 0; pointer-events: none;
         transition: opacity .2s, transform .2s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* The demo's own layer over CCC, in the homepage's face, in two kinds that never look alike.
   CLICK HERE: gold, glowing, with a hand and a ripple where to click. One at a time, in the demo and
   in the reel alike: gold is only ever what is about to be pressed.
   GOOD TO KNOW: dark notes and a moving dashed outline round what they explain. Never clickable. */
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("/app/fonts/barlow-600.woff2") format("woff2"); }
/* Not `.note`: that is the grid's own reason row, which these styles would hide. */
.tip, .tell, .frame, .leaders, .ripple { position: absolute; z-index: 2147483646; pointer-events: none; }
.tip { display: flex; align-items: center; gap: 8px; opacity: 0; transition: opacity .3s, left .45s cubic-bezier(.65,0,.35,1), top .45s cubic-bezier(.65,0,.35,1);
       padding: 10px 16px 11px 12px; border-radius: 8px; background: #F7C948; color: #0D2547; max-width: 270px;
       font: 600 19px/1.2 "Barlow", system-ui, sans-serif; box-shadow: 0 10px 28px -8px rgb(0 0 0 / .45); }
.tip svg { flex: none; }
.tip.on { opacity: 1; }
.tip::after { content: ""; position: absolute; border: 11px solid transparent; }
.tip[data-side="left"]::after { left: 100%; top: 50%; margin-top: -11px; border-left-color: #F7C948; }
.tip[data-side="above"]::after { top: 100%; left: 14px; border-top-color: #F7C948; }
/* Above its target on a phone, one line covers less of what is under it. */
.tip[data-side="above"] { max-width: none; white-space: nowrap; }
.tip.on[data-side="left"] { animation: nudge-x 1.4s ease-in-out infinite; }
.tip.on[data-side="above"] { animation: nudge-y 1.4s ease-in-out infinite; }
@keyframes nudge-x { 50% { transform: translateX(5px); } }
@keyframes nudge-y { 50% { transform: translateY(4px); } }
/* The one note that is also the click: gold, with its own OK. */
.gate { position: absolute; z-index: 2147483646; width: 250px; padding: 14px 16px; border-radius: 8px; background: #F7C948; color: #0D2547;
        box-shadow: 0 10px 28px -8px rgb(0 0 0 / .45); opacity: 0; pointer-events: none; cursor: pointer; transition: opacity .3s; }
.gate.on { opacity: 1; pointer-events: auto; animation: nudge-x 1.4s ease-in-out infinite; }
.gate.snap { transition: none; }
.gate b { display: block; font: 600 20px/1.2 "Barlow", system-ui, sans-serif; }
.gate span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.3; }
.gate em { display: inline-block; margin-top: 12px; padding: 7px 22px; border-radius: 6px; background: #0D2547; color: #fff;
           font: 600 16px/1 "Barlow", system-ui, sans-serif; font-style: normal; }
.gate::after { content: ""; position: absolute; left: 100%; top: 30px; border: 11px solid transparent; border-left-color: #F7C948; }
.gate[data-side="over"]::after { display: none; }
.gate[data-side="over"].on { animation: none; }
.ripple { width: 0; height: 0; opacity: 0; }
.ripple.on { opacity: 1; }
.ripple::before, .ripple::after { content: ""; position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; border-radius: 50%;
                                  border: 3px solid #F7C948; opacity: 0; }
.ripple.on::before, .ripple.on::after { animation: ripple 1.6s ease-out infinite; }
.ripple.on::after { animation-delay: .8s; }
@keyframes ripple { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }

.tell { opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s, left .45s cubic-bezier(.65,0,.35,1), top .45s cubic-bezier(.65,0,.35,1);
        max-width: 250px; padding: 10px 14px 11px; border-radius: 8px; background: #1b1d1f; color: #fff;
        box-shadow: 0 12px 30px -10px rgb(0 0 0 / .5); font-family: "Barlow", system-ui, sans-serif; }
.tell.on { opacity: 1; transform: none; }
.tell b { display: block; font-weight: 600; font-size: 18px; line-height: 1.2; }
.tell span { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.3; color: #c9c6bd; }
.tell span[hidden] { display: none; }
.leaders { left: 0; top: 0; }
.leaders line { stroke: #1b1d1f; stroke-width: 2; }
.leaders circle { fill: #1b1d1f; }
.frame { opacity: 0; border-radius: 8px; transition: opacity .35s, left .45s, top .45s, width .45s, height .45s;
         background-image: linear-gradient(90deg, #1b1d1f 50%, transparent 0), linear-gradient(90deg, #1b1d1f 50%, transparent 0),
                           linear-gradient(0deg, #1b1d1f 50%, transparent 0), linear-gradient(0deg, #1b1d1f 50%, transparent 0);
         background-repeat: repeat-x, repeat-x, repeat-y, repeat-y; background-size: 14px 2px, 14px 2px, 2px 14px, 2px 14px;
         background-position: 0 0, 0 100%, 0 0, 100% 0; }
.frame.on { opacity: 1; animation: ants 1s linear infinite; }
/* Shown somewhere new, it fades in there instead of sliding across the screen. */
.spot.snap, .tip.snap, .tell.snap, .frame.snap { transition: none !important; }
/* Going, it goes at once: the screen under it is already changing. */
.spot:not(.on), .tip:not(.on), .tell:not(.on), .frame:not(.on) { transition: opacity .12s; }
@keyframes ants { to { background-position: 14px 0, -14px 100%, 0 -14px, 100% 14px; } }

/* The reel's pointer: large, so a visitor watching from across the page sees every click. */
.cursor { position: absolute; z-index: 2147483647; left: 640px; top: 870px; width: 46px; height: 46px; margin: -4px 0 0 -6px;
          pointer-events: none; opacity: 0; filter: drop-shadow(0 6px 10px rgb(0 0 0 / .35));
          transition: left .58s cubic-bezier(.3,.7,.2,1), top .58s cubic-bezier(.3,.7,.2,1), opacity .3s; }
.cursor.on { opacity: 1; }
.cursor::after { content: ""; position: absolute; left: -12px; top: -12px; width: 34px; height: 34px; border-radius: 50%;
                 border: 4px solid #F7C948; opacity: 0; }
.cursor.press::after { animation: press .55s ease-out; }
.cursor.press svg { animation: tap .3s ease-out; }
@keyframes press { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(1.8); } }
@keyframes tap { 50% { transform: scale(.86); } }

/* The gold halo round what is about to be pressed: the demo's next click, and each of the reel's. */
.spot { position: absolute; z-index: 2147483646; pointer-events: none; border-radius: 10px; opacity: 0;
        box-shadow: 0 0 0 3px #F7C948, 0 0 22px 6px rgb(247 201 72 / .6); transition: all .45s cubic-bezier(.65,0,.35,1); }
.spot.on { opacity: 1; animation: ring 1.6s ease-in-out infinite; }
@keyframes ring { 50% { box-shadow: 0 0 0 5px #F7C948, 0 0 34px 10px rgb(247 201 72 / .65); } }

.top, .bar2 .tabs, .work, .parts, .rail { transition: opacity .6s; }
body.focus .work, body.focus .parts, body.focus .rail, body.focus .top, body.focus .bar2 .tabs { opacity: .32; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
