/* Edara for Amazon. Colours, type, shape, spacing, state and elevation come from the shared
   Edara Extensions tokens (styles/edara-tokens.css, a byte-identical copy of
   edara-extensions-infra/design/extension-shell/edara-tokens.css, loaded before this file).
   Never define a colour here: change it in the shared file and run its sync.sh.

   The component rules below were written against Material's --md-sys-* names, so this block
   maps those names onto the shared ones (the "alias block" the shared README asks each
   extension to keep). Brand colour is the shared Edara blue, with no override. */
:root {
  --md-sys-color-primary: var(--primary);
  --md-sys-color-on-primary: var(--on-primary);
  --md-sys-color-primary-container: var(--primary-container);
  --md-sys-color-on-primary-container: var(--on-primary-container);
  --md-sys-color-secondary: var(--secondary);
  --md-sys-color-secondary-container: var(--secondary-container);
  --md-sys-color-on-secondary-container: var(--on-secondary-container);
  --md-sys-color-tertiary: var(--tertiary);
  --md-sys-color-tertiary-container: var(--tertiary-container);
  --md-sys-color-on-tertiary-container: var(--on-tertiary-container);
  --md-sys-color-error: var(--error);
  --md-sys-color-on-error: var(--on-error);
  --md-sys-color-error-container: var(--error-container);
  --md-sys-color-on-error-container: var(--on-error-container);
  --md-sys-color-success: var(--success);
  --md-sys-color-success-container: var(--success-container);
  --md-sys-color-on-success-container: var(--on-success-container);
  --md-sys-color-warning: var(--warning);
  --md-sys-color-warning-container: var(--warning-container);
  --md-sys-color-on-warning-container: var(--on-warning-container);
  --md-sys-color-surface: var(--surface);
  --md-sys-color-on-surface: var(--on-surface);
  --md-sys-color-on-surface-variant: var(--on-surface-variant);
  --md-sys-color-surface-variant: var(--surface-variant);
  --md-sys-color-surface-container-lowest: var(--surface-container-lowest);
  --md-sys-color-surface-container-low: var(--surface-container-low);
  --md-sys-color-surface-container: var(--surface-container);
  --md-sys-color-surface-container-high: var(--surface-container-high);
  --md-sys-color-surface-container-highest: var(--surface-container-highest);
  --md-sys-color-outline: var(--outline);
  --md-sys-color-outline-variant: var(--outline-variant);
  --md-sys-color-inverse-surface: var(--inverse-surface);
  --md-sys-color-inverse-on-surface: var(--inverse-on-surface);
  /* The shared file has no inverse-primary; tone 90 reads on the inverse surface in both themes. */
  --md-sys-color-inverse-primary: var(--primary-container);
  --md-sys-color-scrim: #000;  /* a scrim is black in both themes; the shared file names none */

  --md-ref-typeface-brand: var(--font-headline);
  --md-ref-typeface-plain: var(--font-family);
  --md-ref-typeface-mono: ui-monospace, Menlo, Consolas, monospace;

  /* Sizes always travel with their line-height, as the shared scale requires. */
  --md-sys-typescale-display-small: 600 var(--typo-display-sm)/var(--typo-display-sm-lh) var(--md-ref-typeface-brand);   --md-sys-typescale-display-small-tracking: var(--typo-display-sm-ls);
  --md-sys-typescale-headline-medium: 600 var(--typo-headline-md)/var(--typo-headline-md-lh) var(--md-ref-typeface-brand); --md-sys-typescale-headline-medium-tracking: var(--typo-headline-md-ls);
  --md-sys-typescale-headline-small: 600 var(--typo-headline-sm)/var(--typo-headline-sm-lh) var(--md-ref-typeface-brand);  --md-sys-typescale-headline-small-tracking: var(--typo-headline-sm-ls);
  --md-sys-typescale-title-large: 600 var(--typo-title-lg)/var(--typo-title-lg-lh) var(--md-ref-typeface-brand);          --md-sys-typescale-title-large-tracking: var(--typo-title-lg-ls);
  --md-sys-typescale-title-medium: 500 var(--typo-title-md)/var(--typo-title-md-lh) var(--md-ref-typeface-plain);         --md-sys-typescale-title-medium-tracking: var(--typo-title-md-ls);
  --md-sys-typescale-title-small: 500 var(--typo-title-sm)/var(--typo-title-sm-lh) var(--md-ref-typeface-plain);          --md-sys-typescale-title-small-tracking: var(--typo-title-sm-ls);
  --md-sys-typescale-body-large: 400 var(--typo-body-lg)/var(--typo-body-lg-lh) var(--md-ref-typeface-plain);             --md-sys-typescale-body-large-tracking: var(--typo-body-lg-ls);
  --md-sys-typescale-body-medium: 400 var(--typo-body-md)/var(--typo-body-md-lh) var(--md-ref-typeface-plain);            --md-sys-typescale-body-medium-tracking: var(--typo-body-md-ls);
  --md-sys-typescale-body-small: 400 var(--typo-body-sm)/var(--typo-body-sm-lh) var(--md-ref-typeface-plain);             --md-sys-typescale-body-small-tracking: var(--typo-body-sm-ls);
  --md-sys-typescale-label-large: 500 var(--typo-label-lg)/var(--typo-label-lg-lh) var(--md-ref-typeface-plain);          --md-sys-typescale-label-large-tracking: var(--typo-label-lg-ls);
  --md-sys-typescale-label-medium: 500 var(--typo-label-md)/var(--typo-label-md-lh) var(--md-ref-typeface-plain);         --md-sys-typescale-label-medium-tracking: var(--typo-label-md-ls);
  --md-sys-typescale-label-small: 500 var(--typo-label-sm)/var(--typo-label-sm-lh) var(--md-ref-typeface-plain);          --md-sys-typescale-label-small-tracking: var(--typo-label-sm-ls);

  --md-sys-shape-corner-none: 0;
  --md-sys-shape-corner-extra-small: var(--shape-xs);
  --md-sys-shape-corner-small: var(--shape-sm);
  --md-sys-shape-corner-medium: var(--shape-md);
  --md-sys-shape-corner-large: var(--shape-lg);
  --md-sys-shape-corner-extra-large: var(--shape-xl);
  --md-sys-shape-corner-full: 9999px;

  --md-sys-elevation-level0: none;
  --md-sys-elevation-level1: var(--elev-1);
  --md-sys-elevation-level2: var(--elev-2);
  --md-sys-elevation-level3: var(--elev-3);

  --md-sys-state-hover-opacity: var(--state-hover);
  --md-sys-state-focus-opacity: var(--state-press);
  --md-sys-state-pressed-opacity: var(--state-press);
  --md-sys-state-disabled-content-opacity: .38;
  --md-sys-state-disabled-container-opacity: .12;

  /* --motion-base is zeroed by the shared file under reduced motion, so these follow it. */
  --md-sys-motion-easing-standard: var(--motion-ease);
  --md-sys-motion-duration-short2: calc(var(--motion-base) / 2);
  --md-sys-motion-duration-short4: var(--motion-base);

  --ed-space-1: var(--space-1); --ed-space-2: var(--space-2); --ed-space-3: var(--space-3); --ed-space-4: var(--space-4);
  --ed-space-5: var(--space-5); --ed-space-6: var(--space-6); --ed-space-7: var(--space-8);
}

/* ---------- Type classes ---------- */
.m3-display-small{font:var(--md-sys-typescale-display-small)}
.m3-headline-medium{font:var(--md-sys-typescale-headline-medium)}
.m3-headline-small{font:var(--md-sys-typescale-headline-small)}
.m3-title-large{font:var(--md-sys-typescale-title-large)}
.m3-title-medium{font:var(--md-sys-typescale-title-medium);letter-spacing:var(--md-sys-typescale-title-medium-tracking)}
.m3-title-small{font:var(--md-sys-typescale-title-small);letter-spacing:var(--md-sys-typescale-title-small-tracking)}
.m3-body-large{font:var(--md-sys-typescale-body-large);letter-spacing:var(--md-sys-typescale-body-large-tracking)}
.m3-body-medium{font:var(--md-sys-typescale-body-medium);letter-spacing:var(--md-sys-typescale-body-medium-tracking)}
.m3-body-small{font:var(--md-sys-typescale-body-small);letter-spacing:var(--md-sys-typescale-body-small-tracking)}
.m3-label-large{font:var(--md-sys-typescale-label-large);letter-spacing:var(--md-sys-typescale-label-large-tracking)}
.m3-label-medium{font:var(--md-sys-typescale-label-medium);letter-spacing:var(--md-sys-typescale-label-medium-tracking)}
.m3-label-small{font:var(--md-sys-typescale-label-small);letter-spacing:var(--md-sys-typescale-label-small-tracking)}

/* ---------- State layer (shared by interactive components) ---------- */
.m3-state{position:relative;overflow:hidden;isolation:isolate}
.m3-state::before{content:"";position:absolute;inset:0;background:currentColor;opacity:0;pointer-events:none;transition:opacity var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-standard);z-index:-1}
.m3-state:hover::before{opacity:var(--md-sys-state-hover-opacity)}
.m3-state:focus-visible::before{opacity:var(--md-sys-state-focus-opacity)}
.m3-state:active::before{opacity:var(--md-sys-state-pressed-opacity)}
.m3-state:focus-visible{outline:2px solid var(--md-sys-color-secondary);outline-offset:2px}

/* ---------- Buttons ---------- */
.m3-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--ed-space-2);height:40px;min-width:48px;padding-inline:24px;border:none;border-radius:var(--md-sys-shape-corner-full);font:var(--md-sys-typescale-label-large);letter-spacing:var(--md-sys-typescale-label-large-tracking);cursor:pointer;white-space:nowrap;text-decoration:none}
.m3-btn svg{width:18px;height:18px;fill:currentColor}
.m3-btn--filled{background:var(--md-sys-color-primary);color:var(--md-sys-color-on-primary)}
.m3-btn--filled:hover{box-shadow:var(--md-sys-elevation-level1)}
.m3-btn--tonal{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container)}
.m3-btn--elevated{background:var(--md-sys-color-surface-container-low);color:var(--md-sys-color-primary);box-shadow:var(--md-sys-elevation-level1)}
.m3-btn--outlined{background:transparent;color:var(--md-sys-color-primary);border:1px solid var(--md-sys-color-outline-variant)}
.m3-btn--text{background:transparent;color:var(--md-sys-color-primary);padding-inline:12px}
.m3-btn--danger{background:var(--md-sys-color-error);color:var(--md-sys-color-on-error)}
.m3-btn:disabled{cursor:default;box-shadow:none;color:color-mix(in srgb,var(--md-sys-color-on-surface) 38%,transparent);background:color-mix(in srgb,var(--md-sys-color-on-surface) 12%,transparent);border-color:color-mix(in srgb,var(--md-sys-color-on-surface) 12%,transparent)}
.m3-btn--text:disabled,.m3-btn--outlined:disabled{background:transparent}
.m3-btn:disabled::before{display:none}

/* ---------- Cards ---------- */
.m3-card{border-radius:var(--md-sys-shape-corner-medium);padding:var(--ed-space-4);color:var(--md-sys-color-on-surface)}
.m3-card--elevated{background:var(--md-sys-color-surface-container-low);box-shadow:var(--md-sys-elevation-level1)}
.m3-card--filled{background:var(--card);border:1px solid var(--md-sys-color-outline-variant)}
.m3-card--outlined{background:var(--card);border:1px solid var(--md-sys-color-outline-variant)}

/* ---------- Chips and status labels ---------- */
.m3-chip{display:inline-flex;align-items:center;gap:var(--ed-space-2);height:32px;padding-inline:16px;border-radius:var(--md-sys-shape-corner-small);border:1px solid var(--md-sys-color-outline);background:transparent;color:var(--md-sys-color-on-surface-variant);font:var(--md-sys-typescale-label-large);cursor:pointer}
.m3-chip[aria-pressed="true"]{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container);border-color:transparent}
.m3-chip[aria-pressed="true"]::after{content:"";order:-1;width:12px;height:6px;border-inline-start:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(-45deg)}
/* Edara extension: status labels are non-interactive chips in the success, warning, error or neutral roles */
.m3-status{display:inline-flex;align-items:center;height:24px;padding-inline:10px;border-radius:var(--md-sys-shape-corner-small);font:var(--md-sys-typescale-label-medium);letter-spacing:var(--md-sys-typescale-label-medium-tracking);white-space:nowrap}
.m3-status--success{background:var(--st-success-bg);color:var(--st-success-fg)}
.m3-status--warning{background:var(--st-warning-bg);color:var(--st-warning-fg)}
.m3-status--error{background:var(--st-error-bg);color:var(--st-error-fg)}
.m3-status--neutral{background:var(--st-neutral-bg);color:var(--st-neutral-fg)}

/* ---------- Tabs ---------- */
.m3-tabs{display:flex;border-bottom:1px solid var(--md-sys-color-surface-container-highest);overflow-x:auto}
.m3-tab{flex:0 0 auto;height:48px;padding-inline:16px;border:none;background:transparent;color:var(--md-sys-color-on-surface-variant);font:var(--md-sys-typescale-title-small);letter-spacing:var(--md-sys-typescale-title-small-tracking);cursor:pointer;position:relative}
.m3-tab[aria-selected="true"]{color:var(--md-sys-color-primary)}
.m3-tab[aria-selected="true"]::after{content:"";position:absolute;inset-inline:16px;bottom:0;height:3px;border-radius:3px 3px 0 0;background:var(--md-sys-color-primary)}

/* ---------- Lists ---------- */
.m3-list{list-style:none;margin:0;padding:var(--ed-space-2) 0;background:var(--md-sys-color-surface)}
.m3-list-item{display:flex;align-items:center;gap:var(--ed-space-4);min-height:56px;padding:var(--ed-space-2) var(--ed-space-4);color:var(--md-sys-color-on-surface)}
.m3-list-item--two-line{min-height:72px}
.m3-list-item__leading{flex:none;width:40px;height:40px;border-radius:var(--md-sys-shape-corner-full);background:var(--md-sys-color-primary-container);color:var(--md-sys-color-on-primary-container);display:flex;align-items:center;justify-content:center;font:var(--md-sys-typescale-title-medium)}
.m3-list-item__text{flex:1;min-width:0}
.m3-list-item__headline{font:var(--md-sys-typescale-body-large);letter-spacing:var(--md-sys-typescale-body-large-tracking)}
.m3-list-item__supporting{font:var(--md-sys-typescale-body-medium);color:var(--md-sys-color-on-surface-variant)}
.m3-list-item__trailing{flex:none;font:var(--md-sys-typescale-label-small);color:var(--md-sys-color-on-surface-variant)}
.m3-divider{height:1px;border:none;margin:0;background:var(--md-sys-color-outline-variant)}

/* ---------- Text field (outlined) ---------- */
.m3-field{position:relative;display:flex;flex-direction:column;gap:4px;max-width:420px;padding-top:8px}
.m3-field input,.m3-field select,.m3-field textarea{height:56px;padding-inline:16px;border:1px solid var(--md-sys-color-outline);border-radius:var(--md-sys-shape-corner-extra-small);background:transparent;color:var(--md-sys-color-on-surface);font:var(--md-sys-typescale-body-large)}
.m3-field textarea{height:auto;min-height:96px;padding-block:16px;resize:vertical}
.m3-field label{position:absolute;top:0;inset-inline-start:12px;padding-inline:4px;background:var(--m3-field-bg,var(--md-sys-color-surface));color:var(--md-sys-color-on-surface-variant);font:var(--md-sys-typescale-body-small)}
.m3-field input:hover,.m3-field select:hover{border-color:var(--md-sys-color-on-surface)}
.m3-field input:focus,.m3-field select:focus,.m3-field textarea:focus{outline:none;border:2px solid var(--md-sys-color-primary);padding-inline:15px}
.m3-field:focus-within label{color:var(--md-sys-color-primary)}
.m3-field__supporting{padding-inline:16px;font:var(--md-sys-typescale-body-small);color:var(--md-sys-color-on-surface-variant)}
.m3-field--error input,.m3-field--error input:focus{border-color:var(--md-sys-color-error)}
.m3-field--error label,.m3-field--error .m3-field__supporting{color:var(--md-sys-color-error)}

/* ---------- Checkbox, radio, switch ---------- */
.m3-check{display:inline-flex;align-items:center;gap:var(--ed-space-3);min-height:48px;cursor:pointer;font:var(--md-sys-typescale-body-large);color:var(--md-sys-color-on-surface)}
.m3-check input{width:18px;height:18px;margin:0;accent-color:var(--md-sys-color-primary)}
.m3-switch{position:relative;flex:none;width:52px;height:32px;padding:0;border-radius:var(--md-sys-shape-corner-full);border:2px solid var(--md-sys-color-outline);background:var(--md-sys-color-surface-container-highest);cursor:pointer}
.m3-switch::after{content:"";position:absolute;top:6px;inset-inline-start:6px;width:16px;height:16px;border-radius:50%;background:var(--md-sys-color-outline);transition:all var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard)}
.m3-switch[aria-checked="true"]{background:var(--md-sys-color-primary);border-color:var(--md-sys-color-primary)}
.m3-switch[aria-checked="true"]::after{top:2px;inset-inline-start:22px;width:24px;height:24px;background:var(--md-sys-color-on-primary)}
.m3-switch:focus-visible{outline:2px solid var(--md-sys-color-secondary);outline-offset:2px}

/* ---------- Dialog ---------- */
.m3-scrim{position:fixed;inset:0;background:rgb(0 0 0 / .32);display:flex;align-items:center;justify-content:center;padding:var(--ed-space-4);z-index:100}
.m3-dialog{display:flex;flex-direction:column;gap:var(--ed-space-4);min-width:280px;max-width:560px;width:100%;padding:var(--ed-space-5);border-radius:var(--md-sys-shape-corner-extra-large);background:var(--md-sys-color-surface-container-high);color:var(--md-sys-color-on-surface);box-shadow:var(--md-sys-elevation-level3)}
.m3-dialog__headline{margin:0;font:var(--md-sys-typescale-headline-small)}
.m3-dialog__body{margin:0;font:var(--md-sys-typescale-body-medium);letter-spacing:var(--md-sys-typescale-body-medium-tracking);color:var(--md-sys-color-on-surface-variant)}
.m3-dialog__actions{display:flex;justify-content:flex-end;gap:var(--ed-space-2);flex-wrap:wrap}

/* ---------- Snackbar ---------- */
.m3-snackbar{display:flex;align-items:center;gap:var(--ed-space-2);min-height:48px;max-width:600px;padding-block:6px;padding-inline:16px 8px;border-radius:var(--md-sys-shape-corner-extra-small);background:var(--md-sys-color-inverse-surface);color:var(--md-sys-color-inverse-on-surface);font:var(--md-sys-typescale-body-medium);box-shadow:var(--md-sys-elevation-level3)}
.m3-snackbar__text{flex:1;padding-block:8px}
.m3-snackbar .m3-btn--text{color:var(--md-sys-color-inverse-primary)}

/* ---------- Progress ---------- */
.m3-linear-progress{height:4px;border-radius:var(--md-sys-shape-corner-full);background:var(--md-sys-color-secondary-container);overflow:hidden}
.m3-linear-progress__bar{height:100%;border-radius:inherit;background:var(--md-sys-color-primary)}
.m3-linear-progress--indeterminate .m3-linear-progress__bar{width:40%;animation:m3-indeterminate 1.4s var(--md-sys-motion-easing-standard) infinite}
@keyframes m3-indeterminate{0%{transform:translateX(-100%)}100%{transform:translateX(250%)}}
:dir(rtl) .m3-linear-progress--indeterminate .m3-linear-progress__bar{animation-direction:reverse}
@media (prefers-reduced-motion: reduce){.m3-linear-progress--indeterminate .m3-linear-progress__bar{animation:none;width:100%;opacity:.5}}

/* ---------- Navigation rail, navigation bar, top app bar ---------- */
.m3-nav-rail{display:flex;flex-direction:column;align-items:center;gap:12px;width:80px;padding-block:var(--ed-space-4);background:var(--md-sys-color-surface)}
.m3-nav-bar{display:flex;justify-content:space-around;height:80px;padding-block:12px 16px;background:var(--md-sys-color-surface-container)}
.m3-nav-item{display:flex;flex-direction:column;align-items:center;gap:4px;border:none;background:none;padding:0;color:var(--md-sys-color-on-surface-variant);font:var(--md-sys-typescale-label-medium);letter-spacing:var(--md-sys-typescale-label-medium-tracking);cursor:pointer;position:relative;min-width:56px}
.m3-nav-item__indicator{display:flex;align-items:center;justify-content:center;width:56px;height:32px;border-radius:var(--md-sys-shape-corner-full);position:relative}
.m3-nav-bar .m3-nav-item__indicator{width:64px}
.m3-nav-item svg{width:24px;height:24px;fill:currentColor}
.m3-nav-item[aria-current="page"]{color:var(--md-sys-color-on-surface)}
.m3-nav-item[aria-current="page"] .m3-nav-item__indicator{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container)}
.m3-nav-item:hover .m3-nav-item__indicator{background:color-mix(in srgb,var(--md-sys-color-on-surface) calc(var(--state-hover)*100%),transparent)}
.m3-nav-item[aria-current="page"]:hover .m3-nav-item__indicator{background:color-mix(in srgb,var(--md-sys-color-on-secondary-container) calc(var(--state-hover)*100%),var(--md-sys-color-secondary-container))}
.m3-badge{position:absolute;top:-4px;inset-inline-start:calc(50% + 4px);min-width:16px;height:16px;padding-inline:4px;border-radius:var(--md-sys-shape-corner-full);background:var(--md-sys-color-error);color:var(--md-sys-color-on-error);font:var(--md-sys-typescale-label-small);display:flex;align-items:center;justify-content:center}
.m3-top-app-bar{display:flex;align-items:center;gap:var(--ed-space-2);height:64px;padding-inline:var(--ed-space-4);background:var(--md-sys-color-surface);color:var(--md-sys-color-on-surface)}
.m3-top-app-bar__title{flex:1;margin:0;font:var(--md-sys-typescale-title-large)}
.m3-top-app-bar--scrolled{background:var(--md-sys-color-surface-container)}


/* ---- app layout (from the prototype, full page instead of a framed demo) ---- */
.app{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);grid-template-areas:"header header" "rail view";height:100vh;height:100dvh;background:var(--background);overflow:hidden}
#overlay{display:contents}
.view{grid-area:view;min-width:0;min-height:0;overflow:auto;padding:var(--ed-space-5) var(--ed-space-5) var(--ed-space-7)}
.view > * + *{margin-top:var(--ed-space-4)}
.row{display:flex;gap:var(--ed-space-3);flex-wrap:wrap;align-items:center}
.spacer{flex:1}
.muted{color:var(--md-sys-color-on-surface-variant);font:var(--md-sys-typescale-body-medium)}
.setup-done{display:flex;align-items:center;gap:var(--ed-space-2);margin:var(--ed-space-3) 0 var(--ed-space-1);font:var(--md-sys-typescale-body-medium);color:var(--md-sys-color-on-surface-variant)}
.setup-done span{color:var(--md-sys-color-success);font-weight:700}
.preview{max-width:760px}
.checklist{list-style:none;margin:var(--ed-space-3) 0 var(--ed-space-1);padding:0;display:grid;gap:var(--ed-space-2)}
.checklist li{display:flex;align-items:center;gap:var(--ed-space-3);font:var(--md-sys-typescale-body-large)}
.checklist li > span:first-child{width:22px;height:22px;border-radius:11px;border:2px solid var(--md-sys-color-outline);display:flex;align-items:center;justify-content:center;font:var(--md-sys-typescale-label-small)}
.checklist li.done > span:first-child{border-color:transparent;background:var(--st-success-bg);color:var(--st-success-fg)}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.li .lead.ok{background:var(--st-success-bg);color:var(--st-success-fg)}
.li .lead.bad{background:var(--st-error-bg);color:var(--st-error-fg)}
.diag-ok{margin-top:var(--ed-space-3)}
.progress-row{display:flex;flex-direction:column;gap:var(--ed-space-2);margin-top:var(--ed-space-3)}
.big.big--small{font:var(--md-sys-typescale-headline-small)}

.self-start{align-self:flex-start}
.mt-2{margin-top:var(--ed-space-2)} .mt-3{margin-top:var(--ed-space-3)} .mt-4{margin-top:var(--ed-space-4)}
.mb-3{margin-bottom:var(--ed-space-3)} .my-2{margin-block:var(--ed-space-2)} .pad-3{padding:var(--ed-space-3)}
/* Icon button (Material 3 standard icon button): 40px, in a 48px touch target */
.icon-btn{position:relative;width:40px;height:40px;margin:var(--ed-space-1);border:none;border-radius:var(--md-sys-shape-corner-full);background:transparent;color:var(--md-sys-color-on-surface-variant);display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.icon-btn svg{width:24px;height:24px;fill:currentColor}
.icon-btn[aria-current="page"],.icon-btn[aria-expanded="true"]{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container)}
.picker .orgs{max-height:min(60vh,520px);overflow:auto}
.li.compact{width:100%;min-height:52px;text-align:start;border:none;border-top:1px solid var(--md-sys-color-outline-variant);background:none;font:inherit;color:inherit}
.li.compact:first-child{border-top:none}
.li.compact[hidden]{display:none}
.li.compact .lead{width:32px;height:32px}
.orgs .none{padding:var(--ed-space-3) var(--ed-space-4)}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--ed-space-3)}
.big{font:var(--md-sys-typescale-display-small);font-variant-numeric:tabular-nums}
.m3-card h3{font:var(--md-sys-typescale-title-medium);margin-bottom:var(--ed-space-2)}
.m3-tab .count{font:var(--md-sys-typescale-label-small);margin-inline-start:var(--ed-space-2)}
.list{background:var(--card);border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-sys-shape-corner-medium);overflow:hidden}
.li{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:var(--ed-space-4);align-items:center;min-height:72px;padding:var(--ed-space-2) var(--ed-space-4);border-top:1px solid var(--md-sys-color-outline-variant)}
.li:first-child{border-top:none}
.li.click{cursor:pointer}
.li.click:hover{background:color-mix(in srgb,var(--md-sys-color-on-surface) calc(var(--state-hover)*100%),transparent)}
.li .l1{font:var(--md-sys-typescale-body-large)}
.li .l2{font:var(--md-sys-typescale-body-medium);color:var(--md-sys-color-on-surface-variant)}
.li .lead{width:40px;height:40px;border-radius:var(--md-sys-shape-corner-full);background:var(--md-sys-color-primary-container);color:var(--md-sys-color-on-primary-container);display:flex;align-items:center;justify-content:center;font:var(--md-sys-typescale-label-medium)}
.li input[type=checkbox]{width:18px;height:18px;accent-color:var(--md-sys-color-primary)}
.mono{font-family:var(--md-ref-typeface-mono)}
.stepper{display:flex;gap:var(--ed-space-2);flex-wrap:wrap}
.stp{display:flex;align-items:center;gap:var(--ed-space-2);font:var(--md-sys-typescale-label-large);color:var(--md-sys-color-on-surface-variant)}
.stp b{width:24px;height:24px;border-radius:12px;display:flex;align-items:center;justify-content:center;font:var(--md-sys-typescale-label-small);background:var(--md-sys-color-surface-container-highest)}
.stp.on{color:var(--md-sys-color-on-surface)}
.stp.on b{background:var(--md-sys-color-primary);color:var(--md-sys-color-on-primary)}
.stp.done b{background:var(--st-success-bg);color:var(--st-success-fg)}
.stp + .stp::before{content:"";width:var(--ed-space-5);height:1px;background:var(--md-sys-color-outline-variant)}
.help{font:var(--md-sys-typescale-body-small);color:var(--md-sys-color-on-surface-variant)}
.radio{display:flex;gap:var(--ed-space-3);align-items:flex-start;padding:var(--ed-space-2) 0;cursor:pointer}
.radio input{width:18px;height:18px;margin-top:var(--ed-space-1);accent-color:var(--md-sys-color-primary)}
.radio span b{display:block;font:var(--md-sys-typescale-body-large)}
.setrow{display:flex;justify-content:space-between;align-items:center;gap:var(--ed-space-4);padding:var(--ed-space-3) 0;border-top:1px solid var(--md-sys-color-outline-variant)}
.setrow:first-child{border-top:none}
.setrow b{font:var(--md-sys-typescale-body-large)}
.match-edit{padding:0 0 var(--ed-space-3)}
.scrim{position:absolute;inset:0;background:color-mix(in srgb,var(--md-sys-color-scrim) 32%,transparent);display:flex;align-items:center;justify-content:center;padding:var(--ed-space-4);z-index:10}
.m3-dialog{max-height:100%;overflow:auto}
.sheet{position:absolute;top:0;bottom:0;inset-inline-end:0;width:min(440px,100%);background:var(--md-sys-color-surface-container-low);z-index:11;padding:var(--ed-space-5);display:flex;flex-direction:column;gap:var(--ed-space-3);overflow:auto;box-shadow:var(--md-sys-elevation-level1);border-start-start-radius:var(--md-sys-shape-corner-large);border-end-start-radius:var(--md-sys-shape-corner-large)}
.sheet h3{font:var(--md-sys-typescale-title-large)}
.kv{display:grid;grid-template-columns:auto 1fr;gap:var(--ed-space-2) var(--ed-space-3);font:var(--md-sys-typescale-body-medium)}
.kv dt{color:var(--md-sys-color-on-surface-variant)} .kv dd{margin:0}
.pick{display:flex;flex-direction:column;max-height:220px;overflow:auto;border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-sys-shape-corner-small)}
.pick label{display:flex;gap:var(--ed-space-3);align-items:center;padding:var(--ed-space-2) var(--ed-space-3);cursor:pointer;font:var(--md-sys-typescale-body-medium)}
.pick label:hover{background:color-mix(in srgb,var(--md-sys-color-on-surface) calc(var(--state-hover)*100%),transparent)}
.pick input{accent-color:var(--md-sys-color-primary)}
.m3-linear-progress{max-width:320px}

html,body{margin:0;background:var(--background);color:var(--md-sys-color-on-surface);font:var(--md-sys-typescale-body-large)}
*{box-sizing:border-box}
h3{margin:0;font:var(--md-sys-typescale-title-medium)}
p{margin:0}
.banner{display:flex;gap:var(--ed-space-3);align-items:center;flex-wrap:wrap}
.banner--warning{background:var(--st-warning-bg);color:var(--st-warning-fg);border:none}
.banner--error{background:var(--st-error-bg);color:var(--st-error-fg);border:none}
.banner--info{background:var(--st-info-bg);color:var(--st-info-fg);border:none}
/* The tone colours the heading; the sentence under it reads in the normal text colour. */
.banner p{color:var(--md-sys-color-on-surface)}
.center{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:var(--ed-space-4)}
.center .m3-card{max-width:440px;width:100%}
.m3-field select,.m3-field input{width:100%}
.diff-pos{color:var(--md-sys-color-success)}
.diff-neg{color:var(--md-sys-color-error)}
.m3-linear-progress{max-width:320px}
@media (max-width:839px){
  .grid3{grid-template-columns:1fr}
}
/* Compact window class (under 600px): navigation bar at the bottom and 16px margins */
@media (max-width:599px){
  .view{padding:var(--ed-space-4) var(--ed-space-4) var(--ed-space-7)}
}
/* Setup and Settings are read top to bottom, so their cards keep a readable line length */
.view--setup > .m3-card,.view--setup .setup-main > .m3-card,.view--settings > .m3-card{max-width:960px}
/* Setup: the steps, and beside them a narrow panel where the screen has room for it. */
.setup-layout{display:grid;grid-template-columns:minmax(0,960px) minmax(260px,320px);gap:var(--ed-space-4);align-items:start}
.setup-main{min-width:0}
/* Prices: the calculation on one product, under the markup. */
.price-eg{display:inline-block;margin:6px 0 0;padding:4px 10px;border-radius:8px;background:var(--md-sys-color-surface-container-high)}
.price-eg .eg-v{font-weight:600}
.page-intro{margin:0 0 var(--ed-space-3)}
/* Signed in: the page's intro as one line, until it's put away */
.intro-strip{display:flex;align-items:center;gap:var(--ed-space-2);margin:0 0 var(--ed-space-3);padding:2px var(--ed-space-2) 2px var(--ed-space-3);border:1px solid var(--md-sys-color-outline-variant);border-radius:12px;background:var(--md-sys-color-surface-container-low, var(--md-sys-color-surface))}
.intro-strip-open{flex:1;display:flex;align-items:center;gap:var(--ed-space-2);min-height:40px;padding:0;border:0;background:none;color:var(--md-sys-color-on-surface);font:var(--md-sys-typescale-body-medium);text-align:start;cursor:pointer}
.intro-strip-ico svg{width:18px;height:18px;fill:none;stroke:var(--md-sys-color-primary);stroke-width:2;display:block}
@media (max-width:600px){.intro-strip [data-act="introWatch"]{display:none}}
.page-intro-card{display:flex;gap:var(--ed-space-3);align-items:flex-start;margin:0 0 var(--ed-space-4);padding:var(--ed-space-4)}
.page-intro-card .intro-ico{flex:0 0 40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--md-sys-color-primary-container);color:var(--md-sys-color-on-primary-container)}
.page-intro-card .intro-ico svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.page-intro-card .intro-title{font:var(--md-sys-typescale-title-medium);margin:0 0 4px;outline:none}
.intro-points{margin:var(--ed-space-2) 0 0;padding-inline-start:1.2em;display:grid;gap:2px}
.intro-points li::marker{color:var(--md-sys-color-primary)}
.intro-actions{margin-top:var(--ed-space-3);gap:var(--ed-space-2)}
.intro-actions .m3-btn svg{width:18px;height:18px;margin-inline-end:6px;fill:currentColor;stroke:none}
.m3-dialog--clip{max-width:min(960px,calc(100vw - 32px))}
.clip-video{display:block;width:100%;aspect-ratio:16/9;border-radius:12px;background:#000;margin-top:var(--ed-space-2)}
.intro-btn{width:32px;height:32px;color:var(--md-sys-color-on-surface-variant)}
.intro-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
@media (max-width:600px){.page-intro-card{padding:var(--ed-space-3);font-size:13px;line-height:1.45}.page-intro-card .intro-ico{display:none}.page-intro-card .intro-title{font-size:15px}.intro-points{gap:0}}
.ret-calm{margin:var(--ed-space-2) 0 0;padding:8px 12px;border-radius:8px;background:var(--md-sys-color-surface-container);color:var(--md-sys-color-on-surface-variant)}
.price-eg .muted{font:inherit}
[dir="rtl"] .price-eg{direction:ltr}
.setup-aside{position:sticky;top:0;display:flex;flex-direction:column;gap:var(--ed-space-4);padding:var(--ed-space-4);font:var(--md-sys-typescale-body-medium)}
.aside-sec h3{margin:0 0 6px;font:var(--md-sys-typescale-title-small)}
.aside-sec p{margin:0}
.aside-line{display:flex;align-items:center;gap:8px}
.aside-line.is-ok>span{color:var(--st-success-fg);font-weight:700}
.aside-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.aside-steps li{display:flex;gap:10px;align-items:flex-start}
.aside-steps li>b{flex:none;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--md-sys-color-surface-container-high);font-size:12px}
.aside-steps li>span{display:flex;flex-direction:column}
.aside-links{display:flex;flex-direction:column;align-items:flex-start;margin-inline-start:-12px}
.aside-links .m3-btn{height:32px}
@media (max-width:1320px){.setup-layout{grid-template-columns:minmax(0,960px)}.setup-aside{display:none}}
/* An outlined field's label sits on its border, so it takes the colour of what's behind the field */
.m3-card{--m3-field-bg:var(--card)}
.m3-dialog{--m3-field-bg:var(--md-sys-color-surface-container-high)}

/* ---------- Shell: header, rail, bottom bar (Edara Extensions Design System, sections 3 and 4) ---------- */
.app-header{grid-area:header;display:flex;align-items:center;gap:var(--space-3);height:60px;padding:0 var(--space-4);background:var(--surface);border-bottom:1px solid var(--outline-variant);min-width:0}
.app-header > *{flex-shrink:0}
.header-lead{display:flex;align-items:center;gap:var(--space-4);min-width:0;flex-shrink:1}
.header-lead > *{min-width:0}
.header-lead .sub,.edara-lockup--login .sub{font-size:var(--typo-label-md);line-height:var(--typo-label-md-lh);font-weight:600;color:var(--primary)}
.edara-lockup{display:inline-flex;align-items:center;flex:none;color:var(--on-surface)}
.brand-logo{display:block;flex:none}
.header-divider{width:1px;height:20px;background:var(--outline-variant);opacity:.5;flex:none}
.header-spacer{flex:1 1 0;min-width:0}
.header-signal{flex-shrink:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
.org-slot{display:inline-flex;min-width:0}
.org-pill{position:relative;display:inline-flex;align-items:center;gap:var(--space-2);max-width:100%;min-height:28px;padding:3px 10px 3px 3px;padding-inline:3px 10px;border:none;border-radius:var(--shape-xl);background:var(--surface-container);color:var(--on-surface-variant);font:inherit;font-size:var(--typo-label-md);line-height:var(--typo-label-md-lh);font-weight:600}
.org-pill span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.org-pill i{display:grid;place-items:center;flex:none;width:22px;height:22px;border-radius:50%;background:var(--secondary-container);color:var(--on-secondary-container);font-style:normal;font-size:var(--typo-label-sm);line-height:1}
button.org-pill{cursor:pointer}
/* The pill is 28px of ink; this gives it the shared 44px touch target without moving its neighbours. */
button.org-pill::after{content:"";position:absolute;inset-block:calc((var(--min-touch-target) - 28px) / -2);inset-inline:0}
/* Embedded in the portal, the portal's bar supplies the brand, the organization and the account. Hide it whole, never piece by piece. */
html.ext-embedded .app-header,html.ext-embedded .edara-lockup{display:none}

.side-nav{grid-area:rail;display:flex;flex-direction:column;gap:2px;width:236px;padding:var(--space-3) var(--space-2);overflow-y:auto;background:var(--surface);border-inline-end:1px solid var(--outline-variant);transition:width var(--motion-base) var(--ease-nav)}
.side-nav .rail-foot{margin-top:auto;display:flex;flex-direction:column}
.side-nav-item{position:relative;display:flex;align-items:center;gap:var(--space-3);width:100%;min-height:var(--min-touch-target);padding:var(--space-3) var(--space-4);border:none;border-radius:var(--shape-xl);background:none;color:var(--on-surface-variant);font:inherit;font-size:var(--typo-label-lg);line-height:var(--typo-label-lg-lh);font-weight:500;text-align:start;cursor:pointer}
.side-nav-item svg,.bottom-nav-item svg{flex:none;width:20px;height:20px;fill:currentColor}
.side-nav-item > span:not(.m3-badge){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.side-nav-item.active,.bottom-nav-item.active{background:var(--secondary-container);color:var(--on-secondary-container)}
.side-nav-item .m3-badge{position:static;margin-inline-start:auto}
.rail-toggle{display:grid;place-items:center;flex:none;align-self:flex-start;width:40px;height:40px;margin:0 0 var(--space-1);margin-inline-start:var(--space-1);border:none;border-radius:50%;background:none;color:var(--on-surface-variant);cursor:pointer}
.rail-toggle svg{width:24px;height:24px;fill:currentColor}
.rail-toggle[aria-pressed="true"] svg{transform:scaleX(-1)}
[dir=rtl] .rail-toggle svg{transform:scaleX(-1)}
[dir=rtl] .rail-toggle[aria-pressed="true"] svg{transform:none}
/* Folded: icons only. The label stays in the page for assistive tech (clip-path, never display:none) and shows as the tooltip. */
html.rail-collapsed .side-nav{width:72px;padding:var(--space-3) var(--space-2)}
html.rail-collapsed .side-nav-item{justify-content:center;padding:var(--space-3) 0;gap:0;overflow:visible}
html.rail-collapsed .side-nav-item > span:not(.m3-badge){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
html.rail-collapsed .side-nav-item .m3-badge{position:absolute;top:2px;inset-inline-start:calc(50% + 4px);inset-inline-end:auto;margin:0;height:16px;min-width:16px;padding-inline:4px;font-size:10px;line-height:16px;box-shadow:0 0 0 2px var(--md-sys-color-surface)}
html.rail-collapsed .rail-toggle{align-self:center;margin-inline-start:0}

.bottom-nav{display:none}
.bottom-nav-item{position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;min-height:var(--min-touch-target);padding:var(--space-1) 2px;border:none;border-radius:var(--shape-xl);background:none;color:var(--on-surface-variant);font:inherit;font-size:var(--typo-label-sm);line-height:var(--typo-label-sm-lh);font-weight:500;cursor:pointer}
.bottom-nav-item > span:last-child{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;letter-spacing:0}
@media (max-width:400px){.bottom-nav-item{padding-inline:0}}
.bottom-nav-icon{position:relative;display:inline-flex}
.bottom-nav-icon .m3-badge{top:-6px;inset-inline-start:12px}
.badge-short{display:none}
html.rail-collapsed .side-nav .badge-full,.bottom-nav .badge-full{display:none}
html.rail-collapsed .side-nav .badge-short,.bottom-nav .badge-short{display:inline}
html.rail-collapsed .side-nav{overflow-x:hidden}
html.rail-collapsed .side-nav-item .m3-badge--wide{inset-inline-start:calc(50% - 4px)}

.sprite{position:absolute;width:0;height:0;overflow:hidden}
.icon-btn:hover{background:color-mix(in srgb,currentColor calc(var(--state-hover)*100%),transparent)}

/* Landing shape (section 9): the page title is worded exactly as the rail item that leads to it. */
.page-head{display:flex;align-items:center;gap:var(--space-3);min-height:40px}
.page-title{margin:0;font:var(--md-sys-typescale-title-large);letter-spacing:var(--md-sys-typescale-title-large-tracking);color:var(--on-surface)}
.readable{max-width:760px}
.steps{margin:var(--space-2) 0 0;padding-inline-start:var(--space-5);display:grid;gap:var(--space-1);font:var(--md-sys-typescale-body-medium);color:var(--on-surface-variant)}
.guide{margin:var(--space-2) 0 0;display:grid;gap:var(--space-1)}
.guide dt{font:var(--md-sys-typescale-title-small);color:var(--on-surface);margin-top:var(--space-2)}
.guide dd{margin:0;font:var(--md-sys-typescale-body-medium);color:var(--on-surface-variant)}

/* Loading: a skeleton in the content area, so the shell and the title stay put. */
.skeleton{display:grid;gap:var(--space-3)}
.skeleton span{display:block;height:72px;border-radius:var(--shape-md);background:var(--surface-container-high);animation:skeleton-pulse 1.2s var(--motion-ease) infinite alternate}
.skeleton span:first-child{height:96px}
@keyframes skeleton-pulse{from{opacity:.45}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.skeleton span{animation:none}}
.spinner{width:40px;height:40px;border-radius:50%;border:4px solid var(--surface-container-highest);border-top-color:var(--primary);animation:spin .9s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.spinner{animation-duration:2.4s}}

/* Snackbar: bottom-start of the content, so it flips under right-to-left with no second rule. */
.snack{position:absolute;bottom:var(--space-5);inset-inline-start:calc(236px + var(--space-5));z-index:20;max-width:calc(100% - 2 * var(--space-5))}
html.rail-collapsed .snack{inset-inline-start:calc(72px + var(--space-5))}
.center .snack{inset-inline-start:var(--space-5)}

/* Sign-in and the organization picker share one card (section 9). */
.login-card{display:flex;flex-direction:column;align-items:center;gap:var(--space-4);padding:var(--space-6) var(--space-5);text-align:center}
.edara-lockup--login{flex-direction:column;gap:var(--space-2)}
.login-card .m3-btn{align-self:stretch}
.demo-leave{height:36px;padding-inline:12px 16px;gap:6px}
.demo-leave svg{width:18px;height:18px;fill:currentColor}
.demo-actions{gap:var(--ed-space-2);flex-wrap:wrap}
.demo-short{display:none}
@media (max-width:600px){.demo-long{display:none}.demo-short{display:inline}}
@media (max-width:600px){.demo-leave{padding-inline:10px}.demo-leave span,.app-header .demo-leave{font-size:0}.demo-leave svg{margin:0}}
.login-card .login-hint{margin:calc(-1 * var(--space-2)) 0 0}
.login-card .m3-btn svg{width:18px;height:18px;fill:currentColor}
.login-error{margin:0;font:var(--md-sys-typescale-body-medium);color:var(--st-error-fg);background:var(--st-error-bg);border-radius:var(--shape-sm);padding:var(--space-2) var(--space-3)}
.login-error[hidden]{display:none}
.login-foot{margin:0;font:var(--md-sys-typescale-body-small);color:var(--on-surface-variant)}
.picker-search{display:flex;align-items:center;gap:var(--space-2);min-height:var(--min-touch-target);padding-inline:var(--space-3);border:1px solid var(--outline);border-radius:var(--shape-xl);background:var(--card)}
.picker-search:focus-within{border-color:var(--primary);outline:1px solid var(--primary)}
.picker-search svg{flex:none;width:20px;height:20px;fill:var(--on-surface-variant)}
.picker-search input{flex:1;min-width:0;border:none;outline:none;background:none;color:var(--on-surface);font:var(--md-sys-typescale-body-large)}
.picker-foot{display:flex;align-items:center;gap:var(--space-2);padding-top:var(--space-2);border-top:1px solid var(--outline-variant)}
.picker-foot .m3-btn svg{width:18px;height:18px;fill:currentColor}

/* Compact window class (under 600px): no rail, the bottom bar instead. The one breakpoint. */
@media (max-width:599px){
  .app{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;grid-template-areas:"header" "view" "nav"}
  .side-nav{display:none}
  .bottom-nav{grid-area:nav;display:flex;gap:2px;padding:var(--space-1) var(--space-1) max(var(--space-1),env(safe-area-inset-bottom));background:var(--surface-container);border-top:1px solid var(--outline-variant)}
  .app-header{height:56px;gap:var(--space-1);padding:0 var(--space-3)}
  .header-lead{gap:var(--space-2)}
  /* These move into the account menu on a phone, which shows a row for each hidden control. */
  .org-slot,.header-divider,#themeToggleBtn{display:none}
  .snack,html.rail-collapsed .snack{inset-inline-start:var(--space-4);bottom:calc(72px + var(--space-3))}
}
.section-title{margin:0;font:var(--md-sys-typescale-title-medium);letter-spacing:var(--md-sys-typescale-title-medium-tracking);color:var(--on-surface)}

/* ---------- Arabic and right to left ----------
   Layout uses logical properties, so it mirrors by itself; the shared tokens switch the font
   to Cairo and remove letter spacing under [dir=rtl]. These are the few things that need saying. */
[dir=rtl] .flip-rtl{transform:scaleX(-1)}             /* icons that point */
bdi.mono,.mono{unicode-bidi:isolate}                   /* codes keep their own order */
[dir=rtl] .m3-field input[dir=ltr]{text-align:end}     /* emails and codes typed left to right, aligned with the label */
[dir=rtl] .m3-linear-progress--indeterminate .m3-linear-progress__bar{animation-direction:reverse}
/* The language button names the other language, in that language's own font. */
.lang-btn{min-width:0;padding-inline:var(--space-3)}
.lang-btn[lang="ar"]{font-family:'Cairo','Roboto',sans-serif}
.lang-btn[lang="en"]{font-family:'Inter','Roboto',sans-serif}
@media (max-width:599px){ #headerLangToggle{display:none} }

/* ---- polish: search boxes, long titles, quiet badges, list footers ---- */
.search-field{display:flex;align-items:center;gap:var(--space-2);max-width:560px;min-height:var(--min-touch-target);padding-inline:var(--space-3);border:1px solid var(--outline);border-radius:var(--shape-xl);background:var(--card)}
.search-field:focus-within{border-color:var(--primary);outline:1px solid var(--primary)}
.search-field svg{flex:none;width:20px;height:20px;fill:var(--on-surface-variant)}
.search-field input{flex:1;min-width:0;border:none;outline:none;background:none;color:var(--on-surface);font:var(--md-sys-typescale-body-large)}
/* Amazon titles run to 200 characters; two lines say what the product is. */
.li .l1.clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
/* Products to match and FBA differences are work lists, not alarms. */
.m3-badge--quiet{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container)}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:var(--ed-space-3);margin-top:var(--ed-space-2)}
.center-row{justify-content:center}
.row.nowrap{flex-wrap:nowrap;flex-shrink:0}
.setval{font:var(--md-sys-typescale-body-large);text-align:end}

/* ---- the order drawer opens over a page that stays readable ---- */
.scrim.scrim--clear{background:color-mix(in srgb,var(--md-sys-color-scrim) 6%,transparent)}
.with-copy{display:flex;align-items:center;gap:var(--ed-space-1)}
.icon-btn--small{width:32px;height:32px;margin:0}
.icon-btn--small svg{width:18px;height:18px;fill:currentColor}
.sheet a.m3-btn svg{width:18px;height:18px;fill:currentColor;margin-inline-end:6px}
.li .l1.clamp1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Lines stay readable on a wide screen: content stops at 1280px. */
:where(.view > *){max-width:1280px}

/* A standing reminder takes one line, so the page's own content starts higher. */
.banner--compact{padding:var(--ed-space-3) var(--ed-space-4)}
.banner--compact > div{display:block}
.banner--compact h3,.banner--compact p{display:inline;font:var(--md-sys-typescale-body-large)}
.banner--compact h3{font-weight:600}
.banner--compact h3::after{content:". "}
.li{min-height:64px}

/* Home's cards open the page their number comes from. */
.card-link{cursor:pointer;transition:border-color .15s,box-shadow .15s}
.card-link:hover{border-color:var(--md-sys-color-outline);box-shadow:var(--md-sys-elevation-level1)}
.card-link:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.li .l1.clamp3{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

/* A code is a value, set apart from the words that label it. */
.l2 bdi.mono,.kv bdi.mono,.line-kv bdi.mono,.with-copy bdi.mono{padding:1px 6px;border-radius:6px;background:var(--md-sys-color-surface-container-high);box-shadow:inset 0 0 0 1px var(--md-sys-color-outline-variant);color:var(--md-sys-color-on-surface)}
.chips{display:flex;flex-wrap:wrap;gap:var(--ed-space-2)}
.m3-chip .count{margin-inline-start:6px;font-variant-numeric:tabular-nums;opacity:.75}
.day-head{margin:var(--ed-space-4) 0 var(--ed-space-2);font:var(--md-sys-typescale-title-small);color:var(--md-sys-color-on-surface-variant)}
.m3-btn svg{width:18px;height:18px;fill:currentColor;margin-inline-end:6px}

.m3-status--info{background:var(--st-info-bg);color:var(--st-info-fg)}
.day-head{display:flex;align-items:baseline;gap:var(--ed-space-3);flex-wrap:wrap}
.day-sum{font:var(--md-sys-typescale-body-medium);color:var(--md-sys-color-on-surface-variant)}
.new-orders{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:var(--ed-space-3);margin-top:var(--ed-space-3);padding:var(--ed-space-2) var(--ed-space-4);border-radius:var(--md-sys-shape-corner-medium);background:var(--st-info-bg);color:var(--st-info-fg);font:var(--md-sys-typescale-body-large)}
.day-filter{max-width:220px}

/* The drawer says what happens next first, in the normal text colour; the preview reminder is small. */
.next{padding:var(--ed-space-3) var(--ed-space-4);border-radius:var(--md-sys-shape-corner-medium);background:var(--md-sys-color-surface-container)}
.next h4{margin:0 0 4px;font:var(--md-sys-typescale-title-small)}
.next p{margin:0;font:var(--md-sys-typescale-body-medium);color:var(--md-sys-color-on-surface)}
.small{font:var(--md-sys-typescale-body-small)}
.plain-link{color:inherit;text-decoration:none}
.plain-link:hover{text-decoration:underline;color:var(--primary)}

/* Orders toolbar: one row of search, date and download, chips below; it stays put while scrolling. */
.toolbar{position:sticky;top:calc(-1 * var(--ed-space-5));z-index:3;display:flex;flex-wrap:wrap;align-items:center;gap:var(--ed-space-3);margin-top:var(--ed-space-3);padding:var(--ed-space-3) 0;background:var(--background)}
.toolbar .search-field{flex:1 1 360px;margin:0}
.toolbar .chips{flex-basis:100%}
.select-inline{display:inline-flex;align-items:center;gap:var(--ed-space-2);min-height:var(--min-touch-target);padding-inline:var(--ed-space-3) var(--ed-space-2);border:1px solid var(--outline);border-radius:var(--shape-xl);background:var(--card);font:var(--md-sys-typescale-body-large);color:var(--on-surface-variant)}
.select-inline select{border:none;background:none;font:inherit;color:var(--on-surface);padding:6px 4px;cursor:pointer}
.select-inline:focus-within{border-color:var(--primary);outline:1px solid var(--primary)}
.sheet:focus{outline:none}
.toolbar + .new-orders{margin-top:0}

.line{align-items:start}
.line-kv{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px var(--ed-space-3);margin:0;font:var(--md-sys-typescale-body-medium)}
.line-kv dt{color:var(--md-sys-color-on-surface-variant)}
.line-kv dd{margin:0;color:var(--md-sys-color-on-surface)}
.line-kv dd.clamp3{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font:var(--md-sys-typescale-body-large)}
.line-kv .m3-btn{min-height:32px;padding-inline:8px}
.clamp2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

.check{display:flex;gap:var(--ed-space-3);align-items:flex-start;max-width:640px;cursor:pointer}
.check input{margin-top:4px;width:18px;height:18px;accent-color:var(--primary)}
.check .help{display:block;font:var(--md-sys-typescale-body-small);color:var(--md-sys-color-on-surface-variant)}

abbr[title]{text-decoration:underline dotted;text-underline-offset:3px;cursor:help}
.link-btn{border:none;background:none;padding:0;font:inherit;color:var(--primary);cursor:pointer;text-decoration:underline;text-underline-offset:3px}

/* An English title in the Arabic screens runs left to right, so it's cut at its end, not its start
   ("…ired Gaming Mouse"). Right-aligned still, like the Arabic around it. */
.li .l1,.line-kv dd.clamp3{unicode-bidi:plaintext}
html[dir="rtl"] .li .l1,html[dir="rtl"] .line-kv dd.clamp3{text-align:right}

/* Before you turn orders on: open checks get a row, done ones share one line. */
.ready{display:flex;flex-direction:column;gap:var(--ed-space-1);padding-block:var(--ed-space-3)}
.ready .row h3{margin:0}
.ready-line{display:grid;grid-template-columns:24px minmax(0,1fr) auto;gap:var(--ed-space-3);align-items:center;padding:6px 0;border-top:1px solid var(--md-sys-color-outline-variant)}
.ready-done{display:flex;flex-wrap:wrap;gap:var(--ed-space-2) var(--ed-space-5);align-items:center;margin:0;padding-top:8px;border-top:1px solid var(--md-sys-color-outline-variant)}
.ready-done > span{display:inline-flex;gap:6px;align-items:center;white-space:nowrap}
.ready-dot{width:22px;height:22px;border-radius:50%;display:inline-grid;place-items:center;font:600 12px/1 inherit;flex:none}
.ready-done .ready-dot{margin-inline-end:-2px}
.ready-dot--ok{background:var(--st-success-bg);color:var(--st-success-fg)}
.ready-dot--block{background:var(--st-error-bg);color:var(--st-error-fg)}
.ready-dot--decide{background:var(--st-warning-bg);color:var(--st-warning-fg)}
.ready-dot--info{background:var(--st-info-bg);color:var(--st-info-fg)}
.checked-row{display:flex;align-items:center;gap:var(--ed-space-2);flex-wrap:wrap;margin-top:var(--ed-space-2);font:var(--md-sys-typescale-body-medium)}

/* Operations (staff) */
.ops-tile--good{border-color:var(--st-success-fg)}
.ops-tile--warn{border-color:var(--st-warning-fg)}
.ops-tile--bad{border-color:var(--st-error-fg);background:var(--st-error-bg)}
.ops-fail{color:var(--st-error-fg)}
.ready-done{color:var(--md-sys-color-on-surface-variant)}
.sheet > *{flex-shrink:0}

/* Settings in named sections; disconnecting set apart. */
.settings-head{margin-top:var(--ed-space-5)}
.view--settings > .settings-head:first-of-type{margin-top:0}
.end-row{justify-content:flex-end}
.row.align-end{align-items:flex-start}
.row.align-end > .m3-btn{margin-top:14px}
.danger-card{border-color:var(--st-error-fg)}
.danger-btn{color:var(--st-error-fg);border-color:var(--st-error-fg)}
.view--ops .section-title{margin-top:var(--ed-space-5)}

/* A removal's items: the ones in this shipment stand out. */
.line--here{background:var(--md-sys-color-surface-container-high)}

/* A matched or linked product: Amazon and Edara facing each other, how they matched between. */
.pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(96px,160px) minmax(0,1fr);gap:var(--ed-space-4);align-items:center}
.side{min-width:0}
.side-label{display:block;font:var(--md-sys-typescale-label-small);letter-spacing:.04em;text-transform:uppercase;color:var(--md-sys-color-on-surface-variant);margin-bottom:2px}
.pair-link{display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center;color:var(--md-sys-color-on-surface-variant)}
.pair-arrow{font-size:22px;line-height:1;color:var(--md-sys-color-primary)}
.li--pair{padding-block:var(--ed-space-3)}
@media (max-width:900px){
  .pair{grid-template-columns:minmax(0,1fr);gap:var(--ed-space-2)}
  .pair-link{flex-direction:row;justify-content:flex-start;text-align:start}
  .pair-arrow{transform:rotate(90deg)}
}

.pair .side{padding:var(--ed-space-2) var(--ed-space-3);border-radius:12px;background:var(--md-sys-color-surface-container-low)}

/* Every paired row has the same columns, so the arrows and the Edara side line up down the list. */
.li--pair{grid-template-columns:auto minmax(0,1fr) 200px}
.li--pair > .row{justify-content:flex-end;flex-wrap:nowrap}
@media (min-width:901px){.pair{grid-template-columns:minmax(0,1fr) 150px minmax(0,1fr)}}
@media (max-width:900px){.li--pair{grid-template-columns:auto minmax(0,1fr)}.li--pair > .row{grid-column:2;justify-content:flex-start}}

/* Compact paired rows: 2,800 of them should scan quickly. */
.li--pair{padding-block:var(--ed-space-2);min-height:0}
.pair{gap:var(--ed-space-3)}
.pair .side{padding:6px var(--ed-space-3)}
.pair .side .l1{font:var(--md-sys-typescale-body-medium);font-weight:500}
.side-label{margin-bottom:0}
.pair .side .l2 + .mt-2{margin-top:4px}

/* Who ships it, as a coloured word beside "On Amazon"; what happens to its stock, under the Edara item. */
.ship{font-weight:600}
.ship--fba{color:var(--st-info-fg)}
.ship--self{color:var(--st-success-fg)}
.stock-note{font:var(--md-sys-typescale-body-small);color:var(--md-sys-color-on-surface-variant)}

/* Which build this is, under Help; and the offer to reload once a newer one is deployed. */
.app-version{margin:var(--ed-space-2) var(--ed-space-4) 0;font:var(--md-sys-typescale-label-small);color:var(--md-sys-color-on-surface-variant)}
.update-bar{position:fixed;inset-inline:0;bottom:var(--ed-space-4);margin-inline:auto;width:max-content;max-width:calc(100% - 32px);z-index:60;display:flex;align-items:center;gap:var(--ed-space-4);padding:var(--ed-space-2) var(--ed-space-2) var(--ed-space-2) var(--ed-space-4);border-radius:16px;background:var(--md-sys-color-inverse-surface,#2f3033);color:var(--md-sys-color-inverse-on-surface,#f1f0f4);box-shadow:0 4px 16px rgba(0,0,0,.2)}

/* A link that leaves the extension: primary colour, underlined, with the open-in-new icon. */
.ext-link{display:inline-flex;align-items:center;gap:2px;color:var(--primary);text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.ext-link svg{width:14px;height:14px;fill:currentColor}
.ext-link:hover{text-decoration-thickness:2px}

/* Link dialog: the Amazon product on top, then the search, then Edara items as a table to choose from. */
.match-about{padding:var(--ed-space-2) var(--ed-space-3);border-radius:12px;background:var(--md-sys-color-surface-container-low)}
.pick-head,.pick label{display:grid;grid-template-columns:20px minmax(0,1fr) auto auto;gap:var(--ed-space-3);align-items:center}
.pick-head{padding:var(--ed-space-1) var(--ed-space-3);font:var(--md-sys-typescale-label-small);text-transform:uppercase;letter-spacing:.04em;color:var(--md-sys-color-on-surface-variant)}
.pick label + label{border-top:1px solid var(--md-sys-color-outline-variant)}
.pick label.picked{background:color-mix(in srgb,var(--md-sys-color-primary) 10%,transparent)}
.pick-code{font-size:13px;color:var(--md-sys-color-on-surface-variant)}

/* The less common, undoing action beside the everyday one. */
.btn-quiet{color:var(--md-sys-color-on-surface-variant)}

/* The search and the list's download share a row. */
.search-row{align-items:center}
.search-row .search-field{flex:1 1 360px;max-width:640px;margin-top:0}

/* Operations: which build each part runs; a seller's switches as chips. */
.ops-versions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ed-space-2);margin:var(--ed-space-2) 0 var(--ed-space-3)}
.ops-chips{gap:var(--ed-space-2);margin:var(--ed-space-1) 0}

/* Help: contents chips, setup ticks, status chips beside their meaning. */
.help-toc{gap:var(--ed-space-2);margin-bottom:var(--ed-space-3)}
.help-card{scroll-margin-top:var(--ed-space-4)}
.steps--done{list-style:none;padding-inline-start:0}
.steps--done .tick{display:inline-block;width:1.4em;color:var(--st-success-fg);font-weight:700}
.guide dt .link-btn{font:inherit}
.guide--chips{grid-template-columns:max-content 1fr;align-items:center;column-gap:var(--ed-space-3)}
.guide--chips dt{margin-top:0}
@media (max-width:600px){.guide--chips{grid-template-columns:1fr}}

.d-block{display:block}

.ops-head{align-items:center;gap:var(--ed-space-3)}
.ops-head p{margin:0}

/* Order defaults: what a missing choice holds up, and the tax as a row like the others. */
.setrow-warn{margin-top:4px;font:var(--md-sys-typescale-body-small);color:var(--st-warning-fg)}
.setrow--top{align-items:flex-start}
.setrow-select{min-width:260px;max-width:360px;min-height:44px;padding:0 var(--ed-space-3);border:1px solid var(--md-sys-color-outline);border-radius:var(--md-sys-shape-corner-small);background:var(--md-sys-color-surface);color:var(--md-sys-color-on-surface);font:var(--md-sys-typescale-body-large)}
@media (max-width:700px){.setrow-select{min-width:0;width:100%}}

/* Operations: API calls, a card per service, then one line per call. */
.calls-sum{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:var(--ed-space-3);margin-top:var(--ed-space-2)}
.calls-sum-card{display:flex;flex-direction:column;gap:2px;padding:var(--ed-space-3)}
.warn-text{color:var(--st-warning-fg)}
.calls .li{grid-template-columns:96px minmax(0,1fr) auto;min-height:56px}
.calls .li > .m3-status{justify-self:start}

/* A setup field the extension filled in from a name. */
.suggest{color:var(--st-info-fg);font-weight:500}

/* The matching rule's result: a sentence, a bar, and endings to try. */
.match-result{padding:var(--ed-space-3);border-radius:12px;background:var(--md-sys-color-surface-container-low)}
.match-result.is-busy{opacity:.6}
.match-bar{display:flex;height:8px;margin-top:var(--ed-space-2);border-radius:4px;overflow:hidden;background:var(--md-sys-color-surface-container-highest)}
.match-bar .ok{background:var(--st-success-fg)}
.match-bar .several{background:var(--st-warning-fg)}

/* Matching, compact: the three fields as cards in a row, then the endings beside the result. */
.field-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--ed-space-2)}
.field-card{display:flex;gap:var(--ed-space-2);align-items:flex-start;padding:var(--ed-space-2) var(--ed-space-3);border:1px solid var(--md-sys-color-outline-variant);border-radius:12px;cursor:pointer}
.field-card.is-on{border-color:var(--md-sys-color-primary);background:color-mix(in srgb,var(--md-sys-color-primary) 8%,transparent)}
.field-card input{margin-top:3px;accent-color:var(--md-sys-color-primary)}
.field-card b{display:block}
.field-card .help{display:block;margin-top:2px}
.match-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:var(--ed-space-4);align-items:start}
.match-grid > .m3-field{margin-top:0}
.load-note{display:flex;align-items:center;gap:var(--ed-space-2);flex-wrap:wrap;padding:var(--ed-space-2) var(--ed-space-3);border-radius:12px;background:var(--st-info-bg);color:var(--st-info-fg);font:var(--md-sys-typescale-body-medium)}
.load-note .m3-btn{margin-inline-start:auto}
.spinner{width:16px;height:16px;flex:none;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .9s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.spinner{animation:none}}
.setup-done{flex-wrap:wrap;column-gap:var(--ed-space-5)}
.setup-done-item{display:inline-flex;align-items:center;gap:var(--ed-space-2)}
.setup-done-item > span[aria-hidden]{color:var(--md-sys-color-success);font-weight:700}
@media (max-width:900px){.field-cards,.match-grid{grid-template-columns:minmax(0,1fr)}}

/* Matching: each field's count, and the rule as a flow on a real product. */
.field-count{display:block;margin-top:4px;font:var(--md-sys-typescale-label-medium);color:var(--st-success-fg)}
.field-count.is-zero{color:var(--md-sys-color-on-surface-variant)}
.flow{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ed-space-2);margin-top:var(--ed-space-1)}
.flow-box{display:flex;flex-direction:column;gap:2px;padding:6px var(--ed-space-3);border-radius:10px;background:var(--md-sys-color-surface);border:1px solid var(--md-sys-color-outline-variant);max-width:260px}
.flow-box--ok{border-color:var(--st-success-fg)}
.flow-cap{font:var(--md-sys-typescale-label-small);text-transform:uppercase;letter-spacing:.04em;color:var(--md-sys-color-on-surface-variant)}
.flow-arrow{display:flex;flex-direction:column;align-items:center;font-size:18px;color:var(--md-sys-color-primary);line-height:1}
.flow-arrow span{font:var(--md-sys-typescale-label-small);color:var(--md-sys-color-on-surface-variant);margin-bottom:2px}

/* Only the tick is green in the done line; the words stay quiet. */
.setup-done .setup-done-item{color:var(--md-sys-color-on-surface-variant);font-weight:400}

/* A step already reached opens again on click. */
.stp--go{border:none;background:none;padding:4px 6px;margin:-4px -6px;border-radius:8px;cursor:pointer;font:inherit;color:inherit}
.stp--go:hover{background:color-mix(in srgb,var(--md-sys-color-on-surface) 8%,transparent);color:var(--md-sys-color-primary)}
.stp--go:hover b{outline:2px solid var(--md-sys-color-primary)}

/* Step 2 when connected: the connection itself, as a green card. */
.conn-card{display:flex;gap:var(--ed-space-3);align-items:flex-start;padding:var(--ed-space-3);border-radius:12px;background:var(--st-success-bg)}
.conn-tick{width:28px;height:28px;flex:none;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--st-success-fg);color:var(--md-sys-color-surface);font-weight:700}
.stp.on.done b{background:var(--md-sys-color-primary);color:var(--md-sys-color-on-primary)}

/* Connection checks: one line each (name, what was found, time); a failure stands out in red.
   The full detail is on hover, and wraps for a failed check, where it matters. */
.diag-table{border:1px solid var(--md-sys-color-outline-variant);border-radius:12px;overflow:hidden}
.diag-row{display:grid;grid-template-columns:20px 300px minmax(0,1fr) auto;gap:var(--ed-space-3);align-items:center;padding:6px var(--ed-space-3);font:var(--md-sys-typescale-body-medium)}
.diag-row + .diag-row{border-top:1px solid var(--md-sys-color-outline-variant)}
.diag-mark{color:var(--st-success-fg);font-weight:700}
.diag-detail{color:var(--md-sys-color-on-surface-variant);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.diag-ms{font:var(--md-sys-typescale-label-small);color:var(--md-sys-color-on-surface-variant)}
.diag-row.is-bad{background:var(--st-error-bg)}
.diag-row.is-bad .diag-mark{color:var(--st-error-fg)}
.diag-row.is-bad .diag-detail{white-space:normal;color:var(--md-sys-color-on-surface)}
@media (max-width:700px){.diag-row{grid-template-columns:20px minmax(0,1fr) auto}.diag-detail{grid-column:2 / -1;white-space:normal}}

.diag-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:700px){.diag-name{white-space:normal}}

/* Warehouses: the two side by side, each saying whose stock and what happens to it. */
.wh-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--ed-space-3)}
.wh-card{display:flex;flex-direction:column;padding:var(--ed-space-3);border:1px solid var(--md-sys-color-outline-variant);border-radius:12px}
.wh-who{font:var(--md-sys-typescale-label-small);text-transform:uppercase;letter-spacing:.04em;margin-bottom:2px}
.wh-does{margin:var(--ed-space-2) 0 0;padding-inline-start:var(--ed-space-4);font:var(--md-sys-typescale-body-small);color:var(--md-sys-color-on-surface-variant)}
/* "Suggested from its name": a quiet note under the choice it is about, not a link look-alike. */
.wh-card .suggest{margin-top:4px;font:var(--md-sys-typescale-body-small);color:var(--md-sys-color-on-surface-variant);font-weight:400}
.wh-card .suggest::before{content:"✦ ";color:var(--st-info-fg)}
@media (max-width:800px){.wh-pair{grid-template-columns:minmax(0,1fr)}}

/* Matching, compact: endings to try under the field, dense chips; examples one line each, scrolling. */
.endings-try{margin-top:var(--ed-space-2)}
.endings-try .row{gap:6px}
.m3-chip--dense{min-height:28px;padding:0 10px;font:var(--md-sys-typescale-label-medium)}
.ex-table{max-height:260px;overflow:auto;border:1px solid var(--md-sys-color-outline-variant);border-radius:12px}
.ex-row{display:grid;grid-template-columns:16px minmax(0,1fr) minmax(0,1fr);gap:var(--ed-space-2);align-items:center;padding:4px var(--ed-space-3);font:var(--md-sys-typescale-body-small)}
.ex-row + .ex-row{border-top:1px solid var(--md-sys-color-outline-variant)}
.ex-mark{color:var(--md-sys-color-on-surface-variant)}
.ex-row.is-ok .ex-mark{color:var(--st-success-fg);font-weight:700}
.ex-sku,.ex-hit{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.match-left{min-width:0}
.m3-dialog .ex-table{max-height:min(60vh,520px)}

.ex-row .muted,.ex-row .mono{font:inherit}
.ex-row .mono{font-family:var(--md-sys-typescale-code-font, ui-monospace, monospace)}

/* The examples' column titles, kept in view while the rows scroll. */
.ex-head{position:sticky;top:0;z-index:1;background:var(--md-sys-color-surface-container-high);font:var(--md-sys-typescale-label-small);text-transform:uppercase;letter-spacing:.04em;color:var(--md-sys-color-on-surface-variant)}

/* Matching recalculates visibly: a working line, then the change, with a brief highlight. */
.busy-line,.delta-line{display:flex;align-items:center;gap:var(--ed-space-2);margin-bottom:var(--ed-space-2);font:var(--md-sys-typescale-body-medium);color:var(--md-sys-color-primary)}
.match-result.is-busy{opacity:1}
.match-result.is-busy > :not(.busy-line){opacity:.45;transition:opacity .2s}
.match-result.is-new{animation:flash 1.2s ease-out}
@keyframes flash{from{box-shadow:0 0 0 3px var(--md-sys-color-primary)}to{box-shadow:0 0 0 0 transparent}}
.match-bar span{transition:width .5s ease}
@media (prefers-reduced-motion:reduce){.match-result.is-new{animation:none}.match-bar span{transition:none}}

/* The worked example stays on one line: smaller boxes, short labels over the arrows. */
.flow{flex-wrap:nowrap;gap:6px;overflow-x:auto}
.flow-box{padding:4px 8px;max-width:200px;min-width:0}
.flow-box bdi{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.flow-arrow{flex:none}
.flow-arrow span{white-space:nowrap;font-size:11px}
@media (max-width:700px){.flow{flex-wrap:wrap}}

/* The example as a row of tags: captions are in the line above, so boxes hold only the codes. */
.flow-cap{display:none}
.flow-box{flex:none;max-width:none;padding:4px 10px}
.flow-box--ok{flex:0 1 auto;min-width:0}
.flow-box bdi{max-width:240px}
.flow{overflow:hidden}
.flow-box--ok{flex-direction:row;align-items:center;gap:6px;color:var(--st-success-fg)}
.flow-box--ok::before{content:"✓";font-weight:700}

/* Order defaults: three cards; a tag says when each is needed. */
.wh-three{grid-template-columns:repeat(3,minmax(0,1fr))}
.wh-three .setrow-select{min-width:0;width:100%;max-width:none}
.need{align-self:flex-start;margin-bottom:4px;padding:2px 8px;border-radius:999px;font:var(--md-sys-typescale-label-small)}
.need--required{background:var(--st-warning-bg);color:var(--st-warning-fg)}
.need--orders,.need--fba{background:var(--md-sys-color-surface-container-high);color:var(--md-sys-color-on-surface-variant)}
/* Warehouses: how the seller sells first, then a card per warehouse it needs, who ships beside "needed". */
.wh-top{display:flex;align-items:center;justify-content:space-between;gap:var(--ed-space-2);flex-wrap:wrap}
.wh-top .need{margin-bottom:0}
.sell-ways{margin-inline:0;padding:0;border:0}
.sell-ways legend{padding:0;margin-bottom:var(--ed-space-2);font:var(--md-sys-typescale-title-small)}
.field-card .suggest{display:inline-block;margin-top:6px;padding:1px 8px;border-radius:999px;background:var(--st-info-bg);font:var(--md-sys-typescale-label-small)}
@media (max-width:700px){.sell-ways .field-cards,.setrow .field-cards{grid-template-columns:minmax(0,1fr)}}
.mini-search{width:100%;min-height:36px;padding:0 var(--ed-space-3);border:1px solid var(--md-sys-color-outline-variant);border-radius:999px;background:var(--md-sys-color-surface);color:var(--md-sys-color-on-surface);font:var(--md-sys-typescale-body-medium)}
@media (max-width:900px){.wh-three{grid-template-columns:minmax(0,1fr)}}
/* The three choices line up across the cards, whatever the length of each explanation. */
/* Order defaults: the three cards share their rows (label, title, help, search or first label,
   list, extras), so titles, searches and lists line up across them whatever each one's text. */
.wh-three{row-gap:0}
.wh-three > .wh-card{display:grid;grid-row:span 6;grid-template-rows:subgrid;row-gap:14px;align-content:start}
.wh-three > .wh-card > :nth-child(-n+3){margin-bottom:-8px}
.wh-three > .wh-card > *{margin:0;min-width:0}
.wh-three .need{justify-self:start;align-self:start}
.wh-three > .wh-card > :nth-child(4){align-self:end;margin-top:var(--ed-space-2)}
.wh-three .wh-extra{display:flex;flex-direction:column;gap:6px;align-self:start}
.wh-three .wh-extra .setrow-select{margin:0}
/* The other parties card: two framed lists, level with the searches and the lists beside them. */
.wh-three .m3-field{margin:0;padding-top:0}
.wh-three .m3-field label{top:0;transform:translateY(-50%);z-index:1;line-height:1.2}
.wh-three .m3-field select{width:100%;height:44px;min-height:44px}
.wh-three > .wh-card > :nth-child(5){align-self:start}

/* Setup finished: a check that pops in, then what was set up and what comes next. */
.celebrate{display:flex;justify-content:center;margin-bottom:var(--ed-space-2)}
.celebrate-check{width:64px;height:64px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:34px;font-weight:700;background:var(--st-success-fg);color:var(--md-sys-color-surface);box-shadow:0 0 0 10px var(--st-success-bg);animation:pop .5s cubic-bezier(.2,1.6,.4,1)}
@keyframes pop{from{transform:scale(.3);opacity:0}to{transform:scale(1);opacity:1}}
@media (prefers-reduced-motion:reduce){.celebrate-check{animation:none}}
.text-center{text-align:center}
.done-list{list-style:none;margin:0;padding:0;border:1px solid var(--md-sys-color-outline-variant);border-radius:12px}
.done-list li{display:grid;grid-template-columns:20px 130px minmax(0,1fr);gap:var(--ed-space-2);align-items:baseline;padding:6px var(--ed-space-3);font:var(--md-sys-typescale-body-medium)}
.done-list li + li{border-top:1px solid var(--md-sys-color-outline-variant)}
.done-mark{color:var(--st-success-fg);font-weight:700}
.done-list li.is-open .done-mark{color:var(--md-sys-color-on-surface-variant)}
.done-label{color:var(--md-sys-color-on-surface-variant)}

/* Disconnected: the same summary card, in neutral colours. */
.celebrate-check.is-bye{background:var(--md-sys-color-on-surface-variant);box-shadow:0 0 0 10px var(--md-sys-color-surface-container-high);font-size:28px}
.bye-list{list-style:none;margin:0;padding:0;display:grid;gap:var(--ed-space-2)}
.bye-list li{display:grid;grid-template-columns:20px minmax(0,1fr);gap:var(--ed-space-2);font:var(--md-sys-typescale-body-medium)}
.done-mark.is-x{color:var(--st-error-fg)}
/* The loading note: spinner, text and button on one line; the text takes the room. */
.load-note{flex-wrap:nowrap;align-items:flex-start}
.load-note > span:not(.spinner){flex:1 1 auto;min-width:0}
.load-note .spinner{margin-top:3px}
.load-note .m3-btn{flex:none;margin-top:-6px}

/* A dialog taller than the window scrolls as a whole; its parts keep their own height instead
   of being squeezed (which left gaps and overlapping text in the setup summary). */
.m3-dialog > *{flex-shrink:0}
.m3-dialog .celebrate{margin-bottom:0}
.m3-dialog .celebrate + .m3-dialog__headline{margin-top:calc(-1 * var(--ed-space-2))}
.done-list li{padding:4px var(--ed-space-3)}
.m3-dialog h4.mt-4{margin-top:var(--ed-space-3)}

/* Back from Amazon: what happened, above the step, until dismissed. */
.back-note{display:flex;gap:var(--ed-space-3);align-items:flex-start;margin:var(--ed-space-2) 0 var(--ed-space-3);padding:var(--ed-space-3);border-radius:12px}
.back-note > div{flex:1;min-width:0}
.back-note p{margin-top:2px}
.back-note.is-ok{background:var(--st-success-bg)}
.back-note.is-bad{background:var(--st-error-bg)}
.back-note.is-bad .conn-tick{background:var(--st-error-fg)}

/* Disconnect: two choices as cards; the delete card and its box in red. */
.choice-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--ed-space-2)}
.choice-card{display:flex;gap:var(--ed-space-2);align-items:flex-start;padding:var(--ed-space-2) var(--ed-space-3);border:1px solid var(--md-sys-color-outline-variant);border-radius:12px;cursor:pointer}
.choice-card b{display:block}
.choice-card input{margin-top:3px}
.choice-card.is-on{border-color:var(--md-sys-color-primary);background:color-mix(in srgb,var(--md-sys-color-primary) 8%,transparent)}
.choice-card.is-danger.is-on{border-color:var(--st-error-fg);background:var(--st-error-bg)}
.del-box{padding:var(--ed-space-3);border-radius:12px;border:1px solid var(--st-error-fg)}
.del-box .steps{margin-top:var(--ed-space-1)}
.danger-fill{background:var(--st-error-fg);color:#fff}
.danger-fill:disabled{opacity:.4}
@media (max-width:600px){.choice-pair{grid-template-columns:minmax(0,1fr)}}

/* Summary dialogs: room between the sentence and the list; "What's next" closer to its steps. */
.m3-dialog .done-list{margin-top:var(--ed-space-3)}
.m3-dialog .done-list + h4{margin-top:var(--ed-space-3);margin-bottom:0}
.m3-dialog h4 + .steps{margin-top:var(--ed-space-1)}

.again-ok{display:flex;gap:var(--ed-space-2);font:var(--md-sys-typescale-body-medium);color:var(--st-success-fg)}
.again-ok span{font-weight:700}

/* What each warehouse is used for, as labelled lines. */
.wh-uses{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px var(--ed-space-2);margin:var(--ed-space-2) 0 0;font:var(--md-sys-typescale-body-small)}
.wh-uses dt{font-weight:600;color:var(--md-sys-color-on-surface)}
.wh-uses dd{margin:0;color:var(--md-sys-color-on-surface-variant)}
/* The note above a setup step is as wide as the step. */
.view--setup > .back-note,.view--setup .setup-main > .back-note{max-width:960px}

.wh-uses dt{white-space:nowrap}

.info-dot{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;border-radius:50%;font-size:10px;font-weight:700;background:var(--md-sys-color-surface-container-highest);color:var(--md-sys-color-on-surface-variant);cursor:help;vertical-align:1px}

/* Link history: a timeline, newest first. */
.pair-who{display:block;margin-top:2px}
.hist{list-style:none;margin:0;padding:0;border-inline-start:2px solid var(--md-sys-color-outline-variant);display:grid;gap:var(--ed-space-3)}
.hist li{position:relative;display:flex;gap:var(--ed-space-2);padding-inline-start:var(--ed-space-3)}
.hist-dot{position:absolute;inset-inline-start:-7px;top:5px;width:12px;height:12px;border-radius:50%;background:var(--st-warning-fg)}
.hist-dot--ok{background:var(--st-success-fg)}
.hist-dot--muted{background:var(--md-sys-color-outline)}

/* Settings: a bar of the sections, kept in view; a jump lands the heading just under it. */
.set-nav{position:sticky;top:calc(-1 * var(--ed-space-5));z-index:2;display:flex;flex-wrap:wrap;gap:var(--ed-space-2);margin:0 calc(-1 * var(--ed-space-5)) var(--ed-space-3);padding:var(--ed-space-3) var(--ed-space-5);background:var(--md-sys-color-surface);border-bottom:1px solid var(--md-sys-color-outline-variant)}
.set-nav .m3-chip[aria-current]{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container);border-color:transparent}
.view--settings .settings-head{scroll-margin-top:72px}
@media (max-width:700px){.set-nav{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.set-nav .m3-chip{flex-shrink:0}}
.setrow > .m3-btn,.setrow > .row{flex-shrink:0}
.setrow-select{max-width:min(100%,440px)}
.act-details{margin-top:var(--ed-space-1)}
.act-details summary{cursor:pointer;color:var(--md-sys-color-primary);font:var(--md-sys-typescale-label-medium);width:max-content}
.act-details bdi{display:block;margin-top:var(--ed-space-1)}
.act-details .sent-request{margin:var(--ed-space-1) 0 0;padding:var(--ed-space-2);max-height:320px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;border-radius:var(--shape-sm, 8px);background:var(--surface-container-high);font-size:12px}
/* The tax list keeps room for its longest choice and the arrow, instead of cutting the text. */
.setrow > .setrow-select{flex:0 0 380px;max-width:100%;padding-inline-end:var(--ed-space-6)}
@media (max-width:700px){.setrow > .setrow-select{flex:1 1 100%}}

/* Link history: the live link as a card, both sides facing each other; earlier links below. */
.hist-now{padding:var(--ed-space-3);border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-sys-shape-corner-medium);background:var(--md-sys-color-surface-container-low)}
.hist-pair{display:grid;grid-template-columns:1fr auto 1fr;gap:var(--ed-space-3);align-items:center}
@media (max-width:520px){.hist-pair{grid-template-columns:1fr}.hist-pair .pair-arrow{display:none}}
.hist-sub{margin:0;font:var(--md-sys-typescale-title-small);color:var(--md-sys-color-on-surface-variant)}
.hist-earlier{list-style:none;margin:var(--ed-space-2) 0 0;padding:0;display:grid;gap:var(--ed-space-2)}
/* A paired row's actions stack in their column, so three never squeeze each other off the edge. */
.li--pair{grid-template-columns:auto minmax(0,1fr) auto}
.li--pair > .row{flex-direction:column;align-items:flex-end;gap:0;min-width:140px}
@media (max-width:900px){.li--pair{grid-template-columns:auto minmax(0,1fr)}.li--pair > .row{flex-direction:row;flex-wrap:wrap;align-items:center;min-width:0}}
.li--pair > .row{justify-content:center}
.li--pair > .row > .m3-btn{min-height:32px;height:32px}

/* A product's name links to its Amazon page: a small open mark says it leaves the app. */
.ext-mark{display:inline-flex;margin-inline-start:4px;vertical-align:-2px;color:var(--md-sys-color-primary);opacity:.75}
.ext-mark:hover{opacity:1}
.ext-mark svg{width:14px;height:14px}
.plain-link:hover .ext-mark{opacity:1}
.view--ops .settings-head{scroll-margin-top:72px}
.view--ops .ops-head.settings-head{margin-top:0}
.calls-sum-card .small{display:block}

/* Create again: folded under its question, so a created order's drawer stays calm. */
.recreate{border-top:1px solid var(--md-sys-color-outline-variant);padding-top:var(--ed-space-3)}
.recreate summary{cursor:pointer;color:var(--md-sys-color-primary);font:var(--md-sys-typescale-label-large);width:max-content}
.recreate .m3-btn .spinner{margin-inline-end:var(--ed-space-2)}

/* Start orders: what happens as a short list; what's still open, each with its fix. */
.what-list{margin:0;padding-inline-start:1.2em;display:grid;gap:var(--ed-space-1)}
.fix-list{list-style:none;margin:var(--ed-space-2) 0 0;padding:0;display:grid;gap:var(--ed-space-1)}
.fix-list li{display:flex;align-items:center;justify-content:space-between;gap:var(--ed-space-3)}
.fix-list .m3-btn{flex-shrink:0;min-height:32px;height:32px}

/* A snackbar with one action: the message, then the button. */
.snack{display:flex;align-items:center;gap:var(--ed-space-3)}
.snack-action{color:var(--md-sys-color-inverse-primary, #a8c8ff);min-height:32px;height:32px;flex-shrink:0}

/* Orders: synced or not, then the reasons under Not synced, one step in. */
.chips--reasons{align-items:center;padding-inline-start:var(--ed-space-3);border-inline-start:2px solid var(--md-sys-color-outline-variant);margin-top:var(--ed-space-2)}

/* Sync: one per row that can go in, and all of them under the reasons. */
.row-sync{min-height:32px;height:32px}
.sync-all{display:flex;align-items:center;justify-content:space-between;gap:var(--ed-space-3);flex-wrap:wrap;margin-top:var(--ed-space-2);padding:var(--ed-space-2) var(--ed-space-3);border-radius:var(--md-sys-shape-corner-medium);background:var(--md-sys-color-surface-container-low)}

/* The order drawer never scrolls sideways: long codes and Edara's class names wrap. */
.sheet{overflow-x:hidden}
.sheet p,.sheet dd,.sheet .next,.sheet bdi{overflow-wrap:anywhere}
.next.is-bad{border:1px solid var(--st-error-fg)}

/* Needs attention, by cause: a heading with the count and the fix, then its orders. */
.att-group{margin-top:var(--ed-space-4)}
.att-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--ed-space-3);flex-wrap:wrap;margin-bottom:var(--ed-space-2)}
.att-head h3{margin:0;font:var(--md-sys-typescale-title-medium)}
.att-head .count{margin-inline-start:var(--ed-space-1);color:var(--md-sys-color-on-surface-variant);font:var(--md-sys-typescale-label-large)}

/* The section bar sits on the page's own background and lines up with the cards under it;
   on a phone it uses the phone's 16px margins, so the page never scrolls sideways. */
.set-nav{background:var(--background)}
.view--settings .set-nav{max-width:calc(960px + 2 * var(--ed-space-5))}
@media (max-width:599px){.set-nav{margin-inline:calc(-1 * var(--ed-space-4));padding-inline:var(--ed-space-4);top:calc(-1 * var(--ed-space-4))}}

/* Settings on a wide screen: the cards keep a readable width, and the sections are listed in
   the space beside them, kept in view while scrolling. Narrower, the list is the bar on top. */
.set-nav-title{display:none}
@media (min-width:1440px){
  .view--settings{display:grid;grid-template-columns:minmax(0,960px) 200px;column-gap:var(--ed-space-6);align-content:start}
  .view--settings > *{grid-column:1;min-width:0}
  .view--settings > .set-nav{grid-column:2;grid-row:1 / span 60;align-self:start;position:sticky;top:0;flex-direction:column;flex-wrap:nowrap;gap:2px;
    max-width:none;margin:0;padding:0 0 0 0;border:0;border-inline-start:1px solid var(--md-sys-color-outline-variant);background:transparent}
  .view--settings .set-nav-title{display:block;padding:0 var(--ed-space-3) var(--ed-space-2);color:var(--md-sys-color-on-surface-variant);font:var(--md-sys-typescale-label-medium);text-transform:uppercase;letter-spacing:.06em}
  .view--settings .set-nav .m3-chip{justify-content:flex-start;height:36px;margin-inline-start:-1px;padding-inline:var(--ed-space-3);border:0;border-inline-start:3px solid transparent;border-radius:0;background:transparent;color:var(--md-sys-color-on-surface-variant)}
  .view--settings .set-nav .m3-chip:hover{color:var(--md-sys-color-on-surface)}
  .view--settings .set-nav .m3-chip[aria-current]{border-inline-start-color:var(--md-sys-color-primary);background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container);border-start-end-radius:var(--md-sys-shape-corner-small);border-end-end-radius:var(--md-sys-shape-corner-small)}
  .view--settings .settings-head{scroll-margin-top:var(--ed-space-4)}
}
/* With the bar beside the cards, the page title needs its own room above the first section. */
@media (min-width:1440px){.view--settings > .page-head{margin-bottom:var(--ed-space-4)}}
/* A short choice takes the width of its longest option, not the tax list's wide box. */
.setrow > .setrow-select--fit{flex:0 0 auto;min-width:240px}

/* Home: what needs you is one slim line, not a block. */
.attn-strip{display:flex;align-items:center;gap:var(--ed-space-3);padding:var(--ed-space-2) var(--ed-space-2) var(--ed-space-2) var(--ed-space-3);
  border-radius:var(--md-sys-shape-corner-medium);background:var(--st-warning-bg);border-inline-start:4px solid var(--st-warning-fg);margin-bottom:var(--ed-space-3)}
.attn-ico{flex-shrink:0;display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--st-warning-fg);color:var(--st-warning-bg);font-weight:700;font-size:14px}
.attn-text{flex:1;color:var(--md-sys-color-on-surface);font-weight:500}
.attn-btn{flex-shrink:0;min-height:36px;height:36px}
/* Home's three cards: smaller, with the icon of the page each opens, and a lift on hover. */
.view--home .grid3 .card-link{position:relative;padding:var(--ed-space-3) var(--ed-space-4);border-radius:var(--md-sys-shape-corner-large)}
.view--home .grid3 .card-link .big{font:var(--md-sys-typescale-headline-medium);font-weight:500;margin:var(--ed-space-1) 0}
.view--home .grid3 .card-link > p:first-of-type{font:var(--md-sys-typescale-label-large);color:var(--md-sys-color-on-surface-variant)}
.view--home .grid3 .card-link > p:last-child{font:var(--md-sys-typescale-body-medium)}
.stat-ico{position:absolute;inset-block-start:var(--ed-space-3);inset-inline-end:var(--ed-space-3);display:grid;place-items:center;width:36px;height:36px;border-radius:50%;
  background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container)}
.stat-ico svg{width:20px;height:20px;fill:currentColor}
.view--home .grid3 .card-link:hover{transform:translateY(-1px)}
.view--home .grid3 .card-link{transition:border-color .15s,box-shadow .15s,transform .15s}
@media (prefers-reduced-motion:reduce){.view--home .grid3 .card-link:hover{transform:none}}

/* Home: what's waiting on someone reads in amber; the latest orders sit close to their heading. */
.stat-todo{color:var(--st-warning-fg);font-weight:500}
.big.big--todo{color:var(--st-warning-fg)}
.section-head--tight{margin-top:var(--ed-space-4);margin-bottom:calc(-1 * var(--ed-space-1))}

.stat-link{color:inherit;font:inherit;text-align:start;padding:0}
.stat-link:hover{text-decoration:underline}

/* Needs attention: under a heading that names the state, a refused row says Edara's answer. */
.row-reason{max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--st-error-fg);font:var(--md-sys-typescale-body-small)}
/* Each cause is its own block: a little more room between them than inside them. */
.att-group + .att-group{margin-top:var(--ed-space-6)}

/* A cause's heading: its text wraps in its own column, its buttons stay on the right. */
.att-head{flex-wrap:nowrap}
.att-head > div:first-child{flex:1 1 auto;min-width:0;max-width:72ch}
.att-head > .row{flex-shrink:0;margin-inline-start:auto}
@media (max-width:700px){.att-head{flex-wrap:wrap}.att-head > .row{margin-inline-start:0}}
.row-reason--sku{color:var(--md-sys-color-on-surface-variant);max-width:320px}

/* Needs attention: a row of the causes to jump to; each cause marked by a dot in its tone. */
.att-jumps{display:flex;flex-wrap:wrap;gap:var(--ed-space-2);margin-bottom:var(--ed-space-2)}
.att-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--st-warning-fg);margin-inline-end:var(--ed-space-2);vertical-align:middle}
.att-group--bad .att-dot,.att-chip--bad .att-dot{background:var(--st-error-fg)}
.att-jumps .count{margin-inline-start:var(--ed-space-1);color:var(--md-sys-color-on-surface-variant)}
.att-group{scroll-margin-top:var(--ed-space-4)}
.att-jumps + .att-group{margin-top:var(--ed-space-5)}

.stat-parts{font:var(--md-sys-typescale-body-medium)}
.stat-parts .stat-link:not(.stat-todo){color:var(--md-sys-color-on-surface-variant)}
.stat-parts .stat-link.stat-todo{color:var(--st-warning-fg);font-weight:500}
/* Narrow screens: a card's title never runs under its icon, and the attention line wraps with its button below. */
.view--home .grid3 .card-link > p:first-of-type{padding-inline-end:44px}
@media (max-width:599px){.attn-strip{flex-wrap:wrap}.attn-text{flex-basis:calc(100% - 40px)}.attn-btn{margin-inline-start:36px}}

/* The order drawer: a refusal sits under the status, before the order's details. */
.sheet > .next.is-bad{margin-top:var(--ed-space-1)}

/* Edara's raw answer: small, boxed, scrollable if long, with a copy button in its corner. */
.err-box{position:relative;margin-top:var(--ed-space-2);padding:var(--ed-space-2) var(--ed-space-3);padding-inline-end:var(--ed-space-6);border-radius:var(--md-sys-shape-corner-small);
  background:var(--md-sys-color-surface);border:1px solid var(--md-sys-color-outline-variant);max-height:160px;overflow:auto}
.err-box pre{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.5;color:var(--md-sys-color-on-surface-variant)}
.err-copy{position:absolute;inset-block-start:4px;inset-inline-end:4px}
/* An order line: the product's name across the card, its codes and price under it. */
.line-body{min-width:0}
.line-title{font:var(--md-sys-typescale-body-large);font-weight:500;margin-bottom:var(--ed-space-2)}

.err-box--tall{max-height:280px}
.err-box pre{line-height:1.45}
.next.is-warn{border:1px solid var(--st-warning-fg)}

.att-orders{font-weight:600;color:var(--md-sys-color-primary)}

/* Not synced yet / Won't sync: its reasons in a panel hanging from that chip, with a pointer up to it. */
.reason-panel{position:relative;margin-top:var(--ed-space-3);padding:var(--ed-space-3);border-radius:var(--md-sys-shape-corner-medium);
  background:color-mix(in srgb, var(--md-sys-color-secondary-container) 45%, transparent);border:1px solid var(--md-sys-color-secondary-container)}
.reason-panel::before{content:"";position:absolute;inset-block-start:-8px;inset-inline-start:var(--caret-x, 32px);width:14px;height:14px;transform:rotate(45deg);
  background:inherit;border-inline-start:1px solid var(--md-sys-color-secondary-container);border-block-start:1px solid var(--md-sys-color-secondary-container);
  background-color:color-mix(in srgb, var(--md-sys-color-secondary-container) 45%, var(--background))}
.reason-panel .chips--reasons{margin:0;padding:0;border:0}
.reason-label{font:var(--md-sys-typescale-label-large);color:var(--md-sys-color-on-surface-variant);margin-inline-end:var(--ed-space-1)}
.reason-panel .chips--reasons .m3-chip{background:var(--card)}
.reason-panel .chips--reasons .m3-chip[aria-pressed="true"]{background:var(--md-sys-color-secondary-container)}
.reason-panel .sync-all{margin-top:var(--ed-space-3);background:var(--card)}
.chips [data-opens]{box-shadow:0 0 0 2px var(--md-sys-color-secondary-container)}

/* An order's history, at the end of its drawer. */
.order-hist{border-top:1px solid var(--md-sys-color-outline-variant);padding-top:var(--ed-space-3)}
.order-hist h4{margin:0 0 var(--ed-space-2);font:var(--md-sys-typescale-title-small)}
.hist-dot--bad{background:var(--st-error-fg)}

/* A listing's facts under its SKU: a small status dot, then its price and quantity. */
/* Separators sit in the gap before an item; one that starts a new line pushes its "·" past the
   row's edge, where it's clipped, so no line begins with a stray dot. */
.lst-row{--lst-gap:20px;display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--ed-space-1) var(--lst-gap);margin-top:2px;overflow-x:clip}
.lst{display:inline-flex;align-items:flex-start;gap:6px;font:var(--md-sys-typescale-label-medium)}
.lst::before{content:"";flex:none;width:7px;height:7px;margin-top:calc(.5lh - 3.5px);border-radius:50%;background:var(--md-sys-color-outline)}
.lst-row > * + :is(.lst-fact,.lst-feat,.lst-nofeat){margin-inline-start:calc(-1 * var(--lst-gap))}
.lst-row > * + :is(.lst-fact,.lst-feat,.lst-nofeat)::before{content:"·";display:inline-block;width:var(--lst-gap);text-align:center;color:var(--md-sys-color-outline)}
/* Inactive for a listing issue: where to fix it, and Amazon's words a click away. */
.lst-link{color:var(--md-sys-color-primary);font:var(--md-sys-typescale-label-medium);text-decoration:none}
.lst-link:hover{text-decoration:underline;text-underline-offset:3px}
.lst-why summary{cursor:pointer;color:var(--md-sys-color-primary);font:var(--md-sys-typescale-label-medium);list-style:none}
.lst-why summary::-webkit-details-marker{display:none}
.lst-why[open]{flex-basis:100%;order:9}
.lst-why[open] summary{width:max-content}
.lst-why .err-box p{margin:0;font:var(--md-sys-typescale-body-small);overflow-wrap:anywhere}
.lst--active{color:var(--st-success-fg)}.lst--active::before{background:var(--st-success-fg)}
.lst--inactive,.lst--incomplete{color:var(--st-warning-fg)}.lst--inactive::before,.lst--incomplete::before{background:var(--st-warning-fg)}
.lst-fact{color:var(--md-sys-color-on-surface-variant);font:var(--md-sys-typescale-body-small)}

.order-hist .hist-detail{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:.92em}

/* A product's name is its link to amazon.eg: the underline on hover says so. */
.li .plain-link:hover{text-decoration:underline;text-underline-offset:3px}

/* Products → Recent changes */
.m3-tab--aside{margin-inline-start:auto}
.chips-sep{width:1px;align-self:stretch;margin:2px var(--ed-space-1);background:var(--md-sys-color-outline-variant)}
.chg-li{grid-template-columns:auto minmax(0,1fr) auto;align-items:center}
.chg-li .hist-dot{position:static;display:inline-block}
.chg-group{border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-sys-shape-corner-medium);background:var(--card);overflow:hidden}
.chg-head{display:flex;align-items:center;gap:var(--ed-space-2);width:100%;padding:var(--ed-space-3) var(--ed-space-4);border:0;background:transparent;color:inherit;font:inherit;text-align:start;cursor:pointer}
.chg-head .hist-dot{position:static;display:inline-block}
.chg-group .list{border:0;border-top:1px solid var(--md-sys-color-outline-variant);border-radius:0}
.chg-count{color:var(--md-sys-color-on-surface-variant)}
.attn-strip--info{background:var(--st-info-bg);border-inline-start-color:var(--st-info-fg)}
.attn-strip--info .attn-ico{background:var(--st-info-fg);color:var(--st-info-bg)}

/* Products: what a row is; the featured offer; listings of one product grouped under its ASIN. */
.prod-what{margin:var(--ed-space-3) 0 var(--ed-space-2)}
.lst-feat{color:var(--st-success-fg);font:var(--md-sys-typescale-label-medium)}
.lst-nofeat{color:var(--st-warning-fg);font:var(--md-sys-typescale-body-small)}
/* Out on Amazon, in stock in Edara: the one worth acting on. */
.lst-edara{color:var(--st-warning-fg);font:var(--md-sys-typescale-label-medium)}
.lst-edara::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:currentColor;margin-inline-end:6px;vertical-align:middle}
/* Products: Selling now / Not selling, above the tabs. */
.sell-bar{display:flex;align-items:center;gap:var(--ed-space-3);flex-wrap:wrap;margin-bottom:var(--ed-space-2)}
.sell-seg button{display:inline-flex;align-items:center;gap:8px;height:38px;padding:0 16px}
.sell-seg .count{font:var(--md-sys-typescale-label-medium);opacity:.8}
.sell-dot{width:8px;height:8px;border-radius:50%;background:var(--st-success-fg)}
.sell-what{margin:0;flex:1 1 260px}
.asin-head{padding:var(--ed-space-2) var(--ed-space-4);background:var(--md-sys-color-surface-container-low);border-top:1px solid var(--md-sys-color-outline-variant);
  font:var(--md-sys-typescale-label-large);color:var(--md-sys-color-on-surface-variant)}

.chg-again-sum{color:var(--st-success-fg);font:var(--md-sys-typescale-body-medium)}
.chg-again{margin-inline-start:var(--ed-space-2)}
.chg-toggle{color:var(--md-sys-color-primary);font:var(--md-sys-typescale-label-large)}

/* A product's heading over its listings: its name once, its ASIN, and Link all. */
.asin-head{display:flex;align-items:center;gap:var(--ed-space-3)}
.asin-head-text{flex:1;min-width:0}
.asin-head-text > div:first-child{font:var(--md-sys-typescale-title-small);color:var(--md-sys-color-on-surface)}

/* Grouped by product: each product a card of its own; an empty list left before the first is hidden. */
.list:empty{display:none}
.asin-card .asin-head{border-top:0}

/* An expanded change: the SKU and item on one line, the product's name on one line under it. */
.chg-li .clamp1{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chg-li{padding-block:var(--ed-space-2)}

.chg-arrow{color:var(--md-sys-color-primary);margin:0 var(--ed-space-2)}

.hist-summary{font:var(--md-sys-typescale-body-large);margin-bottom:var(--ed-space-2)}

.hist-rule{color:var(--md-sys-color-on-surface-variant);margin-top:2px}

/* The summary leads the dialog as a soft green note, so it reads as the answer and the rest as detail. */
.hist-summary{padding:var(--ed-space-3) var(--ed-space-4);border-radius:var(--md-sys-shape-corner-medium);background:var(--st-success-bg);color:var(--md-sys-color-on-surface)}

/* Messages after an action: a round mark in the tone's colour, the words, an action, a close.
   Rises in, fades out; dark in light mode and light in dark mode (inverse surface). */
.snack{gap:var(--ed-space-3);padding:var(--ed-space-2) var(--ed-space-2) var(--ed-space-2) var(--ed-space-3);min-height:52px;max-width:min(560px, calc(100% - 2 * var(--space-5)));
  border-radius:var(--md-sys-shape-corner-medium);box-shadow:0 6px 24px rgba(0,0,0,.22);border-inline-start:4px solid var(--snack-tone);animation:snack-in .22s ease-out}
.snack--out{animation:snack-out .2s ease-in forwards}
@keyframes snack-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes snack-out{to{opacity:0;transform:translateY(8px)}}
@media (prefers-reduced-motion:reduce){.snack,.snack--out{animation:none}}
.snack--ok{--snack-tone:#4caf6e}.snack--warn{--snack-tone:#f0b429}.snack--error{--snack-tone:#ef5350}.snack--info{--snack-tone:var(--md-sys-color-inverse-primary, #a8c8ff)}
.snack-mark{flex-shrink:0;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--snack-tone);color:#111;font-weight:700;font-size:14px;line-height:1}
.snack-text{flex:1;font:var(--md-sys-typescale-body-medium);line-height:1.4}
.snack-close{flex-shrink:0;width:32px;height:32px;border:0;border-radius:50%;background:transparent;color:inherit;opacity:.7;font-size:20px;line-height:1;cursor:pointer}
.snack-close:hover{opacity:1;background:rgba(255,255,255,.12)}

/* FBA stock: two bars on one scale; Edara's is green when it's short (add), amber when it's over. */
.fba-bars{display:grid;grid-template-columns:auto minmax(80px,280px) auto;align-items:center;gap:2px var(--ed-space-2);margin:var(--ed-space-1) 0;max-width:420px}
.fba-lbl{font:var(--md-sys-typescale-label-medium);color:var(--md-sys-color-on-surface-variant)}
.fba-track{height:8px;border-radius:4px;background:var(--md-sys-color-surface-container-high)}
.fba-bar{display:block;height:100%;border-radius:4px}
.fba-bar--amazon{background:var(--md-sys-color-primary)}
.fba-bar--edara.is-short{background:var(--st-success-fg)}
.fba-bar--edara.is-over{background:var(--st-warning-fg)}
.fba-n{font:var(--md-sys-typescale-label-large);font-variant-numeric:tabular-nums;text-align:end}
.fba-acts .m3-btn{min-height:32px;height:32px}
.fba-intro--short{padding-block:var(--ed-space-3)}

/* Bars line up from row to row; the decided section's heading sits close to its note. */
.fba-bars{grid-template-columns:64px minmax(80px,340px) 48px}
.view--fba h3.section-title + p.muted.small{margin-top:var(--ed-space-1)}

.fba-allow{color:var(--md-sys-color-on-surface-variant);font-style:italic}
.flex-say{margin-top:2px;color:var(--md-sys-color-on-surface)}

.fba-posting{display:inline-flex;align-items:center;gap:var(--ed-space-2);color:var(--md-sys-color-primary);font:var(--md-sys-typescale-label-large)}

/* An i that opens a short note in place (setup step 4). */
.tip{position:relative;display:inline-flex;vertical-align:middle}
.tip-btn{display:inline-grid;place-items:center;width:22px;height:22px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--md-sys-color-on-surface-variant);cursor:pointer}
.tip-btn:hover,.tip-btn[aria-expanded="true"]{background:color-mix(in srgb,var(--md-sys-color-primary) 12%,transparent);color:var(--md-sys-color-primary)}
.tip-btn:focus-visible{outline:2px solid var(--md-sys-color-primary);outline-offset:1px}
.tip-btn svg{width:18px;height:18px}
.tip-pop{position:absolute;z-index:30;top:calc(100% + 6px);inset-inline-start:-10px;width:max-content;max-width:min(320px,80vw);padding:10px 12px;border-radius:12px;
  background:var(--md-sys-color-inverse-surface);color:var(--md-sys-color-inverse-on-surface);font:var(--md-sys-typescale-body-small);font-weight:400;box-shadow:0 6px 20px rgba(0,0,0,.25);white-space:normal}
.wh-three .mini-search{min-height:44px}

/* Settings: an opened activity entry stays small, it's for support. */
.act-details bdi.mono{font-size:12px;line-height:1.5;color:var(--md-sys-color-on-surface-variant)}
.btn-inline{min-height:0;height:auto;padding:0 4px;vertical-align:baseline}

/* Settings: a chosen warehouse as a chip with its Edara code; a row changed in place. */
.wh-chip{display:inline-flex;align-items:center;gap:8px;padding:4px 12px 4px 8px;border-radius:999px;background:var(--md-sys-color-surface-container-high)}
.wh-chip svg{width:18px;height:18px;fill:var(--md-sys-color-primary);flex:none}
.wh-code{font:var(--md-sys-typescale-label-small);font-family:ui-monospace,Menlo,Consolas,monospace;color:var(--md-sys-color-on-surface-variant);padding-inline-start:8px;border-inline-start:1px solid var(--md-sys-color-outline-variant)}
.row-edit{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;max-width:520px}
.row-edit .mini-search{flex:1 1 100%;min-height:40px}
.search-box{position:relative;display:flex;flex:1 1 100%}
/* A Settings choice not saved yet: Save and Cancel under it. */
/* Tax: the worked example, Amazon's price on one side and what Edara records on the other. */
.vat-eg{display:inline-flex;align-items:center;flex-wrap:wrap;gap:var(--ed-space-3);margin-top:var(--ed-space-2);padding:8px 14px;border-radius:var(--md-sys-shape-corner-medium);background:var(--md-sys-color-surface-container);font:var(--md-sys-typescale-body-medium)}
.vat-eg__side{display:inline-flex;align-items:baseline;gap:6px}
.vat-eg__k{font:var(--md-sys-typescale-label-medium);color:var(--md-sys-color-on-surface-variant)}
.vat-eg__plus{color:var(--md-sys-color-on-surface-variant)}
.vat-eg__arrow{display:inline-block;color:var(--md-sys-color-primary);font-weight:600}
/* Settings: a section's opening line, with a way to the page it serves. */
.sec-intro{display:flex;align-items:center;justify-content:space-between;gap:var(--ed-space-3);padding-bottom:var(--ed-space-3);border-bottom:1px solid var(--md-sys-color-outline-variant)}
.sec-intro p{margin:0}
/* FBA stock check: which way a party's stock goes. */
.dir-mark{display:inline-grid;place-items:center;width:20px;height:20px;margin-inline-end:8px;border-radius:50%;font-weight:700;font-size:14px;line-height:1;vertical-align:1px}
.dir-mark--in{background:var(--st-success-bg,#dff3e4);color:var(--st-success-fg,#1e6b34)}
.dir-mark--out{background:var(--st-warning-bg,#fdeccf);color:var(--st-warning-fg,#8a5300)}
/* Settings, matching: the rule as the field and its ending chips; the counts as pills. */
.rule-line{display:flex;align-items:center;flex-wrap:wrap;gap:6px;color:var(--md-sys-color-on-surface)}
.rule-field{font-weight:500}
.end-chip{padding:1px 8px;border-radius:6px;background:var(--md-sys-color-surface-container-high);font-size:12px;color:var(--md-sys-color-on-surface)}
.stat-pills{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
/* The rule's result: the matched count large. */
.mr-head{margin:0;font:var(--md-sys-typescale-body-medium)}
.mr-num{font:var(--md-sys-typescale-headline-small);color:var(--st-success-fg);margin-inline-end:2px}
.mr-rest{margin:6px 0 0}
.endings-try .gain{margin-inline-start:6px;color:var(--st-success-fg);font-weight:500}
.ex-filters{gap:6px}
.ex-filters .m3-chip.is-on{background:var(--md-sys-color-secondary-container);border-color:transparent}
/* Settings, connections: a status pill, then who it's connected as. */
/* Recent activity: the full list opens wider than other dialogs. */
.m3-dialog--wide{max-width:760px}
.act-all{max-height:min(60vh,560px);overflow:auto}
.reload-busy{display:inline-flex;align-items:center;gap:8px;color:var(--md-sys-color-on-surface-variant);cursor:default}
.prod-what-row{align-items:center;flex-wrap:nowrap}
.prod-what-row .m3-btn svg{width:18px;height:18px;fill:currentColor;margin-inline-end:6px}
.conn-line{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:4px 0 6px;color:var(--md-sys-color-on-surface)}
.mail-input{min-width:280px}
.justify-end{justify-content:flex-end}
.pend-col{display:flex;flex-direction:column;align-items:stretch;gap:var(--ed-space-2)}
.pend-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:var(--ed-space-2)}
.pend-note{margin-inline-end:auto;color:var(--md-sys-color-on-surface-variant);font:var(--md-sys-typescale-body-small)}
.search-box .mini-search{padding-inline-end:40px}
.search-box .spinner{position:absolute;inset-inline-end:14px;top:50%;margin-top:-8px;color:var(--md-sys-color-primary)}
.row-edit .setrow-select{flex:1 1 220px;min-width:0}

/* Settings: a row whose choice sits under its title (FBA orders: two cards side by side). */
.setrow--col{flex-direction:column;align-items:stretch;gap:var(--ed-space-2)}
.field-cards--two{grid-template-columns:repeat(2,minmax(0,1fr))}
.fi-default{margin-inline-start:6px;vertical-align:middle;font-weight:500}
@media (max-width:700px){.field-cards--two{grid-template-columns:minmax(0,1fr)}}

/* Products: search and filter chips share a line; link, select and download share the next. */
/* Orders: the filter chips, with when Amazon was last read at the end of the same line. */
.chips--with-checked{align-items:center;width:100%}
.checked-line{display:inline-flex;align-items:center;gap:var(--ed-space-1);font:var(--md-sys-typescale-body-small)}
.prod-tools{flex-wrap:wrap;gap:var(--ed-space-2) var(--ed-space-3);margin-top:var(--ed-space-2)}
.prod-tools .search-field{flex:1 1 300px;max-width:420px}
.prod-tools .chip-row{flex-wrap:wrap;gap:6px;margin:0}
.prod-actions{align-items:center;margin-top:var(--ed-space-3)}
/* The inner chip group keeps to its content, so when Amazon was read fits on the same line. */
.toolbar .chips--with-checked .chips{flex-basis:auto}
/* The reading banner: its text takes the room, its link stays on the line at the end. */
.banner--compact{flex-wrap:nowrap}
.banner--compact > div{flex:1 1 auto;min-width:0}
.banner--compact > .m3-btn{flex:none}
@media (max-width:700px){.banner--compact{flex-wrap:wrap}}

/* Linking in progress: the bar across the dialog; a tick once the links are saved. */
.dlg-progress{width:100%;max-width:none}
.done-tick{display:inline-grid;place-items:center;width:28px;height:28px;margin-inline-end:10px;border-radius:50%;background:var(--st-success-fg);color:#fff;font-size:16px;vertical-align:3px}
/* Orders, the reasons under a filter: a lighter, smaller second level than the main chips. */
.reason-panel{padding:8px 12px;width:fit-content;max-width:100%}
.reason-panel .chips--reasons{gap:6px}
.reason-panel .chips--reasons .m3-chip{min-height:30px;padding:0 10px;font:var(--md-sys-typescale-label-medium)}
.reason-label{font:var(--md-sys-typescale-label-medium)}
.toolbar .reason-panel{flex:0 1 auto}
.toolbar .reason-panel .chips{flex-basis:auto}

/* Home: latest orders and recent activity in two columns when there's room. */
.home-cols{display:grid;grid-template-columns:minmax(0,1fr);gap:0 var(--ed-space-5)}
@media (min-width:1280px){.home-cols{grid-template-columns:minmax(0,3fr) minmax(0,2fr);align-items:start}}

/* A dialog headline with an action at its end (Recent activity: Refresh). */
.dlg-head{align-items:center;flex-wrap:nowrap}
.dlg-head .m3-btn svg{width:18px;height:18px;fill:currentColor;margin-inline-end:6px}

/* Stock sync: product names on one line (the full name on hover); an icon instead of a "SKU" badge. */
.li .l1.clamp1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lead-ico svg{width:20px;height:20px;fill:currentColor}
.section-head .m3-btn svg{width:18px;height:18px;fill:currentColor;margin-inline-end:6px}

/* FBA stock: one status line with Check now at its end. */
.fba-status{align-items:center;margin-top:var(--ed-space-3)}
.fba-status p{margin:0}
.fba-note{max-width:420px;text-align:end}

/* Help & guide: the same layout as Settings, its topics listed beside the cards. */
@media (min-width:1440px){
  .view--help{display:grid;grid-template-columns:minmax(0,960px) 200px;column-gap:var(--ed-space-6);align-content:start}
  .view--help > *{grid-column:1;min-width:0}
  .view--help > .set-nav{grid-column:2;grid-row:1 / span 60;align-self:start;position:sticky;top:0;flex-direction:column;flex-wrap:nowrap;gap:2px;
    max-width:none;margin:0;padding:0 0 0 0;border:0;border-inline-start:1px solid var(--md-sys-color-outline-variant);background:transparent}
  .view--help .set-nav-title{display:block;padding:0 var(--ed-space-3) var(--ed-space-2);color:var(--md-sys-color-on-surface-variant);font:var(--md-sys-typescale-label-medium);text-transform:uppercase;letter-spacing:.06em}
  .view--help .set-nav .m3-chip{justify-content:flex-start;height:36px;margin-inline-start:-1px;padding-inline:var(--ed-space-3);border:0;border-inline-start:3px solid transparent;border-radius:0;background:transparent;color:var(--md-sys-color-on-surface-variant)}
  .view--help .set-nav .m3-chip:hover{color:var(--md-sys-color-on-surface)}
  .view--help .set-nav .m3-chip[aria-current]{border-inline-start-color:var(--md-sys-color-primary);background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container);border-start-end-radius:var(--md-sys-shape-corner-small);border-end-end-radius:var(--md-sys-shape-corner-small)}
  .view--help .settings-head{scroll-margin-top:var(--ed-space-4)}
}
.view--help > .m3-card{max-width:960px}
.view--help .settings-head{scroll-margin-top:72px}

/* An order's customer returns, in the order sheet. */
.ret-lines{display:flex;flex-direction:column;gap:var(--ed-space-2);margin-top:var(--ed-space-2)}
.ret-line{display:flex;align-items:flex-start;gap:var(--ed-space-2)}
.ret-line .m3-status{flex:none}

/* Products: loading the list from Amazon, said across the page with a moving bar. */
.load-banner{display:flex;flex-direction:column;gap:var(--ed-space-2);margin-top:var(--ed-space-2);padding:12px 16px;border-radius:var(--md-sys-shape-corner-medium);
  background:color-mix(in srgb, var(--md-sys-color-secondary-container) 55%, transparent)}
.load-banner__text{display:flex;align-items:flex-start;gap:12px}
.load-banner__text .spinner{margin-top:3px;color:var(--md-sys-color-primary)}
.load-banner p{margin:2px 0 0}
.load-banner .m3-linear-progress{max-width:none}

/* Recent activity: each entry led by its area's icon, with a small done/failed mark. */
.act-lead{position:relative;display:inline-grid;place-items:center}
.act-lead svg{width:20px;height:20px;fill:currentColor}
.act-lead--ok{background:var(--st-success-bg);color:var(--st-success-fg)}
.act-lead--bad{background:var(--st-error-bg,#fde7e7);color:var(--st-error-fg,#b3261e)}
.act-mark{position:absolute;inset-block-end:-2px;inset-inline-end:-2px;display:grid;place-items:center;width:16px;height:16px;border-radius:50%;
  font-size:10px;font-weight:700;background:var(--card);color:inherit;box-shadow:0 0 0 1px var(--md-sys-color-outline-variant)}
.act-li.is-bad .l1{color:var(--st-error-fg,#b3261e)}
.act-day{margin:var(--ed-space-3) 0 var(--ed-space-1);font:var(--md-sys-typescale-label-large);color:var(--md-sys-color-on-surface-variant)}
.act-all .act-day:first-child{margin-top:0}

/* The opened order's customer returns: a card per return, with a three-step timeline. */
.ret-sec{display:flex;flex-direction:column;gap:var(--ed-space-2);margin-top:var(--ed-space-2)}
.ret-sec h4{margin:0}
.ret-card{display:flex;flex-direction:column;gap:10px;padding:12px 14px;border-radius:var(--md-sys-shape-corner-medium);border:1px solid var(--md-sys-color-outline-variant);background:var(--card)}
.ret-head{display:flex;align-items:center;gap:8px;min-width:0}
.ret-head .clamp1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.ret-why{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font:var(--md-sys-typescale-body-small)}
.ret-reason{padding:2px 8px;border-radius:6px;background:var(--md-sys-color-surface-container-high)}
.ret-why q{color:var(--md-sys-color-on-surface-variant);font-style:italic}
.ret-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:0;padding:0;list-style:none}
.ret-steps li{position:relative;display:flex;flex-direction:column;gap:2px;padding-top:18px;font:var(--md-sys-typescale-body-small)}
.ret-steps li::before{content:"";position:absolute;top:4px;inset-inline-start:0;width:10px;height:10px;border-radius:50%;background:var(--md-sys-color-outline-variant)}
.ret-steps li::after{content:"";position:absolute;top:8px;inset-inline-start:14px;inset-inline-end:4px;height:2px;background:var(--md-sys-color-outline-variant)}
.ret-steps li:last-child::after{display:none}
.ret-steps li.done::before{background:var(--st-success-fg)}
.ret-steps li.done::after{background:var(--st-success-fg)}
.ret-steps li.wait::before{background:transparent;border:2px solid var(--st-warning-fg);width:6px;height:6px}
.ret-steps b{font-weight:600}
.ret-fix{display:flex;align-items:center;gap:var(--ed-space-2);padding:8px 12px;border-radius:var(--md-sys-shape-corner-small);background:var(--st-warning-bg);color:var(--st-warning-fg)}
.ret-fix.is-info{background:var(--st-info-bg);color:var(--st-info-fg)}
.ret-fix p{margin:0;flex:1;font:var(--md-sys-typescale-body-small)}
.ret-fix .m3-btn{flex:none}
.ret-fix{flex-direction:column;align-items:flex-start}
.ret-head b{white-space:nowrap}

/* Returns: grouped by what can be done with them; the older ones folded away. */
.ret-group{margin-top:var(--ed-space-4)}
.ret-group-head{align-items:center;gap:var(--ed-space-2)}
.ret-group-head .section-title{margin:0}
.ret-group > p{margin:4px 0 0}
.ret-before > summary{display:flex;align-items:center;gap:var(--ed-space-2);cursor:pointer;list-style:revert}
.ret-before > summary .section-title{margin:0;flex:1}
.ret-q{max-width:420px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ret-before > summary{list-style:none}
.ret-before > summary::-webkit-details-marker{display:none}
.ret-before > summary::before{content:"▸";color:var(--md-sys-color-primary);font-size:14px}
.ret-before[open] > summary::before{content:"▾"}

/* Turning orders on: where orders start from, as three choice cards. */
.start-from{grid-template-columns:repeat(3,minmax(0,1fr))}
.start-date{margin-top:6px;padding:4px 8px;border:1px solid var(--md-sys-color-outline);border-radius:var(--md-sys-shape-corner-small);background:var(--md-sys-color-surface);color:var(--md-sys-color-on-surface);font:var(--md-sys-typescale-body-medium)}
.spinner--xs{width:12px;height:12px;border-width:2px;display:inline-block;vertical-align:middle}
@media (max-width:700px){.start-from{grid-template-columns:minmax(0,1fr)}}
.start-date{width:100%;max-width:100%;box-sizing:border-box}

.start-from .field-card{min-width:0}
.start-from .help{font:var(--md-sys-typescale-body-small)}
.start-n{color:var(--md-sys-color-primary);font-weight:600}
.start-from .help{overflow-wrap:anywhere}
.start-from .field-card > span{min-width:0;flex:1}
/* The three choices as rows: room for the counts, and the date box sits at the end of its row. */
.start-from{grid-template-columns:minmax(0,1fr) !important;gap:6px}
.start-from .field-card{padding:10px 14px;align-items:center}
.start-from .field-card > span{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:10px}
.start-from .field-card > span > b{min-width:170px}
.start-from .start-date{width:auto;margin:0 0 0 auto;margin-inline-start:auto;margin-inline-end:0}
.start-from .field-card > span{flex-wrap:nowrap;align-items:center}
.start-from .help{flex:1 1 auto;margin:0}
.start-from .start-date{flex:none}
@media (max-width:700px){.start-from .field-card > span{flex-wrap:wrap}}
.start-from .help .start-n{display:inline;margin-inline-end:4px}
.start-from .help .muted{font:inherit;display:inline}

/* Insider view: adding an insider. */
.ins-add{gap:var(--ed-space-2);align-items:center;flex-wrap:nowrap}
.ins-add .mini-search{max-width:420px;min-height:40px}
/* Test Amazon (staff): the shop in one line, its tabs, and forms that open under a row */
.ts-head{display:flex;align-items:center;justify-content:space-between;gap:var(--ed-space-3);padding:var(--ed-space-3) var(--ed-space-4);flex-wrap:wrap}
.ts-head p{margin:2px 0 0}
.ts-head-actions{gap:var(--ed-space-2);flex-wrap:nowrap}
.ts-reset{margin-top:var(--ed-space-3)}
.ts-tabs{margin:var(--ed-space-3) 0}
.ts-inline td{background:var(--md-sys-color-surface-container-low, var(--md-sys-color-surface));padding:var(--ed-space-3) var(--ed-space-4)}
tr.is-open td{background:var(--md-sys-color-surface-container-low, var(--md-sys-color-surface))}
/* Test Amazon (staff): short fields side by side, labels above their field */
.ts-form{flex-wrap:wrap;align-items:flex-end;gap:var(--ed-space-3)}
.ts-form .mini-search{width:auto;flex:0 1 160px;min-height:40px}
.ts-form #tsTitle{flex:1 1 220px}
.ts-form label{display:flex;flex-direction:column;gap:4px}
.ts-form label .mini-search,.ts-form label .ins-sel{flex:none;width:160px}
.ts-line{margin-top:var(--ed-space-2)}
.ts-line .ins-sel{min-width:240px}
.ts-h3{font:var(--md-sys-typescale-title-small);margin:var(--ed-space-4) 0 var(--ed-space-2)}
.ts-form .ts-wide{min-width:320px}
.ts-form label.ts-check{flex-direction:row;align-items:center;gap:6px;padding-bottom:10px}

/* ---------- Insider view: a health line, tabs, one view at a time ---------- */
.ins-head{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ed-space-2) var(--ed-space-4);margin:calc(-1 * var(--ed-space-2)) 0 var(--ed-space-2)}
.ins-health{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ed-space-2);margin:0;color:var(--md-sys-color-on-surface-variant)}
.ins-health b{color:var(--md-sys-color-on-surface)}
.ins-build{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--ed-space-2)}
.ins-dot{width:10px;height:10px;border-radius:50%;background:var(--st-success-fg);box-shadow:0 0 0 4px var(--st-success-bg);flex:none}
.ins-dot.is-warn{background:var(--st-warning-fg);box-shadow:0 0 0 4px var(--st-warning-bg)}
.ins-warnlink{color:var(--st-warning-fg);font-weight:600;text-decoration:underline}
.ins-tools{display:flex;align-items:center;gap:var(--ed-space-3);margin:0 0 0 auto}
.ins-tabs{margin-bottom:var(--ed-space-4)}
.ins-tabs .count{display:inline-block;padding:0 7px;border-radius:9px;background:var(--md-sys-color-surface-container-high);line-height:18px}
.ins-tabs .count.ins-alert{background:var(--st-warning-bg);color:var(--st-warning-fg)}
.ins-label{display:block;margin:0 0 var(--ed-space-2);font:var(--md-sys-typescale-label-medium);letter-spacing:.5px;text-transform:uppercase;color:var(--md-sys-color-on-surface-variant)}
.ins-label-plain{text-transform:none;letter-spacing:0;font-weight:500}
.ins-g4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--ed-space-3)}
.ins-g3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--ed-space-3)}
.ins-g2{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:var(--ed-space-3);align-items:start}
@media (max-width:1100px){.ins-g4{grid-template-columns:repeat(2,minmax(0,1fr))}.ins-g2{grid-template-columns:minmax(0,1fr)}}
@media (max-width:700px){.ins-g4,.ins-g3{grid-template-columns:minmax(0,1fr)}.ins-tools{margin-left:0}}
.ins-tile,.ins-svc{display:flex;flex-direction:column;gap:4px;padding:var(--ed-space-4);min-width:0;text-align:start;font:inherit;color:inherit;background:var(--card)}
button.ins-tile,.ins-svc{cursor:pointer}
button.ins-tile:hover,.ins-svc:hover{background:color-mix(in srgb,var(--md-sys-color-primary) 5%,var(--card))}
.ins-tile .ins-label,.ins-svc .ins-label{margin:0}
.ins-tile--good{box-shadow:inset 0 3px 0 var(--st-success-fg)}
.ins-tile--warn{box-shadow:inset 0 3px 0 var(--st-warning-fg)}
.ins-tile--bad{box-shadow:inset 0 3px 0 var(--st-error-fg);background:var(--st-error-bg)}
.ins-big{font:var(--md-sys-typescale-headline-medium);font-variant-numeric:tabular-nums}
.ins-big--sm{font:var(--md-sys-typescale-headline-small)}
.ins-sub{color:var(--md-sys-color-on-surface-variant);font:var(--md-sys-typescale-body-medium)}
.ins-svc[aria-pressed="true"]{border-color:var(--md-sys-color-primary);box-shadow:0 0 0 1px var(--md-sys-color-primary)}
.ins-svc svg{width:100%;height:34px;display:block;margin-top:4px}
.ins-spark-fill{fill:color-mix(in srgb,var(--md-sys-color-primary) 14%,transparent)}
.ins-spark-line{fill:none;stroke:var(--md-sys-color-primary);stroke-width:1.8;vector-effect:non-scaling-stroke}
.ins-sec{padding:var(--ed-space-4) var(--ed-space-5);min-width:0}
.ins-h2{display:flex;align-items:center;gap:var(--ed-space-2);margin:0 0 var(--ed-space-3);font:var(--md-sys-typescale-title-medium)}
.ins-h2 .link-btn{margin-inline-start:auto}
.ins-list{display:flex;flex-direction:column}
.ins-item{display:flex;align-items:center;gap:var(--ed-space-3);padding:var(--ed-space-3) 0;border-top:1px solid var(--md-sys-color-outline-variant);min-width:0}
.ins-item:first-child{border-top:none}
.ins-item .grow{flex:1;min-width:0}
.ins-email{word-break:break-all;font-weight:600}
.ins-ico{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;flex:none}
.ins-ico svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ins-ico--ok{background:var(--st-success-bg);color:var(--st-success-fg)}
.ins-ico--warn{background:var(--st-warning-bg);color:var(--st-warning-fg)}
.ins-ico--bad{background:var(--st-error-bg);color:var(--st-error-fg)}
.ins-ico--info{background:var(--st-info-bg);color:var(--st-info-fg)}
.ins-ico--mute{background:var(--st-neutral-bg);color:var(--st-neutral-fg)}
.ins-empty{padding:var(--ed-space-5);text-align:center;margin:0}
.ins-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:var(--ed-space-2)}
.ins-day{display:flex;flex-direction:column;align-items:center;gap:6px;font:var(--md-sys-typescale-label-medium);color:var(--md-sys-color-on-surface-variant)}
.ins-day i{width:100%;height:30px;border-radius:8px;display:grid;place-items:center;font-style:normal;font-weight:700;background:var(--st-success-bg);color:var(--st-success-fg)}
.ins-day i.w{background:var(--st-warning-bg);color:var(--st-warning-fg)}
.ins-day i.b{background:var(--st-error-bg);color:var(--st-error-fg)}
.ins-funnel{display:flex;flex-direction:column;gap:10px}
.ins-labrow{display:flex;align-items:baseline;justify-content:space-between;gap:var(--ed-space-3)}
.ins-labrow .ins-label{margin:0 0 var(--ed-space-2)}
.ins-check{display:inline-flex;align-items:center;gap:6px;font:var(--md-sys-typescale-body-small);color:var(--md-sys-color-on-surface-variant);cursor:pointer}
.ins-fbar{display:grid;grid-template-columns:110px minmax(0,1fr) 28px;align-items:center;gap:10px;color:var(--md-sys-color-on-surface-variant)}
.ins-fbar i{display:block;height:10px;border-radius:5px;background:var(--md-sys-color-surface-container-high);overflow:hidden}
.ins-fbar i b{display:block;height:100%;border-radius:5px}
.ins-fbar span:last-child{text-align:end;font-weight:600;color:var(--md-sys-color-on-surface);font-variant-numeric:tabular-nums}
.ins-bar{display:flex;align-items:center;gap:var(--ed-space-2) var(--ed-space-3);flex-wrap:wrap;margin-bottom:var(--ed-space-3)}
.ins-chips{gap:var(--ed-space-2);flex-wrap:wrap}
.ins-search{flex:1;min-width:200px;max-width:340px}
.ins-sel{height:32px;border:1px solid var(--md-sys-color-outline);border-radius:var(--md-sys-shape-corner-small);background:var(--card);color:var(--md-sys-color-on-surface);padding:0 10px;font:var(--md-sys-typescale-label-large)}
.ins-note{margin-inline-start:auto}
.ins-hint{margin:calc(-1 * var(--ed-space-1)) 0 var(--ed-space-3)}
.ins-twrap{overflow-x:auto;padding:0}
.ins-table{width:100%;border-collapse:collapse}
.ins-table th{text-align:start;font:var(--md-sys-typescale-label-medium);color:var(--md-sys-color-on-surface-variant);padding:10px 16px;border-bottom:1px solid var(--md-sys-color-outline-variant);white-space:nowrap}
.ins-table td{padding:12px 16px;border-bottom:1px solid var(--md-sys-color-outline-variant);vertical-align:middle}
.ins-table tr:last-child td{border-bottom:none}
.ins-table td.num{font-variant-numeric:tabular-nums}
.ins-table .nowrap,.ins-table .row.nowrap{white-space:nowrap;flex-wrap:nowrap}
.ins-sort{cursor:pointer;user-select:none}
.ins-sort:hover,.ins-sort[aria-sort]{color:var(--md-sys-color-primary)}
.ins-click{cursor:pointer}
tr.ins-click:hover td,.ins-job.ins-click:hover{background:color-mix(in srgb,var(--md-sys-color-primary) 4%,var(--card))}
tr.ins-click.is-on td{background:color-mix(in srgb,var(--md-sys-color-primary) 8%,var(--card))}
.ins-av{width:32px;height:32px;border-radius:50%;background:var(--md-sys-color-primary-container);color:var(--md-sys-color-on-primary-container);display:grid;place-items:center;font-weight:700;font-size:13px;flex:none}
.ins-av--sm{width:26px;height:26px;font-size:11px}
.ins-tags{display:flex;gap:6px;flex-wrap:wrap}
/* The sellers table fits the page: switches and stage pills wrap inside their cells, no sideways scroll. */
.ins-table .ins-tags{flex-wrap:wrap}
.ins-stage{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.ins-table .ins-stage .m3-status{white-space:nowrap}
.ins-table .row.nowrap>.ins-co{white-space:normal;min-width:0;overflow-wrap:anywhere}
.ins-kvsub{display:block;margin-top:2px;font:var(--md-sys-typescale-body-small);font-weight:400;color:var(--md-sys-color-on-surface-variant)}
.ask-what{margin:2px 0 0}
.ins-table .ins-tags .m3-status{white-space:nowrap}
.sf-row{align-items:center;flex-wrap:wrap}
.sf-row .mini-search{width:280px;flex:0 0 280px;min-height:40px}
.ins-detail td{background:var(--md-sys-color-surface-container-low);padding:14px 16px 16px 64px}
.ins-kv{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px 24px}
.ins-kv>div{min-width:0}
.ins-kv b{overflow-wrap:anywhere}
.ins-kv>div>span{display:block;font:var(--md-sys-typescale-label-medium);color:var(--md-sys-color-on-surface-variant)}
.ins-kv b{font-weight:600}
.ins-kv .ins-wide{grid-column:1/-1}
.ins-kv .row{gap:var(--ed-space-2)}
.ins-err{font:var(--md-sys-typescale-body-small);background:var(--card);border:1px solid var(--md-sys-color-outline-variant);border-radius:10px;padding:10px 12px;margin-top:6px;word-break:break-word}
.ins-fail{color:var(--st-error-fg)}
.ins-path{word-break:break-all}
.ins-jobs{padding:0}
.ins-job{display:grid;grid-template-columns:34px minmax(0,1.3fr) minmax(0,1fr) auto;gap:var(--ed-space-4);align-items:center;padding:var(--ed-space-4) var(--ed-space-5);border-top:1px solid var(--md-sys-color-outline-variant)}
.ins-jobs>.ins-job:first-child{border-top:none}
.ins-dots{display:grid;grid-template-columns:repeat(24,minmax(0,1fr));gap:2px;margin-top:6px}
.ins-dots i{height:8px;border-radius:2px;background:var(--md-sys-color-outline-variant)}
.ins-dots i.o{background:var(--st-success-fg)} .ins-dots i.w{background:var(--st-warning-fg)} .ins-dots i.b{background:var(--st-error-fg)}
.ins-dots-l{display:flex;justify-content:space-between;font:var(--md-sys-typescale-label-small);color:var(--md-sys-color-on-surface-variant);margin-top:3px}
.ins-legend{display:inline-flex;align-items:center;gap:4px}
.ins-legend i{display:inline-block;width:10px;height:6px;border-radius:2px;background:var(--md-sys-color-outline-variant);margin-inline-start:6px}
.ins-legend i.o{background:var(--st-success-fg)} .ins-legend i.w{background:var(--st-warning-fg)} .ins-legend i.b{background:var(--st-error-fg)}
.ins-stopped{margin:0 0 var(--ed-space-3)}
.ins-cycle{display:flex;flex-direction:column;gap:6px}
.ins-cycle>span{display:flex;justify-content:space-between;gap:8px;font:var(--md-sys-typescale-body-small);color:var(--md-sys-color-on-surface-variant);font-variant-numeric:tabular-nums}
.ins-cycle i{display:block;height:6px;border-radius:3px;background:var(--md-sys-color-surface-container-high);overflow:hidden}
.ins-cycle i b{display:block;height:100%;background:var(--md-sys-color-primary);border-radius:3px}
.ins-runs{background:var(--md-sys-color-surface-container-low);padding:6px var(--ed-space-5) 14px 70px;overflow-x:auto;border-top:1px solid var(--md-sys-color-outline-variant)}
.ins-runs .ins-table td,.ins-runs .ins-table th{background:transparent}
@media (max-width:760px){.ins-job{grid-template-columns:34px minmax(0,1fr)}.ins-job .ins-cycle,.ins-job>.m3-status{grid-column:2;justify-self:start}.ins-runs,.ins-detail td{padding-inline-start:16px}}
.ins-tl{display:flex;flex-direction:column}
.ins-tlday{font:var(--md-sys-typescale-label-medium);color:var(--md-sys-color-on-surface-variant);text-transform:uppercase;letter-spacing:.5px;padding:10px 0 4px}
.ins-ev{display:grid;grid-template-columns:70px 28px minmax(0,1fr);gap:10px;align-items:start;padding:8px 0;border-top:1px dashed var(--md-sys-color-outline-variant)}
.ins-tlday+.ins-ev{border-top:none}
.ins-ev time{color:var(--md-sys-color-on-surface-variant);font:var(--md-sys-typescale-body-small);font-variant-numeric:tabular-nums;padding-top:5px}
.ins-ev .ins-ico{width:28px;height:28px;border-radius:8px}
.ins-ev .ins-ico svg{width:15px;height:15px}
.ins-confirm{display:inline-flex;align-items:center;gap:var(--ed-space-2);flex-wrap:wrap;color:var(--st-error-fg);font-weight:500}
.ins-danger{background:var(--md-sys-color-error);color:var(--md-sys-color-on-error)}
.ins-gap{margin-top:var(--ed-space-5)}
.ins-g2--wide{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}
.ins-stack{display:flex;flex-direction:column;gap:var(--ed-space-3);min-width:0}
/* A call's request and answer, side by side; under each other when narrow. */
.ins-bodies{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:var(--ed-space-3)}
.ins-bodypart{min-width:0}
.ins-bodypart .row{justify-content:space-between;align-items:center}
.ins-body{margin:4px 0 0;max-height:320px;overflow:auto;padding:10px 12px;border-radius:var(--md-sys-shape-corner-small);border:1px solid var(--md-sys-color-outline-variant);background:var(--md-sys-color-surface);font:12px/1.5 var(--ed-font-mono, ui-monospace, monospace);white-space:pre-wrap;overflow-wrap:anywhere;text-align:left}
.ins-bodytag{display:inline-block;padding:0 6px;border-radius:6px;background:var(--st-info-bg);color:var(--st-info-fg);font:600 11px/18px inherit;vertical-align:middle}
.ins-rec{display:flex;align-items:center;gap:var(--ed-space-2);margin:var(--ed-space-2) 0;padding:8px 12px;border-radius:var(--md-sys-shape-corner-medium);background:var(--st-error-bg);color:var(--st-error-fg)}
.ins-rec>span:nth-child(2){flex:1}
.ins-rec-dot{width:10px;height:10px;border-radius:50%;background:currentColor;animation:ins-rec 1.4s ease-in-out infinite}
@keyframes ins-rec{50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.ins-rec-dot{animation:none}}
/* A person's timeline scrolls in its own panel, beside the list, instead of stretching the page. */
.ins-g2--wide>.ins-sec{position:sticky;top:var(--ed-space-3);max-height:calc(100vh - 120px);overflow:auto}
/* People: the panel is sized to the window (fitPeoplePanel); the page keeps only a small margin and the
   panel leaves room at its end for the chat button. */
.view:has(.ins-people){padding-bottom:var(--ed-space-3)}
.ins-people>.ins-sec{max-height:none;padding-bottom:72px}
@media (max-width:1100px){.ins-g2--wide{grid-template-columns:minmax(0,1fr)}}
.ins-kv bdi.mono{font-size:12px;font-weight:500;overflow-wrap:anywhere}
.ins-log{font:var(--md-sys-typescale-body-medium)}
@media (max-width:700px){.ins-sep{display:none}.ins-health{gap:var(--ed-space-1) var(--ed-space-2)}}

/* ---------- Plan (billing): header chip, banners, Settings › Plan, the buy dialog, the FBA lock ---------- */
.plan-chip{border:none;cursor:pointer;font:var(--md-sys-typescale-label-medium)}
.plan-card{display:flex;flex-direction:column;gap:var(--ed-space-2)}
.plan-top{display:flex;align-items:flex-start;gap:var(--ed-space-3);flex-wrap:wrap}
.plan-top .grow{flex:1;min-width:0}
.plan-label{display:block;font:var(--md-sys-typescale-label-medium);letter-spacing:.5px;text-transform:uppercase;color:var(--md-sys-color-on-surface-variant)}
.plan-name{font:var(--md-sys-typescale-headline-small)}
.plan-sub{margin:0;max-width:68ch}
.plan-meter{margin-top:var(--ed-space-3)}
.plan-meter .row{gap:var(--ed-space-2);flex-wrap:wrap}
.plan-bar{position:relative;height:12px;border-radius:6px;background:var(--md-sys-color-surface-container-high);margin-top:var(--ed-space-2)}
.plan-bar b{display:block;height:100%;border-radius:6px;background:var(--md-sys-color-primary)}
.plan-bar.is-warn b{background:var(--st-warning-fg)}
.plan-bar.is-bad b{background:var(--st-error-fg)}
.plan-bar i{position:absolute;top:-4px;bottom:-4px;width:2px;border-radius:1px;background:var(--md-sys-color-on-surface-variant)}
.plan-ticks{position:relative;height:18px;font:var(--md-sys-typescale-label-small);color:var(--md-sys-color-on-surface-variant)}
.plan-ticks span{position:absolute;transform:translateX(-50%);white-space:nowrap;margin-top:4px}
[dir="rtl"] .plan-ticks span{transform:translateX(50%)}
.plan-kv{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:var(--ed-space-3) var(--ed-space-5);margin:var(--ed-space-3) 0 0}
.plan-kv dt{font:var(--md-sys-typescale-label-medium);color:var(--md-sys-color-on-surface-variant)}
.plan-kv dd{margin:2px 0 0;font-weight:600}
.plan-actions{gap:var(--ed-space-2);margin-top:var(--ed-space-3)}
.plan-member{margin:var(--ed-space-3) 0 0}
.plan-pays,.plan-invoice{margin-top:var(--ed-space-5);padding-top:var(--ed-space-4);border-top:1px solid var(--md-sys-color-outline-variant)}
.plan-pays h3,.plan-invoice h3{margin:0 0 var(--ed-space-2);font:var(--md-sys-typescale-title-small)}
.plan-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:var(--ed-space-3)}
.plan-banner p{margin:0}
.plan-opts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--ed-space-3)}
@media (max-width:560px){.plan-opts{grid-template-columns:minmax(0,1fr)}}
.plan-opt{display:flex;flex-direction:column;gap:4px;text-align:start;padding:var(--ed-space-3) var(--ed-space-4);border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-sys-shape-corner-medium);background:var(--card);color:inherit;font:inherit;cursor:pointer}
.plan-opt .row{gap:var(--ed-space-2)}
.plan-opt[aria-pressed="true"]{border-color:var(--md-sys-color-primary);box-shadow:0 0 0 1px var(--md-sys-color-primary)}
.plan-price{font:var(--md-sys-typescale-headline-small);font-variant-numeric:tabular-nums}
.plan-feats{margin:4px 0 0;padding-inline-start:18px;color:var(--md-sys-color-on-surface-variant);font:var(--md-sys-typescale-body-small)}
.seg{display:inline-flex;flex:none;border:1px solid var(--md-sys-color-outline);border-radius:18px;overflow:hidden}
.seg button{height:34px;padding:0 14px;white-space:nowrap;border:none;background:transparent;color:var(--md-sys-color-on-surface-variant);font:var(--md-sys-typescale-label-large);cursor:pointer}
.seg button[aria-pressed="true"]{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container)}
.plan-note{margin:0;padding:var(--ed-space-2) var(--ed-space-3);border-radius:10px;background:var(--md-sys-color-surface-container);font:var(--md-sys-typescale-body-medium)}
.plan-sum{display:grid;grid-template-columns:1fr auto;gap:6px var(--ed-space-4);font-variant-numeric:tabular-nums}
.plan-sum .t{font-weight:700;border-top:1px solid var(--md-sys-color-outline-variant);padding-top:6px}
.plan-terms summary{cursor:pointer;color:var(--md-sys-color-primary);font:var(--md-sys-typescale-label-large)}
.plan-terms ul{margin:var(--ed-space-2) 0;padding-inline-start:18px;color:var(--md-sys-color-on-surface-variant);font:var(--md-sys-typescale-body-small)}
.plan-accept{gap:var(--ed-space-2);margin-top:var(--ed-space-2);flex-wrap:nowrap;align-items:flex-start}
.plan-accept input{margin-top:3px}
.plan-lock{display:grid;grid-template-columns:auto minmax(0,1fr);gap:var(--ed-space-4);align-items:start;padding:var(--ed-space-5);margin-top:var(--ed-space-3)}
.plan-lock h3{margin:0 0 6px}
.plan-lock p{margin:0;max-width:68ch}
.plan-lock-ico{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;background:var(--st-info-bg);color:var(--st-info-fg)}
.plan-lock-ico svg{width:24px;height:24px;fill:currentColor}
/* Insider view › Billing */
.stack-3{display:flex;flex-direction:column;gap:var(--ed-space-3);min-width:0}
.ins-h3{margin:var(--ed-space-4) 0 6px;font:var(--md-sys-typescale-title-small)}
.ins-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:var(--ed-space-2) var(--ed-space-3)}
.ins-field{display:grid;gap:4px;min-width:0}
.ins-field>span{font:var(--md-sys-typescale-label-medium);color:var(--md-sys-color-on-surface-variant)}
.ins-field .mini-search,.ins-field .ins-sel{width:100%;min-height:36px}
.ins-wide{grid-column:1/-1}
.ins-check{gap:var(--ed-space-2);flex-wrap:nowrap;align-items:flex-start}
.ins-check input{margin-top:3px}
.ins-hist{display:flex;flex-direction:column;gap:6px;font:var(--md-sys-typescale-body-small)}
.ins-hist>div{padding-inline-start:10px;border-inline-start:3px solid var(--md-sys-color-outline-variant)}

/* The demo: how to get out of it is always in view; the sign-in screen offers it */
.demo-banner{margin-bottom:var(--ed-space-3)}
.demo-banner p{margin:0}
.login-demo{margin-top:var(--ed-space-2)}
.plan-opt--info{cursor:default}

/* Prices on Amazon: the markup rules and the preview table */
.price-rules{display:flex;flex-direction:column;gap:var(--ed-space-2);margin-bottom:var(--ed-space-2)}
.price-rule{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:var(--ed-space-2);align-items:center}
.price-rule .field-error,.price-rule .price-rule-note{grid-column:1 / -1;margin:-4px 0 0}
.price-rule.is-bad select,.price-rule.is-bad input{border-color:var(--md-sys-color-error)}
.field-error{color:var(--md-sys-color-error)}
/* A long dialog scrolls under its buttons: Save stays in reach. */
.m3-dialog__actions{position:sticky;bottom:calc(var(--ed-space-5) * -1);margin-bottom:calc(var(--ed-space-5) * -1);padding:var(--ed-space-3) 0 var(--ed-space-5);background:inherit;z-index:1}
.price-rule select{min-height:40px;border:1px solid var(--md-sys-color-outline);border-radius:var(--md-sys-shape-corner-small);background:var(--card);color:var(--md-sys-color-on-surface);padding:0 10px;min-width:0}
.price-pct{display:inline-flex;align-items:center;gap:4px}
.price-pct input,.price-own{width:84px;min-height:36px;border:1px solid var(--md-sys-color-outline);border-radius:var(--md-sys-shape-corner-small);background:var(--card);color:var(--md-sys-color-on-surface);padding:0 8px}
.price-own{width:72px}
.price-table-wrap{overflow-x:auto;max-height:52vh;overflow-y:auto;border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-sys-shape-corner-medium);margin-top:var(--ed-space-2)}
.price-table{width:100%;border-collapse:collapse;font:var(--md-sys-typescale-body-medium)}
.price-table th{position:sticky;top:0;background:var(--md-sys-color-surface-container);text-align:start;padding:8px 10px;font:var(--md-sys-typescale-label-medium);color:var(--md-sys-color-on-surface-variant)}
.price-table td{padding:8px 10px;border-top:1px solid var(--md-sys-color-outline-variant);vertical-align:top}
.price-table td.num{font-variant-numeric:tabular-nums;white-space:nowrap}
.price-table tr.is-same td{color:var(--md-sys-color-on-surface-variant)}
.price-table .clamp1{max-width:280px}

/* ---------- The bell, what's new, feedback ---------- */
.bell-wrap{position:relative;display:inline-flex}
/* The badge sits over the round button's edge: let it show in full, and keep the hover tint round. */
.bell-btn{position:relative;overflow:visible}
.bell-btn::before{border-radius:inherit}
.bell-badge{position:absolute;top:0;inset-inline-end:-2px;box-sizing:border-box;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--md-sys-color-error);color:var(--md-sys-color-on-error);font:600 11px/18px var(--md-ref-typeface-plain);text-align:center;box-shadow:0 0 0 2px var(--md-sys-color-surface);pointer-events:none}
.bell-panel{position:absolute;top:calc(100% + 8px);inset-inline-end:-56px;width:min(400px,calc(100vw - 24px));background:var(--card);border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-sys-shape-corner-large);box-shadow:var(--md-sys-elevation-level3,0 12px 32px rgba(0,0,0,.18));z-index:40;overflow:hidden;text-align:start}
.bell-head{display:flex;align-items:center;gap:8px;padding:12px 12px 4px 16px}
.bell-head h2{margin:0;flex:1;font:var(--md-sys-typescale-title-medium)}
.bell-tabs{padding:0 8px}
.bell-tabs .m3-tab{height:40px}
.bell-list{max-height:min(560px,calc(100vh - 200px));overflow:auto}
.bell-item{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:12px;width:100%;padding:12px 16px;border:none;border-top:1px solid var(--md-sys-color-outline-variant);background:none;color:inherit;font:inherit;text-align:start;cursor:pointer}
.bell-item:first-child{border-top:none}
.bell-item:hover{background:color-mix(in srgb,var(--md-sys-color-primary) 5%,var(--card))}
.bell-item.is-unread{background:color-mix(in srgb,var(--md-sys-color-primary) 7%,var(--card))}
.bell-ico{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;font-weight:700}
.bell-ico--warn{background:var(--st-warning-bg);color:var(--st-warning-fg)}
.bell-ico--bad{background:var(--st-error-bg);color:var(--st-error-fg)}
.bell-ico--info{background:var(--st-info-bg);color:var(--st-info-fg)}
.bell-ico--ok{background:var(--st-success-bg);color:var(--st-success-fg)}
.bell-text b{display:block;font-weight:600}
.bell-go{color:var(--md-sys-color-primary)}
.bell-reason{display:block;color:var(--md-sys-color-on-surface-variant);margin:2px 0;overflow-wrap:anywhere}
.bell-item:focus-visible{outline:2px solid var(--md-sys-color-primary);outline-offset:-2px}
/* On a phone the panel spans the screen under the header, whatever the bell's place in it. */
@media (max-width:600px){.bell-panel{position:fixed;top:64px;inset-inline:12px;width:auto}.bell-list{max-height:calc(100vh - 220px)}}
.bell-side{display:grid;justify-items:end;gap:6px;white-space:nowrap}
.bell-dot{width:8px;height:8px;border-radius:50%;background:var(--md-sys-color-primary)}
.bell-empty{padding:24px 16px;text-align:center;margin:0}
.bell-foot{padding:10px 16px;border-top:1px solid var(--md-sys-color-outline-variant)}
.news-dot{width:8px;height:8px;border-radius:50%;background:var(--md-sys-color-error);margin-inline-start:auto;flex:none}
.news-dot--inline{display:inline-block;margin-inline-start:6px;vertical-align:middle}
.help-top{gap:var(--ed-space-2);margin-bottom:var(--ed-space-3)}
.news-list{padding:4px 20px}
.news-item{display:grid;grid-template-columns:120px minmax(0,1fr);gap:18px;padding:18px 0;border-top:1px solid var(--md-sys-color-outline-variant)}
.news-item:first-child{border-top:none}
.news-item h3{margin:0 0 4px;font:var(--md-sys-typescale-title-medium)}
.news-item p{margin:0}
.news-item ul{margin:6px 0 0;padding-inline-start:18px;color:var(--md-sys-color-on-surface-variant)}
.news-date{display:flex;flex-direction:column;align-items:flex-start;gap:6px;color:var(--md-sys-color-on-surface-variant);font:var(--md-sys-typescale-body-small)}
.news-open{padding-inline:0;margin-top:4px}
@media (max-width:600px){.news-item{grid-template-columns:minmax(0,1fr);gap:4px}}
.fb-kinds{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}
@media (max-width:520px){.fb-kinds{grid-template-columns:minmax(0,1fr)}}
.fb-kind{display:flex;flex-direction:column;gap:2px;text-align:start;padding:10px 12px;border:1px solid var(--md-sys-color-outline-variant);border-radius:12px;background:var(--card);color:inherit;font:inherit;cursor:pointer}
.fb-kind[aria-pressed="true"]{border-color:var(--md-sys-color-primary);box-shadow:0 0 0 1px var(--md-sys-color-primary)}
#fbText{width:100%;min-height:120px;resize:vertical}
.fb-drop{display:flex;align-items:center;gap:10px;margin-top:10px;padding:10px 12px;border:1px dashed var(--md-sys-color-outline);border-radius:12px;color:var(--md-sys-color-on-surface-variant);font:var(--md-sys-typescale-body-small);cursor:pointer}
.fb-drop input{position:absolute;width:1px;height:1px;opacity:0}
.fb-drop svg{width:18px;height:18px;fill:currentColor;transform:rotate(180deg)}
.fb-facts{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;margin:12px 0 0;padding:10px 12px;border-radius:10px;background:var(--md-sys-color-surface-container);font:var(--md-sys-typescale-body-small)}
.fb-facts dt{color:var(--md-sys-color-on-surface-variant)}
.fb-facts dd{margin:0}
.fb-msg{min-width:260px;white-space:pre-wrap}
.fb-shot{max-width:100%;max-height:420px;border:1px solid var(--md-sys-color-outline-variant);border-radius:10px}
.fb-field{display:flex;flex-direction:column;width:100%;max-width:none}
.fb-field textarea{width:100%;box-sizing:border-box}

/* five choices: under the text when the row is narrow */
.setrow--seg5{flex-wrap:wrap}
.setrow--seg5 > div:first-child{flex:1 1 320px}
.setrow--seg5 .seg button{padding:0 12px}
@media (max-width:600px){.setrow--seg5 .seg button{padding:0 7px;font-size:13px}}
.prices-history-head{margin-top:var(--ed-space-5)}

/* video: the frame holds the "Tap for sound" button over a muted video */
.clip-frame{position:relative}
.clip-sound{position:absolute;inset-inline-end:16px;top:16px;box-shadow:var(--md-sys-elevation-2, 0 2px 8px rgba(0,0,0,.25))}
/* where the video plays again: a pulse on the button and a bubble pointing at it */
@keyframes coachPulse{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--md-sys-color-primary) 45%,transparent)}100%{box-shadow:0 0 0 14px transparent}}
.coach-pulse{animation:coachPulse 1.2s ease-out 3}
@media (prefers-reduced-motion:reduce){.coach-pulse{animation:none;outline:2px solid var(--md-sys-color-primary);outline-offset:3px}}
.coach-tip{position:fixed;z-index:60;display:flex;flex-direction:column;gap:2px;max-width:280px;padding:10px 14px;border-radius:12px;
  background:var(--md-sys-color-inverse-surface,#2f3033);color:var(--md-sys-color-inverse-on-surface,#f1f0f4);font:var(--md-sys-typescale-body-medium);
  box-shadow:0 6px 20px rgba(0,0,0,.22);opacity:0;transform:translateY(-6px);transition:opacity .25s,transform .25s;pointer-events:none}
.coach-tip.on{opacity:1;transform:none}
.coach-tip b{font-weight:600}
.coach-tip::before{content:"";position:absolute;top:-6px;inset-inline-start:calc(var(--arrow,24px) - 6px);width:12px;height:12px;background:inherit;transform:rotate(45deg);border-radius:2px}
html[dir="rtl"] .coach-tip::before{inset-inline-start:auto;left:calc(var(--arrow,24px) - 6px)}
.demo-banner-actions{gap:var(--ed-space-2);flex-wrap:wrap}

/* Density (2026-11-09): a working tool with thousands of products shows more on one screen.
   The content area steps down one size on the type scale and its rows and cards tighten; the
   shared shell (side menu, top bar) stays as the design system has it. */
.view{font:var(--md-sys-typescale-body-medium);padding:var(--ed-space-4) var(--ed-space-5) 96px} /* 96px: the chat button sits bottom-right, the last row stays above it */
.page-title{font-size:20px;line-height:28px}
.section-title{font:var(--md-sys-typescale-title-small)}
.m3-card{padding:var(--ed-space-3) var(--ed-space-4)}
.big{font-size:26px;line-height:32px}
.stat-ico{width:30px;height:30px}
.stat-ico svg{width:17px;height:17px}
.li{min-height:52px;gap:var(--ed-space-3);padding-block:6px}
.li .l1{font:var(--md-sys-typescale-body-medium);font-weight:500}
.li .l2{font:var(--md-sys-typescale-body-small)}
.li .lead{width:32px;height:32px;font-size:11px}
.li--pair{padding-block:6px}
.pair .side{padding:4px var(--ed-space-3)}
.pair .side .l1{font-size:14px;line-height:20px}
.pair .side .l2{font-size:12px;line-height:18px}
.m3-tab{height:40px;padding-inline:12px}
.m3-chip{height:28px;padding-inline:12px;font:var(--md-sys-typescale-label-medium)}
.m3-btn{height:36px;padding-inline:18px}
.li .m3-btn,.li--pair > .row > .m3-btn{height:30px;min-height:30px;padding-inline:12px}
.search-field{min-height:40px}
.search-field input{font:var(--md-sys-typescale-body-medium)}
.attn-strip{padding-block:6px}
.li--pair > .row > .m3-btn{height:28px;min-height:28px}
.pair .side .l2 + .mt-2{margin-top:2px}
.setrow{padding-block:var(--ed-space-2)}
.setrow b{font:var(--md-sys-typescale-body-medium);font-weight:500}
.wh-chip{font-size:14px}
/* Products' intro and "Load products again" share a row; on a narrow screen they stack. */
.prod-what-row{flex-wrap:wrap}
.prod-what-row .prod-what{flex:1 1 0;min-width:280px}
.stat-more{display:block;margin-top:2px}
/* Density, continued (2026-11-09): the bell and the order drawer sit outside the content area,
   so they get the same step down; the drawer is wider for its line details. */
.bell-panel{font:var(--md-sys-typescale-body-medium);width:min(380px,calc(100vw - 24px))}
.bell-item{padding:10px 14px;gap:10px}
.bell-text b{font-weight:600;font-size:14px}
.sheet{font:var(--md-sys-typescale-body-medium);width:min(560px,100%);padding:var(--ed-space-4)}
.sheet h3{font-size:18px;line-height:24px}
/* Products: the intro takes the room beside "Load products again"; tools and actions share a row. */
.prod-what{margin:var(--ed-space-2) 0}
.prod-tools{margin-top:var(--ed-space-1);align-items:center}
.prod-tools .search-field{flex:1 1 260px;max-width:380px}
/* Home's checklist: shorter lines. */
.ready-line{padding-block:4px}
.ready-line .m3-btn{height:28px;min-height:28px;padding-inline:10px}
.prod-what-row .spacer{display:none}

/* Insider view, denser (2026-11-09): smaller figures, tighter cards, lists and tables. */
.ins-big{font-size:24px;line-height:30px}
.ins-big--sm{font-size:20px;line-height:26px}
.ins-tile,.ins-svc{padding:var(--ed-space-3) var(--ed-space-4)}
.ins-sec{padding:var(--ed-space-3) var(--ed-space-4)}
.ins-h2{font:var(--md-sys-typescale-title-small);margin-bottom:var(--ed-space-2)}
.ins-item{padding-block:var(--ed-space-2)}
.ins-item .m3-btn,.ins-table .m3-btn{height:30px;min-height:30px;padding-inline:12px}
.ins-table th{padding:8px 12px}
.ins-table td{padding:8px 12px;font:var(--md-sys-typescale-body-medium)}
.ins-tags .m3-status{height:22px;padding-inline:8px}
.ins-table td .m3-status{white-space:normal;height:auto;min-height:22px}
.ins-table td .m3-status{max-width:280px;line-height:18px;padding-block:2px}

/* A barcode stays with its label when the line wraps. */
.barcode { white-space: nowrap; }

/* Insider view: the SellerFlex test's raw answers from Amazon. */
.sf-out { max-height: 420px; overflow: auto; font-size: 12px; background: var(--md-sys-color-surface-container, #f3f3f3); padding: 8px; border-radius: 8px; white-space: pre-wrap; direction: ltr; text-align: left; }

/* Settings: the warehouses whose stock counts, as chips, and the tick list to change them. */
.count-wh { flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.row-edit--multi { display: grid; gap: 8px; min-width: min(420px, 100%); }
.count-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; max-height: 240px; overflow: auto; }
.count-pick { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.count-twice { margin: 0; padding: 8px 16px 12px; }

/* Matching by barcode: the note that takes the endings box's place. */
.barcode-note { margin: 0; max-width: 46ch; }
.ts-actions{margin:0 0 var(--ed-space-3)}

.ins-nocalls{display:block;margin-top:auto;padding-top:var(--ed-space-2)}

/* Billing: the line under a heading keeps clear of the fields; the price boxes line up (VAT has no hint under it). */
.ins-lead{margin-bottom:var(--ed-space-2)}
.ins-fields .ins-field{align-self:start}
.ins-fields .ins-field .mini-search{min-height:40px;height:40px}

/* Settings › Team: the roles at a glance, the people, then adding someone */
.team-legend{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--ed-space-3);padding-bottom:var(--ed-space-3);border-bottom:1px solid var(--md-sys-color-outline-variant)}
.team-legend>div{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
@media (max-width:760px){.team-legend{grid-template-columns:1fr}}
.team-row{display:flex;align-items:center;gap:var(--ed-space-3);padding:var(--ed-space-3) 0;border-bottom:1px solid var(--md-sys-color-outline-variant)}
.team-row p{margin:2px 0 0}
.team-role{width:150px;display:flex;justify-content:flex-end;flex:none}
.team-sel{width:150px}
.team-fixed{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:150px;height:36px;border-radius:999px;background:var(--st-info-bg, var(--md-sys-color-secondary-container));color:var(--st-info-fg, var(--md-sys-color-on-secondary-container));font:var(--md-sys-typescale-label-large);cursor:default}
.team-add{display:flex;align-items:center;justify-content:space-between;gap:var(--ed-space-3);flex-wrap:wrap;margin-top:var(--ed-space-3);padding:var(--ed-space-3);border-radius:12px;background:var(--md-sys-color-surface-container-low, var(--md-sys-color-surface))}
.team-add p{margin:2px 0 0}
.team-add .mail-input{width:260px}
.team-log{margin:var(--ed-space-2) 0 0;padding-inline-start:18px;display:grid;gap:4px}

/* Insider view, denser (2026-11-22): smaller figures and lines, tighter cards, so a screen holds more. */
.view--ops{font:var(--md-sys-typescale-body-small)}
.view--ops .ins-label{font:var(--md-sys-typescale-label-small);letter-spacing:.4px}
.view--ops .ins-big{font-size:20px;line-height:26px;font-weight:500}
.view--ops .ins-big--sm{font-size:18px;line-height:24px}
.view--ops .ins-sub{font:var(--md-sys-typescale-body-small);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.view--ops .ins-tile,.view--ops .ins-svc{padding:10px 14px;gap:2px}
.view--ops .ins-g4,.view--ops .ins-g3,.view--ops .ins-g2{gap:var(--ed-space-2)}
.view--ops .ins-sec{padding:10px 14px}
.view--ops .ins-h2{font:var(--md-sys-typescale-title-small)}
.view--ops .ins-item{padding-block:6px}
.view--ops .ins-item b{font-weight:600}
.view--ops .ins-day i{height:24px}
.view--ops .ins-fbar{grid-template-columns:96px minmax(0,1fr) 28px}
.view--ops .ins-fbar i{height:8px}
.view--ops .ins-tabs{margin-bottom:var(--ed-space-3)}
.view--ops .ins-table{font:var(--md-sys-typescale-body-small)}

/* Staff viewing a company: the banner stays at the top of every page */
.view-as-banner{position:sticky;top:0;z-index:5}

/* Billing: the companies on the left, the chosen one beside them; each side scrolls on its own. */
.bill-split{display:grid;grid-template-columns:minmax(260px,380px) minmax(0,1fr);gap:var(--ed-space-3);align-items:start}
.bill-list{padding:10px;display:flex;flex-direction:column;gap:8px;position:sticky;top:var(--ed-space-2);max-height:calc(100vh - 150px)}
.bill-items{overflow:auto;display:flex;flex-direction:column;gap:2px;min-height:0}
.bill-item{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border:0;border-radius:10px;background:none;color:inherit;font:inherit;text-align:start;cursor:pointer}
.bill-item:hover{background:var(--md-sys-color-surface-container-high)}
.bill-item.is-on{background:var(--md-sys-color-secondary-container)}
.bill-item .grow{display:flex;flex-direction:column;min-width:0}
.bill-item .grow b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bill-detail{min-width:0}
.bill-narrow{max-width:760px}
@media (max-width:1000px){.bill-split{grid-template-columns:minmax(0,1fr)}.bill-list{position:static;max-height:320px}}
/* A field hidden on purpose stays hidden, whatever its layout (Give a plan's Until box). */
.ins-field[hidden],[hidden]{display:none !important}

/* Ask Amazon: the request beside Amazon's answer */
/* Ask Amazon's picker: the kinds of call as tabs, that kind's calls as chips. */
.ask-groups{display:flex;flex-wrap:wrap;gap:2px;border-bottom:1px solid var(--md-sys-color-outline-variant)}
.ask-group{background:none;border:0;border-bottom:2px solid transparent;margin-bottom:-1px;padding:8px 12px;font:var(--md-sys-typescale-label-large);color:var(--md-sys-color-on-surface-variant);cursor:pointer;display:inline-flex;align-items:center;gap:6px;border-radius:0}
.ask-group[aria-selected="true"]{color:var(--md-sys-color-primary);border-bottom-color:var(--md-sys-color-primary)}
.ask-group .count{font:var(--md-sys-typescale-label-small);color:var(--md-sys-color-on-surface-variant)}
.ask-calls{display:flex;flex-wrap:wrap;gap:8px;margin-top:var(--ed-space-2)}
.ask-box .ins-fields{grid-template-columns:repeat(auto-fill,minmax(180px,260px))}
.ask-rep{margin-inline-start:6px;padding:0 6px;border-radius:999px;font:var(--md-sys-typescale-label-small);background:var(--md-sys-color-surface-container-high);color:var(--md-sys-color-on-surface-variant)}
.ask-box{border-top:1px solid var(--md-sys-color-outline-variant);padding-top:var(--ed-space-3)}
.ask-call{grid-column:span 2}
.ask-step + .ask-step{margin-top:var(--ed-space-3);padding-top:var(--ed-space-3);border-top:1px dashed var(--md-sys-color-outline-variant)}
.ask-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:var(--ed-space-3)}
@media (max-width:1100px){.ask-pair{grid-template-columns:minmax(0,1fr)}}
.ask-h{display:flex;align-items:center;gap:8px;font:var(--md-sys-typescale-title-small);margin-bottom:4px}
.ask-line{word-break:break-all;margin-bottom:4px}
.ask-pre{margin:6px 0 0;padding:10px;max-height:420px;overflow:auto;border-radius:8px;background:var(--md-sys-color-surface-container-high);font:12px/1.45 ui-monospace,Consolas,monospace;white-space:pre-wrap;word-break:break-word;direction:ltr;text-align:left}

/* The four ways of selling: tick cards, their colours, and what Edara does for each. */
.field-cards--kinds{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (max-width:700px){.field-cards--kinds{grid-template-columns:minmax(0,1fr)}}
.field-cards--kinds .field-card b .ship{font:var(--md-sys-typescale-label-small);margin-inline-start:6px}
.flex-loc{max-width:320px}
.flex-loc input{width:100%;text-transform:uppercase}
.ship--flex{color:var(--accent,#774988)}
.ship--easy{color:var(--st-warning-fg)}
.ship--afn{color:var(--st-info-fg)}
.li .lead.lead--flex{background:var(--accent-container,#f0daf9);color:var(--on-accent-container,#26132d)}
.li .lead.lead--easy{background:var(--st-warning-bg);color:var(--st-warning-fg)}
.wh-kinds{display:block;font:var(--md-sys-typescale-label-medium);color:var(--md-sys-color-on-surface-variant);margin-top:2px}
.kinds-do{margin-top:var(--ed-space-3)}
.kinds-do .table-wrap{overflow-x:auto;border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-sys-shape-corner-medium,12px);background:var(--card,#fff)}
.do-table{width:100%;border-collapse:collapse;min-width:640px;font:var(--md-sys-typescale-body-medium);table-layout:fixed}
.do-table thead th:first-child{width:17%}
.do-table th,.do-table td{padding:10px 12px;text-align:start;vertical-align:top;border-bottom:1px solid var(--md-sys-color-outline-variant)}
.do-table tr:last-child th,.do-table tr:last-child td{border-bottom:0}
.do-table thead th{font:var(--md-sys-typescale-label-medium);color:var(--md-sys-color-on-surface-variant);background:var(--md-sys-color-surface-container-low)}
.do-table tbody th{white-space:nowrap;font-weight:600}
.do-ok{color:var(--st-success-fg)}
.do-todo{color:var(--st-warning-fg)}

.ask-covers{margin:6px 0 0}

/* Ask Amazon's answer as a table: headers stay in view, wide reports scroll in their own box. */
.ask-tcount{margin:4px 0 6px}
.ask-twrap{overflow:auto;max-height:520px;border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-sys-shape-corner-medium,12px);background:var(--card,#fff)}
.ask-table{border-collapse:collapse;width:100%;font:var(--md-sys-typescale-body-small)}
.ask-table th{position:sticky;top:0;z-index:1;background:var(--md-sys-color-surface-container-low);text-align:start;padding:8px 10px;white-space:nowrap;font:var(--md-sys-typescale-label-medium);color:var(--md-sys-color-on-surface-variant);border-bottom:1px solid var(--md-sys-color-outline-variant)}
.ask-table td{padding:6px 10px;border-bottom:1px solid var(--md-sys-color-outline-variant);vertical-align:top}
.ask-table td.nowrap,.ask-table td.num{white-space:nowrap}
.ask-table td.wrap{min-width:220px;max-width:360px;overflow-wrap:anywhere}
.ask-table td.num{text-align:end;font-variant-numeric:tabular-nums}
.ask-table td .m3-status{white-space:nowrap}
/* "In the app" can be a sentence: it wraps inside its own column instead of running over the next ones. */
.ask-table td.ask-app{min-width:220px;max-width:320px}
.ask-table td.ask-app .m3-status{white-space:normal;height:auto;min-height:24px;padding-block:3px;line-height:1.35}
.ask-raw summary{cursor:pointer;color:var(--md-sys-color-primary);font:var(--md-sys-typescale-label-large);padding:6px 0}
.ask-table .clamp2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

.suggest--warn{background:var(--md-sys-color-warning-container,#fdf0d5);color:var(--md-sys-color-on-warning-container,#5c3c00)}

/* How they sell: Amazon's two groups, each with its ways, facts, warnings and warehouse. */
.ways{display:flex;flex-direction:column;gap:var(--ed-space-3);margin-top:var(--ed-space-2)}
.way-group{display:flex;flex-direction:column;gap:var(--ed-space-2);padding:var(--ed-space-3);border:1px solid var(--md-sys-color-outline-variant);border-radius:16px}
.way-group.is-on{border-color:var(--md-sys-color-primary);background:color-mix(in srgb,var(--md-sys-color-primary) 3%,transparent)}
.way-head{display:flex;align-items:center;gap:8px}
.way-head .ship{font:var(--md-sys-typescale-title-small)}
.way-code{font:var(--md-sys-typescale-label-medium);padding:2px 10px;border-radius:999px;background:var(--md-sys-color-surface-container-high);color:var(--md-sys-color-on-surface-variant);text-decoration:none;cursor:help}
.way-map,.way-facts{margin:0}
.way-wh{border-top:1px solid var(--md-sys-color-outline-variant);padding-top:var(--ed-space-2)}
.way-wh > .setrow:first-child{padding-top:0}
.way-wh .wh-card{border:0;padding:0}

/* How you sell, v2: Settings cards and setup questions. */
.ways-top{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--ed-space-3)}
.ways-top p{margin:2px 0 0}
.way-card{display:flex;flex-direction:column;gap:var(--ed-space-2);padding:var(--ed-space-3);border:1px solid var(--md-sys-color-outline-variant);border-radius:16px}
.way-card.is-on{border-color:var(--md-sys-color-primary)}
.way-card.is-off{padding-block:var(--ed-space-2)}
.way-card .way-head{flex-wrap:wrap}
.way-i{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;border:1px solid var(--md-sys-color-outline-variant);font:var(--md-sys-typescale-label-small);color:var(--md-sys-color-on-surface-variant);cursor:help}
.way-pills{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.way-pill{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 16px;border:1px solid var(--md-sys-color-outline-variant);border-radius:999px;cursor:pointer;font:var(--md-sys-typescale-label-large)}
.way-pill.is-on{border-color:var(--md-sys-color-primary);background:color-mix(in srgb,var(--md-sys-color-primary) 8%,transparent)}
.way-code-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.way-code-row input{width:120px;height:40px;box-sizing:border-box;border:1px solid var(--md-sys-color-outline);border-radius:8px;padding:0 12px;font:inherit;text-transform:uppercase;background:var(--md-sys-color-surface)}
.way-does{margin:0;border-top:1px solid var(--md-sys-color-outline-variant);padding-top:var(--ed-space-2)}
.ways-changes{margin:var(--ed-space-2) 0 0}
.ways-q{display:flex;flex-direction:column;gap:var(--ed-space-3)}
.way-q{border:0;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--ed-space-2);min-width:0}
.way-q legend{display:flex;align-items:center;gap:8px;font:var(--md-sys-typescale-title-small);margin-bottom:var(--ed-space-2)}
.q-n{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--md-sys-color-primary);color:var(--md-sys-color-on-primary);font:var(--md-sys-typescale-label-medium)}
.ways-q2{display:grid;gap:var(--ed-space-3)}
.ways-q2.is-two{grid-template-columns:repeat(2,minmax(0,1fr))}
.field-cards--stack{grid-template-columns:minmax(0,1fr)}
.ways-h{margin:0 0 var(--ed-space-2)}
@media (max-width:800px){.ways-q2.is-two{grid-template-columns:minmax(0,1fr)}}
