/* =================================================================
   Launch Control - the center (/launch-control) and one conversation's
   workbench (/launch-control/{id}), in the new frame
   (portal-look-and-feel.md 3.18 - Launch Control first, one PR per center).
   -----------------------------------------------------------------
   Every class here is lc- prefixed and owned by this file alone
   (Tests/ConversationBuilderCssOwnershipTests). The shared pieces come
   from components.css (the KPI tile, chips, status, the code chip, the
   segmented control, empty states, skeletons, the charts) and wf.css
   (cards, tables, buttons, forms); this file only lays them out.

   TOKENS ONLY, the whole file (Tests/ShellTokensOnlyTests): no hex, no
   rgb() / hsl(), no colour keyword - every colour reads a --wf-*,
   --theme-* or --conv-* token. The QR code itself wears .wf-qr (black on
   white in every theme - the one documented exception, components.css).

   No sticky rule: a ?code= landing scrolls its row just under the shell
   bar (JSBrowserService.scrollWithin counts the sheet's sticky children),
   and a sticky table head would cover the row it landed on.
   ================================================================= */

/* ---- The page: cards on the 8px rhythm (16-20 between cards) ---- */
/* The page may shrink below its content's width (a long snippet or link scrolls inside its own box, never the sheet). */
.lc-page { min-width: 0; }
.lc-stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.lc-pair { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(18rem, 1fr); gap: 20px; align-items: start; }
.lc-pair.is-single { grid-template-columns: minmax(0, 1fr); }
.lc-pair.is-even { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }

/* ---- A card's head: the title 15/650, one muted sentence, tools on the right ---- */
/* A card that holds a dropdown (the QR downloads, a row's menu, Make a launch code) must not clip it: wf.css's .card
   is overflow: hidden, so every Launch Control card overflows visibly (the third look verifier, 2026-10-02 - the
   downloads opened inside their own card and could not be reached). */
.lc-card { min-width: 0; overflow: visible; }
.lc-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 14px; padding: 18px 20px 0; }
.lc-card-words { flex: 1 1 16rem; min-width: 0; }
.lc-card-title { margin: 0; color: var(--theme-text-emphasis); font-size: var(--wf-text-h3); font-weight: 650; letter-spacing: -0.005em; }
.lc-card-sub { max-width: 68ch; margin: 3px 0 0; color: var(--theme-text-secondary); font-size: 13px; line-height: 1.45; }
.lc-card-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.lc-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: auto; padding: 14px 20px 18px; }
.lc-card > .wf-empty { padding-bottom: 28px; }
.lc-muted { display: inline-flex; align-items: center; gap: 6px; color: var(--theme-text-muted); font-size: 12.5px; }
.lc-muted .bi { color: var(--wf-primary-ink); }
.lc-spacer { flex: 1 1 auto; }

/* ---- Notes, inline alerts, the calm failure ---- */
.lc-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--theme-text-muted); font-size: 12.5px; line-height: 1.45; }
.lc-note .bi { margin-top: 2px; color: var(--wf-primary-ink); }
.lc-note.is-boxed { padding: 14px 16px; border-radius: var(--wf-radius-md); background: var(--wf-inset); color: var(--theme-text-secondary); font-size: 13px; }
.lc-inline-alert { display: flex; align-items: flex-start; gap: 8px; margin: 12px 20px 0; padding: 10px 14px; font-size: 13px; }
.wf-form-section-body > .lc-inline-alert { margin: 0; }
.lc-failed { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 16px 18px; }
.lc-failed-text { flex: 1 1 18rem; min-width: 0; margin: 0; color: var(--theme-text-secondary); font-size: 13.5px; }
.lc-failed-detail { margin: 2px 0 0; color: var(--theme-text-muted); font-size: 12px; overflow-wrap: anywhere; }
.lc-first { padding: 12px 0; overflow: visible; }

/* ---- Skeletons in the shape of what is coming ---- */
.lc-skel-kpi { height: 66px; }
.lc-skel-chart { height: 260px; margin: 18px 20px; }
.lc-skel-link { height: 220px; margin: 18px 20px; }
.lc-skel-rows { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px 20px; }
.lc-skel-row { height: 44px; }
/* A piece whose read failed (the scan series): a calm line and Try again inside its own card - never a zero. */
.lc-unavailable { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 16px 20px 22px; }

/* ---- The numbers (the shared KPI tile, components.css) ---- */
.lc-kpis { margin: 0; }
.lc-kpis + .lc-note { margin-top: -10px; }

/* ---- Scans, the last 30 days ---- */
.lc-figures { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 14px 20px 0; }
.lc-big { color: var(--theme-text-emphasis); font-size: var(--wf-figure); font-weight: 650; letter-spacing: -0.025em; line-height: 1; font-variant-numeric: tabular-nums; }
.lc-big-label { color: var(--theme-text-secondary); font-size: 13px; }
.lc-scans-chart { padding: 12px 20px 18px; }
.lc-scans-chart .wf-cols { gap: 3px; }
.lc-scans-chart .wf-chart-table { margin-top: 4px; }

/* ---- The busiest conversations (shared HBars) ---- */
.lc-busiest-bars { padding: 10px 20px 16px; }
.lc-busiest-bars .wf-hbar-label a { color: var(--theme-text-emphasis); font-weight: 600; text-decoration: none; }
.lc-busiest-bars .wf-hbar-label a:hover { color: var(--wf-primary-ink); text-decoration: underline; }
/* In a narrow card each conversation is two lines: its name and its number, then its bar the card's full width. */
.lc-busiest-bars .wf-hbar-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label value" "track track"; row-gap: 6px; padding: 9px 0; }
.lc-busiest-bars .wf-hbar-label { grid-area: label; }
.lc-busiest-bars .wf-hbar-value { grid-area: value; }
.lc-busiest-bars .wf-hbar-track { grid-area: track; }

/* ---- Make a launch code: THE ONE CHOICE of what a code opens (LaunchTargetDialog - launch-code-targets) ---- */
/* THE ONE SCRIM, as every Portal dialog wears it. The dialog stays inside the phone's 16px gutter. */
.lc-target-scrim { background: var(--wf-scrim); backdrop-filter: blur(3px); }
.lc-target-dialog { max-width: min(40rem, calc(100vw - 32px)); }
.lc-target-title { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--theme-text-emphasis); font-size: var(--wf-text-h3); font-weight: 650; }
.lc-target-title .bi { color: var(--wf-primary-ink); }
.lc-target-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lc-target-choice { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.lc-target-legend { margin-bottom: 4px; font-size: 13px; font-weight: 600; }
.lc-target-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--wf-line);
    border-radius: var(--wf-radius-md);
    cursor: pointer;
    transition: border-color 120ms var(--wf-ease), background-color 120ms var(--wf-ease);
}
.lc-target-option:hover { border-color: var(--wf-primary-ink); }
.lc-target-option.is-picked { border-color: var(--wf-primary-ink); background: var(--wf-primary-soft); }
.lc-target-option .form-check-input { flex: 0 0 auto; margin-top: 3px; }
.lc-target-icon { flex: 0 0 auto; margin-top: 1px; color: var(--wf-primary-ink); font-size: 16px; }
.lc-target-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lc-target-word { color: var(--theme-text-emphasis); font-size: 14px; font-weight: 600; }
.lc-target-hint { color: var(--theme-text-secondary); font-size: 12.5px; line-height: 1.45; }
.lc-target-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lc-target-field > .form-label { margin-bottom: 0; font-size: 13px; font-weight: 600; }
.lc-target-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lc-target-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--theme-text-muted); font-size: 12.5px; line-height: 1.45; }
.lc-target-note .bi { margin-top: 2px; color: var(--wf-primary-ink); }
.lc-target-fixed { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--theme-text-emphasis); font-weight: 600; overflow-wrap: anywhere; }
.lc-target-fixed .bi { color: var(--wf-primary-ink); }
.lc-target-made-what { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--theme-text-emphasis); font-weight: 600; overflow-wrap: anywhere; }
.lc-target-made-what .bi { color: var(--wf-primary-ink); }
.lc-target-made { margin: 0; }
.lc-target-body .lc-inline-alert { margin: 0; }
/* A code row's "opens" - its kind as a labelled chip in the experience family's hue (the canvas's Action hue, --theme-accent),
   then what it opens: a conversation, an experience, a collection or one job (L1, experiences on the thread 3.1). The name
   ellipsises beside the chip; the chip never shrinks. */
.lc-opens-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lc-opens-target { flex: 1 1 auto; min-width: 0; }
.lc-kind-chip {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 8px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 35%, transparent);
    border-radius: var(--wf-radius-pill);
    background: color-mix(in srgb, var(--theme-accent) 12%, var(--theme-background-raised));
    color: var(--theme-text-emphasis);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}
.lc-kind-chip > .bi { color: var(--theme-accent); font-size: 12px; }
/* A conversation code's chip stays quiet - the kinds that open a visit carry the hue. */
.lc-kind-chip[data-kind="1"] { border-color: var(--wf-line-strong); background: var(--wf-card); }
.lc-kind-chip[data-kind="1"] > .bi { color: var(--theme-text-secondary); }
/* The center's kind filter chips: the same hue on their glyph. */
.lc-kind-chips { flex: 0 1 auto; }
.lc-kind-toggle > .bi { color: var(--theme-accent); }

/* =================================================================
   THE CODES TABLE (portal-look-and-feel 3.10) - a card that lets its
   row menus float past its bottom edge; rows ~56px with a title and a
   muted sub-line; numbers right-aligned and tabular; the actions show
   on hover / focus (always on touch); a ?code= row is highlighted.

   NOTHING SCROLLS SIDEWAYS, AT ANY WIDTH: the table is table-layout:
   fixed at 100% of its card - the number and action columns are
   declared (.lc-col-*), the campaign and what it opens share the rest,
   and a long name ellipsises (its title holds the whole name) instead
   of widening the table. Under 860px of page (the stacking rule below)
   there is no room for both text columns, so each row becomes a
   stacked card. The card itself never clips: the layout makes the
   table fit (design/portal/launch-control/sweep.html measures it at
   every 20px from 320 to 1600, rail open and folded;
   Tests/LaunchControlPortalTests pins the arithmetic).
   ================================================================= */
.lc-codes { overflow: visible; }
.lc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 20px 4px; }
.lc-search {
    display: flex;
    flex: 0 1 18rem;
    align-items: center;
    gap: 8px;
    min-width: 12rem;
    height: 36px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: var(--wf-radius-sm);
    background: var(--wf-inset);
    color: var(--theme-text-muted);
    transition: background var(--wf-motion), border-color var(--wf-motion);
}
.lc-search:focus-within { border-color: var(--wf-primary-ink); background: var(--wf-card); box-shadow: var(--theme-focus-ring); }
.lc-search-input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--theme-text-emphasis); font: inherit; font-size: 13.5px; }
.lc-search-input::placeholder { color: var(--theme-text-muted); }
.lc-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.lc-table { width: 100%; margin: 10px 0 0; table-layout: fixed; }
/* The declared columns (the header row sets them - fixed layout): a number each, the row actions (three icon buttons;
   four with Open the code on the center). The campaign and what it opens share what is left. */
.lc-col-campaign, .lc-col-opens { width: auto; }
.lc-col-num { width: 7.5rem; }
.lc-col-actions { width: 8.25rem; }
.lc-table.has-open .lc-col-actions { width: 10.25rem; }
.lc-table > thead > tr > th:first-child,
.lc-table > tbody > tr > td:first-child { padding-left: 20px; }
.lc-table > thead > tr > th:last-child,
.lc-table > tbody > tr > td:last-child { padding-right: 14px; }
.lc-table > tbody > tr > td { padding-top: 10px; padding-bottom: 10px; vertical-align: top; }
/* A ?code= landing leaves a little air between the shell bar and the row (scrollWithin reads scroll-margin-top). */
.lc-row { scroll-margin-top: 12px; transition: background var(--wf-motion); }
.lc-row:hover { background: var(--wf-card-hover); }
.lc-row.is-featured { background: var(--wf-primary-soft); box-shadow: inset 3px 0 0 var(--wf-primary-ink); animation: lc-land 1.6s var(--wf-ease) 1 both; }
/* The landing's settle starts 10% deeper than the highlight - deep enough to catch the eye, light enough that the
   row's muted sub-lines keep AA (4.66:1 on the house green; 18% dipped them to 4.17:1 for the first frames). */
@keyframes lc-land {
    0% { background: color-mix(in srgb, var(--wf-primary-soft), var(--theme-primary) 10%); }
    100% { background: var(--wf-primary-soft); }
}

.lc-name { display: block; min-width: 0; overflow: hidden; color: var(--theme-text-emphasis); font-size: 13.5px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.lc-name.is-unnamed { color: var(--theme-text-muted); font-weight: 500; font-style: italic; }
a.lc-link { text-decoration: none; }
a.lc-link:hover { color: var(--wf-primary-ink); text-decoration: underline; }
.lc-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; color: var(--theme-text-muted); font-size: 12px; }
.lc-sub.is-first { margin-top: 0; }
.lc-channel { display: inline-flex; align-items: center; gap: 5px; color: var(--theme-text-secondary); }
.lc-sub.is-first .lc-channel { font-size: 13px; }
/* An identity override is a chip that may wrap in a narrow column (it never widens the table). */
.lc-identity { gap: 4px; max-width: 100%; white-space: normal; }
.lc-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 5px;
    border: 0;
    border-radius: var(--wf-radius-xs);
    background: transparent;
    color: var(--theme-text-muted);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.lc-copy:hover { background: var(--wf-primary-soft); color: var(--wf-primary-ink); }
.lc-copy:focus-visible { outline: 2px solid var(--wf-primary-ink); outline-offset: 1px; }
.lc-copied { color: var(--wf-success-ink); font-weight: 600; }

/* The figure never breaks; its sub-line ("73% of scans", "2 min ago") may wrap inside the declared column. */
.lc-cell-num { text-align: right; }
.lc-cell-num .lc-sub { justify-content: flex-end; }
.lc-num { color: var(--theme-text-emphasis); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Runs that did not load: a muted dash (its title and a hidden line say so; the table's foot offers Try again). */
.lc-num.is-unavailable { color: var(--theme-text-muted); font-weight: 500; cursor: help; }
.lc-cell-num.is-uncounted { text-align: center; }
.lc-uncounted { display: inline-flex; align-items: center; gap: 5px; color: var(--theme-text-muted); font-size: 12.5px; cursor: help; }
.lc-uncounted .bi { color: var(--wf-primary-ink); }

.lc-cell-actions { white-space: nowrap; }
.lc-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; opacity: 0; transition: opacity var(--wf-motion); }
.lc-row:hover .lc-actions,
.lc-row:focus-within .lc-actions,
.lc-row.is-featured .lc-actions,
.lc-actions.is-open { opacity: 1; }
@media (hover: none) {
    .lc-actions { opacity: 1; }
}
.lc-iconbtn { width: 32px; height: 32px; padding: 0; justify-content: center; }
.lc-iconbtn > .bi { font-size: 15px; }
.lc-table-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 12px 20px 16px; border-top: 1px solid var(--wf-line); color: var(--theme-text-muted); font-size: 12.5px; }
.lc-foot-note { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--theme-text-secondary); }
.lc-foot-note > .bi { color: var(--wf-primary-ink); }

/* =================================================================
   THE WORKBENCH - the short link and its QR code, make a code, the
   embed + the AI Concierge, and the two settings.
   ================================================================= */
.lc-link-grid { display: grid; grid-template-columns: 12.5rem minmax(0, 1fr); gap: 20px 28px; align-items: center; padding: 16px 20px 20px; }
.lc-link-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lc-link-main > .form-label { margin: 0; }
.lc-link-field { display: flex; gap: 8px; min-width: 0; }
.lc-link-input { flex: 1; min-width: 0; color: var(--theme-text-emphasis); font-weight: 600; text-overflow: ellipsis; }
/* The short link and the two snippets are read-only fields that are MEANT to be read (and copied): full ink at full
   opacity, on the inset fill that says read-only. These outrank wf.css's .form-control[readonly] (0,2,0 - muted at
   70%, about 2.9:1) by specificity, whatever the stylesheet order. */
.lc-link-field > .lc-link-input[readonly] { color: var(--theme-text-emphasis); opacity: 1; }
.lc-card > .lc-snippet[readonly] { color: var(--theme-text); opacity: 1; }
.lc-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 2px 0 0; padding: 0; color: var(--theme-text-secondary); font-size: 12.5px; list-style: none; }
.lc-facts > li { display: inline-flex; align-items: center; gap: 6px; }
.lc-facts .bi { color: var(--wf-primary-ink); }
.lc-link-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--wf-line); }

/* The ONE brand wash on the page holds the QR - which stays black on white (.wf-qr). */
.lc-qr-well {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    padding: 18px;
    border-radius: var(--wf-radius-lg);
    background: var(--wf-brand-wash), var(--wf-inset);
}
.lc-qr { width: 100%; box-shadow: var(--wf-elev-1); }
.lc-qr svg { display: block; width: 100%; height: auto; }
.lc-qr-missing { color: var(--theme-text-muted); font-size: 2.5rem; }
.lc-download-list { min-width: 15rem; }
.lc-menu-text { display: flex; flex-direction: column; padding: 6px 0; line-height: 1.3; }
.lc-menu-text > b { font-weight: 500; }
.lc-menu-text > small { color: var(--theme-text-muted); font-size: 11.5px; }

/* TEXT TO START (launch-links): the same code typed into a message - the Switchboard (RCS), WhatsApp, Apple Messages.
   Three tiles side by side while there is room, one under another on a phone; each holds its QR in the brand-wash well
   (black on white in every theme), the link with Copy, and the QR downloads. A channel the workspace cannot use keeps its
   place and says why (is-off), so the three always read in the same order. */
.lc-text-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 16px 20px 20px; }
.lc-text-tile { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px; border: 1px solid var(--wf-line); border-radius: var(--wf-radius-md); background: var(--wf-card); }
.lc-text-tile.is-off { align-self: start; background: var(--wf-inset); }
.lc-text-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.lc-text-ic { color: var(--wf-primary-ink); font-size: 16px; }
.lc-text-name { color: var(--theme-text-emphasis); font-size: 13.5px; font-weight: 650; }
.lc-text-tag { margin-left: auto; font-size: 11.5px; }
/* The sub-line takes the slack, so the three QR codes, links and actions line up across the tiles. */
.lc-text-sub { flex: 1 0 auto; margin: 0; color: var(--theme-text-secondary); font-size: 12.5px; line-height: 1.45; }
.lc-text-well { width: min(100%, 11rem); align-self: center; padding: 12px; }
.lc-text-input { width: 100%; font-weight: 500; font-size: 12.5px; }
/* Read-only and MEANT to be read (and copied) - full ink, outranking wf.css's .form-control[readonly] (0,2,0). */
.lc-text-tile .lc-text-input[readonly] { color: var(--theme-text-emphasis); opacity: 1; }
.lc-text-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid var(--wf-line); }
.lc-text-missing { margin-top: 2px; }

/* Make a launch code, above the rows */
.lc-mint { margin: 14px 20px 0; padding: 16px; border: 1px solid var(--wf-line); border-radius: var(--wf-radius-md); background: var(--theme-background-subtle); }
.lc-mint-head { margin-bottom: 12px; }
.lc-mint-title { margin: 0; color: var(--theme-text-emphasis); font-size: 13.5px; font-weight: 650; }
.lc-mint-hint { margin: 2px 0 0; color: var(--theme-text-muted); font-size: 12.5px; }
.lc-mint-fields { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 14px; }
.lc-field { display: flex; flex-direction: column; gap: 6px; min-width: 10rem; }
.lc-field > .form-label { margin: 0; }
.lc-field.is-grow { flex: 1 1 16rem; }
.lc-field.is-action { justify-content: flex-end; align-self: stretch; padding-top: 25px; }
.lc-mint .lc-inline-alert { margin: 12px 0 0; }
.lc-mint-note { margin: 14px 20px 0; }

/* The embed snippet + the concierge */
.lc-snippet {
    width: auto;
    margin: 14px 20px 0;
    font-family: var(--theme-font-mono, ui-monospace, "Cascadia Code", monospace);
    font-size: 12px;
    line-height: 1.5;
    white-space: pre;
    background: var(--wf-inset);
    resize: none;
}
.lc-card-head > .wf-tile-ic { flex: none; }

/* PUT IT ON YOUR WEBSITE (the deluxe embed, 2026-10-08): the face switch in the head's tools, one sentence on the face, the
   tag (.lc-snippet - text, never rendered), its actions, three facts (the options, the look, identity), and the phone's
   TEST DRIVE - a stage the embed library mounts one phone in, shown only while it runs (a 640px phone, never wider than
   the card). */
.lc-site .lc-card-tools { align-self: center; }
.lc-site-note { margin: 14px 20px 0; }
.lc-site-face { display: flex; align-items: flex-start; gap: 8px; margin: 14px 20px 0; color: var(--theme-text-secondary); font-size: 13px; line-height: 1.45; }
.lc-site-face > .bi { margin-top: 2px; color: var(--wf-primary-ink); }
.lc-site-label { margin: 12px 20px 0; }
.lc-site-label + .lc-snippet { margin-top: 6px; }
.lc-site-facts { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0 20px 18px; list-style: none; }
.lc-site-facts > li { display: flex; align-items: flex-start; gap: 8px; max-width: 80ch; color: var(--theme-text-secondary); font-size: 12.5px; line-height: 1.45; }
.lc-site-facts .bi { margin-top: 2px; color: var(--wf-primary-ink); }
.lc-site-drive { display: flex; flex-direction: column; gap: 10px; margin: 0 20px 20px; padding: 14px; border: 1px solid var(--wf-line); border-radius: var(--wf-radius-md); background: var(--wf-inset); }
.lc-site-drive-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.lc-site-chip { gap: 5px; }
.lc-site-drive-note { flex: 1 1 18rem; min-width: 0; margin: 0; color: var(--theme-text-secondary); font-size: 12.5px; line-height: 1.45; }
.lc-site-drive-fail { margin: 0; }
/* A test drive in a chosen look (P3 owed): the look picker under the drive's head. */
.lc-site-drive-look { max-width: 24rem; }
.lc-site-drive-look .form-text { margin: 4px 0 0; }
.lc-site-stage { display: none; width: min(100%, 24rem); height: min(40rem, 80vh); align-self: center; border-radius: var(--wf-radius-lg); overflow: hidden; background: var(--wf-card); box-shadow: var(--wf-elev-1); }
.lc-site-stage.is-on { display: block; }

/* The two settings, in the settings layout (components.css .wf-form-section) */
.lc-settings-body { padding: 18px 20px 22px; }
.lc-seg { flex-wrap: wrap; align-self: flex-start; max-width: 100%; }
.lc-save-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lc-saved { display: inline-flex; align-items: center; gap: 6px; color: var(--wf-success-ink); font-size: 12.5px; font-weight: 600; }
.lc-hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lc-hero-pill { gap: 5px; }

/* =================================================================
   NARROWER PAGES (the page area is the size container - .wf-page-area)
   ================================================================= */
@container page (max-width: 1000px) {
    .lc-pair { grid-template-columns: minmax(0, 1fr); }
    .lc-text-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container page (max-width: 760px) {
    .lc-pair.is-even { grid-template-columns: minmax(0, 1fr); }
    .lc-link-grid { grid-template-columns: minmax(0, 1fr); }
    .lc-text-grid { grid-template-columns: minmax(0, 1fr); }
    .lc-qr-well { width: min(100%, 15rem); justify-self: center; }
    .lc-field { min-width: 0; flex: 1 1 100%; }
    .lc-field.is-action { padding-top: 0; }
    .lc-field.is-action > .btn { width: 100%; justify-content: center; }
}

/* On a phone the make-a-code choice's channel and campaign name stack (a viewport rule - the dialog is the viewport's). */
@media (max-width: 767.98px) {
    .lc-target-grid { grid-template-columns: minmax(0, 1fr); }
}

/* A row's menu never outgrows the screen (a long campaign name widened it past a 320px phone). */
.lc-actions [role="menu"] { max-width: min(20rem, calc(100vw - 48px)); }

/* THE STACKED TABLE (860px of page and narrower - below that the two text columns cannot both read): each code row
   becomes a stacked card. The campaign is its title, what it opens its sub-line, the three numbers a row of labelled
   figures, the actions always on show - in a column on the right while there is room, on their own row on a phone.
   The header row is hidden (visually); each figure carries its label. Nothing scrolls sideways. */
@container page (max-width: 860px) {
    .lc-table, .lc-table > tbody { display: block; width: 100%; }
    .lc-table > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .lc-table > tbody > tr {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
        grid-template-areas:
            "camp camp camp act"
            "opens opens opens act"
            "scans started finished act";
        gap: 10px 16px;
        padding: 14px 20px;
    }
    .lc-table > tbody > tr > td,
    .lc-table > tbody > tr > td:first-child,
    .lc-table > tbody > tr > td:last-child { display: flex; flex-direction: column; min-width: 0; padding: 0; border: 0; }
    .lc-cell-campaign { grid-area: camp; }
    .lc-cell-opens { grid-area: opens; }
    .lc-cell-num:nth-child(3) { grid-area: scans; }
    .lc-cell-num:nth-child(4) { grid-area: started; }
    .lc-cell-num:nth-child(5) { grid-area: finished; }
    .lc-cell-num.is-uncounted { grid-column: 2 / span 2; grid-row: 3; align-items: flex-start; justify-content: flex-end; text-align: left; }
    .lc-cell-actions { grid-area: act; align-self: start; }
    .lc-cell-num { align-items: flex-start; text-align: left; }
    .lc-cell-num .lc-sub { justify-content: flex-start; }
    .lc-cell-num[data-label]::before,
    .lc-cell-opens[data-label]::before {
        content: attr(data-label);
        margin-bottom: 2px;
        color: var(--theme-text-muted);
        font-size: 11.5px;
        font-weight: 600;
    }
    .lc-cell-opens[data-label]::before { display: none; }
    .lc-name { white-space: normal; }
    .lc-actions { opacity: 1; }
}

/* THE PHONE: the stacked card's actions take their own row, as bordered 40px buttons. */
@container page (max-width: 640px) {
    .lc-card-head { padding: 16px 16px 0; }
    .lc-toolbar { padding: 12px 16px 2px; }
    .lc-search { flex: 1 1 100%; }
    .lc-chips { flex-wrap: nowrap; margin: 0 -16px; padding: 0 16px 4px; overflow-x: auto; scrollbar-width: none; }
    .lc-chips > .wf-chip-toggle { flex: none; }

    .lc-table > tbody > tr {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-areas:
            "camp camp camp"
            "opens opens opens"
            "scans started finished"
            "act act act";
        gap: 10px 12px;
        padding: 14px 16px;
    }
    /* The row's actions sit at the RIGHT on a phone, so its end-aligned menu opens inward, never past the left edge. */
    .lc-actions { justify-content: flex-end; gap: 6px; }
    .lc-iconbtn { width: 40px; height: 40px; border: 1px solid var(--wf-line-strong); background: var(--wf-card); }
    .lc-table-foot { padding: 12px 16px 14px; }
    .lc-unavailable { padding: 14px 16px 18px; }
    .lc-link-grid, .lc-settings-body, .lc-text-grid { padding-left: 16px; padding-right: 16px; }
    .lc-mint, .lc-snippet, .lc-inline-alert, .lc-mint-note { margin-left: 16px; margin-right: 16px; }
    .lc-site-note, .lc-site-face, .lc-site-label, .lc-site-drive { margin-left: 16px; margin-right: 16px; }
    .lc-site-facts { padding-left: 16px; padding-right: 16px; }
    .lc-site .lc-card-tools { width: 100%; margin-left: 0; }
    .lc-card-foot { padding: 12px 16px 16px; }
    .lc-figures { padding: 12px 16px 0; }
    .lc-scans-chart { padding: 10px 16px 16px; }
    .lc-busiest-bars { padding: 8px 16px 14px; }
    .lc-skel-chart, .lc-skel-link { margin: 16px; }
}

/* A TOUCH SCREEN (portal-look-and-feel 3.17): 44px targets and a 16px input (a smaller one makes iOS zoom on focus).
   The action column widens to hold its 44px buttons - the stacking rule's arithmetic counts this width. */
@media (pointer: coarse) {
    .lc-copy { min-width: 44px; min-height: 44px; justify-content: center; }
    .lc-search { height: 44px; }
    .lc-search-input { font-size: 16px; }
    .lc-text-input { font-size: 16px; }
    .lc-iconbtn { width: 44px; height: 44px; }
    .lc-col-actions { width: 10.25rem; }
    .lc-table.has-open .lc-col-actions { width: 13.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    .lc-row, .lc-actions, .lc-search { transition: none; }
    .lc-row.is-featured { animation: none; }
}

/* THE CODE'S LOOK (designer-css-plan P3): what it wears per face, Change, and a website code's embed settings. */
.lc-look-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0 20px; list-style: none; }

.lc-look-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--theme-text-secondary); font-size: 13px; }

.lc-look-host { display: flex; flex-direction: column; gap: 6px; margin: 0 20px 18px; padding: 14px 16px; border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius); background: var(--theme-surface); }

.lc-look-host .lc-card-foot { padding: 6px 0 0; }

.lc-look-host-title { margin: 0; font-size: 14px; font-weight: 600; color: var(--theme-text); }

.lc-look > .lc-note { padding: 0 20px 12px; }

/* POST IT IN SLACK (slack-start-anywhere-design.md SSA-D6): the card's fields, the pick list's two groups and the post's preview. */
.lc-slack-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lc-slack-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lc-slack-picks {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius);
    background: var(--theme-background-raised);
}

.lc-slack-group {
    padding: 6px 10px 2px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--theme-text-secondary);
}

.lc-slack-pick {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 6px 10px;
    border: 0;
    background: transparent;
    color: var(--theme-text);
    text-align: left;
    cursor: pointer;
}

.lc-slack-pick:hover:not(:disabled),
.lc-slack-pick.is-on {
    background: var(--theme-background-subtle);
}

.lc-slack-pick:disabled {
    cursor: not-allowed;
    color: var(--theme-text-muted);
}

.lc-slack-pick-handle {
    font-size: 0.75rem;
    color: var(--theme-text-secondary);
}

.lc-slack-preview {
    padding: 10px 12px;
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius);
    background: var(--theme-background-subtle);
    color: var(--theme-text);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.lc-slack-preview-button {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    border-radius: var(--theme-radius);
    background: var(--theme-primary);
    color: var(--theme-text-on-primary);
    font-weight: 600;
}

.lc-slack-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
