/* ===========================================================================
   Overlays — the drawers and the import dialog
   ---------------------------------------------------------------------------
   Both sit above the shell rather than replacing it, because both are things
   you do *to* a row you are looking at. Losing the list behind them would mean
   losing your place in it.
   =========================================================================== */

.scrim {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(16, 33, 31, .18);
  animation: cdFade .22s ease both;
}
.scrim--dark { background: rgba(16, 33, 31, .34); z-index: 30 }
/* A business's drawer handing on to one of its people, and back, as a phone
   pushes a page: the scrim and the drawer's edge stay put, the person comes
   in over the business as a sheet from the right while the business eases
   left and dims beneath it, and Back takes the sheet off to the right again,
   the business easing back in under it. Both layers are on screen the whole
   way, so there is never a blank frame, and the one underneath is clipped to
   the drawer so it never spills over the page. overlay() keeps the panel
   being replaced as `--under` (going) or `--leaving` (the sheet coming off)
   until the move is done. Transform and opacity only. */
.drawer.drawer--push { animation: cdSlideIn .34s cubic-bezier(.32, .72, 0, 1) both }
.drawer.drawer--back { animation: none }
.drawer--back > * { animation: cdBack .34s cubic-bezier(.32, .72, 0, 1) backwards }
.drawer.drawer--under { animation: none; overflow: clip; pointer-events: none }
.drawer--under > * { animation: cdRecede .34s cubic-bezier(.32, .72, 0, 1) forwards }
.drawer.drawer--leaving { z-index: 22; pointer-events: none; animation: cdSlideOut .34s cubic-bezier(.32, .72, 0, 1) forwards }
/* The returning business is clipped only while it moves: a menu it opens
   later may hang past its edge. */
.drawer.drawer--moving { overflow: clip }
/* The sheet's leading edge casts a soft shade on what it slides over. */
.drawer--push::after, .drawer--leaving::after {
  content: ""; position: absolute; top: 0; bottom: 0; right: 100%; width: 32px; pointer-events: none;
  background: linear-gradient(to left, rgba(16, 33, 31, .09), transparent);
}
.drawer--push::after { animation: cdEdge .34s linear forwards }
@keyframes cdRecede { to { opacity: .4; transform: translate3d(-24%, 0, 0) } }
@keyframes cdBack { from { opacity: .4; transform: translate3d(-24%, 0, 0) } }
@keyframes cdSlideOut { from { transform: translate3d(0, 0, 0) } to { transform: translate3d(100%, 0, 0) } }
@keyframes cdEdge { 70% { opacity: 1 } to { opacity: 0 } }
@keyframes cdFadeOut { to { opacity: 0 } }
@media (prefers-reduced-motion: reduce) {
  /* No travel: the person fades in over the business, and fades off it. */
  .drawer.drawer--push { animation: cdFadeIn .15s ease both }
  .drawer.drawer--leaving { animation: cdFadeOut .15s ease forwards }
  .drawer--back > *, .drawer--under > * { animation: none }
  .drawer--push::after, .drawer--leaving::after { content: none }
}
/* Stepping to the next person swaps the drawer's contents in place. Doubled
   on .drawer so it outranks the slide-in on `.drawer` further down, and after
   the push so stepping wins over it. */
.scrim--swap, .drawer.drawer--swap { animation: none }
/* The arrow back to that business, first in the head. */
.drawer__back { width: 34px; height: 34px; flex-basis: 34px; margin-right: -4px }
.drawer__back .ms { font-size: 20px }

/* A drawer opened from a list: up, where you are in it, down. */
.drawer__nav { display: flex; align-items: center; gap: 6px; flex: 0 0 auto }
.drawer__step { width: 34px; height: 34px; flex-basis: 34px }
.drawer__step .ms { font-size: 20px }
.drawer__pos { min-width: 58px; text-align: center; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap }
.drawer__pos b { color: var(--text); font-weight: var(--weight-strong) }
@media (max-width: 900px) {
  /* A finger's width, and the count drawn tighter to leave the name room. */
  .drawer__step, .drawer__back { width: 40px; height: 40px; flex-basis: 40px }
  .drawer__nav { gap: 2px }
  .drawer__pos { min-width: 44px }
}

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 21;
  width: min(900px, calc(var(--vw) * .92));
  background: var(--page); border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  animation: cdSlideIn .32s cubic-bezier(.22, .8, .28, 1) both;
  will-change: transform;
}
/* The design's drawer slides the full width of itself, from off-screen. Mine
   nudged 24px and faded, which reads as a flicker rather than a panel arriving
   — the movement is what tells you where it came from and how to dismiss it. */
@keyframes cdSlideIn { from { transform: translateX(100%) } to { transform: translateX(0) } }
@keyframes cdFadeIn  { from { opacity: 0 } to { opacity: 1 } }
@keyframes cdSweep {
  0%   { transform: translateX(-60%) skewX(-12deg); opacity: 0 }
  25%  { opacity: .85 }
  100% { transform: translateX(160%) skewX(-12deg); opacity: 0 }
}
@keyframes cdFloatA { 0%, 100% { transform: translate3d(0,0,0) rotate(-1.5deg) } 50% { transform: translate3d(14px,-22px,0) rotate(1deg) } }
@keyframes cdFloatB { 0%, 100% { transform: translate3d(0,0,0) rotate(2deg) }    50% { transform: translate3d(-18px,16px,0) rotate(-1.5deg) } }
@keyframes cdFloatC { 0%, 100% { transform: translate3d(0,0,0) rotate(1deg) }    50% { transform: translate3d(10px,20px,0) rotate(-2deg) } }

.drawer__head {
  display: flex; align-items: center; gap: 16px;
  height: var(--topbar-h); flex: 0 0 var(--topbar-h); padding: 0 28px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.drawer__head h3 { margin: 0; font-size: 17px; font-weight: var(--weight-strong); letter-spacing: -.02em }
/* The name, and the pencil that opens its Edit info right after it: muted
   until pointed at, ink and filled while the fields are open. */
.drawer__title { display: flex; align-items: center; gap: 2px; min-width: 0 }
.drawer__title h3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.drawer__edit {
  position: relative; flex: 0 0 auto; display: grid; place-items: center;
  width: 30px; height: 30px; padding: 0; border: 0; border-radius: var(--r-btn-sm);
  background: none; color: var(--muted); cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.drawer__edit[hidden] { display: none }
.drawer__edit::after { content: ""; position: absolute; inset: -7px }
.drawer__edit .ms { font-size: 18px }
.drawer__edit:hover { color: var(--text); background: var(--page) }
.drawer__edit[aria-pressed="true"] { color: var(--text); background: var(--page) }
.drawer__edit[aria-pressed="true"] .ms { font-variation-settings: 'FILL' 1 }
.drawer__edit:focus-visible { outline: none; box-shadow: var(--ring) }
/* Do not contact, after the pencil: the stop's icon and words in its colour,
   the reason muted after them (dropped on a phone, where the name needs the room). */
.drawer__flag { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; margin-left: 8px;
  font-size: 13px; font-weight: var(--weight-strong); color: #B23A22; white-space: nowrap }
.drawer__flag .ms { font-size: 17px; color: inherit; font-variation-settings: 'FILL' 1 }
.drawer__flag-why { margin-left: 3px; font-weight: 500; color: var(--muted) }
@media (max-width: 560px) { .drawer__flag-why { display: none } }
.drawer__head .muted { font-size: 12.5px; margin-top: 2px }
/* With a tab strip under it, the header and tabs read as one block: the header
   sizes to its content so the gap above the tabs is the strip's own padding. */
.drawer__head:has(+ * > .drawer__tabs),
.drawer__head:has(+ * > [data-skeleton] > .drawer__tabs) {
  border-bottom: 0; height: auto; flex-basis: auto; padding-top: 14px; padding-bottom: 0;
}
/* While the skeleton's strip waits, the name's line keeps the height the
   pencil beside it will give it, so the tabs do not move when it lands. */
.drawer__head:has(+ * > [data-skeleton] > .drawer__tabs) .drawer__title { min-height: 30px }

/* Pinned: the tabs stay put while the body scrolls under them. Underlined
   tabs, an icon and a name each, sitting on the header's bottom hairline: the
   open one is drawn in ink with a bar on that line, the rest stay muted. */
.drawer__tabs {
  display: flex; align-items: flex-end; gap: 2px; flex: 0 0 auto; flex-wrap: wrap;
  padding: 6px 28px 0 16px; background: var(--card); border-bottom: 1px solid var(--line);
}
.tab {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 44px; padding: 0 12px;
  font-size: 13px; font-weight: var(--weight-strong);
  border-radius: 10px 10px 0 0; cursor: pointer; white-space: nowrap;
  color: var(--muted); background: none; border: 0;
}
.tab .ms { font-size: 19px }
.tab:hover { color: var(--text) }
.tab[aria-selected="true"] { color: var(--text) }
.tab[aria-selected="true"] .ms { font-variation-settings: 'FILL' 1 }
.tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
  border-radius: 2px 2px 0 0; background: var(--ink);
}
/* The tab a to-do opened the drawer on, in that section's colour: its icon
   always, so it can be found again, and open, a wash, label and bar too. */
.tab--action .ms { color: color-mix(in srgb, var(--tone) 80%, var(--text)) }
.tab--action[aria-selected="true"] { color: color-mix(in srgb, var(--tone) 62%, var(--text)); background: color-mix(in srgb, var(--tone) 12%, var(--card)) }
.tab--action[aria-selected="true"]::after { left: 0; right: 0; background: var(--tone) }

.drawer__body {
  flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable;
  padding: 24px 20px 40px 28px;
  display: flex; flex-direction: column; gap: 20px;
}
/* A tabbed drawer's body is swiped sideways between its tabs
   (`app/drawer-swipe.js`): the browser keeps up-and-down scrolling and hands
   sideways moves over, and a touchpad swipe never goes back a page. */
.drawer__tabs ~ .drawer__body { touch-action: pan-y; overscroll-behavior-x: none }

/* Every dialog has three parts, as Linear, Vercel and Pipedrive lay theirs
   out: a header (title, close), a body that scrolls, and a footer pinned to
   the bottom with the actions on the right, Cancel then the action. The
   dialog itself is the scroller and the header and footer are sticky inside
   it, so this holds for every dialog whatever its body is built from; the
   footer is the button row each one ends with. overlay() puts Cancel first
   in that row, so Tab meets the buttons in the order they are seen.

   A raised sheet, so the one place in the app with a real shadow: a hairline
   ring for the edge, then a soft drop tinted to the ink. */
.modal {
  --mpad: 24px;
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 31;
  width: min(600px, calc(var(--vw) * .92)); max-height: calc(var(--vh) * .88);
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  background: var(--card); border: 0; border-radius: 18px;
  padding: 0 var(--mpad);
  box-shadow: var(--shadow-top);
  animation: cdPop .2s cubic-bezier(.16, 1, .3, 1) both;
}
/* Needs its own keyframes rather than cdRise: an animation with `both` holds
   its final transform after it finishes, so cdRise's `transform: none` would
   overwrite the translate that centres this and drop the dialog half a viewport
   down and to the right. Every frame has to carry the centring itself. */
@keyframes cdPop {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)) scale(.98) }
  to   { opacity: 1; transform: translate(-50%, -50%) }
}
@media (prefers-reduced-motion: reduce) { .modal { animation: cdFade .15s ease both } }

/* A spotlight (spotlight in app/overlays.js): the screen dimmed round one
   card, which stays live through the hole. Over the drawer and its dialogs,
   under setup's own layer. The dim takes taps (they end it); the hole lets
   them through to the card. */
.spotlight {
  position: fixed; inset: 0; z-index: 32; width: 100%; height: 100%;
  pointer-events: none; animation: cdFade .22s ease both;
}
.spotlight path { fill: rgba(16, 33, 31, .5); pointer-events: visiblePainted }
.spotlight.is-leaving { animation: cdFadeOut .15s ease forwards }
@media (prefers-reduced-motion: reduce) { .spotlight, .spotlight.is-leaving { animation: none } }
/* Setup is a full-screen layer of its own (.ob, z-index 60); a dialog opened
   from it, such as the invite from "Add them now", has to sit above it. */
body:has(.ob) > .scrim { z-index: 61 }
body:has(.ob) > .modal { z-index: 62 }

.modal__head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  margin: 0 calc(var(--mpad) * -1) 4px; padding: var(--mpad) 14px 14px var(--mpad);
  background: var(--card);
}
.modal__head h3 {
  margin: 0; flex: 1; min-width: 0;
  font-size: 17px; font-weight: var(--weight-strong); letter-spacing: -.015em; line-height: 1.3;
  text-wrap: balance;
}
/* A warning modal leads with its icon rather than its words. The icon is the
   mark itself, not an icon sitting in a tinted tile inside the dialog. */
.modal__mark { flex: 0 0 auto; display: grid; place-items: center; color: #B07C00 }
.modal__mark .ms { font-size: 22px }
.modal__lede { font-size: 14px; line-height: 1.6; color: var(--text); margin: 0 0 16px; text-wrap: pretty }
.modal__lede b { font-weight: var(--weight-strong) }
.aapoints { display: flex; flex-direction: column; gap: 9px; margin-bottom: 20px }
.aapoint { display: flex; gap: 9px; font-size: 13px; color: var(--muted) }
.aapoint .ms { font-size: 17px; color: #B07C00; flex: 0 0 auto }

/* The footer: the last button row, whatever margin the dialog gave it (in the
   import, the last row of whichever step is showing). */
.modal > .row:last-child, .modal > .csvflow > .row:last-child {
  position: sticky; bottom: 0; z-index: 2;
  justify-content: flex-end; gap: 10px;
  margin: 24px calc(var(--mpad) * -1) 0 !important; padding: var(--mpad);
  border-top: 1px solid var(--hair); background: var(--card);
}
/* Anything in it that is not a button (a sending state, a note) stays on the
   left; the first button takes the slack, so the buttons hold the right. */
.modal > .row:last-child > :not(.btn), .modal > .csvflow > .row:last-child > :not(.btn) { order: -1; margin-left: 0 !important }
.modal > .row:last-child > .btn:not(.btn ~ .btn), .modal > .csvflow > .row:last-child > .btn:not(.btn ~ .btn) { margin-left: auto }
/* A dialog that ends on something other than a button row still keeps its
   space off the bottom edge. */
.modal > :last-child:not(.row):not(:has(> .row:last-child)) { margin-bottom: var(--mpad) }

/* Fields read a step firmer in a dialog: the label in ink at the label size,
   so a form's questions lead and its placeholders sit back. */
.modal .field__label { font-size: 12.5px; font-weight: 500; color: var(--text) }

/* Confirming something that cannot be clicked back: disconnecting an inbox,
   a calendar, LinkedIn or WhatsApp. A narrow dialog, a red mark, and each
   consequence as an icon and a few words, red for what stops and green for
   what is kept, so the split reads before the words do. */
.modal--confirm { width: min(460px, calc(var(--vw) * .92)) }
.modal--confirm .modal__mark { color: var(--bad) }
.modal--confirm .aapoints { gap: 0; margin: 0 }
.modal--confirm .aapoint {
  align-items: center; gap: 12px; padding: 12px 0;
  font-size: 14px; font-weight: var(--weight-strong); color: var(--text);
}
.modal--confirm .aapoint:first-child { padding-top: 4px }
.modal--confirm .aapoint + .aapoint { border-top: 1px solid var(--hair) }
.modal--confirm .aapoint .ms { font-size: 19px; color: var(--bad) }
.modal--confirm .aapoint--kept .ms { color: var(--good) }
/* Skipping an optional account in setup: a warning, not a loss, so the mark
   is amber, and each missing account shows its own brand mark. */
.modal--skip .modal__mark { color: #B07C00 }
/* "Connect WhatsApp" and "Skip for now" do not fit side by side on a phone:
   the row wraps, the connect button on top. */
.modal--skip > .row:last-child { flex-wrap: wrap-reverse }
.modal--confirm .aapoint > svg { flex: 0 0 auto }

/* The close mark: a 32px target with a wash on hover, the way the top bar's
   icon buttons answer the pointer. */
.closer {
  flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center;
  font-size: 20px; color: var(--muted); cursor: pointer; border-radius: 9px;
  transition: background .16s ease, color .16s ease;
}
.closer:hover { color: var(--text); background: color-mix(in srgb, var(--ink) 6%, transparent) }

/* The recessed panels the design uses inside cards for a single fact. */
.tile { background: var(--page); border-radius: 16px; padding: 16px 18px }
.tile__label { font-size: 12px; color: var(--muted); margin-bottom: 6px }
.tile__value { font-size: 15px; font-weight: var(--weight-strong); line-height: 1.35 }

.iconbtn {
  display: grid; place-items: center;
  width: var(--control-h); height: var(--control-h); flex: 0 0 var(--control-h);
  border-radius: var(--r-btn); border: 1px solid var(--btn-edge);
  background: var(--card); color: color-mix(in srgb, var(--text) 72%, var(--card)); cursor: pointer; padding: 0;
  transition: border-color .16s ease, color .16s ease;
}
.iconbtn:hover:not(:disabled) { color: var(--text) }
.iconbtn:disabled { opacity: .45; cursor: not-allowed }
.iconbtn--bad:hover:not(:disabled) { border-color: #C0362C; color: #C0362C }
.iconbtn .ms { font-size: 18px }

/* The Filters button stands alone at the left of the table toolbar, with the
   tools group pushed away to the right, so it has no neighbour to be told
   apart from and the ring around it was doing no work. Bare icon, but still
   --control-h square, so it takes the same bite out of the row and the
   toolbar stands at one height. */
.filterbtn {
  display: grid; place-items: center;
  width: var(--control-h); height: var(--control-h); flex: 0 0 var(--control-h);
  border: none; background: none; padding: 0; border-radius: var(--r-btn);
  color: var(--muted); cursor: pointer; transition: color .16s ease;
}
.filterbtn:hover { color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent) }
.filterbtn .ms { font-size: 19px }
/* Filters are applied. The border used to carry this; the icon carries it now. */
.filterbtn--on { color: var(--ink) }
/* The table's tools with their word beside the icon. */
.iconbtn--word, .filterbtn--word {
  display: inline-flex; align-items: center; gap: 6px; width: auto; flex: 0 0 auto; padding: 0 20px 0 16px;
  font: inherit; font-size: 12.5px; font-weight: var(--weight-strong);
}
/* With its word it is a secondary button like any other, so the word is
   ink, not the grey that made Import and Export look switched off. */
.iconbtn--word { color: var(--text) }
.iconbtn--word .ms { font-size: 16px; color: color-mix(in srgb, var(--text) 72%, var(--card)) }
.filterbtn--word { padding: 0 20px 0 16px }
.filterbtn--word .ms { font-size: 16px }
/* A button with no edge or fill shows only its icon and word, so at the start
   of a row its own padding reads as extra inset: Filter's icon sat 12px in
   from the table's first column. It hangs into the row's padding by its own
   16px inset,
   so the icon starts on the content edge; its hover wash still has room. */
.filterbtn--word:first-child { margin-left: -16px }
/* Shown at every width, a phone's too; it never breaks inside the button. */
.tool__word { white-space: nowrap }

/* Only ever shown on a phone, where the search field has collapsed. */
.searchbtn {
  display: none; place-items: center; width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: var(--r-btn); border: 1px solid var(--line);
  background: var(--card); color: var(--text); cursor: pointer; padding: 0;
}
/* The same 21px glyph as the bell and gear it sits beside. */
.searchbtn .ms { font-size: 21px; color: inherit }

/* Approving is the one irreversible button in the app, so it is the one place
   that gets a colour of its own rather than the house ink. */
.btn--go { background-color: #2E9E63; color: #FFF }
.btn--go:hover:not(:disabled) { background-color: #26824F; opacity: 1 }

/* One email within a four-step sequence. The card carries the state of the
   whole sequence, not of itself: all four are yellow while the sequence waits
   on the user and all four turn green the moment it is approved. Same two
   tones as the pipeline cards on the outreach page, so a draft looks the same
   wherever you meet it. */
.step { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px }
.step--pending { background: #FFF8E6; border-color: #F0DFAE }
.step--go { background: #E9F5EE; border-color: #C4E0CF }
/* Last, so an edited card keeps its amber border over either tone. */
.step--edited { border-color: var(--amber) }
.step__num {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: var(--r-pill);
  display: grid; place-items: center; background: var(--page);
  font-size: 12px; font-weight: var(--weight-strong);
}
.step--pending .step__num { background: #F6EACB; color: #6B4A00 }
.step--go .step__num { background: #2E9E63; color: #FFF }
.step .textarea { min-height: 190px; font-size: 13.5px }

.dropzone {
  display: flex; align-items: center; gap: 14px;
  background: var(--page); border: 1px dashed var(--teal); border-radius: 18px;
  padding: 20px; width: 100%; text-align: left;
  font-family: inherit; color: var(--text); cursor: pointer;
}
.dropzone:hover, .dropzone[data-over="1"] { border-color: var(--ink) }
.dropzone .ms { font-size: 24px; flex: 0 0 auto }
/* Under the zone: the way from a spreadsheet to the file it takes. Beside
   Import: why it waits (no company or email column mapped). */
.csvsheet { display: flex; align-items: center; gap: 6px; font-size: 12.5px; margin-top: 12px }
.csvneeds { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--bad) }
.csvsheet .ms, .csvneeds .ms { font-size: 16px }
.csvneeds[hidden] { display: none }
.csvfacts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px }
.csvfacts .csvsheet { margin-top: 0 }
.csvmerge { margin: 0 0 0 auto }
/* In the file card: the export it was recognised as, or amber Not recognised. */
.csvfmt { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; white-space: nowrap; color: var(--ink); font-weight: 500 }
.dropzone .csvfmt .ms { font-size: 15px }
.csvfmt--warn { color: #8A5A00 }

/* Column mapping: your header, what it becomes, what is actually in it. */
.maprow {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; align-items: center;
  padding: 11px 4px; border-top: 1px solid var(--hair);
}
.maprow > * { min-width: 0 }
.maprow__head { border: none; padding: 0 4px 10px; font-size: 11.5px; font-weight: var(--weight-strong); color: var(--muted) }
.maprow__name { font-size: 13px; font-weight: var(--weight-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.maprow__sample { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.maprow .select { padding: 9px 12px; font-size: 12.5px; border-radius: 11px }
/* A field fed by two columns: an amber edge on both selects and, under each,
   the other column's name. The banner of columns left out follows the selects. */
.maprow__pick { display: flex; flex-direction: column; gap: 6px; min-width: 0 }
.maprow__pick[data-twin] .select { border-color: var(--amber) }
.maprow__twin { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #8A5A00; min-width: 0; overflow-wrap: anywhere }
.maprow__twin .ms { font-size: 15px; flex: none }
.maprow__twin[hidden], .banner[hidden] { display: none }
/* A "Contact or owner" column's split: each share with its icon and label. */
.maprow__who { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); min-width: 0 }
.maprow__who > span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap }
.maprow__who .ms { font-size: 15px; flex: none }
.maprow__who[hidden] { display: none }

/* Stage matching: the file's stage and its deal count, then an arrow, the
   chosen stage's own colour (the board's, --stage-hue) and the select. */
.maprow.stagematch { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) }
.stagematch__from { display: flex; flex-direction: column; gap: 2px; min-width: 0 }
.stagematch__to { display: flex; align-items: center; gap: 10px; min-width: 0 }
.stagematch__to .select { flex: 1; min-width: 0 }
.stagematch__arrow { font-size: 18px; color: var(--muted); flex: none }
.stagematch__dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--stage-hue, var(--line)) }

/* The import's result: a row per outcome, its icon, a short label and the
   count, split by hairlines rather than boxed. */
.impsum { margin: 0 }
.impsum__row {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center;
  padding: 11px 4px; border-top: 1px solid var(--hair); font-size: 13.5px;
}
.impsum__row:first-child { border-top: 0; padding-top: 0 }
.impsum__row .ms { font-size: 19px; color: var(--muted) }
.impsum__row dt { min-width: 0; color: var(--text) }
.impsum__row dd { margin: 0; font-weight: var(--weight-strong); font-variant-numeric: tabular-nums; white-space: nowrap }
.impsum__row--good .ms { color: #23794C }
.impsum__row--bad .ms, .impsum__row--bad dd { color: var(--bad) }
.impsum__row--warn .ms { color: #8A5A00 }
.impsum__errors {
  display: flex; flex-direction: column; gap: 8px; margin-top: 10px;
  max-height: 220px; overflow-y: auto; font-size: 12.5px; color: var(--muted);
}
.impsum__errors b { color: var(--text); margin-right: 6px }

/* Where we got their details (shared/details-source.js): a row per detail,
   its icon and what it is as a Label, where it came from as Body, split by
   hairlines; the notice is copied, never shown. One column on a narrow drawer. */
.dsrc { list-style: none; margin: 0; padding: 0 }
.dsrc__row { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 4px 16px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--hair) }
.dsrc__row:first-child { padding-top: 0; border-top: 0 }
.dsrc__label { display: inline-flex; align-items: center; gap: 6px }
.dsrc__label .ms { font-size: 16px }
.dsrc__value { text-wrap: pretty; overflow-wrap: anywhere }
.dsrc__foot { display: flex; justify-content: flex-end; margin-top: var(--dr-space-head); padding-top: 14px; border-top: 1px solid var(--hair) }
@container (max-width: 420px) {
  .dsrc__row { grid-template-columns: minmax(0, 1fr) }
}

/* ===========================================================================
   Mobile — the sidebar becomes a bottom tab bar, as in the design
   =========================================================================== */
