/* pb-canvas2.css: D-CBO-331 canvas builder (see the builder brief).
   Page > Area > Section > Component on the 12-column square grid (D-CBO-323), as the composer mock draws it (screens/composer/cp.css);
   the AURA Kit's floating ⋮ panel on every Card (D-CBO-326, D-CBO-327); every template in Areas. Tokens only; even sizes (D-CBO-330). */

/* ---------- Areas: bands of named Areas that fill the 12 columns ---------- */
.pb-areas { display: flex; flex-direction: column; gap: 40px; margin-top: 24px; }
.pb-arow { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 16px; align-items: stretch; container-type: inline-size; }
.pb-area { --bcell: calc((100cqw - 176px) / 12); position: relative; grid-column: span var(--span, 12); min-width: 0; display: flex; flex-direction: column; }
.pb-abody { display: flex; flex-direction: column; gap: 40px; min-height: calc(var(--minr, 0) * (var(--bcell) + 16px) - 16px); }
.pb-abody > .pb-sec, .pb-abody > .pb-sec + .pb-sec, .pb-areas > .pb-sec { margin-top: 0; }
/* a Section's grid has as many columns as its Area is wide, so every Card edge still lands on a page column */
.pb-grid[data-cols] { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); --cell: calc((100cqw - (var(--cols) - 1) * var(--gap)) / var(--cols)); }

/* while designing: the Area's dashed edge, its name, its width and its tools */
.pb-areas.edit .pb-area:not(.auto) { outline: 1px dashed var(--line-strong); outline-offset: 8px; border-radius: 2px; }
.pb-areas.edit .pb-area.auto { outline: 1px dashed transparent; outline-offset: 8px; transition: outline-color 200ms var(--ease-out); }
.pb-areas.edit .pb-area.auto:hover { outline-color: var(--line); }
.pb-ahead { display: flex; align-items: center; gap: 8px; min-width: 0; height: 24px; margin: 0 0 12px; }
.pb-aname { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); font: 600 var(--fs-xs)/20px var(--font); color: var(--ink); outline: 0; cursor: text; }
.pb-aname:focus { box-shadow: 0 0 0 2px var(--accent); text-overflow: clip; }
.pb-aw { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; white-space: nowrap; font: 400 var(--fs-xs)/16px var(--font); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pb-aw .icon.msr { font-size: 16px; width: 16px; height: 16px; }
.pb-ahead .grow { flex: 1; }
.pb-ahead .iconbtn { flex: none; color: var(--ink-3); }
.pb-ahead .iconbtn:hover { background: var(--surface-3); color: var(--ink); }
.pb-anameit { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border: 1px dashed var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink-2); font: 400 var(--fs-xs)/16px var(--font); cursor: pointer; opacity: 0; transition: opacity 200ms var(--ease-out); }
.pb-anameit .icon.msr { font-size: 16px; width: 16px; height: 16px; }
.pb-area.auto:hover .pb-anameit, .pb-anameit:focus-visible { opacity: 1; }
.pb-afoot { margin-top: 16px; }
.pb-addsec2 { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border: 1px dashed var(--line-strong); border-radius: 6px; background: transparent; color: var(--ink-2); font: 400 var(--fs-xs)/16px var(--font); cursor: pointer; }
.pb-addsec2 .icon.msr { font-size: 16px; width: 16px; height: 16px; }
.pb-addsec2:hover { color: var(--ink); border-color: var(--accent); }
/* the edge between two Areas gives or takes cells; the foot adds height, cell by cell */
.pb-aedge { position: absolute; top: 0; bottom: 0; right: -16px; width: 16px; display: grid; place-items: center; cursor: col-resize; touch-action: none; z-index: 4; }
.pb-aedge i { width: 4px; height: 48px; border-radius: 2px; background: var(--line-strong); transition: background 200ms var(--ease-out), height 200ms var(--ease-out); }
.pb-aedge:hover i, .pb-aedge.on i { background: var(--accent); height: 96px; }
.pb-abot { position: absolute; left: 50%; bottom: -16px; width: 64px; height: 16px; margin-left: -32px; display: grid; place-items: center; cursor: row-resize; touch-action: none; z-index: 4; }
.pb-abot i { width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); transition: background 200ms var(--ease-out); }
.pb-abot:hover i { background: var(--accent); }
/* a Section's handle sits with its other tools, so it never falls in the gap between Areas */
.pb-areas .pb-sechead .pb-drag { position: static; order: 10; flex: none; cursor: grab; touch-action: none; }
.pb-sec.quiet > .pb-sechead .pb-sectitle:empty::before { opacity: 0; transition: opacity 200ms var(--ease-out); }
.pb-sec.quiet:hover > .pb-sechead .pb-sectitle:empty::before, .pb-sec.quiet:focus-within > .pb-sechead .pb-sectitle:empty::before { opacity: 1; }
.pb-prev .pb-sec.quiet > .pb-sechead { display: none; }

/* the Insights rail (Decision Lab): an Area that stays in view while its band scrolls; its Card holds the Section title, a line and links */
.pb-area.pb-arail > .pb-abody { position: sticky; top: 24px; }
.pb-card.pb-railcard { background: transparent; box-shadow: none; border-radius: 0; border-top: 2px solid var(--ink); overflow: visible; }
.pb-card.pb-railcard .pb-cb { padding: 16px 0 0; overflow: visible; }
.pb-card.pb-railcard .pb-cmenu-float { top: 12px; right: 0; }
.pb-card.pb-railcard .pb-grip { top: 12px; left: -4px; }
.pb-railt { margin: 0; padding-right: 32px; font: 400 24px/32px var(--font-serif); letter-spacing: -.01em; color: var(--ink); }
.pb-raill { margin: 8px 0 0; font: 400 var(--fs-sm)/20px var(--font); color: var(--ink-2); }
.pb-raillinks { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pb-raillinks a { display: inline-flex; align-items: center; gap: 8px; font: 500 var(--fs-sm)/20px var(--font); color: var(--ink); text-decoration: none; }
.pb-raillinks a .icon.msr { font-size: 16px; width: 16px; height: 16px; color: var(--ink-3); }
.pb-raillinks a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- drags: the badge, the lifted Section, the drop line ---------- */
.pb-abadge { position: fixed; left: 0; top: 0; z-index: 99; display: none; padding: 0 8px; border-radius: 6px; background: var(--ink); color: var(--ground); font: 600 var(--fs-sm)/28px var(--font); font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap; }
.pb-abadge.on { display: block; }
body.pb-adrag, body.pb-adrag * { cursor: grabbing; user-select: none; }
body.pb-adrag .pb-cellsq { opacity: 1; }
.pb-sec.pb-lift { opacity: .4; }
.pb-sghost { position: fixed; left: 0; top: 0; z-index: 99; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-drop); pointer-events: none; font: 400 var(--fs-sm)/20px var(--font); color: var(--ink); white-space: nowrap; }
.pb-sghost .icon.msr { font-size: 16px; width: 16px; height: 16px; color: var(--accent); }
.pb-sghost small { color: var(--ink-3); font-size: var(--fs-xs); }
.pb-sghost.no { border-color: var(--warning); }
.pb-sghost.no .icon.msr { color: var(--warning); }
.pb-sline { position: fixed; z-index: 98; display: none; height: 4px; border-radius: 2px; background: var(--accent); pointer-events: none; }
.pb-sline.on { display: block; }
.pb-sline.no { background: var(--warning); }
.pb-sline::after { content: attr(data-t); position: absolute; left: 0; top: 8px; padding: 2px 8px; border-radius: 6px; background: var(--ink); color: var(--ground); font: 500 var(--fs-xs)/16px var(--font); white-space: nowrap; }

/* ---------- menus: the Area menu and the Section menu share the Card menu's look ---------- */
.pb-cardmenu.pb-wide { width: 320px; }
.pb-cardmenu .pb-mrow small { display: block; font: 400 var(--fs-xs)/16px var(--font); color: var(--ink-3); }
.pb-aord { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 8px 8px; }
.pb-aord button { height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: 400 var(--fs-xs)/16px var(--font); cursor: pointer; }
.pb-aord button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.pb-cardmenu .pb-mnote { margin: 4px 8px 8px; font: 400 var(--fs-xs)/16px var(--font); color: var(--ink-3); }

/* ---------- the floating ⋮ panel on the canvas: above the bar and the canvas's own menus ---------- */
body .ckp.cxp-float { z-index: 97; }
body .ckp-overlay { z-index: 98; }
body .ckv { z-index: 97; }
body .cxp-toast { z-index: 99; }
.pb-cxfull { padding: 24px; }
.pb-cxfull > .pb-card { min-height: 360px; }
[data-cx-open]:not(#cxp-x).pb-card { outline-offset: 2px; }

/* ---------- a phone: the Areas stack in their set order ---------- */
@container page (max-width: 640px) {
  .pb-areas { gap: 32px; margin-top: 16px; }
  .pb-arow { display: contents; }
  .pb-area { order: var(--ord, 0); }
  .pb-areas > .pb-card.part { order: var(--ord, 0); }
  .pb-areas > .pb-sec { order: 998; }
  .pb-abody { gap: 32px; min-height: 0; }
  .pb-area.pb-arail > .pb-abody { position: static; }
  .pb-aedge, .pb-abot { display: none; }
  .pb-areas.edit .pb-area:not(.auto), .pb-areas.edit .pb-area.auto { outline-offset: 4px; }
  .pb-aname { max-width: 50%; }
}

/* ---------- Studio › Templates: each template's Area layout ---------- */
.pb-tplgroup + .pb-tplgroup { margin-top: 48px; }
.pb-tplghead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 16px; }
.pb-tplghead h2 { margin: 0; font: 600 var(--fs-md)/24px var(--font); color: var(--ink); }
.pb-tplghead p { margin: 0; font: 400 var(--fs-sm)/20px var(--font); color: var(--ink-3); }
.pb-tpl { cursor: default; }
.pb-tpl:hover .pb-tcname { text-decoration: none; }
.pb-tpl .pb-usetpl { align-self: flex-start; margin-top: -4px; }
.pb-tpl .pb-usetpl .icon.msr { font-size: 16px; width: 16px; height: 16px; }
.pb-tframe { display: block; padding: 16px; color: inherit; text-decoration: none; -webkit-mask-image: linear-gradient(black 84%, transparent); mask-image: linear-gradient(black 84%, transparent); }
.pb-tframe:focus-visible { outline: 2px solid var(--focus-color); outline-offset: 2px; }
.pb-tthumb { display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
.pb-tt-head { display: flex; flex-direction: column; gap: 4px; }
.pb-tt-head i { display: block; width: 52%; height: 8px; border-radius: 2px; background: var(--ink-3); opacity: .6; }
.pb-tt-head b { display: block; width: 32%; height: 4px; border-radius: 2px; background: var(--line-strong); }
.pb-tt-head.rec { padding-left: 28px; position: relative; min-height: 20px; }
.pb-tt-head.rec::before { content: ""; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 4px; background: var(--surface-3); }
.pb-tt-areas { display: flex; flex-direction: column; gap: 8px; }
.pb-tt-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.pb-tt-area { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 4px; border: 1px dashed var(--line-strong); border-radius: 4px; }
.pb-tt-area.pb-ttrail { background: var(--surface-2); }
.pb-tt-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12px/16px var(--font); color: var(--ink-2); }
/* a narrow Area (a rail, a quarter): its name wraps at its words, so "What we think" is never cut to "What …"; on a phone the thumbnail is too small for it, and the tinted rail says enough */
.pb-tt-name.nar { white-space: normal; text-overflow: clip; overflow-wrap: normal; }
.pb-tt-grid { display: grid; gap: 2px; grid-auto-rows: 4px; }
.pb-tt-card { display: block; min-width: 0; border-radius: 2px; background: var(--surface); box-shadow: 0 0 0 1px var(--hairline); background-repeat: no-repeat; }
.pb-tt-card.g-bars { background-image: linear-gradient(var(--chart-1), var(--chart-1)), linear-gradient(var(--line-strong), var(--line-strong)), linear-gradient(var(--line-strong), var(--line-strong)); background-size: 56% 2px, 40% 2px, 28% 2px; background-position: 4px 30%, 4px 55%, 4px 80%; }
.pb-tt-card.g-line { background-image: linear-gradient(160deg, transparent 46%, var(--chart-1) 46%, var(--chart-1) 54%, transparent 54%); background-size: 80% 60%; background-position: 50% 60%; }
.pb-tt-card.g-num { background-image: linear-gradient(var(--ink-3), var(--ink-3)); background-size: 32% 6px; background-position: 4px 70%; }
.pb-tt-card.g-pic { background: var(--surface-3); box-shadow: none; }
.pb-tt-card.g-quote { background-color: var(--surface-2); background-image: linear-gradient(var(--ink-3), var(--ink-3)), linear-gradient(var(--line-strong), var(--line-strong)); background-size: 64% 2px, 40% 2px; background-position: 4px 40%, 4px 65%; }
.pb-tt-card.g-text { background-image: linear-gradient(var(--line-strong), var(--line-strong)), linear-gradient(var(--line-strong), var(--line-strong)); background-size: 70% 2px, 48% 2px; background-position: 4px 40%, 4px 65%; }
.pb-tt-card.g-donut { background-image: radial-gradient(circle, transparent 30%, var(--chart-1) 32%, var(--chart-1) 48%, transparent 50%); background-size: 50% 100%; background-position: 50% 50%; }
.pb-tt-card.g-empty { background: transparent; box-shadow: none; border: 1px dashed var(--line); }
.pb-start .pb-tframe { padding: 12px; }
@media (max-width: 767px) { .pb-tframe { padding: 12px; } .pb-tthumb { gap: 8px; } .pb-tt-name.nar { display: none; } }
