/* ─── Design tokens ─── */
:root {
  --bg:           #FAFAF8;
  --bg-sage:      #EFF4F1;
  --text:         #1B2B3A;
  --text-muted:   #567080;
  --text-faint:   #8EA3B0;
  --green:        #2D6A4F;
  --green-dark:   #1E4D38;
  --green-light:  #E8F2EC;
  --green-band:   #192F24;
  --border:       #DDE8E3;
  --border-light: #EBF1EE;
  --radius:       10px;
  --radius-lg:    16px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  --shadow:       0 2px 8px rgba(0,0,0,0.07), 0 8px 24px rgba(0,0,0,0.05);
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --max-w:        1100px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ─── Layout ─── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 36px;
}

.section { padding: 96px 0; }
.section--sage { background: var(--bg-sage); }

.section__header { margin-bottom: 52px; }
.section__header--center { text-align: center; }
.section__header h2 { margin-top: 10px; }

/* ─── Typography ─── */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.022em;
}
h1 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2.2rem); }
h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: 0.95rem; font-weight: 600; }
p  { color: var(--text-muted); line-height: 1.65; }

.eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--green);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s, box-shadow 0.14s;
  border: 1.5px solid transparent;
  white-space: nowrap;
}

.btn--primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn--primary:hover { background: var(--green-dark); border-color: var(--green-dark); }

.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--outline:hover { border-color: #B0BEC8; background: rgba(0,0,0,0.025); }

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn--ghost:hover { color: var(--text); }

.btn--white {
  background: #fff;
  color: var(--green-dark);
  border-color: #fff;
}
.btn--white:hover { background: #f3f3f1; }

.btn--ghost-white {
  background: transparent;
  color: rgba(255,255,255,0.75);
  border-color: rgba(255,255,255,0.28);
}
.btn--ghost-white:hover { color: #fff; border-color: rgba(255,255,255,0.55); }

.btn--lg {
  padding: 12px 24px;
  font-size: 0.9rem;
  border-radius: 9px;
}

/* ─── Nav ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.nav--scrolled {
  border-color: var(--border-light);
  box-shadow: 0 1px 16px rgba(0,0,0,0.06);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 36px;
  height: 62px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  flex-shrink: 0;
}
.nav__mark {
  width: 28px;
  height: 28px;
  background: var(--green);
  color: #fff;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nav__wordmark { letter-spacing: -0.01em; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
}
.nav__links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.14s;
}
.nav__links a:hover { color: var(--text); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ─── Nav login link ─── */
.nav__login {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.14s;
}
.nav__login:hover { color: var(--text); }

/* ─── Hero ─── */
.hero { padding: 84px 0 96px; }

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hero__text .eyebrow { margin-bottom: -6px; }
.hero__text h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero__sub {
  font-size: 0.98rem;
  line-height: 1.72;
  max-width: 460px;
  color: var(--text-muted);
}

.hero__ctas {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.hero__reassure {
  font-size: 0.82rem;
  color: var(--text-faint);
  font-style: italic;
}

/* ─── Hero visual: mini flow card ─── */
.hero__visual { position: relative; }

.hero-viz {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

/* Input card */
.hz-input {
  background: var(--bg-sage);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 14px;
}
.hz-input__tag {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 7px;
}
.hz-input__title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 9px;
}
.hz-input__lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}
.hz-line {
  height: 5px;
  border-radius: 3px;
  background: #D8E4DE;
}
.hz-line--xl { width: 92%; }
.hz-line--lg { width: 72%; }
.hz-line--md { width: 52%; }

.hz-rows { display: flex; flex-direction: column; gap: 4px; }
.hz-row-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 5px;
  padding: 5px 8px;
}
.hz-row-item__name { font-size: 0.69rem; color: var(--text-muted); }
.hz-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.hz-badge--warn { background: #FEF3C7; color: #92400E; }
.hz-badge--ok   { background: #D1FAE5; color: #065F46; }
.hz-badge--q    { background: #EEF6FF; color: #1D4ED8; }

/* Down arrows */
.hz-arrow-down { display: flex; justify-content: center; }

/* Review badge */
.hz-review {
  background: var(--green);
  border-radius: var(--radius);
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hz-review__mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hz-review__name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.hz-review__sub {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* Output chips */
.hz-outputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.hz-output {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
}
.hz-output svg { flex-shrink: 0; }
.hz-output--k {
  background: var(--green-light);
  color: var(--green-dark);
  border: 1px solid rgba(45,106,79,0.18);
}
.hz-output--o {
  background: var(--bg-sage);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Feedback */
.hz-feedback {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-style: italic;
  color: var(--text-faint);
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.hz-feedback svg { color: var(--green); opacity: 0.5; flex-shrink: 0; }

/* ─── Process diagram (How it works) ─── */
.process-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 36px 24px;
  box-shadow: var(--shadow-sm);
}

.pd-track {
  display: grid;
  grid-template-columns: 1fr 52px 1.15fr 60px 1fr;
  align-items: stretch;
  gap: 0;
  margin-bottom: 20px;
}

/* Stage nodes */
.pd-stage {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  background: var(--bg);
}
.pd-stage--review {
  background: var(--green);
  border-color: transparent;
}
.pd-stage__icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--bg-sage);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  flex-shrink: 0;
}
.pd-stage--review .pd-stage__icon-wrap {
  background: rgba(255,255,255,0.18);
  color: #fff;
}
.pd-stage__eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}
.pd-stage__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.pd-stage--review .pd-stage__title { color: #fff; }
.pd-stage__desc {
  font-size: 0.77rem;
  color: var(--text-faint);
  line-height: 1.5;
}
.pd-stage--review .pd-stage__desc { color: rgba(255,255,255,0.72); }
.pd-stage__list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pd-stage__list li {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-left: 14px;
  position: relative;
  line-height: 1.45;
}
.pd-stage__list li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--green);
  font-size: 0.9rem;
  line-height: 1.2;
}
.pd-stage--review .pd-stage__list li { color: rgba(255,255,255,0.78); }
.pd-stage--review .pd-stage__list li::before { color: rgba(255,255,255,0.45); }

/* Arrow between stages */
.pd-connector {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fork SVG column */
.pd-fork {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Outputs column */
.pd-outputs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pd-out {
  flex: 1;
  padding: 16px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pd-out--knowledge {
  background: #EAF2EE;
  border-color: rgba(45,106,79,0.2);
}
.pd-out__icon-wrap {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.pd-out--knowledge .pd-out__icon-wrap {
  background: rgba(45,106,79,0.14);
  color: var(--green);
}
.pd-out__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}
.pd-out--knowledge .pd-out__title { color: var(--green-dark); }
.pd-out__desc {
  font-size: 0.74rem;
  color: var(--text-faint);
  line-height: 1.5;
}

/* Feedback bar */
.pd-feedback-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.77rem;
  font-style: italic;
  color: var(--text-faint);
  padding-top: 18px;
  border-top: 1px dashed var(--border);
}
.pd-feedback-bar svg { color: var(--green); opacity: 0.5; flex-shrink: 0; }

/* ─── Section subtitle ─── */
.section__sub {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 10px auto 0;
  line-height: 1.65;
}

/* ─── Stack band ─── */
.stack-band {
  background: #fff;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 40px 0;
}
.stack-band__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 52px;
  align-items: center;
}
.stack-band__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.stack-band__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.62;
  max-width: 440px;
}

/* App-icon style stack tiles */
.si-row {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
.si-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: default;
}
.si-tile__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18), 0 1px 2px rgba(0,0,0,0.1);
  transition: transform 0.15s, box-shadow 0.15s;
}
.si-tile:hover .si-tile__icon {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.22), 0 2px 4px rgba(0,0,0,0.08);
}
.si-tile__label {
  font-size: 0.67rem;
  color: var(--text-faint);
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

/* ─── Value cards ─── */
.value-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.value-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 26px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.value-card--accent {
  background: var(--green);
  border-color: transparent;
}
.vc-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--vc-bg, var(--green-light));
  color: var(--vc-color, var(--green));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}
.value-card__heading {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
}
.value-card--accent .value-card__heading { color: #fff; }
.value-card__sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.value-card--accent .value-card__sub { color: rgba(255,255,255,0.72); }
.value-card__list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.value-card__list li {
  font-size: 0.81rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}
.value-card__list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--green);
  opacity: 0.7;
}
.value-card--accent .value-card__list li { color: rgba(255,255,255,0.8); }
.value-card--accent .value-card__list li::before { color: rgba(255,255,255,0.5); }

/* ─── Use cases ─── */
.usecases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.usecase {
  background: var(--bg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.14s;
}
.usecase:hover { background: #fff; }
.usecase__icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--uc-bg, var(--green-light));
  color: var(--uc-color, var(--green));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.usecase h4 { font-size: 0.92rem; letter-spacing: -0.01em; }
.usecase p  { font-size: 0.82rem; line-height: 1.55; }

/* ─── Expert section ─── */
.expert-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.expert-section__header {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 80px;
}
.expert-section__header h2 { margin-top: 2px; }
.expert-section__body {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.72;
}
.expert-section__callout {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--green-dark);
  background: var(--green-light);
  border: 1px solid rgba(45,106,79,0.2);
  border-radius: 9px;
  padding: 13px 16px;
  line-height: 1.55;
}
.expert-paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.expert-path {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: border-color 0.14s;
}
.expert-path:hover { border-color: rgba(45,106,79,0.3); }
.expert-path__num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}
.expert-path__name {
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.expert-path__desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ─── CTA band ─── */
.cta-band {
  background: var(--green-band);
  position: relative;
  overflow: hidden;
  padding: 100px 0;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -48deg,
    rgba(255,255,255,0.025) 0px,
    rgba(255,255,255,0.025) 1px,
    transparent 1px,
    transparent 30px
  );
  pointer-events: none;
}
.cta-band__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}
.cta-band__inner h2 {
  color: #fff;
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
}
.cta-band__inner > p {
  color: rgba(255,255,255,0.62);
  font-size: 1rem;
  max-width: 400px;
}
.cta-band__buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}
.cta-band__reassure {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
}

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .si-row { gap: 8px; }
  .si-tile__icon { width: 46px; height: 46px; border-radius: 12px; }
}

@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__sub { max-width: 100%; }

  .pd-track {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto;
  }
  .pd-connector { transform: rotate(90deg); padding: 4px 0; }
  .pd-fork { display: none; }
  .pd-outputs { flex-direction: row; gap: 10px; }
  .pd-out { flex: 1; }

  .stack-band__inner { grid-template-columns: 1fr; gap: 28px; }
  .si-row { flex-wrap: wrap; }

  .value-cards { grid-template-columns: 1fr; gap: 10px; }

  .expert-section { grid-template-columns: 1fr; gap: 44px; }
  .expert-section__header { position: static; }
  .usecases { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .container { padding: 0 22px; }
  .section { padding: 72px 0; }
  .hero { padding: 56px 0 72px; }
  .nav__links { display: none; }
  .usecases { grid-template-columns: 1fr; }
  .expert-paths { grid-template-columns: 1fr; }
  .value-cards { grid-template-columns: 1fr; }
  .stack-band { padding: 28px 0; }
  .pd-outputs { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero__ctas { flex-direction: column; align-items: flex-start; }
  .cta-band__buttons { flex-direction: column; }
  .benefits { gap: 2px; }
}


/* ═══════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════ */

.login-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.login-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 36px;
  border-bottom: 1px solid var(--border-light);
}

.login-topbar__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.login-topbar__back {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.14s;
}
.login-topbar__back:hover { color: var(--text); }

.login-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px 80px;
}

.login-card {
  width: 100%;
  max-width: 600px;
}

.login-heading {
  text-align: center;
  margin-bottom: 10px;
}
.login-heading h1 { font-size: clamp(1.65rem, 3vw, 2.15rem); }

.login-sub {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.demo-accounts-label {
  display: block;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.demo-accounts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.demo-account-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.demo-account-card:hover {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.08);
}
.demo-account-card:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.08);
  outline: none;
}

.demo-account-card__header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.demo-account-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.demo-account-card__email {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  word-break: break-all;
}

.demo-account-card__ws {
  font-size: 0.75rem;
  color: var(--text-faint);
}
.demo-account-card__ws strong { color: var(--text-muted); font-weight: 600; }

.demo-account-card__details {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.demo-account-card__detail {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.demo-account-card__detail strong {
  color: var(--text);
  font-weight: 600;
}

.demo-account-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 16px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.14s;
}
.demo-account-card__btn:hover { background: var(--green-dark); }

/* OR divider */
.login-or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  color: var(--text-faint);
  font-size: 0.78rem;
  font-weight: 500;
}
.login-or::before, .login-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Email form */
.login-email-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.login-email-form label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
}

.login-email-form input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.login-email-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.08);
}
.login-email-form input::placeholder { color: var(--text-faint); }

.login-email-form button {
  padding: 11px 20px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.14s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.login-email-form button:hover { background: var(--green-dark); }

.login-error {
  font-size: 0.78rem;
  color: #b03030;
  min-height: 1em;
}

.login-helper {
  font-size: 0.79rem;
  color: var(--text-faint);
  text-align: center;
  margin-top: 2px;
}

.login-footer-note {
  margin-top: 44px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-faint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

@media (max-width: 540px) {
  .demo-accounts { grid-template-columns: 1fr; }
  .login-topbar { padding: 14px 20px; }
  .login-main { padding: 40px 16px 60px; }
}


/* ═══════════════════════════════════════════
   WORKSPACE APP SHELL
   ═══════════════════════════════════════════ */

.ws-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

/* ── Sidebar ── */
.ws-sidebar {
  width: 224px;
  flex-shrink: 0;
  background: var(--green-band);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden; /* nav scrolls internally; footer stays pinned */
}

.ws-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 18px 18px 14px;
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}

.ws-sidebar__mark {
  width: 26px;
  height: 26px;
  background: var(--green);
  color: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ws-sidebar__ws-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 12px 6px;
  padding: 6px 8px;
  color: rgba(255,255,255,0.82);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: default;
  letter-spacing: -0.005em;
}

.ws-nav {
  flex: 1;
  padding: 4px 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto; /* allow nav to scroll so footer always stays visible */
}

.ws-nav__item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 7px;
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  text-decoration: none;
}
.ws-nav__item:hover {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.82);
}
.ws-nav__item--active {
  background: rgba(255,255,255,0.11);
  color: #fff;
}
.ws-nav__item--active svg { opacity: 1; }
.ws-nav__item svg { opacity: 0.7; }

.ws-sidebar__footer {
  padding: 14px 10px 18px;
}

.ws-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 9px 14px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.12s;
  letter-spacing: -0.005em;
}
.ws-create-btn:hover { background: #24573f; }

/* ── Top bar ── */
.ws-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.ws-topbar {
  height: 54px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  background: var(--bg);
  flex-shrink: 0;
}

.ws-topbar__title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.ws-topbar__search {
  flex: 1;
  max-width: 300px;
  position: relative;
}

.ws-topbar__search input {
  width: 100%;
  padding: 6px 12px 6px 32px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 0.8rem;
  font-family: var(--font);
  background: var(--bg-sage);
  color: var(--text);
  outline: none;
  transition: border-color 0.12s, background 0.12s;
}
.ws-topbar__search input:focus {
  border-color: var(--green);
  background: #fff;
}
.ws-topbar__search input::placeholder { color: var(--text-faint); }

.ws-topbar__search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

.ws-topbar__spacer { flex: 1; }

.ws-topbar__user {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: default;
}

.ws-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

.ws-topbar__user-name {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text);
}

/* ── Content ── */
.ws-content {
  flex: 1;
  overflow-y: auto;
  padding: 30px 32px 48px;
}

/* Two-column workspace grid */
.ws-grid {
  display: grid;
  grid-template-columns: 1.18fr 1fr;
  gap: 28px;
  align-items: start;
}

.ws-col-main,
.ws-col-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

/* Welcome header */
.ws-welcome h1 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  margin-bottom: 5px;
}
.ws-welcome p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Expert profile card */
.ws-expert-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}

.ws-expert-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ws-expert-info { flex: 1; min-width: 0; }

.ws-expert-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1px;
}

.ws-expert-role {
  font-size: 0.75rem;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 10px;
}

.ws-expert-profile-label {
  font-size: 0.67rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.ws-expert-profile-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.ws-expert-profile-text--editable {
  min-height: 3em;
  border-radius: 6px;
  padding: 6px 8px;
  margin: -6px -8px;
  outline: none;
  transition: background 0.12s, box-shadow 0.12s;
}
.ws-expert-profile-text--editable:focus {
  background: var(--bg-sage);
  box-shadow: 0 0 0 2px var(--green-light);
}
.ws-expert-profile-text--editable:empty::before {
  content: attr(data-placeholder);
  color: var(--text-faint);
  font-style: italic;
  pointer-events: none;
}

/* Sections */
.ws-section { display: flex; flex-direction: column; gap: 10px; }

.ws-section--activity { margin-top: 4px; }

.ws-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ws-section-title__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ws-create-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--green);
  background: var(--green-light);
  padding: 3px 9px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.12s;
}
.ws-create-inline:hover { background: rgba(45, 106, 79, 0.18); }

.ws-section-title h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.008em;
}

.ws-view-all {
  font-size: 0.76rem;
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.12s;
}
.ws-view-all:hover { opacity: 0.75; }

/* Rubrick list */
.rubrick-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rubrick-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
  text-decoration: none;
  color: inherit;
}
.rubrick-item:hover {
  background: var(--bg-sage);
  border-color: var(--border);
}

.rubrick-item__icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  flex-shrink: 0;
}

.rubrick-item__icon--shared {
  background: #EBF0F8;
  color: #3A5A8A;
}

.rubrick-item__body {
  flex: 1;
  min-width: 0;
}

.rubrick-item__name {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1px;
}

.rubrick-item__desc {
  font-size: 0.73rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rubrick-item__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.rubrick-shared-by {
  font-size: 0.7rem;
  color: var(--text-faint);
  margin-top: 2px;
}

/* Status + demo pills */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.pill--draft {
  background: #F6F1E6;
  color: #8A6328;
}

.pill--active {
  background: var(--green-light);
  color: var(--green-dark);
}

.pill--shared {
  background: #EBF0F8;
  color: #3A5A8A;
}

.pill--demo {
  background: #F0F0EE;
  color: #909090;
  font-size: 0.62rem;
}

/* Recent activity */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.activity-item__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  opacity: 0.55;
}

.activity-item__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-item__time {
  font-size: 0.72rem;
  color: var(--text-faint);
  flex-shrink: 0;
}

/* Demo footer bar */
.ws-demo-footer {
  height: 36px;
  background: var(--bg);
  border-top: 1px solid var(--border-light);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.73rem;
  color: var(--text-faint);
  flex-shrink: 0;
}

.ws-demo-footer__dot { opacity: 0.6; }

/* Empty states */
.ws-empty-state {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.ws-empty-state--quiet {
  padding: 24px 20px;
  background: transparent;
  border-style: dashed;
}

.ws-empty-state__icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  margin-bottom: 4px;
}

.ws-empty-state__title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.ws-empty-state__text {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 280px;
  line-height: 1.55;
}

.ws-empty-state__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 9px 18px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.12s;
}
.ws-empty-state__cta:hover { background: var(--green-dark); }

@media (max-width: 860px) {
  .ws-grid { grid-template-columns: 1fr; }
  .ws-sidebar { width: 200px; }
}

@media (max-width: 640px) {
  .ws-sidebar { display: none; }
  .ws-content { padding: 20px 18px 40px; }
  .ws-topbar { padding: 0 18px; }
}

/* ═══════════════════════════════════════════
   CREATE A RUBRICK — FLOW
   ═══════════════════════════════════════════ */

/* ── Page shell ── */
.cr-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

/* ── Top bar ── */
.cr-topbar {
  height: 54px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--bg);
  flex-shrink: 0;
}

.cr-topbar__left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cr-topbar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.cr-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
}

.cr-breadcrumb__link {
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.12s;
}
.cr-breadcrumb__link:hover { color: var(--text); }

.cr-breadcrumb__sep { color: var(--text-faint); }

.cr-breadcrumb__current {
  color: var(--text);
  font-weight: 600;
}

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

/* ── Body layout (3 columns) ── */
.cr-layout {
  display: grid;
  grid-template-columns: 280px minmax(560px, 880px) 420px;
  flex: 1;
  overflow: hidden;
}
@media (max-width: 1380px) {
  .cr-layout { grid-template-columns: 260px minmax(520px, 1fr) 380px; }
}

/* ── Left sidebar (stepper)
 * Stepper takes natural height; the expert mini-card sits in its own
 * non-shrinking footer so it never gets clipped on shorter viewports. */
.cr-sidebar {
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 28px 0 20px;
  background: var(--bg);
  gap: 20px;
}

/* ── Stepper ── */
.cr-stepper {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 16px;
  flex-shrink: 0;
}

.cr-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 7px;
  cursor: default;
  position: relative;
}

.cr-step::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 32px;
  width: 1.5px;
  height: calc(100% - 8px);
  background: var(--border);
}
.cr-step:last-child::before { display: none; }

.cr-step__indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-faint);
  transition: all 0.14s;
}

.cr-step--active .cr-step__indicator {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.cr-step--done .cr-step__indicator {
  background: var(--green-light);
  border-color: var(--green);
  color: var(--green);
}
.cr-step--done .cr-step__indicator span { display: none; }
.cr-step--done .cr-step__indicator::after {
  content: '';
  display: block;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg) translateY(-1px);
}

.cr-step__label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-faint);
  padding-top: 3px;
  line-height: 1.3;
}
.cr-step--active .cr-step__label { color: var(--text); font-weight: 600; }
.cr-step--done .cr-step__label { color: var(--text-muted); }

/* ── Expert mini card
 * flex-shrink: 0 so it stays visible even when the stepper grows; margin-top
 * auto would push it to the bottom but we keep it just below the stepper for
 * cohesion. The sidebar itself scrolls if the viewport is short. */
.cr-expert-mini {
  margin: 0 16px;
  padding: 16px;
  background: var(--bg-sage);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
  flex-shrink: 0;
}

.cr-expert-mini__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.cr-expert-mini__name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.cr-expert-mini__role {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.cr-expert-mini__ws {
  font-size: 0.68rem;
  color: var(--text-faint);
  font-weight: 500;
}

/* ── Main content ── */
.cr-main {
  overflow-y: auto;
  padding: 40px 56px 64px;
  background: var(--bg);
}

.cr-step-content { max-width: 600px; }

/* ── Step headers ── */
.cr-step-header { margin-bottom: 28px; }

.cr-step-header h1 {
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cr-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.6;
}

.cr-expert-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.cr-expert-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.cr-expert-tag svg { color: var(--text-faint); }
.cr-expert-tag strong { color: var(--text); font-weight: 600; }

/* ── Pills ── */
.cr-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.cr-pill--req { background: #FDF3E7; color: #915F1A; }
.cr-pill--opt { background: var(--border-light); color: var(--text-faint); }
.cr-pill--live { background: var(--green-light); color: var(--green-dark); }

/* ── Form sections ── */
.cr-form-section { margin-bottom: 24px; }

.cr-section-heading {
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.008em;
}
.cr-section-heading--sm { font-size: 0.85rem; }

.cr-section-intro {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.cr-label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.cr-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.cr-label-row > label { margin-bottom: 0; }

.cr-optional {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-faint);
}

.cr-helper {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.55;
}
.cr-helper--muted { color: var(--text-faint); font-style: italic; }

.cr-note {
  font-size: 0.74rem;
  color: var(--text-faint);
  font-style: italic;
  margin-bottom: 12px;
}

/* ── Inputs ── */
.cr-input {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.cr-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.08);
}
.cr-input::placeholder { color: var(--text-faint); }
.cr-input--inline { flex: 1; font-size: 0.82rem; padding: 8px 12px; }

.cr-textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  outline: none;
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.cr-textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.08);
}
.cr-textarea::placeholder { color: var(--text-faint); }
.cr-textarea--error {
  border-color: #C94040;
  box-shadow: 0 0 0 3px rgba(201, 64, 64, 0.08);
}

/* ── Work type grid ── */
.work-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.work-type-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 14px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}
.work-type-card:hover {
  border-color: #B0C8BC;
  background: var(--bg-sage);
}
.work-type-card--selected {
  border-color: var(--green);
  background: var(--green-light);
  box-shadow: 0 0 0 2px rgba(45, 106, 79, 0.1);
}

.work-type-card__icon {
  color: var(--text-faint);
  flex-shrink: 0;
  margin-top: 1px;
  transition: color 0.12s;
}
.work-type-card--selected .work-type-card__icon { color: var(--green); }

.work-type-card__body { flex: 1; min-width: 0; }

.work-type-card__label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.work-type-card--selected .work-type-card__label { color: var(--green-dark); }

.work-type-card__desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.work-type-card--selected .work-type-card__desc { color: #3D7060; }

.work-type-card__check {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--green);
}

.cr-other-input { margin-top: 8px; }

/* ── Work structure options ── */
.work-structure-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.work-struct-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: #fff;
  transition: border-color 0.12s, background 0.12s;
}
.work-struct-option:hover { border-color: #B0C8BC; background: var(--bg-sage); }
.work-struct-option--selected {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green-dark);
  font-weight: 600;
}
.work-struct-option input[type="radio"] { accent-color: var(--green); flex-shrink: 0; }

/* ── Manual entry field builder ── */
.cr-manual-entry {
  margin-top: 16px;
  border: 1.5px solid var(--green);
  border-radius: 10px;
  background: var(--green-light);
  padding: 20px;
}

.cr-manual-entry__inner {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 820px) {
  .cr-manual-entry__inner { grid-template-columns: 1fr; }
}

.cr-manual-entry__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--green-dark);
  margin: 0 0 4px;
}

.cr-field-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}

.cr-field-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  transition: border-color 0.12s, box-shadow 0.12s;
}


.cr-field-row__drag {
  color: var(--text-faint);
  cursor: grab;
  flex-shrink: 0;
  padding: 2px 3px;
  display: flex;
  align-items: center;
}
.cr-field-row__drag:active { cursor: grabbing; }

.cr-field-row__label {
  flex: 1;
  min-width: 0;
  padding: 6px 10px !important;
  font-size: 0.83rem !important;
}

.cr-field-row__type {
  flex-shrink: 0;
  padding: 6px 24px 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.83rem;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.cr-field-row__type:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.08);
}

.cr-field-row__delete {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 4px 5px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  transition: color 0.1s, background 0.1s;
}
.cr-field-row__delete:hover { color: #DC2626; background: #FEF2F2; }

.cr-add-field-btn { display: flex; align-items: center; gap: 5px; }

/* ── Staleness banner ── */
.cr-staleness-banner {
  border: 1.5px solid #B0C8BC;
  border-radius: 8px;
  background: #EEF6F1;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.cr-staleness-banner__text {
  font-size: 0.82rem;
  color: var(--green-dark);
  margin: 0 0 10px;
  line-height: 1.5;
}

.cr-staleness-banner__actions {
  display: flex;
  gap: 8px;
}

.cr-manual-entry__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Field item wrapper (draggable, includes row + rationale) ── */
.cr-field-item { display: flex; flex-direction: column; gap: 0; }

.cr-field-item--dragging { opacity: 0.45; }

.cr-field-item--drag-over .cr-field-row {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
}

.cr-field-rationale {
  font-size: 0.73rem;
  color: var(--text-faint);
  padding: 3px 10px 5px 44px;
  line-height: 1.4;
}

.cr-field-rationale__prefix {
  font-weight: 600;
  color: var(--text-muted);
}

/* ── Suggestion status bar ── */
.cr-suggestion-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 7px;
}

.cr-suggestion-status--loading {
  background: rgba(45, 106, 79, 0.07);
  color: var(--green-dark);
}

.cr-suggestion-status--warn {
  background: rgba(180, 83, 9, 0.06);
  color: #92400e;
}

.cr-suggestion-status--hint {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-muted);
}

@keyframes cr-spin { to { transform: rotate(360deg); } }
.cr-suggestion-status__spin { animation: cr-spin 0.9s linear infinite; flex-shrink: 0; }

/* ── Manual entry preview ── */
.cr-preview-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.cr-preview-body {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 80px;
}

.cr-preview-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cr-preview-field__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.cr-preview-input {
  width: 100%;
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 0.82rem;
  font-family: var(--font);
  color: var(--text-faint);
  background: var(--bg);
  cursor: not-allowed;
  resize: none;
  box-sizing: border-box;
}

.cr-preview-input--long { min-height: 58px; }

/* ── Collapsible sections ── */
.cr-collapsible {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
  background: #fff;
}

.cr-collapsible__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background 0.1s;
}
.cr-collapsible__header::-webkit-details-marker { display: none; }
.cr-collapsible__header:hover { background: var(--bg-sage); }

details[open] .cr-collapsible__header svg:first-child {
  transform: rotate(90deg);
}
.cr-collapsible__header svg:first-child {
  color: var(--text-faint);
  flex-shrink: 0;
  transition: transform 0.14s;
}

.cr-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 600;
  margin-left: auto;
}
.cr-badge[hidden] { display: none; }

.cr-collapsible__body {
  padding: 14px 16px 18px;
  border-top: 1px solid var(--border-light);
}

/* ── Context group cards ── */
.context-group-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.context-group-card {
  position: relative;
  flex: 1 1 140px;
  min-width: 130px;
  padding: 11px 12px;
  background: var(--bg-sage);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.context-group-card:hover { border-color: #B0C8BC; }
.context-group-card--selected {
  border-color: var(--green);
  background: var(--green-light);
}

.context-group-card__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.context-group-card--selected .context-group-card__label { color: var(--green-dark); }

.context-group-card__sub {
  font-size: 0.7rem;
  color: var(--text-faint);
  line-height: 1.4;
}
.context-group-card--selected .context-group-card__sub { color: #4A7A62; }

.context-group-card__check {
  position: absolute;
  top: 6px;
  right: 6px;
  color: var(--green);
}

/* ── Reference docs ── */
.ref-doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.cr-btn--sm {
  padding: 6px 12px !important;
  font-size: 0.78rem !important;
  border-radius: 7px !important;
}

.ref-doc-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ref-doc-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  background: var(--bg-sage);
  border: 1px solid var(--border-light);
  border-radius: 7px;
}

.ref-doc-item__icon {
  color: var(--text-faint);
  flex-shrink: 0;
}

.ref-doc-item__name {
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 500;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ref-doc-item__remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-faint);
  padding: 2px;
  border-radius: 4px;
  display: flex;
  flex-shrink: 0;
  transition: color 0.1s, background 0.1s;
}
.ref-doc-item__remove:hover { color: var(--text); background: rgba(0,0,0,0.06); }

.cr-file-input {
  max-width: 280px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--text-muted);
  padding: 7px 10px;
  font: inherit;
  font-size: 0.78rem;
}

.cr-upload-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.cr-upload-item {
  width: 100%;
  text-align: left;
  display: block;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
}

.cr-upload-item--button {
  cursor: pointer;
}

.cr-upload-item--button:hover {
  border-color: #B0C8BC;
  background: var(--bg-sage);
}

.cr-upload-item--selected {
  border-color: var(--green);
  background: var(--green-light);
  box-shadow: inset 0 0 0 1px var(--green);
}

.cr-upload-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.cr-upload-item__top strong {
  min-width: 0;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.35;
}

.cr-upload-item__top span {
  flex-shrink: 0;
  color: var(--text-faint);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.cr-upload-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.cr-work-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 14px;
  align-items: start;
}

.cr-feedback-box {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-sage);
  padding: 14px;
  display: grid;
  gap: 9px;
}

.cr-feedback-box__header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  color: var(--text);
  font-size: 0.84rem;
}

.cr-feedback-box__header span {
  color: var(--text-faint);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.cr-feedback-box__source {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.77rem;
  line-height: 1.45;
}

@media (max-width: 780px) {
  .cr-work-review-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Guided Q&A ── */
.guided-qa { display: flex; flex-direction: column; gap: 10px; }

.guided-qa__progress {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.guided-qa__question {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
}

.suggestion-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.cr-chips-label {
  font-size: 0.72rem;
  color: var(--text-faint);
  font-weight: 500;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.chip:hover { border-color: var(--green); color: var(--green); background: var(--green-light); }

.cr-emerging {
  margin-top: 4px;
  padding: 12px 14px;
  background: var(--green-light);
  border: 1px solid rgba(45, 106, 79, 0.18);
  border-radius: var(--radius);
}

.cr-emerging__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
  margin-bottom: 8px;
}

.cr-emerging__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cr-emerging__list li {
  font-size: 0.8rem;
  color: var(--green-dark);
  padding-left: 14px;
  position: relative;
}
.cr-emerging__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.7;
}

/* ── Example option cards ── */
.example-option-cards {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.example-option-card {
  flex: 1;
  min-width: 120px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.example-option-card:hover { border-color: #B0C8BC; background: var(--bg-sage); }
.example-option-card--selected {
  border-color: var(--green);
  background: var(--green-light);
}

.example-option-card__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.example-option-card--selected .example-option-card__title { color: var(--green-dark); }

.example-option-card__rec {
  font-size: 0.7rem;
  color: var(--green);
  font-weight: 600;
}
.example-option-card__sub {
  font-size: 0.74rem;
  color: var(--text-faint);
  line-height: 1.4;
}

.cr-generate-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Starter cases ── */
.starter-cases {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cr-empty-examples {
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.cr-empty-examples p { font-size: 0.83rem; color: var(--text-muted); margin-bottom: 10px; }

.starter-case {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.starter-case__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.starter-case__summary {
  margin: 0;
  padding: 10px 14px;
  background: var(--bg-sage);
  border-left: 3px solid var(--border);
  border-radius: 0 6px 6px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.55;
}

.starter-case__review {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.starter-case__review-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  margin-right: 6px;
}

.feedback-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-muted);
  background: #fff;
  cursor: pointer;
  transition: all 0.12s;
}
.feedback-btn:hover { border-color: var(--green); color: var(--green); }
.feedback-btn--selected {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.feedback-btn--selected svg { stroke: #fff; }

/* ── Rubrick summary (step 4 bottom) ── */
.rubrick-summary {
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-sage);
}

.rubrick-summary__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.rubrick-summary__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.rubrick-summary__item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rubrick-summary__item--strength {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.rubrick-summary__key { font-size: 0.74rem; color: var(--text-faint); font-weight: 500; }
.rubrick-summary__val { font-size: 0.82rem; color: var(--text); font-weight: 600; }

.rubrick-strength { font-size: 0.82rem; font-weight: 700; }
.strength--strong { color: var(--green); }
.strength--needs-more { color: #8A6328; }

/* ── Actions bar ── */
.cr-actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cr-actions--has-back { justify-content: flex-start; }
.cr-actions--three { gap: 8px; }
.cr-actions--saved { flex-wrap: wrap; }

/* ── Step 5: Saved ── */
.cr-saved-check {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.cr-saved-card {
  margin-top: 24px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.cr-saved-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}
.cr-saved-meta__item { display: flex; gap: 12px; align-items: baseline; }
.cr-saved-meta__key { font-size: 0.76rem; font-weight: 600; color: var(--text-faint); width: 120px; flex-shrink: 0; }
.cr-saved-meta__val { font-size: 0.84rem; color: var(--text); }

.cr-saved-entries__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 10px;
}

.cr-saved-entries__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cr-saved-entries__list li {
  font-size: 0.83rem;
  color: var(--text);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}
.cr-saved-entries__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.65;
}

/* ═══════════════════════════════════════════
   RIGHT PANEL — RUBRICK VIEW
   ═══════════════════════════════════════════ */

.cr-panel {
  border-left: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-sage);
}

.cr-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  background: var(--bg);
}

.cr-panel__title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
}

.cr-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cr-panel__footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-light);
  font-size: 0.78rem;
  color: var(--text-faint);
  font-style: italic;
  flex-shrink: 0;
  background: var(--bg);
}

.cr-panel-expand-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--green);
  font-weight: 600;
  font-style: normal;
  text-decoration: none;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 6px;
  transition: background 0.12s;
}
.cr-panel-expand-link::after {
  content: '→';
  font-size: 0.95em;
  font-weight: 600;
  transition: transform 0.15s ease;
}
.cr-panel-expand-link:hover { background: var(--green-light); }
.cr-panel-expand-link:hover::after { transform: translateX(2px); }
.cr-panel-expand-link:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }

/* Panel work name */
.cr-panel-work-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
  margin-bottom: 8px;
  padding: 4px 6px;
  border-radius: 5px;
  outline: none;
  transition: background 0.12s;
  cursor: text;
  line-height: 1.3;
}
.cr-panel-work-name:hover { background: rgba(0,0,0,0.04); }
.cr-panel-work-name:focus { background: #fff; box-shadow: 0 0 0 2px var(--green-light); }

/* Panel meta row */
.cr-panel-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.cr-panel-meta__row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.74rem;
}
.cr-panel-meta__key { color: var(--text-faint); font-weight: 500; }
.cr-panel-meta__val { color: var(--text-muted); }

/* Panel sections */
.cr-panel-section {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.cr-panel-section:last-child { border-bottom: none; }

.cr-panel-section--emerging {
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.cr-panel-section__header {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cr-panel-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  font-size: 0.64rem;
  font-weight: 700;
}

.cr-panel-entries {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cr-panel-entry {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-left: 13px;
  position: relative;
  line-height: 1.45;
}
.cr-panel-entry::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.55;
}
.cr-panel-entry--guidance::before { background: var(--green); opacity: 0.7; }
.cr-panel-entry--example::before { background: #3A6A8A; opacity: 0.7; }

.cr-panel-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.cr-panel-row__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.55;
  flex-shrink: 0;
}

.cr-panel-empty {
  font-size: 0.75rem;
  color: var(--text-faint);
  font-style: italic;
}
.cr-panel-empty--muted { opacity: 0.7; }
.cr-panel-empty--opt { color: var(--text-faint); }

.cr-panel-subsection {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--green);
  margin: 8px 0 4px;
}
.cr-panel-subsection:first-child { margin-top: 0; }

.cr-panel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.cr-panel-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(45, 106, 79, 0.1);
  color: var(--green-dark);
  font-size: 0.68rem;
  font-weight: 600;
}

/* Panel stats (step 4) */
.cr-panel-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.cr-panel-stats__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.cr-panel-stats__row--muted { color: var(--text-faint); }
.cr-panel-stats__row strong { font-weight: 600; }

.cr-strength--strong { color: var(--green); }
.cr-strength--needs { color: #8A6328; }


/* ═══════════════════════════════════════════════════════════
   Rubrick view / details page  (rd-*)
   ═══════════════════════════════════════════════════════════ */

/* Shell */
.rd-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
}

/* Top bar */
.rd-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  height: 52px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: #fff;
}
.rd-topbar__brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.rd-topbar__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--green);
  color: #fff;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}
.rd-topbar__sep {
  color: var(--text-faint);
  font-size: 0.85rem;
}
.rd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
}
.rd-breadcrumb__link {
  color: var(--text-muted);
  text-decoration: none;
}
.rd-breadcrumb__link:hover { color: var(--text); }
.rd-breadcrumb__sep { color: var(--text-faint); }
.rd-breadcrumb__current { color: var(--text); font-weight: 500; }
.rd-topbar__spacer { flex: 1; }
.rd-topbar__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green-band);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Buttons */
.rd-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.14s, color 0.14s;
}
.rd-btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.rd-btn--ghost:hover { background: var(--bg-sage); color: var(--text); }
.rd-btn--primary {
  background: var(--green);
  color: #fff;
}
.rd-btn--primary:hover { background: var(--green-dark); }

/* Body: three columns
 * Grid lets us cap the center and reserve real width for the right detail
 * panel. minmax keeps the center readable down to 1280px without crushing the
 * left source list or the right entry detail. */
.rd-body {
  display: grid;
  grid-template-columns: 280px minmax(560px, 1fr) 420px;
  flex: 1;
  overflow: hidden;
}
@media (max-width: 1380px) {
  .rd-body { grid-template-columns: 260px minmax(520px, 1fr) 380px; }
}

/* ── Left panel ── */
.rd-left {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 18px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rd-search-wrap {
  position: relative;
  margin-bottom: 12px;
}
.rd-search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}
.rd-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px 7px 28px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 0.78rem;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  outline: none;
}
.rd-search-input:focus { border-color: var(--green); }

.rd-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
.rd-filter-row--sm { margin-bottom: 14px; }

.rd-filter-chip {
  padding: 4px 9px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  font-size: 0.73rem;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rd-filter-chip:hover { border-color: var(--green); color: var(--green); }
.rd-filter-chip--active {
  background: var(--green-light);
  border-color: var(--green);
  color: var(--green);
  font-weight: 500;
}
.rd-filter-chip--sm { font-size: 0.7rem; padding: 3px 8px; }
.rd-filter-count {
  font-size: 0.68rem;
  background: rgba(0,0,0,0.06);
  border-radius: 10px;
  padding: 0 5px;
  line-height: 1.5;
}
.rd-filter-chip--active .rd-filter-count { background: rgba(45,106,79,0.12); }

.rd-left-section {
  margin-bottom: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.rd-left-section:last-child { border-bottom: none; }
.rd-left-section--pending { margin-top: 4px; }

.rd-left-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-top: 12px;
}
.rd-left-section__title {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.rd-left-section__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Tertiary action link — used everywhere a small "do something" link sits
 * inside a panel or card. Visible affordance: green text, weight 600, arrow
 * after the label, hover background, underline-on-hover. Pair with
 * .action-link--disabled to clearly mark unimplemented features. */
.action-link, .rd-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
  padding: 3px 6px;
  margin: -3px -6px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.action-link::after, .rd-doc-link::after {
  content: '→';
  font-size: 0.95em;
  font-weight: 600;
  opacity: 0.85;
  transition: transform 0.15s ease;
}
.action-link:hover, .rd-doc-link:hover {
  background: var(--green-light);
  text-decoration: none;
}
.action-link:hover::after, .rd-doc-link:hover::after { transform: translateX(2px); }
.action-link:focus-visible, .rd-doc-link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}
.action-link--disabled, .rd-doc-link--disabled {
  color: var(--text-faint);
  cursor: not-allowed;
  font-weight: 500;
}
.action-link--disabled::after, .rd-doc-link--disabled::after { opacity: 0.5; }
.action-link--disabled:hover, .rd-doc-link--disabled:hover { background: transparent; }
/* Variant without trailing arrow (e.g. breadcrumb crumbs that already have separators). */
.action-link--plain::after, .rd-doc-link--plain::after { content: none; }

.rd-doc-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}
.rd-doc-row:last-child { border-bottom: none; }
.rd-doc-row__name {
  font-size: 0.79rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
  word-break: break-word;
}
.rd-doc-row__meta {
  font-size: 0.71rem;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.rd-doc-row__actions {
  display: flex;
  gap: 10px;
}

.rd-ref-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border-light);
}
.rd-ref-row:last-child { border-bottom: none; }
.rd-ref-row svg { flex-shrink: 0; opacity: 0.6; }
.rd-ref-row__name { word-break: break-word; }

.rd-pending-row {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
}
.rd-pending-row:last-child { border-bottom: none; }
.rd-pending-row__label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 1px;
  word-break: break-word;
}
.rd-pending-row__detail {
  font-size: 0.71rem;
  color: var(--text-muted);
}

/* ── Center panel ── */
.rd-center {
  overflow-y: auto;
  padding: 32px 36px 48px;
  border-right: 1px solid var(--border);
  min-width: 0;
}
.rd-center > * { max-width: 720px; }

.rd-center-header {
  margin-bottom: 20px;
}
.rd-center-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.rd-center-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

.rd-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.rd-tab {
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 4px 4px 0 0;
  transition: color 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.rd-tab:hover { color: var(--text); }
.rd-tab--active {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 600;
}
.rd-tab-count {
  font-size: 0.68rem;
  background: var(--bg-sage);
  border-radius: 10px;
  padding: 1px 6px;
  color: var(--text-muted);
  font-weight: 400;
}
.rd-tab--active .rd-tab-count { background: var(--green-light); color: var(--green); }

.rd-entry-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rd-entry-empty {
  padding: 24px 0;
  color: var(--text-faint);
  font-size: 0.82rem;
}

.rd-entry-card {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.rd-entry-card:hover { border-color: var(--green); box-shadow: var(--shadow-sm); }
.rd-entry-card--active {
  border-color: var(--green);
  background: var(--green-light);
}
.rd-entry-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.rd-entry-card__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.rd-entry-card__desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 4px;
  line-height: 1.45;
}
.rd-entry-card__meta {
  font-size: 0.69rem;
  color: var(--text-faint);
}

/* Source tags */
.rd-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.rd-tag--policy   { background: #E8F0FE; color: #2B4BB6; }
.rd-tag--expert   { background: var(--green-light); color: var(--green); }
.rd-tag--example  { background: #FEF3E2; color: #8A5C0A; }
.rd-tag--suggestion { background: var(--bg-sage); color: var(--text-muted); }

/* ── Right detail panel ── */
.rd-right {
  overflow-y: auto;
  margin: 16px 16px 16px 0;
  border: 1.5px solid var(--green);
  border-radius: var(--radius-lg);
  padding: 22px 24px 24px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(45,106,79,0.08);
}

.rd-right-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.rd-right-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.rd-right-pill {
  font-size: 0.67rem;
  background: var(--green-light);
  color: var(--green);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}

.rd-detail-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}
.rd-detail-tag { margin-bottom: 12px; }

.rd-detail-section {
  margin-bottom: 14px;
}
.rd-detail-section__label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 5px;
}
.rd-detail-guidance {
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.55;
  margin: 0;
}

/* Overlap notice */
.rd-overlap {
  background: #FEF3E2;
  border: 1px solid #F4C87A;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.rd-overlap__label {
  font-size: 0.71rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8A5C0A;
  margin-bottom: 6px;
}
.rd-overlap__text {
  font-size: 0.82rem;
  color: #5C3D08;
  margin: 0 0 12px;
  line-height: 1.5;
}
.rd-overlap__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.rd-overlap-btn {
  padding: 7px 14px;
  font-size: 0.78rem;
  font-family: var(--font);
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid #F4C87A;
  background: #fff;
  color: #8A5C0A;
  transition: background 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.rd-overlap-btn:hover { background: #FEF3E2; border-color: #C68F1F; }
.rd-overlap-btn--ghost { background: transparent; border-color: #E5C07A; color: #A0752A; }

/* Sources + examples lists */
.rd-source-list,
.rd-example-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.rd-source-item,
.rd-example-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.rd-source-item svg,
.rd-example-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.55;
}

/* AI refinement box */
.rd-ai-refine {
  margin-top: 14px;
  background: var(--bg-sage);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.rd-ai-refine__header {
  font-size: 0.69rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--green);
  margin-bottom: 4px;
}
.rd-ai-refine__text {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 8px;
}
.rd-ai-refine__btn {
  padding: 5px 11px;
  font-size: 0.74rem;
  font-family: var(--font);
  font-weight: 500;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s;
}
.rd-ai-refine__btn:hover { background: var(--green-dark); }

/* ── Rubrick detail page additions ── */
.rd-left__heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.rd-entry-count {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--text-faint);
  font-weight: 500;
  padding-bottom: 4px;
}


/* ═══════════════════════════════════════════════════════════
   Work Item Document page  (wi-*)
   ═══════════════════════════════════════════════════════════ */

.wi-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
}

/* Top bar — reuses rd-topbar patterns with wi- prefix */
.wi-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  height: 52px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: #fff;
}
.wi-topbar__brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wi-topbar__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--green);
  color: #fff;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}
.wi-topbar__sep { color: var(--text-faint); font-size: 0.85rem; }
.wi-topbar__spacer { flex: 1; }
.wi-topbar__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green-band);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wi-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; }
.wi-breadcrumb__link { color: var(--text-muted); text-decoration: none; }
.wi-breadcrumb__link:hover { color: var(--text); }
.wi-breadcrumb__sep { color: var(--text-faint); }
.wi-breadcrumb__current { color: var(--text); font-weight: 500; }

.wi-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.14s, color 0.14s;
}
.wi-btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.wi-btn--ghost:hover { background: var(--bg-sage); color: var(--text); }
.wi-btn--primary { background: var(--green); color: #fff; }
.wi-btn--primary:hover { background: var(--green-dark); }
.wi-btn--full { width: 100%; justify-content: center; }

/* Body */
.wi-body {
  display: grid;
  grid-template-columns: 280px minmax(560px, 1fr) 400px;
  flex: 1;
  overflow: hidden;
}
@media (max-width: 1380px) {
  .wi-body { grid-template-columns: 260px minmax(520px, 1fr) 360px; }
}

/* ── Left panel ── */
.wi-left {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 18px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wi-left__heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.wi-doc-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-sage);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.wi-doc-card__icon { color: var(--green); flex-shrink: 0; margin-top: 2px; }
.wi-doc-card__name { font-size: 0.8rem; font-weight: 600; color: var(--text); margin-bottom: 2px; word-break: break-word; }
.wi-doc-card__path { font-size: 0.69rem; color: var(--text-faint); margin-bottom: 4px; }
.wi-doc-card__stats { font-size: 0.73rem; color: var(--text-muted); }
.wi-doc-card__reviewed { font-size: 0.71rem; color: var(--text-faint); margin-top: 2px; }

.wi-rows-section { margin-bottom: 16px; }
.wi-rows-section__title {
  font-size: 0.69rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.wi-row-item {
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  margin-bottom: 2px;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}
.wi-row-item:hover { background: var(--bg-sage); }
.wi-row-item--active {
  background: var(--green-light);
  border-color: var(--green);
}
.wi-row-item__title { font-size: 0.8rem; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.wi-row-item__meta { font-size: 0.71rem; color: var(--text-muted); }

.wi-doc-actions { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border-light); }
.wi-doc-actions__title {
  font-size: 0.69rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.wi-doc-action-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
}
.wi-doc-action-link:hover { background: var(--green-light); }
.wi-doc-action-link:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.wi-doc-action-link svg { flex-shrink: 0; opacity: 0.85; }
.wi-doc-action-link--disabled {
  color: var(--text-faint);
  font-weight: 500;
  cursor: not-allowed;
}
.wi-doc-action-link--disabled:hover { background: transparent; }
.wi-doc-action-link--disabled svg { opacity: 0.5; }

/* ── Center panel ── */
.wi-center {
  overflow-y: auto;
  padding: 32px 36px 48px;
  border-right: 1px solid var(--border);
  min-width: 0;
}
.wi-center > * { max-width: 820px; }
.wi-center-header { margin-bottom: 14px; }
.wi-center-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  word-break: break-word;
}
.wi-center-subtitle { font-size: 0.82rem; color: var(--text-muted); margin: 0; }

.wi-info-banner {
  background: var(--bg-sage);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.79rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.wi-table-section { margin-bottom: 20px; }
.wi-table-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.wi-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.wi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.81rem;
}
.wi-th {
  padding: 9px 12px;
  text-align: left;
  font-size: 0.71rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-sage);
  border-bottom: 1px solid var(--border);
}
.wi-tr { border-bottom: 1px solid var(--border-light); transition: background 0.1s; }
.wi-tr:last-child { border-bottom: none; }
.wi-tr:hover { background: var(--bg-sage); }
.wi-tr--active { background: var(--green-light) !important; }
.wi-td { padding: 10px 12px; color: var(--text); vertical-align: middle; }
.wi-td--account { font-weight: 500; }

/* Variance colors */
.wi-var--over { color: #C0392B; font-weight: 600; }
.wi-var--under { color: var(--green); font-weight: 600; }

/* Status pills */
.wi-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.69rem;
  font-weight: 500;
  white-space: nowrap;
}
.wi-status--pending   { background: var(--bg-sage); color: var(--text-muted); }
.wi-status--inreview  { background: #FEF3E2; color: #8A5C0A; }
.wi-status--reviewed  { background: var(--green-light); color: var(--green); }

/* Selected work item preview */
.wi-preview {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.wi-preview__header {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.wi-preview__text {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.55;
  margin: 0 0 14px;
}
.wi-preview__actions { display: flex; gap: 8px; }

/* ── Right panel ── */
.wi-right {
  overflow-y: auto;
  padding: 24px 24px 28px;
  background: #fff;
  border-left: 1px solid var(--border);
}
.wi-right-header { margin-bottom: 12px; }
.wi-right-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.wi-detail-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
}

/* Metric cards */
.wi-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 16px;
}
.wi-metric-card {
  background: var(--bg-sage);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}
.wi-metric-card__label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 3px;
}
.wi-metric-card__value { font-size: 0.85rem; font-weight: 700; color: var(--text); }
.wi-metric-card--variance.wi-var--over { background: #FEF0F0; border-color: #F4AAAA; }
.wi-metric-card--variance.wi-var--over .wi-metric-card__value { color: #C0392B; }
.wi-metric-card--variance.wi-var--under { background: var(--green-light); border-color: var(--border); }
.wi-metric-card--variance.wi-var--under .wi-metric-card__value { color: var(--green); }

/* Detail tabs */
.wi-detail-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.wi-detail-tab {
  padding: 7px 12px;
  font-size: 0.79rem;
  font-weight: 500;
  font-family: var(--font);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 4px 4px 0 0;
  transition: color 0.12s;
}
.wi-detail-tab:hover { color: var(--text); }
.wi-detail-tab--active { color: var(--green); border-bottom-color: var(--green); font-weight: 600; }

/* Context cards */
.wi-context-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.wi-context-card {
  background: var(--bg-sage);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 12px;
}
.wi-context-card__header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: var(--text-muted);
}
.wi-context-card__label { font-size: 0.73rem; font-weight: 600; color: var(--text-muted); }
.wi-context-card__value { font-size: 0.77rem; color: var(--text); line-height: 1.45; margin: 0; }

/* Suggested guidance chips */
.wi-guidance { margin-bottom: 14px; }
.wi-guidance__label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.wi-guidance__chips { display: flex; flex-wrap: wrap; gap: 5px; }
.wi-guidance-chip {
  padding: 3px 9px;
  background: var(--green-light);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.71rem;
  font-weight: 500;
  color: var(--green);
}

/* References empty state */
.wi-references-empty {
  padding: 16px 0;
  font-size: 0.79rem;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.wi-guidance-review {
  margin-top: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-sage);
  display: grid;
  gap: 8px;
}

.wi-guidance-review__title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.wi-guidance-review__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.wi-guidance-review__input,
.wi-guidance-review__textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
  font-size: 0.78rem;
}

.wi-guidance-review__textarea {
  resize: vertical;
  min-height: 96px;
}

.wi-guidance-review__list {
  display: grid;
  gap: 8px;
}

.wi-guidance-review__list > p {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.75rem;
}

.wi-guidance-review__candidate {
  border: 1px solid var(--border-light);
  border-radius: 7px;
  background: #fff;
  padding: 9px 10px;
}

.wi-guidance-review__candidate strong {
  display: block;
  color: var(--text);
  font-size: 0.78rem;
  margin-bottom: 4px;
}

.wi-guidance-review__candidate p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

/* Bottom callout */
.wi-callout {
  background: var(--green-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 4px;
}
.wi-callout__text {
  font-size: 0.79rem;
  color: var(--text-muted);
  margin: 0 0 10px;
  line-height: 1.45;
}


/* ═══════════════════════════════════════════════════════════
   Rubrick Outputs page  (ro-*)
   ═══════════════════════════════════════════════════════════ */

.ro-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
}

/* Top bar */
.ro-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  height: 52px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: #fff;
}
.ro-topbar__brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.ro-topbar__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--green);
  color: #fff;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}
.ro-topbar__sep { color: var(--text-faint); font-size: 0.85rem; }
.ro-topbar__spacer { flex: 1; }
.ro-topbar__chips { display: flex; align-items: center; gap: 6px; margin-right: 4px; }
.ro-topbar__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green-band);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ro-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.69rem;
  font-weight: 500;
  white-space: nowrap;
}
.ro-status-chip--auto     { background: var(--green-light); color: var(--green); }
.ro-status-chip--reviewed { background: var(--bg-sage); color: var(--text-muted); border: 1px solid var(--border); }

.ro-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; }
.ro-breadcrumb__text { color: var(--text-muted); }
.ro-breadcrumb__link { color: var(--text-muted); text-decoration: none; }
.ro-breadcrumb__link:hover { color: var(--text); }
.ro-breadcrumb__sep { color: var(--text-faint); }
.ro-breadcrumb__current { color: var(--text); font-weight: 500; }

.ro-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 7px;
  font-size: 0.79rem;
  font-weight: 500;
  font-family: var(--font);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.14s, color 0.14s;
  white-space: nowrap;
}
.ro-btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.ro-btn--ghost:hover { background: var(--bg-sage); color: var(--text); }
.ro-btn--primary { background: var(--green); color: #fff; }
.ro-btn--primary:hover { background: var(--green-dark); }

/* Body */
.ro-body {
  display: grid;
  grid-template-columns: minmax(640px, 1fr) 420px;
  flex: 1;
  overflow: hidden;
}
@media (max-width: 1380px) {
  .ro-body { grid-template-columns: minmax(560px, 1fr) 380px; }
}

/* Main */
.ro-main { overflow-y: auto; padding: 32px 36px 56px; min-width: 0; }
.ro-main > * { max-width: 920px; }

.ro-page-header { margin-bottom: 24px; }
.ro-page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}
.ro-page-subtitle { font-size: 0.83rem; color: var(--text-muted); margin: 0; }

/* Output selector */
.ro-selector-section { margin-bottom: 28px; }
.ro-selector-section__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.ro-selector-section__title { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.ro-selector-badge {
  background: var(--bg-sage);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.69rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 2px 8px;
}

.ro-output-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 760px;
  margin-bottom: 12px;
}
.ro-output-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  cursor: pointer;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.ro-output-card:hover { border-color: var(--green); }
.ro-output-card--selected {
  border-color: var(--green);
  background: var(--green-light);
}
.ro-output-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ro-output-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ro-output-card__icon--items { background: var(--green-light); color: var(--green); }
.ro-output-card__icon--rubrick { background: #E8F0FE; color: #2B4BB6; }
.ro-output-card--selected .ro-output-card__icon--items { background: #fff; }

.ro-output-card__selected-pill {
  font-size: 0.67rem;
  font-weight: 600;
  background: var(--green);
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
}
.ro-output-card__name { font-size: 0.88rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.ro-output-card__desc { font-size: 0.77rem; color: var(--text-muted); margin-bottom: 12px; line-height: 1.45; }
.ro-output-card__btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: var(--green);
  color: #fff;
  transition: background 0.12s;
}
.ro-output-card__btn:hover { background: var(--green-dark); }
.ro-output-card__btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.ro-output-card__btn--ghost:hover { background: var(--bg-sage); color: var(--text); }

.ro-selector-helper { font-size: 0.75rem; color: var(--text-faint); }

/* Items section */
.ro-items-section { }
.ro-items-section__header { margin-bottom: 14px; }
.ro-items-section__title { font-size: 0.92rem; font-weight: 700; color: var(--text); }
.ro-items-selected-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  background: var(--green-light);
  color: var(--green);
  font-size: 0.67rem;
  font-weight: 600;
  border-radius: 20px;
  vertical-align: middle;
}
.ro-items-section__subtitle { font-size: 0.79rem; color: var(--text-muted); margin: 4px 0 0; }

.ro-items-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ro-select {
  padding: 6px 10px;
  font-size: 0.79rem;
  font-family: var(--font);
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  outline: none;
  cursor: pointer;
}
.ro-select:focus { border-color: var(--green); }
.ro-search-wrap { position: relative; }
.ro-search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}
.ro-search-input {
  padding: 6px 10px 6px 28px;
  font-size: 0.79rem;
  font-family: var(--font);
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  outline: none;
  width: 200px;
}
.ro-search-input:focus { border-color: var(--green); }

.ro-table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; }
.ro-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.ro-th {
  padding: 9px 12px;
  text-align: left;
  font-size: 0.69rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-sage);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.ro-th--icon { width: 28px; }
.ro-tr { border-bottom: 1px solid var(--border-light); }
.ro-tr:last-child { border-bottom: none; }
.ro-tr--clickable { cursor: pointer; }
.ro-tr--clickable:hover { background: var(--bg-sage); }
.ro-tr--expanded { background: var(--green-light) !important; }
.ro-tr-detail { background: #fff; }
.ro-td { padding: 10px 12px; color: var(--text); vertical-align: middle; }
.ro-td--item { font-weight: 500; }
.ro-td--action { color: var(--text-muted); font-size: 0.78rem; }
.ro-td--entry { color: var(--text-muted); font-size: 0.78rem; }
.ro-td--chevron { text-align: center; width: 28px; }

.ro-chevron { transition: transform 0.18s; color: var(--text-faint); }
.ro-chevron--open { transform: rotate(180deg); }

/* Result tags */
.ro-result-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.69rem;
  font-weight: 600;
  white-space: nowrap;
}
.ro-result--edit    { background: #FEF3E2; color: #8A5C0A; }
.ro-result--nuance  { background: #EDF5FF; color: #2B5BB6; }
.ro-result--approved{ background: var(--green-light); color: var(--green); }
.ro-result--question{ background: #F3EFFE; color: #6B3FA0; }
.ro-result--new     { background: var(--bg-sage); color: var(--text-muted); }

/* Confidence */
.ro-conf {
  display: inline-flex;
  align-items: center;
  font-size: 0.73rem;
  font-weight: 600;
}
.ro-conf--high   { color: var(--green); }
.ro-conf--medium { color: #8A5C0A; }
.ro-conf--low    { color: #C0392B; }

/* Export status */
.ro-export-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.69rem;
  font-weight: 500;
}
.ro-export-status--ready { background: var(--green-light); color: var(--green); }
.ro-export-status--draft { background: var(--bg-sage); color: var(--text-muted); }

/* Expanded detail row */
.ro-detail-panel {
  padding: 14px 16px;
  background: #FAFEFB;
  border-top: 1px solid var(--border-light);
}
.ro-detail-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ro-detail-col__label {
  font-size: 0.69rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 5px;
}
.ro-detail-col__sublabel {
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.ro-detail-col__text { font-size: 0.79rem; color: var(--text); line-height: 1.5; margin: 0 0 4px; }
.ro-detail-list { margin: 0; padding-left: 16px; font-size: 0.78rem; color: var(--text-muted); line-height: 1.6; }

.ro-items-count { font-size: 0.74rem; color: var(--text-faint); }

/* Reusable Rubrick preview */
.ro-rubrick-preview { max-width: 640px; }
.ro-rubrick-preview__header { margin-bottom: 16px; }
.ro-rubrick-preview__title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}
.ro-rubrick-preview__subtitle { font-size: 0.79rem; color: var(--text-muted); margin: 0; }
.ro-rubrick-preview__entries { display: flex; flex-direction: column; gap: 8px; }
.ro-rubrick-entry {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.ro-rubrick-entry__title { font-size: 0.83rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.ro-rubrick-entry__guidance { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* Right panel */
.ro-right {
  border-left: 1px solid var(--border);
  overflow-y: auto;
  background: #fff;
}
.ro-export-panel { padding: 28px 24px 32px; }
.ro-export-panel__title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.ro-export-panel__hint { font-size: 0.78rem; color: var(--text-faint); margin-bottom: 22px; }

.ro-export-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  margin-bottom: 16px;
}
.ro-export-section--selected {
  border-color: var(--green);
  background: #FAFEFB;
}
.ro-export-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.ro-export-section__name { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.ro-export-section__pill {
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--green);
  color: #fff;
  padding: 3px 9px;
  border-radius: 20px;
  flex-shrink: 0;
}
.ro-export-section__desc { font-size: 0.8rem; color: var(--text-muted); margin: 0 0 14px; line-height: 1.5; }
.ro-export-section__note { font-size: 0.72rem; color: var(--text-faint); margin-top: 12px; line-height: 1.5; }

.ro-export-options { display: flex; flex-direction: column; gap: 8px; }
.ro-export-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s, background 0.12s;
  font-family: var(--font);
  min-height: 56px;
}
.ro-export-option:hover { border-color: var(--green); background: var(--green-light); }
.ro-export-option__icon { color: var(--green); flex-shrink: 0; margin-top: 2px; }
.ro-export-option__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ro-export-option__label { font-size: 0.82rem; font-weight: 600; color: var(--text); line-height: 1.35; }
.ro-export-option__hint { font-size: 0.74rem; color: var(--text-faint); line-height: 1.45; }

/* Toast */
.ro-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--green-band);
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-family: var(--font);
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 9999;
  pointer-events: none;
}
.ro-toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* JSON modal */
.ro-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
}
.ro-modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 580px;
  max-width: 92vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ro-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.ro-modal__title { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.ro-modal__close {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-faint);
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
}
.ro-modal__close:hover { color: var(--text); }
.ro-modal__pre {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  font-size: 0.74rem;
  font-family: 'Courier New', Courier, monospace;
  color: var(--text);
  background: var(--bg-sage);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}
.ro-modal__footer {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   REFERENCE INSIGHTS  (ri-*)
============================================================ */

/* Layout */
.ri-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.ri-topbar__left  { display: flex; align-items: center; gap: 16px; }
.ri-topbar__right { display: flex; align-items: center; gap: 10px; }
.ri-topbar__logo  {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--green-band); color: #fff;
  font-size: 0.88rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.ri-body {
  display: grid;
  grid-template-columns: 260px minmax(620px, 1fr) 400px;
  height: calc(100vh - 52px);
  overflow: hidden;
  background: var(--bg);
}
@media (max-width: 1380px) {
  .ri-body { grid-template-columns: 240px minmax(560px, 1fr) 360px; }
}

/* Left sidebar */
.ri-left {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 22px 0 20px;
  overflow-y: auto;
  background: var(--bg);
}
.ri-left__heading {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 16px 12px;
}
.ri-search-wrap { padding: 0 12px 12px; }
.ri-search {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text);
  background: #fff;
  outline: none;
}
.ri-search:focus { border-color: var(--green); }

/* Filter list */
.ri-filter-list {
  list-style: none;
  margin: 0;
  padding: 0 6px;
  flex: 1;
}
.ri-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text);
}
.ri-filter-item:hover { background: var(--bg-sage); }
.ri-filter-item--active { background: var(--bg-sage); font-weight: 600; }
.ri-filter-item__label { flex: 1; }
.ri-filter-item__count {
  font-size: 0.75rem;
  color: var(--text-faint);
  background: #EAEEE9;
  border-radius: 10px;
  padding: 1px 7px;
}

/* Health dots */
.ri-filter-item__dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.ri-dot--all          { background: #A8B8B0; }
.ri-dot--healthy      { background: #2D6A4F; }
.ri-dot--needs_review { background: #B45309; }
.ri-dot--needs_examples { background: #D97706; }
.ri-dot--low_usage    { background: #94A3B8; }
.ri-dot--stale        { background: #DC2626; }

/* Training card */
.ri-training-card {
  margin: 12px 10px 0;
  padding: 12px 12px 14px;
  background: #EAF2EE;
  border: 1px solid #C0DAD0;
  border-radius: 8px;
}
.ri-training-card__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.ri-training-card__text {
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.45;
}

/* Center main */
.ri-main {
  overflow-y: auto;
  padding: 32px 36px 48px;
  min-width: 0;
}
.ri-main > * { max-width: 880px; }
.ri-main__header { margin-bottom: 20px; }
.ri-main__title {
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}
.ri-main__subtitle {
  font-size: 0.84rem;
  color: var(--text-faint);
  margin: 0;
  line-height: 1.5;
}

/* Stat row */
.ri-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.ri-stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}
.ri-stat-card__value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}
.ri-stat-card__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.ri-stat-card__sub {
  font-size: 0.74rem;
  color: var(--text-faint);
}

/* Sections */
.ri-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}
.ri-section__header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.ri-section__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.ri-section__subtitle {
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* Coverage table */
.ri-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.ri-table__th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-faint);
  background: var(--bg-sage);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.ri-table__th--doc { width: 28%; }
.ri-table__row {
  cursor: pointer;
  transition: background 0.1s;
}
.ri-table__row:hover  { background: var(--bg-sage); }
.ri-table__row--active { background: #EAF2EE; }
.ri-table__td {
  padding: 11px 14px;
  border-bottom: 1px solid #F0F3F1;
  vertical-align: middle;
  color: var(--text);
}
.ri-table__td--doc  { max-width: 220px; }
.ri-table__td--num  { text-align: center; font-weight: 500; }
.ri-table__td--action { font-size: 0.79rem; color: var(--text-faint); }
.ri-table__empty {
  padding: 24px;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.82rem;
}

.ri-doc-name { font-weight: 500; color: var(--text); font-size: 0.82rem; }
.ri-doc-type { font-size: 0.72rem; color: var(--text-faint); margin-top: 2px; text-transform: capitalize; }

/* Heat squares */
.ri-heat { display: flex; gap: 4px; }
.ri-heat__sq {
  width: 18px; height: 18px; border-radius: 4px;
}
.ri-heat__sq--high   { background: #2D6A4F; }
.ri-heat__sq--med, .ri-heat__sq--medium { background: #D97706; opacity: 0.7; }
.ri-heat__sq--low    { background: #E2E8E4; }

/* Health badges */
.ri-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 0.73rem;
  font-weight: 600;
  white-space: nowrap;
}
.ri-badge--healthy        { background: #D1FAE5; color: #065F46; }
.ri-badge--needs_examples { background: #FEF3C7; color: #92400E; }
.ri-badge--needs_review   { background: #FEE2E2; color: #991B1B; }
.ri-badge--low_usage      { background: #F1F5F9; color: #475569; }
.ri-badge--stale          { background: #FCE7F3; color: #9D174D; }

/* Insight cards */
.ri-insight-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px 20px 20px;
}
.ri-insight-card {
  background: var(--bg-sage);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}
.ri-insight-card__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 6px;
}
.ri-insight-card__text {
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.5;
}

/* Right panel */
.ri-right {
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow-y: auto;
}
.ri-right__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ri-right__heading {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
}
.ri-right__pill {
  font-size: 0.69rem;
  font-weight: 600;
  color: var(--green);
  background: #EAF2EE;
  border: 1px solid #C0DAD0;
  border-radius: 10px;
  padding: 2px 8px;
}
.ri-right__body { flex: 1; padding: 16px; overflow-y: auto; }

/* Detail panel contents */
.ri-detail-doc { margin-bottom: 14px; }
.ri-detail-doc__name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}
.ri-detail-doc__type {
  font-size: 0.72rem;
  color: var(--text-faint);
  background: var(--bg-sage);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  text-transform: capitalize;
}

.ri-detail-section { margin-bottom: 14px; }
.ri-detail-section__title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.ri-detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ri-detail-stat {
  background: var(--bg-sage);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
}
.ri-detail-stat__val {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.ri-detail-stat__lbl {
  font-size: 0.7rem;
  color: var(--text-faint);
}

.ri-detail-callout {
  background: #EAF2EE;
  border: 1px solid #C0DAD0;
  border-radius: 8px;
  padding: 12px 12px 14px;
  margin-bottom: 14px;
}
.ri-detail-callout__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.ri-detail-callout__text {
  font-size: 0.79rem;
  color: var(--text);
  line-height: 1.5;
}

.ri-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ri-detail-list__item {
  font-size: 0.79rem;
  color: var(--text);
  padding: 4px 0;
  border-bottom: 1px solid #F0F3F1;
  line-height: 1.4;
}
.ri-detail-list__item:last-child { border-bottom: none; }

.ri-detail-action-text {
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 2px;
}

.ri-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.ri-detail-empty {
  padding: 24px 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* Buttons */
.ri-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.ri-btn--primary {
  background: var(--green);
  color: #fff;
}
.ri-btn--primary:hover { background: #245a41; }
.ri-btn--outline {
  background: #fff;
  color: var(--green);
  border: 1px solid var(--green);
}
.ri-btn--outline:hover { background: #EAF2EE; }
.ri-btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.ri-btn--ghost:hover { background: var(--bg-sage); }
.ri-btn--full { width: 100%; }

/* Breadcrumb */
.ri-breadcrumb { display: flex; align-items: center; gap: 6px; }
.ri-bc__crumb {
  font-size: 0.78rem;
  color: var(--text-faint);
  text-decoration: none;
}
.ri-bc__crumb:hover { color: var(--text); text-decoration: underline; }
.ri-bc__sep { font-size: 0.78rem; color: var(--text-faint); }
.ri-bc__current { font-size: 0.78rem; color: var(--text); font-weight: 600; }

/* Avatar */
.ri-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--green-band); color: #fff;
  font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ── Shared not-found / empty state ─────────────────────────
   Used by uiHelpers.renderNotFoundState across pages so missing
   IDs and broken deep links don't dead-end the user. */
.not-found-state {
  max-width: 420px;
  margin: 64px auto;
  padding: 40px 32px;
  background: #fff;
  border: 1px solid var(--border, #e3e8e6);
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(20, 40, 30, 0.04);
}
.not-found-state__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text, #1B2B3A);
  margin-bottom: 8px;
}
.not-found-state__message {
  font-size: 0.9rem;
  color: var(--text-muted, #5d6c66);
  margin: 0 0 20px 0;
  line-height: 1.5;
}
.not-found-state__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--green-band, #2D6A4F);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}
.not-found-state__back:hover { opacity: 0.92; }

/* ─── Add work item button (sidebar) ─── */
.rd-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green);
  background: none;
  border: none;
  padding: 3px 6px;
  margin: -3px -6px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.12s;
}
.rd-add-btn:hover { background: var(--green-light); }
.rd-add-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.rd-add-btn svg { flex-shrink: 0; }

/* ─── Add work item modal ─── */
.rd-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27, 43, 58, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  padding: 24px;
}
.rd-modal-overlay[hidden] { display: none; }

.rd-modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rd-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.rd-modal__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.rd-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.12s, color 0.12s;
}
.rd-modal__close:hover { background: var(--border-light); color: var(--text); }

.rd-modal__body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.rd-modal__footer {
  padding: 14px 24px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.rd-modal__btn {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.12s, opacity 0.12s;
}
.rd-modal__btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.rd-modal__btn--ghost:hover { background: var(--border-light); }
.rd-modal__btn--primary {
  background: var(--green);
  color: #fff;
}
.rd-modal__btn--primary:hover { background: var(--green-dark); }

/* Modal form elements */
.rd-modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rd-modal-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.rd-modal-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.rd-modal-required {
  color: var(--green);
}
.rd-modal-input {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 0.83rem;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s;
  outline: none;
}
.rd-modal-input:focus { border-color: var(--green); }
.rd-modal-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 0.83rem;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  resize: vertical;
  transition: border-color 0.15s;
  outline: none;
}
.rd-modal-textarea:focus { border-color: var(--green); }
.rd-modal-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.83rem;
  color: var(--text);
}

/* Upload area */
.rd-modal-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 16px;
  border: 1.5px dashed var(--border);
  border-radius: 9px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: border-color 0.15s, background 0.15s;
}
.rd-modal-upload-label:hover {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green);
}
.rd-modal-file-input { display: none; }
.rd-modal-file-name {
  font-size: 0.76rem;
  color: var(--green);
  font-weight: 500;
  min-height: 16px;
}

/* Case C toggle row */
.rd-modal-toggle-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rd-modal-toggle-q {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.rd-modal-segtabs {
  display: inline-flex;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-sage);
}
.rd-modal-segtab {
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.rd-modal-segtab + .rd-modal-segtab { border-left: 1.5px solid var(--border); }
.rd-modal-segtab--active {
  background: #fff;
  color: var(--green);
  font-weight: 600;
}

/* Key-value rows (Case C manual) */
.rd-kv-row {
  display: grid;
  grid-template-columns: 1fr 1fr 28px;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.rd-kv-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  color: var(--text-faint);
  transition: background 0.12s, color 0.12s;
}
.rd-kv-delete:hover:not([disabled]) { background: #fde8e8; color: #c0392b; }
.rd-kv-delete[disabled] { opacity: 0.3; cursor: not-allowed; }
.rd-modal-add-field-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green);
  background: none;
  border: none;
  padding: 3px 0;
  cursor: pointer;
  transition: opacity 0.12s;
}
.rd-modal-add-field-btn:hover { opacity: 0.75; }
