/* ==========================================================================
   n49 Blog — Add Article
   Responsive HTML/CSS build of the Adobe XD mockup "n49-step-by-step"
   --------------------------------------------------------------------------
   Contents
   1.  Design tokens
   2.  Reset / base
   3.  Layout shell
   4.  Site header
   5.  Stepper
   6.  Card
   7.  Progress bar (step 1)
   8.  Forms
   9.  Buttons
   10. Tags / chips
   11. Toggle switch
   12. Uploads & media option cards
   13. Alerts
   14. Business list (step 3)
   15. Business detail panel
   16. Finalize & publish (step 4)
   17. Articles dashboard (step 5)
   18. Utilities
   19. Responsive — tablet
   20. Responsive — mobile
   ========================================================================== */

/* ==========================================================================
   1. Design tokens
   ========================================================================== */
:root {
  /* Brand */
  --c-red:            #e7242a;
  --c-red-dark:       #cc1f24;
  --c-amber:          #f5b70e;
  --c-amber-dark:     #e0a600;
  --c-green:          #00a843;
  --c-green-dark:     #059139;
  --c-blue:           #1b7cd0;
  --c-blue-dark:      #1568b1;

  /* Neutrals */
  --c-text:           #333333;
  --c-text-strong:    #222222;
  --c-text-muted:     #7a7a7a;
  --c-text-subtle:    #9b9b9b;
  --c-placeholder:    #a9a9a9;
  --c-tagline:        #3b3b3b;  /* "Powered by You" */
  --c-error:          #c81e23;  /* validation text + borders */
  --c-error-ring:     rgba(200, 30, 35, .12);
  --c-ink:            #2e2d2d;  /* "Added Businesses", drag handles */
  --c-link:           #167ace;  /* "Drag to reorder" */
  --c-icon-danger:    #ec2028;  /* supplied delete + verified marks */
  --c-rating:         #3b3b3b;  /* rating score + review count */
  --c-biz-bg:         #f9f9f9;  /* Added Businesses card background */
  --c-biz-border:     #dcdcdc;

  --c-page:           #f9f9f9;
  --c-surface:        #ffffff;
  --c-surface-alt:    #f9f9f9;
  --c-border:         #e5e5e5;
  --c-border-strong:  #d9d9d9;
  --c-border-soft:    #eeeeee;
  --c-track:          #e9e9e9;

  /* Tints */
  --c-blue-tint:      #e9f3fd;
  --c-blue-tint-2:    #eff7fe;
  --c-blue-border:    #c5e0f7;
  --c-green-tint:     #eefbf2;
  --c-green-border:   #cdead8;
  --c-red-tint:       #fde9ea;

  /* Typography */
  --font-sans: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI",
               "Helvetica Neue", Arial, sans-serif;

  --fs-11: 11px;
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-14: 14px;
  --fs-15: 15px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-20: 20px;
  --fs-24: 24px;
  --fs-28: 28px;

  /* Spacing */
  --sp-4:  4px;
  --sp-8:  8px;
  --sp-12: 12px;
  --sp-16: 16px;
  --sp-20: 20px;
  --sp-24: 24px;
  --sp-32: 32px;
  --sp-40: 40px;

  /* Shape */
  --r-sm:  4px;
  --r-md:  6px;
  --r-lg:  8px;
  --r-pill: 999px;

  --shadow-card: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-header: 0 1px 0 rgba(0, 0, 0, .06);

  /* Metrics */
  --header-h:      80px;
  --shell-max:     1440px;
  --shell-pad:     28px;
  --card-max:      992px;
  --card-pad-x:    44px;
  --field-h:       46px;
  --control-h:     38px;
}

/* ==========================================================================
   2. Reset / base
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--c-page);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* the [hidden] attribute must beat component display rules (.btn, .card …) */
[hidden] { display: none !important; }

h1, h2, h3, h4, h5, h6, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--c-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--c-blue);
  outline-offset: 2px;
}

/* Page title shown under the header on small screens only */
.mobile-title { display: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   3. Layout shell
   ========================================================================== */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--shell-pad);
}

.page-main {
  padding: 32px var(--shell-pad) 64px;
}

.page-main > .card,
.page-main > .stack { margin: 0 auto; }

/* ==========================================================================
   4. Site header
   ========================================================================== */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border-soft);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-20);
  min-height: var(--header-h);
}

/* The header bar spans the viewport on every page. Its inner padding still
   comes from .shell, so the logo keeps its 28px gutter.
   .site-header--boxed re-caps it at --shell-max if a page ever needs that. */
.site-header > .shell { max-width: none; }
.site-header--boxed > .shell { max-width: var(--shell-max); }

.brand {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.brand__link { display: block; line-height: 0; }

/* client-supplied logo: natural size 80 × 25.063 */
.brand__mark { width: 80px; height: 25.06px; }

.brand__tagline {
  font-size: var(--fs-11);
  color: var(--c-tagline);
  line-height: 1;
  padding-bottom: 2px;
  white-space: nowrap;
}

.site-header__title {
  font-size: var(--fs-18);
  font-weight: 700;
  color: var(--c-text-strong);
  margin-left: 22px;
  white-space: nowrap;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-20);
  margin-left: auto;
}

.site-header__link {
  color: var(--c-text);
  font-size: var(--fs-14);
}
.site-header__link:hover { color: var(--c-red); text-decoration: none; }

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--c-text);
  font-size: var(--fs-14);
}

/* client-supplied avatar: draws its own ring and figure, no background needed */
.user-menu__avatar {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
/* client-supplied arrow: 12 × 6, own fill (#2e2d2d) */
.user-menu__caret {
  width: 12px;
  height: 6px;
  flex-shrink: 0;
  margin-top: 1px; /* optical centring against the cap height of "Nikko" */
}

/* Mobile nav toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
  padding: 0;
  place-items: center;
  margin-left: auto;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* ==========================================================================
   5. Stepper
   ========================================================================== */
.stepper {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border-soft);
}

.stepper__inner {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 26px 0 30px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 120px;
  flex-shrink: 0;
}

.step__icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--c-amber);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.step__icon svg { width: 22px; height: 22px; }

.step--done .step__icon { background: var(--c-green); }

.step__num {
  font-size: var(--fs-12);
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.3;
}

.step__label {
  font-size: var(--fs-14);
  color: var(--c-text);
  line-height: 1.4;
  white-space: nowrap;
}

.step-line {
  flex: 0 1 104px;
  height: 2px;
  background: var(--c-border-strong);
  margin-top: 23px;
  min-width: 24px;
}
.step-line--done { background: var(--c-green); }

/* ==========================================================================
   6. Card
   ========================================================================== */
.card {
  width: 100%;
  max-width: var(--card-max);
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  /* visible so popovers (date picker calendar, category/author + business
     autocompletes) aren't clipped by the card edge */
  overflow: visible;
}

.card__body { padding: var(--sp-40) var(--card-pad-x); }

.card__title {
  font-size: var(--fs-24);
  font-weight: 700;
  color: var(--c-text-strong);
  letter-spacing: -.2px;
}

.card__subtitle {
  font-size: var(--fs-14);
  color: var(--c-text-muted);
  margin-top: 6px;
}

.card__header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-16);
  flex-wrap: wrap;
}

.card__footer {
  display: flex;
  align-items: center;
  gap: var(--sp-16);
  padding: 20px var(--card-pad-x);
  border-top: 1px solid var(--c-border-soft);
}

.card__footer-status {
  flex: 1;
  text-align: center;
  font-size: var(--fs-14);
  color: var(--c-text-muted);
}

.card__footer-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-12);
}

/* Keeps "Step x of y" optically centred when only one side has buttons */
.card__footer > .btn:first-child + .card__footer-status { text-align: center; }

/* ==========================================================================
   7. Progress bar (step 1 micro-progress)
   ========================================================================== */
.progress {
  display: flex;
  gap: 12px;
  margin: 22px 0 0;
}

.progress__seg {
  flex: 1;
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--c-track);
}
.progress__seg.is-filled { background: var(--c-green); }

.progress + .field-group,
.progress + .field { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--c-border-soft); }

/* ==========================================================================
   8. Forms
   ========================================================================== */
.field { margin-top: 26px; }
.field:first-child { margin-top: 0; }

/* Section titles (Categories, Authors, Publication Date, Description,
   Visual Media) sit exactly 20px below the block above them.
   `margin-top: 0` cancels the 26px rhythm `.field` would otherwise add, so
   the gap is the padding and nothing else. */
.field--section {
  margin-top: 0;
  padding-top: 20px;
}
/* nothing inside may reintroduce a top margin above the title */
.field--section > .field__label:first-child,
.field--section > label.field__label:first-child { margin-top: 0; }

.field__label {
  display: block;
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--c-text-strong);
}

.field__hint {
  font-size: var(--fs-14);
  color: var(--c-text-muted);
  margin-top: 2px;
}

.field__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-16);
  flex-wrap: wrap;
}

.input,
.textarea,
.select {
  display: block;
  width: 100%;
  height: var(--field-h);
  padding: 0 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: var(--fs-14);
  color: var(--c-text);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.input::placeholder,
.textarea::placeholder { color: var(--c-placeholder); }

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--c-blue);
  box-shadow: 0 0 0 3px rgba(27, 124, 208, .12);
}

.textarea {
  height: auto;
  min-height: 120px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.6;
}

.field__control { margin-top: 10px; }

/* required marker + validation error state */
.required-mark {
  color: var(--c-error);
  margin-left: 3px;
  font-weight: 700;
}

.field__error {
  margin-top: 7px;
  font-size: var(--fs-13);
  color: var(--c-error);
}

.field.has-error .input,
.field.has-error .textarea,
.field.has-error .icon-btn,
.field.has-error .datepicker__input {
  border-color: var(--c-error);
}
.field.has-error .input:focus,
.field.has-error .textarea:focus,
.field.has-error .datepicker__input:focus {
  border-color: var(--c-error);
  box-shadow: 0 0 0 3px var(--c-error-ring);
}
.field.has-error .datepicker__icon { color: var(--c-error); }
.field.has-error .field__label { color: var(--c-error); }

/* no native datalist arrow or search-field decorations on this input */
[data-ac-input]::-webkit-calendar-picker-indicator,
[data-ac-input]::-webkit-search-decoration,
[data-ac-input]::-webkit-search-cancel-button,
[data-ac-input]::-webkit-search-results-button { display: none !important; }
[data-ac-input] { appearance: none; -webkit-appearance: none; }

/* input + adjacent square action button */
.input-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.input-row .input { flex: 1; }

.icon-btn {
  width: var(--field-h);
  height: var(--field-h);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  color: var(--c-text-muted);
}
.icon-btn:hover { border-color: var(--c-border-strong); color: var(--c-text); }
.icon-btn svg { width: 18px; height: 18px; }

/* input with trailing icon (date picker) */
.input-affix { position: relative; margin-top: 10px; }
.input-affix .input { padding-right: 44px; }
.input-affix__icon {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--c-text-muted);
  pointer-events: none;
}

/* ==========================================================================
   Publication Date picker  (see js/datepicker.js)
   ========================================================================== */
.datepicker {
  position: relative;
  margin-top: 10px;
}

.datepicker__input {
  padding-right: 44px;
  cursor: pointer;
  background: var(--c-surface);
}
.datepicker__input:read-only { color: var(--c-text); }

.datepicker__icon {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  padding: 0;
  color: var(--c-text-muted);
}
.datepicker__icon svg { width: 18px; height: 18px; }
.datepicker.is-open .datepicker__input { border-color: var(--c-blue); box-shadow: 0 0 0 3px rgba(27, 124, 208, .12); }
.datepicker.is-open .datepicker__icon { color: var(--c-blue); }

.datepicker__panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  width: 296px;
  max-width: 100%;
  padding: 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .10), 0 2px 6px rgba(0, 0, 0, .06);
}

.datepicker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.datepicker__title {
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--c-text-strong);
}
.datepicker__nav {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  color: var(--c-text);
  padding: 0;
}
.datepicker__nav:hover { border-color: var(--c-border-strong); background: #fbfbfb; }
.datepicker__nav svg { width: 14px; height: 14px; }

.datepicker__dow,
.datepicker__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.datepicker__dow {
  margin-bottom: 4px;
  font-size: var(--fs-11);
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--c-text-muted);
  text-align: center;
}

.datepicker__day {
  height: 34px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  font-size: var(--fs-13);
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
}
.datepicker__day:hover { background: #f2f2f2; }
.datepicker__day.is-outside { color: var(--c-text-subtle); }
.datepicker__day.is-today { box-shadow: inset 0 0 0 1px var(--c-border-strong); }
.datepicker__day.is-selected {
  background: var(--c-amber);
  color: #fff;
  font-weight: 700;
  box-shadow: none;
}
.datepicker__day.is-selected:hover { background: var(--c-amber-dark); }

.datepicker__foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--c-border-soft);
}
.datepicker__action {
  border: 0;
  background: none;
  padding: 4px 2px;
  font-size: var(--fs-13);
  color: var(--c-text-muted);
}
.datepicker__action:hover { color: var(--c-text); text-decoration: underline; }
.datepicker__action--strong { color: var(--c-blue); font-weight: 700; }

/* --------------------------------------------------------------------------
   Autocomplete ("Search for Business")
   The list is absolutely positioned, so opening it never pushes the page down.
   -------------------------------------------------------------------------- */
.autocomplete { position: relative; }

.autocomplete__list {
  position: absolute;
  z-index: 45;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 264px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .10), 0 2px 6px rgba(0, 0, 0, .06);
}

.autocomplete__item {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: var(--fs-14);
  color: var(--c-text);
  cursor: pointer;
}
.autocomplete__item:hover,
.autocomplete__item.is-active {
  background: var(--c-blue-tint);
  color: var(--c-link);
}
.autocomplete__item:focus-visible { outline: 2px solid var(--c-blue); outline-offset: -2px; }

.autocomplete__empty {
  padding: 10px 12px;
  font-size: var(--fs-13);
  color: var(--c-text-muted);
}

.autocomplete.is-open .input { border-color: var(--c-blue); }

/* permalink line */
.permalink {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-16);
  margin-top: 10px;
  font-size: var(--fs-13);
  flex-wrap: wrap;
}
.permalink__label { font-weight: 700; color: var(--c-text-strong); }
.permalink__url { color: var(--c-text-muted); word-break: break-all; }
.permalink__value { flex: 1; min-width: 0; }
.permalink__edit { font-size: var(--fs-13); color: var(--c-blue); }

/* permalink — edit mode */
.permalink__editor {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.permalink__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  font-size: var(--fs-13);
}
.permalink__editor-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.permalink.is-editing .permalink__value,
.permalink.is-editing .permalink__edit { display: none; }

/* two column form grid */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* ==========================================================================
   9. Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--control-h);
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: var(--fs-13);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 16px; height: 16px; }

.btn--amber { background: var(--c-amber); color: #fff; }
.btn--amber:hover { background: var(--c-amber-dark); }

.btn--red {
  background: var(--c-red);
  color: #fff;
  border-radius: var(--r-pill);
  height: 40px;
  padding: 0 24px;
  font-weight: 500;
  font-size: var(--fs-14);
}
.btn--red:hover { background: var(--c-red-dark); }

.btn--blue { background: var(--c-blue); color: #fff; }
.btn--blue:hover { background: var(--c-blue-dark); }

.btn--ghost {
  background: var(--c-surface);
  border-color: var(--c-border-strong);
  color: var(--c-text);
  font-weight: 700; /* client: all grey outline buttons bold (Q&A1 Sep 2026) */
}
.btn--ghost:hover { border-color: #bdbdbd; background: #fcfcfc; }

.btn--muted {
  background: var(--c-track);
  color: var(--c-text-subtle);
  cursor: not-allowed;
}

/* solid white plate — used by "Visit Detail Page" so it reads as a button
   whatever sits behind it */
.btn--white {
  background-color: #ffffff;
  background-image: none;
}
.btn--white:hover { background-color: #ffffff; border-color: #bdbdbd; }

.btn--block { width: 100%; }
.btn--sm { height: 32px; padding: 0 14px; font-size: var(--fs-12); }
.btn--wide { min-width: 88px; }

.btn[disabled],
.btn[aria-disabled="true"] {
  background: var(--c-track);
  color: var(--c-text-subtle);
  border-color: transparent;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-inline { margin-top: 22px; }

/* dashed full-width "add" button */
.btn-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: var(--fs-13);
  font-weight: 500;
  color: var(--c-text);
}
.btn-add:hover { border-color: var(--c-border-strong); background: #fcfcfc; }
.btn-add svg { width: 15px; height: 15px; }

/* ==========================================================================
   10. Tags / chips
   ========================================================================== */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
/* no stray gap while the list is empty */
.tags:empty { display: none; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--c-blue-tint);
  color: var(--c-blue);
  font-size: var(--fs-13);
}

.tag__remove {
  background: none;
  border: 0;
  padding: 0;
  line-height: 1;
  color: inherit;
  opacity: .75;
  font-size: var(--fs-13);
}
.tag__remove:hover { opacity: 1; }

.pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-12);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.pill--published { background: #d6f3e2; color: #0d7a3d; }
.pill--pending   { background: var(--c-red-tint); color: #c92a2a; }
.pill--draft     { background: #fff6e1; color: #f2b11d; }

/* ==========================================================================
   11. Toggle switch
   ========================================================================== */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-16);
  margin-top: 26px;
  padding: 16px 20px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
}

.switch-row__title {
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--c-text-strong);
}
.switch-row__hint {
  font-size: var(--fs-13);
  color: var(--c-text-muted);
  margin-top: 2px;
}

.switch-row__control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.switch-row__state { font-size: var(--fs-13); color: var(--c-text); }

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  margin: 0;
  cursor: pointer;
}
.switch__track {
  position: absolute;
  inset: 0;
  background: var(--c-border-strong);
  border-radius: var(--r-pill);
  transition: background-color .18s ease;
  pointer-events: none;
}
.switch__track::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform .18s ease;
}
.switch input:checked + .switch__track { background: var(--c-blue); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 3px rgba(27,124,208,.25); }

/* ==========================================================================
   12. Uploads & media option cards
   ========================================================================== */
.dropzone {
  display: grid;
  place-items: center;
  min-height: 116px;
  margin-top: 12px;
  padding: 20px;
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: var(--fs-14);
  width: 100%;
  text-align: center;
}
.dropzone:hover { border-color: var(--c-blue); background: #fbfdff; }
.dropzone__inner { display: flex; align-items: center; gap: 10px; }
.dropzone svg { width: 18px; height: 18px; color: var(--c-text); }
.dropzone--sm { min-height: 92px; }

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 12px;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
  text-align: left;
  width: 100%;
}
.option-card:hover { border-color: var(--c-border-strong); }

.option-card__icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #f1f1f1;
  color: var(--c-text);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.option-card__icon svg { width: 17px; height: 17px; }

.option-card__text { display: block; min-width: 0; }

.option-card__title {
  display: block;
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--c-text-strong);
}
.option-card__hint {
  display: block;
  font-size: var(--fs-13);
  color: var(--c-text-muted);
  margin-top: 1px;
}

.option-card.is-selected {
  background: var(--c-blue-tint-2);
  border-color: var(--c-blue-border);
}
.option-card.is-selected .option-card__title,
.option-card.is-selected .option-card__hint { color: var(--c-blue); }
.option-card.is-selected .option-card__icon { background: #dceafa; color: var(--c-blue); }

/* ==========================================================================
   13. Alerts
   ========================================================================== */
.alert {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  font-size: var(--fs-13);
  margin-top: 24px;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.alert__title { font-weight: 700; }
.alert__text { margin-top: 1px; }

.alert--success {
  background: var(--c-green-tint);
  border: 1px solid var(--c-green-border);
  color: var(--c-green-dark);
}

/* ==========================================================================
   14. Business list (step 3)
   ========================================================================== */
.panel {
  margin-top: 24px;
  padding: 22px 24px;
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-md);
}
.panel__title { font-size: var(--fs-14); font-weight: 700; color: var(--c-text-strong); }
.panel__hint { font-size: var(--fs-14); color: var(--c-text-muted); margin-top: 2px; }

.empty-state {
  margin-top: 24px;
  padding: 44px 24px;
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-md);
  text-align: center;
}
.empty-state__icon {
  width: 48px; height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--c-amber);
  color: #fff;
  display: grid;
  place-items: center;
}
.empty-state__icon svg { width: 22px; height: 22px; }
.empty-state__title { font-size: var(--fs-18); font-weight: 700; color: var(--c-text-strong); }
.empty-state__text { font-size: var(--fs-14); color: var(--c-text-muted); margin-top: 4px; }

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-12);
  margin-top: 30px;
}
.list-toolbar__label {
  font-size: var(--fs-12);
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--c-ink);
}
.list-toolbar__action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  padding: 0;
  font-size: var(--fs-13);
  color: var(--c-link);
}
.list-toolbar__action svg { width: 14px; height: 14px; color: var(--c-link); }

.biz-list { display: flex; flex-direction: column; gap: 16px; margin-top: 14px; }

.biz {
  border: 1px solid var(--c-biz-border);
  border-radius: var(--r-md);
  background: var(--c-biz-bg);
  overflow: hidden;
}

.biz__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}

.biz__drag {
  color: var(--c-ink);
  cursor: grab;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  touch-action: none;
}
.biz__drag:active { cursor: grabbing; }
.biz__drag svg { width: 12px; height: 18px; }

/* drag-and-drop feedback */
.biz.is-dragging {
  opacity: .55;
  border-color: var(--c-blue);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
}
.biz-list.is-sorting .biz { transition: transform .12s ease; }
.biz.is-moved { animation: bizFlash .4s ease; }
@keyframes bizFlash {
  from { background: var(--c-blue-tint); }
  to   { background: var(--c-biz-bg); }
}

/* fallback reorder buttons */
.biz__move {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  margin-right: 2px;
}
.biz__move-btn {
  width: 22px;
  height: 15px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--c-border);
  border-radius: 3px;
  background: var(--c-surface);
  color: var(--c-ink);
}
.biz__move-btn:hover:not(:disabled) { border-color: var(--c-border-strong); background: #fafafa; }
.biz__move-btn:disabled { opacity: .35; cursor: not-allowed; }
.biz__move-btn svg { width: 11px; height: 11px; }

/* clickable business name */
.biz__name-btn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.biz__name-btn:hover { color: var(--c-link); }

/* search panel flash when jumped to from "Add New Business" */
.panel.is-highlight {
  box-shadow: 0 0 0 2px var(--c-blue-border);
  transition: box-shadow .2s ease;
}

.media-row.is-new { animation: mediaFlash .4s ease; }
@keyframes mediaFlash {
  from { background: var(--c-blue-tint); }
  to   { background: var(--c-surface); }
}

.biz__num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--c-blue);
  color: #fff;
  font-size: var(--fs-12);
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.biz__name {
  font-size: var(--fs-16);
  font-weight: 700;
  color: var(--c-text-strong);
  margin-right: auto;
}

.biz__actions { display: flex; align-items: center; gap: 10px; }

.biz__icon-btn {
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  padding: 0;
  color: var(--c-text-muted);
}
.biz__icon-btn svg { width: 16px; height: 16px; }
.biz__icon-btn--danger { color: var(--c-red); }

/* the supplied delete icon draws its own frame — the button adds nothing */
.biz__icon-btn--plain {
  width: auto;
  height: auto;
  border: 0;
  background: none;
  padding: 0;
  display: inline-flex;
  line-height: 0;
  border-radius: var(--r-sm);
}
.biz__icon-btn--plain svg { width: 32px; height: 32px; }
.biz__icon-btn--plain:hover .icon--delete { color: var(--c-red-dark); }

/* the supplied +/− marks draw their own disc */
.biz__toggle {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: none;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  flex-shrink: 0;
  line-height: 0;
}
.biz__toggle svg { width: 20px; height: 20px; }

.biz__body {
  padding: 22px 18px;
  border-top: 1px solid rgba(0, 0, 0, .10);
}
.biz.is-collapsed .biz__body { display: none; }

/* ==========================================================================
   15. Business detail panel
   ========================================================================== */
.biz-detail__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-16);
  flex-wrap: wrap;
}

.biz-detail__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-24);
  font-weight: 700;
  color: var(--c-text-strong);
}
.biz-detail__title svg { width: 22px; height: 22px; }

.biz-detail__cta { display: flex; align-items: center; gap: 8px; }

/* -----------------------------------------------------------------------
   Client-supplied SVG icon set
   Every glyph scales from its viewBox and takes its colour from
   `currentColor`, so a utility class or any CSS rule can recolour it.
   ----------------------------------------------------------------------- */
.svg-icon {
  display: block;
  flex-shrink: 0;
}
.icon--delete { color: var(--c-icon-danger); }
.icon--check  { color: var(--c-icon-danger); }
.icon--share  { color: #000000; }
.icon--toggle { color: var(--c-ink); }
/* .icon--brand and .icon--flag keep their own brand colours */

/* delivery-partner marks */
.brand-mark {
  display: inline-flex;
  line-height: 0;
  border-radius: 8px;
}
.brand-mark:hover { opacity: .88; text-decoration: none; }

.chip-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 0;
  color: #fff;
  font-size: var(--fs-11);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chip-btn--reserve  { background: var(--c-red); border-radius: var(--r-pill); padding: 0 20px; font-size: var(--fs-13); font-weight: 500; }

.rating-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;   /* was 8px — tightened by 5px */
  font-size: var(--fs-13);
  flex-wrap: wrap;
}
.stars { display: inline-flex; gap: 1px; color: var(--c-amber); }
.stars svg { width: 13px; height: 13px; }
.rating-line__score { font-weight: 700; color: var(--c-rating); }
.rating-line__count { color: var(--c-rating); }
.rating-line__link { color: var(--c-red); font-weight: 700; }

.source-ratings {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: var(--fs-13);
}
.source-rating { display: inline-flex; align-items: center; gap: 6px; color: var(--c-rating); }
.source-rating b { font-weight: 700; }
.source-rating__logo { width: 20px; height: 20px; }

.biz-meta {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--c-border-soft);
  border-bottom: 1px solid var(--c-border-soft);
  font-size: var(--fs-13);
  font-weight: 700;
  color: var(--c-text);
}
.biz-meta__item { display: inline-flex; align-items: center; gap: 7px; }
.biz-meta__item svg { width: 15px; height: 15px; color: var(--c-red); }
.biz-meta__item a.biz-meta__link { color: #333333; }          /* client: website link #333333 */
.biz-meta__item a.biz-meta__link:hover { text-decoration: underline; }
/* view-articles: delete action */
.btn--danger { color: var(--c-red); border-color: var(--c-red); }
.btn--danger:hover { background: #fff5f5; border-color: var(--c-red-dark, #c9161d); }
.biz-meta__price { color: var(--c-text-muted); margin-left: auto; letter-spacing: 1px; }
.biz-meta__price b { color: var(--c-text-strong); font-weight: 700; }

.social-icons { display: flex; gap: 10px; margin-top: 16px; }
.social-icons a {
  display: inline-flex;
  line-height: 0;
  border-radius: 50%;
}
.social-icons a:hover { opacity: .75; }
.social-icons .social-icon { width: 31px; height: 31px; }

.media-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-md);
  margin-top: 16px;
}
.media-row__handles {
  display: flex;
  align-items: flex-start;   /* top-align with the "Social Posts" heading */
  gap: 8px;
  padding-top: 0;
}
.media-row__handles .biz__drag svg { width: 11px; height: 16px; }
/* the supplied share icon draws its own grey disc */
.media-row__badge {
  display: inline-flex;
  line-height: 0;
}
.media-row__badge svg { width: 34px; height: 34px; }
.media-row__main { flex: 1; min-width: 0; }
.media-row__label { font-size: var(--fs-13); font-weight: 700; color: var(--c-text-strong); }
/* the delete control lines up with the row's input and matches its height:
   19.5px label line + 10px control gap = 30px, then 46px tall like .input */
.media-row__delete {
  margin-top: 30px;
  align-self: flex-start;
}
.media-row__delete .svg-icon { width: 46px; height: 46px; }
/* keep the image row's dropzone on the same top line as a URL input */
.media-row .dropzone { margin-top: 10px; }

.media-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

/* ==========================================================================
   16. Finalize & publish (step 4)
   ========================================================================== */
.preview-box {
  margin-top: 24px;
  padding: 58px 24px;
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-md);
  text-align: center;
}
.preview-box__icon {
  width: 44px; height: 44px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--c-amber);
  color: #fff;
  display: grid;
  place-items: center;
}
.preview-box__icon svg { width: 20px; height: 20px; }
.preview-box__title { font-size: var(--fs-18); font-weight: 700; color: var(--c-text-strong); }
.preview-box__text { font-size: var(--fs-14); color: var(--c-text-muted); margin-top: 6px; }
.preview-box .btn { margin-top: 18px; }

/* ==========================================================================
   17. Articles dashboard (step 5)
   ========================================================================== */
.dash {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 0;
  width: 100%;
  max-width: none;             /* full-bleed below the header */
  margin: 0;
  min-height: calc(100vh - var(--header-h));
  background: var(--c-surface);
}

.dash__side {
  padding: 24px 20px;
  border-right: 1px solid var(--c-border-soft);
}

.side-nav { display: flex; flex-direction: column; gap: 6px; }
.side-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  color: var(--c-text);
  font-size: var(--fs-14);
}
.side-nav__item:hover { background: #f4f4f4; text-decoration: none; }
.side-nav__item svg { width: 16px; height: 16px; }
.side-nav__item.is-active { background: var(--c-blue-tint); color: var(--c-blue); }

.dash__main {
  padding: 26px 30px 48px;
  background: var(--c-page);   /* #f9f9f9 — right-hand panel only */
}

.dash__title { font-size: var(--fs-16); font-weight: 700; color: var(--c-text-strong); }
.dash__subtitle { font-size: var(--fs-14); color: var(--c-text-muted); margin-top: 2px; }

.dash__toolbar {
  display: flex;
  gap: 16px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.dash__toolbar .dash__search { flex: 1 1 320px; min-width: 0; }
.dash__toolbar .input { flex: 1 1 320px; }
.dash__search .input { flex: none; width: 100%; }

.select-wrap { position: relative; flex: 0 0 200px; }
.select-wrap .select { padding-left: 40px; appearance: none; }
.select-wrap__icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--c-text-muted);
  pointer-events: none;
}
.select-wrap__caret {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  display: flex;
  pointer-events: none;
}
/* same asset as the header user menu: 12 × 6, own #2e2d2d fill */
.select-wrap__caret .user-menu__caret { width: 12px; height: 6px; margin: 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.stat {
  padding: 16px 20px;
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-md);
  background: var(--c-surface);
}
.stat__label { font-size: var(--fs-13); color: var(--c-text); }
.stat__value { font-size: var(--fs-24); font-weight: 700; color: var(--c-text-strong); margin-top: 4px; }
.stat__value--green { color: var(--c-green); }
.stat__value--red { color: var(--c-red); }
.stat__value--amber { color: #f2b11d; }
.stat[data-stat-filter] { cursor: pointer; user-select: none; transition: border-color .15s, box-shadow .15s; }
.stat[data-stat-filter]:hover { border-color: var(--c-blue); }
.stat.is-active { border-color: var(--c-blue); box-shadow: 0 0 0 2px var(--c-blue-tint); }

/* Banner images (up to 3): thumbnails + dashed add box */
.banner-list { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.banner-thumb { position: relative; width: 300px; max-width: 100%; height: 96px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--c-border-soft); background: #f4f4f4; }
.banner-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-thumb__remove { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: #fff; color: var(--c-red); cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.banner-thumb__remove svg { width: 18px; height: 18px; }
.dropzone--banner { width: 300px; max-width: 100%; height: 96px; min-height: 96px; margin: 0; }

.table-wrap {
  margin-top: 24px;
  background: var(--c-surface);   /* white card on the grey panel */
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-md);
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: var(--fs-13);
}
.table th {
  text-align: left;
  font-weight: 700;
  color: var(--c-text-strong);
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-border-soft);
  white-space: nowrap;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f4f4f4;
  color: var(--c-text);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfbfb; }

.table__title-cell { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.table__drag {
  color: var(--c-ink);
  display: grid;
  place-items: center;
  cursor: grab;
  touch-action: none;
}
.table__drag:active { cursor: grabbing; }
.table tr.is-dragging { opacity: .5; background: var(--c-blue-tint); }
.table tr.is-moved { animation: mediaFlash .4s ease; }
.table__drag svg { width: 12px; height: 16px; }
.table__actions { display: flex; gap: 8px; }

.table-footnote { font-size: var(--fs-13); color: var(--c-text-muted); margin-top: 16px; }

/* ==========================================================================
   18. Utilities
   ========================================================================== */
.mt-0  { margin-top: 0 !important; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.text-muted { color: var(--c-text-muted); }
.divider { height: 1px; background: var(--c-border-soft); margin: 24px 0; border: 0; }

.artboard-nav {
  max-width: var(--card-max);
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--fs-13);
  color: var(--c-text-muted);
}
.artboard-nav a { color: var(--c-blue); }

/* ==========================================================================
   19. Responsive — tablet / iPad  (<= 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  :root {
    --shell-pad: 24px;
    --card-pad-x: 32px;
    --header-h: 72px;
  }

  .site-header__title { font-size: var(--fs-16); margin-left: 16px; }
  .site-header__actions { gap: 14px; }

  .stepper__inner { padding: 22px 0 24px; }
  .step { width: 104px; }
  .step__icon { width: 44px; height: 44px; margin-bottom: 10px; }
  .step__icon svg { width: 20px; height: 20px; }
  .step-line { flex: 1 1 40px; min-width: 16px; margin-top: 21px; }
  .step__label { font-size: var(--fs-13); }

  .card__body { padding: 32px var(--card-pad-x); }
  .card__title { font-size: var(--fs-20); }
  .card__footer { padding: 18px var(--card-pad-x); }

  .page-main { padding: 24px var(--shell-pad) 48px; }

  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash { grid-template-columns: 220px minmax(0, 1fr); }
  .dash__main { padding: 22px 24px 40px; }
}

/* Narrow tablets / large phones */
@media (max-width: 860px) {
  .site-header__title {
    margin-left: 0;
    flex: 1 1 100%;
    order: 3;
    font-size: var(--fs-15);
  }
  .site-header__inner { flex-wrap: wrap; padding: 12px var(--shell-pad); }
  .site-header__actions { margin-left: auto; }

  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash__side {
    border-right: 0;
    border-bottom: 1px solid var(--c-border-soft);
    padding: 14px 20px;
  }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
  .side-nav__item { padding: 9px 14px; }
}

/* ==========================================================================
   20. Responsive — mobile  (<= 640px)
   ========================================================================== */
@media (max-width: 640px) {
  :root {
    --shell-pad: 16px;
    --card-pad-x: 18px;
    --field-h: 44px;
    --header-h: 64px;
  }

  body { font-size: var(--fs-14); }

  /* Header collapses: brand + burger, actions in a drawer */
  .site-header__inner {
    flex-wrap: nowrap;
    padding: 10px var(--shell-pad);
    gap: 12px;
    min-height: var(--header-h);
  }
  .brand__mark { width: 64px; height: 20.05px; }
  .brand__tagline { display: none; }
  .site-header__title { display: none; }

  .nav-toggle { display: grid; }

  .site-header__actions {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    z-index: 30;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px var(--shell-pad) 16px;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border-soft);
    box-shadow: 0 8px 16px rgba(0, 0, 0, .06);
  }
  .site-header { position: relative; }
  .site-header.is-open .site-header__actions { display: flex; }
  .site-header__actions .btn--red { width: 100%; }
  .site-header__link { padding: 10px 2px; }
  .user-menu { padding: 8px 2px; }

  /* Mobile page title under the header */
  .mobile-title {
    display: block;
    background: var(--c-surface);
    padding: 14px var(--shell-pad) 0;
    font-size: var(--fs-16);
    font-weight: 700;
    color: var(--c-text-strong);
  }

  /* Stepper becomes a horizontally scrollable rail */
  .stepper__inner {
    justify-content: flex-start;
    padding: 16px var(--shell-pad) 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .stepper__inner::-webkit-scrollbar { display: none; }
  .stepper .shell { padding: 0; }
  .step { width: 86px; }
  .step__icon { width: 38px; height: 38px; margin-bottom: 8px; }
  .step__icon svg { width: 17px; height: 17px; }
  .step__num { font-size: var(--fs-11); }
  .step__label { font-size: var(--fs-12); white-space: normal; }
  .step-line { flex: 0 0 24px; min-width: 24px; margin-top: 18px; }

  .page-main { padding: 16px var(--shell-pad) 40px; }

  .card { border-radius: var(--r-md); }
  .card__body { padding: 22px var(--card-pad-x); }
  .card__title { font-size: var(--fs-18); }
  .card__subtitle { font-size: var(--fs-13); }

  .progress { gap: 6px; margin-top: 16px; }
  .progress + .field,
  .progress + .field-group { margin-top: 18px; padding-top: 18px; }

  .field { margin-top: 20px; }
  .field__hint, .field__label { font-size: var(--fs-13); }

  .card__footer {
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px var(--card-pad-x);
  }
  .card__footer-status { order: -1; flex-basis: 100%; text-align: center; }
  .card__footer-actions { flex: 1 1 auto; justify-content: flex-end; }
  .card__footer .btn { flex: 1 1 auto; }

  .artboard-nav { flex-direction: column; align-items: flex-start; gap: 6px; }

  .grid-2,
  .option-grid,
  .media-actions { grid-template-columns: minmax(0, 1fr); gap: 12px; }

  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 12px 14px; }
  .stat__value { font-size: var(--fs-20); }

  .datepicker__panel { width: 100%; left: 0; right: 0; }
  .datepicker__day { height: 38px; }

  .permalink { font-size: var(--fs-12); }
  .permalink__editor { flex-wrap: wrap; }
  .permalink__input { flex: 1 1 100%; }
  .permalink__editor-actions { flex: 1 1 100%; }
  .permalink__editor-actions .btn { flex: 1 1 auto; }

  .biz__head { flex-wrap: wrap; gap: 10px; }
  .biz__name { font-size: var(--fs-15); flex: 1 1 auto; }
  .biz__actions { flex: 1 1 100%; justify-content: flex-end; flex-wrap: wrap; }
  .biz__body { padding-left: 14px; padding-right: 14px; }

  .biz-detail__title { font-size: var(--fs-18); }
  .biz-detail__cta { flex-wrap: wrap; }
  .biz-meta { gap: 12px 18px; }
  .biz-meta__price { margin-left: 0; }

  .media-row { flex-wrap: wrap; padding: 14px; gap: 10px; }
  .media-row__handles { padding-top: 0; order: 1; }
  .media-row__delete { margin-top: 0; order: 2; margin-left: auto; }
  .media-row__main { order: 3; flex: 1 1 100%; }

  .list-toolbar { flex-wrap: wrap; gap: 8px; }

  .empty-state, .preview-box { padding: 32px 18px; }

  .dash__main { padding: 18px var(--shell-pad) 36px; }
  .dash__toolbar { gap: 12px; }
  .select-wrap { flex: 1 1 100%; }
}

@media (max-width: 380px) {
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .card__footer .btn { width: 100%; }
  .card__footer-actions { width: 100%; }
}

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
  .site-header__actions, .artboard-nav, .nav-toggle { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* --- backend wiring additions (collapsed actions, autocomplete meta, tag suggestions) --- */
.biz.is-collapsed .biz__actions > :not(.biz__toggle) { display: none; }
.autocomplete__item .ac-src { display:inline-block; font-size:11px; font-weight:700; padding:1px 6px; border-radius:10px; background:#eef2f7; color:#516; margin-right:6px; vertical-align:1px; }
.autocomplete__item .ac-src--google { background:#e8f0fe; color:#1a73e8; }
.autocomplete__item .ac-src--n49 { background:#fdecec; color:var(--c-red); }
.autocomplete__item .ac-addr { color:var(--c-text-muted); font-size:12px; }
.tag-suggest { position:relative; list-style:none; margin:6px 0 0; padding:6px; border:1px solid var(--c-border,#dcdcdc); border-radius:8px; background:#fff; box-shadow:0 6px 20px rgba(0,0,0,.08); z-index:20; max-height:240px; overflow:auto; }
.tag-suggest__item { padding:8px 10px; border-radius:6px; cursor:pointer; font-size:14px; }
.tag-suggest__item:hover { background:#f3f6fb; }
.dropzone.has-image { padding:8px; }

/* social post live embed preview (backend.js) */
.n49-social-preview { margin-top: 10px; border-radius: 6px; overflow: hidden; }
.n49-social-preview:empty { display: none; }
.n49-social-preview iframe { display: block; width: 100%; border: 1px solid #ececec; border-radius: 6px; background: #fafafa; }
.n49-social-hint { display: block; padding: 10px 12px; font-size: 12px; color: #7a7a7a; background: #fafafa; border: 1px solid #ececec; border-radius: 6px; }

/* view-articles: drag handle + dragging row (viewarticles.js) */
.table__drag { cursor: grab; }
.table__drag:active { cursor: grabbing; }
.table tr.is-dragging { opacity: .45; background: #f2f7ff; }

/* user menu dropdown (ui.js) */
.user-menu__anchor { position: relative; display: inline-flex; align-items: center; }
.user-menu__dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  min-width: 190px; background: #fff; border: 1px solid #e6e6e6; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 6px;
}
.user-menu__dropdown[hidden] { display: none; }
.user-menu__item {
  display: block; padding: 9px 12px; font-size: 14px; color: #333;
  text-decoration: none; border-radius: 6px; white-space: nowrap;
}
.user-menu__item:hover { background: #f4f4f4; }
.user-menu__anchor.is-open .user-menu__caret { transform: rotate(180deg); }
.user-menu__head { text-align: center; padding: 14px 12px 10px; border-bottom: 1px solid #efefef; margin-bottom: 6px; }
.user-menu__head img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid #eee; display: inline-block; }
.user-menu__initial { width: 56px; height: 56px; border-radius: 50%; background: #ec2028; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 24px; }
.user-menu__name { font-weight: 700; font-size: 14px; color: #3b3b3b; margin: 8px 0 0; }
.user-menu__count { background: #ec2028; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; margin-left: 6px; }
img.user-menu__avatar { border-radius: 50%; object-fit: cover; border: 2px solid #eee; box-sizing: border-box; }
span.user-menu__avatar { border-radius: 50%; background: #ec2028; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }

/* pointer sorting (business cards, media rows, article table) */
.biz-list.is-sorting, [data-media-list].is-sorting, [data-sortable-rows].is-sorting {
  user-select: none; -webkit-user-select: none;
}
.biz.is-dragging, .media-row.is-dragging, .table tr.is-dragging { cursor: grabbing; }
.media-row.is-dragging { opacity: .55; }
.table__drag { touch-action: none; }

/* permalink availability (backend.js checkSlug) */
.permalink__avail { margin-left: 8px; font-size: 12px; font-weight: 700; color: #1f9d55; white-space: nowrap; }
.permalink__avail.is-taken { color: var(--c-red); }

/* Q&A1 slide 6 mobile tweaks */
@media (max-width: 640px) {
  /* 1a. tighter stepper so Step 4 fits on screen */
  .stepper__inner { padding: 14px 10px 16px; justify-content: space-between; }
  .step { width: 66px; }
  .step-line { flex: 0 0 10px; min-width: 10px; }
  /* 1b. "Available" left-aligned under the permalink */
  .permalink__value { flex: 1 1 100%; }
  .permalink__avail { display: block; width: 100%; text-align: left; margin-top: 4px; }
  /* 2 & 4. trash and (+) icons sit above the buttons on business cards */
  .biz__actions { justify-content: flex-start; }
  .biz__actions .biz__icon-btn,
  .biz__actions .biz__toggle { order: -1; }
  .biz__actions .btn { flex: 1 1 100%; }
  /* 3. less space after the fields */
  .biz__body .field { margin-top: 12px; }
  .biz__body .field__control + .field__hint { margin-top: 4px; }
  /* 5. "+ Add Article" left-aligned */
  .side-nav__item { justify-content: flex-start; text-align: left; }
  /* 6. cut-off titles wrap to a second line instead of being clipped */
  .table td { white-space: normal; word-break: break-word; }
}
