/* Fusion CMS admin, second generation.
   Tokens from the Webbhuset design system (Claude Design project), layout from the
   "Fusion CMS Admin — prototype" artboard: 1d header, 1b rail, 1a three panes. */

:root {
  --c-taxi-black-500: #000000;
  --c-taxi-black-400: #212121;
  --c-taxi-black-300: #3a3a3a;
  --c-white: #ffffff;
  --c-grey-100: #f4f4f4;
  --c-grey-200: #e4e4e4;
  --c-grey-400: #8a8a8a;
  --c-grey-600: #5a5a5a;
  --c-pink-500: #fd00d9;
  --c-pink-400: #ff3ce2;
  --c-pink-100: #ffe3fb;
  --c-pink-50: #fdeafb;
  --c-amber-500: #f1ac13;
  --c-amber-400: #ffbe36;
  --c-green: #1f9d55;

  /* Everything a model does is blue, and only that: pink is the editor's own
     actions, so the colour says who is about to act. */
  --c-ai-500: #2563eb;
  --c-ai-400: #3b82f6;
  --c-ai-700: #1d4ed8;
  --c-ai-100: #d8e3fb;
  --c-ai-50: #eff5ff;
  --c-red: #d33;

  --surface-tint: var(--c-grey-100);
  --text-heading: var(--c-taxi-black-400);
  --text-body: var(--c-taxi-black-400);
  --text-muted: var(--c-grey-400);
  --border-hairline: var(--c-grey-200);
  --border-on-dark: rgba(255, 255, 255, .25);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-pill: 2em;
  --shadow-card: 0 2px 10px rgba(0, 0, 0, .06);
  --shadow-menu: 0 8px 26px rgba(0, 0, 0, .24);
  --shadow-modal: 0 20px 60px rgba(0, 0, 0, .3);

  --font-sans: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fw-light: 300;
  --fw-regular: 400;
  --fw-semibold: 600;
  --ease-brand: cubic-bezier(.4, 0, .2, 1);
  --dur-fast: .15s;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--c-grey-100);
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
}

#cms-admin-main { height: 100%; }

input, textarea, button, select { font-family: var(--font-sans); color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; text-align: left; }
a { color: var(--c-pink-500); text-decoration: none; }
a:hover { color: var(--c-pink-400); }
::selection { background: var(--c-pink-50); }

.app {
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--c-grey-100);
}

/* ---------- top bar (1d) ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  background: var(--c-taxi-black-500);
  color: var(--c-white);
  flex: none;
}
.topbar__logo { font-weight: var(--fw-semibold); font-size: 12px; letter-spacing: .18em; }
.topbar__spacer { flex: 1; }

.pick {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: var(--fw-light);
  color: var(--c-white);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-brand);
}
.pick:hover { background: rgba(255, 255, 255, .09); }
.pick-pair { display: inline-flex; align-items: center; gap: 2px; }
.pick-pair__arrow { color: rgba(255, 255, 255, .45); font-size: 10px; padding: 0 1px; }
.pick__caret { opacity: .5; }
.pick--role { background: var(--c-amber-500); color: var(--c-taxi-black-500); border-color: var(--c-amber-500); font-weight: var(--fw-semibold); font-size: 11px; }
.pick--role:hover { background: var(--c-amber-400); }
.pick--role .pick__caret { opacity: .55; }
.pick--small { font-size: 11px; padding: 5px 11px; }

.menu {
  position: absolute;
  top: 34px;
  left: 0;
  min-width: 190px;
  background: var(--c-white);
  color: var(--text-body);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-menu);
  padding: 5px 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  cursor: default;
}
.menu--right { left: auto; right: 0; }
.menu--wide { min-width: 250px; }
.menu__item {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: var(--fw-light);
  cursor: pointer;
  width: 100%;
  color: var(--text-body);
}
.menu__item:hover { background: var(--c-grey-100); }
.menu__item--active { font-weight: var(--fw-regular); }
.menu__item--stack { flex-direction: column; gap: 2px; align-items: stretch; padding: 8px 13px; }
.menu__item--stack .menu__title { font-weight: var(--fw-semibold); font-size: 11px; }
.menu__grow { flex: 1; }
.menu__note { font-size: 10px; color: var(--c-grey-400); white-space: nowrap; }
.menu__footer {
  margin-top: 4px;
  border-top: 1px solid #f0f0f0;
  padding: 8px 13px;
  font-size: 10px;
  font-weight: var(--fw-semibold);
  color: var(--c-pink-500);
  cursor: pointer;
}
.menu__footer:hover { color: var(--c-pink-400); }

/* ---------- body ---------- */

.body { flex: 1; display: flex; min-height: 0; }

/* rail (1b) */
.rail {
  width: 58px;
  background: var(--c-taxi-black-400);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 0;
  flex: none;
}
.rail__item {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  font-size: 9px;
  font-weight: var(--fw-light);
  color: rgba(255, 255, 255, .55);
  transition: background-color var(--dur-fast) var(--ease-brand), color var(--dur-fast) var(--ease-brand);
}
.rail__item:hover { color: var(--c-white); }
.rail__item--active { background: rgba(255, 255, 255, .16); color: var(--c-white); font-weight: var(--fw-semibold); }
.rail__spacer { flex: 1; }

.editor { flex: 1; display: flex; min-width: 0; }

/* find pane (1a left) */
.find {
  width: 262px;
  background: var(--c-white);
  border-right: 1px solid #dcdcdc;
  display: flex;
  flex-direction: column;
  flex: none;
}
.find__head {
  padding: 11px 12px 9px;
  border-bottom: 1px solid #ededed;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.find__title-row { display: flex; align-items: baseline; gap: 7px; }
.eyebrow {
  font-size: 10px;
  font-weight: var(--fw-semibold);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-grey-400);
}
.eyebrow--tiny { font-size: 9px; }
.find__count { font-size: 10px; color: #a0a0a0; }
.find__search {
  height: 29px;
  border: 1px solid #d8d8d8;
  border-radius: var(--radius-pill);
  padding: 0 13px;
  font-size: 12px;
  font-weight: var(--fw-light);
  outline: none;
  width: 100%;
}
.find__search:focus { border-color: var(--c-pink-500); }
.find__modes { display: flex; gap: 6px; }
.find__list { flex: 1; overflow-y: auto; padding: 5px 0; }
.find__empty { padding: 26px 18px; text-align: center; font-size: 12px; line-height: 1.6; color: #9a9a9a; }
.find__foot {
  padding: 10px 12px;
  border-top: 1px solid #ededed;
  display: flex;
  align-items: center;
  gap: 8px;
}
.find__legend { font-size: 10px; line-height: 1.5; color: #a0a0a0; }

.row {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  padding: 7px 11px;
  border-left: 2px solid transparent;
  width: 100%;
  color: var(--text-body);
}
.row:hover { background: #fafafa; }
.row--active { background: var(--c-pink-50); border-left-color: var(--c-pink-500); }
.row--active .row__label { font-weight: var(--fw-regular); }
.row--deleted .row__label { text-decoration: line-through; color: #9a9a9a; }
.row__caret { width: 10px; font-size: 10px; color: #b0b0b0; flex: none; }
.row__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: var(--fw-light);
}
.row__label--dir { color: var(--c-grey-600); }
.dots { display: flex; gap: 3px; flex: none; }
.dot { width: 6px; height: 6px; border-radius: 50%; border: 1px solid #c8c8c8; }
.dot--on { background: var(--c-taxi-black-400); border-color: var(--c-taxi-black-400); }
.badge {
  display: inline-flex;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: var(--fw-semibold);
  color: var(--c-white);
  background: var(--c-grey-400);
  flex: none;
}
.badge--M { background: var(--c-pink-500); }
.badge--N { background: var(--c-green); }
.badge--D { background: var(--c-grey-400); }
.badge--err { background: var(--c-red); }

/* pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  font-size: 10px;
  font-weight: var(--fw-light);
  background: transparent;
  color: var(--c-grey-600);
  border: 1px solid #d8d8d8;
  transition: background-color var(--dur-fast) var(--ease-brand), color var(--dur-fast) var(--ease-brand), border-color var(--dur-fast) var(--ease-brand);
}
.pill:hover { border-color: var(--c-taxi-black-400); color: var(--c-taxi-black-400); }
.pill--active { background: var(--c-taxi-black-400); color: var(--c-white); border-color: var(--c-taxi-black-400); font-weight: var(--fw-semibold); }
.pill--active:hover { color: var(--c-white); }
.pill--tight { padding: 4px 9px; }
.pill--pink { background: var(--c-pink-500); color: var(--c-white); border-color: var(--c-pink-500); font-weight: var(--fw-semibold); font-size: 11px; padding: 7px 15px; }
.pill--pink:hover { background: var(--c-pink-400); border-color: var(--c-pink-400); color: var(--c-white); }
.pill--disabled { opacity: .45; pointer-events: none; }
.pill--block { display: flex; justify-content: center; width: 100%; padding: 7px 0; font-size: 10.5px; }
.pill--act { flex: 1; justify-content: center; padding: 6px 0; font-weight: var(--fw-semibold); }
.pill--danger:hover { border-color: var(--c-red); color: var(--c-red); }
.pill--outline-dark { border-color: rgba(255, 255, 255, .3); color: var(--c-white); font-weight: var(--fw-semibold); padding: 4px 11px; }
.pill--outline-dark:hover { background: rgba(255, 255, 255, .12); color: var(--c-white); border-color: rgba(255, 255, 255, .3); }
.pill--white { background: var(--c-white); color: var(--c-taxi-black-400); border-color: var(--c-white); font-weight: var(--fw-semibold); padding: 4px 12px; }
.pill--white:hover { color: var(--c-taxi-black-400); }
.pill--ghost-dark { background: rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .6); border-color: transparent; font-weight: var(--fw-semibold); padding: 4px 12px; }
.pill--ghost-dark:hover { color: rgba(255, 255, 255, .6); border-color: transparent; }
.segmented { display: flex; border: 1px solid #d8d8d8; border-radius: var(--radius-pill); overflow: hidden; }
.segmented__item { padding: 3px 11px; cursor: pointer; font-size: 10px; font-weight: var(--fw-light); color: var(--c-grey-600); }
.segmented__item--active { background: var(--c-taxi-black-400); color: var(--c-white); font-weight: var(--fw-semibold); }

.step {
  flex: 1;
  height: 23px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 10px;
  font-weight: var(--fw-light);
  color: #9a9a9a;
  border: 1px solid #d8d8d8;
  min-width: 0;
}
.step:hover { border-color: var(--c-pink-500); color: var(--c-pink-500); }
.step--active { background: var(--c-pink-500); color: var(--c-white); border-color: var(--c-pink-500); font-weight: var(--fw-semibold); }
.steps { display: flex; gap: 4px; }

/* work area */
.work { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.work__bar {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 15px;
  background: var(--c-white);
  border-bottom: 1px solid #dcdcdc;
  flex: none;
  min-width: 0;
  overflow: hidden;
}
.work__kind { font-size: 11px; color: var(--c-grey-400); }
.work__path { font-size: 13px; font-weight: var(--fw-regular); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work__view { font-size: 10px; color: #a0a0a0; }
/* Kept in the layout but not shown, so the controls beside it stay put. */
.work__held { visibility: hidden; pointer-events: none; }
.work__spacer { flex: 1; }
.work__surface { flex: 1; overflow-y: auto; min-height: 0; position: relative; }
.tag {
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: var(--fw-semibold);
  background: var(--c-pink-50);
  color: var(--c-pink-500);
  white-space: nowrap;
}
.tag--err { background: #fdecec; color: var(--c-red); }
.tag--ok { background: #e8f6ee; color: #1f6b43; }
.tag--warn { background: #fff3cd; color: #8a6300; }
.tag--muted { background: #f0f0f0; color: var(--c-grey-600); }

/* empty state */
.empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px;
  text-align: center;
}
.empty__title { font-size: 20px; color: var(--c-grey-600); }
.empty__row { display: flex; gap: 8px; align-items: center; }
.empty__body { font-size: 13px; line-height: 1.6; color: #9a9a9a; max-width: 46ch; }

/* structure view */
.structure { padding: 20px; display: flex; justify-content: center; }
.canvas { width: 100%; max-width: 900px; transition: max-width .2s var(--ease-brand); }
.canvas--phone { max-width: 390px; }
.node {
  position: relative;
  border-radius: 5px;
  cursor: pointer;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dcdcdc;
  background: #fafafa;
}
.node--section { padding: 14px; border: 1.5px dashed #d0d0d0; background: transparent; }
.node--depth0 { border-color: #b8b8b8; }
.node--root { border: 1.5px dashed #9a9a9a; border-radius: 6px; padding: 16px; background: var(--c-white); }
.node--selected { border: 2px solid var(--c-pink-500) !important; background: #fffafe; }
.node--hidden { opacity: .55; }
.node--grow { flex: 1 1 0; }
.node--fixed { flex: none; }
.node--plain { border-color: transparent; background: transparent; }
.node__tag {
  position: absolute;
  top: -9px;
  left: 9px;
  padding: 0 6px;
  border-radius: 3px;
  background: var(--c-white);
  color: #a0a0a0;
  font-size: 9px;
  font-weight: var(--fw-semibold);
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: calc(100% - 18px);
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1;
}
.node--selected > .node__tag { background: var(--c-pink-500); color: var(--c-white); padding: 2px 7px; }
.node__inner { margin-top: 4px; display: flex; flex-direction: column; min-width: 0; }
.node__inner--row { flex-direction: row; align-items: center; }
.node__inner--wrap { flex-wrap: wrap; }
.node__inner--grid { display: grid; }
.node__inner--free { flex-direction: row; justify-content: flex-end; }
.node__inner--group { flex-direction: column; }
.node__el { margin-top: 6px; font-size: 11.5px; line-height: 1.5; color: var(--c-grey-400); overflow: hidden; text-overflow: ellipsis; }
.node__el--text { color: var(--text-body); }
.node__el--h1 { font-size: 20px; }
.node__el--h2 { font-size: 16px; }
.node__el--h3 { font-size: 14px; }
.node__el img { max-height: 90px; max-width: 100%; border-radius: 4px; display: block; }
.node__add { padding: 14px; text-align: center; cursor: pointer; width: 100%; }
.node__add span {
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  border: 1px dashed #c0c0c0;
  font-size: 10px;
  font-weight: var(--fw-semibold);
  color: var(--c-grey-600);
}
.node__add:hover span { border-color: var(--c-pink-500); color: var(--c-pink-500); }
.node__collapsed { margin-top: 6px; font-size: 10px; color: #9a9a9a; }

/* document view */
.doc { background: var(--c-white); min-height: 100%; padding: 30px 0; }
.doc__inner { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* The page as the copywriter sees it: the designer's placement, none of the
   designer's furniture. Sections have no outline at all — the arrangement is
   what shows where a text sits, and the storefront tab is the real preview. */
.doc__page { max-width: 760px; margin: 0 auto 22px; padding: 0 16px; }
.doc__page--phone { max-width: 390px; }
.doc__box { display: flex; flex-direction: column; min-width: 0; }
.doc__box--hidden { opacity: .45; }
.node__inner--row.doc__box { flex-direction: row; align-items: flex-start; }
.node__inner--wrap.doc__box { flex-wrap: wrap; }
.node__inner--grid.doc__box { display: grid; }
.node__inner--group.doc__box, .node__inner--free.doc__box { display: flex; flex-direction: column; }
.doc__el { min-width: 0; border-radius: 5px; cursor: text; }
.doc__el--grow { flex: 1; }
.doc__el--selected { box-shadow: 0 0 0 2px var(--c-pink-50); }
.doc__text {
  width: 100%;
  border: none;
  border-bottom: 1px solid transparent;
  background: transparent;
  font: inherit;
  color: inherit;
  padding: 3px 0;
  line-height: 1.35;
}
.doc__text:hover { border-bottom-color: #ededed; }
.doc__text:focus { border-bottom-color: var(--c-pink-500); outline: none; }
.doc__text--h1 { font-size: 30px; font-weight: var(--fw-light); }
.doc__text--h2 { font-size: 21px; }
.doc__text--h3 { font-size: 17px; }
.doc__text--h4 { font-size: 15px; }
.doc__text--rich { font-family: ui-monospace, Menlo, monospace; font-size: 12px; line-height: 1.6; resize: vertical; border: 1px solid #ededed; border-radius: 6px; padding: 9px 10px; }
.doc__img { display: flex; flex-direction: column; gap: 5px; }
.doc__img img { max-width: 100%; border-radius: 5px; display: block; }
.doc__marker {
  padding: 14px 12px;
  border-radius: 6px;
  background: var(--c-grey-100);
  font-size: 11px;
  color: var(--c-grey-400);
  text-align: center;
}
.doc__alt {
  width: 100%;
  border: none;
  border-bottom: 1px solid transparent;
  background: transparent;
  font-size: 11px;
  color: var(--c-grey-600);
  padding: 2px 0;
}
.doc__alt:hover { border-bottom-color: #ededed; }
.doc__alt:focus { border-bottom-color: var(--c-pink-500); outline: none; }
.doc__altnote { font-size: 11px; color: var(--c-grey-400); }
.doc__foot { display: flex; gap: 10px; padding-top: 6px; font-size: 11px; color: #9a9a9a; flex-wrap: wrap; }
.doc__warn { color: #8a6300; }
.field__label { font-size: 10px; color: var(--c-grey-400); margin-bottom: 4px; }
.field__input {
  width: 100%;
  height: 29px;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: var(--fw-light);
  outline: none;
  background: var(--c-white);
}
.field__input:focus { border-color: var(--c-pink-500); }
.field__input--small { height: 28px; font-size: 11.5px; }
.field__input--ro { background: var(--c-grey-100); color: var(--c-grey-600); }
.field__area {
  width: 100%;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.5;
  font-weight: var(--fw-light);
  outline: none;
  resize: vertical;
  font-family: var(--font-sans);
  background: var(--c-white);
}
.field__area:focus { border-color: var(--c-pink-500); }
.field { margin-bottom: 9px; }
.field:last-child { margin-bottom: 0; }
.field--row { display: flex; gap: 8px; align-items: center; }
.field--row .field__label { margin: 0; width: 84px; flex: none; }

/* segment view */
.seg { background: var(--c-white); min-height: 100%; }
.seg__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid #ededed;
  background: var(--c-grey-100);
  font-size: 11px;
  color: var(--c-grey-600);
}
.seg__row { display: flex; gap: 14px; align-items: flex-start; padding: 13px 16px; border-bottom: 1px solid #f0f0f0; background: var(--c-white); }
.seg__where { width: 150px; flex: none; padding-top: 3px; }
.seg__kind { font-size: 9px; font-weight: var(--fw-semibold); letter-spacing: .06em; text-transform: uppercase; color: #a0a0a0; }
.seg__trail { font-size: 10px; color: #9a9a9a; margin-top: 3px; }
.seg__source { flex: 1; min-width: 0; font-size: 13px; line-height: 1.5; color: var(--c-grey-600); padding-right: 8px; white-space: pre-wrap; }
.seg__target { flex: 1; min-width: 0; }
.seg__area {
  width: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  padding: 7px 9px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: var(--fw-light);
  outline: none;
  resize: none;
  font-family: var(--font-sans);
}
.seg__area:focus { border-color: var(--c-pink-500); }
.seg__thumb { width: 64px; height: 44px; object-fit: cover; border-radius: 4px; background: #ededed; margin-top: 6px; display: block; }
.seg__select { flex: none; display: flex; align-items: center; gap: 6px; }
.seg__warn { color: #8a6300; }
.seg__pick { display: flex; align-items: center; padding-top: 2px; }
.seg__pick input { accent-color: var(--c-ai-500); cursor: pointer; margin: 0; }
.seg__row--chosen { background: var(--c-ai-50); }
.seg__done { flex: none; align-self: center; }
.seg__done--on { background: var(--c-green); color: var(--c-white); border-color: var(--c-green); }
.seg__done--on:hover { color: var(--c-white); border-color: var(--c-green); }

/* seo */
.seo { padding: 18px; }
.seo__column { display: flex; flex-direction: column; gap: 16px; max-width: 680px; }
.card { background: var(--c-white); border-radius: 8px; box-shadow: var(--shadow-card); overflow: hidden; }
.card__body { padding: 15px; }
.card__body--stack { display: flex; flex-direction: column; gap: 11px; }
.serp { padding: 4px 2px 2px; }
.serp__url { font-size: 11px; color: #3a7d3a; }
.serp__title { font-size: 19px; line-height: 1.25; color: #1a0dab; margin: 4px 0 5px; }
.serp__desc { font-size: 12.5px; line-height: 1.5; color: #4d5156; }
.check { display: flex; align-items: baseline; gap: 9px; font-size: 11.5px; }
.check__dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--c-green); }
.check__label { width: 92px; flex: none; font-weight: var(--fw-semibold); }
.check__detail { color: var(--c-grey-600); }
.check--warn .check__dot { background: #d8a200; }
.check--bad .check__dot { background: var(--c-red); }
.check--bad .check__detail { color: var(--c-red); }
.note { padding: 10px; border-radius: 6px; background: var(--c-grey-100); font-size: 10.5px; line-height: 1.5; color: var(--c-grey-400); word-break: break-all; }

/* raw / diff */
.raw { padding: 18px; display: flex; gap: 16px; align-items: flex-start; }
.raw__card { flex: 1; }
.raw__tabs { display: flex; gap: 6px; padding: 9px 13px; border-bottom: 1px solid #ededed; }
.raw__pre { margin: 0; padding: 15px; font: 400 11.5px/1.7 ui-monospace, Menlo, monospace; color: var(--text-body); white-space: pre-wrap; word-break: break-word; }
.diff__add { background: #e8f6ee; color: #1f6b43; display: block; }
.diff__del { background: #fdecec; color: #a12; display: block; }
.diff__ctx { display: block; }

/* inspector (1a right) */
.inspector {
  width: 302px;
  background: var(--c-white);
  border-left: 1px solid #dcdcdc;
  display: flex;
  flex-direction: column;
  flex: none;
  overflow-y: auto;
}
.inspector__head { padding: 11px 14px; border-bottom: 1px solid #ededed; flex: none; }
.inspector__title { font-size: 13px; font-weight: var(--fw-regular); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inspector__section { padding: 12px 14px; border-bottom: 1px solid #ededed; }
.inspector__section .eyebrow { margin-bottom: 9px; }
.inspector__label { font-size: 10px; color: var(--c-grey-400); margin-bottom: 5px; }
.inspector__label + .steps, .inspector__label + .chips { margin-bottom: 11px; }
.inspector__label + .steps:last-child, .inspector__label + .chips:last-child { margin-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips--tight { gap: 5px; }
.group {
  display: flex;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid #ededed;
  font-size: 12px;
  font-weight: var(--fw-regular);
  cursor: pointer;
  width: 100%;
  color: var(--text-body);
}
.group:hover { background: #fafafa; }
.group__spacer { flex: 1; }
.group__note { font-size: 10px; color: #9a9a9a; margin-right: 7px; font-weight: var(--fw-light); }
.group__caret { color: #bbb; }
.group__body { padding: 11px 14px; border-bottom: 1px solid #ededed; background: #fafafa; font-size: 11px; line-height: 1.6; color: var(--c-grey-400); }
.group__body .field__input, .group__body .field__area { background: var(--c-white); }
.inspector__hint { padding: 13px 14px; font-size: 11px; color: #9a9a9a; line-height: 1.55; }
.inspector__box { margin: 13px; padding: 13px; background: var(--c-grey-100); border-radius: 6px; font-size: 11px; line-height: 1.55; color: var(--c-grey-600); }
.inspector__spacer { flex: 1; }
.inspector__group {
  padding: 9px 14px;
  background: var(--c-grey-100);
  border-top: 1px solid #ededed;
  border-bottom: 1px solid #ededed;
  font-size: 10px;
  font-weight: var(--fw-semibold);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-grey-600);
  position: sticky;
  top: 0;
  z-index: 1;
}
.kv { display: flex; align-items: center; gap: 8px; font-size: 11.5px; margin-bottom: 7px; }
.kv:last-child { margin-bottom: 0; }
.kv__key { flex: 1; }
.kv__val { color: var(--c-grey-400); font-size: 10.5px; }
.kv__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; border: 1px solid #c8c8c8; }
.kv__dot--ok { background: var(--c-green); border-color: var(--c-green); }
.kv__dot--warn { background: var(--c-amber-500); border-color: var(--c-amber-500); }
.bar { flex: 1; height: 7px; border-radius: 4px; background: #ededed; overflow: hidden; }
.bar__fill { display: block; height: 100%; background: var(--c-green); }
.bar__fill--warn { background: var(--c-amber-500); }
.bar__fill--bad { background: var(--c-red); }
.css-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.css-grid .field__label { margin-bottom: 2px; }

/* media / branches surfaces */
.surface { flex: 1; overflow-y: auto; padding: 22px 24px; }
.surface__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.surface__title { font-size: 24px; font-weight: var(--fw-light); }
.surface__sub { font-size: 12px; color: var(--c-grey-400); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 16px; }
/* Square, and the whole image inside it: a library is for recognising a picture,
   and a crop to fill would hide what half of them are. */
.media__frame {
  aspect-ratio: 1 / 1;
  width: 100%;
  background: var(--c-grey-100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.media__thumb { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; display: block; }
.media__body { padding: 13px; }
.media__file { font-size: 12px; font-weight: var(--fw-regular); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media__meta { font-size: 10.5px; color: var(--c-grey-400); margin-top: 3px; }
.media__lang { width: 22px; font-size: 10px; font-weight: var(--fw-semibold); color: var(--c-grey-600); flex: none; }

/* the library: breadcrumb, folders, cards with an alt-text field */
.crumbs { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 11.5px; }
.crumbs__step { color: var(--c-grey-600); cursor: pointer; background: none; border: none; padding: 2px 0; font-size: 11.5px; }
.crumbs__step:hover { color: var(--c-taxi-black-400); text-decoration: underline; }
.crumbs__step--here { color: var(--c-taxi-black-400); font-weight: var(--fw-semibold); }
.crumbs__sep { color: #d0d0d0; }
.folders { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.folder {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 11px;
  background: var(--c-white);
  border: 1px solid #e4e4e4;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
}
.folder:hover { border-color: var(--c-taxi-black-400); }
.folder__icon { color: var(--c-grey-400); font-size: 10px; }
.folder__name { font-weight: var(--fw-regular); }
.media__card { cursor: pointer; border: 1px solid transparent; }
.media__card--selected { border-color: var(--c-pink-500); }
.media__alts { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.media__altfield { display: flex; align-items: center; gap: 7px; }
.media__altfield .field__input { flex: 1; min-width: 0; }
.media__frame--button { border: none; padding: 0; cursor: zoom-in; width: 100%; }
.media__altfield .field__input { flex: 1; min-width: 0; }
.field__input--missing { border-color: #e8c7c7; background: #fffafa; }
.media__path { margin-top: 8px; font-size: 10px; color: var(--c-grey-400); word-break: break-all; }
/* the library picker inside a modal */
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.picker {
  background: var(--c-white);
  border: 1px solid #e4e4e4;
  border-radius: 7px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0 0 9px;
}
.picker:hover { border-color: var(--c-pink-500); }
.picker__name { padding: 8px 9px 0; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker__alt { padding: 2px 9px 0; font-size: 10px; color: var(--c-grey-400); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker__alt--missing { color: var(--c-red); }

/* AI actions: marked and blue, wherever they are.
   Anything a model does sits on the blue ground, so it is one thing to
   recognise rather than a button to notice. */
.ai-mark { font-size: 12px; line-height: 1; flex: none; }

.ai-pane {
  background: var(--c-ai-50);
  border-top: 1px solid var(--c-ai-100);
  border-bottom: 1px solid var(--c-ai-100);
}
.ai-pane .inspector__group {
  background: transparent;
  color: var(--c-ai-700);
  border-top: 0;
  border-bottom-color: var(--c-ai-100);
}
.ai-pane .inspector__section { border-bottom-color: var(--c-ai-100); }
.ai-pane .inspector__section:last-child { border-bottom: 0; }
.ai-pane .field__input, .ai-pane .field__area { background: var(--c-white); border-color: var(--c-ai-100); }
.ai-pane .field__input:focus, .ai-pane .field__area:focus { border-color: var(--c-ai-500); }
.ai-pane .field__label { color: var(--c-ai-700); }
.ai-pane .pill:not(.pill--ai) { background: var(--c-white); border-color: var(--c-ai-100); }
.ai-pane .pill--active:not(.pill--ai) { background: var(--c-ai-500); border-color: var(--c-ai-500); color: var(--c-white); }
/* Stacked full-width buttons need the gap the chips row gets. */
.ai-pane__actions { display: flex; flex-direction: column; gap: 8px; }
.ai-pane__hint { padding: 2px 0 0; color: var(--c-grey-600); }
.pill--ai {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--c-ai-500);
  color: var(--c-white);
  border-color: var(--c-ai-500);
  font-weight: var(--fw-semibold);
  font-size: 11px;
  padding: 7px 14px;
}
.pill--ai:hover { background: var(--c-ai-400); border-color: var(--c-ai-400); color: var(--c-white); }
.pill--ai.pill--disabled { opacity: .4; }
.pill--ai.pill--block { width: 100%; justify-content: center; padding: 9px 0; font-size: 11px; }
.media__uploading--ai { display: flex; align-items: center; gap: 8px; background: var(--c-ai-50); color: var(--c-ai-500); }

.generate {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: var(--c-ai-50);
  border: 1px solid var(--c-ai-100);
  border-radius: 8px;
}
.generate__prompt { flex: 1; min-width: 260px; }
.media__actions { margin-top: 9px; display: flex; gap: 6px; }
.media__uploading { margin-bottom: 14px; padding: 9px 12px; border-radius: 6px; background: var(--c-pink-50); font-size: 11.5px; color: var(--c-taxi-black-400); }
.branches { max-width: 860px; }
.branch__row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid #f4f4f4; background: var(--c-white); }
.branch__row--active { background: var(--c-pink-50); }
.branch__name { font-size: 13px; font-weight: var(--fw-regular); }
.branch__meta { font-size: 10.5px; color: var(--c-grey-400); margin-top: 2px; }
.branch__grow { flex: 1; }

/* status bar */
.statusbar {
  display: flex;
  align-items: center;
  gap: 13px;
  height: 36px;
  padding: 0 14px;
  background: var(--c-taxi-black-400);
  color: var(--c-white);
  flex: none;
  font-size: 11px;
}
.statusbar__unsaved { display: flex; align-items: center; gap: 7px; font-weight: var(--fw-regular); }
.statusbar__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-pink-500); }
.statusbar__dot--clean { background: var(--c-green); }
.statusbar__sep { opacity: .35; }
.statusbar__behind { color: var(--c-amber-500); }
.statusbar__level { color: rgba(255, 255, 255, .7); }
.statusbar__spacer { flex: 1; }
.statusbar__hint { font-size: 10.5px; opacity: .55; }
.statusbar__error { color: var(--c-amber-400); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* modals */
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .42);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
}
.modal {
  width: 600px;
  max-width: calc(100vw - 32px);
  max-height: 76vh;
  overflow-y: auto;
  background: var(--c-white);
  border-radius: 10px;
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
}
.modal--narrow { width: 520px; }
/* one image, as large as the window allows */
.modal--viewer { width: 94vw; max-width: 1500px; height: 92vh; max-height: none; padding: 0; overflow: hidden; }
.viewer { display: flex; height: 100%; min-height: 0; position: relative; }
.viewer__stage {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1c1c1c;
  padding: 18px;
}
.viewer__img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.viewer__side { width: 330px; flex: none; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.viewer__name { font-size: 14px; word-break: break-all; }
.viewer__meta { font-size: 11px; color: var(--c-grey-400); }
.viewer__path { margin-top: auto; padding: 9px; border-radius: 5px; background: var(--c-grey-100); font-size: 10px; color: var(--c-grey-400); word-break: break-all; }
.viewer__close {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, .45);
  color: var(--c-white);
  cursor: pointer;
  font-size: 13px;
}
.viewer__close:hover { background: rgba(0, 0, 0, .7); }

.modal__head { padding: 17px 20px; border-bottom: 1px solid #ededed; display: flex; align-items: flex-start; gap: 12px; }
.modal__title { font-size: 20px; font-weight: var(--fw-light); }
.modal__note { font-size: 11.5px; color: var(--c-grey-400); margin-top: 3px; line-height: 1.5; }
.modal__close { font-size: 20px; color: #a0a0a0; cursor: pointer; margin-left: auto; line-height: 1; }
.modal__body { padding: 6px 20px 16px; }
.modal__group { padding: 13px 0; border-bottom: 1px solid #f2f2f2; }
.modal__group .eyebrow { margin-bottom: 8px; }
.modal__item { display: flex; align-items: center; gap: 9px; padding: 4px 0; font-size: 12.5px; }
.modal__item .badge { width: 17px; height: 17px; }
.modal__item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.modal__item-note { font-size: 10.5px; color: #9a9a9a; white-space: nowrap; }
.modal__item-link { color: inherit; text-decoration: none; border-bottom: 1px solid #d8d8d8; }
.modal__item-link:hover { color: var(--c-pink-500); border-bottom-color: currentColor; }
.modal__empty { padding: 30px 0; text-align: center; font-size: 13px; color: #9a9a9a; }
.modal__foot { padding: 14px 20px; border-top: 1px solid #ededed; display: flex; gap: 9px; justify-content: flex-end; align-items: center; }
.modal__error { flex: 1; font-size: 11.5px; color: var(--c-red); }
.modal__section-title { padding: 14px 0 6px; }
.modal__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid #d8d8d8;
  font-size: 11.5px;
  font-weight: var(--fw-regular);
  color: var(--text-body);
  cursor: pointer;
}
.chip:hover { border-color: var(--c-pink-500); color: var(--c-pink-500); }
.btn {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid #d8d8d8;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  color: var(--c-grey-600);
  cursor: pointer;
  background: var(--c-white);
}
.btn:hover { border-color: var(--c-taxi-black-400); color: var(--c-taxi-black-400); }
.btn--primary { background: var(--c-pink-500); color: var(--c-white); border-color: var(--c-pink-500); padding: 8px 18px; }
.btn--primary:hover { background: var(--c-pink-400); border-color: var(--c-pink-400); color: var(--c-white); }
.btn--disabled { opacity: .45; pointer-events: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 58px;
  transform: translateX(-50%);
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  background: var(--c-taxi-black-400);
  color: var(--c-white);
  font-size: 12px;
  font-weight: var(--fw-regular);
  box-shadow: var(--shadow-menu);
  z-index: 70;
  white-space: nowrap;
}

/* login */
.login {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login__card { width: 380px; background: var(--c-white); border-radius: 12px; box-shadow: var(--shadow-card); padding: 28px; }
.login__title { font-size: 24px; font-weight: var(--fw-light); margin-bottom: 4px; }
.login__sub { font-size: 12px; color: var(--c-grey-400); margin-bottom: 20px; line-height: 1.5; }
.login__error { font-size: 11.5px; color: var(--c-red); margin-bottom: 10px; }
.login__actions { display: flex; justify-content: flex-end; margin-top: 16px; }

.loading { padding: 40px; text-align: center; font-size: 12px; color: #9a9a9a; }
.error-box { margin: 18px; padding: 13px; background: #fdecec; color: #a12; border-radius: 6px; font-size: 12px; line-height: 1.5; white-space: pre-wrap; }

/* grid alignment: one little grid per value, drawn with that value applied */
.swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 11px;
}
.swatch {
  display: grid;
  grid-template-columns: repeat(3, auto);
  grid-template-rows: repeat(3, auto);
  aspect-ratio: 1 / 1;
  gap: 2px;
  padding: 3px;
  cursor: pointer;
  background: var(--c-grey-100);
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  outline-offset: 1px;
}
.swatch:hover { border-color: var(--c-taxi-black-400); }
.swatch--active { outline: 2px solid var(--c-pink-500); border-color: var(--c-pink-500); }
.swatch > span {
  background: var(--c-taxi-black-400);
  border-radius: 1px;
  min-width: 5px;
  min-height: 5px;
}
.swatch--active > span { background: var(--c-pink-500); }

/* link editor (radio per kind of target, then the input that kind needs) */
.link__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 10px;
  margin: 2px 0 9px;
}
.link__option { display: flex; align-items: center; gap: 6px; font-size: 11.5px; cursor: pointer; min-height: 22px; }
.link__option input { margin: 0; accent-color: var(--c-pink-500); cursor: pointer; }

/* tree view (designer default) */
.tree { min-height: 100%; background: var(--c-white); padding: 8px 0 20px; }
.tree__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px 11px;
  margin-bottom: 8px;
  border-bottom: 1px solid #ededed;
  position: sticky;
  top: 0;
  background: var(--c-white);
  z-index: 2;
  flex-wrap: wrap;
}
.tree__bar-group { display: flex; align-items: center; gap: 6px; }
.tree__btn {
  min-height: 30px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: var(--fw-regular);
  color: var(--c-taxi-black-400);
}
.tree__btn--icon { min-width: 34px; justify-content: center; padding: 7px 9px; font-size: 13px; }
.tree__list { display: flex; flex-direction: column; }
.tree__row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 14px 4px 10px;
  border-left: 2px solid transparent;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 12px;
  user-select: none;
}
.tree__row:hover { background: #fafafa; }
.tree__row--selected { background: var(--c-pink-50); border-left-color: var(--c-pink-500); }
.tree__row--hidden { opacity: .55; }
.tree__row--dragging { opacity: .35; }
/* For as long as a drag lasts, a row is a single target. `Ui.dropZoneDecoder`
   reads the pointer's offset from whatever is under it but the height from the
   row, so a dragover that landed on an inline child measured the pointer
   against the wrong box: the bottom third of a row was unreachable over its
   name, and "after this row" silently became "before" or "inside" it. Scoped to
   the drag so the fold caret stays clickable the rest of the time. */
.tree--dragging .tree__row * { pointer-events: none; }
.tree__row--drop-before { border-top-color: var(--c-pink-500); }
.tree__row--drop-after { border-bottom-color: var(--c-pink-500); }
.tree__row--drop-inside { outline: 2px solid var(--c-pink-500); outline-offset: -2px; background: var(--c-pink-50); }
.tree__caret { width: 16px; flex: none; color: #9a9a9a; font-size: 11px; text-align: center; }
.tree__caret--none { color: #d0d0d0; }
.tree__kind {
  flex: none;
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--c-grey-100);
  color: var(--c-grey-600);
  font-size: 9.5px;
  font-weight: var(--fw-semibold);
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tree__kind--section { background: var(--c-taxi-black-400); color: var(--c-white); }
.tree__detail { flex: none; font-size: 10.5px; color: var(--c-grey-400); white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.tree__name { flex: none; font-weight: var(--fw-regular); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.tree__preview { flex: 1; min-width: 0; color: var(--c-grey-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; }
.tree__thumb { height: 22px; width: 32px; object-fit: cover; border-radius: 3px; background: #ededed; flex: none; }
.tree__meta { flex: none; font-size: 10px; color: #a0a0a0; white-space: nowrap; }
.tree__help { padding: 14px 16px; font-size: 10.5px; color: #a0a0a0; line-height: 1.6; }
