/* ═══════════════════════════════════════════════════════════════════════════
   AKKIO PRODUCT SURFACES
   Idealised app UI, built in HTML so page mockups never depend on a dated
   screenshot. Loads AFTER akkio-v2.css and inherits its tokens.

   Rules: app chrome is quieter than the marketing page around it — 13px type,
   one blue accent per surface, hairlines at rgba ink, no shadows inside the
   frame. A surface is standalone content — it sits on the section background,
   never inside a .unit.
   ═══════════════════════════════════════════════════════════════════════════ */
.ui{--ui-line:#E7EAEF;--ui-ink:#232833;--ui-ink-2:#5E6675;background:var(--paper);color:var(--ui-ink);font-family:var(--sans);font-size:13px;line-height:1.4;display:flex;flex-direction:column;min-height:100%;font-variant-numeric:tabular-nums;text-align:left}
.ui *{box-sizing:border-box}
/* ── How a surface sits on a page ──────────────────────────────────────────────
   Product UI is standalone content, not card content: it sits directly on the
   section background with no unit, no bed and no header. What separates it from
   the page is its own window edge — a 1px ink ring and a soft lift — because
   that is what an app window has. Wrapping it in a unit gave it two frames and
   a coloured ground at component scale; both are gone.
     .surf          one panel or fragment, full size — the default
     .surf-window   the whole app, scaled, with its chrome
     .surf-bleed    the whole app, running off the right edge of the measure
   A surface is drawn at its design width and never reflows.
   ─────────────────────────────────────────────────────────────────────────── */
.surf{position:relative;min-width:0}
.surf .ui{border-radius:10px;overflow:hidden;box-shadow:0 0 0 1px rgba(16,23,38,.09),0 14px 34px -18px rgba(16,23,38,.28)}
.surf .ui{min-height:0}
/* surf-clip — system page specimens only. Clips and zooms the full-width
   window so it reads as a miniature rather than bleeding the column. */
.surf-clip{overflow:hidden;border-radius:4px}
.surf-clip .surf-window{overflow:hidden;max-height:260px}
.surf-clip .surf-window .ui,.surf-clip .surf-bleed .ui{zoom:.45}
.surf-clip .surf-bleed .ui{border-radius:4px 0 0 4px}
.surf-clip .surf{overflow:hidden}
/* A fragment must never be clipped: rows reflow rather than run past the edge. */
.surf .ui-tbl th,.surf .ui-tbl td{white-space:normal}
.surf .ui-tbl td:first-child{overflow-wrap:anywhere}
.surf .ui-p-h{flex-wrap:wrap}
/* Whole app, scaled down so the chrome reads without dominating the band. */
.surf-window .ui{zoom:.78}
/* Bleed: the surface is wider than the measure and runs off the right, which
   implies more app beyond the frame. Clipped by the band, not by a card.
   min-width:0 on the clipper keeps the inner min-width out of track sizing. */
.surf-bleed{overflow:hidden;border-radius:10px 0 0 10px;min-width:0;max-height:380px}
.surf-bleed .ui{min-width:1480px;border-radius:10px 0 0 10px}
.surf-bleed .ui.ui-sm{min-width:900px}
/* On a dark band the window needs a lighter ring and a deeper lift. */
.field-dark .surf .ui,.nat-scrim-dark .surf .ui,.hero-field .surf .ui{box-shadow:0 0 0 1px rgba(255,255,255,.12),0 18px 44px -20px rgba(0,0,0,.66)}

/* Full-band bleed — section background is the stage, copy left, app runs off right. */
.surf-band{display:grid;grid-template-columns:5fr 7fr;align-items:center}
.surf-band .surf-copy{padding:clamp(56px,7vw,100px) clamp(32px,3.5vw,52px) clamp(56px,7vw,100px) 0}
.surf-band .surf-img{overflow:visible;border-radius:0;min-width:0}
.surf-band .surf-img .ui{min-width:1380px;border-radius:4px 0 0 4px;box-shadow:0 0 0 1px rgba(255,255,255,.1),0 20px 48px -22px rgba(0,0,0,.7)}
@media(max-width:860px){.surf-band{grid-template-columns:1fr}.surf-band .surf-img{display:none}}

.surf .ui-kv{gap:14px}
.surf .ui-foot{flex-wrap:wrap;white-space:normal}
/* .ui-crit keeps its three tracks everywhere — the count stays inline and only
   the token field wraps. A component must lay out the same in every presentation. */

/* Toolbar */
.ui-top{display:flex;align-items:center;gap:14px;padding:0 14px;height:42px;border-bottom:1px solid var(--ui-line);flex:0 0 auto}
.ui-t{font-size:13px;font-weight:var(--w-title);letter-spacing:-.012em}
.ui-crumb{color:var(--ui-ink-2)}
.ui-sp{margin-left:auto;display:flex;align-items:center;gap:8px}
.ui-btn{font-size:12px;font-weight:var(--w-ui);padding:6px 11px;border-radius:7px;border:1px solid var(--ui-line);color:var(--ui-ink);white-space:nowrap}
.ui-btn-p{background:var(--blue);border-color:var(--blue);color:#fff}

/* Shell: rail + .cap-frame */
.ui-shell{display:flex;flex:1 1 auto;min-height:0}
.ui-rail{width:172px;flex:0 0 172px;border-right:1px solid var(--ui-line);padding:10px 8px;display:flex;flex-direction:column;gap:2px}
.ui-rail-h{font-size:10.5px;font-weight:var(--w-title);letter-spacing:.09em;text-transform:uppercase;color:var(--ui-ink-2);padding:8px 8px 6px}
.ui-nav{display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:7px;color:var(--ui-ink-2);font-weight:var(--w-ui);font-size:12.5px}
.ui-nav.on{background:var(--grey-2);color:var(--blue-deep)}
.ui-dot{width:6px;height:6px;border-radius:2px;background:currentColor;opacity:.55;flex:0 0 auto}
.ui-canvas{flex:1 1 auto;min-width:0;background:#FCFCFD;padding:14px;display:flex;flex-direction:column;gap:12px;overflow:hidden}

/* Inner panel */
.ui-p{background:var(--paper);border:1px solid var(--ui-line);border-radius:9px;overflow:hidden}
.ui-p-h{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 12px;border-bottom:1px solid var(--ui-line);font-size:12.5px;font-weight:var(--w-title)}
.ui-p-h span{font-weight:var(--w-body);color:var(--ui-ink-2)}
.ui-p-b{padding:12px}

/* Criteria rows — the audience builder's core gesture */
.ui-crit{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:9px 12px;border-bottom:1px solid var(--ui-line)}
.ui-crit:last-child{border-bottom:0}
.ui-op{font-size:10.5px;font-weight:var(--w-title);letter-spacing:.08em;text-transform:uppercase;color:var(--ui-ink-2);width:34px}
.ui-field{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.ui-tok{font-size:12px;padding:4px 8px;border-radius:6px;background:var(--grey);color:var(--ui-ink);white-space:nowrap}
.ui-tok-b{background:var(--grey-2);color:var(--blue-deep)}
.ui-n{font-size:12.5px;font-weight:var(--w-title);color:var(--ui-ink);white-space:nowrap}

/* Table */
.ui-tbl{width:100%;border-collapse:collapse;font-size:12.5px}
.ui-tbl th{text-align:left;font-size:10.5px;font-weight:var(--w-title);letter-spacing:.09em;text-transform:uppercase;color:var(--ui-ink-2);padding:8px 12px;border-bottom:1px solid var(--ui-line);white-space:nowrap}
.ui-tbl td{padding:9px 12px;border-bottom:1px solid var(--ui-line);color:var(--ui-ink-2);white-space:nowrap}
.ui-tbl tr:last-child td{border-bottom:0}
.ui-tbl td:first-child{color:var(--ui-ink);font-weight:var(--w-ui)}
.ui-tbl .r{text-align:right}

/* Data marks — one blue per surface */
.ui-bar{display:inline-block;vertical-align:middle;width:100%;height:6px;border-radius:2px;background:var(--mist-2);overflow:hidden;min-width:56px}
.ui-bar i{display:block;height:100%;background:var(--blue);border-radius:2px}
.ui-bar-q i{background:var(--ink-4)}
.ui-cols{display:flex;align-items:flex-end;gap:5px;height:64px}
.ui-cols i{flex:1;background:var(--mist-2);border-radius:2px 2px 0 0}
.ui-cols i.on{background:var(--blue)}
.ui-tag{font-size:10.5px;font-weight:var(--w-title);letter-spacing:.06em;text-transform:uppercase;padding:3px 7px;border-radius:5px;background:var(--grey);color:var(--ui-ink-2)}
.ui-tag-b{background:var(--grey-2);color:var(--blue-deep)}
.ui-kv{display:flex;gap:22px;flex-wrap:wrap}
.ui-kv div{display:flex;flex-direction:column;gap:3px}
.ui-kv b{font-size:17px;font-weight:var(--w-title);letter-spacing:-.02em;color:var(--ui-ink)}
.ui-kv span{font-size:11px;color:var(--ui-ink-2)}
.ui-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-top:1px solid var(--ui-line);font-size:12px;color:var(--ui-ink-2);white-space:nowrap}
