:root {
  color: #151515;
  background: #ececec;
  --bg: #ececec;
  --bg-soft: #f4f4f4;
  --panel: rgba(250, 250, 250, 0.86);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --ink: #151515;
  --muted: #6a6a6a;
  --line: rgba(0, 0, 0, 0.12);
  --line-strong: rgba(0, 0, 0, 0.22);
  --dark: #111111;
  --dark-soft: #1d1d1d;
  --accent: #2b2b2b;
  --accent-soft: rgba(0, 0, 0, 0.08);
  --warning-bg: #e8e8e8;
  --danger-bg: #d8d8d8;
  --nodedc-glass-panel-bg: rgba(255, 255, 255, 0.18);
  --nodedc-glass-panel-bg-strong: rgba(255, 255, 255, 0.26);
  --nodedc-glass-panel-bg-soft: rgba(255, 255, 255, 0.12);
  --nodedc-glass-panel-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%), var(--nodedc-glass-panel-bg);
  --nodedc-glass-panel-surface-strong: linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.14) 100%), var(--nodedc-glass-panel-bg-strong);
  --nodedc-glass-section-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.08) 100%), rgba(255, 255, 255, 0.12);
  --nodedc-glass-control-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.08) 100%), rgba(255, 255, 255, 0.12);
  --nodedc-glass-control-hover: linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.12) 100%), rgba(255, 255, 255, 0.2);
  --nodedc-glass-control-active: linear-gradient(180deg, rgba(32, 32, 34, 0.98), rgba(20, 20, 22, 0.96));
  --nodedc-glass-outline: rgba(24, 32, 29, 0.1);
  --nodedc-glass-outline-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.34) 28%, rgba(24, 32, 29, 0.1) 100%);
  --nodedc-glass-panel-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 18px 60px rgba(24, 32, 29, 0.14);
  --nodedc-glass-control-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
  --nodedc-glass-blur: blur(24px) saturate(128%) brightness(1.05);
  --nodedc-glass-panel-blur: blur(64px) saturate(150%) brightness(1.08);
  --nodedc-header-dropdown-bg: var(--nodedc-glass-panel-surface-strong);
  --nodedc-header-dropdown-item-bg: var(--nodedc-glass-control-bg);
  --nodedc-header-dropdown-item-hover-bg: var(--nodedc-glass-control-hover);
  --nodedc-header-dropdown-item-active-bg: rgba(255, 255, 255, 0.24);
  --nodedc-header-dropdown-item-active-color: var(--ink);
  font-family: "Aptos", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.045) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.04) 0 1px, transparent 1px 100%),
    var(--bg);
  background-size: 44px 44px;
}

button {
  font: inherit;
}

input {
  font: inherit;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 22px;
  color: #f4f4f4;
  background: var(--dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 188px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #111;
  font-weight: 800;
  background: #f0f0f0;
  border-radius: 6px;
}

.brand-block h1,
.brand-block p,
.topbar h2,
.topbar p,
.status-card h3,
.status-card p,
.section-heading h3,
.task-row p,
.footer-line {
  margin: 0;
}

.brand-block h1 {
  font-size: 18px;
  line-height: 1.1;
}

.brand-block p,
.eyebrow {
  color: #8d8d8d;
  font-size: 13px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding: 4px 2px 6px;
  scrollbar-width: thin;
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  color: #d8d8d8;
  white-space: nowrap;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: default;
}

.nav-item span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #cfcfcf;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.nav-item strong {
  display: none;
  padding-right: 12px;
  font-size: 13px;
  font-weight: 850;
}

.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
}

.nav-item.active span {
  color: #111;
  background: #f0f0f0;
  border-color: #f0f0f0;
}

.nav-item.active strong {
  display: inline;
}

.workspace {
  display: flex;
  flex-direction: column;
  gap: 26px;
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.topbar h2 {
  margin-top: 4px;
  font-size: 28px;
  line-height: 1.15;
}

.system-status-menu {
  position: relative;
  justify-self: end;
}

.system-status-menu > summary {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #f2f2f2;
  list-style: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
}

.system-status-menu > summary::-webkit-details-marker {
  display: none;
}

.system-status-menu[open] > summary {
  color: #111;
  background: #f0f0f0;
  border-color: #f0f0f0;
}

.system-status-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 15;
  display: grid;
  gap: 8px;
  width: min(460px, calc(100vw - 48px));
  padding: 10px;
  color: var(--ink);
  background: rgba(250, 250, 250, 0.98);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.system-status-popover h3,
.system-status-popover p,
.system-status-popover span {
  color: inherit;
}

.system-settings-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 38px;
  width: 100%;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.service-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.42);
}

.service-modal {
  display: grid;
  gap: 12px;
  width: min(1040px, 100%);
  max-height: min(860px, calc(100vh - 44px));
  overflow: auto;
  padding: 14px;
  color: var(--ink);
  background: #f8f8f8;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.24);
}

.service-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.service-modal-header > div {
  display: grid;
  gap: 5px;
}

.service-modal-header span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.service-modal-header h2,
.service-modal-header p {
  margin: 0;
}

.service-modal-header h2 {
  font-size: 22px;
}

.service-modal-header p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.service-modal-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.external-service-list {
  display: grid;
  gap: 10px;
}

.external-service-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.external-service-card-head,
.service-card-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.external-service-card-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.external-service-card-head strong {
  color: var(--ink);
  font-size: 15px;
}

.external-service-card-head small,
.service-card-footer small,
.service-field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.35;
}

.external-service-card-head span {
  width: fit-content;
  padding: 3px 7px;
  color: #70521f;
  background: rgba(112, 82, 31, 0.07);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.external-service-card.configured .external-service-card-head span {
  color: #2f6b4f;
  background: rgba(47, 107, 79, 0.06);
}

.external-service-card.missing_required .external-service-card-head span,
.external-service-card.not_implemented .external-service-card-head span {
  color: #8b2f2f;
  background: rgba(139, 47, 47, 0.06);
}

.service-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.external-service-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.external-service-docs a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 8px;
  color: #2e4960;
  background: rgba(46, 73, 96, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.service-dependency {
  width: fit-content;
  margin: 0;
  padding: 6px 9px;
  color: #2e4960;
  background: rgba(46, 73, 96, 0.06);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 780;
}

.service-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.service-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.service-field-full {
  width: min(420px, 100%);
}

.service-field input,
.service-field select {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  font: inherit;
  font-size: 13px;
}

.service-field input:focus,
.service-field select:focus {
  border-color: rgba(0, 0, 0, 0.28);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.service-warning {
  margin: 0;
  padding: 8px 10px;
  color: #8b2f2f;
  background: rgba(139, 47, 47, 0.06);
  border: 1px solid rgba(139, 47, 47, 0.14);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 780;
}

.service-card-footer {
  align-items: center;
  padding-top: 2px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid;
  border-radius: 6px;
}

.status-pill.ok {
  color: #151515;
  background: #ededed;
  border-color: #bdbdbd;
}

.status-pill.warning {
  color: #151515;
  background: #dedede;
  border-color: #9c9c9c;
}

.status-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 128px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.status-card.compact {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-height: 0;
  padding: 14px;
  background: var(--panel-strong);
}

.system-subsection {
  display: grid;
  gap: 8px;
  padding: 8px;
  color: var(--ink);
  background: #f4f4f4;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.system-subsection summary {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 0;
  gap: 8px;
  color: var(--ink);
  list-style: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
}

.system-subsection summary::-webkit-details-marker {
  display: none;
}

.system-subsection summary::after {
  margin-left: auto;
  color: var(--muted);
  content: "+";
}

.system-subsection summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-subsection[open] summary::after {
  content: "−";
}

.status-card svg,
.section-heading svg,
.footer-line svg {
  flex: 0 0 auto;
  color: #303030;
}

.status-card.compact svg {
  margin-top: 1px;
}

.status-card h3 {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.15;
}

.status-card p,
.task-row p,
.footer-line {
  color: var(--muted);
  line-height: 1.45;
}

.work-band {
  display: grid;
  gap: 16px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.section-heading h3 {
  font-size: 18px;
}

.section-heading p,
.list-heading p,
.field-hint {
  margin: 4px 0 0;
  color: #66736d;
  line-height: 1.45;
}

.project-setup {
  display: grid;
  gap: 16px;
}

.project-grid {
  display: grid;
  gap: 16px;
}

.project-form,
.project-list-card {
  padding: 18px;
  background: rgba(255, 252, 244, 0.82);
  border: 1px solid rgba(24, 32, 29, 0.12);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(24, 32, 29, 0.06);
}

.project-form {
  display: grid;
  align-content: start;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
  color: #24302b;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: #18201d;
  background: #fffaf0;
  border: 1px solid rgba(24, 32, 29, 0.18);
  border-radius: 7px;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.field input:focus {
  border-color: #2e6f64;
  box-shadow: 0 0 0 3px rgba(46, 111, 100, 0.14);
}

.folder-picker-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px;
  color: #5b6862;
  font-weight: 500;
  background:
    linear-gradient(135deg, rgba(46, 111, 100, 0.08), transparent 54%),
    rgba(255, 250, 240, 0.9);
  border: 1px dashed rgba(46, 111, 100, 0.35);
  border-radius: 8px;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.folder-picker-panel.active {
  background:
    linear-gradient(135deg, rgba(228, 199, 102, 0.24), transparent 54%),
    #fffaf0;
  border-color: #2e6f64;
  transform: translateY(-1px);
}

.folder-picker-input {
  display: none;
}

.folder-pick-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  color: #fff8e7;
  background: #2e6f64;
  border: 1px solid #24584f;
  border-radius: 7px;
  cursor: pointer;
}

.folder-pick-action:disabled {
  cursor: wait;
  opacity: 0.72;
}

.folder-picker-message {
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.38;
}

.folder-picker-message-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 24px;
  margin-top: 2px;
}

.folder-upload-status {
  justify-content: flex-start;
}

.loading-dots::after {
  display: inline-block;
  width: 1.2em;
  overflow: hidden;
  vertical-align: bottom;
  content: "...";
  animation: loading-dots 1.15s steps(4, end) infinite;
}

@keyframes loading-dots {
  0% {
    width: 0;
  }

  100% {
    width: 1.2em;
  }
}

.folder-picker-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  color: var(--accent);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

.folder-picker-clear:hover {
  color: var(--accent-hover);
  background: rgba(242, 122, 26, 0.08);
}

.input-hint-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  color: #66736d;
  font-weight: 400;
  line-height: 1.4;
}

.link-action {
  padding: 0;
  color: #2e6f64;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(46, 111, 100, 0.35);
  cursor: pointer;
}

.link-action:hover {
  border-bottom-color: #2e6f64;
}

.field-hint {
  font-size: 14px;
}

.field-warning {
  color: #8f2d1f;
  font-weight: 600;
  line-height: 1.4;
}

.form-message,
.empty-state {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 7px;
  line-height: 1.45;
}

.form-message.success {
  color: #153f35;
  background: #dcece2;
}

.form-message.error,
.empty-state.error {
  color: #6d2f21;
  background: #f4ded7;
}

.primary-action,
.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 7px;
  cursor: pointer;
}

.primary-action {
  color: #fff8e7;
  background: #2e6f64;
  border: 1px solid #24584f;
}

.primary-action:disabled,
.ghost-action:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.ghost-action {
  padding: 0 12px;
  color: #2e6f64;
  background: rgba(46, 111, 100, 0.08);
  border: 1px solid rgba(46, 111, 100, 0.22);
}

.list-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.list-heading h3,
.project-row h4 {
  margin: 0;
}

.project-list {
  display: grid;
  gap: 10px;
}

.project-row {
  display: grid;
  gap: 14px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(228, 199, 102, 0.14), transparent 42%),
    #fffaf0;
  border: 1px solid rgba(24, 32, 29, 0.1);
  border-radius: 8px;
}

.project-row p {
  margin: 7px 0 0;
  color: #5b6862;
  overflow-wrap: anywhere;
}

.project-source {
  display: grid;
  gap: 5px;
}

.project-source p {
  margin: 0;
}

.project-title {
  display: inline;
  cursor: text;
  text-decoration-color: rgba(46, 111, 100, 0.35);
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}

.project-title:hover {
  color: #2e6f64;
}

.project-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.project-title-input {
  width: min(100%, 420px);
  min-height: 32px;
  padding: 0 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  font: inherit;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.project-title-input:focus {
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.055);
}

.project-title-loader {
  color: var(--muted);
  flex: 0 0 auto;
}

.section-project-title-row {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  max-width: min(720px, 100%);
  margin: 0 0 0 10px;
  vertical-align: baseline;
}

.project-setup > .section-heading h3 {
  display: inline;
}

.section-project-title-row::before {
  content: "·";
  color: var(--muted);
  font-weight: 650;
}

.section-project-title {
  max-width: min(720px, 100%);
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: left;
}

.section-project-title-input {
  width: min(100%, 520px);
}

.section-title-warning {
  display: block;
  width: fit-content;
  margin-top: 8px;
}

.section-project-title.project-title {
  display: inline-block !important;
  max-width: min(720px, 100%) !important;
  white-space: normal;
  overflow-wrap: anywhere;
  font-weight: 650 !important;
  letter-spacing: -0.01em;
}

.inline-title-warning {
  display: block;
  margin-top: -10px;
}

.scan-summary {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  color: #31423b;
  background: rgba(46, 111, 100, 0.07);
  border: 1px solid rgba(46, 111, 100, 0.16);
  border-radius: 7px;
}

.scan-summary.muted {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6d7c76;
  background: rgba(255, 252, 244, 0.86);
  border-style: dashed;
}

.project-scan-status {
  box-sizing: border-box;
  width: 100%;
  margin-top: 14px !important;
  padding: 12px 14px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  border-style: solid !important;
  border-radius: 18px !important;
}

.scan-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scan-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  color: #2e6f64;
  background: rgba(255, 253, 247, 0.78);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.scan-status-note {
  margin: 0;
  color: #31423b;
  font-size: 13px;
  font-weight: 700;
}

.scan-artifact-note {
  margin: 0;
  color: #6b5a1e;
  font-size: 12px;
  font-weight: 800;
}

.scan-help,
.audit-help,
.workspace-help {
  display: grid;
  gap: 8px;
  color: #31423b;
  background: rgba(255, 253, 247, 0.72);
  border: 1px dashed rgba(46, 111, 100, 0.22);
  border-radius: 7px;
  padding: 9px;
}

.scan-help summary,
.audit-help summary,
.workspace-help summary {
  color: #2e6f64;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.scan-help p,
.audit-help p,
.workspace-help p {
  margin: 0;
  color: #43514c;
  font-size: 13px;
  font-weight: 650;
}

.page-workspace-panel {
  display: grid;
  gap: 10px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(46, 111, 100, 0.08), rgba(251, 244, 224, 0.76)),
    rgba(255, 253, 247, 0.82);
  border: 1px solid rgba(46, 111, 100, 0.2);
  border-radius: 10px;
}

.page-workspace-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.page-workspace-heading div {
  display: grid;
  gap: 3px;
}

.page-workspace-heading strong {
  color: #18201d;
  font-size: 15px;
}

.page-workspace-heading small,
.workspace-empty {
  color: #6d7c76;
  font-size: 12px;
  font-weight: 800;
}

.page-workspace-heading span {
  white-space: nowrap;
  padding: 4px 8px;
  color: #2e6f64;
  background: rgba(46, 111, 100, 0.1);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.workspace-page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.workspace-page-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 34px;
  padding: 0 10px;
  color: #2e6f64;
  background: #fffdf7;
  border: 1px solid rgba(46, 111, 100, 0.2);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}

.workspace-page-tabs button.active {
  color: #fffdf7;
  background: #2e6f64;
  border-color: #2e6f64;
}

.workspace-page-tabs button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.workspace-page-tabs span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-editor-stack {
  display: grid;
  gap: 10px;
}

.workspace-meta {
  display: grid;
  gap: 3px;
  padding: 8px;
  background: rgba(255, 253, 247, 0.76);
  border: 1px solid rgba(24, 32, 29, 0.08);
  border-radius: 8px;
}

.workspace-meta strong {
  color: #18201d;
  overflow-wrap: anywhere;
}

.workspace-meta small {
  color: #6d7c76;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.seed-help,
.workspace-raw-draft {
  display: grid;
  gap: 8px;
  padding: 9px;
  background: rgba(255, 253, 247, 0.7);
  border: 1px dashed rgba(46, 111, 100, 0.24);
  border-radius: 8px;
}

.seed-help summary,
.workspace-raw-draft summary {
  color: #2e6f64;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.seed-help p {
  margin: 0;
  color: #43514c;
  font-size: 13px;
  font-weight: 700;
}

.workspace-preview-layout {
  display: grid;
  gap: 10px;
}

.workspace-preview-panel,
.workspace-page-issues,
.workspace-section-workbench,
.section-editor-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 253, 247, 0.76);
  border: 1px solid rgba(24, 32, 29, 0.08);
  border-radius: 10px;
}

.workspace-preview-panel iframe {
  width: 100%;
  min-height: 520px;
  background: #fff;
  border: 1px solid rgba(24, 32, 29, 0.14);
  border-radius: 10px;
}

.workspace-preview-frame {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.workspace-preview-mode-switch {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: fit-content;
  padding: 4px;
  background: #f2f2f4;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.workspace-preview-mode-switch button {
  min-height: 30px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 520;
}

.workspace-preview-mode-switch button.active {
  color: #fff;
  background: var(--ink);
}

.workspace-preview-frame iframe {
  display: block;
}

.workspace-preview-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.workspace-preview-markers button {
  position: absolute;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: #ff4fb8;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(255, 79, 184, 0.3);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  pointer-events: auto;
}

.workspace-preview-markers button.active {
  background: #d81b7d;
  box-shadow: 0 0 0 4px rgba(255, 79, 184, 0.18);
}

.workspace-subheading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.workspace-subheading strong {
  color: #18201d;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.workspace-subheading small {
  color: #6d7c76;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.workspace-issue-list {
  display: grid;
  gap: 7px;
}

.workspace-issue-list button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  width: 100%;
  padding: 8px;
  text-align: left;
  background: rgba(255, 252, 244, 0.82);
  border: 1px solid rgba(24, 32, 29, 0.08);
  border-radius: 8px;
  cursor: pointer;
}

.workspace-issue-list button:disabled {
  cursor: default;
  opacity: 0.78;
}

.workspace-issue-list span {
  align-self: start;
  padding: 3px 7px;
  color: #7f5200;
  background: #fff0c2;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.workspace-issue-list strong {
  color: #18201d;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.workspace-issue-list small {
  grid-column: 2;
  color: #6d7c76;
  font-size: 12px;
  font-weight: 800;
}

.section-workbench-grid {
  display: grid;
  gap: 10px;
}

.section-map-list {
  display: grid;
  gap: 7px;
  max-height: 440px;
  overflow: auto;
}

.section-map-card {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 8px;
  text-align: left;
  background: rgba(255, 252, 244, 0.82);
  border: 1px solid rgba(24, 32, 29, 0.08);
  border-radius: 8px;
  cursor: pointer;
}

.section-map-card.active,
.section-map-card:hover {
  background: rgba(46, 111, 100, 0.1);
  border-color: rgba(46, 111, 100, 0.36);
}

.section-map-card div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
}

.section-map-card strong {
  color: #18201d;
  overflow-wrap: anywhere;
}

.section-map-card small {
  color: #6d7c76;
  font-weight: 800;
}

.section-map-card em {
  justify-self: start;
  padding: 3px 7px;
  color: #7f5200;
  background: #fff0c2;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.section-map-card p {
  display: -webkit-box;
  margin: 0;
  color: #31423b;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.section-map-card span {
  padding: 3px 7px;
  color: #2e6f64;
  background: rgba(46, 111, 100, 0.1);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.workspace-target-card div span {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: var(--ink);
}

.workspace-target-card.active div span {
  color: var(--ink);
  background: #fff;
}

.workspace-target-issues {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(242, 122, 26, 0.08);
  border: 1px solid rgba(242, 122, 26, 0.16);
  border-radius: 14px;
}

.section-editor-card label {
  display: grid;
  gap: 6px;
}

.section-editor-card label span {
  color: #2e6f64;
  font-size: 12px;
  font-weight: 900;
}

.section-editor-card pre,
.section-editor-card textarea,
.workspace-raw-draft pre {
  width: 100%;
  margin: 0;
  padding: 12px;
  color: #18201d;
  background: rgba(255, 253, 247, 0.9);
  border: 1px solid rgba(24, 32, 29, 0.12);
  border-radius: 9px;
  font: 700 13px/1.55 "JetBrains Mono", "Cascadia Code", monospace;
  overflow: auto;
  white-space: pre-wrap;
}

.section-editor-card pre {
  max-height: 220px;
}

.section-editor-card textarea {
  min-height: 240px;
  resize: vertical;
}

.section-editor-card textarea:focus {
  outline: 3px solid rgba(46, 111, 100, 0.16);
  border-color: rgba(46, 111, 100, 0.42);
}

.workspace-raw-draft pre {
  max-height: 260px;
}

@media (min-width: 1180px) {
  .workspace-preview-layout,
  .section-workbench-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: start;
  }
}

.audit-summary {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 253, 247, 0.82);
  border: 1px solid rgba(24, 32, 29, 0.08);
  border-radius: 7px;
}

.audit-heading {
  display: grid;
  gap: 3px;
}

.audit-heading strong {
  color: #18201d;
  font-size: 13px;
}

.audit-heading span {
  color: #6d7c76;
  font-size: 12px;
  font-weight: 700;
}

.audit-heading small {
  color: #8a968f;
  font-size: 12px;
  font-weight: 700;
}

.audit-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.audit-toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  color: #2e6f64;
  background: #fffdf7;
  border: 1px solid rgba(46, 111, 100, 0.22);
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.audit-toolbar button.active {
  color: #fffdf7;
  background: #2e6f64;
  border-color: #2e6f64;
}

.audit-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.audit-toolbar button span {
  min-width: 20px;
  padding: 2px 6px;
  color: inherit;
  background: rgba(24, 32, 29, 0.08);
  border-radius: 999px;
}

.semantic-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: rgba(247, 249, 248, 0.9);
  border: 1px solid rgba(24, 32, 29, 0.1);
  border-radius: 8px;
}

.semantic-heading,
.semantic-metric-row,
.semantic-clean,
.semantic-gap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.semantic-heading > div {
  display: grid;
  gap: 3px;
}

.semantic-heading-actions,
.semantic-export-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.semantic-heading strong,
.semantic-gap-panel > strong,
.semantic-seeds > strong,
.semantic-warning-list > strong {
  color: #18201d;
  font-size: 13px;
}

.semantic-heading small,
.semantic-cluster small,
.semantic-gap-row small,
.semantic-ai-contract small,
.semantic-warning-row small {
  color: #6d7c76;
  font-size: 12px;
  font-weight: 750;
}

.semantic-score-grid {
  display: grid;
  grid-template-columns: minmax(120px, 0.28fr) minmax(0, 1fr);
  gap: 10px;
}

.semantic-score-main {
  display: grid;
  gap: 2px;
  min-height: 96px;
  padding: 12px;
  align-content: center;
  background: #18201d;
  border-radius: 7px;
  color: #fffdf7;
}

.semantic-score-main span {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.semantic-score-main strong {
  font-size: 13px;
}

.semantic-score-main small {
  color: rgba(255, 253, 247, 0.68);
  font-size: 11px;
}

.semantic-metric-row {
  flex-wrap: wrap;
  align-content: center;
  justify-content: flex-start;
  padding: 10px;
  background: rgba(255, 253, 247, 0.78);
  border: 1px solid rgba(24, 32, 29, 0.08);
  border-radius: 7px;
}

.semantic-metric-row span,
.semantic-gap-row span,
.semantic-cluster div span,
.semantic-cluster div em,
.semantic-warning-row span,
.semantic-seeds span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.semantic-metric-row span {
  color: #2e5a67;
  background: rgba(46, 90, 103, 0.1);
}

.semantic-metric-row span.ok,
.semantic-clean {
  color: #2e6f64;
}

.semantic-metric-row span.danger {
  color: #8f2d1f;
  background: rgba(143, 45, 31, 0.1);
}

.semantic-scope-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(4, auto);
  gap: 8px;
  align-items: center;
  padding: 10px;
  background: rgba(255, 253, 247, 0.72);
  border: 1px solid rgba(24, 32, 29, 0.08);
  border-radius: 7px;
}

.semantic-scope-grid > div {
  display: grid;
  gap: 2px;
}

.semantic-scope-grid strong,
.semantic-style-panel strong,
.semantic-action-list strong {
  color: #18201d;
  font-size: 13px;
}

.semantic-scope-grid small,
.semantic-style-panel small,
.semantic-action-list p {
  color: #6d7c76;
  font-size: 12px;
  font-weight: 750;
}

.semantic-scope-grid > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  color: #2e5a67;
  background: rgba(46, 90, 103, 0.1);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.semantic-quality-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.semantic-quality {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px;
  background: rgba(255, 253, 247, 0.72);
  border: 1px solid rgba(24, 32, 29, 0.08);
  border-radius: 7px;
}

.semantic-quality > span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.semantic-quality.ok > span {
  color: #2e6f64;
  background: rgba(46, 111, 100, 0.1);
}

.semantic-quality.warning > span {
  color: #8a6424;
  background: rgba(155, 111, 39, 0.12);
}

.semantic-quality.problem > span {
  color: #8f2d1f;
  background: rgba(143, 45, 31, 0.1);
}

.semantic-quality div,
.semantic-style-panel {
  display: grid;
  gap: 4px;
}

.semantic-quality strong {
  color: #18201d;
  font-size: 13px;
}

.semantic-verdict-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 253, 247, 0.78);
  border: 1px solid rgba(46, 90, 103, 0.16);
  border-radius: 7px;
}

.semantic-verdict-panel.low {
  border-color: rgba(143, 45, 31, 0.24);
}

.semantic-verdict-panel.medium {
  border-color: rgba(155, 111, 39, 0.24);
}

.semantic-verdict-panel.high {
  border-color: rgba(46, 111, 100, 0.24);
}

.semantic-verdict-panel.muted {
  color: #6d7c76;
  background: rgba(24, 32, 29, 0.04);
}

.semantic-verdict-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.semantic-verdict-heading > div {
  display: grid;
  gap: 4px;
}

.semantic-verdict-heading > div:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.semantic-verdict-panel strong,
.semantic-verdict-heading strong,
.semantic-verdict-columns strong,
.semantic-verdict-clusters > strong,
.semantic-verdict-next strong {
  color: #18201d;
  font-size: 13px;
}

.semantic-verdict-panel p {
  margin: 0;
  color: #3f4b45;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.semantic-verdict-panel small,
.semantic-verdict-columns small,
.semantic-verdict-risk-list small,
.semantic-verdict-clusters small,
.semantic-verdict-next small {
  color: #6d7c76;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.semantic-verdict-heading span,
.semantic-verdict-risk-list span,
.semantic-verdict-clusters span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.semantic-verdict-heading span {
  color: #8a6424;
  background: rgba(155, 111, 39, 0.12);
}

.semantic-verdict-panel.low .semantic-verdict-heading span {
  color: #8f2d1f;
  background: rgba(143, 45, 31, 0.1);
}

.semantic-verdict-panel.high .semantic-verdict-heading span {
  color: #2e6f64;
  background: rgba(46, 111, 100, 0.1);
}

.semantic-verdict-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.semantic-verdict-columns section {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 10px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(24, 32, 29, 0.07);
  border-radius: 7px;
}

.semantic-verdict-risk-list,
.semantic-verdict-clusters {
  display: grid;
  gap: 7px;
}

.semantic-verdict-risk-list article,
.semantic-verdict-clusters > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 8px;
  align-items: start;
  padding: 8px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(24, 32, 29, 0.07);
  border-radius: 7px;
}

.semantic-verdict-risk-list article > div,
.semantic-verdict-clusters > div > div,
.semantic-verdict-next {
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.semantic-verdict-risk-list span {
  color: #8a6424;
  background: rgba(155, 111, 39, 0.12);
}

.semantic-verdict-risk-list article.problem span {
  color: #8f2d1f;
  background: rgba(143, 45, 31, 0.1);
}

.semantic-verdict-clusters span {
  color: #2e5a67;
  background: rgba(46, 90, 103, 0.1);
}

.semantic-verdict-next {
  padding: 9px;
  background: rgba(46, 90, 103, 0.07);
  border-radius: 7px;
}

.semantic-warning-list,
.semantic-gap-panel,
.semantic-seeds,
.semantic-ai-contract,
.semantic-style-panel,
.semantic-action-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 253, 247, 0.72);
  border: 1px solid rgba(24, 32, 29, 0.08);
  border-radius: 7px;
}

.semantic-warning-row {
  display: grid;
  gap: 3px;
  padding: 8px;
  background: rgba(143, 45, 31, 0.08);
  border: 1px solid rgba(143, 45, 31, 0.14);
  border-radius: 7px;
}

.semantic-warning-row span {
  justify-self: start;
  color: #8f2d1f;
  background: rgba(143, 45, 31, 0.12);
}

.semantic-warning-row p {
  margin: 0;
  color: #18201d;
  font-size: 12px;
  font-weight: 850;
}

.semantic-clean {
  justify-content: flex-start;
  min-height: 42px;
  padding: 0 10px;
  background: rgba(46, 111, 100, 0.08);
  border: 1px solid rgba(46, 111, 100, 0.16);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 850;
}

.market-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px;
}

.market-heading,
.market-state-card,
.market-wordstat-card,
.market-provider {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.market-heading {
  align-items: flex-start;
}

.market-heading > div,
.market-state-card > div,
.market-wordstat-card > div,
.market-provider > div,
.market-columns section,
.market-next-actions {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.market-heading strong,
.market-state-card strong,
.market-wordstat-card strong,
.market-provider strong,
.market-columns strong,
.market-next-actions strong {
  color: var(--ink);
  font-size: 13px;
}

.market-heading small,
.market-state-card small,
.market-wordstat-card small,
.market-wordstat-card p,
.market-provider small,
.market-provider p,
.market-columns small,
.market-next-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
  line-height: 1.38;
}

.market-state-card {
  align-items: center;
  padding: 10px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.market-wordstat-card {
  align-items: center;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.market-wordstat-card > div:last-of-type {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.market-wordstat-card > div:last-of-type span {
  min-height: 24px;
  padding: 4px 8px;
  color: #2e4960;
  background: rgba(46, 73, 96, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.market-wordstat-card p {
  flex-basis: 100%;
  margin: 0;
  color: #8b2f2f;
}

.market-state-card > div > span,
.market-provider > span,
.market-seed-list span,
.market-brief-list span {
  justify-self: start;
  padding: 4px 8px;
  color: #70521f;
  background: rgba(112, 82, 31, 0.07);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.market-state-card.not_collected > div > span,
.market-state-card.partial_ready > div > span,
.market-provider.connected > span,
.market-seed-list span.collected,
.market-seed-list span.collected_related_only,
.market-brief-list span.collected,
.market-seed-list span.ready_for_collection,
.market-brief-list span.ready_for_collection {
  color: #2f6b4f;
  background: rgba(47, 107, 79, 0.06);
}

.market-seed-list span.collected_no_signal {
  color: #6d7c76;
  background: rgba(109, 124, 118, 0.08);
}

.market-state-card.not_configured > div > span,
.market-provider.not_configured > span,
.market-provider.not_implemented > span,
.market-seed-list span.collection_failed,
.market-brief-list span.collection_failed,
.market-seed-list span.not_configured,
.market-brief-list span.not_configured {
  color: #8b2f2f;
  background: rgba(139, 47, 47, 0.06);
}

.market-state-card p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.4;
}

.market-provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.market-provider {
  align-items: flex-start;
  padding: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.market-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.market-columns section,
.market-next-actions {
  padding: 10px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.market-seed-list,
.market-brief-list {
  display: grid;
  gap: 6px;
}

.market-seed-list div,
.market-brief-list div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  align-items: start;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.market-seed-list strong,
.market-brief-list strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.market-seed-list small,
.market-brief-list small {
  grid-column: 2;
  overflow-wrap: anywhere;
}

.market-wordstat-results > div {
  display: grid;
  gap: 5px;
}

.market-wordstat-results p {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
  gap: 8px;
  margin: 0;
}

.market-wordstat-results p span {
  color: var(--ink);
  font-weight: 900;
}

.semantic-term-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.semantic-term-cloud span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  color: #3f4b45;
  background: rgba(24, 32, 29, 0.07);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.semantic-cluster-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.semantic-cluster {
  display: grid;
  gap: 7px;
  min-height: 148px;
  padding: 10px;
  text-align: left;
  background: rgba(255, 253, 247, 0.76);
  border: 1px solid rgba(24, 32, 29, 0.1);
  border-radius: 7px;
  cursor: pointer;
}

.semantic-cluster.covered {
  border-color: rgba(46, 111, 100, 0.22);
}

.semantic-cluster.weak {
  border-color: rgba(155, 111, 39, 0.28);
}

.semantic-cluster.missing {
  border-color: rgba(143, 45, 31, 0.22);
}

.semantic-cluster.active,
.semantic-cluster:hover {
  background: #fffdf7;
  border-color: rgba(24, 32, 29, 0.28);
  box-shadow: 0 10px 24px rgba(24, 32, 29, 0.08);
}

.semantic-cluster.active {
  outline: 2px solid rgba(46, 90, 103, 0.16);
}

.semantic-cluster div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.semantic-cluster div span {
  color: #2e5a67;
  background: rgba(46, 90, 103, 0.1);
}

.semantic-cluster.missing div span {
  color: #8f2d1f;
  background: rgba(143, 45, 31, 0.1);
}

.semantic-cluster div em {
  color: #6d7c76;
  background: rgba(24, 32, 29, 0.08);
}

.semantic-cluster strong {
  color: #18201d;
  font-size: 13px;
}

.semantic-cluster p {
  margin: 0;
  color: #3f4b45;
  font-size: 12px;
  line-height: 1.35;
}

.semantic-cluster blockquote {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 8px;
  color: #18201d;
  background: rgba(46, 90, 103, 0.07);
  border-left: 3px solid rgba(46, 90, 103, 0.28);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.35;
}

.semantic-cluster blockquote small {
  color: #6d7c76;
  font-size: 11px;
  font-weight: 800;
}

.semantic-cluster-detail {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 253, 247, 0.82);
  border: 1px solid rgba(24, 32, 29, 0.12);
  border-radius: 8px;
}

.semantic-cluster-detail.covered {
  border-color: rgba(46, 111, 100, 0.22);
}

.semantic-cluster-detail.weak {
  border-color: rgba(155, 111, 39, 0.28);
}

.semantic-cluster-detail.missing {
  border-color: rgba(143, 45, 31, 0.22);
}

.semantic-detail-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.semantic-detail-heading > div {
  display: grid;
  gap: 5px;
}

.semantic-detail-heading > div:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.semantic-detail-heading span,
.semantic-detail-heading em,
.semantic-token-list span,
.semantic-source-list span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.semantic-detail-heading span {
  justify-self: start;
  color: #2e5a67;
  background: rgba(46, 90, 103, 0.1);
}

.semantic-detail-heading em {
  color: #6d7c76;
  background: rgba(24, 32, 29, 0.07);
}

.semantic-detail-heading strong,
.semantic-detail-grid strong,
.semantic-evidence-panel > strong {
  color: #18201d;
  font-size: 13px;
}

.semantic-detail-heading small,
.semantic-detail-grid small,
.semantic-evidence-panel small,
.semantic-source-list small {
  color: #6d7c76;
  font-size: 12px;
  font-weight: 750;
}

.semantic-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.semantic-detail-grid section,
.semantic-evidence-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(24, 32, 29, 0.08);
  border-radius: 7px;
}

.semantic-token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.semantic-token-list span {
  color: #2e5a67;
  background: rgba(46, 90, 103, 0.1);
}

.semantic-token-list.muted span {
  color: #6d7c76;
  background: rgba(24, 32, 29, 0.07);
}

.semantic-evidence-panel blockquote {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 10px;
  color: #18201d;
  background: rgba(46, 90, 103, 0.06);
  border-left: 3px solid rgba(46, 90, 103, 0.28);
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.4;
}

.semantic-source-list {
  display: grid;
  gap: 6px;
}

.semantic-source-list div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  padding: 8px;
  background: rgba(24, 32, 29, 0.04);
  border-radius: 7px;
}

.semantic-source-list span {
  grid-row: span 2;
  color: #2e5a67;
  background: rgba(46, 90, 103, 0.1);
}

.semantic-source-list strong,
.semantic-source-list small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.semantic-gap-panel {
  gap: 6px;
}

.semantic-gap-row {
  justify-content: flex-start;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.54);
  border-radius: 7px;
}

.semantic-gap-row span {
  min-width: 58px;
  justify-content: center;
  color: #8f2d1f;
  background: rgba(143, 45, 31, 0.1);
}

.semantic-gap-row div {
  display: grid;
  gap: 2px;
}

.semantic-seeds div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.semantic-seeds.compact {
  padding: 0;
  background: transparent;
  border: 0;
}

.semantic-seeds span {
  color: #2e5a67;
  background: rgba(46, 90, 103, 0.1);
}

.semantic-ai-contract summary {
  cursor: pointer;
  color: #18201d;
  font-size: 12px;
  font-weight: 900;
}

.semantic-ai-contract p {
  margin: 8px 0 4px;
  color: #3f4b45;
  font-size: 12px;
  font-weight: 800;
}

.semantic-action-list p {
  margin: 0;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.52);
  border-radius: 6px;
}

.semantic-empty {
  min-height: 120px;
}

.audit-help-grid {
  display: grid;
  gap: 8px;
}

.audit-help-grid p {
  padding: 8px;
  background: rgba(255, 252, 244, 0.72);
  border-radius: 7px;
}

.audit-issue-list {
  display: grid;
  gap: 6px;
}

.audit-filter-note,
.audit-empty-section {
  color: #6d7c76;
  font-size: 12px;
  font-weight: 800;
}

.audit-page-group {
  display: grid;
  gap: 6px;
  padding: 8px;
  background: rgba(255, 252, 244, 0.58);
  border: 1px solid rgba(46, 111, 100, 0.12);
  border-radius: 8px;
}

.audit-page-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 4px;
}

.audit-page-heading div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.audit-page-heading strong {
  color: #18201d;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.audit-page-heading small {
  color: #6d7c76;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.audit-page-tag {
  padding: 3px 7px;
  color: #2e6f64;
  background: rgba(46, 111, 100, 0.1);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.media-issue-panel {
  display: grid;
  gap: 8px;
  padding: 9px;
  background: rgba(46, 111, 100, 0.06);
  border: 1px dashed rgba(46, 111, 100, 0.24);
  border-radius: 8px;
}

.media-issue-panel summary {
  color: #2e6f64;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.media-issue-panel > small {
  color: #6d7c76;
  font-weight: 800;
}

.media-issue-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.media-issue-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  padding: 7px;
  background: rgba(255, 252, 244, 0.78);
  border: 1px solid rgba(24, 32, 29, 0.08);
  border-radius: 7px;
}

.media-issue-row span {
  align-self: start;
  padding: 3px 6px;
  color: #7f5200;
  background: #fff0c2;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.media-issue-row strong {
  color: #18201d;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.media-issue-row small {
  grid-column: 2;
  color: #6d7c76;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.audit-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
}

.audit-pagination div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.audit-pagination button {
  min-height: 28px;
  padding: 0 10px;
  color: #2e6f64;
  background: #fffdf7;
  border: 1px solid rgba(46, 111, 100, 0.22);
  border-radius: 999px;
  cursor: pointer;
}

.audit-pagination button:hover {
  background: #edf7f1;
}

.audit-issue {
  padding: 8px;
  background: rgba(255, 252, 244, 0.78);
  border: 1px solid rgba(24, 32, 29, 0.08);
  border-radius: 7px;
}

.audit-issue summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: flex-start;
  cursor: pointer;
}

.audit-issue summary > span {
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.audit-issue.warning summary > span {
  color: #7f5200;
  background: #fff0c2;
}

.audit-issue.info summary > span {
  color: #2e6f64;
  background: rgba(46, 111, 100, 0.12);
}

.audit-issue.error summary > span {
  color: #8f2d1f;
  background: #f4ded7;
}

.audit-issue summary strong {
  color: #18201d;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.audit-issue-body {
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding-left: 4px;
}

.audit-issue-body p {
  margin: 0;
  color: #31423b;
  font-size: 13px;
  font-weight: 650;
}

.audit-issue-body small {
  color: #6d7c76;
  font-weight: 800;
}

.scan-selection {
  display: grid;
  gap: 8px;
}

.scan-selection-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.scan-selection-bar > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.scan-selection-bar strong {
  color: #18201d;
  font-size: 13px;
}

.scan-selection-bar small {
  color: #6d7c76;
  font-size: 12px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.scan-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.scan-selection-actions button {
  min-height: 28px;
  padding: 0 8px;
  color: #2e6f64;
  background: #fffdf7;
  border: 1px solid rgba(46, 111, 100, 0.22);
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.scan-selection-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.scan-page-list {
  display: grid;
  gap: 6px;
}

.scan-page-tree {
  display: grid;
  gap: 8px;
}

.scan-page-tree.scrollable {
  max-height: min(72vh, 980px);
  overflow: auto;
  padding-right: 4px;
}

.scan-page-tree-group {
  display: grid;
  gap: 6px;
  padding: 8px;
  background: rgba(255, 252, 244, 0.5);
  border: 1px solid rgba(46, 111, 100, 0.12);
  border-radius: 8px;
}

.scan-page-tree-group[open] {
  background: rgba(255, 252, 244, 0.68);
}

.scan-page-tree-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.scan-page-tree-heading::-webkit-details-marker {
  display: none;
}

.scan-page-tree-heading > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.scan-page-tree-heading strong {
  color: #2e6f64;
  font-size: 13px;
}

.scan-page-tree-heading small {
  color: #6d7c76;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.scan-page-tree-heading em {
  flex: 0 0 auto;
  color: #6d7c76;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.scan-page-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: flex-start;
  padding: 8px;
  background: rgba(255, 253, 247, 0.82);
  border: 1px solid rgba(24, 32, 29, 0.08);
  border-radius: 7px;
}

.scan-page-option.excluded-from-coverage {
  background: rgba(248, 249, 247, 0.82);
}

.scan-page-option.template_block,
.scan-page-option.admin_page,
.scan-page-option.technical_page {
  border-color: rgba(109, 124, 118, 0.18);
}

.scan-page-option input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #2e6f64;
}

.scan-page-option span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.scan-page-option strong {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: #18201d;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.scan-page-option strong em {
  color: #6d7c76;
  background: rgba(109, 124, 118, 0.1);
  border: 1px solid rgba(109, 124, 118, 0.16);
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.scan-page-option.used-for-coverage strong em {
  color: #2e6f64;
  background: rgba(46, 111, 100, 0.08);
  border-color: rgba(46, 111, 100, 0.16);
}

.scan-preview-list {
  display: grid;
  gap: 6px;
}

.scan-preview-list > span {
  display: grid;
  gap: 2px;
  color: #18201d;
  font-size: 13px;
  font-weight: 800;
}

.scan-page-option small,
.scan-preview-list small,
.scan-summary small {
  color: #6d7c76;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.project-edit-form {
  display: grid;
  gap: 10px;
}

.project-edit-form label {
  display: grid;
  gap: 6px;
  color: #66736d;
  font-size: 13px;
  font-weight: 700;
}

.project-edit-form input {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  color: #18201d;
  background: #fffdf7;
  border: 1px solid rgba(24, 32, 29, 0.18);
  border-radius: 7px;
  outline: none;
}

.project-edit-form input:focus {
  border-color: #2e6f64;
  box-shadow: 0 0 0 3px rgba(46, 111, 100, 0.12);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-content: space-between;
  color: #7a8a84;
  font-size: 13px;
  white-space: normal;
}

.project-meta span:first-child {
  color: #2e6f64;
  font-weight: 700;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
}

.tiny-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 9px;
  color: #2e6f64;
  background: rgba(46, 111, 100, 0.08);
  border: 1px solid rgba(46, 111, 100, 0.22);
  border-radius: 6px;
  cursor: pointer;
}

.tiny-action.primary {
  color: #fff8e7;
  background: #2e6f64;
  border-color: #24584f;
}

.tiny-action.danger {
  color: #8f2d1f;
  background: #f4ded7;
  border-color: #dfb3a7;
}

.tiny-action.icon-only {
  width: 32px;
  padding: 0;
}

.tiny-action:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.empty-state {
  min-height: 86px;
  justify-content: center;
  color: #5b6862;
  background: rgba(46, 111, 100, 0.07);
  border: 1px dashed rgba(46, 111, 100, 0.28);
}

.spin {
  animation: spin 900ms linear infinite;
}

.task-table {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(24, 32, 29, 0.12);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.74);
}

.task-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 54px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(24, 32, 29, 0.1);
}

.task-row:last-child {
  border-bottom: 0;
}

.task-row span {
  color: #7a8a84;
  font-variant-numeric: tabular-nums;
}

.task-row.done span,
.task-row.active span {
  color: #2e6f64;
  font-weight: 700;
}

.system-task-table {
  max-height: 260px;
  margin-top: 8px;
  overflow: auto;
  background: #fff !important;
}

.system-task-table .task-row {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
}

.system-task-table .task-row p {
  font-size: 13px;
}

.footer-line {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
}

/* Monochrome UI pass: keep the layout, remove decorative color noise. */
.project-setup,
.project-list,
.project-form,
.project-row,
.scan-summary,
.audit-summary,
.page-workspace-panel,
.workspace-preview-panel,
.workspace-page-issues,
.workspace-section-workbench,
.section-editor-card,
.task-table,
.status-card,
.scan-page-tree-group,
.scan-page-option,
.audit-page-group,
.audit-issue,
.media-issue-panel,
.media-issue-row,
.seed-help,
.workspace-help,
.scan-help,
.audit-help,
.workspace-raw-draft {
  background: var(--panel) !important;
  border-color: var(--line) !important;
  box-shadow: none;
}

.project-form input,
.project-edit-form input,
.field input,
.section-editor-card pre,
.section-editor-card textarea,
.workspace-raw-draft pre,
.workspace-preview-panel iframe {
  color: var(--ink) !important;
  background: #fff !important;
  border-color: var(--line-strong) !important;
}

.primary,
.tiny-action.primary,
.ghost-action.primary,
.project-form button[type="submit"] {
  color: #fff !important;
  background: #151515 !important;
  border-color: #151515 !important;
}

.tiny-action,
.tiny-action.danger,
.ghost-action,
.ghost-action.danger,
.scan-selection-actions button,
.audit-toolbar button,
.audit-pagination button,
.workspace-page-tabs button {
  color: var(--ink) !important;
  background: #f7f7f7 !important;
  border-color: var(--line-strong) !important;
}

.audit-toolbar button.active,
.workspace-page-tabs button.active,
.section-map-card.active {
  color: #fff !important;
  background: #151515 !important;
  border-color: #151515 !important;
}

.audit-toolbar button.active span,
.workspace-page-tabs button.active span,
.section-map-card.active span,
.section-map-card.active small,
.section-map-card.active p,
.section-map-card.active strong,
.section-map-card.active em {
  color: #fff !important;
}

.status-card svg,
.system-subsection svg,
.section-heading svg,
.footer-line svg,
.scan-metrics svg,
.system-status-popover svg {
  color: #303030 !important;
}

.system-status-popover,
.system-status-popover .status-card,
.system-status-popover .status-card h3,
.system-status-popover .system-subsection summary {
  color: var(--ink) !important;
}

.eyebrow,
.status-card p,
.system-status-popover .status-card p,
.section-heading p,
.scan-status-note,
.workspace-subheading small,
.workspace-meta small,
.audit-heading span,
.audit-heading small,
.media-issue-row small,
.workspace-issue-list small,
.scan-page-option small,
.project-row p,
.project-meta,
.task-row p,
.footer-line,
.input-hint-row small,
.field-warning,
.workspace-empty {
  color: var(--muted) !important;
}

.scan-metrics span,
.page-workspace-heading span,
.audit-page-tag,
.section-map-card span,
.section-map-card em,
.media-issue-row span,
.workspace-issue-list span,
.audit-issue summary > span {
  color: #151515 !important;
  background: #e2e2e2 !important;
  border-color: #c9c9c9 !important;
}

.audit-issue.warning summary > span,
.audit-issue.info summary > span,
.audit-issue.error summary > span {
  color: #151515 !important;
  background: #e2e2e2 !important;
}

.success-banner,
.error-banner {
  color: #151515 !important;
  background: #e8e8e8 !important;
}

.error-banner {
  border-color: #a8a8a8 !important;
}

.success-banner {
  border-color: #bdbdbd !important;
}

.folder-picker-panel,
.folder-picker-panel.active,
.empty-state,
.workspace-preview-empty,
.page-workspace-empty {
  color: var(--ink) !important;
  background: var(--panel) !important;
  border-color: var(--line-strong) !important;
  box-shadow: none !important;
}

.folder-pick-action,
.folder-picker-panel button {
  color: #fff !important;
  background: #151515 !important;
  border-color: #151515 !important;
}

.folder-picker-message,
.scan-help summary,
.workspace-help summary,
.audit-help summary,
.seed-help summary,
.workspace-raw-draft summary,
.media-issue-panel summary,
.project-title,
.link-action,
.scan-page-tree-heading strong,
.workspace-subheading strong,
.page-workspace-heading strong,
.audit-heading strong,
.section-editor-card label,
.field label {
  color: var(--ink) !important;
}

.project-title:hover,
.project-meta span:first-child,
.task-row span,
.task-row.done span,
.task-row.active span {
  color: var(--ink) !important;
}

.link-action {
  border-bottom-color: var(--line-strong) !important;
}

.link-action:hover {
  border-bottom-color: #151515 !important;
}

.scan-page-option input,
input[type="checkbox"] {
  accent-color: #151515;
}

input:focus,
textarea:focus {
  border-color: #151515 !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08) !important;
}

.section-map-card.active,
.section-map-card:hover,
.workspace-page-tabs button.active,
.audit-toolbar button.active {
  box-shadow: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 880px) {
  .app-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .brand-block {
    min-width: 0;
  }

  .nav-list {
    grid-column: 1 / -1;
    order: 3;
  }

  .system-status-menu {
    justify-self: end;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .app-header {
    padding: 12px;
  }

  .workspace {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-item.active strong {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .list-heading,
  .project-row {
    grid-template-columns: 1fr;
  }

  .list-heading {
    display: grid;
  }

  .ghost-action,
  .project-meta {
    justify-self: start;
  }

  .project-meta {
    justify-items: start;
    white-space: normal;
  }

  .project-actions {
    justify-content: flex-start;
  }

  .folder-picker-panel {
    align-items: stretch;
    display: grid;
  }

  .input-hint-row {
    display: grid;
  }
}

/* Apple-inspired system pass: one calm hierarchy, material surfaces, consistent controls. */
:root {
  --bg: #f5f5f7;
  --bg-soft: #fbfbfd;
  --panel: rgba(255, 255, 255, 0.74);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --muted-soft: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --danger: #d70015;
  --danger-soft: rgba(215, 0, 21, 0.1);
  --warning: #b26a00;
  --warning-soft: rgba(178, 106, 0, 0.12);
  --glass: rgba(255, 255, 255, 0.68);
  --glass-solid: rgba(255, 255, 255, 0.92);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 28px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 18px 60px rgba(0, 0, 0, 0.1);
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  color: var(--ink);
  background: var(--bg);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    "Segoe UI",
    sans-serif;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.95), transparent 34%),
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 38%, #eeeeef 100%) !important;
  background-attachment: fixed;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.app-header {
  position: sticky !important;
  top: 0;
  z-index: 30;
  grid-template-columns: minmax(172px, auto) minmax(0, 1fr) auto !important;
  gap: 22px !important;
  min-height: 76px;
  padding: 14px max(24px, calc((100vw - 1180px) / 2 + 24px)) !important;
  color: var(--ink) !important;
  background: rgba(251, 251, 253, 0.78) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: none !important;
  backdrop-filter: blur(24px) saturate(180%);
}

.brand-block {
  min-width: 0 !important;
  gap: 12px !important;
}

.brand-mark {
  width: 38px !important;
  height: 38px !important;
  display: inline-grid !important;
  place-items: center !important;
  color: #fff !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), transparent 42%),
    linear-gradient(145deg, #1d1d1f, #515154) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 10px 24px rgba(0, 0, 0, 0.14);
  font-size: 13px;
  letter-spacing: -0.02em;
  line-height: 1 !important;
  text-align: center;
}

.brand-mark span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}

.brand-block h1 {
  color: var(--ink);
  font-size: 17px !important;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-block p,
.eyebrow {
  color: var(--muted) !important;
  font-size: 12px !important;
  font-weight: 500;
}

.nav-list {
  justify-content: center;
  gap: 6px !important;
  padding: 5px !important;
  background: rgba(0, 0, 0, 0.045);
  border: 1px solid rgba(0, 0, 0, 0.055);
  border-radius: 999px;
  scrollbar-width: none;
}

.nav-list::-webkit-scrollbar {
  display: none;
}

.nav-item {
  min-width: 36px !important;
  min-height: 36px !important;
  gap: 8px !important;
  padding: 0 10px !important;
  color: var(--muted) !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  transition:
    color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.nav-item span {
  width: auto !important;
  height: auto !important;
  min-width: 18px;
  color: inherit !important;
  background: transparent !important;
  border: 0 !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

.nav-item strong {
  padding-right: 2px !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  letter-spacing: -0.01em;
}

.nav-item:not(.active) span {
  font-weight: 400 !important;
}

.nav-item.active {
  color: var(--ink) !important;
  background: var(--glass-solid) !important;
  border: 0 !important;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06), 0 8px 20px rgba(0, 0, 0, 0.08);
}

.nav-item.active span {
  color: var(--ink) !important;
  background: transparent !important;
}

.workspace {
  width: min(1180px, 100%) !important;
  gap: 22px !important;
  padding: 28px 24px 64px !important;
}

.topbar {
  min-height: 132px;
  align-items: end !important;
  padding: 30px !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 255, 255, 0.95), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(242, 242, 247, 0.72)) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-sm);
}

.topbar::after {
  position: absolute;
  right: -70px;
  bottom: -120px;
  width: 260px;
  height: 260px;
  content: "";
  background: radial-gradient(circle, rgba(0, 113, 227, 0.1), transparent 65%);
  pointer-events: none;
}

.topbar h2 {
  max-width: 900px;
  margin-top: 8px !important;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 44px) !important;
  font-weight: 720;
  letter-spacing: -0.05em;
  line-height: 1.04 !important;
  text-wrap: balance;
}

.section-heading,
.list-heading,
.page-workspace-heading,
.audit-heading,
.workspace-subheading,
.scan-selection-bar,
.audit-page-heading {
  align-items: center !important;
  gap: 12px !important;
}

.section-heading h3,
.list-heading h3,
.page-workspace-heading strong,
.audit-heading strong,
.workspace-subheading strong,
.scan-selection-bar strong,
.audit-page-heading strong {
  color: var(--ink) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: -0.032em;
  line-height: 1.12;
}

.section-heading p,
.list-heading p,
.page-workspace-heading small,
.audit-heading small,
.workspace-subheading small,
.audit-page-heading small,
.field-hint,
.input-hint-row,
.project-row p,
.scan-status-note,
.scan-summary small,
.workspace-empty,
.audit-empty-section,
.audit-filter-note {
  color: var(--muted) !important;
  font-size: 14px !important;
  font-weight: 450 !important;
  line-height: 1.45 !important;
}

.project-setup,
.project-list,
.project-form,
.project-list-card,
.project-row,
.scan-summary,
.audit-summary,
.page-workspace-panel,
.workspace-preview-panel,
.workspace-page-issues,
.workspace-section-workbench,
.section-editor-card,
.scan-selection,
.task-table,
.status-card,
.scan-page-tree-group,
.scan-page-option,
.audit-page-group,
.audit-issue,
.media-issue-panel,
.media-issue-row,
.seed-help,
.workspace-help,
.scan-help,
.audit-help,
.workspace-raw-draft,
.folder-picker-panel,
.empty-state,
.workspace-preview-empty,
.page-workspace-empty {
  color: var(--ink) !important;
  background: var(--panel) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
  backdrop-filter: blur(20px) saturate(160%);
}

.project-setup,
.project-list {
  padding: 24px !important;
}

.project-form,
.project-list-card,
.audit-summary,
.page-workspace-panel,
.scan-selection {
  padding: 22px !important;
}

.project-grid {
  gap: 18px !important;
}

.project-grid > *,
.project-list-card,
.project-row,
.project-row > *,
.scan-summary,
.scan-summary > *,
.scan-selection,
.scan-selection > *,
.scan-page-tree,
.scan-page-tree-group,
.scan-page-option,
.audit-summary,
.page-workspace-panel,
.workspace-preview-layout,
.workspace-preview-layout > *,
.workspace-editor-stack,
.workspace-editor-stack > * {
  min-width: 0 !important;
}

.project-row,
.scan-summary,
.scan-selection,
.scan-page-option,
.audit-summary,
.page-workspace-panel {
  overflow-wrap: anywhere;
}

.project-form {
  gap: 18px !important;
}

.field {
  gap: 8px !important;
  color: var(--ink) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  letter-spacing: -0.01em;
}

.field input,
.project-edit-form input,
.section-editor-card textarea,
.section-editor-card pre,
.workspace-raw-draft pre,
.workspace-preview-panel iframe {
  min-height: 44px;
  color: var(--ink) !important;
  background: rgba(255, 255, 255, 0.86) !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  outline: none;
}

.field input,
.project-edit-form input {
  padding: 0 14px !important;
}

.section-editor-card textarea,
.section-editor-card pre,
.workspace-raw-draft pre {
  padding: 14px !important;
}

.field input:focus,
.project-edit-form input:focus,
.section-editor-card textarea:focus,
input:focus,
textarea:focus {
  border-color: rgba(0, 113, 227, 0.42) !important;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.14) !important;
}

.folder-picker-panel {
  min-height: 72px !important;
  padding: 14px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1.5px dashed var(--line) !important;
  border-radius: var(--radius-md) !important;
}

.folder-picker-panel.active {
  background: rgba(0, 113, 227, 0.08) !important;
  border-color: rgba(0, 113, 227, 0.38) !important;
  transform: none !important;
}

.primary-action,
.primary,
.tiny-action.primary,
.ghost-action.primary,
.project-form button[type="submit"],
.folder-pick-action {
  min-height: 40px;
  color: #fff !important;
  background: var(--accent) !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  border-radius: 999px !important;
  box-shadow: 0 10px 24px rgba(0, 113, 227, 0.18);
  font-weight: 650 !important;
  transition:
    background 160ms ease,
    opacity 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.primary-action:hover,
.primary:hover,
.tiny-action.primary:hover,
.ghost-action.primary:hover,
.project-form button[type="submit"]:hover,
.folder-pick-action:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 113, 227, 0.22);
}

.ghost-action,
.tiny-action,
.tiny-action.danger,
.ghost-action.danger,
.scan-selection-actions button,
.audit-toolbar button,
.audit-pagination button,
.workspace-page-tabs button,
.link-action {
  min-height: 36px;
  color: var(--ink) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  font-weight: 600 !important;
}

.tiny-action.danger,
.ghost-action.danger {
  color: var(--danger) !important;
  background: var(--danger-soft) !important;
}

.link-action {
  padding: 0 12px !important;
  text-decoration: none !important;
  border-bottom: 0 !important;
}

.primary-action:disabled,
.ghost-action:disabled,
.tiny-action:disabled,
.folder-pick-action:disabled,
.audit-toolbar button:disabled,
.workspace-page-tabs button:disabled {
  cursor: not-allowed;
  opacity: 0.42 !important;
  transform: none;
  box-shadow: none;
}

.project-row {
  gap: 16px !important;
  padding: 18px !important;
}

.project-title {
  color: var(--ink) !important;
  text-decoration-color: rgba(0, 0, 0, 0.18) !important;
  text-decoration-thickness: 1px;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.project-meta {
  gap: 12px !important;
  color: var(--muted) !important;
}

.project-meta span:first-child {
  color: var(--muted) !important;
  font-weight: 600 !important;
}

.project-actions {
  gap: 8px !important;
}

.scan-summary {
  gap: 12px !important;
  margin-top: 14px !important;
  padding: 16px !important;
}

.scan-metrics span,
.page-workspace-heading span,
.audit-page-tag,
.section-map-card span,
.section-map-card em,
.media-issue-row span,
.workspace-issue-list span,
.audit-issue summary > span,
.status-pill {
  color: var(--ink) !important;
  background: rgba(0, 0, 0, 0.055) !important;
  border: 1px solid rgba(0, 0, 0, 0.045) !important;
  border-radius: 999px !important;
  font-weight: 650 !important;
}

.audit-issue.error summary > span {
  color: var(--danger) !important;
  background: var(--danger-soft) !important;
}

.audit-issue.warning summary > span {
  color: var(--warning) !important;
  background: var(--warning-soft) !important;
}

.audit-issue.info summary > span {
  color: var(--accent) !important;
  background: var(--accent-soft) !important;
}

.success-banner,
.form-message.success {
  color: #006c3d !important;
  background: rgba(0, 122, 61, 0.1) !important;
  border: 1px solid rgba(0, 122, 61, 0.14) !important;
  border-radius: var(--radius-md) !important;
}

.create-project-message {
  align-items: flex-start !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  letter-spacing: -0.01em;
  line-height: 1.4 !important;
}

.create-project-message > svg {
  flex: 0 0 auto;
  margin-top: 2px;
}

.create-project-message > span {
  display: block;
  white-space: pre-line;
}

.error-banner,
.form-message.error,
.empty-state.error,
.field-warning {
  color: var(--danger) !important;
  background: var(--danger-soft) !important;
  border-color: rgba(215, 0, 21, 0.14) !important;
}

.workspace-editor-stack,
.workspace-preview-layout,
.section-workbench-grid,
.audit-issue-list,
.media-issue-list,
.scan-page-list,
.scan-page-tree,
.scan-preview-list,
.project-list {
  gap: 12px !important;
}

.workspace-preview-layout {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) !important;
}

.section-workbench-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

.workspace-preview-panel,
.workspace-page-issues,
.workspace-section-workbench,
.section-editor-card {
  padding: 18px !important;
}

.workspace-preview-panel iframe {
  min-height: 720px;
  overflow: hidden;
  background: #fff !important;
  border-radius: var(--radius-md) !important;
}

.workspace-page-tabs {
  gap: 8px !important;
  min-width: 0 !important;
}

.workspace-page-tabs button,
.audit-toolbar button {
  padding: 0 13px !important;
  min-width: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-page-tabs button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-page-tabs button.active,
.audit-toolbar button.active,
.section-map-card.active {
  color: #fff !important;
  background: var(--ink) !important;
  border-color: var(--ink) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14) !important;
}

.section-map-card,
.workspace-issue-list button,
.media-issue-row,
.scan-page-option,
.audit-issue {
  background: rgba(255, 255, 255, 0.68) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
}

.section-map-card,
.workspace-issue-list button,
.scan-page-option {
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.section-map-card:hover,
.workspace-issue-list button:hover,
.scan-page-option:hover {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(0, 113, 227, 0.22) !important;
  transform: translateY(-1px);
}

.section-map-card.active:hover {
  background: var(--ink) !important;
  border-color: var(--ink) !important;
  transform: none;
}

.section-map-list,
.workspace-issue-list,
.scan-page-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.18) transparent;
}

.audit-issue summary,
.media-issue-panel summary,
.scan-help summary,
.workspace-help summary,
.audit-help summary,
.seed-help summary,
.workspace-raw-draft summary {
  min-height: 38px;
  color: var(--ink) !important;
  font-weight: 650 !important;
}

.audit-issue-body {
  color: var(--muted) !important;
}

.scan-selection-bar {
  margin-bottom: 12px;
}

.scan-page-tree-group {
  padding: 14px !important;
}

.scan-page-tree-heading {
  padding: 0 2px 8px !important;
}

.scan-page-option {
  padding: 12px !important;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.system-status-menu {
  position: relative;
}

.system-status-menu > summary {
  width: 42px !important;
  height: 42px !important;
  color: var(--ink) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08) !important;
  backdrop-filter: blur(16px) saturate(160%);
}

.system-status-menu[open] > summary {
  color: #fff !important;
  background: var(--ink) !important;
  border-color: var(--ink) !important;
}

.system-status-popover {
  top: calc(100% + 12px) !important;
  width: min(420px, calc(100vw - 32px)) !important;
  padding: 10px !important;
  color: var(--ink) !important;
  background: rgba(246, 246, 248, 0.86) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-md) !important;
  backdrop-filter: blur(28px) saturate(180%);
}

.status-card.compact,
.system-subsection {
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: none !important;
}

.status-card.compact {
  grid-template-columns: 30px minmax(0, 1fr) !important;
  min-height: 0 !important;
  padding: 14px !important;
}

.status-card.compact h3 {
  margin-bottom: 5px !important;
  color: var(--ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em;
}

.status-card.compact p {
  color: var(--muted) !important;
  font-size: 14px !important;
}

.system-subsection {
  padding: 12px !important;
}

.system-subsection summary {
  grid-template-columns: 30px minmax(0, 1fr) auto !important;
  color: var(--ink) !important;
  font-size: 15px;
}

.system-task-table {
  max-height: 260px;
  margin-top: 10px !important;
  background: rgba(255, 255, 255, 0.66) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: none !important;
}

.task-row {
  border-bottom-color: var(--line) !important;
}

.task-row span,
.task-row.done span,
.task-row.active span {
  color: var(--muted) !important;
  font-weight: 650 !important;
}

.task-row.active span {
  color: var(--accent) !important;
}

.footer-line {
  justify-content: center;
  color: var(--muted) !important;
  font-size: 13px;
}

@media (min-width: 980px) {
  .project-grid {
    grid-template-columns: minmax(320px, 0.82fr) minmax(420px, 1.18fr);
    align-items: start;
  }
}

@media (max-width: 880px) {
  .app-header {
    grid-template-columns: minmax(0, 1fr) auto !important;
    padding: 12px 16px !important;
  }

  .nav-list {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
  }

  .workspace {
    padding: 18px 14px 44px !important;
  }

  .topbar {
    min-height: 132px;
    padding: 24px !important;
  }

  .semantic-score-grid,
  .semantic-scope-grid {
    grid-template-columns: 1fr;
  }

  .semantic-verdict-heading,
  .semantic-detail-heading {
    display: grid;
  }

  .semantic-verdict-heading > div:last-child,
  .semantic-detail-heading > div:last-child {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .app-header {
    gap: 10px !important;
  }

  .brand-block p {
    display: none;
  }

  .topbar h2 {
    font-size: 34px !important;
  }

  .project-setup,
  .project-list,
  .project-form,
  .project-list-card,
  .audit-summary,
  .page-workspace-panel,
  .scan-selection {
    padding: 16px !important;
    border-radius: var(--radius-lg) !important;
  }

  .system-status-popover {
    right: -6px;
  }

  .semantic-verdict-risk-list article,
  .semantic-verdict-clusters > div {
    grid-template-columns: 1fr;
  }

  .semantic-verdict-risk-list span,
  .semantic-verdict-clusters span {
    justify-self: start;
  }
}

/* Layout rescue pass: restore working width and remove the nested-card matryoshka. */
.app-header {
  padding: 14px max(24px, calc((100vw - 1500px) / 2 + 14px)) !important;
}

.workspace {
  width: min(1500px, 100%) !important;
  gap: 24px !important;
  padding: 28px 24px 64px !important;
}

.project-setup {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.project-setup > .section-heading {
  padding: 0 4px;
}

.project-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 18px !important;
}

.project-form,
.project-list-card {
  background: rgba(255, 255, 255, 0.82) !important;
  border: 1px solid var(--line) !important;
  border-radius: 24px !important;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.055) !important;
}

.project-list-card {
  display: grid;
  gap: 18px;
}

.project-row {
  gap: 18px !important;
  padding: 22px !important;
  position: relative;
  background: rgba(0, 0, 0, 0.045) !important;
  border: 1px solid rgba(0, 0, 0, 0.075) !important;
  border-radius: 22px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.project-row-openable {
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.project-row-openable:hover,
.project-row-openable:focus-visible {
  background: rgba(242, 122, 26, 0.065) !important;
  border-color: rgba(242, 122, 26, 0.34) !important;
  outline: none;
}

.project-open-arrow {
  position: absolute;
  top: 22px;
  right: 24px;
  color: rgba(31, 31, 33, 0.44);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.project-row-openable:hover .project-open-arrow,
.project-row-openable:focus-visible .project-open-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

.project-row > div:first-child {
  display: grid;
  gap: 16px;
}

.project-row-openable .project-title-row {
  padding-right: 44px;
}

.project-row p {
  margin: 0 !important;
}

.stage-2 .project-meta {
  display: none !important;
}

.page-audit-overview {
  display: grid;
  gap: 14px;
}

.project-scope-flow-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(18, 24, 22, 0.08);
}

.project-scope-flow-head {
  display: block;
  align-items: center;
  min-width: 0;
}

.project-scope-flow-head strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 780;
}

.project-scope-flow-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-scope-flow-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.project-scope-flow-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.project-scope-flow-actions button:hover:not(:disabled) {
  border-color: rgba(24, 32, 29, 0.2);
  background: #fafafa;
}

.project-scope-flow-actions button.active {
  color: #ffffff;
  background: var(--ink);
  border-color: var(--ink);
}

.project-scope-flow-actions button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: #f6f6f7;
  opacity: 1;
}

.project-scope-flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scope-legend-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  color: var(--muted);
  background: #f6f6f7;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.scope-legend-item.indexable_page {
  color: var(--muted);
  border-color: var(--line);
}

.project-scope-flow-canvas {
  position: relative;
  height: min(82vh, 920px);
  min-height: 680px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 251, 250, 0.96)),
    #ffffff;
  border: 1px solid rgba(31, 42, 37, 0.12);
  border-radius: 14px;
}

.project-scope-flow-canvas .react-flow {
  background: #ffffff;
}

.project-scope-flow-canvas .react-flow__pane {
  cursor: grab;
}

.project-scope-flow-canvas .react-flow__pane:active {
  cursor: grabbing;
}

.project-scope-flow-canvas .react-flow__node {
  overflow: visible;
  border-radius: 18px;
}

.project-scope-flow-canvas .react-flow__controls {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(18, 24, 22, 0.1);
}

.project-scope-flow-canvas .react-flow__controls button {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.project-scope-flow-canvas .react-flow__minimap {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(18, 24, 22, 0.1);
}

.scope-flow-toolbar {
  position: absolute;
  top: 50%;
  left: 16px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 87px;
  padding: 10px 0;
  pointer-events: auto;
  transform: translateY(-50%);
  transform-origin: left center;
}

.scope-flow-toolbar-button {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #202522;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(31, 42, 37, 0.14);
  border-radius: 8px;
  box-shadow:
    0 10px 24px rgba(18, 24, 22, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  cursor: pointer;
  line-height: 1;
  outline: none;
  transform: translateY(var(--tb-shift-y, 0px)) scale(var(--tb-scale, 1)) !important;
  transform-origin: left center;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease,
    color 120ms ease;
  user-select: none;
  will-change: transform;
}

.scope-flow-toolbar-button:hover,
.scope-flow-toolbar-button:focus-visible {
  background: #ffffff;
  border-color: rgba(31, 42, 37, 0.24);
  box-shadow:
    0 14px 28px rgba(18, 24, 22, 0.14),
    0 0 0 3px rgba(255, 255, 255, 0.68),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.scope-flow-toolbar-button[aria-pressed="true"] {
  color: #ffffff;
  background: #202522;
  border-color: #202522;
}

.scope-flow-toolbar-button svg {
  display: block;
  width: 18px;
  height: 18px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scope-flow-node {
  position: relative;
  display: flex;
  gap: 18px;
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  color: #151a17;
  background: transparent;
  border: 0;
  border-radius: 20px;
  box-shadow: none;
  cursor: grab;
}

.scope-flow-node:active {
  cursor: grabbing;
}

.scope-flow-card {
  position: relative;
  display: flex;
  flex: 0 0 430px;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  overflow: hidden;
  color: #171c19;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 250, 0.96)),
    #ffffff;
  border: 1px solid rgba(19, 27, 24, 0.16);
  border-radius: 18px;
  box-shadow:
    0 22px 50px rgba(19, 27, 24, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.scope-flow-node.preview-none .scope-flow-card,
.scope-flow-node.project.no-preview .scope-flow-card {
  flex-basis: 100%;
}

.scope-flow-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 12% 95%, rgba(34, 197, 94, 0.05), transparent 42%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.025), transparent 40%);
}

.scope-flow-node.coverage.seo-selected .scope-flow-card {
  color: #171c19;
  background: #ffffff;
  border-color: rgba(31, 42, 37, 0.16);
  box-shadow:
    0 20px 48px rgba(19, 27, 24, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.scope-flow-node.coverage.seo-selected .scope-flow-card::before {
  background:
    radial-gradient(circle at 18% 100%, rgba(34, 197, 94, 0.07), transparent 48%),
    linear-gradient(90deg, rgba(34, 197, 94, 0.045), transparent 62%);
}

.scope-flow-node.excluded .scope-flow-card,
.scope-flow-node.seo-not-selected .scope-flow-card {
  color: #242a27;
  background: #ffffff;
  border-color: rgba(31, 42, 37, 0.14);
  box-shadow: 0 18px 42px rgba(19, 27, 24, 0.1);
}

.scope-flow-node.project .scope-flow-card {
  background:
    linear-gradient(180deg, rgba(250, 253, 251, 0.98), rgba(244, 249, 246, 0.98)),
    #f7faf8;
  border-color: rgba(46, 111, 100, 0.36);
}

.scope-flow-node-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.scope-flow-title-group {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.scope-flow-node-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #23443d;
  background: #eef4f1;
  border: 1px solid rgba(46, 111, 100, 0.16);
  border-radius: 12px;
}

.scope-flow-node.seo-selected .scope-flow-card .scope-flow-node-icon {
  color: #23443d;
  background: #eef4f1;
  border-color: rgba(46, 111, 100, 0.16);
}

.scope-flow-title-group strong {
  display: block;
  overflow: hidden;
  color: inherit;
  font-size: 16px;
  font-weight: 620;
  line-height: 1.18;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.scope-flow-title-group small {
  display: block;
  min-width: 0;
  overflow: hidden;
  margin-top: 2px;
  color: rgba(86, 97, 92, 0.88);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-flow-node.seo-selected .scope-flow-card .scope-flow-title-group small {
  color: rgba(86, 97, 92, 0.88);
}

.scope-flow-check {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  cursor: pointer;
}

.scope-flow-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.scope-flow-check span {
  display: block;
  width: 19px;
  height: 19px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 5px;
}

.scope-flow-check input:checked + span {
  background: #4ade80;
  border-color: #4ade80;
  box-shadow:
    inset 0 0 0 4px rgba(8, 37, 21, 0.92),
    0 0 18px rgba(74, 222, 128, 0.42);
}

.scope-flow-check input:disabled + span {
  opacity: 0.44;
}

.scope-flow-preview-wing {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  min-width: 620px;
  min-height: 0;
  padding: 0;
}

.scope-flow-preview-wing::before {
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: -18px;
  width: 1px;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(150, 164, 158, 0.28), transparent);
  box-shadow: 0 0 20px rgba(150, 164, 158, 0.16);
}

.scope-flow-preview-empty .scope-flow-preview-frame {
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 248, 0.96)),
    #ffffff;
}

.scope-flow-preview-empty-copy {
  display: grid;
  max-width: 280px;
  gap: 7px;
  padding: 22px;
  color: #65716b;
  text-align: center;
}

.scope-flow-preview-empty-copy strong {
  color: #252c29;
  font-size: 14px;
  font-weight: 760;
}

.scope-flow-preview-empty-copy span {
  font-size: 12px;
  line-height: 1.42;
}

.scope-flow-preview-frame {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(20, 29, 25, 0.14);
  border-radius: 18px;
  box-shadow:
    0 20px 52px rgba(8, 15, 12, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.scope-flow-node.seo-selected .scope-flow-preview-frame {
  background: #ffffff;
  border-color: rgba(20, 29, 25, 0.14);
  box-shadow:
    0 20px 52px rgba(8, 15, 12, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.scope-flow-preview-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
  background: #ffffff;
  border: 0;
  opacity: 0;
  transition: opacity 160ms ease;
}

.scope-flow-preview-frame.is-loaded img {
  opacity: 1;
}

.scope-flow-preview-loader {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  gap: 7px;
  place-content: center;
  color: #65716b;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(31, 42, 37, 0.05) 0 16%, transparent 16% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 248, 0.96)),
    #ffffff;
  background-size: 100% 32px, 100% 100%;
}

.scope-flow-preview-loader strong {
  color: #252c29;
  font-size: 14px;
  font-weight: 760;
}

.scope-flow-preview-loader span {
  font-size: 12px;
  line-height: 1.42;
}

.scope-flow-preview-frame.is-failed .scope-flow-preview-loader span {
  color: #9a3412;
}

.scope-flow-preview-frame::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, transparent 68%, rgba(0, 0, 0, 0.08)),
    radial-gradient(circle at 12% 100%, rgba(34, 197, 94, 0.06), transparent 44%);
}

.scope-flow-node-copy {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 auto;
  gap: 7px;
  min-width: 0;
  padding: 12px 14px;
  background: rgba(247, 249, 248, 0.86);
  border: 1px solid rgba(31, 42, 37, 0.08);
  border-radius: 13px;
}

.scope-flow-node.seo-selected .scope-flow-card .scope-flow-node-copy {
  background: rgba(247, 249, 248, 0.86);
  border-color: rgba(31, 42, 37, 0.08);
}

.scope-flow-node-copy small,
.scope-flow-node-copy p {
  overflow: hidden;
  margin: 0;
  color: #5f6b66;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-flow-node-copy p {
  color: #252c29;
  font-size: 13px;
  font-weight: 520;
  display: -webkit-box;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.scope-flow-node.seo-selected .scope-flow-card .scope-flow-node-copy small,
.scope-flow-node.seo-selected .scope-flow-card .scope-flow-node-copy p {
  color: #5f6b66;
}

.scope-flow-heading-strip {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.scope-flow-heading-strip span {
  overflow: hidden;
  max-width: 160px;
  padding: 4px 8px;
  color: #5e6a65;
  background: #f2f5f3;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-flow-preview-note {
  position: relative;
  z-index: 1;
  overflow: hidden;
  color: #66736d;
  font-size: 11px;
  font-weight: 620;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-flow-node.seo-selected .scope-flow-heading-strip span {
  color: #5e6a65;
  background: #f2f5f3;
}

.scope-flow-handle {
  z-index: 3;
  width: 15px;
  height: 15px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(150, 164, 158, 0.72);
  border-radius: 999px;
  box-shadow:
    0 0 0 8px rgba(150, 164, 158, 0.08),
    0 0 20px rgba(150, 164, 158, 0.22);
}

.scope-flow-handle::after {
  position: absolute;
  inset: 5px;
  content: "";
  background: #9aa7a1;
  border-radius: inherit;
}

.scope-flow-node.coverage.seo-selected .scope-flow-handle {
  border-color: rgba(34, 197, 94, 0.78);
  box-shadow:
    0 0 0 8px rgba(34, 197, 94, 0.08),
    0 0 26px rgba(34, 197, 94, 0.34);
}

.scope-flow-node.coverage.seo-selected .scope-flow-handle::after {
  background: #22c55e;
}

.scope-flow-handle-left {
  left: -20px !important;
}

.scope-flow-handle-right {
  right: -20px !important;
}

.scope-flow-resize-line {
  border-color: transparent !important;
  opacity: 0 !important;
}

.scope-flow-resize-handle {
  width: 22px !important;
  height: 22px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  opacity: 0 !important;
}

.scope-flow-edge {
  pointer-events: none;
}

.scope-flow-edge .react-flow__edge-path {
  stroke-width: 2.2;
  filter: drop-shadow(0 0 4px rgba(74, 222, 128, 0.28));
}

.scope-flow-edge.coverage .react-flow__edge-path {
  stroke: rgba(34, 197, 94, 0.72);
}

.scope-flow-edge.muted .react-flow__edge-path {
  stroke: rgba(98, 112, 106, 0.36);
  filter: none;
}

.engineering-page-list {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.engineering-page-list > summary {
  cursor: pointer;
  color: #3d4743;
  font-size: 13px;
  font-weight: 780;
  list-style: none;
}

.engineering-page-list > summary::-webkit-details-marker {
  display: none;
}

.engineering-page-list > summary::before {
  content: "+";
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-right: 7px;
  place-items: center;
  color: #ffffff;
  background: #202522;
  border-radius: 5px;
  font-size: 12px;
}

.engineering-page-list[open] > summary::before {
  content: "-";
}

.page-audit-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-audit-summary span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  color: var(--muted);
  background: #f6f6f7;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.page-audit-list {
  display: grid;
  gap: 10px;
}

.page-audit-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  width: 100%;
  padding: 18px 22px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 20px;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.page-audit-card:hover,
.page-audit-card:focus-visible {
  background: rgba(242, 122, 26, 0.065);
  border-color: rgba(242, 122, 26, 0.34);
  outline: none;
}

.page-audit-card:disabled {
  cursor: wait;
  opacity: 0.72;
}

.page-audit-card-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.page-audit-card-main > div {
  display: grid;
  gap: 4px;
}

.page-audit-card strong {
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.page-audit-card small,
.page-audit-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.page-audit-card p {
  color: var(--ink);
  font-weight: 500;
}

.page-audit-details {
  display: grid;
  gap: 10px;
}

.page-audit-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
}

.page-audit-toggle::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
  opacity: 0.78;
  transform: translateY(0.5px);
  transition: transform 160ms ease;
}

.page-audit-toggle:hover,
.page-audit-toggle:focus-visible {
  color: var(--accent);
  outline: none;
}

.page-audit-toggle[aria-expanded="true"] {
  color: var(--ink);
  font-weight: 500;
}

.page-audit-toggle[aria-expanded="true"]::before {
  transform: rotate(90deg) translateX(1px);
}

.page-audit-issue-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.page-audit-issue {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.page-audit-issue > span {
  width: fit-content;
  padding: 3px 8px;
  color: #8a5a00;
  background: rgba(255, 204, 0, 0.18);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
}

.page-audit-issue.error > span {
  color: var(--danger);
  background: var(--danger-soft);
}

.page-audit-issue.info > span {
  color: var(--muted);
  background: rgba(0, 0, 0, 0.055);
}

.page-audit-issue strong {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
}

.page-audit-issue p,
.page-audit-issue small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.page-audit-issue p b {
  color: var(--ink);
  font-weight: 650;
}

.page-audit-card-arrow {
  color: rgba(31, 31, 33, 0.44);
  font-size: 24px;
  line-height: 1;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.page-audit-card:hover .page-audit-card-arrow,
.page-audit-card:focus-visible .page-audit-card-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

.page-audit-loading {
  justify-content: flex-start !important;
}

.scan-summary:not(.muted) {
  gap: 16px !important;
  margin-top: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.scan-selection,
.page-workspace-panel,
.audit-summary {
  padding: 18px !important;
  background: #f8f8fa !important;
  border: 1px solid rgba(0, 0, 0, 0.07) !important;
  border-radius: 20px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.scan-help,
.workspace-help,
.audit-help,
.seed-help,
.workspace-raw-draft,
.media-issue-panel,
.workspace-preview-panel,
.workspace-page-issues,
.workspace-section-workbench,
.section-editor-card,
.scan-page-tree-group,
.scan-page-option,
.audit-page-group,
.audit-issue,
.media-issue-row,
.section-map-card,
.workspace-issue-list button {
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.065) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.scan-page-tree-group,
.audit-page-group {
  padding: 14px !important;
}

.page-workspace-heading,
.scan-selection-bar,
.audit-heading,
.workspace-subheading,
.audit-page-heading {
  align-items: flex-start !important;
}

.workspace-preview-layout,
.section-workbench-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

.workspace-preview-panel iframe {
  min-height: 640px !important;
  border-radius: 16px !important;
}

.project-meta {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.project-site-title {
  max-width: min(680px, 100%);
  overflow-wrap: anywhere;
}

@media (min-width: 980px) {
  .project-form {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
  }

  .project-form .form-message,
  .project-form .primary-action {
    grid-column: auto;
  }
}

@media (min-width: 1500px) {
  .project-grid {
    grid-template-columns: minmax(360px, 430px) minmax(0, 1fr) !important;
    align-items: start;
  }

  .project-form {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .project-form .form-message,
  .project-form .primary-action {
    grid-column: auto;
  }
}

/* Stage navigation pass: neutral accent and one logical screen per step. */
:root {
  --accent: #202124;
  --accent-hover: #111113;
  --accent-soft: rgba(24, 32, 29, 0.08);
  --accent-ring: rgba(24, 32, 29, 0.14);
  --accent-shadow: rgba(24, 32, 29, 0.18);
}

.nav-item {
  cursor: pointer !important;
}

.nav-item:hover {
  color: var(--ink) !important;
  background: rgba(255, 255, 255, 0.6) !important;
}

.nav-item.active {
  color: #fff !important;
  background: linear-gradient(135deg, #1f1f21, #29292c) !important;
}

.nav-item.active span,
.nav-item.active strong {
  color: #fff !important;
}

.brand-mark {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), transparent 42%),
    linear-gradient(145deg, #1d1d1f, #2b2b2e) !important;
}

.topbar {
  color: #fff !important;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.08), transparent 28%),
    radial-gradient(circle at 12% 96%, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(135deg, #111113 0%, #1d1d20 52%, #242426 100%) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 22px 52px rgba(18, 16, 14, 0.18) !important;
}

.topbar::after {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 65%) !important;
}

.topbar h2 {
  color: #fff !important;
}

.topbar .eyebrow {
  color: rgba(255, 255, 255, 0.62) !important;
}

.primary-action,
.primary,
.tiny-action.primary,
.ghost-action.primary,
.project-form button[type="submit"],
.folder-picker-panel .folder-pick-action,
.folder-picker-panel button.folder-pick-action,
.folder-pick-action {
  background: var(--accent) !important;
  box-shadow: 0 10px 24px var(--accent-shadow) !important;
}

.primary-action:hover,
.primary:hover,
.tiny-action.primary:hover,
.ghost-action.primary:hover,
.project-form button[type="submit"]:hover,
.folder-picker-panel .folder-pick-action:hover,
.folder-picker-panel button.folder-pick-action:hover,
.folder-pick-action:hover {
  background: var(--accent-hover) !important;
  box-shadow: 0 14px 30px rgba(242, 122, 26, 0.3) !important;
}

.semantic-page-plan-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px;
}

.semantic-page-plan-panel > div:first-child {
  display: grid;
  gap: 3px;
}

.semantic-page-plan-panel strong,
.semantic-page-plan-row strong {
  color: var(--ink);
  font-size: 13px;
}

.semantic-page-plan-panel small,
.semantic-page-plan-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.38;
}

.semantic-page-plan-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.34fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.semantic-page-plan-row > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.semantic-page-plan-row > div:first-child span {
  justify-self: start;
  padding: 4px 8px;
  color: #343434;
  background: #f5f5f5;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.semantic-page-plan-row.create > div:first-child span {
  color: #8b2f2f;
  background: rgba(139, 47, 47, 0.06);
}

.semantic-page-plan-row.strengthen > div:first-child span {
  color: #70521f;
  background: rgba(112, 82, 31, 0.07);
}

.semantic-brief-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px;
}

.semantic-brief-panel > div:first-child {
  display: grid;
  gap: 3px;
}

.semantic-brief-panel strong,
.semantic-brief-row strong {
  color: var(--ink);
  font-size: 13px;
}

.semantic-brief-panel small,
.semantic-brief-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.38;
}

.semantic-brief-row {
  padding: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.semantic-brief-row summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  cursor: pointer;
  list-style: none;
}

.semantic-brief-row summary::-webkit-details-marker {
  display: none;
}

.semantic-brief-row summary > span {
  justify-self: start;
  padding: 4px 8px;
  color: #343434;
  background: #f5f5f5;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.semantic-brief-row summary > .semantic-brief-quality {
  justify-self: end;
  color: #2f6b4f;
  background: rgba(47, 107, 79, 0.06);
  white-space: nowrap;
}

.semantic-brief-row summary > .semantic-brief-quality.needs_work {
  color: #70521f;
  background: rgba(112, 82, 31, 0.07);
}

.semantic-brief-row summary > .semantic-brief-quality.blocked {
  color: #8b2f2f;
  background: rgba(139, 47, 47, 0.06);
}

.semantic-brief-row summary > .semantic-brief-quality.legacy {
  color: #6d7c76;
  background: rgba(24, 32, 29, 0.06);
}

.semantic-brief-row.create summary > span {
  color: #8b2f2f;
  background: rgba(139, 47, 47, 0.06);
}

.semantic-brief-row.create summary > .semantic-brief-quality.ready {
  color: #2f6b4f;
  background: rgba(47, 107, 79, 0.06);
}

.semantic-brief-row.create summary > .semantic-brief-quality.needs_work {
  color: #70521f;
  background: rgba(112, 82, 31, 0.07);
}

.semantic-brief-row.create summary > .semantic-brief-quality.blocked {
  color: #8b2f2f;
  background: rgba(139, 47, 47, 0.06);
}

.semantic-brief-row.create summary > .semantic-brief-quality.legacy {
  color: #6d7c76;
  background: rgba(24, 32, 29, 0.06);
}

.semantic-brief-row summary > div,
.semantic-brief-body,
.semantic-brief-body section,
.semantic-brief-section {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.semantic-brief-body {
  padding-top: 9px;
}

.semantic-brief-section {
  padding: 7px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.semantic-brief-section span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.semantic-brief-quality-card {
  padding: 8px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.semantic-brief-quality-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.semantic-brief-quality-card > div:first-child span {
  color: #2f6b4f;
  font-size: 12px;
  font-weight: 900;
}

.semantic-brief-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.semantic-brief-checks span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.semantic-brief-checks .done {
  color: #2f6b4f;
  background: rgba(47, 107, 79, 0.06);
}

.semantic-brief-checks .pass {
  color: #2f6b4f;
  background: rgba(47, 107, 79, 0.06);
}

.semantic-brief-checks .pending {
  color: #70521f;
  background: rgba(112, 82, 31, 0.07);
}

.semantic-brief-checks .warn {
  color: #70521f;
  background: rgba(112, 82, 31, 0.07);
}

.semantic-brief-checks .fail {
  color: #8b2f2f;
  background: rgba(139, 47, 47, 0.06);
}

.semantic-token-list.muted span.warning {
  color: #70521f;
  background: rgba(112, 82, 31, 0.07);
}

.semantic-token-list.muted span.problem {
  color: #8b2f2f;
  background: rgba(139, 47, 47, 0.06);
}

.semantic-landing-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px;
}

.semantic-landing-panel > div:first-child {
  display: grid;
  gap: 3px;
}

.semantic-landing-panel strong {
  color: var(--ink);
  font-size: 13px;
}

.semantic-landing-panel small,
.semantic-landing-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.38;
}

.semantic-landing-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.semantic-landing-row > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  color: #343434;
  background: #f5f5f5;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.semantic-landing-row.create_target_page > span {
  color: #8b2f2f;
  background: rgba(139, 47, 47, 0.06);
}

.semantic-landing-row > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

@media (max-width: 560px) {
  .semantic-page-plan-row {
    grid-template-columns: 1fr;
  }

  .semantic-brief-row summary {
    grid-template-columns: 1fr;
  }

  .semantic-landing-row {
    grid-template-columns: 1fr;
  }

  .semantic-landing-row > span {
    justify-self: start;
  }
}

/* Final clean pass: keep the working surface white, quiet, and readable. */
.topbar {
  min-height: auto !important;
  padding: 22px 24px !important;
  color: var(--ink) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.045) !important;
}

.topbar::after {
  display: none !important;
}

.topbar h2 {
  color: var(--ink) !important;
  font-size: 28px !important;
  letter-spacing: 0 !important;
}

.topbar .eyebrow {
  color: var(--muted) !important;
}

@media (max-width: 560px) {
  .topbar {
    padding: 18px !important;
  }

  .topbar h2 {
    font-size: 28px !important;
  }
}

/* Dev/Auto UX split. Keep the production path calm; Auto is only the target shell for now. */
.workspace-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  padding: 3px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.04);
}

.workspace-mode-switch button {
  min-height: 34px;
  padding: 0 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.workspace-mode-switch button:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.035);
}

.workspace-mode-switch button.active {
  color: #fff;
  background: #181818;
  border-color: #181818;
}

.mode-hidden {
  display: none !important;
}

.auto-mode-shell {
  display: grid;
  gap: 18px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.045);
}

.auto-mode-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.auto-mode-heading > span,
.auto-mode-flow article > span,
.auto-variant-board article > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 9px;
  color: #262626;
  background: #f3f3f3;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.auto-mode-heading h3,
.auto-mode-heading p,
.auto-mode-flow strong,
.auto-mode-flow small,
.auto-variant-board strong,
.auto-variant-board small {
  margin: 0;
}

.auto-mode-heading h3 {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.1;
}

.auto-mode-heading p,
.auto-mode-flow small,
.auto-variant-board small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.auto-mode-flow,
.auto-variant-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auto-mode-flow article,
.auto-variant-board article {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 128px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.auto-mode-flow strong,
.auto-variant-board strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

/* Keep semantic verdict useful for Dev Mode without putting the raw report in the main flow. */
.semantic-verdict-panel,
.semantic-verdict-panel.low,
.semantic-verdict-panel.medium,
.semantic-verdict-panel.high,
.semantic-verdict-panel.muted {
  gap: 11px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: var(--line) !important;
  box-shadow: none !important;
}

.semantic-verdict-panel p {
  color: #363636 !important;
  font-size: 12px !important;
  font-weight: 760 !important;
}

.semantic-verdict-brief {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.semantic-verdict-brief span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 0 8px;
  color: #343434;
  background: #f5f5f5;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.semantic-verdict-brief span.problem {
  color: #8b2f2f;
  background: rgba(139, 47, 47, 0.06);
}

.semantic-verdict-details {
  border-top: 1px solid var(--line);
}

.semantic-verdict-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  list-style: none;
}

.semantic-verdict-details summary::-webkit-details-marker {
  display: none;
}

.semantic-verdict-details summary::after {
  content: "+";
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--muted);
  background: #f5f5f5;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
}

.semantic-verdict-details[open] summary::after {
  content: "-";
}

.semantic-verdict-detail-body {
  display: grid;
  gap: 10px;
  padding-top: 6px;
}

.semantic-verdict-columns section,
.semantic-verdict-risk-list article,
.semantic-verdict-clusters > div,
.semantic-verdict-next {
  background: #fff !important;
  border-color: var(--line) !important;
}

@media (max-width: 900px) {
  .auto-mode-flow,
  .auto-variant-board,
  .market-provider-grid,
  .market-columns {
    grid-template-columns: 1fr;
  }

  .market-heading,
  .market-state-card {
    display: grid;
  }

  .service-modal-backdrop {
    padding: 12px;
  }

  .service-modal {
    max-height: calc(100vh - 24px);
  }

  .service-field-grid {
    grid-template-columns: 1fr;
  }

  .external-service-card-head,
  .service-card-footer,
  .service-modal-header {
    align-items: stretch;
    flex-direction: column;
  }

  .service-modal-close {
    align-self: flex-end;
  }
}

@media (max-width: 560px) {
  .workspace-mode-switch {
    width: 100%;
  }

  .workspace-mode-switch button {
    flex: 1 1 0;
  }

  .auto-mode-shell {
    padding: 16px;
  }

  .auto-mode-heading {
    grid-template-columns: 1fr;
  }
}

/* Stage 3: page workspace cockpit. The selected page is the object now,
   so project/list scaffolding stays out of the visual hierarchy. */
.stage-3 .project-row {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.stage-3 .project-setup {
  gap: 0 !important;
}

.stage-3 .project-setup > .section-heading {
  display: none !important;
}

.stage-3 .project-list-card {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.stage-3 .project-list {
  gap: 0 !important;
}

.stage-3 .project-row > div > .project-title-row,
.stage-3 .project-row > div > .project-source,
.stage-3 .page-workspace-heading,
.stage-3 .workspace-page-tabs {
  display: none !important;
}

.stage-3 .page-workspace-panel {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.stage-3 .workspace-editor-stack {
  gap: 14px !important;
}

.workspace-current-page {
  display: grid;
  gap: 4px;
  padding: 0 4px;
}

.workspace-current-page > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workspace-current-page span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 450;
}

.workspace-current-page strong {
  color: var(--ink);
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.05;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}

.workspace-current-page small {
  color: var(--muted);
  font-size: 15px;
  font-weight: 450;
  overflow-wrap: anywhere;
}

.workspace-cockpit-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 2px;
}

.workspace-current-page-actions {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.workspace-current-page-actions > button,
.workspace-page-control-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.workspace-current-page-actions > button:hover,
.workspace-page-control-trigger:hover {
  border-color: rgba(24, 32, 29, 0.2);
  background: #fafafa;
}

.workspace-current-page-actions > button.active,
.workspace-page-control.open .workspace-page-control-trigger {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.workspace-current-page-actions > button em,
.workspace-page-control-trigger em {
  flex: 0 0 auto;
  min-width: 23px;
  height: 23px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  color: currentColor;
  background: rgba(24, 32, 29, 0.06);
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.workspace-current-page-actions > button.active em,
.workspace-page-control.open .workspace-page-control-trigger em {
  background: rgba(255, 255, 255, 0.16);
}

.workspace-page-control {
  position: relative;
  flex: 0 0 auto;
}

.workspace-page-control-trigger svg:last-child {
  transition: transform 160ms ease;
}

.workspace-page-control.open .workspace-page-control-trigger svg:last-child {
  transform: rotate(180deg);
}

.workspace-page-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  width: min(380px, calc(100vw - 48px));
  max-height: min(480px, calc(100vh - 180px));
  padding: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(24, 32, 29, 0.1);
  border-radius: 20px;
  box-shadow: 0 22px 70px rgba(24, 32, 29, 0.16);
  backdrop-filter: blur(30px) saturate(1.08);
  -webkit-backdrop-filter: blur(30px) saturate(1.08);
}

.workspace-page-menu-head {
  display: grid;
  gap: 3px;
  padding: 2px 2px 0;
}

.workspace-page-menu-head strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 780;
  line-height: 1.1;
}

.workspace-page-menu-head small,
.workspace-page-menu-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.35;
}

.workspace-page-menu-list {
  display: grid;
  gap: 7px;
  min-height: 0;
  max-height: min(360px, calc(100vh - 260px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
  scrollbar-gutter: stable;
}

.workspace-page-menu-list button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 3px 9px;
  width: 100%;
  padding: 10px;
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}

.workspace-page-menu-list button:hover,
.workspace-page-menu-list button.active {
  background: #f6f6f7;
  border-color: rgba(24, 32, 29, 0.16);
}

.workspace-page-menu-list button.active {
  color: #ffffff;
  background: var(--ink);
  border-color: var(--ink);
}

.workspace-page-menu-list button span {
  grid-row: span 2;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--ink);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.workspace-page-menu-list button strong,
.workspace-page-menu-list button small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-page-menu-list button strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.15;
  white-space: nowrap;
}

.workspace-page-menu-list button small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.3;
  white-space: nowrap;
}

.workspace-page-menu-list button em {
  grid-row: span 2;
  align-self: center;
  padding: 4px 8px;
  color: var(--muted);
  background: #f6f6f7;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
  white-space: nowrap;
}

.workspace-page-menu-list button.active span {
  color: var(--ink);
  background: #ffffff;
}

.workspace-page-menu-list button.active strong,
.workspace-page-menu-list button.active small {
  color: #ffffff;
}

.workspace-page-menu-list button.active em {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.workspace-current-page-actions .workspace-preview-mode-switch {
  min-height: 38px;
  background: #fff !important;
}

.stage-3 .workspace-preview-panel,
.stage-3 .workspace-page-issues,
.stage-3 .workspace-section-workbench,
.stage-3 .section-editor-card {
  padding: 22px !important;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 26px !important;
  box-shadow: none !important;
}

.stage-3 .workspace-cockpit-panel {
  position: relative;
  gap: 10px !important;
  padding: 12px !important;
  overflow: hidden;
  border-radius: 22px !important;
}

.workspace-preview-status {
  display: flex;
  flex: 1 1 360px;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 2px 2px;
}

.workspace-preview-status span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  color: var(--muted);
  background: #f6f6f7;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}

.workspace-preview-shell {
  position: relative;
  min-height: clamp(620px, 68vh, 840px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.stage-3 .workspace-subheading {
  align-items: baseline !important;
  padding: 0 2px;
}

.stage-3 .workspace-subheading strong {
  font-size: 22px !important;
  font-weight: 740 !important;
  letter-spacing: -0.035em;
}

.stage-3 .workspace-subheading small {
  color: var(--muted) !important;
  font-size: 13px !important;
  font-weight: 450 !important;
}

.stage-3 .workspace-preview-frame {
  overflow: auto !important;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 22px !important;
}

.stage-3 .workspace-cockpit-panel .workspace-preview-frame {
  position: absolute !important;
  inset: 0;
  border: 0 !important;
  border-radius: 0 !important;
}

.stage-3 .workspace-preview-panel iframe {
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  min-height: clamp(620px, 68vh, 840px) !important;
  background: #fff !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.stage-3 .workspace-preview-frame.mobile-preview {
  display: grid !important;
  justify-content: center;
  padding: 18px !important;
  background: #f2f2f4 !important;
}

.stage-3 .workspace-preview-frame.mobile-preview iframe {
  width: min(390px, 100%) !important;
  min-width: 320px !important;
  height: 760px !important;
  min-height: 760px !important;
  border: 1px solid var(--line) !important;
  border-radius: 28px !important;
  box-shadow: 0 18px 46px rgba(24, 32, 29, 0.12) !important;
}

.stage-3 .workspace-preview-frame.desktop-preview iframe {
  width: 100% !important;
}

.workspace-drawer-stack {
  position: absolute;
  inset: 12px;
  z-index: 5;
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
  pointer-events: none;
}

.workspace-drawer {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  flex: 0 0 calc((100% - 24px) / 3);
  min-width: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(24, 32, 29, 0.12);
  border-radius: 18px;
  box-shadow: 0 22px 68px rgba(24, 32, 29, 0.14);
  pointer-events: auto;
  animation: workspaceDrawerIn 180ms cubic-bezier(0.2, 0.82, 0.2, 1);
}

.workspace-drawer.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

@keyframes workspaceDrawerIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.workspace-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.workspace-drawer-header > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workspace-drawer-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workspace-drawer-header strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 760;
  letter-spacing: -0.03em;
  line-height: 1;
}

.workspace-drawer-header small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.35;
}

.workspace-drawer-close {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  color: var(--ink);
  background: #f7f7f8;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.workspace-drawer-close:hover {
  background: #efeff1;
}

.workspace-scope-list,
.workspace-fields-drawer,
.workspace-drawer > .workspace-issue-list {
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.workspace-scope-list {
  display: grid;
  gap: 8px;
}

.workspace-scope-list button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 4px 9px;
  align-items: start;
  width: 100%;
  padding: 11px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}

.workspace-scope-list button:hover,
.workspace-scope-list button.active {
  background: #fffaf5;
  border-color: rgba(242, 122, 26, 0.34);
}

.workspace-scope-list button span {
  grid-row: span 2;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: #f3f3f4;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.workspace-scope-list button.active span {
  color: #fff;
  background: var(--accent);
}

.workspace-scope-list strong,
.workspace-scope-list small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-scope-list strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.workspace-scope-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  white-space: nowrap;
}

.workspace-scope-list em {
  grid-row: span 2;
  align-self: center;
  padding: 4px 8px;
  color: var(--muted);
  background: #f6f6f7;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
  white-space: nowrap;
}

.workspace-fields-drawer {
  display: grid;
  gap: 12px;
}

.workspace-fields-drawer .section-editor-card {
  padding: 14px !important;
  border-radius: 16px !important;
}

.workspace-fields-drawer .workspace-field-card.active {
  background: #fffaf5 !important;
  border-color: rgba(242, 122, 26, 0.36) !important;
}

.workspace-field-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.workspace-field-meta span,
.workspace-field-meta em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  color: var(--muted);
  background: #f5f5f6;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
  line-height: 1;
}

.workspace-fields-drawer .section-editor-card pre {
  max-height: 140px;
  overflow: auto;
}

.workspace-fields-drawer .section-editor-card textarea {
  min-height: 170px;
}

.stage-3 .workspace-page-issues {
  gap: 14px !important;
}

.stage-3 .workspace-issue-list {
  gap: 8px !important;
}

.stage-3 .workspace-issue-list button,
.stage-3 .section-map-card {
  background: #fff !important;
  border-color: var(--line) !important;
  border-radius: 18px !important;
  transform: none !important;
}

.stage-3 .workspace-issue-list button:hover,
.stage-3 .section-map-card:hover {
  background: #fffaf5 !important;
  border-color: rgba(242, 122, 26, 0.34) !important;
  transform: none !important;
}

.stage-3 .workspace-issue-list button {
  grid-template-columns: auto minmax(0, 1fr) !important;
  padding: 11px !important;
  border-radius: 14px !important;
}

.stage-3 .workspace-issue-list button p {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.35;
}

.stage-3 .section-map-card.active,
.stage-3 .section-map-card.active:hover {
  color: var(--ink) !important;
  background: #fff7ef !important;
  border-color: rgba(242, 122, 26, 0.42) !important;
  box-shadow: none !important;
  transform: none !important;
}

.stage-3 .section-map-card.active span {
  color: #fff !important;
  background: var(--accent) !important;
}

.stage-3 .section-map-card.active small,
.stage-3 .section-map-card.active p,
.stage-3 .section-map-card.active strong,
.stage-3 .section-map-card.active em {
  color: var(--ink) !important;
}

.stage-3 .section-map-card.active em {
  background: #f2f2f4 !important;
}

.stage-3 .workspace-target-issues {
  color: var(--muted) !important;
  background: #fff7ef !important;
  border-color: rgba(242, 122, 26, 0.18) !important;
}

@media (min-width: 1180px) {
  .stage-3 .section-workbench-grid {
    grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr) !important;
    align-items: start;
  }
}

@media (max-width: 760px) {
  .workspace-cockpit-toolbar,
  .workspace-current-page-actions {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
  }

  .workspace-current-page-actions,
  .workspace-current-page-actions > button,
  .workspace-page-control,
  .workspace-page-control-trigger,
  .workspace-preview-mode-switch {
    width: 100%;
  }

  .workspace-preview-shell {
    min-height: 720px;
  }

  .workspace-drawer-stack {
    inset: 8px;
    flex-direction: column-reverse;
    justify-content: flex-start;
  }

  .workspace-drawer {
    flex: 0 0 min(76%, 620px);
  }
}

/* Keep hover states calm: color may change, but controls should not jump. */
button:hover,
.link-action:hover,
.scan-page-option:hover,
.section-map-card:hover,
.workspace-issue-list button:hover {
  transform: none !important;
}

/* Project row actions should stay clean without the dark floating shadow. */
.project-meta .project-actions .tiny-action.primary,
.project-meta .project-actions .tiny-action.primary:hover,
.project-meta .project-actions .tiny-action.icon-only,
.project-meta .project-actions .tiny-action.icon-only:hover {
  box-shadow: none !important;
}

.project-action-message {
  align-items: flex-start !important;
}

.project-action-message > svg {
  flex: 0 0 auto;
  margin-top: 4px;
}

.project-action-message > span {
  display: block;
  white-space: pre-line;
}

.project-row-action-message {
  box-sizing: border-box;
  width: 100%;
}

.project-delete-confirmation {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 14px 16px;
  color: #3a1512;
  background: #fff2ef;
  border: 1px solid rgba(215, 0, 21, 0.18);
  border-radius: 18px;
}

.project-delete-confirmation > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-delete-confirmation strong {
  color: #1f1f21;
  font-size: inherit;
  font-weight: 500;
  letter-spacing: 0;
}

.project-delete-confirmation span {
  color: #7b4a43;
  font-size: 13px;
  line-height: 1.38;
}

.project-delete-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.project-delete-actions .tiny-action {
  min-height: 38px !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  letter-spacing: -0.01em;
}

.project-delete-actions .confirm-delete-action {
  color: #fff !important;
  background: #d70015 !important;
  border-color: #d70015 !important;
}

.project-delete-actions .confirm-delete-action:hover {
  background: #b80012 !important;
  border-color: #b80012 !important;
}

/* Section icons align with the title line, not with the whole title+description block. */
.section-heading {
  align-items: flex-start !important;
}

.section-heading > svg {
  margin-top: 2px !important;
}

.refresh-projects-action {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  letter-spacing: -0.01em;
}

.project-form > .primary-action {
  font-size: 13px !important;
  font-weight: 650 !important;
  letter-spacing: -0.01em;
}

.project-list {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

/* Design-system cleanup: helper copy, placeholders, and neutral icon buttons. */
.project-form .field-hint,
.project-form .input-hint-row small {
  color: var(--muted) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  letter-spacing: -0.015em;
  line-height: 1.38 !important;
}

.field input::placeholder,
.project-edit-form input::placeholder,
textarea::placeholder {
  color: var(--muted) !important;
  font-weight: 400 !important;
  opacity: 0.82;
}

.project-actions .tiny-action.icon-only {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  color: var(--ink) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08) !important;
  backdrop-filter: blur(16px) saturate(160%);
}

.project-actions .tiny-action.icon-only:hover {
  color: #fff !important;
  background: var(--ink) !important;
  border-color: var(--ink) !important;
  transform: translateY(-1px);
}

.project-actions .tiny-action.danger.icon-only {
  color: #d70015 !important;
  background: rgba(255, 255, 255, 0.72) !important;
  border-color: var(--line) !important;
}

.project-actions .tiny-action.danger.icon-only:hover {
  color: #fff !important;
  background: #d70015 !important;
  border-color: #d70015 !important;
}

.field input:focus,
.project-edit-form input:focus,
.section-editor-card textarea:focus,
input:focus,
textarea:focus {
  border-color: rgba(242, 122, 26, 0.48) !important;
  box-shadow: 0 0 0 4px var(--accent-ring) !important;
}

.folder-picker-panel.active {
  background: rgba(242, 122, 26, 0.08) !important;
  border-color: rgba(242, 122, 26, 0.38) !important;
}

input[type="checkbox"] {
  accent-color: var(--accent) !important;
}

.audit-issue.info summary > span,
.task-row.active span {
  color: var(--accent) !important;
}

.workspace-page-tabs button.active,
.audit-toolbar button.active,
.section-map-card.active {
  background: linear-gradient(135deg, #1f1f21, #3a332e) !important;
  border-color: #1f1f21 !important;
}

.section-map-card:hover,
.workspace-issue-list button:hover,
.scan-page-option:hover {
  border-color: rgba(242, 122, 26, 0.26) !important;
}

.stage-placeholder {
  display: none;
  gap: 16px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.055);
}

.stage-1 .scan-summary:not(.muted) {
  display: none !important;
}

.stage-2 .scan-summary:not(.muted) {
  display: none !important;
}

.stage-1 .project-form {
  display: grid !important;
}

.stage-2 .project-form,
.stage-3 .project-form,
.stage-4 .project-form,
.stage-5 .project-form {
  display: none !important;
}

.stage-2 .project-grid,
.stage-3 .project-grid,
.stage-4 .project-grid,
.stage-5 .project-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

.stage-2 .page-workspace-panel,
.stage-2 .audit-summary {
  display: none !important;
}

.stage-3 .project-scan-status,
.stage-4 .project-scan-status,
.stage-5 .project-scan-status {
  display: none !important;
}

.stage-3 .workspace-help,
.stage-4 .workspace-help,
.stage-4 .scan-help {
  display: none !important;
}

.stage-4 .scan-selection {
  max-height: 280px;
  overflow: auto;
}

.stage-3 .scan-selection-bar,
.stage-3 .scan-page-tree,
.stage-3 .workspace-help,
.stage-3 .audit-summary,
.stage-3 .scan-help,
.stage-3 .scan-metrics,
.stage-3 .scan-status-note {
  display: none !important;
}

.stage-3 .scan-selection {
  display: contents !important;
}

.stage-3 .scan-page-list,
.stage-4 .scan-page-list {
  max-height: 180px;
  overflow: auto;
}

.stage-4 .page-workspace-panel,
.stage-4 .audit-summary,
.stage-4 .audit-toolbar,
.stage-4 .audit-help,
.stage-4 .media-issue-panel,
.stage-4 .audit-issue-list,
.stage-5 .scan-selection,
.stage-5 .page-workspace-panel,
.stage-5 .audit-summary,
.stage-5 .audit-toolbar,
.stage-5 .audit-help,
.stage-5 .media-issue-panel,
.stage-5 .audit-issue-list {
  display: none !important;
}

.stage-3 .page-workspace-panel {
  display: grid !important;
}

.stage-3 .workspace-preview-frame {
  border-radius: 18px !important;
}

.stage-3 .workspace-preview-markers button {
  background: #ff4fb8 !important;
  box-shadow: 0 8px 18px rgba(255, 79, 184, 0.3) !important;
  transform: none !important;
}

.stage-3 .workspace-preview-markers button.active {
  background: #d81b7d !important;
  box-shadow: 0 0 0 4px rgba(255, 79, 184, 0.18) !important;
}

.stage-6 .project-setup,
.stage-7 .project-setup,
.stage-8 .project-setup,
.stage-9 .project-setup {
  display: none !important;
}

.stage-6 .stage-placeholder,
.stage-7 .stage-placeholder,
.stage-8 .stage-placeholder,
.stage-9 .stage-placeholder {
  display: grid;
}

@media (min-width: 1500px) {
  .stage-1 .project-grid {
    grid-template-columns: minmax(360px, 430px) minmax(0, 1fr) !important;
  }

  .stage-2 .project-grid,
  .stage-3 .project-grid,
  .stage-4 .project-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Primary submit actions use the same dark emphasis as the active stage pill. */
.primary-action,
.project-form button[type="submit"],
.tiny-action.primary {
  color: #fff !important;
  background: linear-gradient(135deg, #1f1f21, #3a332e) !important;
  border-color: #1f1f21 !important;
  box-shadow: 0 12px 28px rgba(31, 31, 33, 0.18) !important;
}

.primary-action:hover,
.project-form button[type="submit"]:hover,
.tiny-action.primary:hover {
  background: linear-gradient(135deg, #29292c, #493b32) !important;
  box-shadow: 0 16px 34px rgba(31, 31, 33, 0.22) !important;
}

.primary-action:disabled,
.project-form button[type="submit"]:disabled,
.tiny-action.primary:disabled {
  opacity: 0.48 !important;
  transform: none !important;
  box-shadow: 0 8px 18px rgba(31, 31, 33, 0.1) !important;
}

.folder-picker-panel .folder-pick-action,
.folder-picker-panel button.folder-pick-action,
.folder-pick-action {
  color: #fff !important;
  background: var(--accent) !important;
  border-color: var(--accent-hover) !important;
  box-shadow: 0 10px 24px var(--accent-shadow) !important;
}

.folder-picker-panel .folder-pick-action:hover,
.folder-picker-panel button.folder-pick-action:hover,
.folder-pick-action:hover {
  background: var(--accent-hover) !important;
  box-shadow: 0 14px 30px rgba(242, 122, 26, 0.3) !important;
}

/* Stage 4 page selector: grow naturally, scroll only after roughly 15 page rows. */
.stage-4 .scan-selection {
  max-height: none !important;
  overflow: visible !important;
}

.stage-4 .scan-page-tree {
  max-height: calc((64px + 6px) * 15) !important;
  overflow-y: auto !important;
  padding-right: 4px !important;
}

.stage-4 .scan-page-list {
  max-height: none !important;
  overflow: visible !important;
  padding-right: 0 !important;
}

.stage-2 .scope-flow-toolbar .scope-flow-toolbar-button,
.project-scope-flow-canvas .scope-flow-toolbar .scope-flow-toolbar-button {
  transform: translateY(var(--tb-shift-y, 0px)) scale(var(--tb-scale, 1)) !important;
}

/* Canonical white glass pass: shared Engine/BIM-style surfaces and controls. */
.workspace-page-menu,
.workspace-drawer,
.semantic-panel,
.semantic-page-plan-panel,
.semantic-brief-panel,
.semantic-landing-panel,
.semantic-verdict-panel,
.semantic-warning-list,
.semantic-gap-panel,
.semantic-seeds,
.semantic-ai-contract,
.semantic-style-panel,
.semantic-action-list,
.semantic-cluster-detail,
.market-panel,
.market-heading,
.market-state-card,
.market-wordstat-card,
.market-provider,
.market-columns section,
.market-next-actions {
  background: var(--nodedc-glass-panel-surface-strong) !important;
  border: 0 !important;
  border-radius: 22px !important;
  box-shadow: var(--nodedc-glass-panel-shadow) !important;
  backdrop-filter: var(--nodedc-glass-panel-blur) !important;
  -webkit-backdrop-filter: var(--nodedc-glass-panel-blur) !important;
  isolation: isolate;
}

.workspace-page-menu,
.workspace-drawer,
.semantic-panel,
.semantic-page-plan-panel,
.semantic-brief-panel,
.semantic-landing-panel,
.semantic-verdict-panel,
.semantic-warning-list,
.semantic-gap-panel,
.semantic-seeds,
.semantic-ai-contract,
.semantic-style-panel,
.semantic-action-list,
.semantic-cluster-detail,
.market-panel,
.market-heading,
.market-state-card,
.market-wordstat-card,
.market-provider,
.market-columns section,
.market-next-actions {
  overflow: hidden !important;
}

.semantic-panel,
.semantic-page-plan-panel,
.semantic-brief-panel,
.semantic-landing-panel,
.semantic-verdict-panel,
.semantic-warning-list,
.semantic-gap-panel,
.semantic-seeds,
.semantic-ai-contract,
.semantic-style-panel,
.semantic-action-list,
.semantic-cluster-detail,
.market-panel,
.market-heading,
.market-state-card,
.market-wordstat-card,
.market-provider,
.market-columns section,
.market-next-actions {
  position: relative;
}

.workspace-page-menu::after,
.workspace-drawer::after,
.semantic-panel::after,
.semantic-page-plan-panel::after,
.semantic-brief-panel::after,
.semantic-landing-panel::after,
.semantic-verdict-panel::after,
.semantic-warning-list::after,
.semantic-gap-panel::after,
.semantic-seeds::after,
.semantic-ai-contract::after,
.semantic-style-panel::after,
.semantic-action-list::after,
.semantic-cluster-detail::after,
.market-panel::after,
.market-heading::after,
.market-state-card::after,
.market-wordstat-card::after,
.market-provider::after,
.market-columns section::after,
.market-next-actions::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1px;
  pointer-events: none;
  border-radius: inherit;
  background: var(--nodedc-glass-outline-gradient);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.workspace-drawer-header,
.workspace-page-menu-head {
  border-color: rgba(24, 32, 29, 0.08) !important;
}

.workspace-page-menu-list button,
.workspace-scope-list button,
.workspace-fields-drawer .section-editor-card,
.stage-3 .workspace-issue-list button,
.stage-3 .section-map-card,
.stage-3 .workspace-target-issues,
.semantic-metric-row,
.semantic-gap-row,
.semantic-scope-grid,
.semantic-scope-grid > div,
.semantic-quality,
.semantic-verdict-columns section,
.semantic-verdict-risk-list article,
.semantic-verdict-clusters > div,
.semantic-verdict-next,
.semantic-warning-row,
.semantic-page-plan-row,
.semantic-brief-row,
.semantic-brief-body section,
.semantic-brief-section,
.semantic-brief-quality-card,
.semantic-landing-row,
.market-wordstat-card > div:last-of-type,
.market-seed-list div,
.market-brief-list div,
.market-wordstat-results > div,
.semantic-cluster,
.semantic-detail-grid section,
.semantic-evidence-panel,
.semantic-source-list div {
  background: var(--nodedc-glass-control-bg) !important;
  border: 0 !important;
  border-radius: 16px !important;
  box-shadow: var(--nodedc-glass-control-shadow) !important;
  backdrop-filter: var(--nodedc-glass-blur) !important;
  -webkit-backdrop-filter: var(--nodedc-glass-blur) !important;
}

.workspace-page-menu-list button:hover,
.workspace-scope-list button:hover,
.stage-3 .workspace-issue-list button:hover,
.stage-3 .section-map-card:hover,
.semantic-cluster:hover,
.semantic-cluster.active {
  background: var(--nodedc-glass-control-hover) !important;
  border: 0 !important;
  box-shadow: var(--nodedc-glass-control-shadow), 0 0 0 1px rgba(24, 32, 29, 0.08) inset !important;
  transform: none !important;
}

.workspace-page-menu-list button.active,
.workspace-scope-list button.active,
.stage-3 .section-map-card.active,
.stage-3 .section-map-card.active:hover,
.workspace-fields-drawer .workspace-field-card.active {
  color: var(--ink) !important;
  background: var(--nodedc-header-dropdown-item-active-bg) !important;
  border: 0 !important;
  box-shadow: var(--nodedc-glass-control-shadow), 0 0 0 1px rgba(24, 32, 29, 0.12) inset !important;
}

.workspace-page-menu-list button.active strong,
.workspace-page-menu-list button.active small,
.workspace-page-menu-list button.active em,
.workspace-scope-list button.active strong,
.workspace-scope-list button.active small,
.workspace-scope-list button.active em,
.stage-3 .section-map-card.active small,
.stage-3 .section-map-card.active p,
.stage-3 .section-map-card.active strong,
.stage-3 .section-map-card.active em {
  color: var(--ink) !important;
}

.workspace-page-menu-list button span,
.workspace-scope-list button span,
.stage-3 .section-map-card span,
.stage-3 .workspace-issue-list span,
.workspace-field-meta span,
.workspace-field-meta em,
.semantic-metric-row span,
.semantic-gap-row span,
.semantic-cluster div span,
.semantic-cluster div em,
.semantic-warning-row span,
.semantic-seeds span,
.semantic-scope-grid > span,
.semantic-quality > span,
.semantic-verdict-heading span,
.semantic-verdict-risk-list span,
.semantic-verdict-clusters span,
.semantic-token-list span,
.semantic-source-list span,
.semantic-page-plan-row > div:first-child span,
.semantic-brief-row summary > span,
.semantic-brief-row summary > .semantic-brief-quality,
.semantic-brief-section span,
.semantic-brief-quality-card > div:first-child span,
.semantic-brief-checks span,
.semantic-landing-row > span,
.market-wordstat-card > div:last-of-type span,
.market-state-card > div > span,
.market-provider > span,
.market-seed-list span,
.market-brief-list span,
.market-wordstat-results p span,
.semantic-term-cloud span {
  color: var(--muted) !important;
  background: rgba(24, 32, 29, 0.06) !important;
  border: 0 !important;
  box-shadow: var(--nodedc-glass-control-shadow) !important;
}

.workspace-page-menu-list button.active span,
.workspace-scope-list button.active span,
.stage-3 .section-map-card.active span {
  color: #fff !important;
  background: var(--ink) !important;
}

.workspace-page-menu-list button em,
.workspace-scope-list em,
.stage-3 .section-map-card em,
.workspace-field-meta span,
.workspace-field-meta em {
  border-radius: 999px !important;
}

.section-editor-card label span {
  color: var(--muted) !important;
  font-weight: 760 !important;
}

.workspace-drawer-close,
.workspace-current-page-actions > button,
.workspace-current-page-actions .workspace-preview-mode-switch,
.scan-selection-bar button,
.scan-summary,
.scan-metric,
.audit-toolbar button,
.workspace-page-tabs button {
  background: var(--nodedc-glass-control-bg) !important;
  border: 0 !important;
  box-shadow: var(--nodedc-glass-control-shadow) !important;
  backdrop-filter: var(--nodedc-glass-blur) !important;
  -webkit-backdrop-filter: var(--nodedc-glass-blur) !important;
}

.workspace-drawer-close:hover,
.workspace-current-page-actions > button:hover,
.scan-selection-bar button:hover,
.audit-toolbar button:hover,
.workspace-page-tabs button:hover {
  background: var(--nodedc-glass-control-hover) !important;
  color: var(--ink) !important;
}

.workspace-current-page-actions > button.active,
.workspace-page-control.open .workspace-page-control-trigger,
.audit-toolbar button.active,
.workspace-page-tabs button.active {
  color: #fff !important;
  background: var(--nodedc-glass-control-active) !important;
}

.workspace-current-page-actions > button.active svg,
.workspace-page-control.open .workspace-page-control-trigger svg,
.audit-toolbar button.active svg,
.workspace-page-tabs button.active svg {
  color: #fff !important;
}

.workspace-fields-drawer .section-editor-card textarea,
.workspace-fields-drawer .section-editor-card pre,
.section-editor-card textarea,
.field input,
.project-edit-form input,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
textarea {
  background: var(--nodedc-glass-control-bg) !important;
  border-color: transparent !important;
  box-shadow: var(--nodedc-glass-control-shadow) !important;
}

.field input:focus,
.project-edit-form input:focus,
.section-editor-card textarea:focus,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
textarea:focus {
  border-color: transparent !important;
  box-shadow: var(--nodedc-glass-control-shadow), 0 0 0 3px rgba(24, 32, 29, 0.1) !important;
}

.folder-picker-panel.active {
  background: var(--nodedc-header-dropdown-item-active-bg) !important;
  border-color: transparent !important;
}

.folder-picker-panel .folder-pick-action,
.folder-picker-panel button.folder-pick-action,
.folder-pick-action {
  color: #fff !important;
  background: var(--nodedc-glass-control-active) !important;
  border-color: transparent !important;
  box-shadow: 0 12px 28px rgba(31, 31, 33, 0.18) !important;
}

.folder-picker-panel .folder-pick-action:hover,
.folder-picker-panel button.folder-pick-action:hover,
.folder-pick-action:hover {
  background: linear-gradient(135deg, #29292c, #343437) !important;
  box-shadow: 0 16px 34px rgba(31, 31, 33, 0.22) !important;
}

.semantic-metric-row span.ok,
.semantic-clean,
.semantic-metric-row span.danger,
.semantic-quality.ok > span,
.semantic-quality.warning > span,
.semantic-quality.problem > span,
.semantic-verdict-panel.low .semantic-verdict-heading span,
.semantic-verdict-panel.high .semantic-verdict-heading span,
.semantic-verdict-risk-list article.problem span,
.semantic-cluster.missing div span,
.semantic-page-plan-row.create > div:first-child span,
.semantic-page-plan-row.strengthen > div:first-child span,
.semantic-brief-row summary > .semantic-brief-quality.needs_work,
.semantic-brief-row summary > .semantic-brief-quality.blocked,
.semantic-brief-row summary > .semantic-brief-quality.legacy,
.semantic-brief-row.create summary > span,
.semantic-brief-row.create summary > .semantic-brief-quality.ready,
.semantic-brief-row.create summary > .semantic-brief-quality.needs_work,
.semantic-brief-row.create summary > .semantic-brief-quality.blocked,
.semantic-brief-row.create summary > .semantic-brief-quality.legacy,
.semantic-brief-checks .done,
.semantic-brief-checks .pass,
.semantic-brief-checks .pending,
.semantic-brief-checks .warn,
.semantic-brief-checks .fail,
.semantic-token-list.muted span.warning,
.semantic-token-list.muted span.problem,
.semantic-landing-row.create_target_page > span,
.market-state-card.not_collected > div > span,
.market-state-card.partial_ready > div > span,
.market-provider.connected > span,
.market-seed-list span.collected,
.market-seed-list span.collected_related_only,
.market-brief-list span.collected,
.market-seed-list span.ready_for_collection,
.market-brief-list span.ready_for_collection,
.market-seed-list span.collected_no_signal,
.market-state-card.not_configured > div > span,
.market-provider.not_configured > span,
.market-provider.not_implemented > span,
.market-seed-list span.collection_failed,
.market-brief-list span.collection_failed,
.market-seed-list span.not_configured,
.market-brief-list span.not_configured {
  color: var(--muted) !important;
  background: rgba(24, 32, 29, 0.06) !important;
}

.workspace-target-issues,
.stage-3 .workspace-target-issues {
  color: var(--muted) !important;
  background: var(--nodedc-glass-control-bg) !important;
  border: 0 !important;
}

.stage-3 .workspace-drawer-page-list {
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 12px;
}

.stage-3 .workspace-page-menu-list button,
.stage-3 .workspace-drawer-page-list button {
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
  min-height: 68px;
  padding: 10px 12px;
}

.stage-3 .workspace-page-menu-list button span,
.stage-3 .workspace-drawer-page-list button span {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: center;
  width: 26px;
  min-width: 26px;
  height: 26px;
}

.stage-3 .workspace-page-menu-list button strong,
.stage-3 .workspace-page-menu-list button small,
.stage-3 .workspace-page-menu-list button em,
.stage-3 .workspace-drawer-page-list button strong,
.stage-3 .workspace-drawer-page-list button small,
.stage-3 .workspace-drawer-page-list button em {
  grid-column: 2;
  min-width: 0;
}

.stage-3 .workspace-page-menu-list button em,
.stage-3 .workspace-drawer-page-list button em {
  grid-row: auto;
  justify-self: start;
  align-self: start;
  min-width: max-content;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  line-height: 1;
}

.stage-3 .workspace-page-menu-list button.active,
.stage-3 .workspace-drawer-page-list button.active,
.workspace-fields-drawer .workspace-field-card.active {
  background: var(--nodedc-header-dropdown-item-active-bg) !important;
  box-shadow: var(--nodedc-glass-control-shadow), 0 0 0 1px rgba(24, 32, 29, 0.12) inset !important;
}

.stage-3 .workspace-page-menu-list button.active span,
.stage-3 .workspace-drawer-page-list button.active span {
  color: #fff !important;
  background: var(--ink) !important;
}

.stage-3 .workspace-page-menu-list button.active strong,
.stage-3 .workspace-page-menu-list button.active small,
.stage-3 .workspace-page-menu-list button.active em,
.stage-3 .workspace-drawer-page-list button.active strong,
.stage-3 .workspace-drawer-page-list button.active small,
.stage-3 .workspace-drawer-page-list button.active em {
  color: var(--ink) !important;
}

.stage-3 .workspace-target-issues {
  display: grid;
  gap: 8px;
  padding: 0;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.workspace-target-issue {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  padding: 10px;
  color: var(--ink);
  background: var(--nodedc-glass-control-bg);
  border: 0;
  border-radius: 14px;
  box-shadow: var(--nodedc-glass-control-shadow);
  backdrop-filter: var(--nodedc-glass-blur);
  -webkit-backdrop-filter: var(--nodedc-glass-blur);
}

.workspace-target-issue span {
  grid-row: 1 / span 3;
  align-self: start;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  color: var(--muted) !important;
  background: rgba(24, 32, 29, 0.06) !important;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
}

.workspace-target-issue strong,
.workspace-target-issue small,
.workspace-target-issue p {
  grid-column: 2;
  min-width: 0;
}

.workspace-target-issue strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.22;
}

.workspace-target-issue small,
.workspace-target-issue p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.35;
}
